Advertisement
Creepinson

Untitled

Jun 24th, 2017
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. package me.creepinson.packet;
  2.  
  3. import me.creepinson.lib.util.disguise.DisguiseTypes;
  4. import me.creepinson.lib.util.render.RenderHelper;
  5. import net.minecraft.client.renderer.entity.RenderLivingBase;
  6. import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
  7. import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
  8. import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
  9.  
  10. public class PacketHandler implements IMessageHandler<CustomPacket, IMessage> {
  11.  
  12. @Override public IMessage onMessage(CustomPacket message, MessageContext ctx) {
  13.  
  14.  
  15. switch(message.id){
  16.  
  17. case 0:
  18. RenderHelper.currentRender = DisguiseTypes.CREEPER.getDisguise();
  19.  
  20. break;
  21. case 1:
  22. RenderHelper.currentRender = DisguiseTypes.PIG.getDisguise();
  23.  
  24. break;
  25.  
  26. case 2:
  27. RenderHelper.currentRender = DisguiseTypes.PLAYER.getPlayer();
  28. break;
  29. }
  30. return null;
  31. }
  32.  
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement