- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public void onKeyInput(InputEvent.KeyInputEvent event)
- {
- if (KeyLoader.K.isPressed())
- {
- EntityPlayer player = Minecraft.getMinecraft().thePlayer;
- player.addPotionEffect(new PotionEffect(1, 1000, 1));
- }
- }
是因为玩家目标错误吗?
给予玩家药水效果应该在服务端进行
请使用SimpleImpl发包
https://fmltutor.ustc-zzzz.net/3 ... 95%B0%E6%8D%AE.html
https://harbinger.covertdragon.t ... etwork-wrapper.html
请使用SimpleImpl发包
https://fmltutor.ustc-zzzz.net/3 ... 95%B0%E6%8D%AE.html
https://harbinger.covertdragon.t ... etwork-wrapper.html