Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CapabilityHandler {
- @SubscribeEvent
- public static void onAttachCapabilities(AttachCapabilitiesEvent<Entity> event) {
- if (isArmorableMob(event.getObject())) {
- event.addCapability(new ResourceLocation(HardSteel.modid, "rearmer"), new ReArmerProvider());
- }
- }
- public static boolean isArmorableMob(Entity entity){
- if((entity instanceof ZombieEntity) || // covers Zombies, Husks, Zombie Villagers and Zombie Pigmen
- (entity instanceof SkeletonEntity) ||
- (entity instanceof StrayEntity) ||
- (entity instanceof WitherSkeletonEntity)) return true;
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement