Posted February 14, 201312 yr I' making an armor mod but i like to put some effects on my armor. for that i need you'r help helmet - allows breathing underwater plate- heals you while in water *subject to change* Leggings - allows you to "float" in water when your not moving. boots - Allows you to move faster when your in water but move slower on land. how i need to to that plzz help me
February 14, 201312 yr I' making an armor mod but i like to put some effects on my armor. for that i need you'r help helmet - allows breathing underwater plate- heals you while in water *subject to change* Leggings - allows you to "float" in water when your not moving. boots - Allows you to move faster when your in water but move slower on land. how i need to to that plzz help me You can't make something like "Speed Boots" because motionX, motionY, motionZ wont work in TickHandler...
February 14, 201312 yr Author I' making an armor mod but i like to put some effects on my armor. for that i need you'r help helmet - allows breathing underwater plate- heals you while in water *subject to change* Leggings - allows you to "float" in water when your not moving. boots - Allows you to move faster when your in water but move slower on land. how i need to to that plzz help me You can't make something like "Speed Boots" because motionX, motionY, motionZ wont work in TickHandler... ok thx, but how i can do the rest ?
February 14, 201312 yr 1. Setup "TickHandler" read in wiki about "Ticking" 2. Check player armor and do you "special effects" Example: For air(infinite bubble bar): thePlayer.air = 1; // Change to max air number, i forgot it
February 14, 201312 yr i found out how to do the player.motionY in the tick handler (SeKtOR check your thread on it, i've posted it there) you just have to make sure you register the tick handler correctly in both proxys, else the client and server desynchronise so the player does not update, until it sends and receives the player data from the server (like on taking damage) basicly you need a setup like this: in common proxy: public void registerTickHandler() { TickRegistry.registerTickHandler(new MyTickHandler(), Side.SERVER); } in client proxy: public void registerTickHandler() { TickRegistry.registerTickHandler(new MyTickHandler(), Side.CLIENT); } in the TickHandler: public class MyTickHandler implements ITickHandler { @Override public void tickStart(EnumSet<TickType> type, Object... tickData) { playerTick((EntityPlayer)tickData[0]); } @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { } @Override public EnumSet<TickType> ticks() { return EnumSet.of(TickType.PLAYER); } @Override public String getLabel() { return "MY_PLAYER_TICK"; } public static void playerTick(EntityPlayer player) { //stuff to do to player } } github
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.