Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/19/24 in all areas

  1. The thought process for this would be checking the EnderMan class, as its not behaviour intrinsecally connected to the item but rather the enderman: The EnderMan.isLookingAtMeMethod should return false when a player is wearing your armour piece. In that method you can see a call to ForgeHooks.shouldSuppressEnderManAnger() which uses an ItemStack of the object on the players head. This uses IForgeItem's isEnderMask method that brings you to: default boolean isEnderMask(ItemStack stack, Player player, EnderMan endermanEntity) { return stack.getItem() == Blocks.CARVED_PUMPKIN.asItem(); } which means you can override it on your armour item (since all item classes extend from IForgeItem, including ArmorItem from which you will most likely want to extend from) As for the second thing you'll most likely need to get creative: Using levitation can work if you want to make it floaty, but you most likely want to make it work as if the player is walking on air. I'd suggest something along the lines of checking the block immediately in the direction the player is facing, and if its air, place a transparent, solid block the player will walk on. As the player walks in some arbitrarry direction, keep checking to generate blocks in their path as well as deleting the ones left behind/in any direction the player isn't looking at. You will have to get *even more creative* to think how can you implement it as for only the armour user can stand on air (placing a solid block will make anyone be able to stand on it regardless of if wearing the armour or not) So yeah. First thing pretty straightforward, second one youll have to make your own idea around it.
    1 point
×
×
  • Create New...

Important Information

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