@Override public boolean testCondition (Random rand, LootContext context) { return context.getKiller() != null && this.biome != null ? this.biome == context.getWorld().getBiome(context.getKiller().getPosition()) : false; }
@Override public ItemStack apply(ItemStack stack, Random rand, LootContext context) { int id = context.getWorld().getUniqueDataId("map"); stack.setItemDamage(id); stack.setTranslatableName("quarkmisc.buried_chest_map"); NBTTagCompound cmp = ItemNBTHelper.getCompound(stack, "display", false); cmp.setInteger("MapColor", 0x8C0E0E); ItemNBTHelper.setCompound(stack, "display", cmp); ItemNBTHelper.setBoolean(stack, TAG_TREASURE_MAP_DELEGATE, true); return stack; }