fix: Players not rendering in mob recipes
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user