private void handleExplodePacket(ByteBufInputStream dat, World world) { try { newExplosion( world, null, dat.readDouble(), dat.readDouble(), dat.readDouble(), dat.readFloat(), true, world.getGameRules().getGameRuleBooleanValue("mobGriefing")); } catch (Exception e) { e.printStackTrace(); return; } }
private void handleRocketJumpHackyPacket(ByteBufInputStream dat, World world) { try { int id = dat.readInt(); EntityPlayer player = (EntityPlayer) world.getEntityByID(id); if (player != null) { double motionX = dat.readDouble(); double motionY = dat.readDouble(); double motionZ = dat.readDouble(); Minecraft.getMinecraft().thePlayer.motionX += motionX; Minecraft.getMinecraft().thePlayer.motionY += motionY; Minecraft.getMinecraft().thePlayer.motionZ += motionZ; } } catch (Exception e) { e.printStackTrace(); return; } }