Trying to create boots that can walk on powdered snow

Started by Nellie on

Topic category: Help with modding (Java Edition)

Last seen on 16:11, 13. Feb 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to create boots that can walk on powdered snow

Im trying to create a new type of boots that would act like leather boots when walking on powdered snow, right now i can detect when the player steps on powdered snow but i dont have a way to prevent sinking... any help is appreciated

Last seen on 02:33, 27. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To make the armor resist…
Mon, 02/12/2024 - 12:53

To make the armor resist freezing like leather armor, you can add it to the 'freeze_immune_wearables' tag.

The powder snow walking is a little bit trickier. Once you're finished with the armor you need to lock the mod element, and open the Java file. In the top section, where it lists all the imports, add this between any of them:

import net.minecraft.world.entity.LivingEntity;

Then Find the part about the boots, and add this after the first @override. (Make sure it compiles correctly!)

@Override
  		public boolean canWalkOnPowderedSnow(ItemStack stack, LivingEntity wearer) {
  			return true;
  		}