Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ public void onAnimalFeeding(PlayerInteractEntityEvent event) {
}

private boolean isFeedingAnimal(CMIEntityType type, Material held) {
if (type == null) {
return false;
}
switch (type) {
case ARMADILLO: return isItemTag(held, "armadillo_food");
case AXOLOTL: return isItemTag(held, "axolotl_food");
Expand Down Expand Up @@ -341,6 +344,9 @@ private static boolean isEquipFitAnimal(Entity entity, CMIMaterial held) {
return false;

CMIEntityType type = CMIEntityType.get(entity);
if (type == null)
return false;

boolean isBodySlotAir = entInv.getItem(EquipmentSlot.BODY).getType() == Material.AIR;

if (held.containsCriteria(CMIMC.CARPET))
Expand Down