diff --git a/src/main/java/uk/co/wehavecookies56/bonfires/Bonfires.java b/src/main/java/uk/co/wehavecookies56/bonfires/Bonfires.java index 06bc22d..65d5dae 100644 --- a/src/main/java/uk/co/wehavecookies56/bonfires/Bonfires.java +++ b/src/main/java/uk/co/wehavecookies56/bonfires/Bonfires.java @@ -17,6 +17,7 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.event.entity.EntityJoinWorldEvent; +import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.world.WorldEvent; import net.minecraftforge.fml.common.Mod; @@ -69,7 +70,7 @@ public static void preInit(FMLPreInitializationEvent event) { tabBonfires = new TabBonfires("tabBonfires"); blocks = new Block[] { ashBlock = new BlockAshBlock(Material.SAND).setRegistryName(modid, "ash_block").setUnlocalizedName("ash_block"), - ashBonePile = new BlockAshBonePile(Material.SNOW).setRegistryName(modid, "ash_bone_pile").setUnlocalizedName("ash_bone_pile") + ashBonePile = new BlockAshBonePile(Material.CIRCUITS).setRegistryName(modid, "ash_bone_pile").setUnlocalizedName("ash_bone_pile") }; items = new Item[] { ashPile = new ItemAshPile().setRegistryName(modid, "ash_pile").setUnlocalizedName("ash_pile"), @@ -110,7 +111,7 @@ public static void registerRender(Item item, int meta, String name) { @SubscribeEvent public void entityDeath(LivingDropsEvent event) { - if (event.getSource().isFireDamage()) { + if (event.getSource().isFireDamage() || event.getEntity().isBurning()) { Random r = new Random(); double percent = r.nextDouble() * 100; if (percent > 65) { diff --git a/src/main/java/uk/co/wehavecookies56/bonfires/blocks/BlockAshBonePile.java b/src/main/java/uk/co/wehavecookies56/bonfires/blocks/BlockAshBonePile.java index 0c1ae3b..1aa97c8 100644 --- a/src/main/java/uk/co/wehavecookies56/bonfires/blocks/BlockAshBonePile.java +++ b/src/main/java/uk/co/wehavecookies56/bonfires/blocks/BlockAshBonePile.java @@ -30,6 +30,8 @@ import uk.co.wehavecookies56.bonfires.world.BonfireWorldSavedData; import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.List; import java.util.Random; /** @@ -76,10 +78,12 @@ public EnumBlockRenderType getRenderType(IBlockState state) { return EnumBlockRenderType.MODEL; } - @Nullable @Override - public Item getItemDropped(IBlockState state, Random rand, int fortune) { - return super.getItemDropped(state, rand, fortune); + public List getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) { + List stacks = new ArrayList<>(); + stacks.add(new ItemStack(getItemDropped(state, new Random(), fortune))); + stacks.add(new ItemStack(Bonfires.coiledSwordFragment)); + return stacks; } @Override