File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
common/src/main/kotlin/com/lambda Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import net.minecraft.entity.LivingEntity
3232import net.minecraft.entity.decoration.ArmorStandEntity
3333import net.minecraft.entity.mob.MobEntity
3434import net.minecraft.entity.passive.PassiveEntity
35- import net.minecraft.util.Uuids
3635import java.util.UUID
3736
3837/* *
@@ -175,7 +174,6 @@ abstract class Targeting(
175174 }
176175
177176 private val illegalTargets = setOf (
178- UUID (0L , 0L ),
179177 UUID (5706954458220675710L , - 6736729783554821869L ),
180178 UUID (- 6114492090883684892 , - 8539188786807016414 )
181179 )
Original file line number Diff line number Diff line change @@ -37,22 +37,25 @@ object FakePlayer : Module(
3737 private val playerName by setting(" Name" , " Steve" )
3838
3939 private var fakePlayer: OtherClientPlayerEntity ? = null
40+ private val nilUuid = UUID (0 , 0 )
4041
4142 init {
4243 onEnable {
43- // Avoid multiple api requests
44- if (fakePlayer?.gameProfile?.name == playerName)
45- return @onEnable spawnPlayer(fakePlayer!! .gameProfile)
44+ fakePlayer?.let { fake ->
45+ // Avoid multiple api requests
46+ if (fake.gameProfile.name == playerName)
47+ return @onEnable spawnPlayer(fake.gameProfile)
48+ }
4649
4750 runSafeConcurrent {
4851 val uuid =
4952 request(" https://api.mojang.com/users/profiles/minecraft/$playerName " ) {
5053 method(Method .GET )
51- }.json<GameProfile >().data?.id ? : UUID ( 0 , 0 )
54+ }.json<GameProfile >().data?.id ? : nilUuid
5255
5356 val fetchedProperties = mc.sessionService.fetchProfile(uuid, true )?.profile?.properties
5457
55- val profile = GameProfile (UUID ( 0 , 0 ) , playerName).apply {
58+ val profile = GameProfile (nilUuid , playerName).apply {
5659 fetchedProperties?.forEach { key, value -> properties.put(key, value) }
5760 }
5861
You can’t perform that action at this time.
0 commit comments