From e43100a5af2da0f585dd1028a7671ae3063affb4 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 17 May 2020 21:33:47 +0200 Subject: [PATCH] made the staff of riches find spawners too --- src/main/java/de/ellpeck/naturesaura/items/ItemLootFinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/naturesaura/items/ItemLootFinder.java b/src/main/java/de/ellpeck/naturesaura/items/ItemLootFinder.java index a6a2a082..90e44d4d 100644 --- a/src/main/java/de/ellpeck/naturesaura/items/ItemLootFinder.java +++ b/src/main/java/de/ellpeck/naturesaura/items/ItemLootFinder.java @@ -6,6 +6,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.MobSpawnerTileEntity; import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; @@ -32,7 +33,7 @@ public class ItemLootFinder extends ItemImpl { BlockPos pos = playerIn.getPosition(); Helper.getTileEntitiesInArea(worldIn, pos, 64, tile -> { - if (tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).isPresent()) { + if (tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).isPresent() || tile instanceof MobSpawnerTileEntity) { inst.spawnMagicParticle( tile.getPos().getX() + 0.5F, tile.getPos().getY() + 0.5F, tile.getPos().getZ() + 0.5F, 0F, 0F, 0F, 0xf5f10a, 6F, 20 * 60, 0F, false, true);