Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/12/20 in all areas

  1. No need for a custom boots, just check in the tick even if said player has enchantment. Then if he has, apply the effect. EnchantmentHelper#getEnchantmentLevel is what you want here. As for the ItemStack applying, just set the EnchantmentType to ARMOR_BOOTS or something like that.
    1 point
  2. That would send a packet for every entity in the world, which is rather inefficient considering that when the time stops, all the values in the velocity would be 0. I would suggest making a separate packet for time stopping and time continuing. Moreover, I would suggest to send a list of all affect entities in one packet. However, if you really want to update the velocity individually, change the velocity of the entity directly and call Entity#markVelocityChanged. This will make the game sync the entity's velocity on the next tick (therefore custom packets are not necessary) (this would send a packet for each marked entity, which would be inefficient on a large scale). I'll check the arrow problem out, but I think it might be caused by the arrow's still picking up downward velocity from gravity every tick. In one of my mod I implemented a similar time stopping concept, and circumvented similar problems by keep setting the velocity of affected entities to 0. The client logic is similar to: listEntity <- a list of entities affected by the time stop; onStopPacketReceive: add specified entities to the list; onContinuePacketReceive: remove entities from the list; onTickEvent: set the velocity of all entities in the list to 0;
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.