Massive cleanup

This commit is contained in:
Ellpeck 2016-06-17 23:50:38 +02:00
parent ace2753c86
commit 262976074e
157 changed files with 603 additions and 662 deletions

View file

@ -174,7 +174,7 @@ public final class ActuallyAdditionsAPI{
* @param output The output as an ItemStack * @param output The output as an ItemStack
* @param energyUse The amount of RF used per conversion * @param energyUse The amount of RF used per conversion
* @param type The type of lens used for the conversion. To use the default type, use method below. * @param type The type of lens used for the conversion. To use the default type, use method below.
* Note how this always has to be the same instance of the lens type that the item also has for it to work! * Note how this always has to be the same INSTANCE of the lens type that the item also has for it to work!
*/ */
public static void addReconstructorLensConversionRecipe(ItemStack input, ItemStack output, int energyUse, LensConversion type){ public static void addReconstructorLensConversionRecipe(ItemStack input, ItemStack output, int energyUse, LensConversion type){
RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(new LensConversionRecipe(input, output, energyUse, type)); RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(new LensConversionRecipe(input, output, energyUse, type));
@ -191,7 +191,7 @@ public final class ActuallyAdditionsAPI{
* @param output The output's OreDictionary name * @param output The output's OreDictionary name
* @param energyUse The amount of RF used per conversion * @param energyUse The amount of RF used per conversion
* @param type The type of lens used for the conversion. To use the default type, use method below * @param type The type of lens used for the conversion. To use the default type, use method below
* Note how this always has to be the same instance of the lens type that the item also has for it to work! * Note how this always has to be the same INSTANCE of the lens type that the item also has for it to work!
*/ */
public static void addReconstructorLensConversionRecipe(String input, String output, int energyUse, LensConversion type){ public static void addReconstructorLensConversionRecipe(String input, String output, int energyUse, LensConversion type){
RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(new LensConversionRecipe(input, output, energyUse, type)); RECONSTRUCTOR_LENS_CONVERSION_RECIPES.add(new LensConversionRecipe(input, output, energyUse, type));
@ -204,7 +204,7 @@ public final class ActuallyAdditionsAPI{
/** /**
* Adds an item and the way it is modified to the Atomic Reconstructor's color lens. * Adds an item and the way it is modified to the Atomic Reconstructor's color lens.
* This also works for blocks, but they have to be in their item form. * This also works for blocks, but they have to be in their item form.
* The way it is modified is an instance of IColorLensChanger. When modifying the item, * The way it is modified is an INSTANCE of IColorLensChanger. When modifying the item,
* its modifyItem() method will be called with a stack containing the item. * its modifyItem() method will be called with a stack containing the item.
* *
* @param item The item (or block's item) to add * @param item The item (or block's item) to add

View file

@ -15,10 +15,10 @@ import net.minecraft.item.ItemStack;
public class CompostRecipe{ public class CompostRecipe{
public ItemStack input; public final ItemStack input;
public ItemStack output; public final ItemStack output;
public Block inputDisplay; public final Block inputDisplay;
public Block outputDisplay; public final Block outputDisplay;
public CompostRecipe(ItemStack input, Block inputDisplay, ItemStack output, Block outputDisplay){ public CompostRecipe(ItemStack input, Block inputDisplay, ItemStack output, Block outputDisplay){
this.input = input; this.input = input;

View file

@ -16,10 +16,8 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;

View file

@ -41,8 +41,8 @@ import java.util.Random;
public class BlockColoredLamp extends BlockBase{ public class BlockColoredLamp extends BlockBase{
public static final TheColoredLampColors[] allLampTypes = TheColoredLampColors.values(); public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values();
private static final PropertyInteger META = PropertyInteger.create("meta", 0, allLampTypes.length-1); private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_LAMP_TYPES.length-1);
public final boolean isOn; public final boolean isOn;
public BlockColoredLamp(boolean isOn, String name){ public BlockColoredLamp(boolean isOn, String name){
@ -106,7 +106,7 @@ public class BlockColoredLamp extends BlockBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allLampTypes.length; j++){ for(int j = 0; j < ALL_LAMP_TYPES.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(item, 1, j));
} }
} }
@ -123,7 +123,7 @@ public class BlockColoredLamp extends BlockBase{
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allLampTypes.length; i++){ for(int i = 0; i < ALL_LAMP_TYPES.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
} }
} }
@ -149,7 +149,7 @@ public class BlockColoredLamp extends BlockBase{
@Override @Override
public String getItemStackDisplayName(ItemStack stack){ public String getItemStackDisplayName(ItemStack stack){
if(stack.getItemDamage() >= allLampTypes.length){ if(stack.getItemDamage() >= ALL_LAMP_TYPES.length){
return StringUtil.BUGGED_ITEM_NAME; return StringUtil.BUGGED_ITEM_NAME;
} }
return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.block).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".onSuffix.desc")+")" : ""); return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.block).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".onSuffix.desc")+")" : "");
@ -158,7 +158,7 @@ public class BlockColoredLamp extends BlockBase{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name; return InitBlocks.blockColoredLamp.getUnlocalizedName()+ALL_LAMP_TYPES[stack.getItemDamage()].name;
} }
} }
} }

View file

@ -30,8 +30,8 @@ import java.util.List;
public class BlockCrystal extends BlockBase{ public class BlockCrystal extends BlockBase{
public static final TheCrystals[] allCrystals = TheCrystals.values(); public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values();
private static final PropertyInteger META = PropertyInteger.create("meta", 0, allCrystals.length-1); private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_CRYSTALS.length-1);
public BlockCrystal(String name){ public BlockCrystal(String name){
super(Material.ROCK, name); super(Material.ROCK, name);
@ -48,7 +48,7 @@ public class BlockCrystal extends BlockBase{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allCrystals.length; j++){ for(int j = 0; j < ALL_CRYSTALS.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(item, 1, j));
} }
} }
@ -60,14 +60,14 @@ public class BlockCrystal extends BlockBase{
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allCrystals.length; i++){ for(int i = 0; i < ALL_CRYSTALS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
} }
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= allCrystals.length ? EnumRarity.COMMON : allCrystals[stack.getItemDamage()].rarity; return stack.getItemDamage() >= ALL_CRYSTALS.length ? EnumRarity.COMMON : ALL_CRYSTALS[stack.getItemDamage()].rarity;
} }
@Override @Override
@ -86,7 +86,7 @@ public class BlockCrystal extends BlockBase{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= allCrystals.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allCrystals[stack.getItemDamage()].name; return stack.getItemDamage() >= ALL_CRYSTALS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_CRYSTALS[stack.getItemDamage()].name;
} }
} }
} }

View file

@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;

View file

@ -15,12 +15,9 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator;
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyInteger;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;

View file

@ -40,8 +40,8 @@ import java.util.List;
public class BlockWildPlant extends BlockBushBase{ public class BlockWildPlant extends BlockBushBase{
public static final TheWildPlants[] allWildPlants = TheWildPlants.values(); public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
private static final PropertyInteger META = PropertyInteger.create("meta", 0, allWildPlants.length-1); private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_WILD_PLANTS.length-1);
public BlockWildPlant(String name){ public BlockWildPlant(String name){
super(name); super(name);
@ -59,13 +59,13 @@ public class BlockWildPlant extends BlockBushBase{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player){ public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player){
int metadata = PosUtil.getMetadata(pos, world); int metadata = PosUtil.getMetadata(pos, world);
return metadata >= allWildPlants.length ? null : new ItemStack(((BlockPlant)allWildPlants[metadata].wildVersionOf).seedItem); return metadata >= ALL_WILD_PLANTS.length ? null : new ItemStack(((BlockPlant)ALL_WILD_PLANTS[metadata].wildVersionOf).seedItem);
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list){ public void getSubBlocks(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allWildPlants.length; j++){ for(int j = 0; j < ALL_WILD_PLANTS.length; j++){
list.add(new ItemStack(item, 1, j)); list.add(new ItemStack(item, 1, j));
} }
} }
@ -73,7 +73,7 @@ public class BlockWildPlant extends BlockBushBase{
@Override @Override
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){
int metadata = PosUtil.getMetadata(state); int metadata = PosUtil.getMetadata(state);
return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getDrops(world, pos, allWildPlants[metadata].wildVersionOf.getStateFromMeta(7), fortune); return metadata >= ALL_WILD_PLANTS.length ? null : ALL_WILD_PLANTS[metadata].wildVersionOf.getDrops(world, pos, ALL_WILD_PLANTS[metadata].wildVersionOf.getStateFromMeta(7), fortune);
} }
@Override @Override
@ -93,14 +93,14 @@ public class BlockWildPlant extends BlockBushBase{
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allWildPlants.length; i++){ for(int i = 0; i < ALL_WILD_PLANTS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), META.getName()+"="+i);
} }
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= allWildPlants.length ? EnumRarity.COMMON : allWildPlants[stack.getItemDamage()].rarity; return stack.getItemDamage() >= ALL_WILD_PLANTS.length ? EnumRarity.COMMON : ALL_WILD_PLANTS[stack.getItemDamage()].rarity;
} }
@Override @Override
@ -119,7 +119,7 @@ public class BlockWildPlant extends BlockBushBase{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= allWildPlants.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allWildPlants[stack.getItemDamage()].name; return stack.getItemDamage() >= ALL_WILD_PLANTS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_WILD_PLANTS[stack.getItemDamage()].name;
} }
} }
} }

View file

@ -13,11 +13,11 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockStair; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockStair;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks; import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
public class InitBlocks{ public final class InitBlocks{
public static Block blockCompost; public static Block blockCompost;
public static Block blockMisc; public static Block blockMisc;

View file

@ -37,7 +37,7 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer{
if(theCloud.name != null && !theCloud.name.isEmpty()){ if(theCloud.name != null && !theCloud.name.isEmpty()){
easterEggs: easterEggs:
for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.cloudStuff){ for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.CLOUD_STUFF){
for(String triggerName : cloud.getTriggerNames()){ for(String triggerName : cloud.getTriggerNames()){
if(triggerName != null && theCloud.name != null){ if(triggerName != null && theCloud.name != null){
if(triggerName.equalsIgnoreCase(theCloud.name)){ if(triggerName.equalsIgnoreCase(theCloud.name)){

View file

@ -40,7 +40,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
public class BookletUtils{ public final class BookletUtils{
/** /**
* Tries to open a URL in the Browser * Tries to open a URL in the Browser
@ -75,7 +75,7 @@ public class BookletUtils{
* Draws the Title of the current chapter, current index entry or just "Actually Additions" if neither is present * Draws the Title of the current chapter, current index entry or just "Actually Additions" if neither is present
*/ */
public static void drawTitle(GuiBooklet booklet){ public static void drawTitle(GuiBooklet booklet){
booklet.mc.getTextureManager().bindTexture(GuiBooklet.resLoc); booklet.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
//Upper title //Upper title
booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize/2-142/2, booklet.guiTop-12, 0, 240, 142, 12); booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize/2-142/2, booklet.guiTop-12, 0, 240, 142, 12);
//Lower title //Lower title
@ -134,7 +134,7 @@ public class BookletUtils{
for(Achievement achievement : InitAchievements.ACHIEVEMENT_LIST){ for(Achievement achievement : InitAchievements.ACHIEVEMENT_LIST){
if(achievement.theItemStack != null && ItemUtil.areItemsEqual(stack, achievement.theItemStack, true)){ if(achievement.theItemStack != null && ItemUtil.areItemsEqual(stack, achievement.theItemStack, true)){
if(pre){ if(pre){
booklet.mc.getTextureManager().bindTexture(GuiBooklet.resLoc); booklet.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize+1, booklet.guiTop-18, 166, 154, 22, 21); booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize+1, booklet.guiTop-18, 166, 154, 22, 21);
return; return;
} }

View file

@ -57,10 +57,10 @@ import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiBooklet extends GuiScreen implements IBookletGui{ public class GuiBooklet extends GuiScreen implements IBookletGui{
public static final ResourceLocation resLoc = AssetUtil.getBookletGuiLocation("guiBooklet"); public static final ResourceLocation RES_LOC = AssetUtil.getBookletGuiLocation("guiBooklet");
public static final ResourceLocation resLocHalloween = AssetUtil.getBookletGuiLocation("guiBookletHalloween"); public static final ResourceLocation RES_LOC_HALLOWEEN = AssetUtil.getBookletGuiLocation("guiBookletHalloween");
public static final ResourceLocation resLocChristmas = AssetUtil.getBookletGuiLocation("guiBookletChristmas"); public static final ResourceLocation RES_LOC_CHRISTMAS = AssetUtil.getBookletGuiLocation("guiBookletChristmas");
public static final ResourceLocation resLocValentine = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay"); public static final ResourceLocation RES_LOC_VALENTINE = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay");
public static final int CHAPTER_BUTTONS_AMOUNT = 13; public static final int CHAPTER_BUTTONS_AMOUNT = 13;
public static final int INDEX_BUTTONS_OFFSET = 3; public static final int INDEX_BUTTONS_OFFSET = 3;
@ -88,10 +88,10 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
public GuiButton buttonPatreon; public GuiButton buttonPatreon;
public GuiButton buttonViewOnline; public GuiButton buttonViewOnline;
public GuiTextField searchField; public GuiTextField searchField;
public boolean changedPageSinceOpen;
private int ticksElapsed; private int ticksElapsed;
private boolean mousePressed; private boolean mousePressed;
private int hisNameIsAt; private int hisNameIsAt;
public boolean changedPageSinceOpen;
public GuiBooklet(GuiScreen parentScreen, boolean tryOpenMainPage, boolean saveOnClose){ public GuiBooklet(GuiScreen parentScreen, boolean tryOpenMainPage, boolean saveOnClose){
this.xSize = 146; this.xSize = 146;
@ -128,12 +128,12 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
//Draws the Background //Draws the Background
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(ClientProxy.jingleAllTheWay ? resLocChristmas : (ClientProxy.pumpkinBlurPumpkinBlur ? resLocHalloween : (ClientProxy.bulletForMyValentine ? resLocValentine : resLoc))); this.mc.getTextureManager().bindTexture(ClientProxy.jingleAllTheWay ? RES_LOC_CHRISTMAS : (ClientProxy.pumpkinBlurPumpkinBlur ? RES_LOC_HALLOWEEN : (ClientProxy.bulletForMyValentine ? RES_LOC_VALENTINE : RES_LOC)));
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
//Draws the search bar //Draws the search bar
if(this.currentEntrySet.getCurrentEntry() instanceof BookletEntryAllSearch && this.currentEntrySet.getCurrentChapter() == null){ if(this.currentEntrySet.getCurrentEntry() instanceof BookletEntryAllSearch && this.currentEntrySet.getCurrentChapter() == null){
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft+146, this.guiTop+160, 146, 80, 70, 14); this.drawTexturedModalRect(this.guiLeft+146, this.guiTop+160, 146, 80, 70, 14);
} }

View file

@ -26,7 +26,7 @@ public class GuiBookletStand extends GuiBooklet{
private GuiButton buttonSetPage; private GuiButton buttonSetPage;
private TileEntityBookletStand theStand; private final TileEntityBookletStand theStand;
public GuiBookletStand(TileEntityBase theStand){ public GuiBookletStand(TileEntityBase theStand){
super(null, false, false); super(null, false, false);

View file

@ -34,11 +34,10 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.Loader;
import java.util.ArrayList; import java.util.ArrayList;
public class InitBooklet{ public final class InitBooklet{
public static BookletChapter chapterIntro; public static BookletChapter chapterIntro;
@ -62,7 +61,7 @@ public class InitBooklet{
chapterIntro = new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3)); chapterIntro = new BookletChapter("intro", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3));
new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM")).setImportant(); new BookletChapter("videoGuide", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()), new PageLinkButton(1, "https://www.youtube.com/watch?v=fhjz0Ew56pM")).setImportant();
new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook)); new BookletChapter("bookTutorial", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemBooklet), new PageTextOnly(1), new PageTextOnly(2), new PageCrafting(3, ItemCrafting.recipeBook));
new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.recipesCrystals).setNoText(), new PageCrafting(8, MiscCrafting.recipesCrystalBlocks).setNoText(), new PageReconstructor(9, LensRecipeHandler.mainPageRecipes).setNoText()).setSpecial(); new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityAtomicReconstructor.ENERGY_USE), new PageTextOnly(2), new PageTextOnly(3), new PagePicture(4, "pageAtomicReconstructor", 0).setNoText(), new PageTextOnly(5), new PageCrafting(6, BlockCrafting.recipeAtomicReconstructor).setPageStacksWildcard(), new PageCrafting(7, MiscCrafting.RECIPES_CRYSTALS).setNoText(), new PageCrafting(8, MiscCrafting.RECIPES_CRYSTAL_BLOCKS).setNoText(), new PageReconstructor(9, LensRecipeHandler.MAIN_PAGE_RECIPES).setNoText()).setSpecial();
new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE).setPageStacksWildcard()); new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).addTextReplacement("<rf>", TileEntityCoalGenerator.PRODUCE).setPageStacksWildcard());
new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText()).setImportant(); new BookletChapter("craftingIngs", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(7, ItemCrafting.recipeRing).setNoText(), new PageCrafting(8, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(11, ItemCrafting.recipeDough).setNoText(), new PageCrafting(12, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(13, BlockCrafting.recipeIronCase).setNoText()).setImportant();
new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.REDSTONE), new PageTextOnly(1)); new BookletChapter("rf", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.REDSTONE), new PageTextOnly(1));
@ -78,7 +77,7 @@ public class InitBooklet{
ArrayList<BookletPage> lampPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> lampPages = new ArrayList<BookletPage>();
lampPages.add(new PageTextOnly(lampPages.size()+1)); lampPages.add(new PageTextOnly(lampPages.size()+1));
lampPages.add(new PageCrafting(lampPages.size()+1, BlockCrafting.recipePowerer).setNoText()); lampPages.add(new PageCrafting(lampPages.size()+1, BlockCrafting.recipePowerer).setNoText());
for(IRecipe recipe : BlockCrafting.recipesLamps){ for(IRecipe recipe : BlockCrafting.RECIPES_LAMPS){
lampPages.add(new PageCrafting(lampPages.size()+1, recipe).setNoText()); lampPages.add(new PageCrafting(lampPages.size()+1, recipe).setNoText());
} }
new BookletChapter("lamps", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockColoredLampOn, 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()])); new BookletChapter("lamps", ActuallyAdditionsAPI.entryMisc, new ItemStack(InitBlocks.blockColoredLampOn, 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()]));
@ -103,7 +102,7 @@ public class InitBooklet{
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass)); new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText()); new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText()); new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.recipesMashedFood)); new BookletChapter("compost", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.RECIPES_MASHED_FOOD));
new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, ItemCrafting.recipeCrateKeeper), new PageCrafting(3, ItemCrafting.recipeChestToCrateUpgrade)); new BookletChapter("crate", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, ItemCrafting.recipeCrateKeeper), new PageCrafting(3, ItemCrafting.recipeChestToCrateUpgrade));
new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText()); new BookletChapter("rangedCollector", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector), new PageTextOnly(1).addTextReplacement("<range>", TileEntityRangedCollector.RANGE), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText());
@ -133,7 +132,7 @@ public class InitBooklet{
new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant(); new BookletChapter("leafBlower", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant();
ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>();
aiotPages.add(new PageTextOnly(aiotPages.size()+1)); aiotPages.add(new PageTextOnly(aiotPages.size()+1));
for(IRecipe recipe : ToolCrafting.recipesPaxels){ for(IRecipe recipe : ToolCrafting.RECIPES_PAXELS){
aiotPages.add(new PageCrafting(aiotPages.size()+1, recipe).setNoText().setPageStacksWildcard()); aiotPages.add(new PageCrafting(aiotPages.size()+1, recipe).setNoText().setPageStacksWildcard());
} }
new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant(); new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant();
@ -142,7 +141,7 @@ public class InitBooklet{
ArrayList<BookletPage> potionRingPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> potionRingPages = new ArrayList<BookletPage>();
potionRingPages.add(new PageTextOnly(potionRingPages.size()+1)); potionRingPages.add(new PageTextOnly(potionRingPages.size()+1));
for(IRecipe recipe : ItemCrafting.recipesPotionRings){ for(IRecipe recipe : ItemCrafting.RECIPES_POTION_RINGS){
potionRingPages.add(new PageCrafting(potionRingPages.size()+1, recipe).setNoText()); potionRingPages.add(new PageCrafting(potionRingPages.size()+1, recipe).setNoText());
} }
new BookletChapter("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPotionRing), potionRingPages.toArray(new BookletPage[potionRingPages.size()])); new BookletChapter("potionRings", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemPotionRing), potionRingPages.toArray(new BookletPage[potionRingPages.size()]));
@ -150,7 +149,7 @@ public class InitBooklet{
new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitItems.itemFilter), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant(); new BookletChapter("itemFilter", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitItems.itemFilter), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeFilter).setNoText()).setImportant();
//RF Using Items //RF Using Items
new BookletChapter("drill", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.recipesDrillColoring), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial(); new BookletChapter("drill", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemDrill, 1, TheColoredLampColors.LIGHT_BLUE.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.RECIPES_DRILL_COLORING), new PageCrafting(4, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(13, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial();
new BookletChapter("staff", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant(); new BookletChapter("staff", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant();
new BookletChapter("magnetRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing)); new BookletChapter("magnetRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing));
new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing)); new BookletChapter("growthRing", ActuallyAdditionsAPI.entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing));

View file

@ -57,7 +57,7 @@ public class BookmarkButton extends GuiButton{
@Override @Override
public void drawButton(Minecraft minecraft, int x, int y){ public void drawButton(Minecraft minecraft, int x, int y){
if(this.visible){ if(this.visible){
minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc); minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height;
int k = this.getHoverState(this.hovered); int k = this.getHoverState(this.hovered);

View file

@ -46,7 +46,7 @@ public class TexturedButton extends GuiButton{
@Override @Override
public void drawButton(Minecraft minecraft, int x, int y){ public void drawButton(Minecraft minecraft, int x, int y){
if(this.visible){ if(this.visible){
minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc); minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height; this.hovered = x >= this.xPosition && y >= this.yPosition && x < this.xPosition+this.width && y < this.yPosition+this.height;
int k = this.getHoverState(this.hovered); int k = this.getHoverState(this.hovered);

View file

@ -77,8 +77,7 @@ public class BookletChapter implements IBookletChapter{
this.color = TextFormatting.DARK_GREEN; this.color = TextFormatting.DARK_GREEN;
} }
public BookletChapter setSpecial(){ public void setSpecial(){
this.color = TextFormatting.DARK_PURPLE; this.color = TextFormatting.DARK_PURPLE;
return this;
} }
} }

View file

@ -30,7 +30,7 @@ public class BookletChapterCrusher extends BookletChapter{
ArrayList<BookletPage> allPages = new ArrayList<BookletPage>(); ArrayList<BookletPage> allPages = new ArrayList<BookletPage>();
allPages.addAll(Arrays.asList(pages)); allPages.addAll(Arrays.asList(pages));
for(CrusherRecipe recipe : CrusherCrafting.miscRecipes){ for(CrusherRecipe recipe : CrusherCrafting.MISC_RECIPES){
allPages.add(new PageCrusherRecipe(allPages.size()+1, recipe).setNoText()); allPages.add(new PageCrusherRecipe(allPages.size()+1, recipe).setNoText());
} }

View file

@ -37,7 +37,7 @@ public class PageCoffeeRecipe extends BookletPageAA{
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc); Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.RES_LOC_VALENTINE : GuiBooklet.RES_LOC);
gui.drawRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60); gui.drawRect(gui.getGuiLeft()+19, gui.getGuiTop()+20, 146, 94, 99, 60);
} }

View file

@ -52,7 +52,7 @@ public class PageCrafting extends BookletPageAA{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(this.recipes[this.recipePos] != null){ if(this.recipes[this.recipePos] != null){
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc); Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.RES_LOC_VALENTINE : GuiBooklet.RES_LOC);
gui.drawRect(gui.getGuiLeft()+27, gui.getGuiTop()+20, 146, 20, 99, 60); gui.drawRect(gui.getGuiLeft()+27, gui.getGuiTop()+20, 146, 20, 99, 60);
} }
} }

View file

@ -43,7 +43,7 @@ public class PageCrusherRecipe extends BookletPageAA{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(this.recipe != null){ if(this.recipe != null){
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc); Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.RES_LOC_VALENTINE : GuiBooklet.RES_LOC);
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 60, 180, 60, 60); gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 60, 180, 60, 60);
} }
} }

View file

@ -46,7 +46,7 @@ public class PageFurnace extends BookletPageAA{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(this.input != null || this.getInputForOutput(this.result) != null){ if(this.input != null || this.getInputForOutput(this.result) != null){
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc); Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.RES_LOC_VALENTINE : GuiBooklet.RES_LOC);
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 0, 180, 60, 60); gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 0, 180, 60, 60);
} }
} }

View file

@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
public class PageLinkButton extends PageButton{ public class PageLinkButton extends PageButton{
private String link; private final String link;
public PageLinkButton(int id, String link){ public PageLinkButton(int id, String link){
super(id); super(id);

View file

@ -47,7 +47,7 @@ public class PageReconstructor extends BookletPageAA{
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(this.recipes[this.recipePos] != null){ if(this.recipes[this.recipePos] != null){
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc); Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.RES_LOC_VALENTINE : GuiBooklet.RES_LOC);
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 188, 154, 60, 60); gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 188, 154, 60, 60);
} }
} }

View file

@ -13,7 +13,7 @@ package de.ellpeck.actuallyadditions.mod.config;
import de.ellpeck.actuallyadditions.mod.config.values.*; import de.ellpeck.actuallyadditions.mod.config.values.*;
import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Configuration;
public class ConfigValues{ public final class ConfigValues{
public static void defineConfigValues(Configuration config){ public static void defineConfigValues(Configuration config){

View file

@ -27,9 +27,9 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
public class BlockCrafting{ public final class BlockCrafting{
public static final IRecipe[] recipesLamps = new IRecipe[BlockColoredLamp.allLampTypes.length]; public static final IRecipe[] RECIPES_LAMPS = new IRecipe[BlockColoredLamp.ALL_LAMP_TYPES.length];
public static IRecipe recipeSmileyCloud; public static IRecipe recipeSmileyCloud;
public static IRecipe recipePhantomface; public static IRecipe recipePhantomface;
public static IRecipe recipeLiquiface; public static IRecipe recipeLiquiface;
@ -704,14 +704,14 @@ public class BlockCrafting{
} }
if(ConfigCrafting.LAMPS.isEnabled()){ if(ConfigCrafting.LAMPS.isEnabled()){
for(int i = 0; i < BlockColoredLamp.allLampTypes.length; i++){ for(int i = 0; i < BlockColoredLamp.ALL_LAMP_TYPES.length; i++){
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockColoredLamp, 6, i),
"GCG", "DQD", "GCG", "GCG", "DQD", "GCG",
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()), 'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
'G', "glowstone", 'G', "glowstone",
'D', "dye"+BlockColoredLamp.allLampTypes[i].name, 'D', "dye"+BlockColoredLamp.ALL_LAMP_TYPES[i].name,
'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()))); 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())));
recipesLamps[i] = RecipeUtil.lastIRecipe(); RECIPES_LAMPS[i] = RecipeUtil.lastIRecipe();
} }
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),

View file

@ -24,9 +24,9 @@ import net.minecraft.item.ItemStack;
import java.util.ArrayList; import java.util.ArrayList;
public class CrusherCrafting{ public final class CrusherCrafting{
public static final ArrayList<CrusherRecipe> miscRecipes = new ArrayList<CrusherRecipe>(); public static final ArrayList<CrusherRecipe> MISC_RECIPES = new ArrayList<CrusherRecipe>();
public static CrusherRecipe recipeIronHorseArmor; public static CrusherRecipe recipeIronHorseArmor;
public static CrusherRecipe recipeGoldHorseArmor; public static CrusherRecipe recipeGoldHorseArmor;
public static CrusherRecipe recipeDiamondHorseArmor; public static CrusherRecipe recipeDiamondHorseArmor;
@ -35,38 +35,38 @@ public class CrusherCrafting{
ModUtil.LOGGER.info("Initializing Crusher Recipes..."); ModUtil.LOGGER.info("Initializing Crusher Recipes...");
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BONE), new ItemStack(Items.DYE, 6, 15)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.BONE), new ItemStack(Items.DYE, 6, 15));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(Items.SUGAR, 3)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Items.REEDS), new ItemStack(Items.SUGAR, 3));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 3, 11)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 3, 11));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 0), new ItemStack(Items.DYE, 3, 1)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 0), new ItemStack(Items.DYE, 3, 1));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 3, 12)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 3, 12));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 3, 13)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 3, 13));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 3, 7)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 3, 7));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 3, 1)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 3, 1));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 3, 14)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 3, 14));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 3, 7)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 3, 7));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 3, 9)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 3, 9));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 3, 7)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 3, 7));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 0), new ItemStack(Items.DYE, 4, 11)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 0), new ItemStack(Items.DYE, 4, 11));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe("oreRedstone", "dustRedstone", 10); ActuallyAdditionsAPI.addCrusherRecipe("oreRedstone", "dustRedstone", 10);
ActuallyAdditionsAPI.addCrusherRecipe("oreLapis", "gemLapis", 12); ActuallyAdditionsAPI.addCrusherRecipe("oreLapis", "gemLapis", 12);
@ -79,10 +79,10 @@ public class CrusherCrafting{
ActuallyAdditionsAPI.addCrusherRecipe("stone", "cobblestone", 1); ActuallyAdditionsAPI.addCrusherRecipe("stone", "cobblestone", 1);
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(Items.SUGAR, 2));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4)); ActuallyAdditionsAPI.addCrusherRecipe(new ItemStack(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4));
miscRecipes.add(RecipeUtil.lastCrusherRecipe()); MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
ActuallyAdditionsAPI.addCrusherRecipe("oreNickel", "dustNickel", 2, "dustPlatinum", 1, 15); ActuallyAdditionsAPI.addCrusherRecipe("oreNickel", "dustNickel", 2, "dustPlatinum", 1, 15);
ActuallyAdditionsAPI.addCrusherRecipe("oreIron", "dustIron", 2, "dustGold", 1, 20); ActuallyAdditionsAPI.addCrusherRecipe("oreIron", "dustIron", 2, "dustGold", 1, 20);

View file

@ -24,7 +24,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
public class FoodCrafting{ public final class FoodCrafting{
public static IRecipe recipePizza; public static IRecipe recipePizza;
public static IRecipe recipeHamburger; public static IRecipe recipeHamburger;

View file

@ -17,7 +17,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class InitCrafting{ public final class InitCrafting{
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Initializing Crafting Recipes..."); ModUtil.LOGGER.info("Initializing Crafting Recipes...");

View file

@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigCrafting;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues;
import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.*; import de.ellpeck.actuallyadditions.mod.items.metalists.*;
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
import de.ellpeck.actuallyadditions.mod.util.RecipeUtil; import de.ellpeck.actuallyadditions.mod.util.RecipeUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraft.block.IGrowable; import net.minecraft.block.IGrowable;
@ -28,7 +27,6 @@ import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.IPlantable;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
@ -36,11 +34,11 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.ArrayList; import java.util.ArrayList;
public class ItemCrafting{ public final class ItemCrafting{
public static final ArrayList<IRecipe> recipesMashedFood = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_MASHED_FOOD = new ArrayList<IRecipe>();
public static final ArrayList<IRecipe> recipesDrillColoring = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<IRecipe>();
public static final ArrayList<IRecipe> recipesPotionRings = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<IRecipe>();
public static IRecipe recipePhantomConnector; public static IRecipe recipePhantomConnector;
public static IRecipe recipeCoil; public static IRecipe recipeCoil;
public static IRecipe recipeCoilAdvanced; public static IRecipe recipeCoilAdvanced;
@ -195,7 +193,7 @@ public class ItemCrafting{
for(int i = 0; i < 16; i++){ for(int i = 0; i < 16; i++){
if(i != TheColoredLampColors.LIGHT_BLUE.ordinal()){ if(i != TheColoredLampColors.LIGHT_BLUE.ordinal()){
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemDrill, 1, i), lightBlueDrill.copy(), "dye"+TheColoredLampColors.values()[i].name)); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemDrill, 1, i), lightBlueDrill.copy(), "dye"+TheColoredLampColors.values()[i].name));
recipesDrillColoring.add(RecipeUtil.lastIRecipe()); RECIPES_DRILL_COLORING.add(RecipeUtil.lastIRecipe());
} }
} }
} }
@ -552,9 +550,9 @@ public class ItemCrafting{
public static void addRingRecipeWithStack(ItemStack mainStack, int meta){ public static void addRingRecipeWithStack(ItemStack mainStack, int meta){
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), new ItemStack(Items.POTIONITEM), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); 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), new ItemStack(Items.POTIONITEM), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
recipesPotionRings.add(RecipeUtil.lastIRecipe()); RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal())); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.ENDER_STAR.ordinal()));
recipesPotionRings.add(RecipeUtil.lastIRecipe()); RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
} }
public static void initMashedFoodRecipes(){ public static void initMashedFoodRecipes(){
@ -564,7 +562,7 @@ public class ItemCrafting{
if(!isBlacklisted(item)){ if(!isBlacklisted(item)){
ItemStack ingredient = new ItemStack(item, 1, Util.WILDCARD); ItemStack ingredient = new ItemStack(item, 1, Util.WILDCARD);
GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD)); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.MASHED_FOOD.ordinal()), ingredient, ingredient, ingredient, ingredient, new ItemStack(InitItems.itemKnife, 1, Util.WILDCARD));
recipesMashedFood.add(RecipeUtil.lastIRecipe()); RECIPES_MASHED_FOOD.add(RecipeUtil.lastIRecipe());
} }
} }
} }

View file

@ -24,10 +24,10 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
public class MiscCrafting{ public final class MiscCrafting{
public static final IRecipe[] recipesCrystals = new IRecipe[TheCrystals.values().length]; public static final IRecipe[] RECIPES_CRYSTALS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] recipesCrystalBlocks = new IRecipe[TheCrystals.values().length]; public static final IRecipe[] RECIPES_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
public static void init(){ public static void init(){
@ -36,9 +36,9 @@ public class MiscCrafting{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i), GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i),
"XXX", "XXX", "XXX", "XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystal, 1, i))); 'X', new ItemStack(InitItems.itemCrystal, 1, i)));
recipesCrystalBlocks[i] = RecipeUtil.lastIRecipe(); RECIPES_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i))); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystal, 9, i), new ItemStack(InitBlocks.blockCrystal, 1, i)));
recipesCrystals[i] = RecipeUtil.lastIRecipe(); RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
} }
//Dough //Dough

View file

@ -26,9 +26,9 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
import java.util.ArrayList; import java.util.ArrayList;
public class ToolCrafting{ public final class ToolCrafting{
public static final ArrayList<IRecipe> recipesPaxels = new ArrayList<IRecipe>(); public static final ArrayList<IRecipe> RECIPES_PAXELS = new ArrayList<IRecipe>();
public static void init(){ public static void init(){
@ -61,56 +61,56 @@ public class ToolCrafting{
new ItemStack(Items.WOODEN_SHOVEL), new ItemStack(Items.WOODEN_SHOVEL),
new ItemStack(Items.WOODEN_SWORD), new ItemStack(Items.WOODEN_SWORD),
new ItemStack(Items.WOODEN_HOE))); new ItemStack(Items.WOODEN_HOE)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel),
new ItemStack(Items.STONE_AXE), new ItemStack(Items.STONE_AXE),
new ItemStack(Items.STONE_PICKAXE), new ItemStack(Items.STONE_PICKAXE),
new ItemStack(Items.STONE_SHOVEL), new ItemStack(Items.STONE_SHOVEL),
new ItemStack(Items.STONE_SWORD), new ItemStack(Items.STONE_SWORD),
new ItemStack(Items.STONE_HOE))); new ItemStack(Items.STONE_HOE)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel),
new ItemStack(Items.IRON_AXE), new ItemStack(Items.IRON_AXE),
new ItemStack(Items.IRON_PICKAXE), new ItemStack(Items.IRON_PICKAXE),
new ItemStack(Items.IRON_SHOVEL), new ItemStack(Items.IRON_SHOVEL),
new ItemStack(Items.IRON_SWORD), new ItemStack(Items.IRON_SWORD),
new ItemStack(Items.IRON_HOE))); new ItemStack(Items.IRON_HOE)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel),
new ItemStack(Items.GOLDEN_AXE), new ItemStack(Items.GOLDEN_AXE),
new ItemStack(Items.GOLDEN_PICKAXE), new ItemStack(Items.GOLDEN_PICKAXE),
new ItemStack(Items.GOLDEN_SHOVEL), new ItemStack(Items.GOLDEN_SHOVEL),
new ItemStack(Items.GOLDEN_SWORD), new ItemStack(Items.GOLDEN_SWORD),
new ItemStack(Items.GOLDEN_HOE))); new ItemStack(Items.GOLDEN_HOE)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel),
new ItemStack(Items.DIAMOND_AXE), new ItemStack(Items.DIAMOND_AXE),
new ItemStack(Items.DIAMOND_PICKAXE), new ItemStack(Items.DIAMOND_PICKAXE),
new ItemStack(Items.DIAMOND_SHOVEL), new ItemStack(Items.DIAMOND_SHOVEL),
new ItemStack(Items.DIAMOND_SWORD), new ItemStack(Items.DIAMOND_SWORD),
new ItemStack(Items.DIAMOND_HOE))); new ItemStack(Items.DIAMOND_HOE)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel),
new ItemStack(InitItems.itemAxeEmerald), new ItemStack(InitItems.itemAxeEmerald),
new ItemStack(InitItems.itemPickaxeEmerald), new ItemStack(InitItems.itemPickaxeEmerald),
new ItemStack(InitItems.itemSwordEmerald), new ItemStack(InitItems.itemSwordEmerald),
new ItemStack(InitItems.itemShovelEmerald), new ItemStack(InitItems.itemShovelEmerald),
new ItemStack(InitItems.itemHoeEmerald))); new ItemStack(InitItems.itemHoeEmerald)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel),
new ItemStack(InitItems.itemAxeObsidian), new ItemStack(InitItems.itemAxeObsidian),
new ItemStack(InitItems.itemPickaxeObsidian), new ItemStack(InitItems.itemPickaxeObsidian),
new ItemStack(InitItems.itemSwordObsidian), new ItemStack(InitItems.itemSwordObsidian),
new ItemStack(InitItems.itemShovelObsidian), new ItemStack(InitItems.itemShovelObsidian),
new ItemStack(InitItems.itemHoeObsidian))); new ItemStack(InitItems.itemHoeObsidian)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel),
new ItemStack(InitItems.itemAxeQuartz), new ItemStack(InitItems.itemAxeQuartz),
new ItemStack(InitItems.itemPickaxeQuartz), new ItemStack(InitItems.itemPickaxeQuartz),
new ItemStack(InitItems.itemSwordQuartz), new ItemStack(InitItems.itemSwordQuartz),
new ItemStack(InitItems.itemShovelQuartz), new ItemStack(InitItems.itemShovelQuartz),
new ItemStack(InitItems.itemHoeQuartz))); new ItemStack(InitItems.itemHoeQuartz)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalRed), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalRed),
new ItemStack(InitItems.itemAxeCrystalRed), new ItemStack(InitItems.itemAxeCrystalRed),
@ -118,42 +118,42 @@ public class ToolCrafting{
new ItemStack(InitItems.itemSwordCrystalRed), new ItemStack(InitItems.itemSwordCrystalRed),
new ItemStack(InitItems.itemShovelCrystalRed), new ItemStack(InitItems.itemShovelCrystalRed),
new ItemStack(InitItems.itemHoeCrystalRed))); new ItemStack(InitItems.itemHoeCrystalRed)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen),
new ItemStack(InitItems.itemAxeCrystalGreen), new ItemStack(InitItems.itemAxeCrystalGreen),
new ItemStack(InitItems.itemPickaxeCrystalGreen), new ItemStack(InitItems.itemPickaxeCrystalGreen),
new ItemStack(InitItems.itemSwordCrystalGreen), new ItemStack(InitItems.itemSwordCrystalGreen),
new ItemStack(InitItems.itemShovelCrystalGreen), new ItemStack(InitItems.itemShovelCrystalGreen),
new ItemStack(InitItems.itemHoeCrystalGreen))); new ItemStack(InitItems.itemHoeCrystalGreen)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue),
new ItemStack(InitItems.itemAxeCrystalBlue), new ItemStack(InitItems.itemAxeCrystalBlue),
new ItemStack(InitItems.itemPickaxeCrystalBlue), new ItemStack(InitItems.itemPickaxeCrystalBlue),
new ItemStack(InitItems.itemSwordCrystalBlue), new ItemStack(InitItems.itemSwordCrystalBlue),
new ItemStack(InitItems.itemShovelCrystalBlue), new ItemStack(InitItems.itemShovelCrystalBlue),
new ItemStack(InitItems.itemHoeCrystalBlue))); new ItemStack(InitItems.itemHoeCrystalBlue)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue),
new ItemStack(InitItems.itemAxeCrystalLightBlue), new ItemStack(InitItems.itemAxeCrystalLightBlue),
new ItemStack(InitItems.itemPickaxeCrystalLightBlue), new ItemStack(InitItems.itemPickaxeCrystalLightBlue),
new ItemStack(InitItems.itemSwordCrystalLightBlue), new ItemStack(InitItems.itemSwordCrystalLightBlue),
new ItemStack(InitItems.itemShovelCrystalLightBlue), new ItemStack(InitItems.itemShovelCrystalLightBlue),
new ItemStack(InitItems.itemHoeCrystalLightBlue))); new ItemStack(InitItems.itemHoeCrystalLightBlue)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack),
new ItemStack(InitItems.itemAxeCrystalBlack), new ItemStack(InitItems.itemAxeCrystalBlack),
new ItemStack(InitItems.itemPickaxeCrystalBlack), new ItemStack(InitItems.itemPickaxeCrystalBlack),
new ItemStack(InitItems.itemSwordCrystalBlack), new ItemStack(InitItems.itemSwordCrystalBlack),
new ItemStack(InitItems.itemShovelCrystalBlack), new ItemStack(InitItems.itemShovelCrystalBlack),
new ItemStack(InitItems.itemHoeCrystalBlack))); new ItemStack(InitItems.itemHoeCrystalBlack)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite), GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite),
new ItemStack(InitItems.itemAxeCrystalWhite), new ItemStack(InitItems.itemAxeCrystalWhite),
new ItemStack(InitItems.itemPickaxeCrystalWhite), new ItemStack(InitItems.itemPickaxeCrystalWhite),
new ItemStack(InitItems.itemSwordCrystalWhite), new ItemStack(InitItems.itemSwordCrystalWhite),
new ItemStack(InitItems.itemShovelCrystalWhite), new ItemStack(InitItems.itemShovelCrystalWhite),
new ItemStack(InitItems.itemHoeCrystalWhite))); new ItemStack(InitItems.itemHoeCrystalWhite)));
recipesPaxels.add(RecipeUtil.lastIRecipe()); RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
} }
} }

View file

@ -28,7 +28,7 @@ import java.util.List;
public class CreativeTab extends CreativeTabs{ public class CreativeTab extends CreativeTabs{
public static final CreativeTab instance = new CreativeTab(); public static final CreativeTab INSTANCE = new CreativeTab();
private List<ItemStack> list; private List<ItemStack> list;
public CreativeTab(){ public CreativeTab(){
@ -310,13 +310,13 @@ public class CreativeTab extends CreativeTabs{
public void add(Item item){ public void add(Item item){
if(item != null){ if(item != null){
item.getSubItems(item, instance, this.list); item.getSubItems(item, INSTANCE, this.list);
} }
} }
public void add(Block block){ public void add(Block block){
if(block != null){ if(block != null){
block.getSubBlocks(new ItemStack(block).getItem(), instance, this.list); block.getSubBlocks(new ItemStack(block).getItem(), INSTANCE, this.list);
} }
} }
} }

View file

@ -16,7 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.UUID; import java.util.UUID;
public class PlayerData{ public final class PlayerData{
public static PlayerSave getDataFromPlayer(EntityPlayer player){ public static PlayerSave getDataFromPlayer(EntityPlayer player){
ArrayList<PlayerSave> data = WorldData.PLAYER_SAVE_DATA; ArrayList<PlayerSave> data = WorldData.PLAYER_SAVE_DATA;

View file

@ -34,10 +34,10 @@ public class WorldData{
public static final String DATA_TAG = ModUtil.MOD_ID+"data"; public static final String DATA_TAG = ModUtil.MOD_ID+"data";
public static final ArrayList<PlayerSave> PLAYER_SAVE_DATA = new ArrayList<PlayerSave>(); public static final ArrayList<PlayerSave> PLAYER_SAVE_DATA = new ArrayList<PlayerSave>();
private static Map<Integer, WorldData> worldData = new ConcurrentHashMap<Integer, WorldData>(); private static final Map<Integer, WorldData> WORLD_DATA = new ConcurrentHashMap<Integer, WorldData>();
public final ConcurrentSet<Network> laserRelayNetworks = new ConcurrentSet<Network>(); public final ConcurrentSet<Network> laserRelayNetworks = new ConcurrentSet<Network>();
private ISaveHandler handler; private final ISaveHandler handler;
private int dimension; private final int dimension;
public WorldData(ISaveHandler handler, int dimension){ public WorldData(ISaveHandler handler, int dimension){
this.handler = handler; this.handler = handler;
@ -46,13 +46,13 @@ public class WorldData{
public static WorldData getDataForWorld(World world){ public static WorldData getDataForWorld(World world){
int dim = world.provider.getDimension(); int dim = world.provider.getDimension();
WorldData data = worldData.get(dim); WorldData data = WORLD_DATA.get(dim);
if(data == null){ if(data == null){
data = new WorldData(null, dim); data = new WorldData(null, dim);
if(world.isRemote){ if(world.isRemote){
worldData.put(dim, data); WORLD_DATA.put(dim, data);
ModUtil.LOGGER.info("Creating temporary WorldData for world "+dim+" on the client!"); ModUtil.LOGGER.info("Creating temporary WorldData for world "+dim+" on the client!");
} }
else{ else{
@ -66,7 +66,7 @@ public class WorldData{
public static void load(World world){ public static void load(World world){
if(!world.isRemote && world instanceof WorldServer){ if(!world.isRemote && world instanceof WorldServer){
WorldData data = new WorldData(new WorldSpecificSaveHandler((WorldServer)world, world.getSaveHandler()), world.provider.getDimension()); WorldData data = new WorldData(new WorldSpecificSaveHandler((WorldServer)world, world.getSaveHandler()), world.provider.getDimension());
worldData.put(data.dimension, data); WORLD_DATA.put(data.dimension, data);
try{ try{
File dataFile = data.handler.getMapFileFromName(DATA_TAG+data.dimension); File dataFile = data.handler.getMapFileFromName(DATA_TAG+data.dimension);
@ -92,7 +92,7 @@ public class WorldData{
public static void save(World world){ public static void save(World world){
if(!world.isRemote){ if(!world.isRemote){
WorldData data = worldData.get(world.provider.getDimension()); WorldData data = WORLD_DATA.get(world.provider.getDimension());
if(data != null && data.handler != null){ if(data != null && data.handler != null){
try{ try{
File dataFile = data.handler.getMapFileFromName(DATA_TAG+data.dimension); File dataFile = data.handler.getMapFileFromName(DATA_TAG+data.dimension);
@ -122,7 +122,7 @@ public class WorldData{
public static void unload(World world){ public static void unload(World world){
if(!world.isRemote){ if(!world.isRemote){
worldData.remove(world.provider.getDimension()); WORLD_DATA.remove(world.provider.getDimension());
ModUtil.LOGGER.info("Unloading WorldData for world "+world.provider.getDimension()+"!"); ModUtil.LOGGER.info("Unloading WorldData for world "+world.provider.getDimension()+"!");
} }
} }

View file

@ -18,7 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Loader;
public class InitEvents{ public final class InitEvents{
public static void init(){ public static void init(){
ModUtil.LOGGER.info("Initializing Events..."); ModUtil.LOGGER.info("Initializing Events...");

View file

@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.data.PlayerData;
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats; import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

View file

@ -19,7 +19,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import java.util.Locale; import java.util.Locale;
public class InitFluids{ public final class InitFluids{
public static Fluid fluidCanolaOil; public static Fluid fluidCanolaOil;
public static Fluid fluidOil; public static Fluid fluidOil;

View file

@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraftforge.fml.common.registry.VillagerRegistry; import net.minecraftforge.fml.common.registry.VillagerRegistry;
public class InitVillager{ public final class InitVillager{
public static final String JAM_HOUSE_CHEST_NAME = ModUtil.MOD_ID+".jamHouseChest"; public static final String JAM_HOUSE_CHEST_NAME = ModUtil.MOD_ID+".jamHouseChest";
@ -33,8 +33,8 @@ public class InitVillager{
private static void initJamVillagePart(){ private static void initJamVillagePart(){
//TODO Fix villager //TODO Fix villager
/*int jamID = ConfigIntValues.JAM_VILLAGER_ID.getValue(); /*int jamID = ConfigIntValues.JAM_VILLAGER_ID.getValue();
VillagerRegistry.instance().registerVillagerId(jamID); VillagerRegistry.INSTANCE().registerVillagerId(jamID);
VillagerRegistry.instance().registerVillageTradeHandler(jamID, new JamVillagerTradeHandler()); VillagerRegistry.INSTANCE().registerVillageTradeHandler(jamID, new JamVillagerTradeHandler());
ChestGenHooks jamHouseChest = ChestGenHooks.getInfo(JAM_HOUSE_CHEST_NAME); ChestGenHooks jamHouseChest = ChestGenHooks.getInfo(JAM_HOUSE_CHEST_NAME);
jamHouseChest.setMin(5); jamHouseChest.setMin(5);

View file

@ -50,17 +50,17 @@ public class JamVillagerTradeHandler{
//@Override //@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){ public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){
for(int trade = 0; trade < trades.size(); trade++){ for(int trade = 0; trade < this.trades.size(); trade++){
for(int want = 0; want < trades.get(trade).wants.size(); want++){ for(int want = 0; want < this.trades.get(trade).wants.size(); want++){
ItemStack wantsOne = trades.get(trade).wants.get(want); ItemStack wantsOne = this.trades.get(trade).wants.get(want);
wantsOne.stackSize = MathHelper.getRandomIntegerInRange(rand, trades.get(trade).minStackSize, trades.get(trade).maxStackSize); wantsOne.stackSize = MathHelper.getRandomIntegerInRange(rand, this.trades.get(trade).minStackSize, this.trades.get(trade).maxStackSize);
ItemStack wantsTwo = null; ItemStack wantsTwo = null;
if(rand.nextInt(3) == 0){ if(rand.nextInt(3) == 0){
int randomSecondTrade = rand.nextInt(trades.size()); int randomSecondTrade = rand.nextInt(this.trades.size());
for(int randomSecondWant = 0; randomSecondWant < trades.get(randomSecondTrade).wants.size(); randomSecondWant++){ for(int randomSecondWant = 0; randomSecondWant < this.trades.get(randomSecondTrade).wants.size(); randomSecondWant++){
wantsTwo = trades.get(randomSecondTrade).wants.get(randomSecondWant); wantsTwo = this.trades.get(randomSecondTrade).wants.get(randomSecondWant);
wantsTwo.stackSize = MathHelper.getRandomIntegerInRange(rand, trades.get(randomSecondTrade).minStackSize, trades.get(randomSecondTrade).maxStackSize); wantsTwo.stackSize = MathHelper.getRandomIntegerInRange(rand, this.trades.get(randomSecondTrade).minStackSize, this.trades.get(randomSecondTrade).maxStackSize);
} }
} }
if(wantsOne == wantsTwo){ if(wantsOne == wantsTwo){

View file

@ -26,9 +26,9 @@ import java.util.Random;
public class VillageComponentCustomCropField extends StructureVillagePieces.House1{ public class VillageComponentCustomCropField extends StructureVillagePieces.House1{
private static final int xSize = 13; private static final int X_SIZE = 13;
private static final int ySize = 4; private static final int Y_SIZE = 4;
private static final int zSize = 9; private static final int Z_SIZE = 9;
private int averageGroundLevel = -1; private int averageGroundLevel = -1;
@ -42,7 +42,7 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
} }
public static VillageComponentCustomCropField buildComponent(List pieces, int p1, int p2, int p3, EnumFacing p4){ public static VillageComponentCustomCropField buildComponent(List pieces, int p1, int p2, int p3, EnumFacing p4){
StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, xSize, ySize, zSize, p4); StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, X_SIZE, Y_SIZE, Z_SIZE, p4);
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentCustomCropField(boundingBox, p4) : null; return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentCustomCropField(boundingBox, p4) : null;
} }
@ -53,15 +53,15 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
if(this.averageGroundLevel < 0){ if(this.averageGroundLevel < 0){
return true; return true;
} }
this.boundingBox.offset(0, this.averageGroundLevel-this.boundingBox.maxY+ySize-1, 0); this.boundingBox.offset(0, this.averageGroundLevel-this.boundingBox.maxY+Y_SIZE-1, 0);
} }
this.fillWithBlocks(world, sbb, 0, 0, 0, xSize-1, ySize-1, zSize-1, Blocks.AIR); this.fillWithBlocks(world, sbb, 0, 0, 0, X_SIZE-1, Y_SIZE-1, Z_SIZE-1, Blocks.AIR);
this.spawnActualHouse(world, rand, sbb); this.spawnActualHouse(world, rand, sbb);
for(int i = 0; i < xSize; i++){ for(int i = 0; i < X_SIZE; i++){
for(int j = 0; j < zSize; j++){ for(int j = 0; j < Z_SIZE; j++){
this.clearCurrentPositionBlocksUpwards(world, i, ySize, j, sbb); this.clearCurrentPositionBlocksUpwards(world, i, Y_SIZE, j, sbb);
this.replaceAirAndLiquidDownwards(world, Blocks.DIRT.getDefaultState(), i, -1, j, sbb); this.replaceAirAndLiquidDownwards(world, Blocks.DIRT.getDefaultState(), i, -1, j, sbb);
} }
} }

View file

@ -24,9 +24,9 @@ import java.util.Random;
public class VillageComponentJamHouse extends StructureVillagePieces.House1{ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
private static final int xSize = 11; private static final int X_SIZE = 11;
private static final int ySize = 8; private static final int Y_SIZE = 8;
private static final int zSize = 12; private static final int Z_SIZE = 12;
private int averageGroundLevel = -1; private int averageGroundLevel = -1;
@ -40,7 +40,7 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
} }
public static VillageComponentJamHouse buildComponent(List pieces, int p1, int p2, int p3, EnumFacing p4){ public static VillageComponentJamHouse buildComponent(List pieces, int p1, int p2, int p3, EnumFacing p4){
StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, xSize, ySize, zSize, p4); StructureBoundingBox boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, X_SIZE, Y_SIZE, Z_SIZE, p4);
return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentJamHouse(boundingBox, p4) : null; return canVillageGoDeeper(boundingBox) && StructureComponent.findIntersecting(pieces, boundingBox) == null ? new VillageComponentJamHouse(boundingBox, p4) : null;
} }
@ -51,15 +51,15 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
if(this.averageGroundLevel < 0){ if(this.averageGroundLevel < 0){
return true; return true;
} }
this.boundingBox.offset(0, this.averageGroundLevel-this.boundingBox.maxY+ySize-1, 0); this.boundingBox.offset(0, this.averageGroundLevel-this.boundingBox.maxY+Y_SIZE-1, 0);
} }
this.fillWithBlocks(world, sbb, 0, 0, 0, xSize-1, ySize-1, zSize-1, Blocks.AIR); this.fillWithBlocks(world, sbb, 0, 0, 0, X_SIZE-1, Y_SIZE-1, Z_SIZE-1, Blocks.AIR);
this.spawnActualHouse(world, rand, sbb); this.spawnActualHouse(world, rand, sbb);
for(int i = 0; i < xSize; i++){ for(int i = 0; i < X_SIZE; i++){
for(int j = 0; j < zSize; j++){ for(int j = 0; j < Z_SIZE; j++){
this.clearCurrentPositionBlocksUpwards(world, i, ySize, j, sbb); this.clearCurrentPositionBlocksUpwards(world, i, Y_SIZE, j, sbb);
this.replaceAirAndLiquidDownwards(world, Blocks.COBBLESTONE.getDefaultState(), i, -1, j, sbb); this.replaceAirAndLiquidDownwards(world, Blocks.COBBLESTONE.getDefaultState(), i, -1, j, sbb);
} }
} }

View file

@ -44,10 +44,10 @@ public class ContainerBreaker extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 9; int inventoryStart = 9;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -42,10 +42,10 @@ public class ContainerCanolaPress extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 1; int inventoryStart = 1;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -41,10 +41,10 @@ public class ContainerCoalGenerator extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 1; int inventoryStart = 1;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -52,10 +52,10 @@ public class ContainerCoffeeMachine extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 11; int inventoryStart = 11;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -44,10 +44,10 @@ public class ContainerDirectionalBreaker extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 9; int inventoryStart = 9;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -66,10 +66,10 @@ public class ContainerDrill extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 5; int inventoryStart = 5;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -44,10 +44,10 @@ public class ContainerDropper extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 9; int inventoryStart = 9;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -70,10 +70,10 @@ public class ContainerEnergizer extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 2; int inventoryStart = 2;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -69,10 +69,10 @@ public class ContainerEnervator extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 2; int inventoryStart = 2;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -39,10 +39,10 @@ public class ContainerFeeder extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 1; int inventoryStart = 1;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -38,10 +38,10 @@ public class ContainerFermentingBarrel extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 0; int inventoryStart = 0;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -63,10 +63,10 @@ public class ContainerFilter extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = SLOT_AMOUNT; int inventoryStart = SLOT_AMOUNT;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -38,10 +38,10 @@ public class ContainerFluidCollector extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 0; int inventoryStart = 0;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -45,10 +45,10 @@ public class ContainerFurnaceDouble extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 4; int inventoryStart = 4;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -45,10 +45,10 @@ public class ContainerGiantChest extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 117; int inventoryStart = 117;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -51,10 +51,10 @@ public class ContainerGrinder extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = this.isDouble ? 6 : 3; int inventoryStart = this.isDouble ? 6 : 3;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -56,10 +56,10 @@ public class ContainerInputter extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = this.isAdvanced ? 25 : 1; int inventoryStart = this.isAdvanced ? 25 : 1;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -48,10 +48,10 @@ public class ContainerLaserRelayItemWhitelist extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 0; int inventoryStart = 0;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -44,10 +44,10 @@ public class ContainerMiner extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 9; int inventoryStart = 9;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -37,10 +37,10 @@ public class ContainerOilGenerator extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 0; int inventoryStart = 0;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -44,10 +44,10 @@ public class ContainerPhantomPlacer extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 9; int inventoryStart = 9;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -51,10 +51,10 @@ public class ContainerRangedCollector extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 18; int inventoryStart = 18;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -42,10 +42,10 @@ public class ContainerRepairer extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 2; int inventoryStart = 2;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -41,10 +41,10 @@ public class ContainerXPSolidifier extends Container{
@Override @Override
public ItemStack transferStackInSlot(EntityPlayer player, int slot){ public ItemStack transferStackInSlot(EntityPlayer player, int slot){
final int inventoryStart = 1; int inventoryStart = 1;
final int inventoryEnd = inventoryStart+26; int inventoryEnd = inventoryStart+26;
final int hotbarStart = inventoryEnd+1; int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8; int hotbarEnd = hotbarStart+8;
Slot theSlot = this.inventorySlots.get(slot); Slot theSlot = this.inventorySlots.get(slot);

View file

@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiBreaker extends GuiContainer{ public class GuiBreaker extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiBreaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiBreaker");
private final TileEntityBreaker breaker; private final TileEntityBreaker breaker;
public GuiBreaker(InventoryPlayer inventory, TileEntityBase tile){ public GuiBreaker(InventoryPlayer inventory, TileEntityBase tile){
@ -46,7 +46,7 @@ public class GuiBreaker extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
} }
} }

View file

@ -27,7 +27,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCanolaPress extends GuiContainer{ public class GuiCanolaPress extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiCanolaPress"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiCanolaPress");
private final TileEntityCanolaPress press; private final TileEntityCanolaPress press;
public GuiCanolaPress(InventoryPlayer inventory, TileEntityBase tile){ public GuiCanolaPress(InventoryPlayer inventory, TileEntityBase tile){
@ -63,7 +63,7 @@ public class GuiCanolaPress extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.press.storage.getEnergyStored() > 0){ if(this.press.storage.getEnergyStored() > 0){

View file

@ -26,7 +26,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCoalGenerator extends GuiContainer{ public class GuiCoalGenerator extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiCoalGenerator"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiCoalGenerator");
private final TileEntityCoalGenerator generator; private final TileEntityCoalGenerator generator;
public GuiCoalGenerator(InventoryPlayer inventory, TileEntityBase tile){ public GuiCoalGenerator(InventoryPlayer inventory, TileEntityBase tile){
@ -57,7 +57,7 @@ public class GuiCoalGenerator extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.generator.storage.getEnergyStored() > 0){ if(this.generator.storage.getEnergyStored() > 0){

View file

@ -34,7 +34,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCoffeeMachine extends GuiContainer{ public class GuiCoffeeMachine extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiCoffeeMachine"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiCoffeeMachine");
private final TileEntityCoffeeMachine machine; private final TileEntityCoffeeMachine machine;
private final int x; private final int x;
private final int y; private final int y;
@ -91,7 +91,7 @@ public class GuiCoffeeMachine extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.machine.storage.getEnergyStored() > 0){ if(this.machine.storage.getEnergyStored() > 0){

View file

@ -23,7 +23,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiCrafter extends GuiContainer{ public class GuiCrafter extends GuiContainer{
private static final ResourceLocation resLoc = new ResourceLocation("textures/gui/container/crafting_table.png"); private static final ResourceLocation RES_LOC = new ResourceLocation("textures/gui/container/crafting_table.png");
public GuiCrafter(EntityPlayer player){ public GuiCrafter(EntityPlayer player){
super(new ContainerCrafter(player)); super(new ContainerCrafter(player));
@ -40,7 +40,7 @@ public class GuiCrafter extends GuiContainer{
@Override @Override
public void drawGuiContainerBackgroundLayer(float f, int x, int y){ public void drawGuiContainerBackgroundLayer(float f, int x, int y){
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
} }
} }

View file

@ -26,7 +26,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiDirectionalBreaker extends GuiContainer{ public class GuiDirectionalBreaker extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiDirectionalBreaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiDirectionalBreaker");
private final TileEntityDirectionalBreaker breaker; private final TileEntityDirectionalBreaker breaker;
public GuiDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile){ public GuiDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile){
@ -58,7 +58,7 @@ public class GuiDirectionalBreaker extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.breaker.storage.getEnergyStored() > 0){ if(this.breaker.storage.getEnergyStored() > 0){

View file

@ -23,7 +23,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiDrill extends GuiContainer{ public class GuiDrill extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiDrill"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiDrill");
public GuiDrill(InventoryPlayer inventory){ public GuiDrill(InventoryPlayer inventory){
super(new ContainerDrill(inventory)); super(new ContainerDrill(inventory));
@ -43,7 +43,7 @@ public class GuiDrill extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+54, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+54, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 54); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 54);
} }
} }

View file

@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiDropper extends GuiContainer{ public class GuiDropper extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiBreaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiBreaker");
private final TileEntityDropper dropper; private final TileEntityDropper dropper;
public GuiDropper(InventoryPlayer inventory, TileEntityBase tile){ public GuiDropper(InventoryPlayer inventory, TileEntityBase tile){
@ -46,7 +46,7 @@ public class GuiDropper extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
} }
} }

View file

@ -26,7 +26,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiEnergizer extends GuiContainer{ public class GuiEnergizer extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiEnergizer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiEnergizer");
private final TileEntityEnergizer energizer; private final TileEntityEnergizer energizer;
public GuiEnergizer(EntityPlayer inventory, TileEntityBase tile){ public GuiEnergizer(EntityPlayer inventory, TileEntityBase tile){
@ -57,7 +57,7 @@ public class GuiEnergizer extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.energizer.storage.getEnergyStored() > 0){ if(this.energizer.storage.getEnergyStored() > 0){

View file

@ -26,7 +26,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiEnervator extends GuiContainer{ public class GuiEnervator extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiEnergizer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiEnergizer");
private final TileEntityEnervator enervator; private final TileEntityEnervator enervator;
public GuiEnervator(EntityPlayer inventory, TileEntityBase tile){ public GuiEnervator(EntityPlayer inventory, TileEntityBase tile){
@ -57,7 +57,7 @@ public class GuiEnervator extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.enervator.storage.getEnergyStored() > 0){ if(this.enervator.storage.getEnergyStored() > 0){

View file

@ -28,7 +28,7 @@ import java.util.Arrays;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFeeder extends GuiContainer{ public class GuiFeeder extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiFeeder"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiFeeder");
public final TileEntityFeeder tileFeeder; public final TileEntityFeeder tileFeeder;
public GuiFeeder(InventoryPlayer inventory, TileEntityBase tile){ public GuiFeeder(InventoryPlayer inventory, TileEntityBase tile){
@ -57,7 +57,7 @@ public class GuiFeeder extends GuiContainer{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+70, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+70, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 70); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 70);
if(this.tileFeeder.currentTimer > 0){ if(this.tileFeeder.currentTimer > 0){

View file

@ -27,7 +27,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFermentingBarrel extends GuiContainer{ public class GuiFermentingBarrel extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiFermentingBarrel"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiFermentingBarrel");
private final TileEntityFermentingBarrel press; private final TileEntityFermentingBarrel press;
public GuiFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile){ public GuiFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile){
@ -64,7 +64,7 @@ public class GuiFermentingBarrel extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.press.canolaTank.getFluidAmount() > 0){ if(this.press.canolaTank.getFluidAmount() > 0){

View file

@ -27,7 +27,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFluidCollector extends GuiContainer{ public class GuiFluidCollector extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiFluidCollector"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiFluidCollector");
private final TileEntityFluidCollector collector; private final TileEntityFluidCollector collector;
public GuiFluidCollector(InventoryPlayer inventory, TileEntityBase tile){ public GuiFluidCollector(InventoryPlayer inventory, TileEntityBase tile){
@ -59,7 +59,7 @@ public class GuiFluidCollector extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.collector.tank.getFluidAmount() > 0){ if(this.collector.tank.getFluidAmount() > 0){

View file

@ -26,7 +26,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiFurnaceDouble extends GuiContainer{ public class GuiFurnaceDouble extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiFurnaceDouble"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiFurnaceDouble");
private final TileEntityFurnaceDouble tileFurnace; private final TileEntityFurnaceDouble tileFurnace;
public GuiFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile){ public GuiFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile){
@ -57,7 +57,7 @@ public class GuiFurnaceDouble extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.tileFurnace.storage.getEnergyStored() > 0){ if(this.tileFurnace.storage.getEnergyStored() > 0){

View file

@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiGiantChest extends GuiContainer{ public class GuiGiantChest extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiGiantChest"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiGiantChest");
final TileEntityGiantChest chest; final TileEntityGiantChest chest;
@ -44,7 +44,7 @@ public class GuiGiantChest extends GuiContainer{
@Override @Override
public void drawGuiContainerBackgroundLayer(float f, int x, int y){ public void drawGuiContainerBackgroundLayer(float f, int x, int y){
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 242, 190); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 242, 190);
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft+33, this.guiTop+172, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft+33, this.guiTop+172, 0, 0, 176, 86);

View file

@ -26,8 +26,8 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiGrinder extends GuiContainer{ public class GuiGrinder extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiGrinder"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiGrinder");
private static final ResourceLocation resLocDouble = AssetUtil.getGuiLocation("guiGrinderDouble"); private static final ResourceLocation RES_LOC_DOUBLE = AssetUtil.getGuiLocation("guiGrinderDouble");
private final TileEntityGrinder tileGrinder; private final TileEntityGrinder tileGrinder;
private final boolean isDouble; private final boolean isDouble;
@ -64,7 +64,7 @@ public class GuiGrinder extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(this.isDouble ? resLocDouble : resLoc); this.mc.getTextureManager().bindTexture(this.isDouble ? RES_LOC_DOUBLE : RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.tileGrinder.storage.getEnergyStored() > 0){ if(this.tileGrinder.storage.getEnergyStored() > 0){

View file

@ -26,7 +26,6 @@ import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
@ -37,7 +36,7 @@ import java.util.List;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiLaserRelayItemWhitelist extends GuiContainer{ public class GuiLaserRelayItemWhitelist extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiLaserRelayItemWhitelist"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiLaserRelayItemWhitelist");
private final TileEntityLaserRelayItemWhitelist tile; private final TileEntityLaserRelayItemWhitelist tile;
private SmallerButton whitelistLeft; private SmallerButton whitelistLeft;
@ -124,7 +123,7 @@ public class GuiLaserRelayItemWhitelist extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
} }

View file

@ -30,7 +30,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiMiner extends GuiContainer{ public class GuiMiner extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiBreaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiBreaker");
private final TileEntityMiner miner; private final TileEntityMiner miner;
public GuiMiner(InventoryPlayer inventory, TileEntityBase tile){ public GuiMiner(InventoryPlayer inventory, TileEntityBase tile){
@ -63,7 +63,7 @@ public class GuiMiner extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything"; String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything";

View file

@ -27,7 +27,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiOilGenerator extends GuiContainer{ public class GuiOilGenerator extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiOilGenerator"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiOilGenerator");
private final TileEntityOilGenerator generator; private final TileEntityOilGenerator generator;
public GuiOilGenerator(InventoryPlayer inventory, TileEntityBase tile){ public GuiOilGenerator(InventoryPlayer inventory, TileEntityBase tile){
@ -62,7 +62,7 @@ public class GuiOilGenerator extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.generator.storage.getEnergyStored() > 0){ if(this.generator.storage.getEnergyStored() > 0){

View file

@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiPhantomPlacer extends GuiContainer{ public class GuiPhantomPlacer extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiBreaker"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiBreaker");
private final TileEntityPhantomPlacer placer; private final TileEntityPhantomPlacer placer;
public GuiPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile){ public GuiPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile){
@ -46,7 +46,7 @@ public class GuiPhantomPlacer extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
} }
} }

View file

@ -34,7 +34,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiRangedCollector extends GuiContainer{ public class GuiRangedCollector extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiRangedCollector"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiRangedCollector");
private final TileEntityRangedCollector collector; private final TileEntityRangedCollector collector;
private final int x; private final int x;
private final int y; private final int y;
@ -85,7 +85,7 @@ public class GuiRangedCollector extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+86, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+86, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 86);
} }

View file

@ -26,7 +26,7 @@ import java.util.Collections;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiRepairer extends GuiContainer{ public class GuiRepairer extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiRepairer"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiRepairer");
private final TileEntityItemRepairer tileRepairer; private final TileEntityItemRepairer tileRepairer;
public GuiRepairer(InventoryPlayer inventory, TileEntityBase tile){ public GuiRepairer(InventoryPlayer inventory, TileEntityBase tile){
@ -57,7 +57,7 @@ public class GuiRepairer extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
if(this.tileRepairer.storage.getEnergyStored() > 0){ if(this.tileRepairer.storage.getEnergyStored() > 0){

View file

@ -35,7 +35,7 @@ import java.io.IOException;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiSmileyCloud extends GuiContainer{ public class GuiSmileyCloud extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiSmileyCloud"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiSmileyCloud");
private final int x; private final int x;
private final int y; private final int y;
@ -76,7 +76,7 @@ public class GuiSmileyCloud extends GuiContainer{
public void drawGuiContainerBackgroundLayer(float f, int x, int y){ public void drawGuiContainerBackgroundLayer(float f, int x, int y){
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
this.nameField.drawTextBox(); this.nameField.drawTextBox();

View file

@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiXPSolidifier extends GuiContainer{ public class GuiXPSolidifier extends GuiContainer{
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiXPSolidifier"); private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiXPSolidifier");
private final TileEntityXPSolidifier solidifier; private final TileEntityXPSolidifier solidifier;
private final int x; private final int x;
private final int y; private final int y;
@ -86,7 +86,7 @@ public class GuiXPSolidifier extends GuiContainer{
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(resLoc); this.mc.getTextureManager().bindTexture(RES_LOC);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
this.drawCenteredString(this.fontRendererObj, Integer.toString(this.solidifier.amount), this.guiLeft+88, this.guiTop+30, StringUtil.DECIMAL_COLOR_WHITE); this.drawCenteredString(this.fontRendererObj, Integer.toString(this.solidifier.amount), this.guiLeft+88, this.guiTop+30, StringUtil.DECIMAL_COLOR_WHITE);

View file

@ -24,14 +24,14 @@ import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapelessOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe;
public class InitForeignPaxels{ public final class InitForeignPaxels{
public static final int[] MT_COLORS = new int[]{4166, 2248890, 8882649, 12410135, 11451392, 3684412}; public static final int[] MT_COLORS = new int[]{4166, 2248890, 8882649, 12410135, 11451392, 3684412};
public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"}; public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"};
public static final int[] TF_COLORS = new int[]{13332762, 5407943, 5407895, 5394789, 12960613, 12960653, 12410135, 2999795, 10143162}; public static final int[] TF_COLORS = new int[]{13332762, 5407943, 5407895, 5394789, 12960613, 12960653, 12410135, 2999795, 10143162};
public static final int[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032}; public static final int[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032};
public static final Item[] tfPaxels = new Item[9]; public static final Item[] TF_PAXELS = new Item[9];
public static final Item[] soPaxels = new Item[5]; public static final Item[] SO_PAXELS = new Item[5];
//MekanismTools //MekanismTools
private static final String MEKANISM_TOOLS = "MekanismTools"; private static final String MEKANISM_TOOLS = "MekanismTools";
private static final String[] MT_REPAIR_NAMES = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"}; private static final String[] MT_REPAIR_NAMES = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"};
@ -42,7 +42,7 @@ public class InitForeignPaxels{
private static final String SIMPLE_ORES = "simpleores"; private static final String SIMPLE_ORES = "simpleores";
private static final String[] SO_NAMES = new String[]{"tin", "mythril", "copper", "onyx", "adamantium"}; private static final String[] SO_NAMES = new String[]{"tin", "mythril", "copper", "onyx", "adamantium"};
private static final String[] SO_REPAIR_NAMES = new String[]{"ingotTin", "ingotMythril", "ingotCopper", "gemOnyx", "ingotAdamantium"}; private static final String[] SO_REPAIR_NAMES = new String[]{"ingotTin", "ingotMythril", "ingotCopper", "gemOnyx", "ingotAdamantium"};
private static final Item[] mtPaxels = new Item[6]; private static final Item[] MT_PAXELS = new Item[6];
public static void init(){ public static void init(){
//SimpleOres //SimpleOres
@ -50,7 +50,7 @@ public class InitForeignPaxels{
if(Loader.isModLoaded(SIMPLE_ORES)){ if(Loader.isModLoaded(SIMPLE_ORES)){
ModUtil.LOGGER.info("Initializing "+SIMPLE_ORES+" AIOTs..."); ModUtil.LOGGER.info("Initializing "+SIMPLE_ORES+" AIOTs...");
for(int i = 0; i < soPaxels.length; i++){ for(int i = 0; i < SO_PAXELS.length; i++){
Item axe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_axe"); Item axe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_axe");
Item pickaxe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_pickaxe"); Item pickaxe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_pickaxe");
Item hoe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_hoe"); Item hoe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_hoe");
@ -59,11 +59,11 @@ public class InitForeignPaxels{
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial(); Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial();
soPaxels[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.RARE, SO_COLORS[i]); SO_PAXELS[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.RARE, SO_COLORS[i]);
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(soPaxels[i], axe, pickaxe, hoe, sword, shovel)); GameRegistry.addRecipe(new ShapelessOreRecipe(SO_PAXELS[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(RecipeUtil.lastIRecipe()); ToolCrafting.RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
} }
} }
} }
@ -78,7 +78,7 @@ public class InitForeignPaxels{
if(Loader.isModLoaded(MEKANISM_TOOLS)){ if(Loader.isModLoaded(MEKANISM_TOOLS)){
ModUtil.LOGGER.info("Initializing "+MEKANISM_TOOLS+" AIOTs..."); ModUtil.LOGGER.info("Initializing "+MEKANISM_TOOLS+" AIOTs...");
for(int i = 0; i < mtPaxels.length; i++){ for(int i = 0; i < MT_PAXELS.length; i++){
Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe"); Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe");
Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe"); Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe");
Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe"); Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe");
@ -87,11 +87,11 @@ public class InitForeignPaxels{
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial(); Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial();
mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.RARE, MT_COLORS[i]); MT_PAXELS[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.RARE, MT_COLORS[i]);
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel)); GameRegistry.addRecipe(new ShapelessOreRecipe(MT_PAXELS[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(RecipeUtil.lastIRecipe()); ToolCrafting.RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
} }
} }
} }
@ -106,7 +106,7 @@ public class InitForeignPaxels{
if(Loader.isModLoaded(THERMAL_FOUNDATION)){ if(Loader.isModLoaded(THERMAL_FOUNDATION)){
ModUtil.LOGGER.info("Initializing "+THERMAL_FOUNDATION+" AIOTs..."); ModUtil.LOGGER.info("Initializing "+THERMAL_FOUNDATION+" AIOTs...");
for(int i = 0; i < tfPaxels.length; i++){ for(int i = 0; i < TF_PAXELS.length; i++){
Item axe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.axe"+TF_NAMES[i]); Item axe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.axe"+TF_NAMES[i]);
Item pickaxe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.pickaxe"+TF_NAMES[i]); Item pickaxe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.pickaxe"+TF_NAMES[i]);
Item hoe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.hoe"+TF_NAMES[i]); Item hoe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.hoe"+TF_NAMES[i]);
@ -115,11 +115,11 @@ public class InitForeignPaxels{
if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){
Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial(); Item.ToolMaterial material = ((ItemTool)axe).getToolMaterial();
tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.RARE, TF_COLORS[i]); TF_PAXELS[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.RARE, TF_COLORS[i]);
if(ConfigCrafting.PAXELS.isEnabled()){ if(ConfigCrafting.PAXELS.isEnabled()){
GameRegistry.addRecipe(new ShapelessOreRecipe(tfPaxels[i], axe, pickaxe, hoe, sword, shovel)); GameRegistry.addRecipe(new ShapelessOreRecipe(TF_PAXELS[i], axe, pickaxe, hoe, sword, shovel));
ToolCrafting.recipesPaxels.add(RecipeUtil.lastIRecipe()); ToolCrafting.RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
} }
} }
} }
@ -131,19 +131,19 @@ public class InitForeignPaxels{
} }
public static void addToCreativeTab(){ public static void addToCreativeTab(){
for(Item item : tfPaxels){ for(Item item : TF_PAXELS){
if(item != null){ if(item != null){
CreativeTab.instance.add(item); CreativeTab.INSTANCE.add(item);
} }
} }
for(Item item : mtPaxels){ for(Item item : MT_PAXELS){
if(item != null){ if(item != null){
CreativeTab.instance.add(item); CreativeTab.INSTANCE.add(item);
} }
} }
for(Item item : soPaxels){ for(Item item : SO_PAXELS){
if(item != null){ if(item != null){
CreativeTab.instance.add(item); CreativeTab.INSTANCE.add(item);
} }
} }
} }

View file

@ -22,17 +22,16 @@ import de.ellpeck.actuallyadditions.mod.items.metalists.TheFoods;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials; import de.ellpeck.actuallyadditions.mod.material.InitArmorMaterials;
import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials; import de.ellpeck.actuallyadditions.mod.material.InitToolMaterials;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
import de.ellpeck.actuallyadditions.mod.util.ModUtil; import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.Util;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.Loader;
public class InitItems{ public final class InitItems{
public static Item itemBooklet; public static Item itemBooklet;

View file

@ -40,27 +40,27 @@ public class ItemCrystal extends ItemBase{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+BlockCrystal.allCrystals[stack.getItemDamage()].name; return stack.getItemDamage() >= BlockCrystal.ALL_CRYSTALS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+BlockCrystal.ALL_CRYSTALS[stack.getItemDamage()].name;
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? EnumRarity.COMMON : BlockCrystal.allCrystals[stack.getItemDamage()].rarity; return stack.getItemDamage() >= BlockCrystal.ALL_CRYSTALS.length ? EnumRarity.COMMON : BlockCrystal.ALL_CRYSTALS[stack.getItemDamage()].rarity;
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < BlockCrystal.allCrystals.length; j++){ for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
list.add(new ItemStack(this, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < BlockCrystal.allCrystals.length; i++){ for(int i = 0; i < BlockCrystal.ALL_CRYSTALS.length; i++){
String name = this.getRegistryName()+BlockCrystal.allCrystals[i].name; String name = this.getRegistryName()+BlockCrystal.ALL_CRYSTALS[i].name;
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory"); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory");
} }
} }

View file

@ -73,6 +73,32 @@ public class ItemDrill extends ItemEnergy{
this.setHarvestLevel("pickaxe", HARVEST_LEVEL); this.setHarvestLevel("pickaxe", HARVEST_LEVEL);
} }
/**
* Gets all of the Slots from NBT
*
* @param stack The Drill
*/
public static void loadSlotsFromNBT(ItemStack[] slots, ItemStack stack){
NBTTagCompound compound = stack.getTagCompound();
if(compound != null){
TileEntityInventoryBase.loadSlots(slots, compound);
}
}
/**
* Writes all of the Slots to NBT
*
* @param slots The Slots
* @param stack The Drill
*/
public static void writeSlotsToNBT(ItemStack[] slots, ItemStack stack){
NBTTagCompound compound = stack.getTagCompound();
if(compound == null){
compound = new NBTTagCompound();
}
TileEntityInventoryBase.saveSlots(slots, compound);
stack.setTagCompound(compound);
}
@Override @Override
//Places Blocks if the Placing Upgrade is installed //Places Blocks if the Placing Upgrade is installed
@ -139,19 +165,6 @@ public class ItemDrill extends ItemEnergy{
return null; return null;
} }
/**
* Gets all of the Slots from NBT
*
* @param stack The Drill
*/
public static void loadSlotsFromNBT(ItemStack[] slots, ItemStack stack){
NBTTagCompound compound = stack.getTagCompound();
if(compound != null){
TileEntityInventoryBase.loadSlots(slots, compound);
}
}
@Override @Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){ public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
if(!world.isRemote && player.isSneaking()){ if(!world.isRemote && player.isSneaking()){
@ -197,13 +210,11 @@ public class ItemDrill extends ItemEnergy{
} }
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return EnumRarity.EPIC; return EnumRarity.EPIC;
} }
@Override @Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){ public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){
Multimap<String, AttributeModifier> map = super.getAttributeModifiers(slot, stack); Multimap<String, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
@ -263,7 +274,6 @@ public class ItemDrill extends ItemEnergy{
return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || block.getMaterial(state).isToolNotRequired() || (block == Blocks.SNOW_LAYER || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? harvestLevel >= 3 : (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE ? (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK ? (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE ? (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE ? (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE ? (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE ? (block.getMaterial(state) == Material.ROCK || (block.getMaterial(state) == Material.IRON || block.getMaterial(state) == Material.ANVIL)) : harvestLevel >= 2) : harvestLevel >= 1) : harvestLevel >= 1) : harvestLevel >= 2) : harvestLevel >= 2) : harvestLevel >= 2)))); return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || block.getMaterial(state).isToolNotRequired() || (block == Blocks.SNOW_LAYER || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? harvestLevel >= 3 : (block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE ? (block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK ? (block != Blocks.GOLD_BLOCK && block != Blocks.GOLD_ORE ? (block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE ? (block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE ? (block != Blocks.REDSTONE_ORE && block != Blocks.LIT_REDSTONE_ORE ? (block.getMaterial(state) == Material.ROCK || (block.getMaterial(state) == Material.IRON || block.getMaterial(state) == Material.ANVIL)) : harvestLevel >= 2) : harvestLevel >= 1) : harvestLevel >= 1) : harvestLevel >= 2) : harvestLevel >= 2) : harvestLevel >= 2))));
} }
@Override @Override
public Set<String> getToolClasses(ItemStack stack){ public Set<String> getToolClasses(ItemStack stack){
HashSet<String> hashSet = new HashSet<String>(); HashSet<String> hashSet = new HashSet<String>();
@ -388,21 +398,6 @@ public class ItemDrill extends ItemEnergy{
return efficiency; return efficiency;
} }
/**
* Writes all of the Slots to NBT
*
* @param slots The Slots
* @param stack The Drill
*/
public static void writeSlotsToNBT(ItemStack[] slots, ItemStack stack){
NBTTagCompound compound = stack.getTagCompound();
if(compound == null){
compound = new NBTTagCompound();
}
TileEntityInventoryBase.saveSlots(slots, compound);
stack.setTagCompound(compound);
}
/** /**
* Breaks Blocks in a certain Radius * Breaks Blocks in a certain Radius
* Has to be called on both Server and Client * Has to be called on both Server and Client

View file

@ -27,7 +27,7 @@ import java.util.List;
public class ItemDust extends ItemBase implements IColorProvidingItem{ public class ItemDust extends ItemBase implements IColorProvidingItem{
public static final TheDusts[] allDusts = TheDusts.values(); public static final TheDusts[] ALL_DUSTS = TheDusts.values();
public ItemDust(String name){ public ItemDust(String name){
super(name); super(name);
@ -42,26 +42,26 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= allDusts.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allDusts[stack.getItemDamage()].name; return stack.getItemDamage() >= ALL_DUSTS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_DUSTS[stack.getItemDamage()].name;
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= allDusts.length ? EnumRarity.COMMON : allDusts[stack.getItemDamage()].rarity; return stack.getItemDamage() >= ALL_DUSTS.length ? EnumRarity.COMMON : ALL_DUSTS[stack.getItemDamage()].rarity;
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allDusts.length; j++){ for(int j = 0; j < ALL_DUSTS.length; j++){
list.add(new ItemStack(this, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allDusts.length; i++){ for(int i = 0; i < ALL_DUSTS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory"); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
} }
} }
@ -72,7 +72,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
return new IItemColor(){ return new IItemColor(){
@Override @Override
public int getColorFromItemstack(ItemStack stack, int pass){ public int getColorFromItemstack(ItemStack stack, int pass){
return stack.getItemDamage() >= allDusts.length ? 0xFFFFFF : allDusts[stack.getItemDamage()].color; return stack.getItemDamage() >= ALL_DUSTS.length ? 0xFFFFFF : ALL_DUSTS[stack.getItemDamage()].color;
} }
}; };
} }

View file

@ -11,7 +11,6 @@
package de.ellpeck.actuallyadditions.mod.items; package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill;
import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;

View file

@ -31,7 +31,7 @@ import java.util.List;
public class ItemFoods extends ItemFoodBase{ public class ItemFoods extends ItemFoodBase{
public static final TheFoods[] allFoods = TheFoods.values(); public static final TheFoods[] ALL_FOODS = TheFoods.values();
public ItemFoods(String name){ public ItemFoods(String name){
super(0, 0.0F, false, name); super(0, 0.0F, false, name);
@ -43,7 +43,7 @@ public class ItemFoods extends ItemFoodBase{
@Override @Override
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase player){ public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase player){
ItemStack stackToReturn = super.onItemUseFinish(stack, world, player); ItemStack stackToReturn = super.onItemUseFinish(stack, world, player);
ItemStack returnItem = stack.getItemDamage() >= allFoods.length ? null : allFoods[stack.getItemDamage()].returnItem; ItemStack returnItem = stack.getItemDamage() >= ALL_FOODS.length ? null : ALL_FOODS[stack.getItemDamage()].returnItem;
if(returnItem != null && player instanceof EntityPlayer){ if(returnItem != null && player instanceof EntityPlayer){
if(!((EntityPlayer)player).inventory.addItemStackToInventory(returnItem.copy())){ if(!((EntityPlayer)player).inventory.addItemStackToInventory(returnItem.copy())){
if(!world.isRemote){ if(!world.isRemote){
@ -58,23 +58,23 @@ public class ItemFoods extends ItemFoodBase{
@Override @Override
public int getMaxItemUseDuration(ItemStack stack){ public int getMaxItemUseDuration(ItemStack stack){
return stack.getItemDamage() >= allFoods.length ? 0 : allFoods[stack.getItemDamage()].useDuration; return stack.getItemDamage() >= ALL_FOODS.length ? 0 : ALL_FOODS[stack.getItemDamage()].useDuration;
} }
@Override @Override
public EnumAction getItemUseAction(ItemStack stack){ public EnumAction getItemUseAction(ItemStack stack){
return stack.getItemDamage() >= allFoods.length ? EnumAction.EAT : (allFoods[stack.getItemDamage()].getsDrunken ? EnumAction.DRINK : EnumAction.EAT); return stack.getItemDamage() >= ALL_FOODS.length ? EnumAction.EAT : (ALL_FOODS[stack.getItemDamage()].getsDrunken ? EnumAction.DRINK : EnumAction.EAT);
} }
@Override @Override
public int getHealAmount(ItemStack stack){ public int getHealAmount(ItemStack stack){
return stack.getItemDamage() >= allFoods.length ? 0 : allFoods[stack.getItemDamage()].healAmount; return stack.getItemDamage() >= ALL_FOODS.length ? 0 : ALL_FOODS[stack.getItemDamage()].healAmount;
} }
@Override @Override
public float getSaturationModifier(ItemStack stack){ public float getSaturationModifier(ItemStack stack){
return stack.getItemDamage() >= allFoods.length ? 0 : allFoods[stack.getItemDamage()].saturation; return stack.getItemDamage() >= ALL_FOODS.length ? 0 : ALL_FOODS[stack.getItemDamage()].saturation;
} }
@Override @Override
@ -85,27 +85,27 @@ public class ItemFoods extends ItemFoodBase{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= allFoods.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allFoods[stack.getItemDamage()].name; return stack.getItemDamage() >= ALL_FOODS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_FOODS[stack.getItemDamage()].name;
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= allFoods.length ? EnumRarity.COMMON : allFoods[stack.getItemDamage()].rarity; return stack.getItemDamage() >= ALL_FOODS.length ? EnumRarity.COMMON : ALL_FOODS[stack.getItemDamage()].rarity;
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allFoods.length; j++){ for(int j = 0; j < ALL_FOODS.length; j++){
list.add(new ItemStack(this, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allFoods.length; i++){ for(int i = 0; i < ALL_FOODS.length; i++){
String name = this.getRegistryName()+allFoods[i].name; String name = this.getRegistryName()+ALL_FOODS[i].name;
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name), "inventory"); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name), "inventory");
} }
} }

View file

@ -34,7 +34,7 @@ import java.util.List;
public class ItemJams extends ItemFoodBase implements IColorProvidingItem{ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
public static final TheJams[] allJams = TheJams.values(); public static final TheJams[] ALL_JAMS = TheJams.values();
public ItemJams(String name){ public ItemJams(String name){
super(0, 0.0F, false, name); super(0, 0.0F, false, name);
@ -51,19 +51,19 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= allJams.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allJams[stack.getItemDamage()].name; return stack.getItemDamage() >= ALL_JAMS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_JAMS[stack.getItemDamage()].name;
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= allJams.length ? EnumRarity.COMMON : allJams[stack.getItemDamage()].rarity; return stack.getItemDamage() >= ALL_JAMS.length ? EnumRarity.COMMON : ALL_JAMS[stack.getItemDamage()].rarity;
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allJams.length; j++){ for(int j = 0; j < ALL_JAMS.length; j++){
list.add(new ItemStack(this, 1, j)); list.add(new ItemStack(this, 1, j));
} }
} }
@ -72,11 +72,11 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase player){ public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase player){
ItemStack stackToReturn = super.onItemUseFinish(stack, world, player); ItemStack stackToReturn = super.onItemUseFinish(stack, world, player);
if(player instanceof EntityPlayer && !world.isRemote && stack.getItemDamage() < allJams.length){ if(player instanceof EntityPlayer && !world.isRemote && stack.getItemDamage() < ALL_JAMS.length){
PotionEffect firstEffectToGet = new PotionEffect(Potion.getPotionById(allJams[stack.getItemDamage()].firstEffectToGet), 200); PotionEffect firstEffectToGet = new PotionEffect(Potion.getPotionById(ALL_JAMS[stack.getItemDamage()].firstEffectToGet), 200);
player.addPotionEffect(firstEffectToGet); player.addPotionEffect(firstEffectToGet);
PotionEffect secondEffectToGet = new PotionEffect(Potion.getPotionById(allJams[stack.getItemDamage()].secondEffectToGet), 600); PotionEffect secondEffectToGet = new PotionEffect(Potion.getPotionById(ALL_JAMS[stack.getItemDamage()].secondEffectToGet), 600);
player.addPotionEffect(secondEffectToGet); player.addPotionEffect(secondEffectToGet);
ItemStack returnItem = new ItemStack(Items.GLASS_BOTTLE); ItemStack returnItem = new ItemStack(Items.GLASS_BOTTLE);
@ -91,17 +91,17 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
@Override @Override
public int getHealAmount(ItemStack stack){ public int getHealAmount(ItemStack stack){
return stack.getItemDamage() >= allJams.length ? 0 : allJams[stack.getItemDamage()].healAmount; return stack.getItemDamage() >= ALL_JAMS.length ? 0 : ALL_JAMS[stack.getItemDamage()].healAmount;
} }
@Override @Override
public float getSaturationModifier(ItemStack stack){ public float getSaturationModifier(ItemStack stack){
return stack.getItemDamage() >= allJams.length ? 0 : allJams[stack.getItemDamage()].saturation; return stack.getItemDamage() >= ALL_JAMS.length ? 0 : ALL_JAMS[stack.getItemDamage()].saturation;
} }
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allJams.length; i++){ for(int i = 0; i < ALL_JAMS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory"); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
} }
} }
@ -112,7 +112,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
return new IItemColor(){ return new IItemColor(){
@Override @Override
public int getColorFromItemstack(ItemStack stack, int pass){ public int getColorFromItemstack(ItemStack stack, int pass){
return pass > 0 ? (stack.getItemDamage() >= allJams.length ? 0xFFFFFF : allJams[stack.getItemDamage()].color) : 0xFFFFFF; return pass > 0 ? (stack.getItemDamage() >= ALL_JAMS.length ? 0xFFFFFF : ALL_JAMS[stack.getItemDamage()].color) : 0xFFFFFF;
} }
}; };
} }

View file

@ -136,7 +136,7 @@ public class ItemLaserWrench extends ItemBase{
NO_PARTICLES("never show particles"), NO_PARTICLES("never show particles"),
HOLDING_PARTICLES("show particles when holding a Laser Wrench"); HOLDING_PARTICLES("show particles when holding a Laser Wrench");
public String name; public final String name;
WrenchMode(String name){ WrenchMode(String name){
this.name = name; this.name = name;

View file

@ -26,7 +26,7 @@ import java.util.List;
public class ItemMisc extends ItemBase{ public class ItemMisc extends ItemBase{
public static final TheMiscItems[] allMiscItems = TheMiscItems.values(); public static final TheMiscItems[] ALL_MISC_ITEMS = TheMiscItems.values();
public ItemMisc(String name){ public ItemMisc(String name){
super(name); super(name);
@ -40,19 +40,19 @@ public class ItemMisc extends ItemBase{
@Override @Override
public String getUnlocalizedName(ItemStack stack){ public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= allMiscItems.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allMiscItems[stack.getItemDamage()].name; return stack.getItemDamage() >= ALL_MISC_ITEMS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+ALL_MISC_ITEMS[stack.getItemDamage()].name;
} }
@Override @Override
public EnumRarity getRarity(ItemStack stack){ public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= allMiscItems.length ? EnumRarity.COMMON : allMiscItems[stack.getItemDamage()].rarity; return stack.getItemDamage() >= ALL_MISC_ITEMS.length ? EnumRarity.COMMON : ALL_MISC_ITEMS[stack.getItemDamage()].rarity;
} }
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List list){ public void getSubItems(Item item, CreativeTabs tab, List list){
for(int j = 0; j < allMiscItems.length; j++){ for(int j = 0; j < ALL_MISC_ITEMS.length; j++){
if(j != TheMiscItems.YOUTUBE_ICON.ordinal()){ if(j != TheMiscItems.YOUTUBE_ICON.ordinal()){
list.add(new ItemStack(this, 1, j)); list.add(new ItemStack(this, 1, j));
} }
@ -61,8 +61,8 @@ public class ItemMisc extends ItemBase{
@Override @Override
protected void registerRendering(){ protected void registerRendering(){
for(int i = 0; i < allMiscItems.length; i++){ for(int i = 0; i < ALL_MISC_ITEMS.length; i++){
String name = this.getRegistryName()+allMiscItems[i].name; String name = this.getRegistryName()+ALL_MISC_ITEMS[i].name;
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory"); ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory");
} }
} }

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