mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Add hook for powdered-snow shoes (#8514)
This commit is contained in:
1 parent
9d3eb9df8f
commit
349e12f939
5 files changed
+85
No files matched your search
@@ -732,6 +732,20 @@ public interface IForgeItem
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the powdered snow block to check if a living entity wearing this can walk on the snow, granting the same behavior as leather boots.
|
||||
* Only affects items worn in the boots slot.
|
||||
*
|
||||
* @param stack Stack instance
|
||||
* @param wearer The entity wearing this ItemStack
|
||||
*
|
||||
* @return True if the entity can walk on powdered snow
|
||||
*/
|
||||
default boolean canWalkOnPowderedSnow(ItemStack stack, LivingEntity wearer)
|
||||
{
|
||||
return stack.is(Items.LEATHER_BOOTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to test if this item can be damaged, but with the ItemStack in question.
|
||||
* Please note that in some cases no ItemStack is available, so the stack-less method will be used.
|
||||
|
||||
@@ -469,6 +469,19 @@ public interface IForgeItemStack extends ICapabilitySerializable<CompoundTag>
|
||||
{
|
||||
return self().getItem().elytraFlightTick(self(), entity, flightTicks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the powdered snow block to check if a living entity wearing this can walk on the snow, granting the same behavior as leather boots.
|
||||
* Only affects items worn in the boots slot.
|
||||
*
|
||||
* @param wearer The entity wearing this ItemStack
|
||||
*
|
||||
* @return True if the entity can walk on powdered snow
|
||||
*/
|
||||
default boolean canWalkOnPowderedSnow(LivingEntity wearer)
|
||||
{
|
||||
return self().getItem().canWalkOnPowderedSnow(self(), wearer);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a bounding box ({@link AABB}) of a sweep attack.
|
||||
|
||||
Reference in new issue
Block a user