Posted August 8, 20196 yr Here's the top few lines of the crash log I was supplied with. This never happened while testing in the development environment. This may only be occurring on servers. Spoiler Time: 2019-08-08 17:45:02 CEST Description: Ticking entity java.lang.NoClassDefFoundError: net/minecraft/client/Minecraft at com.salvestrom.w2theJungle.mobs.entity.EntityRhinopter.updatePassenger(EntityRhinopter.java:1689) at net.minecraft.entity.Entity.updateRidden(Entity.java:2020) at net.minecraft.entity.EntityLivingBase.updateRidden(EntityLivingBase.java:2489) at com.salvestrom.w2theJungle.mobs.entity.EntityLizardmanBase.updateRidden(EntityLizardmanBase.java:157) at com.salvestrom.w2theJungle.mobs.entity.EntityLizardmanSticker.updateRidden(EntityLizardmanSticker.java:179) at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:1988) And here is the method from the entity file. This was an attempt to give a rider a bobbing effect while mounted. It was mostly successful. Am I doing something wrong with the Minecraft.get Minecraft() call?The line specified by the crash log corresponds to the first usage of Minecraft.getMinecraft. Again this never happens while in the development environment. Spoiler public void updatePassenger(Entity passenger) { if (this.isPassenger(passenger)) { float f5 = this.prevLimbSwingAmount + (this.limbSwingAmount - this.prevLimbSwingAmount) * Minecraft.getMinecraft().getRenderPartialTicks(); //"Time" in the model file float f6 = this.limbSwing - this.limbSwingAmount * (1.0F - Minecraft.getMinecraft().getRenderPartialTicks()); if (f5 > 1.0F) { f5 = 1.0F; } float f0 = MathHelper.sin(((1.0995574287564276334619251841478f) + (f6*1.226612f)) ) * (f5); passenger.setPosition(this.posX + 0, this.posY + this.getMountedYOffset() + passenger.getYOffset() + (this.isRaptorJumping() ? 0 : f0 * 0.0625), this.posZ - 0); } if (passenger instanceof EntityLiving) { EntityLiving entityliving = (EntityLiving)passenger; this.renderYawOffset = entityliving.renderYawOffset; } }
August 8, 20196 yr Author Spoiler public void updatePassenger(Entity passenger) { float f5 = 0; float f6 = 0; if (this.world.isRemote && this.isPassenger(passenger)) { f5 = this.prevLimbSwingAmount + (this.limbSwingAmount - this.prevLimbSwingAmount) * Minecraft.getMinecraft().getRenderPartialTicks(); //"Time" in the model file f6 = this.limbSwing - this.limbSwingAmount * (1.0F - Minecraft.getMinecraft().getRenderPartialTicks()); if (f5 > 1.0F) { f5 = 1.0F; } } float f0 = MathHelper.sin(((1.0995574287564276334619251841478f) + (f6*1.226612f)) ) * (f5); passenger.setPosition(this.posX + 0, this.posY + this.getMountedYOffset() + passenger.getYOffset() + (this.isRaptorJumping() ? 0 : f0 * 0.0625), this.posZ - 0); if (passenger instanceof EntityLiving) { EntityLiving entityliving = (EntityLiving)passenger; this.renderYawOffset = entityliving.renderYawOffset; } } This is what I currently have. I had to move the passenger.setPosition outside of the isRemote check because the player was immediately warping back to the position they mounted the entity at on dismounting. I have no idea if this will actually cure the original problem on a server, or if there is some other way around this. Edited August 8, 20196 yr by salvestrom
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.