For a texture, I want it to interpolate, but it won't.
mcmeta:
{
"animation" : {
"frametime": 2,
"interpolate": true,
"frames": [
0,
1,
2,
3,
4
]
}
}
For the image file: https://github.com/TheElementGuy/Greek-Myths-Mod/blob/main/src/main/resources/assets/greekmyths/textures/item/stygian_iron_ingot.png.mcmeta
Well, you could get the position, modify it to get the position of the block underneath, check if that block is air, and then destroy the original block using:
ServerLevel#destroyBlock()
I have an AttackEntityEvent and I can't get it to cancel.
public class ModEvents {
@Mod.EventBusSubscriber(modid = GreekMythsMod.MOD_ID)
public class ForgeEvents {
@SubscribeEvent
public static void onPlayerAttackEntity(AttackEntityEvent event) {
ItemStack item = event.getEntity().getItemInHand(InteractionHand.MAIN_HAND);
if (item == new ItemStack(ModItems.CELESTIAL_BRONZE_SWORD.get(), 1) && !(event.getTarget() instanceof Enemy)) {
event.setCancelled(true);
}
}
}
}
It is supposed to check if you are holding a celestial bronze sword and you are not hitting an enemy. It says that AttackEntityEvent is not cancelable.
I am using the hurt entity method and it doesn't have AttackEntityEvent, LivingAttackEvent, or LivingHurtEvent. Do I create a new one or change methods?