I did a thing

This commit is contained in:
Ellpeck 2017-06-17 00:48:49 +02:00
parent c28c6a04ec
commit fee478d960
109 changed files with 966 additions and 690 deletions

View file

@ -7,14 +7,14 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'idea' apply plugin: 'idea'
version = "1.11.2-r110" version = "1.12-r110"
group = "de.ellpeck.actuallyadditions" group = "de.ellpeck.actuallyadditions"
archivesBaseName = "ActuallyAdditions" archivesBaseName = "ActuallyAdditions"
@ -23,10 +23,10 @@ if(hasProperty('buildnumber')){
} }
minecraft { minecraft {
version = "1.11.2-13.20.0.2299" version = "1.12-14.21.0.2331"
runDir = "idea" runDir = "idea"
mappings = "snapshot_20161126" mappings = "snapshot_20161220"
makeObfSourceJar = false makeObfSourceJar = false
//useDepAts = true //useDepAts = true
@ -47,8 +47,8 @@ repositories {
} }
dependencies { dependencies {
compile "net.darkhax.tesla:Tesla:1.11-1.3.0.52" compile "net.darkhax.tesla:Tesla-1.12:1.0.59"
deobfCompile "mezz.jei:jei_1.11.2:4.3.5.277" deobfCompile "mezz.jei:jei_1.12:4.6.0.61"
deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.11.2-1.3.3-115" deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.11.2-1.3.3-115"
} }

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod; package de.ellpeck.actuallyadditions.mod;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet; import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler; import de.ellpeck.actuallyadditions.mod.config.ConfigurationHandler;
@ -97,6 +96,8 @@ public class ActuallyAdditions{
FuelHandler.init(); FuelHandler.init();
BannerHelper.init(); BannerHelper.init();
SoundHandler.init(); SoundHandler.init();
InitOreDict.init();
InitCrafting.init();
new UpdateChecker(); new UpdateChecker();
proxy.preInit(event); proxy.preInit(event);
@ -107,13 +108,11 @@ public class ActuallyAdditions{
public void init(FMLInitializationEvent event){ public void init(FMLInitializationEvent event){
ModUtil.LOGGER.info("Starting Initialization Phase..."); ModUtil.LOGGER.info("Starting Initialization Phase...");
InitOreDict.init(); //InitAchievements.init();
InitAchievements.init();
GuiHandler.init(); GuiHandler.init();
new OreGen(); new OreGen();
TileEntityBase.init(); TileEntityBase.init();
new CommonEvents(); new CommonEvents();
InitCrafting.init();
InitEntities.init(); InitEntities.init();
CompatUtil.registerCraftingTweaksCompat(); CompatUtil.registerCraftingTweaksCompat();

View file

@ -8,8 +8,9 @@
* © 2015-2017 Ellpeck * © 2015-2017 Ellpeck
*/ */
//TODO Achievements -> Advancements?
/*
package de.ellpeck.actuallyadditions.mod.achievement; package de.ellpeck.actuallyadditions.mod.achievement;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.stats.Achievement; import net.minecraft.stats.Achievement;
@ -43,3 +44,4 @@ public final class InitAchievements{
} }
} }
*/

View file

@ -8,6 +8,8 @@
* © 2015-2017 Ellpeck * © 2015-2017 Ellpeck
*/ */
//TODO Fix achievements
/*
package de.ellpeck.actuallyadditions.mod.achievement; package de.ellpeck.actuallyadditions.mod.achievement;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements.Type; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements.Type;
@ -140,4 +142,5 @@ public enum TheAchievements{
} }
} }
} }
} }
*/

View file

@ -26,6 +26,7 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
@ -191,17 +192,19 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean bool){ public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag advanced){
long sysTime = System.currentTimeMillis(); long sysTime = System.currentTimeMillis();
if(this.lastSysTime+3000 < sysTime){ if(this.lastSysTime+3000 < sysTime){
this.lastSysTime = sysTime; this.lastSysTime = sysTime;
this.toPick1 = player.world.rand.nextInt(NAME_FLAVOR_AMOUNTS_1)+1; if(world != null){
this.toPick2 = player.world.rand.nextInt(NAME_FLAVOR_AMOUNTS_2)+1; this.toPick1 = world.rand.nextInt(NAME_FLAVOR_AMOUNTS_1)+1;
this.toPick2 = world.rand.nextInt(NAME_FLAVOR_AMOUNTS_2)+1;
}
} }
String base = "tile."+ModUtil.MOD_ID+"."+((BlockAtomicReconstructor)this.block).getBaseName()+".info."; String base = "tile."+ModUtil.MOD_ID+"."+((BlockAtomicReconstructor)this.block).getBaseName()+".info.";
list.add(StringUtil.localize(base+"1."+this.toPick1)+" "+StringUtil.localize(base+"2."+this.toPick2)); tooltip.add(StringUtil.localize(base+"1."+this.toPick1)+" "+StringUtil.localize(base+"2."+this.toPick2));
} }
} }
} }

View file

@ -102,9 +102,9 @@ public class BlockColoredLamp extends BlockBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){ public void getSubBlocks(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_LAMP_TYPES.length; j++){ for(int j = 0; j < ALL_LAMP_TYPES.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }

View file

@ -22,7 +22,6 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
@ -50,9 +49,9 @@ public class BlockCrystal extends BlockBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){ public void getSubBlocks(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_CRYSTALS.length; j++){ for(int j = 0; j < ALL_CRYSTALS.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }

View file

@ -24,6 +24,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyBool; import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
@ -138,7 +139,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){ public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced){
tooltip.add(TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".previouslyDoubleFurnace")); tooltip.add(TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".previouslyDoubleFurnace"));
} }
} }

View file

@ -23,6 +23,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
@ -175,7 +176,7 @@ public class BlockGiantChest extends BlockContainerBase{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){ public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced){
int type = this.block instanceof BlockGiantChest ? ((BlockGiantChest)this.block).type : -1; int type = this.block instanceof BlockGiantChest ? ((BlockGiantChest)this.block).type : -1;
if(type == 2){ if(type == 2){
tooltip.add(TextFormatting.ITALIC+StringUtil.localize("container."+ModUtil.MOD_ID+".giantChestLarge.desc")); tooltip.add(TextFormatting.ITALIC+StringUtil.localize("container."+ModUtil.MOD_ID+".giantChestLarge.desc"));

View file

@ -22,7 +22,6 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
@ -47,9 +46,9 @@ public class BlockMisc extends BlockBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){ public void getSubBlocks(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_MISC_BLOCKS.length; j++){ for(int j = 0; j < ALL_MISC_BLOCKS.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud; import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
@ -74,7 +73,7 @@ public class BlockSmileyCloud extends BlockContainerBase{
if(tile instanceof TileEntitySmileyCloud){ if(tile instanceof TileEntitySmileyCloud){
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CLOUD.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.CLOUD.ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
TheAchievements.NAME_SMILEY_CLOUD.get(player); //TheAchievements.NAME_SMILEY_CLOUD.get(player);
} }
} }
return true; return true;

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot; import de.ellpeck.actuallyadditions.api.recipe.TreasureChestLoot;
import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.BlockHorizontal; import net.minecraft.block.BlockHorizontal;
@ -72,7 +71,7 @@ public class BlockTreasureChest extends BlockBase{
this.dropItems(world, pos); this.dropItems(world, pos);
world.setBlockToAir(pos); world.setBlockToAir(pos);
TheAchievements.OPEN_TREASURE_CHEST.get(player); //TheAchievements.OPEN_TREASURE_CHEST.get(player);
} }
return true; return true;
} }

View file

@ -19,7 +19,6 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
@ -124,8 +123,8 @@ public class BlockWallAA extends BlockBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){ public void getSubBlocks(CreativeTabs tab, NonNullList list){
list.add(new ItemStack(item, 1, 0)); list.add(new ItemStack(this, 1, 0));
} }
public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){ public boolean canConnectTo(IBlockAccess worldIn, BlockPos pos){

View file

@ -26,7 +26,6 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
@ -67,9 +66,9 @@ public class BlockWildPlant extends BlockBushBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){ public void getSubBlocks(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_WILD_PLANTS.length; j++){ for(int j = 0; j < ALL_WILD_PLANTS.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }

View file

@ -33,7 +33,7 @@ import java.text.NumberFormat;
public class RenderBatteryBox extends TileEntitySpecialRenderer{ public class RenderBatteryBox extends TileEntitySpecialRenderer{
@Override @Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityBatteryBox)){ if(!(tile instanceof TileEntityBatteryBox)){
return; return;
} }

View file

@ -28,7 +28,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderCompost extends TileEntitySpecialRenderer{ public class RenderCompost extends TileEntitySpecialRenderer{
@Override @Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage){ public void func_192841_a(TileEntity te, double x, double y, double z, float partialTicks, int destroyStage, float f){
if(te instanceof TileEntityCompost){ if(te instanceof TileEntityCompost){
TileEntityCompost compost = (TileEntityCompost)te; TileEntityCompost compost = (TileEntityCompost)te;
ItemStack slot = compost.slots.getStackInSlot(0); ItemStack slot = compost.slots.getStackInSlot(0);

View file

@ -27,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderDisplayStand extends TileEntitySpecialRenderer{ public class RenderDisplayStand extends TileEntitySpecialRenderer{
@Override @Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityDisplayStand)){ if(!(tile instanceof TileEntityDisplayStand)){
return; return;
} }

View file

@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderEmpowerer extends TileEntitySpecialRenderer{ public class RenderEmpowerer extends TileEntitySpecialRenderer{
@Override @Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityEmpowerer)){ if(!(tile instanceof TileEntityEmpowerer)){
return; return;
} }

View file

@ -41,7 +41,7 @@ public class RenderLaserRelay extends TileEntitySpecialRenderer{
private static final float[] COLOR_INFRARED = new float[]{209F/255F, 179F/255F, 239F/255F}; private static final float[] COLOR_INFRARED = new float[]{209F/255F, 179F/255F, 239F/255F};
@Override @Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(tile instanceof TileEntityLaserRelay){ if(tile instanceof TileEntityLaserRelay){
TileEntityLaserRelay relay = (TileEntityLaserRelay)tile; TileEntityLaserRelay relay = (TileEntityLaserRelay)tile;
boolean hasInvis = false; boolean hasInvis = false;

View file

@ -27,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderReconstructorLens extends TileEntitySpecialRenderer{ public class RenderReconstructorLens extends TileEntitySpecialRenderer{
@Override @Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int par6){ public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int par6, float f){
if(!(tile instanceof TileEntityAtomicReconstructor)){ if(!(tile instanceof TileEntityAtomicReconstructor)){
return; return;
} }

View file

@ -32,7 +32,7 @@ import java.util.Locale;
public class RenderSmileyCloud extends TileEntitySpecialRenderer{ public class RenderSmileyCloud extends TileEntitySpecialRenderer{
@Override @Override
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5, int partial){ public void func_192841_a(TileEntity tile, double x, double y, double z, float par5, int partial, float f){
if(tile instanceof TileEntitySmileyCloud){ if(tile instanceof TileEntitySmileyCloud){
TileEntitySmileyCloud theCloud = (TileEntitySmileyCloud)tile; TileEntitySmileyCloud theCloud = (TileEntitySmileyCloud)tile;
@ -99,5 +99,4 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer{
} }
} }
} }
} }

View file

@ -61,7 +61,7 @@ public class BookmarkButton extends GuiButton{
} }
@Override @Override
public void drawButton(Minecraft minecraft, int x, int y){ public void func_191745_a(Minecraft minecraft, int x, int y, float f){
if(this.visible){ if(this.visible){
minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS); minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

View file

@ -34,7 +34,7 @@ public class EntryButton extends GuiButton{
} }
@Override @Override
public void drawButton(Minecraft minecraft, int mouseX, int mouseY){ public void func_191745_a(Minecraft minecraft, int mouseX, int mouseY, float f){
if(this.visible){ if(this.visible){
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition+this.width && mouseY < this.yPosition+this.height; this.hovered = mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition+this.width && mouseY < this.yPosition+this.height;

View file

@ -27,8 +27,8 @@ public class TrialsButton extends TexturedButton{
} }
@Override @Override
public void drawButton(Minecraft minecraft, int x, int y){ public void func_191745_a(Minecraft minecraft, int x, int y, float f){
super.drawButton(minecraft, x, y); super.func_191745_a(minecraft, x, y, f);
if(this.visible){ if(this.visible){
if(this.hovered || this.isTrials){ if(this.hovered || this.isTrials){

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
@ -56,7 +57,7 @@ public class BookletEntry implements IBookletEntry{
if(!items.isEmpty()){ if(!items.isEmpty()){
for(ItemStack stack : items){ for(ItemStack stack : items){
if(StackUtil.isValid(stack)){ if(StackUtil.isValid(stack)){
List<String> tooltip = stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips); List<String> tooltip = stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL);
for(String strg : tooltip){ for(String strg : tooltip){
if(strg != null && strg.toLowerCase(Locale.ROOT).contains(searchBarText)){ if(strg != null && strg.toLowerCase(Locale.ROOT).contains(searchBarText)){
return true; return true;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet; import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton; import de.ellpeck.actuallyadditions.mod.booklet.button.EntryButton;
import de.ellpeck.actuallyadditions.mod.booklet.misc.GuiAAAchievements;
import de.ellpeck.actuallyadditions.mod.config.GuiConfiguration; import de.ellpeck.actuallyadditions.mod.config.GuiConfiguration;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave; import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
@ -35,6 +34,7 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
//TODO Fix achievement button
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiMainPage extends GuiBooklet{ public class GuiMainPage extends GuiBooklet{
@ -86,7 +86,7 @@ public class GuiMainPage extends GuiBooklet{
"Am I good enough to be an Actually Additions tool?@deanwhufc" "Am I good enough to be an Actually Additions tool?@deanwhufc"
}; };
private TexturedButton achievementButton; //private TexturedButton achievementButton;
private TexturedButton configButton; private TexturedButton configButton;
private GuiButton tutorialButton; private GuiButton tutorialButton;
@ -205,8 +205,8 @@ public class GuiMainPage extends GuiBooklet{
List<String> achievementText = new ArrayList<String>(); List<String> achievementText = new ArrayList<String>();
achievementText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".achievementButton.name")); achievementText.add(TextFormatting.GOLD+StringUtil.localize("booklet."+ModUtil.MOD_ID+".achievementButton.name"));
achievementText.addAll(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID+".achievementButton.desc", ModUtil.NAME), 200)); achievementText.addAll(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("booklet."+ModUtil.MOD_ID+".achievementButton.desc", ModUtil.NAME), 200));
this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText); //this.achievementButton = new TexturedButton(RES_LOC_GADGETS, -389, this.guiLeft+36, this.guiTop+this.ySize-30, 204, 14, 16, 16, achievementText);
this.buttonList.add(this.achievementButton); //this.buttonList.add(this.achievementButton);
PlayerSave data = PlayerData.getDataFromPlayer(this.mc.player); PlayerSave data = PlayerData.getDataFromPlayer(this.mc.player);
if(!data.didBookTutorial){ if(!data.didBookTutorial){
@ -216,7 +216,7 @@ public class GuiMainPage extends GuiBooklet{
this.buttonList.add(this.tutorialButton); this.buttonList.add(this.tutorialButton);
this.configButton.visible = false; this.configButton.visible = false;
this.achievementButton.visible = false; //this.achievementButton.visible = false;
} }
for(int i = 0; i < BUTTONS_PER_PAGE; i++){ for(int i = 0; i < BUTTONS_PER_PAGE; i++){
@ -242,10 +242,10 @@ public class GuiMainPage extends GuiBooklet{
} }
} }
} }
else if(button == this.achievementButton){ /*else if(button == this.achievementButton){
GuiScreen achievements = new GuiAAAchievements(this, this.mc.player.getStatFileWriter()); GuiScreen achievements = new GuiAAAchievements(this, this.mc.player.getStatFileWriter());
this.mc.displayGuiScreen(achievements); this.mc.displayGuiScreen(achievements);
} }*/
else if(button == this.configButton){ else if(button == this.configButton){
GuiScreen config = new GuiConfiguration(this); GuiScreen config = new GuiConfiguration(this);
this.mc.displayGuiScreen(config); this.mc.displayGuiScreen(config);
@ -261,7 +261,7 @@ public class GuiMainPage extends GuiBooklet{
this.tutorialButton.visible = false; this.tutorialButton.visible = false;
this.configButton.visible = true; this.configButton.visible = true;
this.achievementButton.visible = true; //this.achievementButton.visible = true;
PlayerSave data = PlayerData.getDataFromPlayer(this.mc.player); PlayerSave data = PlayerData.getDataFromPlayer(this.mc.player);
data.didBookTutorial = true; data.didBookTutorial = true;

View file

@ -8,6 +8,8 @@
* © 2015-2017 Ellpeck * © 2015-2017 Ellpeck
*/ */
//TODO Achievement GUI?
/*
package de.ellpeck.actuallyadditions.mod.booklet.misc; package de.ellpeck.actuallyadditions.mod.booklet.misc;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements;
@ -24,7 +26,7 @@ import java.io.IOException;
/** /**
* (Partially excerpted from Botania by Vazkii with permission, thanks!) * (Partially excerpted from Botania by Vazkii with permission, thanks!)
*/ *
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiAAAchievements extends GuiAchievements{ public class GuiAAAchievements extends GuiAchievements{
@ -60,3 +62,4 @@ public class GuiAAAchievements extends GuiAchievements{
} }
} }
} }
*/

View file

@ -19,6 +19,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.util.ITooltipFlag.TooltipFlags;
import net.minecraft.init.SoundEvents; import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
@ -58,7 +59,7 @@ public class ItemDisplay{
boolean flagBefore = mc.fontRendererObj.getUnicodeFlag(); boolean flagBefore = mc.fontRendererObj.getUnicodeFlag();
mc.fontRendererObj.setUnicodeFlag(false); mc.fontRendererObj.setUnicodeFlag(false);
List<String> list = this.stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips); List<String> list = this.stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips ? TooltipFlags.ADVANCED : TooltipFlags.NORMAL);
for(int k = 0; k < list.size(); ++k){ for(int k = 0; k < list.size(); ++k){
if(k == 0){ if(k == 0){

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.item.crafting.ShapelessRecipes; import net.minecraft.item.crafting.ShapelessRecipes;
import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.client.config.GuiUtils;
@ -124,7 +125,7 @@ public class PageCrafting extends BookletPage{
} }
private void setupRecipe(GuiBookletBase gui, IRecipe recipe, int startX, int startY){ private void setupRecipe(GuiBookletBase gui, IRecipe recipe, int startX, int startY){
ItemStack[] stacks = new ItemStack[9]; Ingredient[] ings = new Ingredient[9];
int width = 3; int width = 3;
int height = 3; int height = 3;
@ -132,13 +133,13 @@ public class PageCrafting extends BookletPage{
ShapedRecipes shaped = (ShapedRecipes)recipe; ShapedRecipes shaped = (ShapedRecipes)recipe;
width = shaped.recipeWidth; width = shaped.recipeWidth;
height = shaped.recipeHeight; height = shaped.recipeHeight;
stacks = shaped.recipeItems; ings = shaped.recipeItems.toArray(new Ingredient[shaped.recipeItems.size()]);
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedRecipe"; this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedRecipe";
} }
else if(recipe instanceof ShapelessRecipes){ else if(recipe instanceof ShapelessRecipes){
ShapelessRecipes shapeless = (ShapelessRecipes)recipe; ShapelessRecipes shapeless = (ShapelessRecipes)recipe;
for(int i = 0; i < shapeless.recipeItems.size(); i++){ for(int i = 0; i < shapeless.recipeItems.size(); i++){
stacks[i] = shapeless.recipeItems.get(i); ings[i] = shapeless.recipeItems.get(i);
} }
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessRecipe"; this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessRecipe";
} }
@ -151,34 +152,36 @@ public class PageCrafting extends BookletPage{
catch(Exception e){ catch(Exception e){
ModUtil.LOGGER.error("Something went wrong trying to get the Crafting Recipe in the booklet to display!", e); ModUtil.LOGGER.error("Something went wrong trying to get the Crafting Recipe in the booklet to display!", e);
} }
for(int i = 0; i < shaped.getInput().length; i++){ for(int i = 0; i < shaped.func_192400_c().size(); i++){
Object input = shaped.getInput()[i]; ings[i] = shaped.func_192400_c().get(i);
if(input != null){
stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((List<ItemStack>)input).isEmpty() ? StackUtil.getNull() : ((List<ItemStack>)input).get(0));
}
} }
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedOreRecipe"; this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedOreRecipe";
} }
else if(recipe instanceof ShapelessOreRecipe){ else if(recipe instanceof ShapelessOreRecipe){
ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe; ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe;
for(int i = 0; i < shapeless.getInput().size(); i++){ for(int i = 0; i < shapeless.func_192400_c().size(); i++){
Object input = shapeless.getInput().get(i); ings[i] = shapeless.func_192400_c().get(i);
stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((List<ItemStack>)input).isEmpty() ? StackUtil.getNull() : ((List<ItemStack>)input).get(0));
} }
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessOreRecipe"; this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessOreRecipe";
} }
for(int x = 0; x < width; x++){ for(int x = 0; x < width; x++){
for(int y = 0; y < height; y++){ for(int y = 0; y < height; y++){
ItemStack stack = stacks[y*width+x]; Ingredient ing = ings[y*width+x];
if(StackUtil.isValid(stack)){ if(ing != null){
ItemStack copy = stack.copy(); ItemStack[] stacks = ing.func_193365_a();
copy = StackUtil.setStackSize(copy, 1); if(stacks != null && stacks.length > 0){
if(copy.getItemDamage() == Util.WILDCARD){ ItemStack stack = stacks[0];
copy.setItemDamage(0); if(StackUtil.isValid(stack)){
} ItemStack copy = stack.copy();
copy = StackUtil.setStackSize(copy, 1);
if(copy.getItemDamage() == Util.WILDCARD){
copy.setItemDamage(0);
}
gui.addOrModifyItemRenderer(copy, startX+6+x*18, startY+7+y*18, 1F, true); gui.addOrModifyItemRenderer(copy, startX+6+x*18, startY+7+y*18, 1F, true);
}
}
} }
} }
} }

View file

@ -17,15 +17,15 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public final class BlockCrafting{ public final class BlockCrafting{
@ -100,617 +100,617 @@ public final class BlockCrafting{
public static void init(){ public static void init(){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockOilGenerator), new ItemStack(InitBlocks.blockOilGenerator))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockOilGenerator), new ItemStack(InitBlocks.blockOilGenerator));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockFluidPlacer), new ItemStack(InitBlocks.blockFluidPlacer))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer), new ItemStack(InitBlocks.blockFluidPlacer));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockFluidCollector), new ItemStack(InitBlocks.blockFluidCollector))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector), new ItemStack(InitBlocks.blockFluidCollector));
//Battery Box //Battery Box
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBatteryBox), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockBatteryBox),
new ItemStack(InitBlocks.blockEnergizer), new ItemStack(InitBlocks.blockEnergizer),
new ItemStack(InitBlocks.blockEnervator), new ItemStack(InitBlocks.blockEnervator),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()))); new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeBatteryBox = RecipeUtil.lastIRecipe(); recipeBatteryBox = RecipeUtil.lastIRecipe();
//Farmer //Farmer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFarmer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFarmer),
"ISI", "SCS", "ISI", "ISI", "SCS", "ISI",
'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'S', new ItemStack(Items.WHEAT_SEEDS))); 'S', new ItemStack(Items.WHEAT_SEEDS));
recipeFarmer = RecipeUtil.lastIRecipe(); recipeFarmer = RecipeUtil.lastIRecipe();
//Empowerer //Empowerer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEmpowerer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEmpowerer),
" R ", " B ", "CDC", " R ", " B ", "CDC",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'B', new ItemStack(InitItems.itemBatteryDouble, 1, Util.WILDCARD), 'B', new ItemStack(InitItems.itemBatteryDouble, 1, Util.WILDCARD),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'D', new ItemStack(InitBlocks.blockDisplayStand))); 'D', new ItemStack(InitBlocks.blockDisplayStand));
recipeEmpowerer = RecipeUtil.lastIRecipe(); recipeEmpowerer = RecipeUtil.lastIRecipe();
//Tiny Torch //Tiny Torch
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
"C", "C",
"W", "W",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()),
'W', "stickWood")); 'W', "stickWood");
recipesTinyTorch[0] = RecipeUtil.lastIRecipe(); recipesTinyTorch[0] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
"C", "C",
"W", "W",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()),
'W', "stickWood")); 'W', "stickWood");
recipesTinyTorch[1] = RecipeUtil.lastIRecipe(); recipesTinyTorch[1] = RecipeUtil.lastIRecipe();
//Firework Box //Firework Box
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFireworkBox), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFireworkBox),
"GFG", "SAS", "CCC", "GFG", "SAS", "CCC",
'G', new ItemStack(Items.GUNPOWDER), 'G', new ItemStack(Items.GUNPOWDER),
'S', new ItemStack(Items.STICK), 'S', new ItemStack(Items.STICK),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'F', new ItemStack(Items.FIREWORKS, 1, Util.WILDCARD), 'F', new ItemStack(Items.FIREWORKS, 1, Util.WILDCARD),
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()))); 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeFireworkBox = RecipeUtil.lastIRecipe(); recipeFireworkBox = RecipeUtil.lastIRecipe();
//Shock Suppressor //Shock Suppressor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockShockSuppressor), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockShockSuppressor),
"OAO", "ACA", "OAO", "OAO", "ACA", "OAO",
'A', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'A', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.COAL.ordinal()),
'O', new ItemStack(Blocks.OBSIDIAN), 'O', new ItemStack(Blocks.OBSIDIAN),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeShockSuppressor = RecipeUtil.lastIRecipe(); recipeShockSuppressor = RecipeUtil.lastIRecipe();
//Display Stand //Display Stand
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDisplayStand), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDisplayStand),
" R ", "EEE", "GGG", " R ", "EEE", "GGG",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'E', new ItemStack(InitBlocks.blockTestifiBucksGreenWall), 'E', new ItemStack(InitBlocks.blockTestifiBucksGreenWall),
'G', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall))); 'G', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
recipeDisplayStand = RecipeUtil.lastIRecipe(); recipeDisplayStand = RecipeUtil.lastIRecipe();
//Miner //Miner
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMiner), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMiner),
"IRI", "RCR", "IDI", "IRI", "RCR", "IDI",
'R', "blockRedstone", 'R', "blockRedstone",
'I', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'I', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()),
'D', new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD))); 'D', new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD));
recipeMiner = RecipeUtil.lastIRecipe(); recipeMiner = RecipeUtil.lastIRecipe();
//Quartz //Quartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockQuartzWall, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzWall, 6),
"XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockQuartzSlab, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzSlab, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockQuartzStair, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzStair, 6),
"X ", "XX ", "XXX", "X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
//PillarQuartz //PillarQuartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPillarQuartzWall, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzWall, 6),
"XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPillarQuartzSlab, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzSlab, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPillarQuartzStair, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzStair, 6),
"X ", "XX ", "XXX", "X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
//ChiseledQuartz //ChiseledQuartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockChiseledQuartzWall, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzWall, 6),
"XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockChiseledQuartzSlab, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzSlab, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockChiseledQuartzStair, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzStair, 6),
"X ", "XX ", "XXX", "X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()))); 'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
//White Ethetic Blocks //White Ethetic Blocks
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteFence, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteFence, 6),
"XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall))); 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteSlab, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteSlab, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall))); 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteStairs, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteStairs, 6),
"X ", "XX ", "XXX", "X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall))); 'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
//Green Ethetic Blocks //Green Ethetic Blocks
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenFence, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenFence, 6),
"XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall))); 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenSlab, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenSlab, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall))); 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenStairs, 6), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenStairs, 6),
"X ", "XX ", "XXX", "X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall))); 'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
//Atomic Reconstructor //Atomic Reconstructor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockAtomicReconstructor), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockAtomicReconstructor),
"IRI", "RCR", "IRI", "IRI", "RCR", "IRI",
'R', "dustRedstone", 'R', "dustRedstone",
'I', "ingotIron", 'I', "ingotIron",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeAtomicReconstructor = RecipeUtil.lastIRecipe(); recipeAtomicReconstructor = RecipeUtil.lastIRecipe();
//Laser Relay //Laser Relay
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4),
"OBO", "RCR", "OBO", "OBO", "RCR", "OBO",
'B', new ItemStack(Blocks.REDSTONE_BLOCK), 'B', new ItemStack(Blocks.REDSTONE_BLOCK),
'O', new ItemStack(Blocks.OBSIDIAN), 'O', new ItemStack(Blocks.OBSIDIAN),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLaserRelay = RecipeUtil.lastIRecipe(); recipeLaserRelay = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced),
" I ", "XRX", " I ", " I ", "XRX", " I ",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(InitBlocks.blockLaserRelay), 'R', new ItemStack(InitBlocks.blockLaserRelay),
'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeLaserRelayAdvanced = RecipeUtil.lastIRecipe(); recipeLaserRelayAdvanced = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme),
" I ", "XRX", " I ", " I ", "XRX", " I ",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'R', new ItemStack(InitBlocks.blockLaserRelayAdvanced), 'R', new ItemStack(InitBlocks.blockLaserRelayAdvanced),
'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeLaserRelayExtreme = RecipeUtil.lastIRecipe(); recipeLaserRelayExtreme = RecipeUtil.lastIRecipe();
//Whitelist Item Laser Relay //Whitelist Item Laser Relay
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist),
new ItemStack(InitBlocks.blockLaserRelayItem), new ItemStack(InitBlocks.blockLaserRelayItem),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe(); recipeLaserRelayItemWhitelist = RecipeUtil.lastIRecipe();
//Item Interface //Item Interface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemViewer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemViewer),
"OBO", "RCR", "OBO", "OBO", "RCR", "OBO",
'B', new ItemStack(Items.REDSTONE), 'B', new ItemStack(Items.REDSTONE),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', "chestWood")); 'C', "chestWood");
recipeItemInterface = RecipeUtil.lastIRecipe(); recipeItemInterface = RecipeUtil.lastIRecipe();
//Hopping Item Interface //Hopping Item Interface
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockItemViewerHopping), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockItemViewerHopping),
new ItemStack(InitBlocks.blockItemViewer), new ItemStack(InitBlocks.blockItemViewer),
new ItemStack(Blocks.HOPPER))); new ItemStack(Blocks.HOPPER));
recipeItemInterfaceHopping = RecipeUtil.lastIRecipe(); recipeItemInterfaceHopping = RecipeUtil.lastIRecipe();
//Ranged Collector //Ranged Collector
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRangedCollector), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockRangedCollector),
" A ", "EHE", " C ", " A ", "EHE", " C ",
'E', new ItemStack(Items.ENDER_PEARL), 'E', new ItemStack(Items.ENDER_PEARL),
'H', new ItemStack(Blocks.HOPPER), 'H', new ItemStack(Blocks.HOPPER),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'A', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()))); 'A', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()));
recipeRangedCollector = RecipeUtil.lastIRecipe(); recipeRangedCollector = RecipeUtil.lastIRecipe();
//Directional Breaker //Directional Breaker
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker),
"BBB", " C ", "BBB", " C ",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'B', new ItemStack(InitBlocks.blockBreaker))); 'B', new ItemStack(InitBlocks.blockBreaker));
recipeDirectionalBreaker = RecipeUtil.lastIRecipe(); recipeDirectionalBreaker = RecipeUtil.lastIRecipe();
//Smiley Cloud //Smiley Cloud
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSmileyCloud), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockSmileyCloud),
" W ", "WXW", " W ", " W ", "WXW", " W ",
'W', new ItemStack(Blocks.WOOL, 1, Util.WILDCARD), 'W', new ItemStack(Blocks.WOOL, 1, Util.WILDCARD),
'X', new ItemStack(InitItems.itemSolidifiedExperience))); 'X', new ItemStack(InitItems.itemSolidifiedExperience));
recipeSmileyCloud = RecipeUtil.lastIRecipe(); recipeSmileyCloud = RecipeUtil.lastIRecipe();
//Compost //Compost
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCompost), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCompost),
"W W", "W W", "WCW", "W W", "W W", "WCW",
'W', "plankWood", 'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()));
recipeCompost = RecipeUtil.lastIRecipe(); recipeCompost = RecipeUtil.lastIRecipe();
//XP Solidifier //XP Solidifier
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockXPSolidifier), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockXPSolidifier),
"XXX", "DCD", "XXX", "XXX", "DCD", "XXX",
'X', new ItemStack(InitItems.itemSolidifiedExperience), 'X', new ItemStack(InitItems.itemSolidifiedExperience),
'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeSolidifier = RecipeUtil.lastIRecipe(); recipeSolidifier = RecipeUtil.lastIRecipe();
//Charcoal Block //Charcoal Block
GameRegistry.addRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()), RecipeHandler.addShapedRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()),
"CCC", "CCC", "CCC", "CCC", "CCC", "CCC",
'C', new ItemStack(Items.COAL, 1, 1)); 'C', new ItemStack(Items.COAL, 1, 1));
recipeBlockChar = RecipeUtil.lastIRecipe(); recipeBlockChar = RecipeUtil.lastIRecipe();
GameRegistry.addShapelessRecipe(new ItemStack(Items.COAL, 9, 1), RecipeHandler.addShapelessRecipe(new ItemStack(Items.COAL, 9, 1),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal())); new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.CHARCOAL_BLOCK.ordinal()));
//Wood Casing //Wood Casing
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
"WSW", "SRS", "WSW", "WSW", "SRS", "WSW",
'W', "plankWood", 'W', "plankWood",
'R', "logWood", 'R', "logWood",
'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood")); 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood");
recipeCase = RecipeUtil.lastIRecipe(); recipeCase = RecipeUtil.lastIRecipe();
//Iron Casing //Iron Casing
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
"WSW", "SQS", "WSW", "WSW", "SQS", "WSW",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'W', "ingotIron", 'W', "ingotIron",
'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood")); 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()) : "stickWood");
recipeIronCase = RecipeUtil.lastIRecipe(); recipeIronCase = RecipeUtil.lastIRecipe();
//Ender Casing //Ender Casing
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
"WSW", "SRS", "WSW", "WSW", "SRS", "WSW",
'W', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()) : new ItemStack(Items.ENDER_PEARL), 'W', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()) : new ItemStack(Items.ENDER_PEARL),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()))); 'S', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeEnderCase = RecipeUtil.lastIRecipe(); recipeEnderCase = RecipeUtil.lastIRecipe();
//Phantom Booster //Phantom Booster
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomBooster), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBooster),
"RDR", "DCD", "RDR", "RDR", "DCD", "RDR",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipePhantomBooster = RecipeUtil.lastIRecipe(); recipePhantomBooster = RecipeUtil.lastIRecipe();
//Coffee Machine //Coffee Machine
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoffeeMachine), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoffeeMachine),
" C ", " S ", "AMA", " C ", " S ", "AMA",
'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'C', InitItems.itemCoffeeBean, 'C', InitItems.itemCoffeeBean,
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()))); 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeCoffeeMachine = RecipeUtil.lastIRecipe(); recipeCoffeeMachine = RecipeUtil.lastIRecipe();
//Energizer //Energizer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnergizer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnergizer),
"I I", "CAC", "I I", "I I", "CAC", "I I",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()))); 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeEnergizer = RecipeUtil.lastIRecipe(); recipeEnergizer = RecipeUtil.lastIRecipe();
//Enervator //Enervator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnervator), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnervator),
" I ", "CAC", " I ", " I ", "CAC", " I ",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()))); 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()));
recipeEnervator = RecipeUtil.lastIRecipe(); recipeEnervator = RecipeUtil.lastIRecipe();
//Lava Factory //Lava Factory
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLavaFactoryController), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLavaFactoryController),
"SCS", "ISI", "LLL", "SCS", "ISI", "LLL",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'I', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'L', Items.LAVA_BUCKET)); 'L', Items.LAVA_BUCKET);
recipeLavaFactory = RecipeUtil.lastIRecipe(); recipeLavaFactory = RecipeUtil.lastIRecipe();
//Casing //Casing
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()),
"ICI", "ICI",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()))); 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()));
recipeCasing = RecipeUtil.lastIRecipe(); recipeCasing = RecipeUtil.lastIRecipe();
//Canola Press //Canola Press
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCanolaPress), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCanolaPress),
"CHC", "CDC", "CRC", "CHC", "CDC", "CRC",
'C', "cobblestone", 'C', "cobblestone",
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()))); 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
recipeCanolaPress = RecipeUtil.lastIRecipe(); recipeCanolaPress = RecipeUtil.lastIRecipe();
//Fermenting Barrel //Fermenting Barrel
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFermentingBarrel), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFermentingBarrel),
"CHC", "CDC", "CRC", "CHC", "CDC", "CRC",
'C', "logWood", 'C', "logWood",
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()))); 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
recipeFermentingBarrel = RecipeUtil.lastIRecipe(); recipeFermentingBarrel = RecipeUtil.lastIRecipe();
//Phantomface //Phantomface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomface), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomface),
" C ", "EBE", " S ", " C ", "EBE", " S ",
'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'C', "chestWood", 'C', "chestWood",
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()))); 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
recipePhantomface = RecipeUtil.lastIRecipe(); recipePhantomface = RecipeUtil.lastIRecipe();
//Player Interface //Player Interface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPlayerInterface), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlayerInterface),
"BCB", "EBE", "BSB", "BCB", "EBE", "BSB",
'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(Items.SKULL, 1, 1), 'C', new ItemStack(Items.SKULL, 1, 1),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipePlayerInterface = RecipeUtil.lastIRecipe(); recipePlayerInterface = RecipeUtil.lastIRecipe();
//Phantom Placer //Phantom Placer
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomPlacer), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomPlacer),
InitBlocks.blockPlacer, InitBlocks.blockPlacer,
InitBlocks.blockPhantomface)); InitBlocks.blockPhantomface);
recipePhantomPlacer = RecipeUtil.lastIRecipe(); recipePhantomPlacer = RecipeUtil.lastIRecipe();
//Phantom Breaker //Phantom Breaker
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomBreaker), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBreaker),
InitBlocks.blockBreaker, InitBlocks.blockBreaker,
InitBlocks.blockPhantomface)); InitBlocks.blockPhantomface);
recipePhantomBreaker = RecipeUtil.lastIRecipe(); recipePhantomBreaker = RecipeUtil.lastIRecipe();
//Phantom Energyface //Phantom Energyface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface),
" R ", "RFR", " R ", " R ", "RFR", " R ",
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'F', InitBlocks.blockPhantomface)); 'F', InitBlocks.blockPhantomface);
recipeEnergyface = RecipeUtil.lastIRecipe(); recipeEnergyface = RecipeUtil.lastIRecipe();
//Phantom Redstoneface //Phantom Redstoneface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomRedstoneface), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomRedstoneface),
"SRS", "RFR", "SRS", "SRS", "RFR", "SRS",
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'S', new ItemStack(Items.REDSTONE), 'S', new ItemStack(Items.REDSTONE),
'F', InitBlocks.blockPhantomface)); 'F', InitBlocks.blockPhantomface);
recipePhantomRedstoneface = RecipeUtil.lastIRecipe(); recipePhantomRedstoneface = RecipeUtil.lastIRecipe();
//Phantom Liquiface //Phantom Liquiface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface),
"RFR", "RFR",
'R', Items.BUCKET, 'R', Items.BUCKET,
'F', InitBlocks.blockPhantomface)); 'F', InitBlocks.blockPhantomface);
recipeLiquiface = RecipeUtil.lastIRecipe(); recipeLiquiface = RecipeUtil.lastIRecipe();
//Liquid Placer //Liquid Placer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFluidPlacer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer),
"RFR", "RFR",
'R', Items.BUCKET, 'R', Items.BUCKET,
'F', InitBlocks.blockPlacer)); 'F', InitBlocks.blockPlacer);
recipeLiquidPlacer = RecipeUtil.lastIRecipe(); recipeLiquidPlacer = RecipeUtil.lastIRecipe();
//Liquid Breaker //Liquid Breaker
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFluidCollector), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector),
"RFR", "RFR",
'R', Items.BUCKET, 'R', Items.BUCKET,
'F', InitBlocks.blockBreaker)); 'F', InitBlocks.blockBreaker);
recipeLiquidCollector = RecipeUtil.lastIRecipe(); recipeLiquidCollector = RecipeUtil.lastIRecipe();
//Oil Generator //Oil Generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockOilGenerator), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockOilGenerator),
"CRC", "CBC", "CRC", "CRC", "CBC", "CRC",
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()))); 'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
recipeOilGen = RecipeUtil.lastIRecipe(); recipeOilGen = RecipeUtil.lastIRecipe();
//Bio Reactor //Bio Reactor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBioReactor), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBioReactor),
"CRC", "CBC", "CRC", "CRC", "CBC", "CRC",
'C', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'C', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'B', new ItemStack(Blocks.SAPLING, 1, Util.WILDCARD))); 'B', new ItemStack(Blocks.SAPLING, 1, Util.WILDCARD));
recipeBioReactor = RecipeUtil.lastIRecipe(); recipeBioReactor = RecipeUtil.lastIRecipe();
//Coal Generator //Coal Generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoalGenerator), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoalGenerator),
"CRC", "CBC", "CRC", "CRC", "CBC", "CRC",
'C', "cobblestone", 'C', "cobblestone",
'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'B', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'R', new ItemStack(Items.COAL, 1, Util.WILDCARD))); 'R', new ItemStack(Items.COAL, 1, Util.WILDCARD));
recipeCoalGen = RecipeUtil.lastIRecipe(); recipeCoalGen = RecipeUtil.lastIRecipe();
//Leaf Generator //Leaf Generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLeafGenerator), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLeafGenerator),
"IEI", "GLG", "ICI", "IEI", "GLG", "ICI",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'G', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'G', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', "treeLeaves", 'L', "treeLeaves",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLeafGen = RecipeUtil.lastIRecipe(); recipeLeafGen = RecipeUtil.lastIRecipe();
//Enderpearl Block //Enderpearl Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
"EE", "EE", "EE", "EE",
'E', Items.ENDER_PEARL)); 'E', Items.ENDER_PEARL);
recipeEnderPearlBlock = RecipeUtil.lastIRecipe(); recipeEnderPearlBlock = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.ENDER_PEARL, 4), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(Items.ENDER_PEARL, 4),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()))); new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
//Quartz Block //Quartz Block
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()),
"QQ", "QQ", "QQ", "QQ",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeQuartzBlock = RecipeUtil.lastIRecipe(); recipeQuartzBlock = RecipeUtil.lastIRecipe();
//Fishing Net //Fishing Net
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFishingNet), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFishingNet),
"SSS", "SDS", "SSS", "SSS", "SDS", "SSS",
'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()),
'S', Items.STRING)); 'S', Items.STRING);
recipeFisher = RecipeUtil.lastIRecipe(); recipeFisher = RecipeUtil.lastIRecipe();
//Repairer //Repairer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemRepairer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemRepairer),
"DID", "OCO", "DID", "DID", "OCO", "DID",
'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipeRepairer = RecipeUtil.lastIRecipe(); recipeRepairer = RecipeUtil.lastIRecipe();
//Solar Panel //Solar Panel
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceSolar), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
"IQI", "CDC", "IBI", "IQI", "CDC", "IBI",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.IRON_BARS))); 'B', new ItemStack(Blocks.IRON_BARS));
recipeSolar = RecipeUtil.lastIRecipe(); recipeSolar = RecipeUtil.lastIRecipe();
//Heat Collector //Heat Collector
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockHeatCollector),
"BRB", "CDC", "BQB", "BRB", "CDC", "BQB",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(Items.REPEATER), 'R', new ItemStack(Items.REPEATER),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', new ItemStack(Items.LAVA_BUCKET), 'L', new ItemStack(Items.LAVA_BUCKET),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'B', new ItemStack(Blocks.IRON_BARS))); 'B', new ItemStack(Blocks.IRON_BARS));
recipeHeatCollector = RecipeUtil.lastIRecipe(); recipeHeatCollector = RecipeUtil.lastIRecipe();
//Quartz Pillar //Quartz Pillar
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()),
"Q", "Q", "Q", "Q",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeQuartzPillar = RecipeUtil.lastIRecipe(); recipeQuartzPillar = RecipeUtil.lastIRecipe();
//Chiseled Quartz //Chiseled Quartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMisc, 2, TheMiscBlocks.QUARTZ_CHISELED.ordinal()),
"Q", "Q", "Q", "Q",
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()))); 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
recipeQuartzChiseled = RecipeUtil.lastIRecipe(); recipeQuartzChiseled = RecipeUtil.lastIRecipe();
//Inputter //Inputter
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockInputter), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockInputter),
"WWW", "CHC", "WWW", "WWW", "CHC", "WWW",
'W', "plankWood", 'W', "plankWood",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()))); 'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeESD = RecipeUtil.lastIRecipe(); recipeESD = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
InitBlocks.blockInputter, InitBlocks.blockInputter,
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeAdvancedESD = RecipeUtil.lastIRecipe(); recipeAdvancedESD = RecipeUtil.lastIRecipe();
//Crusher //Crusher
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinder), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinder),
"MFC", "DQD", "CFM", "MFC", "DQD", "CFM",
'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', "cobblestone", 'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'P', new ItemStack(Blocks.PISTON), 'P', new ItemStack(Blocks.PISTON),
'F', new ItemStack(Items.FLINT))); 'F', new ItemStack(Items.FLINT));
recipeCrusher = RecipeUtil.lastIRecipe(); recipeCrusher = RecipeUtil.lastIRecipe();
//Double Crusher //Double Crusher
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinderDouble), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinderDouble),
"CDC", "RFR", "CDC", "CDC", "RFR", "CDC",
'C', "cobblestone", 'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', InitBlocks.blockGrinder, 'R', InitBlocks.blockGrinder,
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'P', new ItemStack(Blocks.PISTON))); 'P', new ItemStack(Blocks.PISTON));
recipeDoubleCrusher = RecipeUtil.lastIRecipe(); recipeDoubleCrusher = RecipeUtil.lastIRecipe();
//Double Furnace //Double Furnace
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceDouble), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceDouble),
"PDC", "RFR", "CDP", "PDC", "RFR", "CDP",
'C', "cobblestone", 'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(Blocks.FURNACE), 'R', new ItemStack(Blocks.FURNACE),
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()))); 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeFurnace = RecipeUtil.lastIRecipe(); recipeFurnace = RecipeUtil.lastIRecipe();
//Feeder //Feeder
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFeeder), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFeeder),
"WCW", "DHD", "WCW", "WCW", "DHD", "WCW",
'W', "plankWood", 'W', "plankWood",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'C', new ItemStack(Items.GOLDEN_CARROT), 'C', new ItemStack(Items.GOLDEN_CARROT),
'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()))); 'H', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()));
recipeFeeder = RecipeUtil.lastIRecipe(); recipeFeeder = RecipeUtil.lastIRecipe();
//Giant Chest //Giant Chest
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGiantChest), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGiantChest),
"CWC", "WDW", "CWC", "CWC", "WDW", "CWC",
'C', "chestWood", 'C', "chestWood",
'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'W', "plankWood")); 'W', "plankWood");
recipeCrate = RecipeUtil.lastIRecipe(); recipeCrate = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new RecipeKeepDataShaped(new ItemStack(InitBlocks.blockGiantChestMedium), new ItemStack(InitBlocks.blockGiantChest), new RecipeKeepDataShaped(new ResourceLocation(ModUtil.MOD_ID, "giant_chest_media"), new ItemStack(InitBlocks.blockGiantChestMedium), new ItemStack(InitBlocks.blockGiantChest),
"CWC", "WDW", "CWC", "CWC", "WDW", "CWC",
'C', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()), 'C', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()),
'D', new ItemStack(InitBlocks.blockGiantChest), 'D', new ItemStack(InitBlocks.blockGiantChest),
'W', "plankWood")); 'W', "plankWood");
recipeCrateMedium = RecipeUtil.lastIRecipe(); recipeCrateMedium = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new RecipeKeepDataShaped(new ItemStack(InitBlocks.blockGiantChestLarge), new ItemStack(InitBlocks.blockGiantChestMedium), new RecipeKeepDataShaped(new ResourceLocation(ModUtil.MOD_ID, "giant_chest_large"), new ItemStack(InitBlocks.blockGiantChestLarge), new ItemStack(InitBlocks.blockGiantChestMedium),
"CWC", "WDW", "CWC", "CWC", "WDW", "CWC",
'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()), 'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()),
'D', new ItemStack(InitBlocks.blockGiantChestMedium), 'D', new ItemStack(InitBlocks.blockGiantChestMedium),
'W', "plankWood")); 'W', "plankWood");
recipeCrateLarge = RecipeUtil.lastIRecipe(); recipeCrateLarge = RecipeUtil.lastIRecipe();
//Greenhouse Glass //Greenhouse Glass
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 3), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 3),
"GSG", "SDS", "GSG", "GSG", "SDS", "GSG",
'G', "blockGlass", 'G', "blockGlass",
'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.LAPIS.ordinal()), 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.LAPIS.ordinal()),
'S', "treeSapling")); 'S', "treeSapling");
recipeGlass = RecipeUtil.lastIRecipe(); recipeGlass = RecipeUtil.lastIRecipe();
//Placer //Placer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPlacer), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlacer),
"CCC", "CRP", "CCC", "CCC", "CRP", "CCC",
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()))); 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()));
recipePlacer = RecipeUtil.lastIRecipe(); recipePlacer = RecipeUtil.lastIRecipe();
//Breaker //Breaker
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBreaker), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBreaker),
"CCC", "CRP", "CCC", "CCC", "CRP", "CCC",
'C', "cobblestone", 'C', "cobblestone",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()))); 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()));
recipeBreaker = RecipeUtil.lastIRecipe(); recipeBreaker = RecipeUtil.lastIRecipe();
//Dropper //Dropper
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDropper), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDropper),
"CBC", "CDR", "CBC", "CBC", "CDR", "CBC",
'B', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'B', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'C', "cobblestone", 'C', "cobblestone",
'D', Blocks.DROPPER, 'D', Blocks.DROPPER,
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeDropper = RecipeUtil.lastIRecipe(); recipeDropper = RecipeUtil.lastIRecipe();
for(int i = 0; i < BlockColoredLamp.ALL_LAMP_TYPES.length; i++){ for(int i = 0; i < BlockColoredLamp.ALL_LAMP_TYPES.length; i++){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i),
"GCG", "DQD", "GCG", "GCG", "DQD", "GCG",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'G', "glowstone", 'G', "glowstone",
'D', "dye"+BlockColoredLamp.ALL_LAMP_TYPES[i].oreName, 'D', "dye"+BlockColoredLamp.ALL_LAMP_TYPES[i].oreName,
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
RECIPES_LAMPS[i] = RecipeUtil.lastIRecipe(); RECIPES_LAMPS[i] = RecipeUtil.lastIRecipe();
} }
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
"XXX", "XLX", "XXX", "XXX", "XLX", "XXX",
'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'X', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD))); 'L', new ItemStack(InitBlocks.blockColoredLamp, 1, Util.WILDCARD));
recipePowerer = RecipeUtil.lastIRecipe(); recipePowerer = RecipeUtil.lastIRecipe();
} }

View file

@ -15,13 +15,12 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public final class FoodCrafting{ public final class FoodCrafting{
@ -52,8 +51,8 @@ public final class FoodCrafting{
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F); new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F);
//Bacon //Bacon
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()),
knifeStack.copy(), new ItemStack(Items.COOKED_PORKCHOP))); knifeStack.copy(), new ItemStack(Items.COOKED_PORKCHOP));
recipeBacon = RecipeUtil.lastIRecipe(); recipeBacon = RecipeUtil.lastIRecipe();
//Baguette //Baguette
@ -61,116 +60,116 @@ public final class FoodCrafting{
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F); TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
//Pizza //Pizza
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()),
"HKH", "MCF", " D ", "HKH", "MCF", " D ",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'M', new ItemStack(Blocks.BROWN_MUSHROOM), 'M', new ItemStack(Blocks.BROWN_MUSHROOM),
'C', "cropCarrot", 'C', "cropCarrot",
'F', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD), 'F', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD),
'K', knifeStack.copy(), 'K', knifeStack.copy(),
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()))); 'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
recipePizza = RecipeUtil.lastIRecipe(); recipePizza = RecipeUtil.lastIRecipe();
//Hamburger //Hamburger
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()),
"KT ", "CB ", " T ", "KT ", "CB ", " T ",
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), 'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
'K', knifeStack.copy(), 'K', knifeStack.copy(),
'B', new ItemStack(Items.COOKED_BEEF))); 'B', new ItemStack(Items.COOKED_BEEF));
recipeHamburger = RecipeUtil.lastIRecipe(); recipeHamburger = RecipeUtil.lastIRecipe();
//Big Cookie //Big Cookie
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()),
"DCD", "CDC", "DCD", "DCD", "CDC", "DCD",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'C', new ItemStack(Items.DYE, 1, 3))); 'C', new ItemStack(Items.DYE, 1, 3));
recipeBigCookie = RecipeUtil.lastIRecipe(); recipeBigCookie = RecipeUtil.lastIRecipe();
//Sub Sandwich //Sub Sandwich
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()),
"KCP", "FB ", "PCP", "KCP", "FB ", "PCP",
'P', new ItemStack(Items.PAPER), 'P', new ItemStack(Items.PAPER),
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), 'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
'F', new ItemStack(Items.COOKED_BEEF, 1, Util.WILDCARD), 'F', new ItemStack(Items.COOKED_BEEF, 1, Util.WILDCARD),
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
'K', knifeStack.copy())); 'K', knifeStack.copy());
recipeSubSandwich = RecipeUtil.lastIRecipe(); recipeSubSandwich = RecipeUtil.lastIRecipe();
//French Fry //French Fry
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()),
new ItemStack(Items.BAKED_POTATO), new ItemStack(Items.BAKED_POTATO),
knifeStack.copy())); knifeStack.copy());
recipeFrenchFry = RecipeUtil.lastIRecipe(); recipeFrenchFry = RecipeUtil.lastIRecipe();
//French Fries //French Fries
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()),
"FFF", " P ", "FFF", " P ",
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
recipeFrenchFries = RecipeUtil.lastIRecipe(); recipeFrenchFries = RecipeUtil.lastIRecipe();
//Fish N Chips //Fish N Chips
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()),
"FIF", " P ", "FIF", " P ",
'I', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD), 'I', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD),
'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), 'P', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()))); 'F', new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRY.ordinal()));
recipeFishNChips = RecipeUtil.lastIRecipe(); recipeFishNChips = RecipeUtil.lastIRecipe();
//Cheese //Cheese
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
new ItemStack(Items.MILK_BUCKET), new ItemStack(Items.EGG)); //I don't know if this makes any actual sense, but whatever new ItemStack(Items.MILK_BUCKET), new ItemStack(Items.EGG)); //I don't know if this makes any actual sense, but whatever
recipeCheese = RecipeUtil.lastIRecipe(); recipeCheese = RecipeUtil.lastIRecipe();
//Pumpkin Stew //Pumpkin Stew
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()), RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()),
"P", "B", "P", "B",
'P', new ItemStack(Blocks.PUMPKIN), 'P', new ItemStack(Blocks.PUMPKIN),
'B', new ItemStack(Items.BOWL)); 'B', new ItemStack(Items.BOWL));
recipePumpkinStew = RecipeUtil.lastIRecipe(); recipePumpkinStew = RecipeUtil.lastIRecipe();
//Carrot Juice //Carrot Juice
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knifeStack.copy())); new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knifeStack.copy());
recipeCarrotJuice = RecipeUtil.lastIRecipe(); recipeCarrotJuice = RecipeUtil.lastIRecipe();
//Spaghetti //Spaghetti
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()),
"NNN", " B ", "NNN", " B ",
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), 'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
'B', new ItemStack(Items.BOWL))); 'B', new ItemStack(Items.BOWL));
recipeSpaghetti = RecipeUtil.lastIRecipe(); recipeSpaghetti = RecipeUtil.lastIRecipe();
//Noodle //Noodle
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
"cropWheat", knifeStack.copy())); "cropWheat", knifeStack.copy());
recipeNoodle = RecipeUtil.lastIRecipe(); recipeNoodle = RecipeUtil.lastIRecipe();
//Chocolate //Chocolate
GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()), RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.CHOCOLATE.ordinal()),
"C C", "CMC", "C C", "C C", "CMC", "C C",
'C', new ItemStack(Items.DYE, 1, 3), 'C', new ItemStack(Items.DYE, 1, 3),
'M', new ItemStack(Items.MILK_BUCKET)); 'M', new ItemStack(Items.MILK_BUCKET));
recipeChocolate = RecipeUtil.lastIRecipe(); recipeChocolate = RecipeUtil.lastIRecipe();
//Chocolate Cake //Chocolate Cake
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()),
"MMM", "CCC", "EDS", "MMM", "CCC", "EDS",
'M', new ItemStack(Items.MILK_BUCKET), 'M', new ItemStack(Items.MILK_BUCKET),
'E', new ItemStack(Items.EGG), 'E', new ItemStack(Items.EGG),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'S', new ItemStack(Items.SUGAR), 'S', new ItemStack(Items.SUGAR),
'C', new ItemStack(Items.DYE, 1, 3))); 'C', new ItemStack(Items.DYE, 1, 3));
recipeChocolateCake = RecipeUtil.lastIRecipe(); recipeChocolateCake = RecipeUtil.lastIRecipe();
//Toast //Toast
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()),
new ItemStack(Items.BREAD)); new ItemStack(Items.BREAD));
recipeToast = RecipeUtil.lastIRecipe(); recipeToast = RecipeUtil.lastIRecipe();
//Chocolate Toast //Chocolate Toast
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal())); RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal()));
recipeChocolateToast = RecipeUtil.lastIRecipe(); recipeChocolateToast = RecipeUtil.lastIRecipe();
} }

View file

@ -21,8 +21,7 @@ import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.RedOrchidFarmerB
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.RecipeSorter;
public final class InitCrafting{ public final class InitCrafting{
@ -53,14 +52,13 @@ public final class InitCrafting{
ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior()); ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior()); ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior());
RecipeSorter.register(ModUtil.MOD_ID+":recipeKeepDataShaped", RecipeKeepDataShaped.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped"); //RecipeSorter.register(ModUtil.MOD_ID+":recipeKeepDataShaped", RecipeKeepDataShaped.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped");
RecipeSorter.register(ModUtil.MOD_ID+":recipeKeepDataShapeless", RecipeKeepDataShapeless.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); //RecipeSorter.register(ModUtil.MOD_ID+":recipeKeepDataShapeless", RecipeKeepDataShapeless.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
GameRegistry.addRecipe(new RecipePotionRingCharging()); new RecipePotionRingCharging(new ResourceLocation(ModUtil.MOD_ID, "potion_ring_charging"));
RecipeSorter.register(ModUtil.MOD_ID+":recipePotionRingCharging", RecipePotionRingCharging.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); //RecipeSorter.register(ModUtil.MOD_ID+":recipePotionRingCharging", RecipePotionRingCharging.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
GameRegistry.addRecipe(new RecipeBioMash()); new RecipeBioMash(new ResourceLocation(ModUtil.MOD_ID, "bio_mash"));
RecipeSorter.register(ModUtil.MOD_ID+":recipeBioMash", RecipeBioMash.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless"); //RecipeSorter.register(ModUtil.MOD_ID+":recipeBioMash", RecipeBioMash.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
} }
} }

View file

@ -16,20 +16,22 @@ import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.*; import de.ellpeck.actuallyadditions.mod.items.metalists.*;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.enchantment.EnchantmentData; import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Enchantments; import net.minecraft.init.Enchantments;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.init.PotionTypes; import net.minecraft.init.PotionTypes;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.potion.PotionUtils; import net.minecraft.potion.PotionUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.ArrayList; import java.util.ArrayList;
@ -98,106 +100,108 @@ public final class ItemCrafting{
public static void init(){ public static void init(){
//Advanced Goggles //Advanced Goggles
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemEngineerGogglesAdvanced), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGogglesAdvanced),
" R ", "IGI", " R ", "IGI",
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(Blocks.IRON_BARS), 'I', new ItemStack(Blocks.IRON_BARS),
'G', new ItemStack(InitItems.itemEngineerGoggles))); 'G', new ItemStack(InitItems.itemEngineerGoggles));
recipeGogglesAdvanced = RecipeUtil.lastIRecipe(); recipeGogglesAdvanced = RecipeUtil.lastIRecipe();
//Goggles //Goggles
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemEngineerGoggles), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGoggles),
" R ", "IGI", " R ", "IGI",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(Blocks.IRON_BARS), 'I', new ItemStack(Blocks.IRON_BARS),
'G', "blockGlass")); 'G', "blockGlass");
recipeGoggles = RecipeUtil.lastIRecipe(); recipeGoggles = RecipeUtil.lastIRecipe();
//Laser Invis Upgrade //Laser Invis Upgrade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserUpgradeInvisibility, 4), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeInvisibility, 4),
"GGG", "RCR", "GGG", "GGG", "RCR", "GGG",
'G', "blockGlassBlack", 'G', "blockGlassBlack",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLaserUpgradeInvisibility = RecipeUtil.lastIRecipe(); recipeLaserUpgradeInvisibility = RecipeUtil.lastIRecipe();
//Laser Range Upgrade //Laser Range Upgrade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserUpgradeRange, 2), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeRange, 2),
"GGC", "RCR", "CGG", "GGC", "RCR", "CGG",
'R', new ItemStack(Items.COMPASS), 'R', new ItemStack(Items.COMPASS),
'G', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'G', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLaserUpgradeRange = RecipeUtil.lastIRecipe(); recipeLaserUpgradeRange = RecipeUtil.lastIRecipe();
//Filling Wand //Filling Wand
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFillingWand), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFillingWand),
"IPI", "DCD", " B ", "IPI", "DCD", " B ",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'B', new ItemStack(InitItems.itemBatteryTriple))); 'B', new ItemStack(InitItems.itemBatteryTriple));
recipeFillingWand = RecipeUtil.lastIRecipe(); recipeFillingWand = RecipeUtil.lastIRecipe();
//Bag //Bag
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBag), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBag),
"SLS", "SCS", "LVL", "SLS", "SCS", "LVL",
'S', new ItemStack(Items.STRING), 'S', new ItemStack(Items.STRING),
'L', new ItemStack(Items.LEATHER), 'L', new ItemStack(Items.LEATHER),
'C', "chestWood", 'C', "chestWood",
'V', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()))); 'V', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()));
recipeBag = RecipeUtil.lastIRecipe(); recipeBag = RecipeUtil.lastIRecipe();
//Void Bag //Void Bag
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVoidBag), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemVoidBag),
new ItemStack(InitItems.itemBag), new ItemStack(InitItems.itemBag),
new ItemStack(Items.ENDER_PEARL), new ItemStack(Items.ENDER_PEARL),
new ItemStack(Blocks.OBSIDIAN), new ItemStack(Blocks.OBSIDIAN),
new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()))); new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()));
recipeVoidBag = RecipeUtil.lastIRecipe(); recipeVoidBag = RecipeUtil.lastIRecipe();
//Lens //Lens
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()),
"GGG", "GBG", "GGG", "GGG", "GBG", "GGG",
'G', "blockGlass", 'G', "blockGlass",
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeLens = RecipeUtil.lastIRecipe(); recipeLens = RecipeUtil.lastIRecipe();
//Black Dye //Black Dye
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus))
;
recipeBlackDye = RecipeUtil.lastIRecipe(); recipeBlackDye = RecipeUtil.lastIRecipe();
//Booklet //Booklet
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.PAPER))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemBooklet), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.PAPER))
;
recipeBook = RecipeUtil.lastIRecipe(); recipeBook = RecipeUtil.lastIRecipe();
//Clearing NBT Storage //Clearing NBT Storage
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench)); RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench));
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector)); RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector));
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger)); RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger));
//Chest To Crate Upgrade //Chest To Crate Upgrade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade),
" W ", "WCW", " W ", " W ", "WCW", " W ",
'C', new ItemStack(InitBlocks.blockGiantChest), 'C', new ItemStack(InitBlocks.blockGiantChest),
'W', "plankWood")); 'W', "plankWood");
recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe(); recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade),
" W ", "WCW", " W ", " W ", "WCW", " W ",
'C', new ItemStack(InitBlocks.blockGiantChestMedium), 'C', new ItemStack(InitBlocks.blockGiantChestMedium),
'W', "plankWood")); 'W', "plankWood");
recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe(); recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade),
" W ", "WCW", " W ", " W ", "WCW", " W ",
'C', new ItemStack(InitBlocks.blockGiantChestLarge), 'C', new ItemStack(InitBlocks.blockGiantChestLarge),
'W', "plankWood")); 'W', "plankWood");
recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe(); recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe();
//Disenchanting Lens //Disenchanting Lens
ItemStack crystal = new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()); ItemStack crystal = new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemDisenchantingLens), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemDisenchantingLens),
new ItemStack(Blocks.ENCHANTING_TABLE), new ItemStack(Blocks.ENCHANTING_TABLE),
crystal.copy(), crystal.copy(),
crystal.copy(), crystal.copy(),
@ -206,11 +210,11 @@ public final class ItemCrafting{
crystal.copy(), crystal.copy(),
crystal.copy(), crystal.copy(),
crystal.copy(), crystal.copy(),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()))); new ItemStack(InitItems.itemMisc, 1, TheMiscItems.LENS.ordinal()));
recipeDisenchantingLens = RecipeUtil.lastIRecipe(); recipeDisenchantingLens = RecipeUtil.lastIRecipe();
//Mining Lens //Mining Lens
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMiningLens), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMiningLens),
"DGI", "CLB", "QPE", "DGI", "CLB", "QPE",
'D', "gemDiamond", 'D', "gemDiamond",
'G', "ingotGold", 'G', "ingotGold",
@ -220,298 +224,298 @@ public final class ItemCrafting{
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'Q', "gemQuartz", 'Q', "gemQuartz",
'P', "gemLapis", 'P', "gemLapis",
'E', "gemEmerald")); 'E', "gemEmerald");
recipeMiningLens = RecipeUtil.lastIRecipe(); recipeMiningLens = RecipeUtil.lastIRecipe();
//Killer Lens //Killer Lens
ItemStack enchBook = new ItemStack(Items.ENCHANTED_BOOK); ItemStack enchBook = new ItemStack(Items.ENCHANTED_BOOK);
Items.ENCHANTED_BOOK.addEnchantment(enchBook, new EnchantmentData(Enchantments.SHARPNESS, 5)); ItemEnchantedBook.addEnchantment(enchBook, new EnchantmentData(Enchantments.SHARPNESS, 5));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMoreDamageLens), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMoreDamageLens),
new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.DIAMOND_SWORD),
new ItemStack(InitItems.itemDamageLens), new ItemStack(InitItems.itemDamageLens),
enchBook)); enchBook);
recipeLensMoreDeath = RecipeUtil.lastIRecipe(); recipeLensMoreDeath = RecipeUtil.lastIRecipe();
//Filter //Filter
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFilter), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFilter),
"III", "IQI", "III", "III", "IQI", "III",
'I', new ItemStack(Blocks.IRON_BARS), 'I', new ItemStack(Blocks.IRON_BARS),
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeFilter = RecipeUtil.lastIRecipe(); recipeFilter = RecipeUtil.lastIRecipe();
//Crate Keeper //Crate Keeper
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCrateKeeper), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrateKeeper),
"WIW", "IQI", "WIW", "WIW", "IQI", "WIW",
'I', "ingotIron", 'I', "ingotIron",
'W', "plankWood", 'W', "plankWood",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeCrateKeeper = RecipeUtil.lastIRecipe(); recipeCrateKeeper = RecipeUtil.lastIRecipe();
//Spawner Changer //Spawner Changer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpawnerChanger), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSpawnerChanger),
"MSM", "SDS", "MSM", "MSM", "SDS", "MSM",
'M', new ItemStack(Items.MAGMA_CREAM), 'M', new ItemStack(Items.MAGMA_CREAM),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()),
'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()))); 'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeSpawnerChanger = RecipeUtil.lastIRecipe(); recipeSpawnerChanger = RecipeUtil.lastIRecipe();
//Laser Wrench //Laser Wrench
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserWrench), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserWrench),
"C ", " S ", " S", "C ", " S ", " S",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()))); 'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeLaserWrench = RecipeUtil.lastIRecipe(); recipeLaserWrench = RecipeUtil.lastIRecipe();
//Rice Stuff //Rice Stuff
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.PAPER, 3), RecipeHandler.addOreDictRecipe(new ItemStack(Items.PAPER, 3),
"R ", " R ", " R", "R ", " R ", " R",
'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()))); 'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
" R ", "RBR", " R ", " R ", "RBR", " R ",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
'B', Items.WATER_BUCKET)); 'B', Items.WATER_BUCKET);
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
" R ", "RBR", " R ", " R ", "RBR", " R ",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
'B', new ItemStack(Items.POTIONITEM))); 'B', new ItemStack(Items.POTIONITEM));
//Leaf Blower //Leaf Blower
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlower), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlower),
" F", "IP", "IC", " F", "IP", "IC",
'F', new ItemStack(Items.FLINT), 'F', new ItemStack(Items.FLINT),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'P', new ItemStack(Blocks.PISTON), 'P', new ItemStack(Blocks.PISTON),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLeafBlower = RecipeUtil.lastIRecipe(); recipeLeafBlower = RecipeUtil.lastIRecipe();
//Drill //Drill
ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()); ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal());
GameRegistry.addRecipe(new ShapedOreRecipe(lightBlueDrill.copy(), RecipeHandler.addOreDictRecipe(lightBlueDrill.copy(),
"DDD", "CRC", "III", "DDD", "CRC", "III",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()))); 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()));
recipeDrill = RecipeUtil.lastIRecipe(); recipeDrill = RecipeUtil.lastIRecipe();
for(int i = 0; i < 16; i++){ for(int i = 0; i < 16; i++){
if(i != TheColoredLampColors.LIGHT_BLUE.ordinal()){ if(i != TheColoredLampColors.LIGHT_BLUE.ordinal()){
GameRegistry.addRecipe(new RecipeKeepDataShapeless(new ItemStack(InitItems.itemDrill, 1, i), new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD), lightBlueDrill.copy(), "dye"+TheColoredLampColors.values()[i].oreName)); new RecipeKeepDataShapeless(new ResourceLocation(ModUtil.MOD_ID, "dril_color_change"+i), new ItemStack(InitItems.itemDrill, 1, i), new ItemStack(InitItems.itemDrill, 1, Util.WILDCARD), lightBlueDrill.copy(), "dye"+TheColoredLampColors.values()[i].oreName);
RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe()); RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe());
} }
} }
//Drill Core //Drill Core
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()),
"ICI", "CRC", "ICI", "ICI", "CRC", "ICI",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()))); 'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.ordinal()));
recipeDrillCore = RecipeUtil.lastIRecipe(); recipeDrillCore = RecipeUtil.lastIRecipe();
//Tele Staff //Tele Staff
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemTeleStaff),
" FE", " S ", "SB ", " FE", " S ", "SB ",
'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()),
'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()),
'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD))); 'B', new ItemStack(InitItems.itemBattery, 1, Util.WILDCARD));
recipeStaff = RecipeUtil.lastIRecipe(); recipeStaff = RecipeUtil.lastIRecipe();
//Drill Speed //Drill Speed
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed),
"ISI", "SRS", "ISI", "ISI", "SRS", "ISI",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.SUGAR, 'S', Items.SUGAR,
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeDrillSpeedI = RecipeUtil.lastIRecipe(); recipeDrillSpeedI = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII),
"ISI", "SCS", "ISI", "ISI", "SCS", "ISI",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.SUGAR, 'S', Items.SUGAR,
'C', Items.CAKE)); 'C', Items.CAKE);
recipeDrillSpeedII = RecipeUtil.lastIRecipe(); recipeDrillSpeedII = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII),
"ISI", "SFS", "ISI", "ISI", "SFS", "ISI",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'S', Items.SUGAR, 'S', Items.SUGAR,
'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()))); 'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeDrillSpeedIII = RecipeUtil.lastIRecipe(); recipeDrillSpeedIII = RecipeUtil.lastIRecipe();
//Drill Fortune //Drill Fortune
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune),
"ISI", "SRS", "ISI", "ISI", "SRS", "ISI",
'I', Blocks.GLOWSTONE, 'I', Blocks.GLOWSTONE,
'S', Items.REDSTONE, 'S', Items.REDSTONE,
'R', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()))); 'R', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeDrillFortuneI = RecipeUtil.lastIRecipe(); recipeDrillFortuneI = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII),
"ISI", "SRS", "ISI", "ISI", "SRS", "ISI",
'I', Blocks.GLOWSTONE, 'I', Blocks.GLOWSTONE,
'S', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'S', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()));
recipeDrillFortuneII = RecipeUtil.lastIRecipe(); recipeDrillFortuneII = RecipeUtil.lastIRecipe();
//Drill Size //Drill Size
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree),
"DID", "ICI", "DID", "DID", "ICI", "DID",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeDrillThree = RecipeUtil.lastIRecipe(); recipeDrillThree = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive),
"DID", "ICI", "DID", "DID", "ICI", "DID",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeDrillFive = RecipeUtil.lastIRecipe(); recipeDrillFive = RecipeUtil.lastIRecipe();
//Drill Silk Touch //Drill Silk Touch
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch),
"DSD", "SCS", "DSD", "DSD", "SCS", "DSD",
'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()), 'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()),
'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'S', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeDrillSilk = RecipeUtil.lastIRecipe(); recipeDrillSilk = RecipeUtil.lastIRecipe();
//Drill Placing //Drill Placing
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing),
"CEC", "RAR", "CEC", "CEC", "RAR", "CEC",
'C', "cobblestone", 'C', "cobblestone",
'E', Items.PAPER, 'E', Items.PAPER,
'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'A', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()))); 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()));
recipeDrillPlacing = RecipeUtil.lastIRecipe(); recipeDrillPlacing = RecipeUtil.lastIRecipe();
//Battery //Battery
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBattery), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBattery),
" R ", "ICI", "III", " R ", "ICI", "III",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBattery = RecipeUtil.lastIRecipe(); recipeBattery = RecipeUtil.lastIRecipe();
//Double Battery //Double Battery
GameRegistry.addRecipe(new RecipeKeepDataShaped(new ItemStack(InitItems.itemBatteryDouble), new ItemStack(InitItems.itemBattery), new RecipeKeepDataShaped(new ResourceLocation(ModUtil.MOD_ID, "double_battery"), new ItemStack(InitItems.itemBatteryDouble), new ItemStack(InitItems.itemBattery),
" R ", "ICI", "III", " R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBattery), 'R', new ItemStack(InitItems.itemBattery),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryDouble = RecipeUtil.lastIRecipe(); recipeBatteryDouble = RecipeUtil.lastIRecipe();
//Magnet Ring //Magnet Ring
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMagnetRing), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMagnetRing),
"RIB", "IOI", "BIR", "RIB", "IOI", "BIR",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'B', new ItemStack(Items.DYE, 1, 4), 'B', new ItemStack(Items.DYE, 1, 4),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipeMagnetRing = RecipeUtil.lastIRecipe(); recipeMagnetRing = RecipeUtil.lastIRecipe();
//Growth Ring //Growth Ring
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGrowthRing), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemGrowthRing),
"SIS", "IOI", "SIS", "SIS", "IOI", "SIS",
'S', new ItemStack(Items.WHEAT_SEEDS), 'S', new ItemStack(Items.WHEAT_SEEDS),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipeGrowthRing = RecipeUtil.lastIRecipe(); recipeGrowthRing = RecipeUtil.lastIRecipe();
//Water Ring //Water Ring
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWaterRemovalRing), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWaterRemovalRing),
"BIB", "IOI", "BIB", "BIB", "IOI", "BIB",
'B', new ItemStack(Items.WATER_BUCKET), 'B', new ItemStack(Items.WATER_BUCKET),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()))); 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipeWaterRing = RecipeUtil.lastIRecipe(); recipeWaterRing = RecipeUtil.lastIRecipe();
//Triple Battery //Triple Battery
GameRegistry.addRecipe(new RecipeKeepDataShaped(new ItemStack(InitItems.itemBatteryTriple), new ItemStack(InitItems.itemBatteryDouble), new RecipeKeepDataShaped(new ResourceLocation(ModUtil.MOD_ID, "triple_battery"), new ItemStack(InitItems.itemBatteryTriple), new ItemStack(InitItems.itemBatteryDouble),
" R ", "ICI", "III", " R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryDouble), 'R', new ItemStack(InitItems.itemBatteryDouble),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryTriple = RecipeUtil.lastIRecipe(); recipeBatteryTriple = RecipeUtil.lastIRecipe();
//Quadruple Battery //Quadruple Battery
GameRegistry.addRecipe(new RecipeKeepDataShaped(new ItemStack(InitItems.itemBatteryQuadruple), new ItemStack(InitItems.itemBatteryTriple), new RecipeKeepDataShaped(new ResourceLocation(ModUtil.MOD_ID, "quadruple_battery"), new ItemStack(InitItems.itemBatteryQuadruple), new ItemStack(InitItems.itemBatteryTriple),
" R ", "ICI", "III", " R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryTriple), 'R', new ItemStack(InitItems.itemBatteryTriple),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryQuadruple = RecipeUtil.lastIRecipe(); recipeBatteryQuadruple = RecipeUtil.lastIRecipe();
//Quintuple Battery //Quintuple Battery
GameRegistry.addRecipe(new RecipeKeepDataShaped(new ItemStack(InitItems.itemBatteryQuintuple), new ItemStack(InitItems.itemBatteryQuadruple), new RecipeKeepDataShaped(new ResourceLocation(ModUtil.MOD_ID, "quintuple_battery"), new ItemStack(InitItems.itemBatteryQuintuple), new ItemStack(InitItems.itemBatteryQuadruple),
" R ", "ICI", "III", " R ", "ICI", "III",
'R', new ItemStack(InitItems.itemBatteryQuadruple), 'R', new ItemStack(InitItems.itemBatteryQuadruple),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeBatteryQuintuple = RecipeUtil.lastIRecipe(); recipeBatteryQuintuple = RecipeUtil.lastIRecipe();
//Bat Wings //Bat Wings
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWingsOfTheBats), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWingsOfTheBats),
"WNW", "WDW", "WNW", "WNW", "WDW", "WNW",
'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()), 'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal()),
'N', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'N', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()))); 'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()));
recipeWings = RecipeUtil.lastIRecipe(); recipeWings = RecipeUtil.lastIRecipe();
//Coil //Coil
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
" R ", "RIR", " R ", " R ", "RIR", " R ",
'I', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()) : new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'I', ConfigBoolValues.SUPER_DUPER_HARD_MODE.isEnabled() ? new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()) : new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()))); 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeCoil = RecipeUtil.lastIRecipe(); recipeCoil = RecipeUtil.lastIRecipe();
//Cup //Cup
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()),
"S S", "SCS", "SSS", "S S", "SCS", "SSS",
'S', "stone", 'S', "stone",
'C', InitItems.itemCoffeeBean)); 'C', InitItems.itemCoffeeBean);
recipeCup = RecipeUtil.lastIRecipe(); recipeCup = RecipeUtil.lastIRecipe();
//Resonant Rice //Resonant Rice
if(!OreDictionary.getOres("nuggetEnderium", false).isEmpty()){ if(!OreDictionary.getOres("nuggetEnderium", false).isEmpty()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemResonantRice), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER)); new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER);
} }
//Advanced Coil //Advanced Coil
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
"GGG", "GCG", "GGG", "GGG", "GCG", "GGG",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'G', "nuggetGold")); 'G', "nuggetGold");
recipeCoilAdvanced = RecipeUtil.lastIRecipe(); recipeCoilAdvanced = RecipeUtil.lastIRecipe();
//Advanced Leaf Blower //Advanced Leaf Blower
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
" F", "DP", "DC", " F", "DP", "DC",
'F', new ItemStack(Items.FLINT), 'F', new ItemStack(Items.FLINT),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'P', new ItemStack(Blocks.PISTON), 'P', new ItemStack(Blocks.PISTON),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe(); recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe();
//Phantom Connector //Phantom Connector
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPhantomConnector), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPhantomConnector),
"YE", "EY", "S ", "YE", "EY", "S ",
'Y', Items.ENDER_EYE, 'Y', Items.ENDER_EYE,
'E', Items.ENDER_PEARL, 'E', Items.ENDER_PEARL,
'S', "stickWood")); 'S', "stickWood");
recipePhantomConnector = RecipeUtil.lastIRecipe(); recipePhantomConnector = RecipeUtil.lastIRecipe();
//Player Probe //Player Probe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPlayerProbe), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPlayerProbe),
"A A", "AIA", "RHR", "A A", "AIA", "RHR",
'A', new ItemStack(Blocks.IRON_BARS), 'A', new ItemStack(Blocks.IRON_BARS),
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()), 'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'H', new ItemStack(Items.SKULL, 1, 1), 'H', new ItemStack(Items.SKULL, 1, 1),
'I', new ItemStack(Items.IRON_HELMET))); 'I', new ItemStack(Items.IRON_HELMET));
recipePlayerProbe = RecipeUtil.lastIRecipe(); recipePlayerProbe = RecipeUtil.lastIRecipe();
//Quartz //Quartz
@ -519,38 +523,38 @@ public final class ItemCrafting{
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
//Knife //Knife
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemKnife), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemKnife),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()))); new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
recipeKnife = RecipeUtil.lastIRecipe(); recipeKnife = RecipeUtil.lastIRecipe();
//Crafter on a Stick //Crafter on a Stick
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrafterOnAStick), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrafterOnAStick),
new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Blocks.CRAFTING_TABLE),
new ItemStack(Items.SIGN))); new ItemStack(Items.SIGN));
//Tiny Coal //Tiny Coal
if(ConfigBoolValues.TINY_COAL_STUFF.isEnabled()){ if(ConfigBoolValues.TINY_COAL_STUFF.isEnabled()){
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()),
new ItemStack(Items.COAL)); new ItemStack(Items.COAL));
recipeTinyCoal = RecipeUtil.lastIRecipe(); recipeTinyCoal = RecipeUtil.lastIRecipe();
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()),
new ItemStack(Items.COAL, 1, 1)); new ItemStack(Items.COAL, 1, 1));
recipeTinyChar = RecipeUtil.lastIRecipe(); recipeTinyChar = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.COAL), RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL),
"CCC", "C C", "CCC", "CCC", "C C", "CCC",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.COAL, 1, 1), RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL, 1, 1),
"CCC", "C C", "CCC", "CCC", "C C", "CCC",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()))); 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()));
} }
//Rice Seeds //Rice Seeds
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())); new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
//Canola Seeds //Canola Seeds
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed), RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())); new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
//Rings //Rings
@ -577,11 +581,11 @@ public final class ItemCrafting{
} }
public static void initPotionRingRecipes(){ public static void initPotionRingRecipes(){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()),
"IGI", "GDG", "IGI", "IGI", "GDG", "IGI",
'G', "ingotGold", 'G', "ingotGold",
'I', "ingotIron", 'I', "ingotIron",
'D', "dustGlowstone")); 'D', "dustGlowstone");
recipeRing = RecipeUtil.lastIRecipe(); recipeRing = RecipeUtil.lastIRecipe();
addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal()); addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
@ -600,10 +604,10 @@ public final class ItemCrafting{
ItemStack potion = new ItemStack(Items.POTIONITEM); ItemStack potion = new ItemStack(Items.POTIONITEM);
PotionUtils.addPotionToItemStack(potion, PotionTypes.AWKWARD); PotionUtils.addPotionToItemStack(potion, PotionTypes.AWKWARD);
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), new ItemStack(Items.NETHER_WART), potion, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.DIAMOND.ordinal()), new ItemStack(Items.NETHER_WART), potion, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe()); RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal())); RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()));
RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe()); RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
} }
} }

View file

@ -16,12 +16,11 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods; import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public final class MiscCrafting{ public final class MiscCrafting{
@ -42,62 +41,62 @@ public final class MiscCrafting{
//Crystals //Crystals
for(int i = 0; i < TheCrystals.values().length; i++){ for(int i = 0; i < TheCrystals.values().length; i++){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i),
"XXX", "XXX", "XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystal, 1, i))); 'X', new ItemStack(InitItems.itemCrystal, 1, i));
RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe(); RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i));
RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe(); RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i), RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i),
"XXX", "XXX", "XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystalEmpowered, 1, i))); 'X', new ItemStack(InitItems.itemCrystalEmpowered, 1, i));
RECIPES_EMPOWERED_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe(); RECIPES_EMPOWERED_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i));
RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe(); RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCrystal, 1, i), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrystal, 1, i),
"XXX", "XXX", "XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystalShard, 1, i))); 'X', new ItemStack(InitItems.itemCrystalShard, 1, i));
RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe(); RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i))); RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i));
RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe(); RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe();
} }
//Dough //Dough
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
"cropWheat", "cropWheat")); "cropWheat", "cropWheat");
ItemCrafting.recipeDough = RecipeUtil.lastIRecipe(); ItemCrafting.recipeDough = RecipeUtil.lastIRecipe();
//Rice Dough //Rice Dough
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()))); new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe(); ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe();
//Paper Cone //Paper Cone
GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), RecipeHandler.addShapedRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()),
"P P", " P ", "P P", " P ",
'P', new ItemStack(Items.PAPER)); 'P', new ItemStack(Items.PAPER));
//Knife Handle //Knife Handle
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()),
"stickWood", "stickWood",
new ItemStack(Items.LEATHER))); new ItemStack(Items.LEATHER));
ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe(); ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe();
//Knife Blade //Knife Blade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()),
"K", "K", "F", "K", "K", "F",
'K', "ingotIron", 'K', "ingotIron",
'F', new ItemStack(Items.FLINT))); 'F', new ItemStack(Items.FLINT));
ItemCrafting.recipeKnifeBlade = RecipeUtil.lastIRecipe(); ItemCrafting.recipeKnifeBlade = RecipeUtil.lastIRecipe();
//Ender Star //Ender Star
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()),
new ItemStack(Items.NETHER_STAR), new ItemStack(Items.NETHER_STAR),
new ItemStack(Items.DRAGON_BREATH), new ItemStack(Items.DRAGON_BREATH),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
new ItemStack(Items.PRISMARINE_SHARD))); new ItemStack(Items.PRISMARINE_SHARD));
ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe(); ItemCrafting.recipeEnderStar = RecipeUtil.lastIRecipe();
} }

View file

@ -14,16 +14,23 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.ItemKnife; import de.ellpeck.actuallyadditions.mod.items.ItemKnife;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemFood; import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.fml.common.registry.IForgeRegistryEntry;
public class RecipeBioMash implements IRecipe{ public class RecipeBioMash extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe{
public RecipeBioMash(ResourceLocation location){
RecipeHandler.addRecipe(location, this);
}
@Override @Override
public boolean matches(InventoryCrafting inv, World world){ public boolean matches(InventoryCrafting inv, World world){
@ -79,8 +86,8 @@ public class RecipeBioMash implements IRecipe{
} }
@Override @Override
public int getRecipeSize(){ public boolean func_194133_a(int p_194133_1_, int p_194133_2_){
return 2; return false;
} }
@Override @Override

View file

@ -12,17 +12,21 @@ package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
public class RecipeKeepDataShaped extends ShapedOreRecipe{ public class RecipeKeepDataShaped extends ShapedOreRecipe{
private final ItemStack nbtCopyStack; private final ItemStack nbtCopyStack;
public RecipeKeepDataShaped(ItemStack result, ItemStack nbtCopyStack, Object... recipe){ public RecipeKeepDataShaped(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe){
super(result, recipe); super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack; this.nbtCopyStack = nbtCopyStack;
RecipeHandler.addRecipe(group, this);
} }
@Override @Override

View file

@ -12,17 +12,21 @@ package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
public class RecipeKeepDataShapeless extends ShapelessOreRecipe{ public class RecipeKeepDataShapeless extends ShapelessOreRecipe{
private final ItemStack nbtCopyStack; private final ItemStack nbtCopyStack;
public RecipeKeepDataShapeless(ItemStack result, ItemStack nbtCopyStack, Object... recipe){ public RecipeKeepDataShapeless(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe){
super(result, recipe); super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack; this.nbtCopyStack = nbtCopyStack;
RecipeHandler.addRecipe(group, this);
} }
@Override @Override
@ -39,5 +43,4 @@ public class RecipeKeepDataShapeless extends ShapelessOreRecipe{
} }
return stack; return stack;
} }
} }

View file

@ -12,15 +12,22 @@ package de.ellpeck.actuallyadditions.mod.crafting;
import de.ellpeck.actuallyadditions.mod.items.ItemPotionRing; import de.ellpeck.actuallyadditions.mod.items.ItemPotionRing;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.fml.common.registry.IForgeRegistryEntry;
public class RecipePotionRingCharging implements IRecipe{ public class RecipePotionRingCharging extends IForgeRegistryEntry.Impl<IRecipe> implements IRecipe{
public RecipePotionRingCharging(ResourceLocation location){
RecipeHandler.addRecipe(location, this);
}
@Override @Override
public boolean matches(InventoryCrafting inv, World worldIn){ public boolean matches(InventoryCrafting inv, World worldIn){
@ -77,8 +84,8 @@ public class RecipePotionRingCharging implements IRecipe{
} }
@Override @Override
public int getRecipeSize(){ public boolean func_194133_a(int p_194133_1_, int p_194133_2_){
return 0; return false;
} }
@Override @Override

View file

@ -14,14 +14,12 @@ import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.ArrayList; import java.util.ArrayList;
@ -43,155 +41,155 @@ public final class ToolCrafting{
addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), InitItems.itemPickaxeCrystalBlack, InitItems.itemSwordCrystalBlack, InitItems.itemAxeCrystalBlack, InitItems.itemShovelCrystalBlack, InitItems.itemHoeCrystalBlack, InitItems.itemHelmCrystalBlack, InitItems.itemChestCrystalBlack, InitItems.itemPantsCrystalBlack, InitItems.itemBootsCrystalBlack); addToolAndArmorRecipes(new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()), InitItems.itemPickaxeCrystalBlack, InitItems.itemSwordCrystalBlack, InitItems.itemAxeCrystalBlack, InitItems.itemShovelCrystalBlack, InitItems.itemHoeCrystalBlack, InitItems.itemHelmCrystalBlack, InitItems.itemChestCrystalBlack, InitItems.itemPantsCrystalBlack, InitItems.itemBootsCrystalBlack);
//Paxels //Paxels
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.woodenPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.woodenPaxel),
new ItemStack(Items.WOODEN_AXE), new ItemStack(Items.WOODEN_AXE),
new ItemStack(Items.WOODEN_PICKAXE), new ItemStack(Items.WOODEN_PICKAXE),
new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.WOODEN_SHOVEL),
new ItemStack(Items.WOODEN_SWORD), new ItemStack(Items.WOODEN_SWORD),
new ItemStack(Items.WOODEN_HOE))); new ItemStack(Items.WOODEN_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.stonePaxel),
new ItemStack(Items.STONE_AXE), new ItemStack(Items.STONE_AXE),
new ItemStack(Items.STONE_PICKAXE), new ItemStack(Items.STONE_PICKAXE),
new ItemStack(Items.STONE_SHOVEL), new ItemStack(Items.STONE_SHOVEL),
new ItemStack(Items.STONE_SWORD), new ItemStack(Items.STONE_SWORD),
new ItemStack(Items.STONE_HOE))); new ItemStack(Items.STONE_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.ironPaxel),
new ItemStack(Items.IRON_AXE), new ItemStack(Items.IRON_AXE),
new ItemStack(Items.IRON_PICKAXE), new ItemStack(Items.IRON_PICKAXE),
new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.IRON_SHOVEL),
new ItemStack(Items.IRON_SWORD), new ItemStack(Items.IRON_SWORD),
new ItemStack(Items.IRON_HOE))); new ItemStack(Items.IRON_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.goldPaxel),
new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.GOLDEN_AXE),
new ItemStack(Items.GOLDEN_PICKAXE), new ItemStack(Items.GOLDEN_PICKAXE),
new ItemStack(Items.GOLDEN_SHOVEL), new ItemStack(Items.GOLDEN_SHOVEL),
new ItemStack(Items.GOLDEN_SWORD), new ItemStack(Items.GOLDEN_SWORD),
new ItemStack(Items.GOLDEN_HOE))); new ItemStack(Items.GOLDEN_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.diamondPaxel),
new ItemStack(Items.DIAMOND_AXE), new ItemStack(Items.DIAMOND_AXE),
new ItemStack(Items.DIAMOND_PICKAXE), new ItemStack(Items.DIAMOND_PICKAXE),
new ItemStack(Items.DIAMOND_SHOVEL), new ItemStack(Items.DIAMOND_SHOVEL),
new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.DIAMOND_SWORD),
new ItemStack(Items.DIAMOND_HOE))); new ItemStack(Items.DIAMOND_HOE));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.emeraldPaxel),
new ItemStack(InitItems.itemAxeEmerald), new ItemStack(InitItems.itemAxeEmerald),
new ItemStack(InitItems.itemPickaxeEmerald), new ItemStack(InitItems.itemPickaxeEmerald),
new ItemStack(InitItems.itemSwordEmerald), new ItemStack(InitItems.itemSwordEmerald),
new ItemStack(InitItems.itemShovelEmerald), new ItemStack(InitItems.itemShovelEmerald),
new ItemStack(InitItems.itemHoeEmerald))); new ItemStack(InitItems.itemHoeEmerald));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.obsidianPaxel),
new ItemStack(InitItems.itemAxeObsidian), new ItemStack(InitItems.itemAxeObsidian),
new ItemStack(InitItems.itemPickaxeObsidian), new ItemStack(InitItems.itemPickaxeObsidian),
new ItemStack(InitItems.itemSwordObsidian), new ItemStack(InitItems.itemSwordObsidian),
new ItemStack(InitItems.itemShovelObsidian), new ItemStack(InitItems.itemShovelObsidian),
new ItemStack(InitItems.itemHoeObsidian))); new ItemStack(InitItems.itemHoeObsidian));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.quartzPaxel),
new ItemStack(InitItems.itemAxeQuartz), new ItemStack(InitItems.itemAxeQuartz),
new ItemStack(InitItems.itemPickaxeQuartz), new ItemStack(InitItems.itemPickaxeQuartz),
new ItemStack(InitItems.itemSwordQuartz), new ItemStack(InitItems.itemSwordQuartz),
new ItemStack(InitItems.itemShovelQuartz), new ItemStack(InitItems.itemShovelQuartz),
new ItemStack(InitItems.itemHoeQuartz))); new ItemStack(InitItems.itemHoeQuartz));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalRed), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalRed),
new ItemStack(InitItems.itemAxeCrystalRed), new ItemStack(InitItems.itemAxeCrystalRed),
new ItemStack(InitItems.itemPickaxeCrystalRed), new ItemStack(InitItems.itemPickaxeCrystalRed),
new ItemStack(InitItems.itemSwordCrystalRed), new ItemStack(InitItems.itemSwordCrystalRed),
new ItemStack(InitItems.itemShovelCrystalRed), new ItemStack(InitItems.itemShovelCrystalRed),
new ItemStack(InitItems.itemHoeCrystalRed))); new ItemStack(InitItems.itemHoeCrystalRed));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen),
new ItemStack(InitItems.itemAxeCrystalGreen), new ItemStack(InitItems.itemAxeCrystalGreen),
new ItemStack(InitItems.itemPickaxeCrystalGreen), new ItemStack(InitItems.itemPickaxeCrystalGreen),
new ItemStack(InitItems.itemSwordCrystalGreen), new ItemStack(InitItems.itemSwordCrystalGreen),
new ItemStack(InitItems.itemShovelCrystalGreen), new ItemStack(InitItems.itemShovelCrystalGreen),
new ItemStack(InitItems.itemHoeCrystalGreen))); new ItemStack(InitItems.itemHoeCrystalGreen));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue),
new ItemStack(InitItems.itemAxeCrystalBlue), new ItemStack(InitItems.itemAxeCrystalBlue),
new ItemStack(InitItems.itemPickaxeCrystalBlue), new ItemStack(InitItems.itemPickaxeCrystalBlue),
new ItemStack(InitItems.itemSwordCrystalBlue), new ItemStack(InitItems.itemSwordCrystalBlue),
new ItemStack(InitItems.itemShovelCrystalBlue), new ItemStack(InitItems.itemShovelCrystalBlue),
new ItemStack(InitItems.itemHoeCrystalBlue))); new ItemStack(InitItems.itemHoeCrystalBlue));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue),
new ItemStack(InitItems.itemAxeCrystalLightBlue), new ItemStack(InitItems.itemAxeCrystalLightBlue),
new ItemStack(InitItems.itemPickaxeCrystalLightBlue), new ItemStack(InitItems.itemPickaxeCrystalLightBlue),
new ItemStack(InitItems.itemSwordCrystalLightBlue), new ItemStack(InitItems.itemSwordCrystalLightBlue),
new ItemStack(InitItems.itemShovelCrystalLightBlue), new ItemStack(InitItems.itemShovelCrystalLightBlue),
new ItemStack(InitItems.itemHoeCrystalLightBlue))); new ItemStack(InitItems.itemHoeCrystalLightBlue));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack),
new ItemStack(InitItems.itemAxeCrystalBlack), new ItemStack(InitItems.itemAxeCrystalBlack),
new ItemStack(InitItems.itemPickaxeCrystalBlack), new ItemStack(InitItems.itemPickaxeCrystalBlack),
new ItemStack(InitItems.itemSwordCrystalBlack), new ItemStack(InitItems.itemSwordCrystalBlack),
new ItemStack(InitItems.itemShovelCrystalBlack), new ItemStack(InitItems.itemShovelCrystalBlack),
new ItemStack(InitItems.itemHoeCrystalBlack))); new ItemStack(InitItems.itemHoeCrystalBlack));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite), RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite),
new ItemStack(InitItems.itemAxeCrystalWhite), new ItemStack(InitItems.itemAxeCrystalWhite),
new ItemStack(InitItems.itemPickaxeCrystalWhite), new ItemStack(InitItems.itemPickaxeCrystalWhite),
new ItemStack(InitItems.itemSwordCrystalWhite), new ItemStack(InitItems.itemSwordCrystalWhite),
new ItemStack(InitItems.itemShovelCrystalWhite), new ItemStack(InitItems.itemShovelCrystalWhite),
new ItemStack(InitItems.itemHoeCrystalWhite))); new ItemStack(InitItems.itemHoeCrystalWhite));
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
} }
public static void addToolAndArmorRecipes(ItemStack base, Item pickaxe, Item sword, Item axe, Item shovel, Item hoe, Item helm, Item chest, Item pants, Item boots){ public static void addToolAndArmorRecipes(ItemStack base, Item pickaxe, Item sword, Item axe, Item shovel, Item hoe, Item helm, Item chest, Item pants, Item boots){
//Pickaxe //Pickaxe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(pickaxe), RecipeHandler.addOreDictRecipe(new ItemStack(pickaxe),
"EEE", " S ", " S ", "EEE", " S ", " S ",
'E', base, 'E', base,
'S', new ItemStack(Items.STICK))); 'S', new ItemStack(Items.STICK));
//Sword //Sword
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(sword), RecipeHandler.addOreDictRecipe(new ItemStack(sword),
"E", "E", "S", "E", "E", "S",
'E', base, 'E', base,
'S', new ItemStack(Items.STICK))); 'S', new ItemStack(Items.STICK));
//Axe //Axe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(axe), RecipeHandler.addOreDictRecipe(new ItemStack(axe),
"EE", "ES", " S", "EE", "ES", " S",
'E', base, 'E', base,
'S', new ItemStack(Items.STICK))); 'S', new ItemStack(Items.STICK));
//Shovel //Shovel
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(shovel), RecipeHandler.addOreDictRecipe(new ItemStack(shovel),
"E", "S", "S", "E", "S", "S",
'E', base, 'E', base,
'S', new ItemStack(Items.STICK))); 'S', new ItemStack(Items.STICK));
//Hoe //Hoe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(hoe), RecipeHandler.addOreDictRecipe(new ItemStack(hoe),
"EE", " S", " S", "EE", " S", " S",
'E', base, 'E', base,
'S', new ItemStack(Items.STICK))); 'S', new ItemStack(Items.STICK));
//Helm //Helm
GameRegistry.addRecipe(new ItemStack(helm), RecipeHandler.addShapedRecipe(new ItemStack(helm),
"OOO", "O O", "OOO", "O O",
'O', base); 'O', base);
//Chest //Chest
GameRegistry.addRecipe(new ItemStack(chest), RecipeHandler.addShapedRecipe(new ItemStack(chest),
"O O", "OOO", "OOO", "O O", "OOO", "OOO",
'O', base); 'O', base);
//Legs //Legs
GameRegistry.addRecipe(new ItemStack(pants), RecipeHandler.addShapedRecipe(new ItemStack(pants),
"OOO", "O O", "O O", "OOO", "O O", "O O",
'O', base); 'O', base);
//Boots //Boots
GameRegistry.addRecipe(new ItemStack(boots), RecipeHandler.addShapedRecipe(new ItemStack(boots),
"O O", "O O", "O O", "O O",
'O', base); 'O', base);
} }

View file

@ -350,13 +350,13 @@ public class CreativeTab extends CreativeTabs{
public void add(Item item){ public void add(Item item){
if(item != null){ if(item != null){
item.getSubItems(item, INSTANCE, this.list); item.getSubItems(INSTANCE, this.list);
} }
} }
public void add(Block block){ public void add(Block block){
if(block != null){ if(block != null){
block.getSubBlocks(new ItemStack(block).getItem(), INSTANCE, this.list); block.getSubBlocks(INSTANCE, this.list);
} }
} }
} }

View file

@ -19,9 +19,9 @@ import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldSavedData;
import net.minecraft.world.WorldServer; import net.minecraft.world.WorldServer;
import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.WorldSavedData;
import net.minecraftforge.common.WorldSpecificSaveHandler; import net.minecraftforge.common.WorldSpecificSaveHandler;
import java.io.File; import java.io.File;

View file

@ -94,7 +94,7 @@ public class ClientEvents{
} }
//Advanced Item Info //Advanced Item Info
if(event.isShowAdvancedItemTooltips() && StackUtil.isValid(event.getItemStack())){ if(event.getFlags().func_194127_a() && StackUtil.isValid(event.getItemStack())){
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){ if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
if(GuiScreen.isCtrlKeyDown()){ if(GuiScreen.isCtrlKeyDown()){
event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":"); event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":");

View file

@ -10,15 +10,12 @@
package de.ellpeck.actuallyadditions.mod.event; package de.ellpeck.actuallyadditions.mod.event;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements;
import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.WorldData; import de.ellpeck.actuallyadditions.mod.data.WorldData;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot; import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
@ -43,7 +40,8 @@ public class CommonEvents{
MinecraftForge.EVENT_BUS.register(new DungeonLoot()); MinecraftForge.EVENT_BUS.register(new DungeonLoot());
} }
public static void checkAchievements(ItemStack gotten, EntityPlayer player, InitAchievements.Type type){ //TODO Checking Achievements?
/*public static void checkAchievements(ItemStack gotten, EntityPlayer player, InitAchievements.Type type){
if(gotten != null && player != null){ if(gotten != null && player != null){
for(TheAchievements ach : TheAchievements.values()){ for(TheAchievements ach : TheAchievements.values()){
if(ach.type == type){ if(ach.type == type){
@ -53,7 +51,7 @@ public class CommonEvents{
} }
} }
} }
} }*/
@SubscribeEvent @SubscribeEvent
public void onEntityDropEvent(LivingDropsEvent event){ public void onEntityDropEvent(LivingDropsEvent event){
@ -78,7 +76,7 @@ public class CommonEvents{
@SubscribeEvent @SubscribeEvent
public void onCraftedEvent(PlayerEvent.ItemCraftedEvent event){ public void onCraftedEvent(PlayerEvent.ItemCraftedEvent event){
checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING); //checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING);
if(ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()){ if(ConfigBoolValues.GIVE_BOOKLET_ON_FIRST_CRAFT.isEnabled()){
if(!event.player.world.isRemote && StackUtil.isValid(event.crafting) && event.crafting.getItem() != InitItems.itemBooklet){ if(!event.player.world.isRemote && StackUtil.isValid(event.crafting) && event.crafting.getItem() != InitItems.itemBooklet){
@ -101,12 +99,12 @@ public class CommonEvents{
@SubscribeEvent @SubscribeEvent
public void onSmeltedEvent(PlayerEvent.ItemSmeltedEvent event){ public void onSmeltedEvent(PlayerEvent.ItemSmeltedEvent event){
checkAchievements(event.smelting, event.player, InitAchievements.Type.SMELTING); //checkAchievements(event.smelting, event.player, InitAchievements.Type.SMELTING);
} }
@SubscribeEvent @SubscribeEvent
public void onPickupEvent(EntityItemPickupEvent event){ public void onPickupEvent(EntityItemPickupEvent event){
checkAchievements(event.getItem().getEntityItem(), event.getEntityPlayer(), InitAchievements.Type.PICK_UP); //checkAchievements(event.getItem().getEntityItem(), event.getEntityPlayer(), InitAchievements.Type.PICK_UP);
} }
@SubscribeEvent @SubscribeEvent

View file

@ -27,8 +27,8 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldType; import net.minecraft.world.WorldType;
import net.minecraft.world.biome.BiomeOcean; import net.minecraft.world.biome.BiomeOcean;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.IChunkGenerator;
import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.structure.StructureBoundingBox; import net.minecraft.world.gen.structure.StructureBoundingBox;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;

View file

@ -119,7 +119,7 @@ public class ContainerCrafter extends Container{
@Override @Override
public void onCraftMatrixChanged(IInventory inv){ public void onCraftMatrixChanged(IInventory inv){
this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.world)); this.craftResult.setInventorySlotContents(0, CraftingManager.findMatchingRecipe(this.craftMatrix, this.world));
} }
@Override @Override

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -32,7 +31,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiBag extends GuiContainer{ public class GuiBag extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bag"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bag");
private static final ResourceLocation RES_LOC_VOID = AssetUtil.getGuiLocation("gui_void_bag"); private static final ResourceLocation RES_LOC_VOID = AssetUtil.getGuiLocation("gui_void_bag");

View file

@ -14,12 +14,11 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerBioReactor;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
public class GuiBioReactor extends GuiContainer{ public class GuiBioReactor extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bio_reactor"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_bio_reactor");
private final TileEntityBioReactor tile; private final TileEntityBioReactor tile;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerBreaker;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiBreaker extends GuiContainer{ public class GuiBreaker extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityBreaker breaker; private final TileEntityBreaker breaker;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerCanolaPress;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCanolaPress extends GuiContainer{ public class GuiCanolaPress extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_canola_press"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_canola_press");
private final TileEntityCanolaPress press; private final TileEntityCanolaPress press;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoalGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCoalGenerator extends GuiContainer{ public class GuiCoalGenerator extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_coal_generator"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_coal_generator");
private final TileEntityCoalGenerator generator; private final TileEntityCoalGenerator generator;

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -28,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Collections; import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCoffeeMachine extends GuiContainer{ public class GuiCoffeeMachine extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_coffee_machine"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_coffee_machine");
private final TileEntityCoffeeMachine machine; private final TileEntityCoffeeMachine machine;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerCrafter;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCrafter extends GuiContainer{ public class GuiCrafter extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = new ResourceLocation("textures/gui/container/crafting_table.png"); private static final ResourceLocation RES_LOC = new ResourceLocation("textures/gui/container/crafting_table.png");

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiDirectionalBreaker extends GuiContainer{ public class GuiDirectionalBreaker extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_directional_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_directional_breaker");
private final TileEntityDirectionalBreaker breaker; private final TileEntityDirectionalBreaker breaker;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiDrill extends GuiContainer{ public class GuiDrill extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_drill"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_drill");

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerDropper;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiDropper extends GuiContainer{ public class GuiDropper extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityDropper dropper; private final TileEntityDropper dropper;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiEnergizer extends GuiContainer{ public class GuiEnergizer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_energizer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_energizer");
private final TileEntityEnergizer energizer; private final TileEntityEnergizer energizer;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnervator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiEnervator extends GuiContainer{ public class GuiEnervator extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_energizer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_energizer");
private final TileEntityEnervator enervator; private final TileEntityEnervator enervator;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFarmer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFarmer extends GuiContainer{ public class GuiFarmer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_farmer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_farmer");
private final TileEntityFarmer farmer; private final TileEntityFarmer farmer;

View file

@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -26,7 +25,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Arrays; import java.util.Arrays;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFeeder extends GuiContainer{ public class GuiFeeder extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder");
public final TileEntityFeeder tileFeeder; public final TileEntityFeeder tileFeeder;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFermentingBarrel;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFermentingBarrel extends GuiContainer{ public class GuiFermentingBarrel extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_fermenting_barrel"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_fermenting_barrel");
private final TileEntityFermentingBarrel press; private final TileEntityFermentingBarrel press;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFilter extends GuiContainer{ public class GuiFilter extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_filter"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_filter");

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFluidCollector;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFluidCollector extends GuiContainer{ public class GuiFluidCollector extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_fluid_collector"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_fluid_collector");
private final TileEntityFluidCollector collector; private final TileEntityFluidCollector collector;

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -30,7 +29,7 @@ import java.io.IOException;
import java.util.Collections; import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFurnaceDouble extends GuiContainer{ public class GuiFurnaceDouble extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_furnace_double"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_furnace_double");
private final TileEntityFurnaceDouble tileFurnace; private final TileEntityFurnaceDouble tileFurnace;

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -28,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.io.IOException; import java.io.IOException;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiGiantChest extends GuiContainer{ public class GuiGiantChest extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_giant_chest"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_giant_chest");

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -30,7 +29,7 @@ import java.io.IOException;
import java.util.Collections; import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiGrinder extends GuiContainer{ public class GuiGrinder extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_grinder"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_grinder");
private static final ResourceLocation RES_LOC_DOUBLE = AssetUtil.getGuiLocation("gui_grinder_double"); private static final ResourceLocation RES_LOC_DOUBLE = AssetUtil.getGuiLocation("gui_grinder_double");

View file

@ -257,7 +257,7 @@ public class GuiInputter extends GuiContainer{
} }
@Override @Override
public void drawButton(Minecraft mc, int x, int y){ public void func_191745_a(Minecraft mc, int x, int y, float f){
if(this.visible){ if(this.visible){
mc.getTextureManager().bindTexture(this.resLoc); mc.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
@ -295,7 +295,7 @@ public class GuiInputter extends GuiContainer{
} }
@Override @Override
public void drawButton(Minecraft mc, int x, int y){ public void func_191745_a(Minecraft mc, int x, int y, float f){
if(this.visible){ if(this.visible){
mc.getTextureManager().bindTexture(this.resLoc); mc.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

View file

@ -19,7 +19,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -31,7 +30,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiLaserRelayItemWhitelist extends GuiContainer{ public class GuiLaserRelayItemWhitelist extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_laser_relay_item_whitelist"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_laser_relay_item_whitelist");
private final TileEntityLaserRelayItemWhitelist tile; private final TileEntityLaserRelayItemWhitelist tile;

View file

@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityMiner;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -25,7 +24,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiMiner extends GuiContainer{ public class GuiMiner extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityMiner miner; private final TileEntityMiner miner;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerOilGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiOilGenerator extends GuiContainer{ public class GuiOilGenerator extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_oil_generator"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_oil_generator");
private final TileEntityOilGenerator generator; private final TileEntityOilGenerator generator;

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -31,7 +30,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiPhantomPlacer extends GuiContainer{ public class GuiPhantomPlacer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
private final TileEntityPhantomPlacer placer; private final TileEntityPhantomPlacer placer;

View file

@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -24,7 +23,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiRangedCollector extends GuiContainer{ public class GuiRangedCollector extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_ranged_collector"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_ranged_collector");
private final TileEntityRangedCollector collector; private final TileEntityRangedCollector collector;

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerRepairer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemRepairer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiRepairer extends GuiContainer{ public class GuiRepairer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_repairer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_repairer");
private final TileEntityItemRepairer tileRepairer; private final TileEntityItemRepairer tileRepairer;

View file

@ -20,7 +20,6 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -33,7 +32,7 @@ import org.lwjgl.input.Keyboard;
import java.io.IOException; import java.io.IOException;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiSmileyCloud extends GuiContainer{ public class GuiSmileyCloud extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_smiley_cloud"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_smiley_cloud");

View file

@ -0,0 +1,28 @@
/*
* This file ("GuiWtfMojang.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.inventory.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.Container;
public abstract class GuiWtfMojang extends GuiContainer{
public GuiWtfMojang(Container inventorySlotsIn){
super(inventorySlotsIn);
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks){
this.drawDefaultBackground();
super.drawScreen(mouseX, mouseY, partialTicks);
this.func_191948_b(mouseX, mouseY);
}
}

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -26,7 +25,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiXPSolidifier extends GuiContainer{ public class GuiXPSolidifier extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_xp_solidifier"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_xp_solidifier");
private final TileEntityXPSolidifier solidifier; private final TileEntityXPSolidifier solidifier;

View file

@ -42,7 +42,7 @@ public class TexturedButton extends GuiButton{
} }
@Override @Override
public void drawButton(Minecraft minecraft, int x, int y){ public void func_191745_a(Minecraft minecraft, int x, int y, float f){
if(this.visible){ if(this.visible){
minecraft.getTextureManager().bindTexture(this.resLoc); minecraft.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler.GuiTypes;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings;
import de.ellpeck.actuallyadditions.mod.util.*; import de.ellpeck.actuallyadditions.mod.util.*;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
@ -35,6 +36,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import javax.annotation.Nullable;
import java.util.List; import java.util.List;
public class ItemBag extends ItemBase{ public class ItemBag extends ItemBase{
@ -52,7 +54,7 @@ public class ItemBag extends ItemBase{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){ public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
ItemStackHandlerCustom inv = new ItemStackHandlerCustom(ContainerBag.getSlotAmount(this.isVoid)); ItemStackHandlerCustom inv = new ItemStackHandlerCustom(ContainerBag.getSlotAmount(this.isVoid));
ItemDrill.loadSlotsFromNBT(inv, stack); ItemDrill.loadSlotsFromNBT(inv, stack);
@ -64,7 +66,7 @@ public class ItemBag extends ItemBase{
slotsFilled++; slotsFilled++;
} }
} }
tooltip.add(TextFormatting.ITALIC.toString()+String.format("%d/%d %s", slotsFilled, slotsTotal, StringUtil.localize("item."+ModUtil.MOD_ID+".item_bag.storage"))); tooltip.add(TextFormatting.ITALIC+String.format("%d/%d %s", slotsFilled, slotsTotal, StringUtil.localize("item."+ModUtil.MOD_ID+".item_bag.storage")));
} }
@SubscribeEvent @SubscribeEvent

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil; import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil;
import net.darkhax.tesla.api.ITeslaConsumer; import net.darkhax.tesla.api.ITeslaConsumer;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
@ -89,8 +90,8 @@ public class ItemBattery extends ItemEnergy{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced){
super.addInformation(stack, player, list, bool); super.addInformation(stack, playerIn, list, advanced);
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".battery."+(ItemUtil.isEnabled(stack) ? "discharge" : "noDischarge"))); list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".battery."+(ItemUtil.isEnabled(stack) ? "discharge" : "noDischarge")));
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".battery.changeMode")); list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".battery.changeMode"));
} }

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements;
import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay;
import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
@ -25,6 +24,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -39,6 +39,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import java.util.List; import java.util.List;
public class ItemBooklet extends ItemBase implements IHudDisplay{ public class ItemBooklet extends ItemBase implements IHudDisplay{
@ -77,23 +78,22 @@ public class ItemBooklet extends ItemBase implements IHudDisplay{
player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BOOK.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ); player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.BOOK.ordinal(), world, (int)player.posX, (int)player.posY, (int)player.posZ);
if(!world.isRemote){ if(!world.isRemote){
TheAchievements.OPEN_BOOKLET.get(player); //TheAchievements.OPEN_BOOKLET.get(player);
TheAchievements.OPEN_BOOKLET_MILESTONE.get(player); //TheAchievements.OPEN_BOOKLET_MILESTONE.get(player);
} }
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand)); return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc")); tooltip.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc"));
for(int i = 1; i <= 4; i++){ for(int i = 1; i <= 4; i++){
String format = i == 4 ? TextFormatting.GOLD.toString()+TextFormatting.ITALIC : TextFormatting.RESET.toString(); String format = i == 4 ? TextFormatting.GOLD.toString()+TextFormatting.ITALIC : TextFormatting.RESET.toString();
list.add(format+StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".sub."+i)); tooltip.add(format+StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".sub."+i));
} }
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return EnumRarity.EPIC; return EnumRarity.EPIC;

View file

@ -17,8 +17,8 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.init.MobEffects; import net.minecraft.init.MobEffects;
import net.minecraft.item.EnumAction; import net.minecraft.item.EnumAction;
@ -31,6 +31,7 @@ import net.minecraft.util.StringUtils;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Loader;
import javax.annotation.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -112,19 +113,18 @@ public class ItemCoffee extends ItemFoodBase{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack); PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack);
if(effects != null){ if(effects != null){
for(PotionEffect effect : effects){ for(PotionEffect effect : effects){
list.add(StringUtil.localize(effect.getEffectName())+" "+(effect.getAmplifier()+1)+", "+StringUtils.ticksToElapsedTime(effect.getDuration()*20)); tooltip.add(StringUtil.localize(effect.getEffectName())+" "+(effect.getAmplifier()+1)+", "+StringUtils.ticksToElapsedTime(effect.getDuration()*20));
} }
} }
else{ else{
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".coffeeCup.noEffect")); tooltip.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".coffeeCup.noEffect"));
} }
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return EnumRarity.RARE; return EnumRarity.RARE;

View file

@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -57,9 +56,11 @@ public class ItemCrystal extends ItemBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){ if(this.func_194125_a(tab)){
list.add(new ItemStack(this, 1, j)); for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
list.add(new ItemStack(this, 1, j));
}
} }
} }

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
@ -50,9 +49,11 @@ public class ItemCrystalShard extends ItemBase implements IColorProvidingItem{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){ if(this.func_194125_a(tab)){
list.add(new ItemStack(this, 1, j)); for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
list.add(new ItemStack(this, 1, j));
}
} }
} }

View file

@ -32,7 +32,6 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Enchantments; import net.minecraft.init.Enchantments;
import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.*; import net.minecraft.util.*;
@ -329,9 +328,11 @@ public class ItemDrill extends ItemEnergy{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, NonNullList list){ public void getSubItems(CreativeTabs tabs, NonNullList list){
for(int i = 0; i < 16; i++){ if(this.func_194125_a(tabs)){
this.addDrillStack(list, i); for(int i = 0; i < 16; i++){
this.addDrillStack(list, i);
}
} }
} }

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
@ -52,9 +51,11 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_DUSTS.length; j++){ if(this.func_194125_a(tab)){
list.add(new ItemStack(this, 1, j)); for(int j = 0; j < ALL_DUSTS.length; j++){
list.add(new ItemStack(this, 1, j));
}
} }
} }

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -232,8 +233,8 @@ public class ItemFillingWand extends ItemEnergy{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced){
super.addInformation(stack, player, list, bool); super.addInformation(stack, playerIn, tooltip, advanced);
String display = StringUtil.localize("tooltip."+ModUtil.MOD_ID+".item_filling_wand.selectedBlock.none"); String display = StringUtil.localize("tooltip."+ModUtil.MOD_ID+".item_filling_wand.selectedBlock.none");
@ -246,7 +247,7 @@ public class ItemFillingWand extends ItemEnergy{
} }
} }
list.add(String.format("%s: %s", StringUtil.localize("tooltip."+ModUtil.MOD_ID+".item_filling_wand.selectedBlock"), display)); tooltip.add(String.format("%s: %s", StringUtil.localize("tooltip."+ModUtil.MOD_ID+".item_filling_wand.selectedBlock"), display));
} }
@Override @Override

View file

@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerCustom; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerCustom;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -47,7 +48,9 @@ public class ItemFilter extends ItemBase{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){ public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced){
super.addInformation(stack, playerIn, tooltip, advanced);
ItemStackHandlerCustom inv = new ItemStackHandlerCustom(ContainerFilter.SLOT_AMOUNT); ItemStackHandlerCustom inv = new ItemStackHandlerCustom(ContainerFilter.SLOT_AMOUNT);
ItemDrill.loadSlotsFromNBT(inv, stack); ItemDrill.loadSlotsFromNBT(inv, stack);
for(int i = 0; i < inv.getSlots(); i++){ for(int i = 0; i < inv.getSlots(); i++){
@ -55,6 +58,5 @@ public class ItemFilter extends ItemBase{
if(StackUtil.isValid(slot)){ if(StackUtil.isValid(slot)){
tooltip.add(slot.getItem().getItemStackDisplayName(slot)); tooltip.add(slot.getItem().getItemStackDisplayName(slot));
} }
} }}
}
} }

View file

@ -22,7 +22,6 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumAction; import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -95,9 +94,11 @@ public class ItemFoods extends ItemFoodBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_FOODS.length; j++){ if(this.func_194125_a(tab)){
list.add(new ItemStack(this, 1, j)); for(int j = 0; j < ALL_FOODS.length; j++){
list.add(new ItemStack(this, 1, j));
}
} }
} }

View file

@ -22,7 +22,6 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
@ -61,9 +60,11 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_JAMS.length; j++){ if(this.func_194125_a(tab)){
list.add(new ItemStack(this, 1, j)); for(int j = 0; j < ALL_JAMS.length; j++){
list.add(new ItemStack(this, 1, j));
}
} }
} }

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -26,8 +27,6 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
@ -87,8 +86,7 @@ public class ItemLaserWrench extends ItemBase{
} }
@Override @Override
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced){
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
BlockPos coords = ItemPhantomConnector.getStoredPosition(stack); BlockPos coords = ItemPhantomConnector.getStoredPosition(stack);
if(coords != null){ if(coords != null){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".boundTo.desc")+":"); list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".boundTo.desc")+":");

View file

@ -20,7 +20,6 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@ -57,10 +56,12 @@ public class ItemMisc extends ItemBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_MISC_ITEMS.length; j++){ if(this.func_194125_a(tab)){
if(j != TheMiscItems.YOUTUBE_ICON.ordinal()){ for(int j = 0; j < ALL_MISC_ITEMS.length; j++){
list.add(new ItemStack(this, 1, j)); if(j != TheMiscItems.YOUTUBE_ICON.ordinal()){
list.add(new ItemStack(this, 1, j));
}
} }
} }
} }

View file

@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -28,9 +29,8 @@ import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import java.util.List; import java.util.List;
public class ItemPhantomConnector extends ItemBase{ public class ItemPhantomConnector extends ItemBase{
@ -120,8 +120,7 @@ public class ItemPhantomConnector extends ItemBase{
} }
@Override @Override
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> list, ITooltipFlag advanced){
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
BlockPos coords = getStoredPosition(stack); BlockPos coords = getStoredPosition(stack);
if(coords != null){ if(coords != null){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".boundTo.desc")+":"); list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".boundTo.desc")+":");
@ -132,7 +131,6 @@ public class ItemPhantomConnector extends ItemBase{
} }
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return EnumRarity.EPIC; return EnumRarity.EPIC;

View file

@ -10,12 +10,12 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -28,9 +28,8 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -54,7 +53,7 @@ public class ItemPlayerProbe extends ItemBase{
ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name"); ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name");
entity.sendMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.disconnect.1")); entity.sendMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.disconnect.1"));
player.sendMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.notice")); player.sendMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.notice"));
TheAchievements.GET_UNPROBED.get(player); //TheAchievements.GET_UNPROBED.get(player);
} }
} }
else{ else{
@ -115,12 +114,11 @@ public class ItemPlayerProbe extends ItemBase{
} }
@Override @Override
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
if(stack.hasTagCompound()){ if(stack.hasTagCompound()){
String name = stack.getTagCompound().getString("Name"); String name = stack.getTagCompound().getString("Name");
if(name != null){ if(name != null){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".playerProbe.probing")+": "+name); tooltip.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".playerProbe.probing")+": "+name);
} }
} }
} }

View file

@ -19,12 +19,12 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
@ -37,6 +37,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@ -144,13 +145,15 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){ public void getSubItems(CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_RINGS.length; j++){ if(this.func_194125_a(tab)){
list.add(new ItemStack(this, 1, j)); for(int j = 0; j < ALL_RINGS.length; j++){
list.add(new ItemStack(this, 1, j));
ItemStack full = new ItemStack(this, 1, j); ItemStack full = new ItemStack(this, 1, j);
setStoredBlaze(full, MAX_BLAZE); setStoredBlaze(full, MAX_BLAZE);
list.add(full); list.add(full);
}
} }
} }
@ -237,9 +240,8 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){ public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
super.addInformation(stack, playerIn, tooltip, advanced); super.addInformation(stack, playerIn, tooltip, advanced);
tooltip.add(String.format("%d/%d %s", getStoredBlaze(stack), MAX_BLAZE, StringUtil.localize("item."+ModUtil.MOD_ID+".item_misc_ring.storage")));
tooltip.add(String.format("%d/%d %s", this.getStoredBlaze(stack), MAX_BLAZE, StringUtil.localize("item."+ModUtil.MOD_ID+".item_misc_ring.storage")));
} }
} }

View file

@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -36,8 +37,6 @@ import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
@ -147,8 +146,7 @@ public class ItemSpawnerChanger extends ItemBase{
} }
@Override @Override
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced){
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
String entity = this.getStoredEntity(stack); String entity = this.getStoredEntity(stack);
if(entity != null){ if(entity != null){
list.add("Entity: "+entity); list.add("Entity: "+entity);

View file

@ -15,14 +15,15 @@ import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.compat.TeslaForgeUnitsWrapper; import de.ellpeck.actuallyadditions.mod.util.compat.TeslaForgeUnitsWrapper;
import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil; import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.CapabilityEnergy;
@ -54,12 +55,12 @@ public abstract class ItemEnergy extends ItemBase{
} }
@Override @Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){ public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced){
if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){ if(stack.hasCapability(CapabilityEnergy.ENERGY, null)){
IEnergyStorage storage = stack.getCapability(CapabilityEnergy.ENERGY, null); IEnergyStorage storage = stack.getCapability(CapabilityEnergy.ENERGY, null);
if(storage != null){ if(storage != null){
NumberFormat format = NumberFormat.getInstance(); NumberFormat format = NumberFormat.getInstance();
list.add(String.format("%s/%s Crystal Flux", format.format(storage.getEnergyStored()), format.format(storage.getMaxEnergyStored()))); tooltip.add(String.format("%s/%s Crystal Flux", format.format(storage.getEnergyStored()), format.format(storage.getMaxEnergyStored())));
} }
} }
} }
@ -72,19 +73,21 @@ public abstract class ItemEnergy extends ItemBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, NonNullList list){ public void getSubItems(CreativeTabs tabs, NonNullList list){
ItemStack stackFull = new ItemStack(this); if(this.func_194125_a(tabs)){
if(stackFull.hasCapability(CapabilityEnergy.ENERGY, null)){ ItemStack stackFull = new ItemStack(this);
IEnergyStorage storage = stackFull.getCapability(CapabilityEnergy.ENERGY, null); if(stackFull.hasCapability(CapabilityEnergy.ENERGY, null)){
if(storage != null){ IEnergyStorage storage = stackFull.getCapability(CapabilityEnergy.ENERGY, null);
this.setEnergy(stackFull, storage.getMaxEnergyStored()); if(storage != null){
list.add(stackFull); this.setEnergy(stackFull, storage.getMaxEnergyStored());
list.add(stackFull);
}
} }
}
ItemStack stackEmpty = new ItemStack(this); ItemStack stackEmpty = new ItemStack(this);
this.setEnergy(stackEmpty, 0); this.setEnergy(stackEmpty, 0);
list.add(stackEmpty); list.add(stackEmpty);
}
} }
@Override @Override

View file

@ -21,6 +21,7 @@ import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
@ -87,7 +88,7 @@ public class LensDisenchanting extends Lens{
} }
ItemUtil.removeEnchantment(newDisenchantStack, enchant); ItemUtil.removeEnchantment(newDisenchantStack, enchant);
Items.ENCHANTED_BOOK.addEnchantment(newBookStack, new EnchantmentData(enchant, level)); ItemEnchantedBook.addEnchantment(newBookStack, new EnchantmentData(enchant, level));
EntityItem disenchanted = new EntityItem(toDisenchant.getEntityWorld(), toDisenchant.posX, toDisenchant.posY, toDisenchant.posZ, newDisenchantStack); EntityItem disenchanted = new EntityItem(toDisenchant.getEntityWorld(), toDisenchant.posX, toDisenchant.posY, toDisenchant.posZ, newDisenchantStack);
EntityItem newBook = new EntityItem(book.getEntityWorld(), book.posX, book.posY, book.posZ, newBookStack); EntityItem newBook = new EntityItem(book.getEntityWorld(), book.posX, book.posY, book.posZ, newBookStack);

View file

@ -53,7 +53,7 @@ public abstract class RecipeWrapperWithButton extends BlankRecipeWrapper{
@Override @Override
public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){ public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY){
this.theButton.drawButton(minecraft, mouseX, mouseY); this.theButton.func_191745_a(minecraft, mouseX, mouseY, 0F);
} }
@Nullable @Nullable

View file

@ -10,18 +10,19 @@
package de.ellpeck.actuallyadditions.mod.jei.booklet; package de.ellpeck.actuallyadditions.mod.jei.booklet;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import mezz.jei.api.IGuiHelper; import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
public class BookletRecipeCategory extends BlankRecipeCategory<BookletRecipeWrapper>{ public class BookletRecipeCategory implements IRecipeCategory<BookletRecipeWrapper>{
public static final String NAME = "actuallyadditions.booklet"; public static final String NAME = "actuallyadditions.booklet";
@ -42,6 +43,11 @@ public class BookletRecipeCategory extends BlankRecipeCategory<BookletRecipeWrap
return StringUtil.localize("container.nei."+NAME+".name"); return StringUtil.localize("container.nei."+NAME+".name");
} }
@Override
public String getModName(){
return ModUtil.NAME;
}
@Override @Override
public IDrawable getBackground(){ public IDrawable getBackground(){

View file

@ -11,14 +11,15 @@
package de.ellpeck.actuallyadditions.mod.jei.coffee; package de.ellpeck.actuallyadditions.mod.jei.coffee;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import mezz.jei.api.IGuiHelper; import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeCategory;
public class CoffeeMachineRecipeCategory extends BlankRecipeCategory<CoffeeMachineRecipeWrapper>{ public class CoffeeMachineRecipeCategory implements IRecipeCategory<CoffeeMachineRecipeWrapper>{
public static final String NAME = "actuallyadditions.coffee"; public static final String NAME = "actuallyadditions.coffee";
@ -38,6 +39,11 @@ public class CoffeeMachineRecipeCategory extends BlankRecipeCategory<CoffeeMachi
return StringUtil.localize("container.nei."+NAME+".name"); return StringUtil.localize("container.nei."+NAME+".name");
} }
@Override
public String getModName(){
return ModUtil.NAME;
}
@Override @Override
public IDrawable getBackground(){ public IDrawable getBackground(){
return this.background; return this.background;

View file

@ -11,15 +11,16 @@
package de.ellpeck.actuallyadditions.mod.jei.crusher; package de.ellpeck.actuallyadditions.mod.jei.crusher;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import mezz.jei.api.IGuiHelper; import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable; import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients; import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.BlankRecipeCategory; import mezz.jei.api.recipe.IRecipeCategory;
public class CrusherRecipeCategory extends BlankRecipeCategory<CrusherRecipeWrapper>{ public class CrusherRecipeCategory implements IRecipeCategory<CrusherRecipeWrapper>{
public static final String NAME = "actuallyadditions.crushing"; public static final String NAME = "actuallyadditions.crushing";
@ -39,6 +40,11 @@ public class CrusherRecipeCategory extends BlankRecipeCategory<CrusherRecipeWrap
return StringUtil.localize("container.nei."+NAME+".name"); return StringUtil.localize("container.nei."+NAME+".name");
} }
@Override
public String getModName(){
return ModUtil.NAME;
}
@Override @Override
public IDrawable getBackground(){ public IDrawable getBackground(){
return this.background; return this.background;

Some files were not shown because too many files have changed in this diff Show more