|
|
|
@@ -1,7 +1,5 @@
|
|
|
|
|
package binnie.extrabees.products;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
|
|
|
import net.minecraft.init.Blocks;
|
|
|
|
|
import net.minecraft.init.Items;
|
|
|
|
@@ -13,7 +11,6 @@ import binnie.core.BinnieCore;
|
|
|
|
|
import binnie.core.Mods;
|
|
|
|
|
import binnie.extrabees.ExtraBees;
|
|
|
|
|
import binnie.extrabees.core.ExtraBeeItems;
|
|
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
import forestry.api.core.Tabs;
|
|
|
|
@@ -37,14 +34,14 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
OreDictionary.registerOre("gemEmerald", Items.emerald);
|
|
|
|
|
OreDictionary.registerOre("gemLapis", new ItemStack(Items.dye, 1, 4));
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.BARREN.addProduct(beeswax, 1.00f);
|
|
|
|
|
EnumHoneyComb.BARREN.tryAddProduct(beeswax, 1.00f);
|
|
|
|
|
EnumHoneyComb.BARREN.addProduct(honeyDrop, 0.50f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.ROTTEN.addProduct(beeswax, 0.20f);
|
|
|
|
|
EnumHoneyComb.ROTTEN.tryAddProduct(beeswax, 0.20f);
|
|
|
|
|
EnumHoneyComb.ROTTEN.addProduct(honeyDrop, 0.20f);
|
|
|
|
|
EnumHoneyComb.ROTTEN.addProduct(new ItemStack(Items.rotten_flesh, 1, 0), 0.80f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.BONE.addProduct(beeswax, 0.20f);
|
|
|
|
|
EnumHoneyComb.BONE.tryAddProduct(beeswax, 0.20f);
|
|
|
|
|
EnumHoneyComb.BONE.addProduct(honeyDrop, 0.20f);
|
|
|
|
|
EnumHoneyComb.BONE.addProduct(new ItemStack(Items.dye, 1, 15), 0.80f);
|
|
|
|
|
|
|
|
|
@@ -58,7 +55,7 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
EnumHoneyComb.WATER.tryAddProduct(EnumPropolis.WATER, 1.00f);
|
|
|
|
|
EnumHoneyComb.WATER.addProduct(honeyDrop, 0.90f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.STONE.addProduct(beeswax, 0.50f);
|
|
|
|
|
EnumHoneyComb.STONE.tryAddProduct(beeswax, 0.50f);
|
|
|
|
|
EnumHoneyComb.STONE.addProduct(honeyDrop, 0.25f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.MILK.tryAddProduct(EnumHoneyDrop.MILK, 1.00f);
|
|
|
|
@@ -82,12 +79,12 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
EnumHoneyComb.LATEX.addProduct(honeyDrop, 0.50f);
|
|
|
|
|
EnumHoneyComb.LATEX.addProduct(beeswax, 0.85f);
|
|
|
|
|
if (!OreDictionary.getOres("itemRubber").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.LATEX.tryAddProduct(getOreDictionary("itemRubber"), 1.00f);
|
|
|
|
|
EnumHoneyComb.LATEX.tryAddProduct(OreDictionary.getOres("itemRubber").get(0), 1.00f);
|
|
|
|
|
} else {
|
|
|
|
|
EnumHoneyComb.LATEX.active = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.REDSTONE.addProduct(beeswax, 0.80f);
|
|
|
|
|
EnumHoneyComb.REDSTONE.tryAddProduct(beeswax, 0.80f);
|
|
|
|
|
EnumHoneyComb.REDSTONE.addProduct(new ItemStack(Items.redstone, 1, 0), 1.00f);
|
|
|
|
|
EnumHoneyComb.REDSTONE.addProduct(honeyDrop, 0.50f);
|
|
|
|
|
|
|
|
|
@@ -119,40 +116,40 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.URANIUM.copyProducts(EnumHoneyComb.STONE);
|
|
|
|
|
if (!OreDictionary.getOres("crushedUranium").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.URANIUM.tryAddProduct(getOreDictionary("crushedUranium"), 0.50f);
|
|
|
|
|
EnumHoneyComb.URANIUM.tryAddProduct(OreDictionary.getOres("crushedUranium").get(0), 0.50f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.CLAY.addProduct(beeswax, 0.25f);
|
|
|
|
|
EnumHoneyComb.CLAY.tryAddProduct(beeswax, 0.25f);
|
|
|
|
|
EnumHoneyComb.CLAY.addProduct(honeyDrop, 0.80f);
|
|
|
|
|
EnumHoneyComb.CLAY.addProduct(new ItemStack(Items.clay_ball), 0.80f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.OLD.addProduct(beeswax, 1.00f);
|
|
|
|
|
EnumHoneyComb.OLD.tryAddProduct(beeswax, 1.00f);
|
|
|
|
|
EnumHoneyComb.OLD.addProduct(honeyDrop, 0.90f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.FUNGAL.addProduct(beeswax, 0.90f);
|
|
|
|
|
EnumHoneyComb.FUNGAL.tryAddProduct(beeswax, 0.90f);
|
|
|
|
|
EnumHoneyComb.FUNGAL.addProduct(new ItemStack(Blocks.brown_mushroom_block, 1, 0), 1.00f);
|
|
|
|
|
EnumHoneyComb.FUNGAL.addProduct(new ItemStack(Blocks.red_mushroom_block, 1, 0), 0.75f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.ACIDIC.addProduct(beeswax, 0.80f);
|
|
|
|
|
EnumHoneyComb.ACIDIC.tryAddProduct(EnumHoneyDrop.ACID, 0.50f);
|
|
|
|
|
if (!OreDictionary.getOres("dustSulfur").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.ACIDIC.addProduct(getOreDictionary("dustSulfur"), 0.75f);
|
|
|
|
|
EnumHoneyComb.ACIDIC.addProduct(OreDictionary.getOres("dustSulfur").get(0), 0.75f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.VENOMOUS.addProduct(beeswax, 0.80f);
|
|
|
|
|
EnumHoneyComb.VENOMOUS.tryAddProduct(EnumHoneyDrop.POISON, 0.80f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.SLIME.addProduct(beeswax, 1.00f);
|
|
|
|
|
EnumHoneyComb.SLIME.tryAddProduct(beeswax, 1.00f);
|
|
|
|
|
EnumHoneyComb.SLIME.addProduct(honeyDrop, 0.75f);
|
|
|
|
|
EnumHoneyComb.SLIME.addProduct(new ItemStack(Items.slime_ball, 1, 0), 0.75f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.BLAZE.addProduct(beeswax, 0.75f);
|
|
|
|
|
EnumHoneyComb.BLAZE.tryAddProduct(beeswax, 0.75f);
|
|
|
|
|
EnumHoneyComb.BLAZE.addProduct(new ItemStack(Items.blaze_powder, 1, 0), 1.00f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.COFFEE.addProduct(beeswax, 0.90f);
|
|
|
|
|
EnumHoneyComb.COFFEE.addProduct(honeyDrop, 0.75f);
|
|
|
|
|
if (!OreDictionary.getOres("dustCoffee").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.COFFEE.tryAddProduct(getOreDictionary("dustCoffee"), 0.75f);
|
|
|
|
|
EnumHoneyComb.COFFEE.tryAddProduct(OreDictionary.getOres("dustCoffee").get(0), 0.75f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.GLACIAL.tryAddProduct(EnumHoneyDrop.ICE, 0.80f);
|
|
|
|
@@ -160,7 +157,7 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.SHADOW.addProduct(honeyDrop, 0.50f);
|
|
|
|
|
if (!OreDictionary.getOres("dustObsidian").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.SHADOW.tryAddProduct(getOreDictionary("dustObsidian"), 0.75f);
|
|
|
|
|
EnumHoneyComb.SHADOW.tryAddProduct(OreDictionary.getOres("dustObsidian").get(0), 0.75f);
|
|
|
|
|
} else {
|
|
|
|
|
EnumHoneyComb.SHADOW.active = false;
|
|
|
|
|
}
|
|
|
|
@@ -181,7 +178,7 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
EnumHoneyComb.PLATINUM.tryAddProduct(ExtraBeeItems.PlatinumDust, 1.00f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.LAPIS.copyProducts(EnumHoneyComb.STONE);
|
|
|
|
|
EnumHoneyComb.LAPIS.addProduct(new ItemStack(Items.dye, 6, 4), 1.00f);
|
|
|
|
|
EnumHoneyComb.LAPIS.tryAddProduct(new ItemStack(Items.dye, 6, 4), 1.00f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.EMERALD.copyProducts(EnumHoneyComb.STONE);
|
|
|
|
|
EnumHoneyComb.EMERALD.tryAddProduct(ExtraBeeItems.EmeraldShard, 1.00f);
|
|
|
|
@@ -198,7 +195,7 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
EnumHoneyComb.RED.addProduct(honeyDrop, 0.80f);
|
|
|
|
|
EnumHoneyComb.RED.addProduct(beeswax, 0.80f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.GLOWSTONE.addProduct(honeyDrop, 0.25f);
|
|
|
|
|
EnumHoneyComb.GLOWSTONE.tryAddProduct(honeyDrop, 0.25f);
|
|
|
|
|
EnumHoneyComb.GLOWSTONE.addProduct(new ItemStack(Items.glowstone_dust), 1.00f);
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.SALTPETER.addProduct(honeyDrop, 0.25f);
|
|
|
|
@@ -209,20 +206,20 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.SAWDUST.addProduct(honeyDrop, 0.25f);
|
|
|
|
|
if (!OreDictionary.getOres("dustSawdust").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.SAWDUST.tryAddProduct(getOreDictionary("dustSawdust"), 1.00f);
|
|
|
|
|
EnumHoneyComb.SAWDUST.tryAddProduct(OreDictionary.getOres("dustSawdust").get(0), 1.00f);
|
|
|
|
|
} else if (!OreDictionary.getOres("sawdust").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.SAWDUST.tryAddProduct(getOreDictionary("sawdust"), 1.00f);
|
|
|
|
|
EnumHoneyComb.SAWDUST.tryAddProduct(OreDictionary.getOres("sawdust").get(0), 1.00f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.CERTUS.addProduct(honeyDrop, 0.25f);
|
|
|
|
|
EnumHoneyComb.CERTUS.addProduct(new ItemStack(Items.quartz), 0.25f);
|
|
|
|
|
if (!OreDictionary.getOres("dustCertusQuartz").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.CERTUS.tryAddProduct(getOreDictionary("dustCertusQuartz"), 0.20f);
|
|
|
|
|
EnumHoneyComb.CERTUS.tryAddProduct(OreDictionary.getOres("dustCertusQuartz").get(0), 0.20f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.ENDERPEARL.addProduct(honeyDrop, 0.25f);
|
|
|
|
|
if (!OreDictionary.getOres("dustEnderPearl").isEmpty()) {
|
|
|
|
|
EnumHoneyComb.ENDERPEARL.tryAddProduct(getOreDictionary("dustEnderPearl"), 0.25f);
|
|
|
|
|
EnumHoneyComb.ENDERPEARL.tryAddProduct(OreDictionary.getOres("dustEnderPearl").get(0), 0.25f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EnumHoneyComb.YELLORIUM.copyProducts(EnumHoneyComb.STONE);
|
|
|
|
@@ -257,20 +254,16 @@ public class ItemHoneyComb extends ItemProduct {
|
|
|
|
|
case 15 -> ExtraBeeItems.WhiteDye.get(1);
|
|
|
|
|
default -> new ItemStack(Items.dye, 1, k);
|
|
|
|
|
};
|
|
|
|
|
type.addProduct(drop.get(1), 1.00f);
|
|
|
|
|
type.tryAddProduct(drop.get(1), 1.00f);
|
|
|
|
|
drop.addRemenant(dye);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// The item registered under `string`: MaterialLib's when it registers one, since other mods' items under the
|
|
|
|
|
/// same name are copies of it, else the first registered.
|
|
|
|
|
private static ItemStack getOreDictionary(String string) {
|
|
|
|
|
List<ItemStack> ores = OreDictionary.getOres(string);
|
|
|
|
|
for (ItemStack ore : ores) {
|
|
|
|
|
GameRegistry.UniqueIdentifier id = GameRegistry.findUniqueIdentifierFor(ore.getItem());
|
|
|
|
|
if (id != null && "materiallib".equals(id.modId)) return ore;
|
|
|
|
|
if (!OreDictionary.getOres(string).isEmpty()) {
|
|
|
|
|
return OreDictionary.getOres(string).get(0);
|
|
|
|
|
}
|
|
|
|
|
return ores.isEmpty() ? null : ores.get(0);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|