Merged all ingredients into single class
This commit is contained in:
parent
0b1733b733
commit
33b9f697dc
40 changed files with 258 additions and 1072 deletions
|
@ -50,8 +50,7 @@ import reborncore.common.util.OreDrop;
|
|||
import reborncore.common.util.StringUtils;
|
||||
import techreborn.events.TRRecipeHandler;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.init.ModDusts;
|
||||
import techreborn.init.ModGems;
|
||||
import techreborn.init.TRIngredients;
|
||||
import techreborn.lib.ModInfo;
|
||||
import techreborn.utils.TechRebornCreativeTab;
|
||||
import techreborn.world.config.IOreNameProvider;
|
||||
|
@ -143,22 +142,22 @@ public class BlockOre extends Block implements IOreNameProvider {
|
|||
|
||||
// Secondary drop, like peridot from sapphire ore added via event handler.
|
||||
if (variant.equalsIgnoreCase("Ruby")) {
|
||||
OreDrop ruby = new OreDrop(ModGems.RUBY.getStack(rubyMinQuatity), rubyMaxQuantity);
|
||||
OreDrop ruby = new OreDrop(TRIngredients.Gems.RUBY.getStack(rubyMinQuatity), rubyMaxQuantity);
|
||||
drops.add(ruby.getDrops(fortune, random));
|
||||
} else if (variant.equalsIgnoreCase("Sapphire")) {
|
||||
OreDrop sapphire = new OreDrop(ModGems.SAPPHIRE.getStack(sapphireMinQuantity), sapphireMaxQuantity);
|
||||
OreDrop sapphire = new OreDrop(TRIngredients.Gems.SAPPHIRE.getStack(sapphireMinQuantity), sapphireMaxQuantity);
|
||||
drops.add(sapphire.getDrops(fortune, random));
|
||||
} else if (variant.equalsIgnoreCase("Pyrite")) {
|
||||
OreDrop pyriteDust = new OreDrop(ModDusts.PYRITE.getStack(pyriteMinQuatity), pyriteMaxQuantity);
|
||||
OreDrop pyriteDust = new OreDrop(TRIngredients.Dusts.PYRITE.getStack(pyriteMinQuatity), pyriteMaxQuantity);
|
||||
drops.add(pyriteDust.getDrops(fortune, random));
|
||||
} else if (variant.equalsIgnoreCase("Sodalite")) {
|
||||
OreDrop sodalite = new OreDrop(ModDusts.SODALITE.getStack(sodaliteMinQuatity), sodaliteMaxQuantity);
|
||||
OreDrop sodalite = new OreDrop(TRIngredients.Dusts.SODALITE.getStack(sodaliteMinQuatity), sodaliteMaxQuantity);
|
||||
drops.add(sodalite.getDrops(fortune, random));
|
||||
} else if (variant.equalsIgnoreCase("Cinnabar")) {
|
||||
OreDrop cinnabar = new OreDrop(ModDusts.CINNABAR.getStack(cinnabarMinQuatity), cinnabarMaxQuantity);
|
||||
OreDrop cinnabar = new OreDrop(TRIngredients.Dusts.CINNABAR.getStack(cinnabarMinQuatity), cinnabarMaxQuantity);
|
||||
drops.add(cinnabar.getDrops(fortune, random));
|
||||
} else if (variant.equalsIgnoreCase("Sphalerite")) {
|
||||
OreDrop sphalerite = new OreDrop(ModDusts.SPHALERITE.getStack(sphaleriteMinQuatity), sphaleriteMaxQuantity);
|
||||
OreDrop sphalerite = new OreDrop(TRIngredients.Dusts.SPHALERITE.getStack(sphaleriteMinQuatity), sphaleriteMaxQuantity);
|
||||
drops.add(sphalerite.getDrops(fortune, random));
|
||||
} else {
|
||||
drops.add(new ItemStack(Item.getItemFromBlock(this), 1, meta));
|
||||
|
|
|
@ -47,8 +47,8 @@ import reborncore.client.models.ModelCompound;
|
|||
import reborncore.client.models.RebornModelRegistry;
|
||||
import reborncore.common.util.WorldUtils;
|
||||
import techreborn.events.TRRecipeHandler;
|
||||
import techreborn.init.ModParts;
|
||||
import techreborn.init.ModSounds;
|
||||
import techreborn.init.TRIngredients;
|
||||
import techreborn.items.tools.ItemElectricTreetap;
|
||||
import techreborn.items.tools.ItemTreeTap;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
@ -186,8 +186,8 @@ public class BlockRubberLog extends Block {
|
|||
} else {
|
||||
playerIn.getHeldItem(EnumHand.MAIN_HAND).damageItem(1, playerIn);
|
||||
}
|
||||
if (!playerIn.inventory.addItemStackToInventory(ModParts.SAP.getStack())) {
|
||||
WorldUtils.dropItem(ModParts.SAP.getStack(), worldIn, pos.offset(side));
|
||||
if (!playerIn.inventory.addItemStackToInventory(TRIngredients.Parts.SAP.getStack())) {
|
||||
WorldUtils.dropItem(TRIngredients.Parts.SAP.getStack(), worldIn, pos.offset(side));
|
||||
}
|
||||
if (playerIn instanceof EntityPlayerMP) {
|
||||
TRRecipeHandler.unlockTRRecipes((EntityPlayerMP) playerIn);
|
||||
|
@ -210,7 +210,7 @@ public class BlockRubberLog extends Block {
|
|||
drops.add(new ItemStack(this));
|
||||
if (state.getValue(HAS_SAP)) {
|
||||
if (new Random().nextInt(4) == 0) {
|
||||
drops.add(ModParts.SAP.getStack());
|
||||
drops.add(TRIngredients.Parts.SAP.getStack());
|
||||
}
|
||||
}
|
||||
return drops;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue