Fixes issues with red garnets dropping, Closes #871

This commit is contained in:
modmuss50 2017-01-05 21:26:31 +00:00
parent 039cab23eb
commit c3fe135498
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82

View file

@ -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());
}
}
}