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

View file

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

View file

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

View file

@ -8,6 +8,8 @@
* © 2015-2017 Ellpeck
*/
//TODO Fix achievements
/*
package de.ellpeck.actuallyadditions.mod.achievement;
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.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
@ -191,17 +192,19 @@ public class BlockAtomicReconstructor extends BlockContainerBase implements IHud
}
@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();
if(this.lastSysTime+3000 < sysTime){
this.lastSysTime = sysTime;
this.toPick1 = player.world.rand.nextInt(NAME_FLAVOR_AMOUNTS_1)+1;
this.toPick2 = player.world.rand.nextInt(NAME_FLAVOR_AMOUNTS_2)+1;
if(world != null){
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.";
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
@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++){
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.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
@ -50,9 +49,9 @@ public class BlockCrystal extends BlockBase{
@Override
@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++){
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.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@ -138,7 +139,7 @@ public class BlockFurnaceDouble extends BlockContainerBase{
}
@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"));
}
}

View file

@ -23,6 +23,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@ -175,7 +176,7 @@ public class BlockGiantChest extends BlockContainerBase{
}
@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;
if(type == 2){
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.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
@ -47,9 +46,9 @@ public class BlockMisc extends BlockBase{
@Override
@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++){
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.achievement.TheAchievements;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.tile.TileEntitySmileyCloud;
@ -74,7 +73,7 @@ public class BlockSmileyCloud extends BlockContainerBase{
if(tile instanceof TileEntitySmileyCloud){
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;

View file

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

View file

@ -19,7 +19,6 @@ import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList;
@ -124,8 +123,8 @@ public class BlockWallAA extends BlockBase{
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, NonNullList list){
list.add(new ItemStack(item, 1, 0));
public void getSubBlocks(CreativeTabs tab, NonNullList list){
list.add(new ItemStack(this, 1, 0));
}
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.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList;
@ -67,9 +66,9 @@ public class BlockWildPlant extends BlockBushBase{
@Override
@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++){
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{
@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)){
return;
}

View file

@ -28,7 +28,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderCompost extends TileEntitySpecialRenderer{
@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){
TileEntityCompost compost = (TileEntityCompost)te;
ItemStack slot = compost.slots.getStackInSlot(0);

View file

@ -27,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderDisplayStand extends TileEntitySpecialRenderer{
@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)){
return;
}

View file

@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderEmpowerer extends TileEntitySpecialRenderer{
@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)){
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};
@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){
TileEntityLaserRelay relay = (TileEntityLaserRelay)tile;
boolean hasInvis = false;

View file

@ -27,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public class RenderReconstructorLens extends TileEntitySpecialRenderer{
@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)){
return;
}

View file

@ -32,7 +32,7 @@ import java.util.Locale;
public class RenderSmileyCloud extends TileEntitySpecialRenderer{
@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){
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
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){
minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC_GADGETS);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);

View file

@ -34,7 +34,7 @@ public class EntryButton extends GuiButton{
}
@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){
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;

View file

@ -27,8 +27,8 @@ public class TrialsButton extends TexturedButton{
}
@Override
public void drawButton(Minecraft minecraft, int x, int y){
super.drawButton(minecraft, x, y);
public void func_191745_a(Minecraft minecraft, int x, int y, float f){
super.func_191745_a(minecraft, x, y, f);
if(this.visible){
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.StringUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fluids.FluidStack;
@ -56,7 +57,7 @@ public class BookletEntry implements IBookletEntry{
if(!items.isEmpty()){
for(ItemStack stack : items){
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){
if(strg != null && strg.toLowerCase(Locale.ROOT).contains(searchBarText)){
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.mod.booklet.InitBooklet;
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.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave;
@ -35,6 +34,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
//TODO Fix achievement button
@SideOnly(Side.CLIENT)
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"
};
private TexturedButton achievementButton;
//private TexturedButton achievementButton;
private TexturedButton configButton;
private GuiButton tutorialButton;
@ -205,8 +205,8 @@ public class GuiMainPage extends GuiBooklet{
List<String> achievementText = new ArrayList<String>();
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));
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.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);
PlayerSave data = PlayerData.getDataFromPlayer(this.mc.player);
if(!data.didBookTutorial){
@ -216,7 +216,7 @@ public class GuiMainPage extends GuiBooklet{
this.buttonList.add(this.tutorialButton);
this.configButton.visible = false;
this.achievementButton.visible = false;
//this.achievementButton.visible = false;
}
for(int i = 0; i < BUTTONS_PER_PAGE; i++){
@ -242,10 +242,10 @@ public class GuiMainPage extends GuiBooklet{
}
}
}
else if(button == this.achievementButton){
GuiScreen achievements = new GuiAAAchievements(this, this.mc.player.getStatFileWriter());
/*else if(button == this.achievementButton){
GuiScreen achievements = new GuiAAAchievements(this, this.mc.player.getStatFileWriter());
this.mc.displayGuiScreen(achievements);
}
}*/
else if(button == this.configButton){
GuiScreen config = new GuiConfiguration(this);
this.mc.displayGuiScreen(config);
@ -261,7 +261,7 @@ public class GuiMainPage extends GuiBooklet{
this.tutorialButton.visible = false;
this.configButton.visible = true;
this.achievementButton.visible = true;
//this.achievementButton.visible = true;
PlayerSave data = PlayerData.getDataFromPlayer(this.mc.player);
data.didBookTutorial = true;

View file

@ -8,6 +8,8 @@
* © 2015-2017 Ellpeck
*/
//TODO Achievement GUI?
/*
package de.ellpeck.actuallyadditions.mod.booklet.misc;
import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements;
@ -24,7 +26,7 @@ import java.io.IOException;
/**
* (Partially excerpted from Botania by Vazkii with permission, thanks!)
*/
*
@SideOnly(Side.CLIENT)
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 net.minecraft.client.Minecraft;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.util.ITooltipFlag.TooltipFlags;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.TextFormatting;
@ -58,7 +59,7 @@ public class ItemDisplay{
boolean flagBefore = mc.fontRendererObj.getUnicodeFlag();
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){
if(k == 0){

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.item.crafting.ShapedRecipes;
import net.minecraft.item.crafting.ShapelessRecipes;
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){
ItemStack[] stacks = new ItemStack[9];
Ingredient[] ings = new Ingredient[9];
int width = 3;
int height = 3;
@ -132,13 +133,13 @@ public class PageCrafting extends BookletPage{
ShapedRecipes shaped = (ShapedRecipes)recipe;
width = shaped.recipeWidth;
height = shaped.recipeHeight;
stacks = shaped.recipeItems;
ings = shaped.recipeItems.toArray(new Ingredient[shaped.recipeItems.size()]);
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedRecipe";
}
else if(recipe instanceof ShapelessRecipes){
ShapelessRecipes shapeless = (ShapelessRecipes)recipe;
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";
}
@ -151,34 +152,36 @@ public class PageCrafting extends BookletPage{
catch(Exception 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++){
Object input = shaped.getInput()[i];
if(input != null){
stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((List<ItemStack>)input).isEmpty() ? StackUtil.getNull() : ((List<ItemStack>)input).get(0));
}
for(int i = 0; i < shaped.func_192400_c().size(); i++){
ings[i] = shaped.func_192400_c().get(i);
}
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapedOreRecipe";
}
else if(recipe instanceof ShapelessOreRecipe){
ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe;
for(int i = 0; i < shapeless.getInput().size(); i++){
Object input = shapeless.getInput().get(i);
stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((List<ItemStack>)input).isEmpty() ? StackUtil.getNull() : ((List<ItemStack>)input).get(0));
for(int i = 0; i < shapeless.func_192400_c().size(); i++){
ings[i] = shapeless.func_192400_c().get(i);
}
this.recipeTypeLocKey = "booklet."+ModUtil.MOD_ID+".shapelessOreRecipe";
}
for(int x = 0; x < width; x++){
for(int y = 0; y < height; y++){
ItemStack stack = stacks[y*width+x];
if(StackUtil.isValid(stack)){
ItemStack copy = stack.copy();
copy = StackUtil.setStackSize(copy, 1);
if(copy.getItemDamage() == Util.WILDCARD){
copy.setItemDamage(0);
}
Ingredient ing = ings[y*width+x];
if(ing != null){
ItemStack[] stacks = ing.func_193365_a();
if(stacks != null && stacks.length > 0){
ItemStack stack = stacks[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.metalists.TheCrystals;
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.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import net.minecraft.util.ResourceLocation;
public final class BlockCrafting{
@ -100,617 +100,617 @@ public final class BlockCrafting{
public static void init(){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockOilGenerator), new ItemStack(InitBlocks.blockOilGenerator)));
GameRegistry.addRecipe(new ShapelessOreRecipe(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.blockOilGenerator), new ItemStack(InitBlocks.blockOilGenerator));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer), new ItemStack(InitBlocks.blockFluidPlacer));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector), new ItemStack(InitBlocks.blockFluidCollector));
//Battery Box
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockBatteryBox),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockBatteryBox),
new ItemStack(InitBlocks.blockEnergizer),
new ItemStack(InitBlocks.blockEnervator),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal())));
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()));
recipeBatteryBox = RecipeUtil.lastIRecipe();
//Farmer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFarmer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFarmer),
"ISI", "SCS", "ISI",
'I', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.IRON.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();
//Empowerer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEmpowerer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEmpowerer),
" R ", " B ", "CDC",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'B', new ItemStack(InitItems.itemBatteryDouble, 1, Util.WILDCARD),
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'D', new ItemStack(InitBlocks.blockDisplayStand)));
'D', new ItemStack(InitBlocks.blockDisplayStand));
recipeEmpowerer = RecipeUtil.lastIRecipe();
//Tiny Torch
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
"C",
"W",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()),
'W', "stickWood"));
'W', "stickWood");
recipesTinyTorch[0] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTinyTorch, 2),
"C",
"W",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()),
'W', "stickWood"));
'W', "stickWood");
recipesTinyTorch[1] = RecipeUtil.lastIRecipe();
//Firework Box
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFireworkBox),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFireworkBox),
"GFG", "SAS", "CCC",
'G', new ItemStack(Items.GUNPOWDER),
'S', new ItemStack(Items.STICK),
'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'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();
//Shock Suppressor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockShockSuppressor),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockShockSuppressor),
"OAO", "ACA", "OAO",
'A', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.COAL.ordinal()),
'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();
//Display Stand
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDisplayStand),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDisplayStand),
" R ", "EEE", "GGG",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'E', new ItemStack(InitBlocks.blockTestifiBucksGreenWall),
'G', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)));
'G', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
recipeDisplayStand = RecipeUtil.lastIRecipe();
//Miner
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMiner),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockMiner),
"IRI", "RCR", "IDI",
'R', "blockRedstone",
'I', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.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();
//Quartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockQuartzWall, 6),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzWall, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockQuartzSlab, 6),
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzSlab, 6),
"XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockQuartzStair, 6),
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockQuartzStair, 6),
"X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())));
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
//PillarQuartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPillarQuartzWall, 6),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzWall, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPillarQuartzSlab, 6),
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzSlab, 6),
"XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPillarQuartzStair, 6),
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPillarQuartzStair, 6),
"X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal())));
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_PILLAR.ordinal()));
//ChiseledQuartz
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockChiseledQuartzWall, 6),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzWall, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockChiseledQuartzSlab, 6),
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzSlab, 6),
"XXX",
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockChiseledQuartzStair, 6),
'X', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ_CHISELED.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockChiseledQuartzStair, 6),
"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
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteFence, 6),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteFence, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteSlab, 6),
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteSlab, 6),
"XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteStairs, 6),
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksWhiteStairs, 6),
"X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall)));
'X', new ItemStack(InitBlocks.blockTestifiBucksWhiteWall));
//Green Ethetic Blocks
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenFence, 6),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenFence, 6),
"XXX", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenSlab, 6),
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenSlab, 6),
"XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall)));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenStairs, 6),
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockTestifiBucksGreenStairs, 6),
"X ", "XX ", "XXX",
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall)));
'X', new ItemStack(InitBlocks.blockTestifiBucksGreenWall));
//Atomic Reconstructor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockAtomicReconstructor),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockAtomicReconstructor),
"IRI", "RCR", "IRI",
'R', "dustRedstone",
'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();
//Laser Relay
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelay, 4),
"OBO", "RCR", "OBO",
'B', new ItemStack(Blocks.REDSTONE_BLOCK),
'O', new ItemStack(Blocks.OBSIDIAN),
'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();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayAdvanced),
" I ", "XRX", " I ",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'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();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayExtreme),
" I ", "XRX", " I ",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'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();
//Whitelist Item Laser Relay
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockLaserRelayItemWhitelist),
new ItemStack(InitBlocks.blockLaserRelayItem),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.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();
//Item Interface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemViewer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemViewer),
"OBO", "RCR", "OBO",
'B', new ItemStack(Items.REDSTONE),
'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', "chestWood"));
'C', "chestWood");
recipeItemInterface = RecipeUtil.lastIRecipe();
//Hopping Item Interface
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockItemViewerHopping),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockItemViewerHopping),
new ItemStack(InitBlocks.blockItemViewer),
new ItemStack(Blocks.HOPPER)));
new ItemStack(Blocks.HOPPER));
recipeItemInterfaceHopping = RecipeUtil.lastIRecipe();
//Ranged Collector
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRangedCollector),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockRangedCollector),
" A ", "EHE", " C ",
'E', new ItemStack(Items.ENDER_PEARL),
'H', new ItemStack(Blocks.HOPPER),
'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();
//Directional Breaker
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDirectionalBreaker),
"BBB", " C ",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'B', new ItemStack(InitBlocks.blockBreaker)));
'B', new ItemStack(InitBlocks.blockBreaker));
recipeDirectionalBreaker = RecipeUtil.lastIRecipe();
//Smiley Cloud
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockSmileyCloud),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockSmileyCloud),
" W ", "WXW", " W ",
'W', new ItemStack(Blocks.WOOL, 1, Util.WILDCARD),
'X', new ItemStack(InitItems.itemSolidifiedExperience)));
'X', new ItemStack(InitItems.itemSolidifiedExperience));
recipeSmileyCloud = RecipeUtil.lastIRecipe();
//Compost
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCompost),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCompost),
"W W", "W W", "WCW",
'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();
//XP Solidifier
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockXPSolidifier),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockXPSolidifier),
"XXX", "DCD", "XXX",
'X', new ItemStack(InitItems.itemSolidifiedExperience),
'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();
//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",
'C', new ItemStack(Items.COAL, 1, 1));
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()));
//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",
'W', "plankWood",
'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();
//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",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'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();
//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",
'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()),
'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();
//Phantom Booster
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomBooster),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBooster),
"RDR", "DCD", "RDR",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.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();
//Coffee Machine
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoffeeMachine),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoffeeMachine),
" C ", " S ", "AMA",
'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.COAL.ordinal()),
'C', InitItems.itemCoffeeBean,
'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();
//Energizer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnergizer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnergizer),
"I I", "CAC", "I I",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.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();
//Enervator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockEnervator),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockEnervator),
" I ", "CAC", " I ",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.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();
//Lava Factory
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLavaFactoryController),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLavaFactoryController),
"SCS", "ISI", "LLL",
'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'I', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'L', Items.LAVA_BUCKET));
'L', Items.LAVA_BUCKET);
recipeLavaFactory = RecipeUtil.lastIRecipe();
//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",
'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();
//Canola Press
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCanolaPress),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCanolaPress),
"CHC", "CDC", "CRC",
'C', "cobblestone",
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.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();
//Fermenting Barrel
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFermentingBarrel),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFermentingBarrel),
"CHC", "CDC", "CRC",
'C', "logWood",
'H', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.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();
//Phantomface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomface),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomface),
" C ", "EBE", " S ",
'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'C', "chestWood",
'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();
//Player Interface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPlayerInterface),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlayerInterface),
"BCB", "EBE", "BSB",
'E', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(Items.SKULL, 1, 1),
'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();
//Phantom Placer
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomPlacer),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomPlacer),
InitBlocks.blockPlacer,
InitBlocks.blockPhantomface));
InitBlocks.blockPhantomface);
recipePhantomPlacer = RecipeUtil.lastIRecipe();
//Phantom Breaker
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockPhantomBreaker),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockPhantomBreaker),
InitBlocks.blockBreaker,
InitBlocks.blockPhantomface));
InitBlocks.blockPhantomface);
recipePhantomBreaker = RecipeUtil.lastIRecipe();
//Phantom Energyface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomEnergyface),
" R ", "RFR", " R ",
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'F', InitBlocks.blockPhantomface));
'F', InitBlocks.blockPhantomface);
recipeEnergyface = RecipeUtil.lastIRecipe();
//Phantom Redstoneface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomRedstoneface),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomRedstoneface),
"SRS", "RFR", "SRS",
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'S', new ItemStack(Items.REDSTONE),
'F', InitBlocks.blockPhantomface));
'F', InitBlocks.blockPhantomface);
recipePhantomRedstoneface = RecipeUtil.lastIRecipe();
//Phantom Liquiface
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPhantomLiquiface),
"RFR",
'R', Items.BUCKET,
'F', InitBlocks.blockPhantomface));
'F', InitBlocks.blockPhantomface);
recipeLiquiface = RecipeUtil.lastIRecipe();
//Liquid Placer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFluidPlacer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidPlacer),
"RFR",
'R', Items.BUCKET,
'F', InitBlocks.blockPlacer));
'F', InitBlocks.blockPlacer);
recipeLiquidPlacer = RecipeUtil.lastIRecipe();
//Liquid Breaker
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFluidCollector),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFluidCollector),
"RFR",
'R', Items.BUCKET,
'F', InitBlocks.blockBreaker));
'F', InitBlocks.blockBreaker);
recipeLiquidCollector = RecipeUtil.lastIRecipe();
//Oil Generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockOilGenerator),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockOilGenerator),
"CRC", "CBC", "CRC",
'C', "cobblestone",
'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();
//Bio Reactor
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBioReactor),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBioReactor),
"CRC", "CBC", "CRC",
'C', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.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();
//Coal Generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCoalGenerator),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCoalGenerator),
"CRC", "CBC", "CRC",
'C', "cobblestone",
'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();
//Leaf Generator
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLeafGenerator),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLeafGenerator),
"IEI", "GLG", "ICI",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'G', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'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();
//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",
'E', Items.ENDER_PEARL));
'E', Items.ENDER_PEARL);
recipeEnderPearlBlock = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.ENDER_PEARL, 4),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal())));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(Items.ENDER_PEARL, 4),
new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()));
//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",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeQuartzBlock = RecipeUtil.lastIRecipe();
//Fishing Net
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFishingNet),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFishingNet),
"SSS", "SDS", "SSS",
'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.ordinal()),
'S', Items.STRING));
'S', Items.STRING);
recipeFisher = RecipeUtil.lastIRecipe();
//Repairer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemRepairer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockItemRepairer),
"DID", "OCO", "DID",
'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.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();
//Solar Panel
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceSolar),
"IQI", "CDC", "IBI",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.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();
//Heat Collector
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockHeatCollector),
"BRB", "CDC", "BQB",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'R', new ItemStack(Items.REPEATER),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'L', new ItemStack(Items.LAVA_BUCKET),
'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();
//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', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeQuartzPillar = RecipeUtil.lastIRecipe();
//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', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal())));
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()));
recipeQuartzChiseled = RecipeUtil.lastIRecipe();
//Inputter
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockInputter),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockInputter),
"WWW", "CHC", "WWW",
'W', "plankWood",
'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();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitBlocks.blockInputterAdvanced),
InitBlocks.blockInputter,
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.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();
//Crusher
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinder),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinder),
"MFC", "DQD", "CFM",
'M', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'P', new ItemStack(Blocks.PISTON),
'F', new ItemStack(Items.FLINT)));
'F', new ItemStack(Items.FLINT));
recipeCrusher = RecipeUtil.lastIRecipe();
//Double Crusher
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinderDouble),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGrinderDouble),
"CDC", "RFR", "CDC",
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'R', InitBlocks.blockGrinder,
'F', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()),
'P', new ItemStack(Blocks.PISTON)));
'P', new ItemStack(Blocks.PISTON));
recipeDoubleCrusher = RecipeUtil.lastIRecipe();
//Double Furnace
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceDouble),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFurnaceDouble),
"PDC", "RFR", "CDP",
'C', "cobblestone",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'R', new ItemStack(Blocks.FURNACE),
'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();
//Feeder
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFeeder),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockFeeder),
"WCW", "DHD", "WCW",
'W', "plankWood",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'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();
//Giant Chest
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGiantChest),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGiantChest),
"CWC", "WDW", "CWC",
'C', "chestWood",
'D', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()),
'W', "plankWood"));
'W', "plankWood");
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",
'C', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()),
'D', new ItemStack(InitBlocks.blockGiantChest),
'W', "plankWood"));
'W', "plankWood");
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",
'C', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.COAL.ordinal()),
'D', new ItemStack(InitBlocks.blockGiantChestMedium),
'W', "plankWood"));
'W', "plankWood");
recipeCrateLarge = RecipeUtil.lastIRecipe();
//Greenhouse Glass
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 3),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass, 3),
"GSG", "SDS", "GSG",
'G', "blockGlass",
'D', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.LAPIS.ordinal()),
'S', "treeSapling"));
'S', "treeSapling");
recipeGlass = RecipeUtil.lastIRecipe();
//Placer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPlacer),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockPlacer),
"CCC", "CRP", "CCC",
'C', "cobblestone",
'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();
//Breaker
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBreaker),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockBreaker),
"CCC", "CRP", "CCC",
'C', "cobblestone",
'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();
//Dropper
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockDropper),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockDropper),
"CBC", "CDR", "CBC",
'B', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'C', "cobblestone",
'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();
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",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'G', "glowstone",
'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();
}
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
"XXX", "XLX", "XXX",
'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();
}

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.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public final class FoodCrafting{
@ -52,8 +51,8 @@ public final class FoodCrafting{
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal()), 1F);
//Bacon
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()),
knifeStack.copy(), new ItemStack(Items.COOKED_PORKCHOP)));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 3, TheFoods.BACON.ordinal()),
knifeStack.copy(), new ItemStack(Items.COOKED_PORKCHOP));
recipeBacon = RecipeUtil.lastIRecipe();
//Baguette
@ -61,116 +60,116 @@ public final class FoodCrafting{
TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F);
//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 ",
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'M', new ItemStack(Blocks.BROWN_MUSHROOM),
'C', "cropCarrot",
'F', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD),
'K', knifeStack.copy(),
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal())));
'H', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()));
recipePizza = RecipeUtil.lastIRecipe();
//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 ",
'T', new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()),
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
'K', knifeStack.copy(),
'B', new ItemStack(Items.COOKED_BEEF)));
'B', new ItemStack(Items.COOKED_BEEF));
recipeHamburger = RecipeUtil.lastIRecipe();
//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",
'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();
//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",
'P', new ItemStack(Items.PAPER),
'C', new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()),
'F', new ItemStack(Items.COOKED_BEEF, 1, Util.WILDCARD),
'B', new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()),
'K', knifeStack.copy()));
'K', knifeStack.copy());
recipeSubSandwich = RecipeUtil.lastIRecipe();
//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),
knifeStack.copy()));
knifeStack.copy());
recipeFrenchFry = RecipeUtil.lastIRecipe();
//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 ",
'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();
//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 ",
'I', new ItemStack(Items.COOKED_FISH, 1, Util.WILDCARD),
'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();
//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
recipeCheese = RecipeUtil.lastIRecipe();
//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', new ItemStack(Blocks.PUMPKIN),
'B', new ItemStack(Items.BOWL));
recipePumpkinStew = RecipeUtil.lastIRecipe();
//Carrot Juice
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knifeStack.copy()));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()),
new ItemStack(Items.GLASS_BOTTLE), "cropCarrot", knifeStack.copy());
recipeCarrotJuice = RecipeUtil.lastIRecipe();
//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 ",
'N', new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
'B', new ItemStack(Items.BOWL)));
'B', new ItemStack(Items.BOWL));
recipeSpaghetti = RecipeUtil.lastIRecipe();
//Noodle
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
"cropWheat", knifeStack.copy()));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()),
"cropWheat", knifeStack.copy());
recipeNoodle = RecipeUtil.lastIRecipe();
//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', new ItemStack(Items.DYE, 1, 3),
'M', new ItemStack(Items.MILK_BUCKET));
recipeChocolate = RecipeUtil.lastIRecipe();
//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",
'M', new ItemStack(Items.MILK_BUCKET),
'E', new ItemStack(Items.EGG),
'D', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()),
'S', new ItemStack(Items.SUGAR),
'C', new ItemStack(Items.DYE, 1, 3)));
'C', new ItemStack(Items.DYE, 1, 3));
recipeChocolateCake = RecipeUtil.lastIRecipe();
//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));
recipeToast = RecipeUtil.lastIRecipe();
//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();
}

View file

@ -21,8 +21,7 @@ import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.exu.RedOrchidFarmerB
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.RecipeSorter;
import net.minecraft.util.ResourceLocation;
public final class InitCrafting{
@ -53,14 +52,13 @@ public final class InitCrafting{
ActuallyAdditionsAPI.addFarmerBehavior(new EnderlillyFarmerBehavior());
ActuallyAdditionsAPI.addFarmerBehavior(new RedOrchidFarmerBehavior());
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+":recipeKeepDataShaped", RecipeKeepDataShaped.class, RecipeSorter.Category.SHAPED, "after:minecraft:shaped");
//RecipeSorter.register(ModUtil.MOD_ID+":recipeKeepDataShapeless", RecipeKeepDataShapeless.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
GameRegistry.addRecipe(new RecipePotionRingCharging());
RecipeSorter.register(ModUtil.MOD_ID+":recipePotionRingCharging", RecipePotionRingCharging.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
new RecipePotionRingCharging(new ResourceLocation(ModUtil.MOD_ID, "potion_ring_charging"));
//RecipeSorter.register(ModUtil.MOD_ID+":recipePotionRingCharging", RecipePotionRingCharging.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
GameRegistry.addRecipe(new RecipeBioMash());
RecipeSorter.register(ModUtil.MOD_ID+":recipeBioMash", RecipeBioMash.class, RecipeSorter.Category.SHAPELESS, "after:minecraft:shapeless");
new RecipeBioMash(new ResourceLocation(ModUtil.MOD_ID, "bio_mash"));
//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.items.InitItems;
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.Util;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.init.Blocks;
import net.minecraft.init.Enchantments;
import net.minecraft.init.Items;
import net.minecraft.init.PotionTypes;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.potion.PotionUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.ArrayList;
@ -98,106 +100,108 @@ public final class ItemCrafting{
public static void init(){
//Advanced Goggles
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemEngineerGogglesAdvanced),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGogglesAdvanced),
" R ", "IGI",
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(Blocks.IRON_BARS),
'G', new ItemStack(InitItems.itemEngineerGoggles)));
'G', new ItemStack(InitItems.itemEngineerGoggles));
recipeGogglesAdvanced = RecipeUtil.lastIRecipe();
//Goggles
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemEngineerGoggles),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemEngineerGoggles),
" R ", "IGI",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(Blocks.IRON_BARS),
'G', "blockGlass"));
'G', "blockGlass");
recipeGoggles = RecipeUtil.lastIRecipe();
//Laser Invis Upgrade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserUpgradeInvisibility, 4),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeInvisibility, 4),
"GGG", "RCR", "GGG",
'G', "blockGlassBlack",
'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();
//Laser Range Upgrade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserUpgradeRange, 2),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserUpgradeRange, 2),
"GGC", "RCR", "CGG",
'R', new ItemStack(Items.COMPASS),
'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();
//Filling Wand
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFillingWand),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFillingWand),
"IPI", "DCD", " B ",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'P', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'B', new ItemStack(InitItems.itemBatteryTriple)));
'B', new ItemStack(InitItems.itemBatteryTriple));
recipeFillingWand = RecipeUtil.lastIRecipe();
//Bag
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBag),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBag),
"SLS", "SCS", "LVL",
'S', new ItemStack(Items.STRING),
'L', new ItemStack(Items.LEATHER),
'C', "chestWood",
'V', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal())));
'V', new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()));
recipeBag = RecipeUtil.lastIRecipe();
//Void Bag
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemVoidBag),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemVoidBag),
new ItemStack(InitItems.itemBag),
new ItemStack(Items.ENDER_PEARL),
new ItemStack(Blocks.OBSIDIAN),
new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal())));
new ItemStack(InitBlocks.blockCrystal, 1, TheCrystals.COAL.ordinal()));
recipeVoidBag = RecipeUtil.lastIRecipe();
//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",
'G', "blockGlass",
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeLens = RecipeUtil.lastIRecipe();
//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();
//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();
//Clearing NBT Storage
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench));
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector));
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger));
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench));
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector));
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemSpawnerChanger), new ItemStack(InitItems.itemSpawnerChanger));
//Chest To Crate Upgrade
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade),
" W ", "WCW", " W ",
'C', new ItemStack(InitBlocks.blockGiantChest),
'W', "plankWood"));
'W', "plankWood");
recipeChestToCrateUpgrade = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSmallToMediumCrateUpgrade),
" W ", "WCW", " W ",
'C', new ItemStack(InitBlocks.blockGiantChestMedium),
'W', "plankWood"));
'W', "plankWood");
recipeSmallToMediumCrateUpgrade = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMediumToLargeCrateUpgrade),
" W ", "WCW", " W ",
'C', new ItemStack(InitBlocks.blockGiantChestLarge),
'W', "plankWood"));
'W', "plankWood");
recipeMediumToLargeCrateUpgrade = RecipeUtil.lastIRecipe();
//Disenchanting Lens
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),
crystal.copy(),
crystal.copy(),
@ -206,11 +210,11 @@ public final class ItemCrafting{
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();
//Mining Lens
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMiningLens),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMiningLens),
"DGI", "CLB", "QPE",
'D', "gemDiamond",
'G', "ingotGold",
@ -220,298 +224,298 @@ public final class ItemCrafting{
'B', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
'Q', "gemQuartz",
'P', "gemLapis",
'E', "gemEmerald"));
'E', "gemEmerald");
recipeMiningLens = RecipeUtil.lastIRecipe();
//Killer Lens
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(InitItems.itemDamageLens),
enchBook));
enchBook);
recipeLensMoreDeath = RecipeUtil.lastIRecipe();
//Filter
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFilter),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemFilter),
"III", "IQI", "III",
'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();
//Crate Keeper
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCrateKeeper),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrateKeeper),
"WIW", "IQI", "WIW",
'I', "ingotIron",
'W', "plankWood",
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()));
recipeCrateKeeper = RecipeUtil.lastIRecipe();
//Spawner Changer
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpawnerChanger),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemSpawnerChanger),
"MSM", "SDS", "MSM",
'M', new ItemStack(Items.MAGMA_CREAM),
'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();
//Laser Wrench
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserWrench),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLaserWrench),
"C ", " S ", " S",
'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();
//Rice Stuff
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.PAPER, 3),
RecipeHandler.addOreDictRecipe(new ItemStack(Items.PAPER, 3),
"R ", " R ", " R",
'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
'R', new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
" R ", "RBR", " R ",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
'B', Items.WATER_BUCKET));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
'B', Items.WATER_BUCKET);
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 4, TheMiscItems.RICE_SLIME.ordinal()),
" R ", "RBR", " R ",
'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RICE_DOUGH.ordinal()),
'B', new ItemStack(Items.POTIONITEM)));
'B', new ItemStack(Items.POTIONITEM));
//Leaf Blower
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlower),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlower),
" F", "IP", "IC",
'F', new ItemStack(Items.FLINT),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'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();
//Drill
ItemStack lightBlueDrill = new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal());
GameRegistry.addRecipe(new ShapedOreRecipe(lightBlueDrill.copy(),
RecipeHandler.addOreDictRecipe(lightBlueDrill.copy(),
"DDD", "CRC", "III",
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.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();
for(int i = 0; i < 16; i++){
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());
}
}
//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",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.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();
//Tele Staff
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemTeleStaff),
" FE", " S ", "SB ",
'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()),
'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.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();
//Drill Speed
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeed),
"ISI", "SRS", "ISI",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.SUGAR,
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal())));
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()));
recipeDrillSpeedI = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedII),
"ISI", "SCS", "ISI",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'S', Items.SUGAR,
'C', Items.CAKE));
'C', Items.CAKE);
recipeDrillSpeedII = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSpeedIII),
"ISI", "SFS", "ISI",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()),
'S', Items.SUGAR,
'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())));
'F', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeDrillSpeedIII = RecipeUtil.lastIRecipe();
//Drill Fortune
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortune),
"ISI", "SRS", "ISI",
'I', Blocks.GLOWSTONE,
'S', Items.REDSTONE,
'R', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal())));
'R', new ItemStack(InitBlocks.blockCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()));
recipeDrillFortuneI = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFortuneII),
"ISI", "SRS", "ISI",
'I', Blocks.GLOWSTONE,
'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();
//Drill Size
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeThreeByThree),
"DID", "ICI", "DID",
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.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();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeFiveByFive),
"DID", "ICI", "DID",
'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.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();
//Drill Silk Touch
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeSilkTouch),
"DSD", "SCS", "DSD",
'D', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.EMERALD.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();
//Drill Placing
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemDrillUpgradeBlockPlacing),
"CEC", "RAR", "CEC",
'C', "cobblestone",
'E', Items.PAPER,
'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();
//Battery
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemBattery),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemBattery),
" R ", "ICI", "III",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.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();
//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', new ItemStack(InitItems.itemBattery),
'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();
//Magnet Ring
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMagnetRing),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMagnetRing),
"RIB", "IOI", "BIR",
'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()),
'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()),
'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();
//Growth Ring
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemGrowthRing),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemGrowthRing),
"SIS", "IOI", "SIS",
'S', new ItemStack(Items.WHEAT_SEEDS),
'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();
//Water Ring
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWaterRemovalRing),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWaterRemovalRing),
"BIB", "IOI", "BIB",
'B', new ItemStack(Items.WATER_BUCKET),
'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();
//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', new ItemStack(InitItems.itemBatteryDouble),
'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();
//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', new ItemStack(InitItems.itemBatteryTriple),
'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();
//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', new ItemStack(InitItems.itemBatteryQuadruple),
'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();
//Bat Wings
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemWingsOfTheBats),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWingsOfTheBats),
"WNW", "WDW", "WNW",
'W', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.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();
//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 ",
'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();
//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', "stone",
'C', InitItems.itemCoffeeBean));
'C', InitItems.itemCoffeeBean);
recipeCup = RecipeUtil.lastIRecipe();
//Resonant Rice
if(!OreDictionary.getOres("nuggetEnderium", false).isEmpty()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemResonantRice),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER);
}
//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",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()),
'G', "nuggetGold"));
'G', "nuggetGold");
recipeCoilAdvanced = RecipeUtil.lastIRecipe();
//Advanced Leaf Blower
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced),
" F", "DP", "DC",
'F', new ItemStack(Items.FLINT),
'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()),
'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();
//Phantom Connector
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPhantomConnector),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPhantomConnector),
"YE", "EY", "S ",
'Y', Items.ENDER_EYE,
'E', Items.ENDER_PEARL,
'S', "stickWood"));
'S', "stickWood");
recipePhantomConnector = RecipeUtil.lastIRecipe();
//Player Probe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPlayerProbe),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemPlayerProbe),
"A A", "AIA", "RHR",
'A', new ItemStack(Blocks.IRON_BARS),
'R', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.REDSTONE.ordinal()),
'H', new ItemStack(Items.SKULL, 1, 1),
'I', new ItemStack(Items.IRON_HELMET)));
'I', new ItemStack(Items.IRON_HELMET));
recipePlayerProbe = RecipeUtil.lastIRecipe();
//Quartz
@ -519,38 +523,38 @@ public final class ItemCrafting{
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F);
//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_HANDLE.ordinal())));
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
recipeKnife = RecipeUtil.lastIRecipe();
//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(Items.SIGN)));
new ItemStack(Items.SIGN));
//Tiny Coal
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));
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));
recipeTinyChar = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.COAL),
RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL),
"CCC", "C C", "CCC",
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal())));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.COAL, 1, 1),
'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()));
RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL, 1, 1),
"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
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed),
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed),
new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
//Canola Seeds
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed),
RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
//Rings
@ -577,11 +581,11 @@ public final class ItemCrafting{
}
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",
'G', "ingotGold",
'I', "ingotIron",
'D', "dustGlowstone"));
'D', "dustGlowstone");
recipeRing = RecipeUtil.lastIRecipe();
addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal());
@ -600,10 +604,10 @@ public final class ItemCrafting{
ItemStack potion = new ItemStack(Items.POTIONITEM);
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());
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());
}
}

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.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public final class MiscCrafting{
@ -42,62 +41,62 @@ public final class MiscCrafting{
//Crystals
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",
'X', new ItemStack(InitItems.itemCrystal, 1, i)));
'X', new ItemStack(InitItems.itemCrystal, 1, i));
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();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i),
RecipeHandler.addOreDictRecipe(new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i),
"XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystalEmpowered, 1, i)));
'X', new ItemStack(InitItems.itemCrystalEmpowered, 1, i));
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();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCrystal, 1, i),
RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemCrystal, 1, i),
"XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystalShard, 1, i)));
'X', new ItemStack(InitItems.itemCrystalShard, 1, i));
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();
}
//Dough
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
"cropWheat", "cropWheat"));
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()),
"cropWheat", "cropWheat");
ItemCrafting.recipeDough = RecipeUtil.lastIRecipe();
//Rice Dough
GameRegistry.addRecipe(new ShapelessOreRecipe(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())));
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()));
ItemCrafting.recipeRiceDough = RecipeUtil.lastIRecipe();
//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', new ItemStack(Items.PAPER));
//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",
new ItemStack(Items.LEATHER)));
new ItemStack(Items.LEATHER));
ItemCrafting.recipeKnifeHandle = RecipeUtil.lastIRecipe();
//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', "ingotIron",
'F', new ItemStack(Items.FLINT)));
'F', new ItemStack(Items.FLINT));
ItemCrafting.recipeKnifeBlade = RecipeUtil.lastIRecipe();
//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.DRAGON_BREATH),
new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()),
new ItemStack(Items.PRISMARINE_SHARD)));
new ItemStack(Items.PRISMARINE_SHARD));
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.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
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
public boolean matches(InventoryCrafting inv, World world){
@ -79,8 +86,8 @@ public class RecipeBioMash implements IRecipe{
}
@Override
public int getRecipeSize(){
return 2;
public boolean func_194133_a(int p_194133_1_, int p_194133_2_){
return false;
}
@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.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapedOreRecipe;
public class RecipeKeepDataShaped extends ShapedOreRecipe{
private final ItemStack nbtCopyStack;
public RecipeKeepDataShaped(ItemStack result, ItemStack nbtCopyStack, Object... recipe){
super(result, recipe);
public RecipeKeepDataShaped(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe){
super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack;
RecipeHandler.addRecipe(group, this);
}
@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.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public class RecipeKeepDataShapeless extends ShapelessOreRecipe{
private final ItemStack nbtCopyStack;
public RecipeKeepDataShapeless(ItemStack result, ItemStack nbtCopyStack, Object... recipe){
super(result, recipe);
public RecipeKeepDataShapeless(ResourceLocation group, ItemStack result, ItemStack nbtCopyStack, Object... recipe){
super(group, result, recipe);
this.nbtCopyStack = nbtCopyStack;
RecipeHandler.addRecipe(group, this);
}
@Override
@ -39,5 +43,4 @@ public class RecipeKeepDataShapeless extends ShapelessOreRecipe{
}
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.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Items;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
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
public boolean matches(InventoryCrafting inv, World worldIn){
@ -77,8 +84,8 @@ public class RecipePotionRingCharging implements IRecipe{
}
@Override
public int getRecipeSize(){
return 0;
public boolean func_194133_a(int p_194133_1_, int p_194133_2_){
return false;
}
@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.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.crafting.RecipeHandler;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
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;
@ -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);
//Paxels
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.woodenPaxel),
RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.woodenPaxel),
new ItemStack(Items.WOODEN_AXE),
new ItemStack(Items.WOODEN_PICKAXE),
new ItemStack(Items.WOODEN_SHOVEL),
new ItemStack(Items.WOODEN_SWORD),
new ItemStack(Items.WOODEN_HOE)));
new ItemStack(Items.WOODEN_HOE));
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_PICKAXE),
new ItemStack(Items.STONE_SHOVEL),
new ItemStack(Items.STONE_SWORD),
new ItemStack(Items.STONE_HOE)));
new ItemStack(Items.STONE_HOE));
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_PICKAXE),
new ItemStack(Items.IRON_SHOVEL),
new ItemStack(Items.IRON_SWORD),
new ItemStack(Items.IRON_HOE)));
new ItemStack(Items.IRON_HOE));
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_PICKAXE),
new ItemStack(Items.GOLDEN_SHOVEL),
new ItemStack(Items.GOLDEN_SWORD),
new ItemStack(Items.GOLDEN_HOE)));
new ItemStack(Items.GOLDEN_HOE));
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_PICKAXE),
new ItemStack(Items.DIAMOND_SHOVEL),
new ItemStack(Items.DIAMOND_SWORD),
new ItemStack(Items.DIAMOND_HOE)));
new ItemStack(Items.DIAMOND_HOE));
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.itemPickaxeEmerald),
new ItemStack(InitItems.itemSwordEmerald),
new ItemStack(InitItems.itemShovelEmerald),
new ItemStack(InitItems.itemHoeEmerald)));
new ItemStack(InitItems.itemHoeEmerald));
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.itemPickaxeObsidian),
new ItemStack(InitItems.itemSwordObsidian),
new ItemStack(InitItems.itemShovelObsidian),
new ItemStack(InitItems.itemHoeObsidian)));
new ItemStack(InitItems.itemHoeObsidian));
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.itemPickaxeQuartz),
new ItemStack(InitItems.itemSwordQuartz),
new ItemStack(InitItems.itemShovelQuartz),
new ItemStack(InitItems.itemHoeQuartz)));
new ItemStack(InitItems.itemHoeQuartz));
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.itemPickaxeCrystalRed),
new ItemStack(InitItems.itemSwordCrystalRed),
new ItemStack(InitItems.itemShovelCrystalRed),
new ItemStack(InitItems.itemHoeCrystalRed)));
new ItemStack(InitItems.itemHoeCrystalRed));
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.itemPickaxeCrystalGreen),
new ItemStack(InitItems.itemSwordCrystalGreen),
new ItemStack(InitItems.itemShovelCrystalGreen),
new ItemStack(InitItems.itemHoeCrystalGreen)));
new ItemStack(InitItems.itemHoeCrystalGreen));
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.itemPickaxeCrystalBlue),
new ItemStack(InitItems.itemSwordCrystalBlue),
new ItemStack(InitItems.itemShovelCrystalBlue),
new ItemStack(InitItems.itemHoeCrystalBlue)));
new ItemStack(InitItems.itemHoeCrystalBlue));
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.itemPickaxeCrystalLightBlue),
new ItemStack(InitItems.itemSwordCrystalLightBlue),
new ItemStack(InitItems.itemShovelCrystalLightBlue),
new ItemStack(InitItems.itemHoeCrystalLightBlue)));
new ItemStack(InitItems.itemHoeCrystalLightBlue));
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.itemPickaxeCrystalBlack),
new ItemStack(InitItems.itemSwordCrystalBlack),
new ItemStack(InitItems.itemShovelCrystalBlack),
new ItemStack(InitItems.itemHoeCrystalBlack)));
new ItemStack(InitItems.itemHoeCrystalBlack));
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.itemPickaxeCrystalWhite),
new ItemStack(InitItems.itemSwordCrystalWhite),
new ItemStack(InitItems.itemShovelCrystalWhite),
new ItemStack(InitItems.itemHoeCrystalWhite)));
new ItemStack(InitItems.itemHoeCrystalWhite));
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){
//Pickaxe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(pickaxe),
RecipeHandler.addOreDictRecipe(new ItemStack(pickaxe),
"EEE", " S ", " S ",
'E', base,
'S', new ItemStack(Items.STICK)));
'S', new ItemStack(Items.STICK));
//Sword
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(sword),
RecipeHandler.addOreDictRecipe(new ItemStack(sword),
"E", "E", "S",
'E', base,
'S', new ItemStack(Items.STICK)));
'S', new ItemStack(Items.STICK));
//Axe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(axe),
RecipeHandler.addOreDictRecipe(new ItemStack(axe),
"EE", "ES", " S",
'E', base,
'S', new ItemStack(Items.STICK)));
'S', new ItemStack(Items.STICK));
//Shovel
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(shovel),
RecipeHandler.addOreDictRecipe(new ItemStack(shovel),
"E", "S", "S",
'E', base,
'S', new ItemStack(Items.STICK)));
'S', new ItemStack(Items.STICK));
//Hoe
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(hoe),
RecipeHandler.addOreDictRecipe(new ItemStack(hoe),
"EE", " S", " S",
'E', base,
'S', new ItemStack(Items.STICK)));
'S', new ItemStack(Items.STICK));
//Helm
GameRegistry.addRecipe(new ItemStack(helm),
RecipeHandler.addShapedRecipe(new ItemStack(helm),
"OOO", "O O",
'O', base);
//Chest
GameRegistry.addRecipe(new ItemStack(chest),
RecipeHandler.addShapedRecipe(new ItemStack(chest),
"O O", "OOO", "OOO",
'O', base);
//Legs
GameRegistry.addRecipe(new ItemStack(pants),
RecipeHandler.addShapedRecipe(new ItemStack(pants),
"OOO", "O O", "O O",
'O', base);
//Boots
GameRegistry.addRecipe(new ItemStack(boots),
RecipeHandler.addShapedRecipe(new ItemStack(boots),
"O O", "O O",
'O', base);
}

View file

@ -350,13 +350,13 @@ public class CreativeTab extends CreativeTabs{
public void add(Item item){
if(item != null){
item.getSubItems(item, INSTANCE, this.list);
item.getSubItems(INSTANCE, this.list);
}
}
public void add(Block block){
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.NBTTagList;
import net.minecraft.world.World;
import net.minecraft.world.WorldSavedData;
import net.minecraft.world.WorldServer;
import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.WorldSavedData;
import net.minecraftforge.common.WorldSpecificSaveHandler;
import java.io.File;

View file

@ -94,7 +94,7 @@ public class ClientEvents{
}
//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(GuiScreen.isCtrlKeyDown()){
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;
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.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.data.WorldData;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
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.StackUtil;
import net.minecraft.entity.item.EntityItem;
@ -43,7 +40,8 @@ public class CommonEvents{
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){
for(TheAchievements ach : TheAchievements.values()){
if(ach.type == type){
@ -53,7 +51,7 @@ public class CommonEvents{
}
}
}
}
}*/
@SubscribeEvent
public void onEntityDropEvent(LivingDropsEvent event){
@ -78,7 +76,7 @@ public class CommonEvents{
@SubscribeEvent
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(!event.player.world.isRemote && StackUtil.isValid(event.crafting) && event.crafting.getItem() != InitItems.itemBooklet){
@ -101,12 +99,12 @@ public class CommonEvents{
@SubscribeEvent
public void onSmeltedEvent(PlayerEvent.ItemSmeltedEvent event){
checkAchievements(event.smelting, event.player, InitAchievements.Type.SMELTING);
//checkAchievements(event.smelting, event.player, InitAchievements.Type.SMELTING);
}
@SubscribeEvent
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

View file

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

View file

@ -119,7 +119,7 @@ public class ContainerCrafter extends Container{
@Override
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

View file

@ -18,7 +18,6 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound;
@ -32,7 +31,7 @@ import java.util.ArrayList;
import java.util.List;
@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_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.TileEntityBioReactor;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
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 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.TileEntityBreaker;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiBreaker extends GuiContainer{
public class GuiBreaker extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_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.TileEntityCanolaPress;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.StringUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -28,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Collections;
@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 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.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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");

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.TileEntityDirectionalBreaker;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiDrill extends GuiContainer{
public class GuiDrill extends GuiWtfMojang{
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.TileEntityDropper;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiDropper extends GuiContainer{
public class GuiDropper extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
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.TileEntityEnergizer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiEnergizer extends GuiContainer{
public class GuiEnergizer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_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.TileEntityEnervator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiEnervator extends GuiContainer{
public class GuiEnervator extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_energizer");
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.TileEntityFarmer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiFarmer extends GuiContainer{
public class GuiFarmer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_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.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -26,7 +25,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Arrays;
@SideOnly(Side.CLIENT)
public class GuiFeeder extends GuiContainer{
public class GuiFeeder extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder");
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.TileEntityFermentingBarrel;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiFilter extends GuiContainer{
public class GuiFilter extends GuiWtfMojang{
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.TileEntityFluidCollector;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.StringUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -30,7 +29,7 @@ import java.io.IOException;
import java.util.Collections;
@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 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.util.AssetUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -28,7 +27,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.io.IOException;
@SideOnly(Side.CLIENT)
public class GuiGiantChest extends GuiContainer{
public class GuiGiantChest extends GuiWtfMojang{
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.StringUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -30,7 +29,7 @@ import java.io.IOException;
import java.util.Collections;
@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_DOUBLE = AssetUtil.getGuiLocation("gui_grinder_double");

View file

@ -257,7 +257,7 @@ public class GuiInputter extends GuiContainer{
}
@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){
mc.getTextureManager().bindTexture(this.resLoc);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
@ -295,7 +295,7 @@ public class GuiInputter extends GuiContainer{
}
@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){
mc.getTextureManager().bindTexture(this.resLoc);
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.StringUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -31,7 +30,7 @@ import java.util.ArrayList;
import java.util.List;
@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 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.StringUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -25,7 +24,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiMiner extends GuiContainer{
public class GuiMiner extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
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.TileEntityOilGenerator;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.StringUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -31,7 +30,7 @@ import java.util.ArrayList;
import java.util.List;
@SideOnly(Side.CLIENT)
public class GuiPhantomPlacer extends GuiContainer{
public class GuiPhantomPlacer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker");
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.util.AssetUtil;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -24,7 +23,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 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.TileEntityItemRepairer;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -22,7 +21,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiRepairer extends GuiContainer{
public class GuiRepairer extends GuiWtfMojang{
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_repairer");
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 net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
@ -33,7 +32,7 @@ import org.lwjgl.input.Keyboard;
import java.io.IOException;
@SideOnly(Side.CLIENT)
public class GuiSmileyCloud extends GuiContainer{
public class GuiSmileyCloud extends GuiWtfMojang{
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 net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;
@ -26,7 +25,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@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 final TileEntityXPSolidifier solidifier;

View file

@ -42,7 +42,7 @@ public class TexturedButton extends GuiButton{
}
@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){
minecraft.getTextureManager().bindTexture(this.resLoc);
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.tile.FilterSettings;
import de.ellpeck.actuallyadditions.mod.util.*;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
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.IItemHandler;
import javax.annotation.Nullable;
import java.util.List;
public class ItemBag extends ItemBase{
@ -52,7 +54,7 @@ public class ItemBag extends ItemBase{
}
@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));
ItemDrill.loadSlotsFromNBT(inv, stack);
@ -64,7 +66,7 @@ public class ItemBag extends ItemBase{
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

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.compat.TeslaUtil;
import net.darkhax.tesla.api.ITeslaConsumer;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
@ -89,8 +90,8 @@ public class ItemBattery extends ItemEnergy{
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
super.addInformation(stack, player, list, bool);
public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced){
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.changeMode"));
}

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
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.booklet.misc.BookletUtils;
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.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
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.SideOnly;
import javax.annotation.Nullable;
import java.util.List;
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);
if(!world.isRemote){
TheAchievements.OPEN_BOOKLET.get(player);
TheAchievements.OPEN_BOOKLET_MILESTONE.get(player);
//TheAchievements.OPEN_BOOKLET.get(player);
//TheAchievements.OPEN_BOOKLET_MILESTONE.get(player);
}
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, player.getHeldItem(hand));
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc"));
public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
tooltip.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+"."+this.getBaseName()+".desc"));
for(int i = 1; i <= 4; i++){
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
public EnumRarity getRarity(ItemStack stack){
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.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.init.MobEffects;
import net.minecraft.item.EnumAction;
@ -31,6 +31,7 @@ import net.minecraft.util.StringUtils;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.Loader;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;
@ -112,19 +113,18 @@ public class ItemCoffee extends ItemFoodBase{
}
@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);
if(effects != null){
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{
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".coffeeCup.noEffect"));
tooltip.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".coffeeCup.noEffect"));
}
}
@Override
public EnumRarity getRarity(ItemStack stack){
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 net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
@ -57,9 +56,11 @@ public class ItemCrystal extends ItemBase{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
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.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
@ -50,9 +49,11 @@ public class ItemCrystalShard extends ItemBase implements IColorProvidingItem{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
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.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.*;
@ -329,9 +328,11 @@ public class ItemDrill extends ItemEnergy{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, NonNullList list){
for(int i = 0; i < 16; i++){
this.addDrillStack(list, i);
public void getSubItems(CreativeTabs tabs, NonNullList list){
if(this.func_194125_a(tabs)){
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.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
@ -52,9 +51,11 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_DUSTS.length; j++){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
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.SoundType;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -232,8 +233,8 @@ public class ItemFillingWand extends ItemEnergy{
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool){
super.addInformation(stack, player, list, bool);
public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced){
super.addInformation(stack, playerIn, tooltip, advanced);
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

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.util.ItemStackHandlerCustom;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
@ -47,7 +48,9 @@ public class ItemFilter extends ItemBase{
}
@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);
ItemDrill.loadSlotsFromNBT(inv, stack);
for(int i = 0; i < inv.getSlots(); i++){
@ -55,6 +58,5 @@ public class ItemFilter extends ItemBase{
if(StackUtil.isValid(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.item.EnumAction;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
@ -95,9 +94,11 @@ public class ItemFoods extends ItemFoodBase{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_FOODS.length; j++){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
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.init.Items;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@ -61,9 +60,11 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_JAMS.length; j++){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
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.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
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.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
@ -87,8 +86,7 @@ public class ItemLaserWrench extends ItemBase{
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced){
BlockPos coords = ItemPhantomConnector.getStoredPosition(stack);
if(coords != null){
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.entity.item.EntityItem;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
@ -57,10 +56,12 @@ public class ItemMisc extends ItemBase{
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_MISC_ITEMS.length; j++){
if(j != TheMiscItems.YOUTUBE_ICON.ordinal()){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
for(int j = 0; j < ALL_MISC_ITEMS.length; 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.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
@ -28,9 +29,8 @@ import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
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;
public class ItemPhantomConnector extends ItemBase{
@ -120,8 +120,7 @@ public class ItemPhantomConnector extends ItemBase{
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> list, ITooltipFlag advanced){
BlockPos coords = getStoredPosition(stack);
if(coords != null){
list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID+".boundTo.desc")+":");
@ -132,7 +131,6 @@ public class ItemPhantomConnector extends ItemBase{
}
}
@Override
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.EPIC;

View file

@ -10,12 +10,12 @@
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.tile.TileEntityPlayerInterface;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
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.text.TextComponentTranslation;
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.UUID;
@ -54,7 +53,7 @@ public class ItemPlayerProbe extends ItemBase{
ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name");
entity.sendMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.disconnect.1"));
player.sendMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".playerProbe.notice"));
TheAchievements.GET_UNPROBED.get(player);
//TheAchievements.GET_UNPROBED.get(player);
}
}
else{
@ -115,12 +114,11 @@ public class ItemPlayerProbe extends ItemBase{
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
public void addInformation(ItemStack stack, @Nullable World playerIn, List<String> tooltip, ITooltipFlag advanced){
if(stack.hasTagCompound()){
String name = stack.getTagCompound().getString("Name");
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.StringUtil;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
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.SideOnly;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.List;
@ -144,13 +145,15 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < ALL_RINGS.length; j++){
list.add(new ItemStack(this, 1, j));
public void getSubItems(CreativeTabs tab, NonNullList list){
if(this.func_194125_a(tab)){
for(int j = 0; j < ALL_RINGS.length; j++){
list.add(new ItemStack(this, 1, j));
ItemStack full = new ItemStack(this, 1, j);
setStoredBlaze(full, MAX_BLAZE);
list.add(full);
ItemStack full = new ItemStack(this, 1, j);
setStoredBlaze(full, MAX_BLAZE);
list.add(full);
}
}
}
@ -237,9 +240,8 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
}
@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);
tooltip.add(String.format("%d/%d %s", this.getStoredBlaze(stack), MAX_BLAZE, StringUtil.localize("item."+ModUtil.MOD_ID+".item_misc_ring.storage")));
tooltip.add(String.format("%d/%d %s", 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.StringUtil;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -36,8 +37,6 @@ import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
@ -147,8 +146,7 @@ public class ItemSpawnerChanger extends ItemBase{
}
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){
public void addInformation(ItemStack stack, World playerIn, List<String> list, ITooltipFlag advanced){
String entity = this.getStoredEntity(stack);
if(entity != null){
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.compat.TeslaForgeUnitsWrapper;
import de.ellpeck.actuallyadditions.mod.util.compat.TeslaUtil;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.energy.CapabilityEnergy;
@ -54,12 +55,12 @@ public abstract class ItemEnergy extends ItemBase{
}
@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)){
IEnergyStorage storage = stack.getCapability(CapabilityEnergy.ENERGY, null);
if(storage != null){
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
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tabs, NonNullList list){
ItemStack stackFull = new ItemStack(this);
if(stackFull.hasCapability(CapabilityEnergy.ENERGY, null)){
IEnergyStorage storage = stackFull.getCapability(CapabilityEnergy.ENERGY, null);
if(storage != null){
this.setEnergy(stackFull, storage.getMaxEnergyStored());
list.add(stackFull);
public void getSubItems(CreativeTabs tabs, NonNullList list){
if(this.func_194125_a(tabs)){
ItemStack stackFull = new ItemStack(this);
if(stackFull.hasCapability(CapabilityEnergy.ENERGY, null)){
IEnergyStorage storage = stackFull.getCapability(CapabilityEnergy.ENERGY, null);
if(storage != null){
this.setEnergy(stackFull, storage.getMaxEnergyStored());
list.add(stackFull);
}
}
}
ItemStack stackEmpty = new ItemStack(this);
this.setEnergy(stackEmpty, 0);
list.add(stackEmpty);
ItemStack stackEmpty = new ItemStack(this);
this.setEnergy(stackEmpty, 0);
list.add(stackEmpty);
}
}
@Override

View file

@ -21,6 +21,7 @@ import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemEnchantedBook;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.AxisAlignedBB;
@ -87,7 +88,7 @@ public class LensDisenchanting extends Lens{
}
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 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
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

View file

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

View file

@ -11,14 +11,15 @@
package de.ellpeck.actuallyadditions.mod.jei.coffee;
import de.ellpeck.actuallyadditions.mod.util.AssetUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout;
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";
@ -38,6 +39,11 @@ public class CoffeeMachineRecipeCategory extends BlankRecipeCategory<CoffeeMachi
return StringUtil.localize("container.nei."+NAME+".name");
}
@Override
public String getModName(){
return ModUtil.NAME;
}
@Override
public IDrawable getBackground(){
return this.background;

View file

@ -11,15 +11,16 @@
package de.ellpeck.actuallyadditions.mod.jei.crusher;
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.StringUtil;
import mezz.jei.api.IGuiHelper;
import mezz.jei.api.gui.IDrawable;
import mezz.jei.api.gui.IRecipeLayout;
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";
@ -39,6 +40,11 @@ public class CrusherRecipeCategory extends BlankRecipeCategory<CrusherRecipeWrap
return StringUtil.localize("container.nei."+NAME+".name");
}
@Override
public String getModName(){
return ModUtil.NAME;
}
@Override
public IDrawable getBackground(){
return this.background;

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