diff options
author | Linnea Gräf <nea@nea.moe> | 2024-11-13 15:02:33 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-11-13 15:02:33 +0100 |
commit | 2c3aa3bd84e6a129ca189ce0bc8d5705bc53ee72 (patch) | |
tree | de2a6e4c42e370a38f884036561c2a300c0fcfc6 /src/main/kotlin/gui | |
parent | 68020ee51695a15b3e93f117aa90728f7ab87ecd (diff) | |
download | Firmament-2c3aa3bd84e6a129ca189ce0bc8d5705bc53ee72.tar.gz Firmament-2c3aa3bd84e6a129ca189ce0bc8d5705bc53ee72.tar.bz2 Firmament-2c3aa3bd84e6a129ca189ce0bc8d5705bc53ee72.zip |
fix: Players not rendering in mob recipes
Diffstat (limited to 'src/main/kotlin/gui')
-rw-r--r-- | src/main/kotlin/gui/entity/GuiPlayer.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/kotlin/gui/entity/GuiPlayer.kt b/src/main/kotlin/gui/entity/GuiPlayer.kt index aa0bea8..d6d5586 100644 --- a/src/main/kotlin/gui/entity/GuiPlayer.kt +++ b/src/main/kotlin/gui/entity/GuiPlayer.kt @@ -9,6 +9,7 @@ import net.minecraft.client.util.SkinTextures.Model import net.minecraft.client.world.ClientWorld import net.minecraft.util.Identifier import net.minecraft.util.math.BlockPos +import net.minecraft.util.math.Vec3d import net.minecraft.world.World /** @@ -21,7 +22,9 @@ fun makeGuiPlayer(world: World): GuiPlayer { Float::class.javaPrimitiveType, GameProfile::class.java ) - return constructor.newInstance(world, BlockPos.ORIGIN, 0F, GameProfile(UUID.randomUUID(), "Linnea")) + val player = constructor.newInstance(world, BlockPos.ORIGIN, 0F, GameProfile(UUID.randomUUID(), "Linnea")) + player.postInit() + return player } class GuiPlayer(world: ClientWorld?, profile: GameProfile?) : AbstractClientPlayerEntity(world, profile) { @@ -29,6 +32,10 @@ class GuiPlayer(world: ClientWorld?, profile: GameProfile?) : AbstractClientPlay return false } + fun postInit() { + lastVelocity = Vec3d.ZERO + } + override fun isCreative(): Boolean { return false } |