Fixes issues with red garnets dropping, Closes #871
This commit is contained in:
parent
039cab23eb
commit
c3fe135498
1 changed files with 5 additions and 3 deletions
|
@ -15,12 +15,14 @@ public class BlockBreakHandler {
|
|||
|
||||
@SubscribeEvent
|
||||
public void onBlockHarvest(BlockEvent.HarvestDropsEvent event) {
|
||||
boolean shouldAdd = false;
|
||||
for (ItemStack ore : event.getDrops()) {
|
||||
if (OreDictUtils.isOre(ore, "gemRuby")) {
|
||||
EntityItem item = new EntityItem(event.getWorld(), event.getPos().getX(), event.getPos().getY(), event.getPos().getZ(),
|
||||
ItemGems.getGemByName("redGarnet").copy());
|
||||
event.getWorld().spawnEntityInWorld(item);
|
||||
shouldAdd = true;
|
||||
}
|
||||
}
|
||||
if(shouldAdd){
|
||||
event.getDrops().add(ItemGems.getGemByName("redGarnet").copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue