mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Massive cleanup
This commit is contained in:
parent
ace2753c86
commit
262976074e
157 changed files with 603 additions and 662 deletions
|
@ -174,7 +174,7 @@ public final class ActuallyAdditionsAPI{
|
|||
* @param output The output as an ItemStack
|
||||
* @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.
|
||||
* 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){
|
||||
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 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
|
||||
* 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){
|
||||
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.
|
||||
* 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.
|
||||
*
|
||||
* @param item The item (or block's item) to add
|
||||
|
|
|
@ -15,10 +15,10 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public class CompostRecipe{
|
||||
|
||||
public ItemStack input;
|
||||
public ItemStack output;
|
||||
public Block inputDisplay;
|
||||
public Block outputDisplay;
|
||||
public final ItemStack input;
|
||||
public final ItemStack output;
|
||||
public final Block inputDisplay;
|
||||
public final Block outputDisplay;
|
||||
|
||||
public CompostRecipe(ItemStack input, Block inputDisplay, ItemStack output, Block outputDisplay){
|
||||
this.input = input;
|
||||
|
|
|
@ -16,10 +16,8 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
|||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator;
|
||||
import de.ellpeck.actuallyadditions.mod.util.PosUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -41,8 +41,8 @@ import java.util.Random;
|
|||
|
||||
public class BlockColoredLamp extends BlockBase{
|
||||
|
||||
public static final TheColoredLampColors[] allLampTypes = TheColoredLampColors.values();
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, allLampTypes.length-1);
|
||||
public static final TheColoredLampColors[] ALL_LAMP_TYPES = TheColoredLampColors.values();
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_LAMP_TYPES.length-1);
|
||||
public final boolean isOn;
|
||||
|
||||
public BlockColoredLamp(boolean isOn, String name){
|
||||
|
@ -106,7 +106,7 @@ public class BlockColoredLamp extends BlockBase{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ public class BlockColoredLamp extends BlockBase{
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class BlockColoredLamp extends BlockBase{
|
|||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack){
|
||||
if(stack.getItemDamage() >= allLampTypes.length){
|
||||
if(stack.getItemDamage() >= ALL_LAMP_TYPES.length){
|
||||
return StringUtil.BUGGED_ITEM_NAME;
|
||||
}
|
||||
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
|
||||
public String getUnlocalizedName(ItemStack stack){
|
||||
return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name;
|
||||
return InitBlocks.blockColoredLamp.getUnlocalizedName()+ALL_LAMP_TYPES[stack.getItemDamage()].name;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,8 +30,8 @@ import java.util.List;
|
|||
|
||||
public class BlockCrystal extends BlockBase{
|
||||
|
||||
public static final TheCrystals[] allCrystals = TheCrystals.values();
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, allCrystals.length-1);
|
||||
public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values();
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_CRYSTALS.length-1);
|
||||
|
||||
public BlockCrystal(String name){
|
||||
super(Material.ROCK, name);
|
||||
|
@ -48,7 +48,7 @@ public class BlockCrystal extends BlockBase{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -60,14 +60,14 @@ public class BlockCrystal extends BlockBase{
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@ -86,7 +86,7 @@ public class BlockCrystal extends BlockBase{
|
|||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.blocks;
|
|||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer;
|
||||
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
|
|
@ -15,12 +15,9 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
|||
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
|
||||
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
|
||||
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.util.PosUtil;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyInteger;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
|
|
@ -40,8 +40,8 @@ import java.util.List;
|
|||
|
||||
public class BlockWildPlant extends BlockBushBase{
|
||||
|
||||
public static final TheWildPlants[] allWildPlants = TheWildPlants.values();
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, allWildPlants.length-1);
|
||||
public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values();
|
||||
private static final PropertyInteger META = PropertyInteger.create("meta", 0, ALL_WILD_PLANTS.length-1);
|
||||
|
||||
public BlockWildPlant(String name){
|
||||
super(name);
|
||||
|
@ -59,13 +59,13 @@ public class BlockWildPlant extends BlockBushBase{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player){
|
||||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public class BlockWildPlant extends BlockBushBase{
|
|||
@Override
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){
|
||||
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
|
||||
|
@ -93,14 +93,14 @@ public class BlockWildPlant extends BlockBushBase{
|
|||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
@ -119,7 +119,7 @@ public class BlockWildPlant extends BlockBushBase{
|
|||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.BlockStair;
|
||||
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.compat.CompatUtil;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class InitBlocks{
|
||||
public final class InitBlocks{
|
||||
|
||||
public static Block blockCompost;
|
||||
public static Block blockMisc;
|
||||
|
|
|
@ -37,7 +37,7 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer{
|
|||
|
||||
if(theCloud.name != null && !theCloud.name.isEmpty()){
|
||||
easterEggs:
|
||||
for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.cloudStuff){
|
||||
for(ISmileyCloudEasterEgg cloud : SmileyCloudEasterEggs.CLOUD_STUFF){
|
||||
for(String triggerName : cloud.getTriggerNames()){
|
||||
if(triggerName != null && theCloud.name != null){
|
||||
if(triggerName.equalsIgnoreCase(theCloud.name)){
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class BookletUtils{
|
||||
public final class BookletUtils{
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public static void drawTitle(GuiBooklet booklet){
|
||||
booklet.mc.getTextureManager().bindTexture(GuiBooklet.resLoc);
|
||||
booklet.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
|
||||
//Upper title
|
||||
booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize/2-142/2, booklet.guiTop-12, 0, 240, 142, 12);
|
||||
//Lower title
|
||||
|
@ -134,7 +134,7 @@ public class BookletUtils{
|
|||
for(Achievement achievement : InitAchievements.ACHIEVEMENT_LIST){
|
||||
if(achievement.theItemStack != null && ItemUtil.areItemsEqual(stack, achievement.theItemStack, true)){
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -57,10 +57,10 @@ import java.util.List;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class GuiBooklet extends GuiScreen implements IBookletGui{
|
||||
|
||||
public static final ResourceLocation resLoc = AssetUtil.getBookletGuiLocation("guiBooklet");
|
||||
public static final ResourceLocation resLocHalloween = AssetUtil.getBookletGuiLocation("guiBookletHalloween");
|
||||
public static final ResourceLocation resLocChristmas = AssetUtil.getBookletGuiLocation("guiBookletChristmas");
|
||||
public static final ResourceLocation resLocValentine = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay");
|
||||
public static final ResourceLocation RES_LOC = AssetUtil.getBookletGuiLocation("guiBooklet");
|
||||
public static final ResourceLocation RES_LOC_HALLOWEEN = AssetUtil.getBookletGuiLocation("guiBookletHalloween");
|
||||
public static final ResourceLocation RES_LOC_CHRISTMAS = AssetUtil.getBookletGuiLocation("guiBookletChristmas");
|
||||
public static final ResourceLocation RES_LOC_VALENTINE = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay");
|
||||
|
||||
public static final int CHAPTER_BUTTONS_AMOUNT = 13;
|
||||
public static final int INDEX_BUTTONS_OFFSET = 3;
|
||||
|
@ -88,10 +88,10 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
|
|||
public GuiButton buttonPatreon;
|
||||
public GuiButton buttonViewOnline;
|
||||
public GuiTextField searchField;
|
||||
public boolean changedPageSinceOpen;
|
||||
private int ticksElapsed;
|
||||
private boolean mousePressed;
|
||||
private int hisNameIsAt;
|
||||
public boolean changedPageSinceOpen;
|
||||
|
||||
public GuiBooklet(GuiScreen parentScreen, boolean tryOpenMainPage, boolean saveOnClose){
|
||||
this.xSize = 146;
|
||||
|
@ -128,12 +128,12 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
|
|||
|
||||
//Draws the Background
|
||||
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);
|
||||
|
||||
//Draws the search bar
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public class GuiBookletStand extends GuiBooklet{
|
|||
|
||||
private GuiButton buttonSetPage;
|
||||
|
||||
private TileEntityBookletStand theStand;
|
||||
private final TileEntityBookletStand theStand;
|
||||
|
||||
public GuiBookletStand(TileEntityBase theStand){
|
||||
super(null, false, false);
|
||||
|
|
|
@ -34,11 +34,10 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class InitBooklet{
|
||||
public final class InitBooklet{
|
||||
|
||||
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));
|
||||
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("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("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));
|
||||
|
@ -78,7 +77,7 @@ public class InitBooklet{
|
|||
ArrayList<BookletPage> lampPages = new ArrayList<BookletPage>();
|
||||
lampPages.add(new PageTextOnly(lampPages.size()+1));
|
||||
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());
|
||||
}
|
||||
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("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("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("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();
|
||||
ArrayList<BookletPage> aiotPages = new ArrayList<BookletPage>();
|
||||
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());
|
||||
}
|
||||
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>();
|
||||
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());
|
||||
}
|
||||
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();
|
||||
|
||||
//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("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));
|
||||
|
|
|
@ -57,7 +57,7 @@ public class BookmarkButton extends GuiButton{
|
|||
@Override
|
||||
public void drawButton(Minecraft minecraft, int x, int y){
|
||||
if(this.visible){
|
||||
minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc);
|
||||
minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
|
||||
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;
|
||||
int k = this.getHoverState(this.hovered);
|
||||
|
|
|
@ -46,7 +46,7 @@ public class TexturedButton extends GuiButton{
|
|||
@Override
|
||||
public void drawButton(Minecraft minecraft, int x, int y){
|
||||
if(this.visible){
|
||||
minecraft.getTextureManager().bindTexture(GuiBooklet.resLoc);
|
||||
minecraft.getTextureManager().bindTexture(GuiBooklet.RES_LOC);
|
||||
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;
|
||||
int k = this.getHoverState(this.hovered);
|
||||
|
|
|
@ -77,8 +77,7 @@ public class BookletChapter implements IBookletChapter{
|
|||
this.color = TextFormatting.DARK_GREEN;
|
||||
}
|
||||
|
||||
public BookletChapter setSpecial(){
|
||||
public void setSpecial(){
|
||||
this.color = TextFormatting.DARK_PURPLE;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class BookletChapterCrusher extends BookletChapter{
|
|||
ArrayList<BookletPage> allPages = new ArrayList<BookletPage>();
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class PageCoffeeRecipe extends BookletPageAA{
|
|||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class PageCrafting extends BookletPageAA{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class PageCrusherRecipe extends BookletPageAA{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class PageFurnace extends BookletPageAA{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.mod.booklet.BookletUtils;
|
|||
|
||||
public class PageLinkButton extends PageButton{
|
||||
|
||||
private String link;
|
||||
private final String link;
|
||||
|
||||
public PageLinkButton(int id, String link){
|
||||
super(id);
|
||||
|
|
|
@ -47,7 +47,7 @@ public class PageReconstructor extends BookletPageAA{
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ package de.ellpeck.actuallyadditions.mod.config;
|
|||
import de.ellpeck.actuallyadditions.mod.config.values.*;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ConfigValues{
|
||||
public final class ConfigValues{
|
||||
|
||||
public static void defineConfigValues(Configuration config){
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
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 recipePhantomface;
|
||||
public static IRecipe recipeLiquiface;
|
||||
|
@ -704,14 +704,14 @@ public class BlockCrafting{
|
|||
}
|
||||
|
||||
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),
|
||||
"GCG", "DQD", "GCG",
|
||||
'C', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.LAPIS.ordinal()),
|
||||
'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())));
|
||||
recipesLamps[i] = RecipeUtil.lastIRecipe();
|
||||
RECIPES_LAMPS[i] = RecipeUtil.lastIRecipe();
|
||||
}
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLampPowerer, 4),
|
||||
|
|
|
@ -24,9 +24,9 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
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 recipeGoldHorseArmor;
|
||||
public static CrusherRecipe recipeDiamondHorseArmor;
|
||||
|
@ -35,38 +35,38 @@ public class CrusherCrafting{
|
|||
ModUtil.LOGGER.info("Initializing Crusher Recipes...");
|
||||
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
|
||||
ActuallyAdditionsAPI.addCrusherRecipe("oreRedstone", "dustRedstone", 10);
|
||||
ActuallyAdditionsAPI.addCrusherRecipe("oreLapis", "gemLapis", 12);
|
||||
|
@ -79,10 +79,10 @@ public class CrusherCrafting{
|
|||
ActuallyAdditionsAPI.addCrusherRecipe("stone", "cobblestone", 1);
|
||||
|
||||
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));
|
||||
miscRecipes.add(RecipeUtil.lastCrusherRecipe());
|
||||
MISC_RECIPES.add(RecipeUtil.lastCrusherRecipe());
|
||||
|
||||
ActuallyAdditionsAPI.addCrusherRecipe("oreNickel", "dustNickel", 2, "dustPlatinum", 1, 15);
|
||||
ActuallyAdditionsAPI.addCrusherRecipe("oreIron", "dustIron", 2, "dustGold", 1, 20);
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class FoodCrafting{
|
||||
public final class FoodCrafting{
|
||||
|
||||
public static IRecipe recipePizza;
|
||||
public static IRecipe recipeHamburger;
|
||||
|
|
|
@ -17,7 +17,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class InitCrafting{
|
||||
public final class InitCrafting{
|
||||
|
||||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Crafting Recipes...");
|
||||
|
|
|
@ -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.items.InitItems;
|
||||
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.Util;
|
||||
import net.minecraft.block.IGrowable;
|
||||
|
@ -28,7 +27,6 @@ import net.minecraft.item.ItemFood;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
@ -36,11 +34,11 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|||
|
||||
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> recipesDrillColoring = new ArrayList<IRecipe>();
|
||||
public static final ArrayList<IRecipe> recipesPotionRings = new ArrayList<IRecipe>();
|
||||
public static final ArrayList<IRecipe> RECIPES_MASHED_FOOD = new ArrayList<IRecipe>();
|
||||
public static final ArrayList<IRecipe> RECIPES_DRILL_COLORING = new ArrayList<IRecipe>();
|
||||
public static final ArrayList<IRecipe> RECIPES_POTION_RINGS = new ArrayList<IRecipe>();
|
||||
public static IRecipe recipePhantomConnector;
|
||||
public static IRecipe recipeCoil;
|
||||
public static IRecipe recipeCoilAdvanced;
|
||||
|
@ -195,7 +193,7 @@ public class ItemCrafting{
|
|||
for(int i = 0; i < 16; i++){
|
||||
if(i != TheColoredLampColors.LIGHT_BLUE.ordinal()){
|
||||
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){
|
||||
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()));
|
||||
recipesPotionRings.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_POTION_RINGS.add(RecipeUtil.lastIRecipe());
|
||||
}
|
||||
|
||||
public static void initMashedFoodRecipes(){
|
||||
|
@ -564,7 +562,7 @@ public class ItemCrafting{
|
|||
if(!isBlacklisted(item)){
|
||||
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));
|
||||
recipesMashedFood.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_MASHED_FOOD.add(RecipeUtil.lastIRecipe());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
|||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
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[] recipesCrystalBlocks = new IRecipe[TheCrystals.values().length];
|
||||
public static final IRecipe[] RECIPES_CRYSTALS = new IRecipe[TheCrystals.values().length];
|
||||
public static final IRecipe[] RECIPES_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
|
||||
|
||||
public static void init(){
|
||||
|
||||
|
@ -36,9 +36,9 @@ public class MiscCrafting{
|
|||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCrystal, 1, i),
|
||||
"XXX", "XXX", "XXX",
|
||||
'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)));
|
||||
recipesCrystals[i] = RecipeUtil.lastIRecipe();
|
||||
RECIPES_CRYSTALS[i] = RecipeUtil.lastIRecipe();
|
||||
}
|
||||
|
||||
//Dough
|
||||
|
|
|
@ -26,9 +26,9 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|||
|
||||
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(){
|
||||
|
||||
|
@ -61,56 +61,56 @@ public class ToolCrafting{
|
|||
new ItemStack(Items.WOODEN_SHOVEL),
|
||||
new ItemStack(Items.WOODEN_SWORD),
|
||||
new ItemStack(Items.WOODEN_HOE)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.stonePaxel),
|
||||
new ItemStack(Items.STONE_AXE),
|
||||
new ItemStack(Items.STONE_PICKAXE),
|
||||
new ItemStack(Items.STONE_SHOVEL),
|
||||
new ItemStack(Items.STONE_SWORD),
|
||||
new ItemStack(Items.STONE_HOE)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.ironPaxel),
|
||||
new ItemStack(Items.IRON_AXE),
|
||||
new ItemStack(Items.IRON_PICKAXE),
|
||||
new ItemStack(Items.IRON_SHOVEL),
|
||||
new ItemStack(Items.IRON_SWORD),
|
||||
new ItemStack(Items.IRON_HOE)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.goldPaxel),
|
||||
new ItemStack(Items.GOLDEN_AXE),
|
||||
new ItemStack(Items.GOLDEN_PICKAXE),
|
||||
new ItemStack(Items.GOLDEN_SHOVEL),
|
||||
new ItemStack(Items.GOLDEN_SWORD),
|
||||
new ItemStack(Items.GOLDEN_HOE)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.diamondPaxel),
|
||||
new ItemStack(Items.DIAMOND_AXE),
|
||||
new ItemStack(Items.DIAMOND_PICKAXE),
|
||||
new ItemStack(Items.DIAMOND_SHOVEL),
|
||||
new ItemStack(Items.DIAMOND_SWORD),
|
||||
new ItemStack(Items.DIAMOND_HOE)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.emeraldPaxel),
|
||||
new ItemStack(InitItems.itemAxeEmerald),
|
||||
new ItemStack(InitItems.itemPickaxeEmerald),
|
||||
new ItemStack(InitItems.itemSwordEmerald),
|
||||
new ItemStack(InitItems.itemShovelEmerald),
|
||||
new ItemStack(InitItems.itemHoeEmerald)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.obsidianPaxel),
|
||||
new ItemStack(InitItems.itemAxeObsidian),
|
||||
new ItemStack(InitItems.itemPickaxeObsidian),
|
||||
new ItemStack(InitItems.itemSwordObsidian),
|
||||
new ItemStack(InitItems.itemShovelObsidian),
|
||||
new ItemStack(InitItems.itemHoeObsidian)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.quartzPaxel),
|
||||
new ItemStack(InitItems.itemAxeQuartz),
|
||||
new ItemStack(InitItems.itemPickaxeQuartz),
|
||||
new ItemStack(InitItems.itemSwordQuartz),
|
||||
new ItemStack(InitItems.itemShovelQuartz),
|
||||
new ItemStack(InitItems.itemHoeQuartz)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalRed),
|
||||
new ItemStack(InitItems.itemAxeCrystalRed),
|
||||
|
@ -118,42 +118,42 @@ public class ToolCrafting{
|
|||
new ItemStack(InitItems.itemSwordCrystalRed),
|
||||
new ItemStack(InitItems.itemShovelCrystalRed),
|
||||
new ItemStack(InitItems.itemHoeCrystalRed)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalGreen),
|
||||
new ItemStack(InitItems.itemAxeCrystalGreen),
|
||||
new ItemStack(InitItems.itemPickaxeCrystalGreen),
|
||||
new ItemStack(InitItems.itemSwordCrystalGreen),
|
||||
new ItemStack(InitItems.itemShovelCrystalGreen),
|
||||
new ItemStack(InitItems.itemHoeCrystalGreen)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlue),
|
||||
new ItemStack(InitItems.itemAxeCrystalBlue),
|
||||
new ItemStack(InitItems.itemPickaxeCrystalBlue),
|
||||
new ItemStack(InitItems.itemSwordCrystalBlue),
|
||||
new ItemStack(InitItems.itemShovelCrystalBlue),
|
||||
new ItemStack(InitItems.itemHoeCrystalBlue)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalLightBlue),
|
||||
new ItemStack(InitItems.itemAxeCrystalLightBlue),
|
||||
new ItemStack(InitItems.itemPickaxeCrystalLightBlue),
|
||||
new ItemStack(InitItems.itemSwordCrystalLightBlue),
|
||||
new ItemStack(InitItems.itemShovelCrystalLightBlue),
|
||||
new ItemStack(InitItems.itemHoeCrystalLightBlue)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalBlack),
|
||||
new ItemStack(InitItems.itemAxeCrystalBlack),
|
||||
new ItemStack(InitItems.itemPickaxeCrystalBlack),
|
||||
new ItemStack(InitItems.itemSwordCrystalBlack),
|
||||
new ItemStack(InitItems.itemShovelCrystalBlack),
|
||||
new ItemStack(InitItems.itemHoeCrystalBlack)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemPaxelCrystalWhite),
|
||||
new ItemStack(InitItems.itemAxeCrystalWhite),
|
||||
new ItemStack(InitItems.itemPickaxeCrystalWhite),
|
||||
new ItemStack(InitItems.itemSwordCrystalWhite),
|
||||
new ItemStack(InitItems.itemShovelCrystalWhite),
|
||||
new ItemStack(InitItems.itemHoeCrystalWhite)));
|
||||
recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.List;
|
|||
|
||||
public class CreativeTab extends CreativeTabs{
|
||||
|
||||
public static final CreativeTab instance = new CreativeTab();
|
||||
public static final CreativeTab INSTANCE = new CreativeTab();
|
||||
private List<ItemStack> list;
|
||||
|
||||
public CreativeTab(){
|
||||
|
@ -310,13 +310,13 @@ public class CreativeTab extends CreativeTabs{
|
|||
|
||||
public void add(Item item){
|
||||
if(item != null){
|
||||
item.getSubItems(item, instance, this.list);
|
||||
item.getSubItems(item, INSTANCE, this.list);
|
||||
}
|
||||
}
|
||||
|
||||
public void add(Block block){
|
||||
if(block != null){
|
||||
block.getSubBlocks(new ItemStack(block).getItem(), instance, this.list);
|
||||
block.getSubBlocks(new ItemStack(block).getItem(), INSTANCE, this.list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
public class PlayerData{
|
||||
public final class PlayerData{
|
||||
|
||||
public static PlayerSave getDataFromPlayer(EntityPlayer player){
|
||||
ArrayList<PlayerSave> data = WorldData.PLAYER_SAVE_DATA;
|
||||
|
|
|
@ -34,10 +34,10 @@ public class WorldData{
|
|||
|
||||
public static final String DATA_TAG = ModUtil.MOD_ID+"data";
|
||||
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>();
|
||||
private ISaveHandler handler;
|
||||
private int dimension;
|
||||
private final ISaveHandler handler;
|
||||
private final int dimension;
|
||||
|
||||
public WorldData(ISaveHandler handler, int dimension){
|
||||
this.handler = handler;
|
||||
|
@ -46,13 +46,13 @@ public class WorldData{
|
|||
|
||||
public static WorldData getDataForWorld(World world){
|
||||
int dim = world.provider.getDimension();
|
||||
WorldData data = worldData.get(dim);
|
||||
WorldData data = WORLD_DATA.get(dim);
|
||||
|
||||
if(data == null){
|
||||
data = new WorldData(null, dim);
|
||||
|
||||
if(world.isRemote){
|
||||
worldData.put(dim, data);
|
||||
WORLD_DATA.put(dim, data);
|
||||
ModUtil.LOGGER.info("Creating temporary WorldData for world "+dim+" on the client!");
|
||||
}
|
||||
else{
|
||||
|
@ -66,7 +66,7 @@ public class WorldData{
|
|||
public static void load(World world){
|
||||
if(!world.isRemote && world instanceof WorldServer){
|
||||
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{
|
||||
File dataFile = data.handler.getMapFileFromName(DATA_TAG+data.dimension);
|
||||
|
@ -92,7 +92,7 @@ public class WorldData{
|
|||
|
||||
public static void save(World world){
|
||||
if(!world.isRemote){
|
||||
WorldData data = worldData.get(world.provider.getDimension());
|
||||
WorldData data = WORLD_DATA.get(world.provider.getDimension());
|
||||
if(data != null && data.handler != null){
|
||||
try{
|
||||
File dataFile = data.handler.getMapFileFromName(DATA_TAG+data.dimension);
|
||||
|
@ -122,7 +122,7 @@ public class WorldData{
|
|||
|
||||
public static void unload(World world){
|
||||
if(!world.isRemote){
|
||||
worldData.remove(world.provider.getDimension());
|
||||
WORLD_DATA.remove(world.provider.getDimension());
|
||||
ModUtil.LOGGER.info("Unloading WorldData for world "+world.provider.getDimension()+"!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ import de.ellpeck.actuallyadditions.mod.util.Util;
|
|||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
|
||||
public class InitEvents{
|
||||
public final class InitEvents{
|
||||
|
||||
public static void init(){
|
||||
ModUtil.LOGGER.info("Initializing Events...");
|
||||
|
|
|
@ -14,7 +14,6 @@ import de.ellpeck.actuallyadditions.mod.data.PlayerData;
|
|||
import de.ellpeck.actuallyadditions.mod.items.ItemWingsOfTheBats;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
|
|
@ -19,7 +19,7 @@ import net.minecraftforge.fluids.FluidRegistry;
|
|||
|
||||
import java.util.Locale;
|
||||
|
||||
public class InitFluids{
|
||||
public final class InitFluids{
|
||||
|
||||
public static Fluid fluidCanolaOil;
|
||||
public static Fluid fluidOil;
|
||||
|
|
|
@ -15,7 +15,7 @@ import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
|||
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
||||
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";
|
||||
|
||||
|
@ -33,8 +33,8 @@ public class InitVillager{
|
|||
private static void initJamVillagePart(){
|
||||
//TODO Fix villager
|
||||
/*int jamID = ConfigIntValues.JAM_VILLAGER_ID.getValue();
|
||||
VillagerRegistry.instance().registerVillagerId(jamID);
|
||||
VillagerRegistry.instance().registerVillageTradeHandler(jamID, new JamVillagerTradeHandler());
|
||||
VillagerRegistry.INSTANCE().registerVillagerId(jamID);
|
||||
VillagerRegistry.INSTANCE().registerVillageTradeHandler(jamID, new JamVillagerTradeHandler());
|
||||
|
||||
ChestGenHooks jamHouseChest = ChestGenHooks.getInfo(JAM_HOUSE_CHEST_NAME);
|
||||
jamHouseChest.setMin(5);
|
||||
|
|
|
@ -50,17 +50,17 @@ public class JamVillagerTradeHandler{
|
|||
|
||||
//@Override
|
||||
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random rand){
|
||||
for(int trade = 0; trade < trades.size(); trade++){
|
||||
for(int want = 0; want < trades.get(trade).wants.size(); want++){
|
||||
ItemStack wantsOne = trades.get(trade).wants.get(want);
|
||||
wantsOne.stackSize = MathHelper.getRandomIntegerInRange(rand, trades.get(trade).minStackSize, trades.get(trade).maxStackSize);
|
||||
for(int trade = 0; trade < this.trades.size(); trade++){
|
||||
for(int want = 0; want < this.trades.get(trade).wants.size(); want++){
|
||||
ItemStack wantsOne = this.trades.get(trade).wants.get(want);
|
||||
wantsOne.stackSize = MathHelper.getRandomIntegerInRange(rand, this.trades.get(trade).minStackSize, this.trades.get(trade).maxStackSize);
|
||||
|
||||
ItemStack wantsTwo = null;
|
||||
if(rand.nextInt(3) == 0){
|
||||
int randomSecondTrade = rand.nextInt(trades.size());
|
||||
for(int randomSecondWant = 0; randomSecondWant < trades.get(randomSecondTrade).wants.size(); randomSecondWant++){
|
||||
wantsTwo = trades.get(randomSecondTrade).wants.get(randomSecondWant);
|
||||
wantsTwo.stackSize = MathHelper.getRandomIntegerInRange(rand, trades.get(randomSecondTrade).minStackSize, trades.get(randomSecondTrade).maxStackSize);
|
||||
int randomSecondTrade = rand.nextInt(this.trades.size());
|
||||
for(int randomSecondWant = 0; randomSecondWant < this.trades.get(randomSecondTrade).wants.size(); randomSecondWant++){
|
||||
wantsTwo = this.trades.get(randomSecondTrade).wants.get(randomSecondWant);
|
||||
wantsTwo.stackSize = MathHelper.getRandomIntegerInRange(rand, this.trades.get(randomSecondTrade).minStackSize, this.trades.get(randomSecondTrade).maxStackSize);
|
||||
}
|
||||
}
|
||||
if(wantsOne == wantsTwo){
|
||||
|
|
|
@ -26,9 +26,9 @@ import java.util.Random;
|
|||
|
||||
public class VillageComponentCustomCropField extends StructureVillagePieces.House1{
|
||||
|
||||
private static final int xSize = 13;
|
||||
private static final int ySize = 4;
|
||||
private static final int zSize = 9;
|
||||
private static final int X_SIZE = 13;
|
||||
private static final int Y_SIZE = 4;
|
||||
private static final int Z_SIZE = 9;
|
||||
|
||||
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){
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -53,15 +53,15 @@ public class VillageComponentCustomCropField extends StructureVillagePieces.Hous
|
|||
if(this.averageGroundLevel < 0){
|
||||
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);
|
||||
|
||||
for(int i = 0; i < xSize; i++){
|
||||
for(int j = 0; j < zSize; j++){
|
||||
this.clearCurrentPositionBlocksUpwards(world, i, ySize, j, sbb);
|
||||
for(int i = 0; i < X_SIZE; i++){
|
||||
for(int j = 0; j < Z_SIZE; j++){
|
||||
this.clearCurrentPositionBlocksUpwards(world, i, Y_SIZE, j, sbb);
|
||||
this.replaceAirAndLiquidDownwards(world, Blocks.DIRT.getDefaultState(), i, -1, j, sbb);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ import java.util.Random;
|
|||
|
||||
public class VillageComponentJamHouse extends StructureVillagePieces.House1{
|
||||
|
||||
private static final int xSize = 11;
|
||||
private static final int ySize = 8;
|
||||
private static final int zSize = 12;
|
||||
private static final int X_SIZE = 11;
|
||||
private static final int Y_SIZE = 8;
|
||||
private static final int Z_SIZE = 12;
|
||||
|
||||
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){
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -51,15 +51,15 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{
|
|||
if(this.averageGroundLevel < 0){
|
||||
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);
|
||||
|
||||
for(int i = 0; i < xSize; i++){
|
||||
for(int j = 0; j < zSize; j++){
|
||||
this.clearCurrentPositionBlocksUpwards(world, i, ySize, j, sbb);
|
||||
for(int i = 0; i < X_SIZE; i++){
|
||||
for(int j = 0; j < Z_SIZE; j++){
|
||||
this.clearCurrentPositionBlocksUpwards(world, i, Y_SIZE, j, sbb);
|
||||
this.replaceAirAndLiquidDownwards(world, Blocks.COBBLESTONE.getDefaultState(), i, -1, j, sbb);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,10 +44,10 @@ public class ContainerBreaker extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 9;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 9;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ public class ContainerCanolaPress extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 1;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 1;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ public class ContainerCoalGenerator extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 1;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 1;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -52,10 +52,10 @@ public class ContainerCoffeeMachine extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 11;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 11;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ public class ContainerDirectionalBreaker extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 9;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 9;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -66,10 +66,10 @@ public class ContainerDrill extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 5;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 5;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ public class ContainerDropper extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 9;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 9;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -70,10 +70,10 @@ public class ContainerEnergizer extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 2;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 2;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -69,10 +69,10 @@ public class ContainerEnervator extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 2;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 2;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -39,10 +39,10 @@ public class ContainerFeeder extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 1;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 1;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@ public class ContainerFermentingBarrel extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 0;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 0;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -63,10 +63,10 @@ public class ContainerFilter extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = SLOT_AMOUNT;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = SLOT_AMOUNT;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -38,10 +38,10 @@ public class ContainerFluidCollector extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 0;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 0;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ public class ContainerFurnaceDouble extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 4;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 4;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ public class ContainerGiantChest extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 117;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 117;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ public class ContainerGrinder extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = this.isDouble ? 6 : 3;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = this.isDouble ? 6 : 3;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -56,10 +56,10 @@ public class ContainerInputter extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = this.isAdvanced ? 25 : 1;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = this.isAdvanced ? 25 : 1;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -48,10 +48,10 @@ public class ContainerLaserRelayItemWhitelist extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 0;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 0;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ public class ContainerMiner extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 9;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 9;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ public class ContainerOilGenerator extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 0;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 0;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ public class ContainerPhantomPlacer extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 9;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 9;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ public class ContainerRangedCollector extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 18;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 18;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -42,10 +42,10 @@ public class ContainerRepairer extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 2;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 2;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ public class ContainerXPSolidifier extends Container{
|
|||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot){
|
||||
final int inventoryStart = 1;
|
||||
final int inventoryEnd = inventoryStart+26;
|
||||
final int hotbarStart = inventoryEnd+1;
|
||||
final int hotbarEnd = hotbarStart+8;
|
||||
int inventoryStart = 1;
|
||||
int inventoryEnd = inventoryStart+26;
|
||||
int hotbarStart = inventoryEnd+1;
|
||||
int hotbarEnd = hotbarStart+8;
|
||||
|
||||
Slot theSlot = this.inventorySlots.get(slot);
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiBreaker(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -46,7 +46,7 @@ public class GuiBreaker extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiCanolaPress(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -63,7 +63,7 @@ public class GuiCanolaPress extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.press.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiCoalGenerator(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -57,7 +57,7 @@ public class GuiCoalGenerator extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.generator.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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 int x;
|
||||
private final int y;
|
||||
|
@ -91,7 +91,7 @@ public class GuiCoffeeMachine extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.machine.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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){
|
||||
super(new ContainerCrafter(player));
|
||||
|
@ -40,7 +40,7 @@ public class GuiCrafter extends GuiContainer{
|
|||
@Override
|
||||
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiDirectionalBreaker(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -58,7 +58,7 @@ public class GuiDirectionalBreaker extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.breaker.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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){
|
||||
super(new ContainerDrill(inventory));
|
||||
|
@ -43,7 +43,7 @@ public class GuiDrill extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiDropper(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -46,7 +46,7 @@ public class GuiDropper extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiEnergizer(EntityPlayer inventory, TileEntityBase tile){
|
||||
|
@ -57,7 +57,7 @@ public class GuiEnergizer extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.energizer.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiEnervator(EntityPlayer inventory, TileEntityBase tile){
|
||||
|
@ -57,7 +57,7 @@ public class GuiEnervator extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.enervator.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -28,7 +28,7 @@ import java.util.Arrays;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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 GuiFeeder(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -57,7 +57,7 @@ public class GuiFeeder extends GuiContainer{
|
|||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.tileFeeder.currentTimer > 0){
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiFermentingBarrel(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -64,7 +64,7 @@ public class GuiFermentingBarrel extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.press.canolaTank.getFluidAmount() > 0){
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiFluidCollector(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -59,7 +59,7 @@ public class GuiFluidCollector extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.collector.tank.getFluidAmount() > 0){
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -57,7 +57,7 @@ public class GuiFurnaceDouble extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.tileFurnace.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
|
@ -44,7 +44,7 @@ public class GuiGiantChest extends GuiContainer{
|
|||
@Override
|
||||
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
|
||||
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.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
this.drawTexturedModalRect(this.guiLeft+33, this.guiTop+172, 0, 0, 176, 86);
|
||||
|
|
|
@ -26,8 +26,8 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class GuiGrinder extends GuiContainer{
|
||||
|
||||
private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiGrinder");
|
||||
private static final ResourceLocation resLocDouble = AssetUtil.getGuiLocation("guiGrinderDouble");
|
||||
private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("guiGrinder");
|
||||
private static final ResourceLocation RES_LOC_DOUBLE = AssetUtil.getGuiLocation("guiGrinderDouble");
|
||||
private final TileEntityGrinder tileGrinder;
|
||||
private final boolean isDouble;
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class GuiGrinder extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.tileGrinder.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -26,7 +26,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
|||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
@ -37,7 +36,7 @@ import java.util.List;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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 SmallerButton whitelistLeft;
|
||||
|
@ -124,7 +123,7 @@ public class GuiLaserRelayItemWhitelist extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiMiner(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -63,7 +63,7 @@ public class GuiMiner extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything";
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiOilGenerator(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -62,7 +62,7 @@ public class GuiOilGenerator extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.generator.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiPhantomPlacer(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -46,7 +46,7 @@ public class GuiPhantomPlacer extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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 int x;
|
||||
private final int y;
|
||||
|
@ -85,7 +85,7 @@ public class GuiRangedCollector extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Collections;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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;
|
||||
|
||||
public GuiRepairer(InventoryPlayer inventory, TileEntityBase tile){
|
||||
|
@ -57,7 +57,7 @@ public class GuiRepairer extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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);
|
||||
|
||||
if(this.tileRepairer.storage.getEnergyStored() > 0){
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.io.IOException;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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 y;
|
||||
|
@ -76,7 +76,7 @@ public class GuiSmileyCloud extends GuiContainer{
|
|||
public void drawGuiContainerBackgroundLayer(float f, int x, int y){
|
||||
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.nameField.drawTextBox();
|
||||
|
|
|
@ -31,7 +31,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
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 int x;
|
||||
private final int y;
|
||||
|
@ -86,7 +86,7 @@ public class GuiXPSolidifier extends GuiContainer{
|
|||
this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION);
|
||||
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.drawCenteredString(this.fontRendererObj, Integer.toString(this.solidifier.amount), this.guiLeft+88, this.guiTop+30, StringUtil.DECIMAL_COLOR_WHITE);
|
||||
|
|
|
@ -24,14 +24,14 @@ import net.minecraftforge.fml.common.Loader;
|
|||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
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 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[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032};
|
||||
public static final Item[] tfPaxels = new Item[9];
|
||||
public static final Item[] soPaxels = new Item[5];
|
||||
public static final Item[] TF_PAXELS = new Item[9];
|
||||
public static final Item[] SO_PAXELS = new Item[5];
|
||||
//MekanismTools
|
||||
private static final String MEKANISM_TOOLS = "MekanismTools";
|
||||
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[] 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 Item[] mtPaxels = new Item[6];
|
||||
private static final Item[] MT_PAXELS = new Item[6];
|
||||
|
||||
public static void init(){
|
||||
//SimpleOres
|
||||
|
@ -50,7 +50,7 @@ public class InitForeignPaxels{
|
|||
if(Loader.isModLoaded(SIMPLE_ORES)){
|
||||
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 pickaxe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_pickaxe");
|
||||
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){
|
||||
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()){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(soPaxels[i], axe, pickaxe, hoe, sword, shovel));
|
||||
ToolCrafting.recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(SO_PAXELS[i], axe, pickaxe, hoe, sword, shovel));
|
||||
ToolCrafting.RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class InitForeignPaxels{
|
|||
if(Loader.isModLoaded(MEKANISM_TOOLS)){
|
||||
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 pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe");
|
||||
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){
|
||||
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()){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel));
|
||||
ToolCrafting.recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(MT_PAXELS[i], axe, pickaxe, hoe, sword, shovel));
|
||||
ToolCrafting.RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ public class InitForeignPaxels{
|
|||
if(Loader.isModLoaded(THERMAL_FOUNDATION)){
|
||||
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 pickaxe = ItemUtil.getItemFromName(THERMAL_FOUNDATION+":tool.pickaxe"+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){
|
||||
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()){
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(tfPaxels[i], axe, pickaxe, hoe, sword, shovel));
|
||||
ToolCrafting.recipesPaxels.add(RecipeUtil.lastIRecipe());
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(TF_PAXELS[i], axe, pickaxe, hoe, sword, shovel));
|
||||
ToolCrafting.RECIPES_PAXELS.add(RecipeUtil.lastIRecipe());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,19 +131,19 @@ public class InitForeignPaxels{
|
|||
}
|
||||
|
||||
public static void addToCreativeTab(){
|
||||
for(Item item : tfPaxels){
|
||||
for(Item item : TF_PAXELS){
|
||||
if(item != null){
|
||||
CreativeTab.instance.add(item);
|
||||
CreativeTab.INSTANCE.add(item);
|
||||
}
|
||||
}
|
||||
for(Item item : mtPaxels){
|
||||
for(Item item : MT_PAXELS){
|
||||
if(item != null){
|
||||
CreativeTab.instance.add(item);
|
||||
CreativeTab.INSTANCE.add(item);
|
||||
}
|
||||
}
|
||||
for(Item item : soPaxels){
|
||||
for(Item item : SO_PAXELS){
|
||||
if(item != null){
|
||||
CreativeTab.instance.add(item);
|
||||
CreativeTab.INSTANCE.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.material.InitArmorMaterials;
|
||||
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.Util;
|
||||
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
|
||||
public class InitItems{
|
||||
public final class InitItems{
|
||||
|
||||
public static Item itemBooklet;
|
||||
|
||||
|
|
|
@ -40,27 +40,27 @@ public class ItemCrystal extends ItemBase{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < BlockCrystal.allCrystals.length; i++){
|
||||
String name = this.getRegistryName()+BlockCrystal.allCrystals[i].name;
|
||||
for(int i = 0; i < BlockCrystal.ALL_CRYSTALS.length; i++){
|
||||
String name = this.getRegistryName()+BlockCrystal.ALL_CRYSTALS[i].name;
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ResourceLocation(name), "inventory");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,32 @@ public class ItemDrill extends ItemEnergy{
|
|||
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
|
||||
//Places Blocks if the Placing Upgrade is installed
|
||||
|
@ -139,19 +165,6 @@ public class ItemDrill extends ItemEnergy{
|
|||
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
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand){
|
||||
if(!world.isRemote && player.isSneaking()){
|
||||
|
@ -197,13 +210,11 @@ public class ItemDrill extends ItemEnergy{
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
return EnumRarity.EPIC;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack 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))));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Set<String> getToolClasses(ItemStack stack){
|
||||
HashSet<String> hashSet = new HashSet<String>();
|
||||
|
@ -388,21 +398,6 @@ public class ItemDrill extends ItemEnergy{
|
|||
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
|
||||
* Has to be called on both Server and Client
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
|
||||
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){
|
||||
super(name);
|
||||
|
@ -42,26 +42,26 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
|
|||
return new IItemColor(){
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
package de.ellpeck.actuallyadditions.mod.items;
|
||||
|
||||
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.GuiHandler;
|
||||
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.List;
|
|||
|
||||
public class ItemFoods extends ItemFoodBase{
|
||||
|
||||
public static final TheFoods[] allFoods = TheFoods.values();
|
||||
public static final TheFoods[] ALL_FOODS = TheFoods.values();
|
||||
|
||||
public ItemFoods(String name){
|
||||
super(0, 0.0F, false, name);
|
||||
|
@ -43,7 +43,7 @@ public class ItemFoods extends ItemFoodBase{
|
|||
@Override
|
||||
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase 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(!((EntityPlayer)player).inventory.addItemStackToInventory(returnItem.copy())){
|
||||
if(!world.isRemote){
|
||||
|
@ -58,23 +58,23 @@ public class ItemFoods extends ItemFoodBase{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
|
@ -85,27 +85,27 @@ public class ItemFoods extends ItemFoodBase{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < allFoods.length; i++){
|
||||
String name = this.getRegistryName()+allFoods[i].name;
|
||||
for(int i = 0; i < ALL_FOODS.length; i++){
|
||||
String name = this.getRegistryName()+ALL_FOODS[i].name;
|
||||
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), new ModelResourceLocation(name), "inventory");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import java.util.List;
|
|||
|
||||
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){
|
||||
super(0, 0.0F, false, name);
|
||||
|
@ -51,19 +51,19 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -72,11 +72,11 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
|
|||
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase player){
|
||||
ItemStack stackToReturn = super.onItemUseFinish(stack, world, player);
|
||||
|
||||
if(player instanceof EntityPlayer && !world.isRemote && stack.getItemDamage() < allJams.length){
|
||||
PotionEffect firstEffectToGet = new PotionEffect(Potion.getPotionById(allJams[stack.getItemDamage()].firstEffectToGet), 200);
|
||||
if(player instanceof EntityPlayer && !world.isRemote && stack.getItemDamage() < ALL_JAMS.length){
|
||||
PotionEffect firstEffectToGet = new PotionEffect(Potion.getPotionById(ALL_JAMS[stack.getItemDamage()].firstEffectToGet), 200);
|
||||
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);
|
||||
|
||||
ItemStack returnItem = new ItemStack(Items.GLASS_BOTTLE);
|
||||
|
@ -91,17 +91,17 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
|
|||
return new IItemColor(){
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ public class ItemLaserWrench extends ItemBase{
|
|||
NO_PARTICLES("never show particles"),
|
||||
HOLDING_PARTICLES("show particles when holding a Laser Wrench");
|
||||
|
||||
public String name;
|
||||
public final String name;
|
||||
|
||||
WrenchMode(String name){
|
||||
this.name = name;
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
|
||||
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){
|
||||
super(name);
|
||||
|
@ -40,19 +40,19 @@ public class ItemMisc extends ItemBase{
|
|||
|
||||
@Override
|
||||
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
|
||||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
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()){
|
||||
list.add(new ItemStack(this, 1, j));
|
||||
}
|
||||
|
@ -61,8 +61,8 @@ public class ItemMisc extends ItemBase{
|
|||
|
||||
@Override
|
||||
protected void registerRendering(){
|
||||
for(int i = 0; i < allMiscItems.length; i++){
|
||||
String name = this.getRegistryName()+allMiscItems[i].name;
|
||||
for(int i = 0; i < ALL_MISC_ITEMS.length; i++){
|
||||
String name = this.getRegistryName()+ALL_MISC_ITEMS[i].name;
|
||||
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
Loading…
Reference in a new issue