This commit is contained in:
Ellpeck 2016-05-02 17:46:53 +02:00
parent 928676ea53
commit 9ab94e5701
79 changed files with 593 additions and 593 deletions

View file

@ -62,10 +62,10 @@ public class EntrySet{
public NBTTagCompound writeToNBT(){
NBTTagCompound compound = new NBTTagCompound();
compound.setInteger("Entry", entry == null ? -1 : ActuallyAdditionsAPI.bookletEntries.indexOf(entry));
compound.setInteger("Chapter", entry == null || chapter == null ? -1 : entry.getChapters().indexOf(chapter));
compound.setInteger("Page", page == null ? -1 : page.getID());
compound.setInteger("PageInIndex", pageInIndex);
compound.setInteger("Entry", this.entry == null ? -1 : ActuallyAdditionsAPI.bookletEntries.indexOf(this.entry));
compound.setInteger("Chapter", this.entry == null || this.chapter == null ? -1 : this.entry.getChapters().indexOf(this.chapter));
compound.setInteger("Page", this.page == null ? -1 : this.page.getID());
compound.setInteger("PageInIndex", this.pageInIndex);
return compound;
}
}

View file

@ -115,7 +115,7 @@ public class BlockWallAA extends BlockBase{
@Override
public int damageDropped(IBlockState state){
return meta;
return this.meta;
}
@SuppressWarnings("unchecked")

View file

@ -85,10 +85,10 @@ public class BlockPlant extends BlockCrops{
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing facing, float hitX, float hitY, float hitZ){
if(getMetaFromState(state) >= 7){
if(this.getMetaFromState(state) >= 7){
if(!world.isRemote){
List<ItemStack> drops = getDrops(world, pos, state, 0);
List<ItemStack> drops = this.getDrops(world, pos, state, 0);
boolean deductedSeedSize = false;
for(ItemStack drop : drops){
if(drop != null){
@ -104,7 +104,7 @@ public class BlockPlant extends BlockCrops{
}
}
world.setBlockState(pos, getStateFromMeta(0));
world.setBlockState(pos, this.getStateFromMeta(0));
}
return true;
}
@ -118,7 +118,7 @@ public class BlockPlant extends BlockCrops{
@Override
public int quantityDropped(IBlockState state, int fortune, Random random){
return this.getMetaFromState(state) >= 7 ? random.nextInt(addDropAmount)+minDropAmount : super.quantityDropped(state, fortune, random);
return this.getMetaFromState(state) >= 7 ? random.nextInt(this.addDropAmount)+this.minDropAmount : super.quantityDropped(state, fortune, random);
}
@Override

View file

@ -321,17 +321,17 @@ public class GuiBooklet extends GuiScreen implements IBookletGui{
this.buttonList.add(this.buttonConfig);
for(int i = 0; i < this.chapterButtons.length; i++){
this.chapterButtons[i] = new IndexButton(9+i, guiLeft+15, guiTop+10+(i*12), 115, 10, "", this);
this.chapterButtons[i] = new IndexButton(9+i, this.guiLeft+15, this.guiTop+10+(i*12), 115, 10, "", this);
this.buttonList.add(this.chapterButtons[i]);
}
for(int i = 0; i < this.bookmarkButtons.length; i++){
int x = this.guiLeft+xSize/2-(this.bookmarkButtons.length/2*16)+(i*16);
int x = this.guiLeft+this.xSize/2-(this.bookmarkButtons.length/2*16)+(i*16);
this.bookmarkButtons[i] = new BookmarkButton(this.chapterButtons[this.chapterButtons.length-1].id+1+i, x, this.guiTop+this.ySize+13, this);
this.buttonList.add(this.bookmarkButtons[i]);
}
this.searchField = new GuiTextField(4500, this.fontRendererObj, guiLeft+148, guiTop+162, 66, 10);
this.searchField = new GuiTextField(4500, this.fontRendererObj, this.guiLeft+148, this.guiTop+162, 66, 10);
this.searchField.setMaxStringLength(30);
this.searchField.setEnableBackgroundDrawing(false);
this.searchField.setCanLoseFocus(false);

View file

@ -42,7 +42,7 @@ public class PageCrusherRecipe extends BookletPageAA{
@Override
@SideOnly(Side.CLIENT)
public void renderPre(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(recipe != null){
if(this.recipe != null){
Minecraft.getMinecraft().getTextureManager().bindTexture(ClientProxy.bulletForMyValentine ? GuiBooklet.resLocValentine : GuiBooklet.resLoc);
gui.drawRect(gui.getGuiLeft()+37, gui.getGuiTop()+20, 60, 180, 60, 60);
}
@ -52,7 +52,7 @@ public class PageCrusherRecipe extends BookletPageAA{
@Override
@SideOnly(Side.CLIENT)
public void render(IBookletGui gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){
if(recipe == null){
if(this.recipe == null){
StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, TextFormatting.DARK_RED+StringUtil.localize("booklet."+ModUtil.MOD_ID+".recipeDisabled"), gui.getGuiLeft()+14, gui.getGuiTop()+15, 115, 0, false);
}
else{
@ -65,12 +65,12 @@ public class PageCrusherRecipe extends BookletPageAA{
StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+100, 115, 0, false);
}
if(recipe != null){
if(recipe.outputTwoChance > 0){
Minecraft.getMinecraft().fontRendererObj.drawString(recipe.outputTwoChance+"%", gui.getGuiLeft()+37+62, gui.getGuiTop()+20+33, 0);
if(this.recipe != null){
if(this.recipe.outputTwoChance > 0){
Minecraft.getMinecraft().fontRendererObj.drawString(this.recipe.outputTwoChance+"%", gui.getGuiLeft()+37+62, gui.getGuiTop()+20+33, 0);
}
if(recipe.getRecipeOutputOnes() != null){
if(this.recipe.getRecipeOutputOnes() != null){
for(int i = 0; i < 2; i++){
for(int j = 0; j < 3; j++){
ItemStack stack;

View file

@ -37,7 +37,7 @@ public class PagePicture extends PageTextOnly{
String text = gui.getCurrentEntrySet().page.getText();
if(text != null && !text.isEmpty()){
StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+textStartY, 115, 0, false);
StringUtil.drawSplitString(Minecraft.getMinecraft().fontRendererObj, text, gui.getGuiLeft()+14, gui.getGuiTop()+this.textStartY, 115, 0, false);
}
}
}

View file

@ -47,251 +47,251 @@ public class CreativeTab extends CreativeTabs{
public void displayAllRelevantItems(List<ItemStack> list){
this.list = list;
add(InitItems.itemBooklet);
add(InitBlocks.blockSmileyCloud);
this.add(InitItems.itemBooklet);
this.add(InitBlocks.blockSmileyCloud);
add(InitBlocks.blockFireworkBox);
add(InitBlocks.blockLaserRelay);
add(InitBlocks.blockAtomicReconstructor);
add(InitBlocks.blockPhantomface);
add(InitBlocks.blockPhantomEnergyface);
add(InitBlocks.blockPhantomLiquiface);
add(InitBlocks.blockPhantomPlacer);
add(InitBlocks.blockPhantomBreaker);
add(InitBlocks.blockInputter);
add(InitBlocks.blockInputterAdvanced);
add(InitBlocks.blockPhantomBooster);
add(InitBlocks.blockCoffeeMachine);
add(InitBlocks.blockXPSolidifier);
this.add(InitBlocks.blockFireworkBox);
this.add(InitBlocks.blockLaserRelay);
this.add(InitBlocks.blockAtomicReconstructor);
this.add(InitBlocks.blockPhantomface);
this.add(InitBlocks.blockPhantomEnergyface);
this.add(InitBlocks.blockPhantomLiquiface);
this.add(InitBlocks.blockPhantomPlacer);
this.add(InitBlocks.blockPhantomBreaker);
this.add(InitBlocks.blockInputter);
this.add(InitBlocks.blockInputterAdvanced);
this.add(InitBlocks.blockPhantomBooster);
this.add(InitBlocks.blockCoffeeMachine);
this.add(InitBlocks.blockXPSolidifier);
add(InitBlocks.blockMiner);
add(InitBlocks.blockGreenhouseGlass);
add(InitBlocks.blockGrinder);
add(InitBlocks.blockGrinderDouble);
add(InitBlocks.blockFurnaceDouble);
add(InitBlocks.blockLavaFactoryController);
this.add(InitBlocks.blockMiner);
this.add(InitBlocks.blockGreenhouseGlass);
this.add(InitBlocks.blockGrinder);
this.add(InitBlocks.blockGrinderDouble);
this.add(InitBlocks.blockFurnaceDouble);
this.add(InitBlocks.blockLavaFactoryController);
add(InitBlocks.blockEnergizer);
add(InitBlocks.blockEnervator);
this.add(InitBlocks.blockEnergizer);
this.add(InitBlocks.blockEnervator);
add(InitBlocks.blockFurnaceSolar);
add(InitBlocks.blockHeatCollector);
add(InitBlocks.blockCoalGenerator);
add(InitBlocks.blockOilGenerator);
add(InitBlocks.blockLeafGenerator);
this.add(InitBlocks.blockFurnaceSolar);
this.add(InitBlocks.blockHeatCollector);
this.add(InitBlocks.blockCoalGenerator);
this.add(InitBlocks.blockOilGenerator);
this.add(InitBlocks.blockLeafGenerator);
add(InitBlocks.blockItemRepairer);
add(InitBlocks.blockFishingNet);
add(InitBlocks.blockBreaker);
add(InitBlocks.blockDirectionalBreaker);
add(InitBlocks.blockRangedCollector);
add(InitBlocks.blockPlacer);
add(InitBlocks.blockDropper);
add(InitBlocks.blockFluidPlacer);
add(InitBlocks.blockFluidCollector);
this.add(InitBlocks.blockItemRepairer);
this.add(InitBlocks.blockFishingNet);
this.add(InitBlocks.blockBreaker);
this.add(InitBlocks.blockDirectionalBreaker);
this.add(InitBlocks.blockRangedCollector);
this.add(InitBlocks.blockPlacer);
this.add(InitBlocks.blockDropper);
this.add(InitBlocks.blockFluidPlacer);
this.add(InitBlocks.blockFluidCollector);
add(InitBlocks.blockMisc);
add(InitBlocks.blockFeeder);
add(InitBlocks.blockCompost);
add(InitBlocks.blockGiantChest);
add(InitBlocks.blockCanolaPress);
add(InitBlocks.blockFermentingBarrel);
this.add(InitBlocks.blockMisc);
this.add(InitBlocks.blockFeeder);
this.add(InitBlocks.blockCompost);
this.add(InitBlocks.blockGiantChest);
this.add(InitBlocks.blockCanolaPress);
this.add(InitBlocks.blockFermentingBarrel);
add(InitBlocks.blockTestifiBucksGreenWall);
add(InitBlocks.blockTestifiBucksWhiteWall);
add(InitBlocks.blockTestifiBucksGreenStairs);
add(InitBlocks.blockTestifiBucksWhiteStairs);
add(InitBlocks.blockTestifiBucksGreenSlab);
add(InitBlocks.blockTestifiBucksWhiteSlab);
add(InitBlocks.blockTestifiBucksGreenFence);
add(InitBlocks.blockTestifiBucksWhiteFence);
this.add(InitBlocks.blockTestifiBucksGreenWall);
this.add(InitBlocks.blockTestifiBucksWhiteWall);
this.add(InitBlocks.blockTestifiBucksGreenStairs);
this.add(InitBlocks.blockTestifiBucksWhiteStairs);
this.add(InitBlocks.blockTestifiBucksGreenSlab);
this.add(InitBlocks.blockTestifiBucksWhiteSlab);
this.add(InitBlocks.blockTestifiBucksGreenFence);
this.add(InitBlocks.blockTestifiBucksWhiteFence);
add(InitBlocks.blockQuartzWall);
add(InitBlocks.blockQuartzStair);
add(InitBlocks.blockQuartzSlab);
add(InitBlocks.blockChiseledQuartzWall);
add(InitBlocks.blockChiseledQuartzStair);
add(InitBlocks.blockChiseledQuartzSlab);
add(InitBlocks.blockPillarQuartzWall);
add(InitBlocks.blockPillarQuartzStair);
add(InitBlocks.blockPillarQuartzSlab);
this.add(InitBlocks.blockQuartzWall);
this.add(InitBlocks.blockQuartzStair);
this.add(InitBlocks.blockQuartzSlab);
this.add(InitBlocks.blockChiseledQuartzWall);
this.add(InitBlocks.blockChiseledQuartzStair);
this.add(InitBlocks.blockChiseledQuartzSlab);
this.add(InitBlocks.blockPillarQuartzWall);
this.add(InitBlocks.blockPillarQuartzStair);
this.add(InitBlocks.blockPillarQuartzSlab);
add(InitBlocks.blockColoredLamp);
add(InitBlocks.blockColoredLampOn);
add(InitBlocks.blockLampPowerer);
add(InitBlocks.blockTreasureChest);
this.add(InitBlocks.blockColoredLamp);
this.add(InitBlocks.blockColoredLampOn);
this.add(InitBlocks.blockLampPowerer);
this.add(InitBlocks.blockTreasureChest);
add(InitBlocks.blockBlackLotus);
this.add(InitBlocks.blockBlackLotus);
add(InitItems.itemColorLens);
add(InitItems.itemExplosionLens);
add(InitItems.itemDamageLens);
add(InitItems.itemLaserWrench);
add(InitItems.itemCrateKeeper);
add(InitItems.itemChestToCrateUpgrade);
this.add(InitItems.itemColorLens);
this.add(InitItems.itemExplosionLens);
this.add(InitItems.itemDamageLens);
this.add(InitItems.itemLaserWrench);
this.add(InitItems.itemCrateKeeper);
this.add(InitItems.itemChestToCrateUpgrade);
add(InitItems.itemDrill);
add(InitItems.itemDrillUpgradeSpeed);
add(InitItems.itemDrillUpgradeSpeedII);
add(InitItems.itemDrillUpgradeSpeedIII);
add(InitItems.itemDrillUpgradeSilkTouch);
add(InitItems.itemDrillUpgradeFortune);
add(InitItems.itemDrillUpgradeFortuneII);
add(InitItems.itemDrillUpgradeThreeByThree);
add(InitItems.itemDrillUpgradeFiveByFive);
add(InitItems.itemDrillUpgradeBlockPlacing);
add(InitItems.itemBattery);
add(InitItems.itemBatteryDouble);
add(InitItems.itemBatteryTriple);
add(InitItems.itemBatteryQuadruple);
add(InitItems.itemBatteryQuintuple);
add(InitItems.itemTeleStaff);
this.add(InitItems.itemDrill);
this.add(InitItems.itemDrillUpgradeSpeed);
this.add(InitItems.itemDrillUpgradeSpeedII);
this.add(InitItems.itemDrillUpgradeSpeedIII);
this.add(InitItems.itemDrillUpgradeSilkTouch);
this.add(InitItems.itemDrillUpgradeFortune);
this.add(InitItems.itemDrillUpgradeFortuneII);
this.add(InitItems.itemDrillUpgradeThreeByThree);
this.add(InitItems.itemDrillUpgradeFiveByFive);
this.add(InitItems.itemDrillUpgradeBlockPlacing);
this.add(InitItems.itemBattery);
this.add(InitItems.itemBatteryDouble);
this.add(InitItems.itemBatteryTriple);
this.add(InitItems.itemBatteryQuadruple);
this.add(InitItems.itemBatteryQuintuple);
this.add(InitItems.itemTeleStaff);
add(InitItems.itemGrowthRing);
add(InitItems.itemMagnetRing);
add(InitItems.itemWaterRemovalRing);
this.add(InitItems.itemGrowthRing);
this.add(InitItems.itemMagnetRing);
this.add(InitItems.itemWaterRemovalRing);
add(InitItems.itemPhantomConnector);
add(InitItems.itemBucketCanolaOil);
add(InitItems.itemBucketOil);
this.add(InitItems.itemPhantomConnector);
this.add(InitItems.itemBucketCanolaOil);
this.add(InitItems.itemBucketOil);
add(InitItems.itemWingsOfTheBats);
this.add(InitItems.itemWingsOfTheBats);
add(InitItems.itemCoffeeSeed);
add(InitItems.itemCoffeeBean);
add(InitItems.itemRiceSeed);
add(InitItems.itemCanolaSeed);
add(InitItems.itemFlaxSeed);
add(InitItems.itemHairyBall);
add(InitItems.itemMisc);
add(InitItems.itemResonantRice);
add(InitItems.itemFertilizer);
this.add(InitItems.itemCoffeeSeed);
this.add(InitItems.itemCoffeeBean);
this.add(InitItems.itemRiceSeed);
this.add(InitItems.itemCanolaSeed);
this.add(InitItems.itemFlaxSeed);
this.add(InitItems.itemHairyBall);
this.add(InitItems.itemMisc);
this.add(InitItems.itemResonantRice);
this.add(InitItems.itemFertilizer);
add(InitItems.itemCoffee);
add(InitItems.itemFoods);
add(InitItems.itemKnife);
add(InitItems.itemCrafterOnAStick);
add(InitItems.itemDust);
add(InitItems.itemSolidifiedExperience);
add(InitItems.itemLeafBlower);
add(InitItems.itemLeafBlowerAdvanced);
this.add(InitItems.itemCoffee);
this.add(InitItems.itemFoods);
this.add(InitItems.itemKnife);
this.add(InitItems.itemCrafterOnAStick);
this.add(InitItems.itemDust);
this.add(InitItems.itemSolidifiedExperience);
this.add(InitItems.itemLeafBlower);
this.add(InitItems.itemLeafBlowerAdvanced);
add(InitItems.woodenPaxel);
add(InitItems.stonePaxel);
add(InitItems.ironPaxel);
add(InitItems.goldPaxel);
add(InitItems.diamondPaxel);
add(InitItems.emeraldPaxel);
add(InitItems.obsidianPaxel);
add(InitItems.quartzPaxel);
add(InitItems.itemPaxelCrystalRed);
add(InitItems.itemPaxelCrystalBlue);
add(InitItems.itemPaxelCrystalLightBlue);
add(InitItems.itemPaxelCrystalBlack);
add(InitItems.itemPaxelCrystalGreen);
add(InitItems.itemPaxelCrystalWhite);
this.add(InitItems.woodenPaxel);
this.add(InitItems.stonePaxel);
this.add(InitItems.ironPaxel);
this.add(InitItems.goldPaxel);
this.add(InitItems.diamondPaxel);
this.add(InitItems.emeraldPaxel);
this.add(InitItems.obsidianPaxel);
this.add(InitItems.quartzPaxel);
this.add(InitItems.itemPaxelCrystalRed);
this.add(InitItems.itemPaxelCrystalBlue);
this.add(InitItems.itemPaxelCrystalLightBlue);
this.add(InitItems.itemPaxelCrystalBlack);
this.add(InitItems.itemPaxelCrystalGreen);
this.add(InitItems.itemPaxelCrystalWhite);
InitForeignPaxels.addToCreativeTab();
add(InitBlocks.blockCrystal);
add(InitItems.itemCrystal);
this.add(InitBlocks.blockCrystal);
this.add(InitItems.itemCrystal);
add(InitItems.itemJams);
this.add(InitItems.itemJams);
add(InitItems.itemPotionRing);
add(InitItems.itemPotionRingAdvanced);
this.add(InitItems.itemPotionRing);
this.add(InitItems.itemPotionRingAdvanced);
add(InitItems.itemPickaxeQuartz);
add(InitItems.itemSwordQuartz);
add(InitItems.itemAxeQuartz);
add(InitItems.itemShovelQuartz);
add(InitItems.itemHoeQuartz);
this.add(InitItems.itemPickaxeQuartz);
this.add(InitItems.itemSwordQuartz);
this.add(InitItems.itemAxeQuartz);
this.add(InitItems.itemShovelQuartz);
this.add(InitItems.itemHoeQuartz);
add(InitItems.itemHelmQuartz);
add(InitItems.itemChestQuartz);
add(InitItems.itemPantsQuartz);
add(InitItems.itemBootsQuartz);
this.add(InitItems.itemHelmQuartz);
this.add(InitItems.itemChestQuartz);
this.add(InitItems.itemPantsQuartz);
this.add(InitItems.itemBootsQuartz);
add(InitItems.itemPickaxeEmerald);
add(InitItems.itemSwordEmerald);
add(InitItems.itemAxeEmerald);
add(InitItems.itemShovelEmerald);
add(InitItems.itemHoeEmerald);
this.add(InitItems.itemPickaxeEmerald);
this.add(InitItems.itemSwordEmerald);
this.add(InitItems.itemAxeEmerald);
this.add(InitItems.itemShovelEmerald);
this.add(InitItems.itemHoeEmerald);
add(InitItems.itemHelmEmerald);
add(InitItems.itemChestEmerald);
add(InitItems.itemPantsEmerald);
add(InitItems.itemBootsEmerald);
this.add(InitItems.itemHelmEmerald);
this.add(InitItems.itemChestEmerald);
this.add(InitItems.itemPantsEmerald);
this.add(InitItems.itemBootsEmerald);
add(InitItems.itemPickaxeObsidian);
add(InitItems.itemSwordObsidian);
add(InitItems.itemAxeObsidian);
add(InitItems.itemShovelObsidian);
add(InitItems.itemHoeObsidian);
this.add(InitItems.itemPickaxeObsidian);
this.add(InitItems.itemSwordObsidian);
this.add(InitItems.itemAxeObsidian);
this.add(InitItems.itemShovelObsidian);
this.add(InitItems.itemHoeObsidian);
add(InitItems.itemHelmObsidian);
add(InitItems.itemChestObsidian);
add(InitItems.itemPantsObsidian);
add(InitItems.itemBootsObsidian);
this.add(InitItems.itemHelmObsidian);
this.add(InitItems.itemChestObsidian);
this.add(InitItems.itemPantsObsidian);
this.add(InitItems.itemBootsObsidian);
add(InitItems.itemPickaxeCrystalRed);
add(InitItems.itemAxeCrystalRed);
add(InitItems.itemShovelCrystalRed);
add(InitItems.itemSwordCrystalRed);
add(InitItems.itemHoeCrystalRed);
add(InitItems.itemHelmCrystalRed);
add(InitItems.itemChestCrystalRed);
add(InitItems.itemPantsCrystalRed);
add(InitItems.itemBootsCrystalRed);
this.add(InitItems.itemPickaxeCrystalRed);
this.add(InitItems.itemAxeCrystalRed);
this.add(InitItems.itemShovelCrystalRed);
this.add(InitItems.itemSwordCrystalRed);
this.add(InitItems.itemHoeCrystalRed);
this.add(InitItems.itemHelmCrystalRed);
this.add(InitItems.itemChestCrystalRed);
this.add(InitItems.itemPantsCrystalRed);
this.add(InitItems.itemBootsCrystalRed);
add(InitItems.itemPickaxeCrystalBlue);
add(InitItems.itemAxeCrystalBlue);
add(InitItems.itemShovelCrystalBlue);
add(InitItems.itemSwordCrystalBlue);
add(InitItems.itemHoeCrystalBlue);
add(InitItems.itemHelmCrystalBlue);
add(InitItems.itemChestCrystalBlue);
add(InitItems.itemPantsCrystalBlue);
add(InitItems.itemBootsCrystalBlue);
this.add(InitItems.itemPickaxeCrystalBlue);
this.add(InitItems.itemAxeCrystalBlue);
this.add(InitItems.itemShovelCrystalBlue);
this.add(InitItems.itemSwordCrystalBlue);
this.add(InitItems.itemHoeCrystalBlue);
this.add(InitItems.itemHelmCrystalBlue);
this.add(InitItems.itemChestCrystalBlue);
this.add(InitItems.itemPantsCrystalBlue);
this.add(InitItems.itemBootsCrystalBlue);
add(InitItems.itemPickaxeCrystalLightBlue);
add(InitItems.itemAxeCrystalLightBlue);
add(InitItems.itemShovelCrystalLightBlue);
add(InitItems.itemSwordCrystalLightBlue);
add(InitItems.itemHoeCrystalLightBlue);
add(InitItems.itemHelmCrystalLightBlue);
add(InitItems.itemChestCrystalLightBlue);
add(InitItems.itemPantsCrystalLightBlue);
add(InitItems.itemBootsCrystalLightBlue);
this.add(InitItems.itemPickaxeCrystalLightBlue);
this.add(InitItems.itemAxeCrystalLightBlue);
this.add(InitItems.itemShovelCrystalLightBlue);
this.add(InitItems.itemSwordCrystalLightBlue);
this.add(InitItems.itemHoeCrystalLightBlue);
this.add(InitItems.itemHelmCrystalLightBlue);
this.add(InitItems.itemChestCrystalLightBlue);
this.add(InitItems.itemPantsCrystalLightBlue);
this.add(InitItems.itemBootsCrystalLightBlue);
add(InitItems.itemPickaxeCrystalBlack);
add(InitItems.itemAxeCrystalBlack);
add(InitItems.itemShovelCrystalBlack);
add(InitItems.itemSwordCrystalBlack);
add(InitItems.itemHoeCrystalBlack);
add(InitItems.itemHelmCrystalBlack);
add(InitItems.itemChestCrystalBlack);
add(InitItems.itemPantsCrystalBlack);
add(InitItems.itemBootsCrystalBlack);
this.add(InitItems.itemPickaxeCrystalBlack);
this.add(InitItems.itemAxeCrystalBlack);
this.add(InitItems.itemShovelCrystalBlack);
this.add(InitItems.itemSwordCrystalBlack);
this.add(InitItems.itemHoeCrystalBlack);
this.add(InitItems.itemHelmCrystalBlack);
this.add(InitItems.itemChestCrystalBlack);
this.add(InitItems.itemPantsCrystalBlack);
this.add(InitItems.itemBootsCrystalBlack);
add(InitItems.itemPickaxeCrystalGreen);
add(InitItems.itemAxeCrystalGreen);
add(InitItems.itemShovelCrystalGreen);
add(InitItems.itemSwordCrystalGreen);
add(InitItems.itemHoeCrystalGreen);
add(InitItems.itemHelmCrystalGreen);
add(InitItems.itemChestCrystalGreen);
add(InitItems.itemPantsCrystalGreen);
add(InitItems.itemBootsCrystalGreen);
this.add(InitItems.itemPickaxeCrystalGreen);
this.add(InitItems.itemAxeCrystalGreen);
this.add(InitItems.itemShovelCrystalGreen);
this.add(InitItems.itemSwordCrystalGreen);
this.add(InitItems.itemHoeCrystalGreen);
this.add(InitItems.itemHelmCrystalGreen);
this.add(InitItems.itemChestCrystalGreen);
this.add(InitItems.itemPantsCrystalGreen);
this.add(InitItems.itemBootsCrystalGreen);
add(InitItems.itemPickaxeCrystalWhite);
add(InitItems.itemAxeCrystalWhite);
add(InitItems.itemShovelCrystalWhite);
add(InitItems.itemSwordCrystalWhite);
add(InitItems.itemHoeCrystalWhite);
add(InitItems.itemHelmCrystalWhite);
add(InitItems.itemChestCrystalWhite);
add(InitItems.itemPantsCrystalWhite);
add(InitItems.itemBootsCrystalWhite);
this.add(InitItems.itemPickaxeCrystalWhite);
this.add(InitItems.itemAxeCrystalWhite);
this.add(InitItems.itemShovelCrystalWhite);
this.add(InitItems.itemSwordCrystalWhite);
this.add(InitItems.itemHoeCrystalWhite);
this.add(InitItems.itemHelmCrystalWhite);
this.add(InitItems.itemChestCrystalWhite);
this.add(InitItems.itemPantsCrystalWhite);
this.add(InitItems.itemBootsCrystalWhite);
}
public void add(Item item){

View file

@ -42,11 +42,11 @@ public class JamVillagerTradeHandler{
public void addWants(String oredictName, int minSize, int maxSize){
ArrayList<ItemStack> stacks = (ArrayList<ItemStack>)OreDictionary.getOres(oredictName);
trades.add(new Trade(stacks, minSize, maxSize));
this.trades.add(new Trade(stacks, minSize, maxSize));
}
public void addWants(ItemStack stack, int minSize, int maxSize){
trades.add(new Trade(stack, minSize, maxSize));
this.trades.add(new Trade(stack, minSize, maxSize));
}
//TODO Fix the Villager

View file

@ -46,13 +46,13 @@ public class OreGen implements IWorldGenerator{
if(world.getWorldType() != WorldType.FLAT && Util.arrayContains(ConfigValues.oreGenDimensionBlacklist, world.provider.getDimension()) < 0){
switch(world.provider.getDimension()){
case -1:
generateNether(world, random, chunkX*16, chunkZ*16);
this.generateNether(world, random, chunkX*16, chunkZ*16);
//case 0:
// generateSurface(world, random, chunkX*16, chunkZ*16);
case 1:
generateEnd(world, random, chunkX*16, chunkZ*16);
this.generateEnd(world, random, chunkX*16, chunkZ*16);
default:
generateSurface(world, random, chunkX*16, chunkZ*16);
this.generateSurface(world, random, chunkX*16, chunkZ*16);
}
}
}

View file

@ -34,18 +34,18 @@ public class ContainerCoffeeMachine extends Container{
public ContainerCoffeeMachine(InventoryPlayer inventory, TileEntityBase tile){
this.machine = (TileEntityCoffeeMachine)tile;
this.addSlotToContainer(new Slot(machine, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, 37, 6));
this.addSlotToContainer(new Slot(machine, TileEntityCoffeeMachine.SLOT_INPUT, 80, 42));
this.addSlotToContainer(new SlotOutput(machine, TileEntityCoffeeMachine.SLOT_OUTPUT, 80, 73));
this.addSlotToContainer(new Slot(this.machine, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, 37, 6));
this.addSlotToContainer(new Slot(this.machine, TileEntityCoffeeMachine.SLOT_INPUT, 80, 42));
this.addSlotToContainer(new SlotOutput(this.machine, TileEntityCoffeeMachine.SLOT_OUTPUT, 80, 73));
for(int i = 0; i < 4; i++){
for(int j = 0; j < 2; j++){
this.addSlotToContainer(new Slot(machine, j+i*2+3, 125+j*18, 6+i*18));
this.addSlotToContainer(new Slot(this.machine, j+i*2+3, 125+j*18, 6+i*18));
}
}
this.addSlotToContainer(new Slot(machine, TileEntityCoffeeMachine.SLOT_WATER_INPUT, 26, 73));
this.addSlotToContainer(new SlotOutput(machine, TileEntityCoffeeMachine.SLOT_WATER_OUTPUT, 45, 73));
this.addSlotToContainer(new Slot(this.machine, TileEntityCoffeeMachine.SLOT_WATER_INPUT, 26, 73));
this.addSlotToContainer(new SlotOutput(this.machine, TileEntityCoffeeMachine.SLOT_WATER_OUTPUT, 45, 73));
for(int i = 0; i < 3; i++){
for(int j = 0; j < 9; j++){
@ -64,7 +64,7 @@ public class ContainerCoffeeMachine extends Container{
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
Slot theSlot = this.inventorySlots.get(slot);
if(theSlot != null && theSlot.getHasStack()){
ItemStack newStack = theSlot.getStack();

View file

@ -36,7 +36,7 @@ public class ContainerDrill extends Container{
this.inventory = inventory;
for(int i = 0; i < SLOT_AMOUNT; i++){
this.addSlotToContainer(new Slot(drillInventory, i, 44+i*18, 19){
this.addSlotToContainer(new Slot(ContainerDrill.this.drillInventory, i, 44+i*18, 19){
@Override
public boolean isItemValid(ItemStack stack){
return stack.getItem() instanceof ItemDrillUpgrade || stack.getItem() instanceof IEnergyContainerItem;
@ -122,7 +122,7 @@ public class ContainerDrill extends Container{
@Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player){
if(clickTypeIn == ClickType.SWAP && dragType == inventory.currentItem){
if(clickTypeIn == ClickType.SWAP && dragType == this.inventory.currentItem){
return null;
}
else{
@ -132,9 +132,9 @@ public class ContainerDrill extends Container{
@Override
public void onContainerClosed(EntityPlayer player){
ItemStack stack = inventory.getCurrentItem();
ItemStack stack = this.inventory.getCurrentItem();
if(stack != null && stack.getItem() instanceof ItemDrill){
((ItemDrill)stack.getItem()).writeSlotsToNBT(this.drillInventory.slots, inventory.getCurrentItem());
((ItemDrill)stack.getItem()).writeSlotsToNBT(this.drillInventory.slots, this.inventory.getCurrentItem());
}
super.onContainerClosed(player);
}
@ -221,31 +221,31 @@ public class ContainerDrill extends Container{
@Override
public int getSizeInventory(){
return slots.length;
return this.slots.length;
}
@Override
public ItemStack getStackInSlot(int i){
if(i < this.getSizeInventory()){
return slots[i];
return this.slots[i];
}
return null;
}
@Override
public ItemStack decrStackSize(int i, int j){
if(slots[i] != null){
if(this.slots[i] != null){
ItemStack stackAt;
if(slots[i].stackSize <= j){
stackAt = slots[i];
slots[i] = null;
if(this.slots[i].stackSize <= j){
stackAt = this.slots[i];
this.slots[i] = null;
this.markDirty();
return stackAt;
}
else{
stackAt = slots[i].splitStack(j);
if(slots[i].stackSize == 0){
slots[i] = null;
stackAt = this.slots[i].splitStack(j);
if(this.slots[i].stackSize == 0){
this.slots[i] = null;
}
this.markDirty();
return stackAt;

View file

@ -29,8 +29,8 @@ public class ContainerFluidCollector extends Container{
public ContainerFluidCollector(InventoryPlayer inventory, TileEntityBase tile){
this.collector = (TileEntityFluidCollector)tile;
this.addSlotToContainer(new Slot(collector, 0, 90, 73));
this.addSlotToContainer(new SlotOutput(collector, 1, 90, 42));
this.addSlotToContainer(new Slot(this.collector, 0, 90, 73));
this.addSlotToContainer(new SlotOutput(this.collector, 1, 90, 42));
for(int i = 0; i < 3; i++){
for(int j = 0; j < 9; j++){
@ -49,7 +49,7 @@ public class ContainerFluidCollector extends Container{
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
Slot theSlot = this.inventorySlots.get(slot);
if(theSlot != null && theSlot.getHasStack()){
ItemStack newStack = theSlot.getStack();

View file

@ -108,7 +108,7 @@ public class ContainerInputter extends Container{
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player){
if(slotId >= 0 && slotId < this.inventorySlots.size() && this.getSlot(slotId) instanceof SlotFilter){
//Calls the Filter's SlotClick function
return ((SlotFilter)getSlot(slotId)).slotClick(player);
return ((SlotFilter)this.getSlot(slotId)).slotClick(player);
}
else{
return super.slotClick(slotId, dragType, clickTypeIn, player);

View file

@ -103,7 +103,7 @@ public class ContainerRangedCollector extends Container{
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player){
if(slotId >= 0 && slotId < this.inventorySlots.size() && this.getSlot(slotId) instanceof SlotFilter){
//Calls the Filter's SlotClick function
return ((SlotFilter)getSlot(slotId)).slotClick(player);
return ((SlotFilter)this.getSlot(slotId)).slotClick(player);
}
else{
return super.slotClick(slotId, dragType, clickTypeIn, player);

View file

@ -28,7 +28,7 @@ public class ContainerXPSolidifier extends Container{
public ContainerXPSolidifier(InventoryPlayer inventory, TileEntityBase tile){
this.solidifier = (TileEntityXPSolidifier)tile;
this.addSlotToContainer(new SlotOutput(solidifier, 0, 80, 8));
this.addSlotToContainer(new SlotOutput(this.solidifier, 0, 80, 8));
for(int i = 0; i < 3; i++){
for(int j = 0; j < 9; j++){
@ -47,7 +47,7 @@ public class ContainerXPSolidifier extends Container{
final int hotbarStart = inventoryEnd+1;
final int hotbarEnd = hotbarStart+8;
Slot theSlot = (Slot)this.inventorySlots.get(slot);
Slot theSlot = this.inventorySlots.get(slot);
if(theSlot != null && theSlot.getHasStack()){
ItemStack newStack = theSlot.getStack();

View file

@ -41,7 +41,7 @@ public class GuiBreaker extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.breaker.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.breaker.getName());
}
@Override

View file

@ -41,19 +41,19 @@ public class GuiCanolaPress extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text1 = this.press.storage.getEnergyStored()+"/"+this.press.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
if(x >= this.guiLeft+43 && y >= this.guiTop+6 && x <= this.guiLeft+58 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
String text2 = StringUtil.getFluidInfo(this.press.tank);
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
if(x >= this.guiLeft+117 && y >= this.guiTop+6 && x <= this.guiLeft+132 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text2), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.press.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.press.getName());
}
@Override
@ -68,17 +68,17 @@ public class GuiCanolaPress extends GuiContainer{
if(this.press.storage.getEnergyStored() > 0){
int i = this.press.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 29, 16, i);
this.drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 29, 16, i);
}
if(this.press.tank.getFluidAmount() > 0){
int i = this.press.getTankScaled(83);
drawTexturedModalRect(this.guiLeft+117, this.guiTop+89-i, 192, 29, 16, i);
this.drawTexturedModalRect(this.guiLeft+117, this.guiTop+89-i, 192, 29, 16, i);
}
if(this.press.currentProcessTime > 0){
int i = this.press.getProcessScaled(29);
drawTexturedModalRect(this.guiLeft+83, this.guiTop+32, 176, 0, 12, i);
this.drawTexturedModalRect(this.guiLeft+83, this.guiTop+32, 176, 0, 12, i);
}
}
}

View file

@ -40,14 +40,14 @@ public class GuiCoalGenerator extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text1 = this.generator.storage.getEnergyStored()+"/"+this.generator.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
if(x >= this.guiLeft+43 && y >= this.guiTop+6 && x <= this.guiLeft+58 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.generator.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.generator.getName());
}
@Override
@ -62,12 +62,12 @@ public class GuiCoalGenerator extends GuiContainer{
if(this.generator.storage.getEnergyStored() > 0){
int i = this.generator.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i);
this.drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i);
}
if(this.generator.currentBurnTime > 0){
int i = this.generator.getBurningScaled(13);
this.drawTexturedModalRect(guiLeft+87, guiTop+27+12-i, 176, 96-i, 14, i);
this.drawTexturedModalRect(this.guiLeft+87, this.guiTop+27+12-i, 176, 96-i, 14, i);
}
}
}

View file

@ -56,7 +56,7 @@ public class GuiCoffeeMachine extends GuiContainer{
public void initGui(){
super.initGui();
GuiButton buttonOkay = new GuiButton(0, guiLeft+60, guiTop+11, 58, 20, StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ok"));
GuiButton buttonOkay = new GuiButton(0, this.guiLeft+60, this.guiTop+11, 58, 20, StringUtil.localize("info."+ModUtil.MOD_ID+".gui.ok"));
this.buttonList.add(buttonOkay);
}
@ -65,23 +65,23 @@ public class GuiCoffeeMachine extends GuiContainer{
super.drawScreen(x, y, f);
String text1 = this.machine.storage.getEnergyStored()+"/"+this.machine.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+16 && y >= guiTop+5 && x <= guiLeft+23 && y <= guiTop+89){
if(x >= this.guiLeft+16 && y >= this.guiTop+5 && x <= this.guiLeft+23 && y <= this.guiTop+89){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
String text3 = StringUtil.getFluidInfo(this.machine.tank);
if(x >= guiLeft+27 && y >= guiTop+5 && x <= guiLeft+33 && y <= guiTop+70){
if(x >= this.guiLeft+27 && y >= this.guiTop+5 && x <= this.guiLeft+33 && y <= this.guiTop+70){
this.drawHoveringText(Collections.singletonList(text3), x, y);
}
String text2 = this.machine.coffeeCacheAmount+"/"+TileEntityCoffeeMachine.COFFEE_CACHE_MAX_AMOUNT+" "+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.coffee");
if(x >= guiLeft+40 && y >= guiTop+25 && x <= guiLeft+49 && y <= guiTop+56){
if(x >= this.guiLeft+40 && y >= this.guiTop+25 && x <= this.guiLeft+49 && y <= this.guiTop+56){
this.drawHoveringText(Collections.singletonList(text2), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.machine.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.machine.getName());
}
@Override
@ -96,29 +96,29 @@ public class GuiCoffeeMachine extends GuiContainer{
if(this.machine.storage.getEnergyStored() > 0){
int i = this.machine.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+17, this.guiTop+89-i, 176, 0, 6, i);
this.drawTexturedModalRect(this.guiLeft+17, this.guiTop+89-i, 176, 0, 6, i);
}
if(this.machine.tank.getFluidAmount() > 0){
int i = this.machine.getWaterScaled(64);
drawTexturedModalRect(this.guiLeft+27, this.guiTop+70-i, 182, 0, 6, i);
this.drawTexturedModalRect(this.guiLeft+27, this.guiTop+70-i, 182, 0, 6, i);
}
if(this.machine.coffeeCacheAmount > 0){
int i = this.machine.getCoffeeScaled(30);
drawTexturedModalRect(this.guiLeft+41, this.guiTop+56-i, 192, 0, 8, i);
this.drawTexturedModalRect(this.guiLeft+41, this.guiTop+56-i, 192, 0, 8, i);
}
if(this.machine.brewTime > 0){
int i = this.machine.getBrewScaled(23);
drawTexturedModalRect(this.guiLeft+53, this.guiTop+42, 192, 30, i, 16);
this.drawTexturedModalRect(this.guiLeft+53, this.guiTop+42, 192, 30, i, 16);
int j = this.machine.getBrewScaled(26);
drawTexturedModalRect(this.guiLeft+99+25-j, this.guiTop+44, 192+25-j, 46, j, 12);
this.drawTexturedModalRect(this.guiLeft+99+25-j, this.guiTop+44, 192+25-j, 46, j, 12);
}
}
@Override
public void actionPerformed(GuiButton button){
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(x, y, z, world, button.id, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(this.x, this.y, this.z, this.world, button.id, Minecraft.getMinecraft().thePlayer));
}
}

View file

@ -34,7 +34,7 @@ public class GuiCrafter extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, "container."+ModUtil.MOD_ID+".crafting");
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, "container."+ModUtil.MOD_ID+".crafting");
}
@Override

View file

@ -41,14 +41,14 @@ public class GuiDirectionalBreaker extends GuiContainer{
super.drawScreen(x, y, f);
String text1 = this.breaker.storage.getEnergyStored()+"/"+this.breaker.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
if(x >= this.guiLeft+43 && y >= this.guiTop+6 && x <= this.guiLeft+58 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.breaker.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.breaker.getName());
}
@Override
@ -63,7 +63,7 @@ public class GuiDirectionalBreaker extends GuiContainer{
if(this.breaker.storage.getEnergyStored() > 0){
int i = this.breaker.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 29, 16, i);
this.drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 29, 16, i);
}
}
}

View file

@ -33,7 +33,7 @@ public class GuiDrill extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, "container."+ModUtil.MOD_ID+".drill");
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, "container."+ModUtil.MOD_ID+".drill");
}
@Override

View file

@ -41,7 +41,7 @@ public class GuiDropper extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.dropper.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.dropper.getName());
}
@Override

View file

@ -40,14 +40,14 @@ public class GuiEnergizer extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text1 = this.energizer.storage.getEnergyStored()+"/"+this.energizer.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){
if(x >= this.guiLeft+57 && y >= this.guiTop+6 && x <= this.guiLeft+72 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.energizer.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.energizer.getName());
}
@Override
@ -62,7 +62,7 @@ public class GuiEnergizer extends GuiContainer{
if(this.energizer.storage.getEnergyStored() > 0){
int i = this.energizer.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+57, this.guiTop+89-i, 176, 0, 16, i);
this.drawTexturedModalRect(this.guiLeft+57, this.guiTop+89-i, 176, 0, 16, i);
}
}
}

View file

@ -40,14 +40,14 @@ public class GuiEnervator extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text1 = this.enervator.storage.getEnergyStored()+"/"+this.enervator.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+57 && y >= guiTop+6 && x <= guiLeft+72 && y <= guiTop+88){
if(x >= this.guiLeft+57 && y >= this.guiTop+6 && x <= this.guiLeft+72 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.enervator.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.enervator.getName());
}
@Override
@ -62,7 +62,7 @@ public class GuiEnervator extends GuiContainer{
if(this.enervator.storage.getEnergyStored() > 0){
int i = this.enervator.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+57, this.guiTop+89-i, 176, 0, 16, i);
this.drawTexturedModalRect(this.guiLeft+57, this.guiTop+89-i, 176, 0, 16, i);
}
}
}

View file

@ -41,7 +41,7 @@ public class GuiFeeder extends GuiContainer{
@Override
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
if(x >= guiLeft+69 && y >= guiTop+30 && x <= guiLeft+69+10 && y <= guiTop+30+10){
if(x >= this.guiLeft+69 && y >= this.guiTop+30 && x <= this.guiLeft+69+10 && y <= this.guiTop+30+10){
String[] array = new String[]{(this.tileFeeder.currentAnimalAmount+" "+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.animals")), ((this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD) ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.enoughToBreed") : (this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.tooMany") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.notEnough")))};
this.drawHoveringText(Arrays.asList(array), x, y);
}
@ -49,7 +49,7 @@ public class GuiFeeder extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileFeeder.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileFeeder.getName());
}
@Override
@ -62,15 +62,15 @@ public class GuiFeeder extends GuiContainer{
if(this.tileFeeder.currentTimer > 0){
int i = this.tileFeeder.getCurrentTimerToScale(20);
this.drawTexturedModalRect(guiLeft+85, guiTop+42-i, 181, 19+19-i, 6, 20);
this.drawTexturedModalRect(this.guiLeft+85, this.guiTop+42-i, 181, 19+19-i, 6, 20);
}
if(this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD){
this.drawTexturedModalRect(guiLeft+70, guiTop+31, 192, 16, 8, 8);
this.drawTexturedModalRect(this.guiLeft+70, this.guiTop+31, 192, 16, 8, 8);
}
if(this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD){
this.drawTexturedModalRect(guiLeft+70, guiTop+31, 192, 24, 8, 8);
this.drawTexturedModalRect(this.guiLeft+70, this.guiTop+31, 192, 24, 8, 8);
}
}
}

View file

@ -42,19 +42,19 @@ public class GuiFermentingBarrel extends GuiContainer{
super.drawScreen(x, y, f);
String text1 = StringUtil.getFluidInfo(this.press.canolaTank);
if(x >= guiLeft+61 && y >= guiTop+6 && x <= guiLeft+76 && y <= guiTop+88){
if(x >= this.guiLeft+61 && y >= this.guiTop+6 && x <= this.guiLeft+76 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
String text2 = StringUtil.getFluidInfo(this.press.oilTank);
if(x >= guiLeft+99 && y >= guiTop+6 && x <= guiLeft+114 && y <= guiTop+88){
if(x >= this.guiLeft+99 && y >= this.guiTop+6 && x <= this.guiLeft+114 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text2), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.press.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.press.getName());
}
@Override
@ -69,17 +69,17 @@ public class GuiFermentingBarrel extends GuiContainer{
if(this.press.canolaTank.getFluidAmount() > 0){
int i = this.press.getCanolaTankScaled(83);
drawTexturedModalRect(this.guiLeft+61, this.guiTop+89-i, 192, 29, 16, i);
this.drawTexturedModalRect(this.guiLeft+61, this.guiTop+89-i, 192, 29, 16, i);
}
if(this.press.oilTank.getFluidAmount() > 0){
int i = this.press.getOilTankScaled(83);
drawTexturedModalRect(this.guiLeft+99, this.guiTop+89-i, 176, 29, 16, i);
this.drawTexturedModalRect(this.guiLeft+99, this.guiTop+89-i, 176, 29, 16, i);
}
if(this.press.currentProcessTime > 0){
int i = this.press.getProcessScaled(29);
drawTexturedModalRect(this.guiLeft+82, this.guiTop+34, 176, 0, 12, i);
this.drawTexturedModalRect(this.guiLeft+82, this.guiTop+34, 176, 0, 12, i);
}
}
}

View file

@ -42,14 +42,14 @@ public class GuiFluidCollector extends GuiContainer{
super.drawScreen(x, y, f);
String text2 = StringUtil.getFluidInfo(this.collector.tank);
if(x >= guiLeft+68 && y >= guiTop+6 && x <= guiLeft+83 && y <= guiTop+88){
if(x >= this.guiLeft+68 && y >= this.guiTop+6 && x <= this.guiLeft+83 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text2), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.collector.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.collector.getName());
}
@Override
@ -64,7 +64,7 @@ public class GuiFluidCollector extends GuiContainer{
if(this.collector.tank.getFluidAmount() > 0){
int i = this.collector.getTankScaled(83);
drawTexturedModalRect(this.guiLeft+68, this.guiTop+89-i, 176, 0, 16, i);
this.drawTexturedModalRect(this.guiLeft+68, this.guiTop+89-i, 176, 0, 16, i);
}
}
}

View file

@ -40,14 +40,14 @@ public class GuiFurnaceDouble extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text = this.tileFurnace.storage.getEnergyStored()+"/"+this.tileFurnace.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){
if(x >= this.guiLeft+28 && y >= this.guiTop+6 && x <= this.guiLeft+43 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileFurnace.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileFurnace.getName());
}
@Override
@ -62,7 +62,7 @@ public class GuiFurnaceDouble extends GuiContainer{
if(this.tileFurnace.storage.getEnergyStored() > 0){
int i = this.tileFurnace.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+28, this.guiTop+89-i, 176, 44, 16, i);
this.drawTexturedModalRect(this.guiLeft+28, this.guiTop+89-i, 176, 44, 16, i);
}
if(this.tileFurnace.firstSmeltTime > 0){
int i = this.tileFurnace.getFirstTimeToScale(23);

View file

@ -38,7 +38,7 @@ public class GuiGiantChest extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.chest.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.chest.getName());
}
@Override

View file

@ -47,14 +47,14 @@ public class GuiGrinder extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text = this.tileGrinder.storage.getEnergyStored()+"/"+this.tileGrinder.storage.getMaxEnergyStored()+" RF";
if((this.isDouble && x >= guiLeft+14 && y >= guiTop+6 && x <= guiLeft+29 && y <= guiTop+88) || (!this.isDouble && x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88)){
if((this.isDouble && x >= this.guiLeft+14 && y >= this.guiTop+6 && x <= this.guiLeft+29 && y <= this.guiTop+88) || (!this.isDouble && x >= this.guiLeft+43 && y >= this.guiTop+6 && x <= this.guiLeft+58 && y <= this.guiTop+88)){
this.drawHoveringText(Collections.singletonList(text), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileGrinder.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileGrinder.getName());
}
@Override
@ -69,11 +69,11 @@ public class GuiGrinder extends GuiContainer{
if(this.tileGrinder.storage.getEnergyStored() > 0){
int i = this.tileGrinder.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+(isDouble ? 14 : 43), this.guiTop+89-i, 176, (isDouble ? 44 : 23), 16, i);
this.drawTexturedModalRect(this.guiLeft+(this.isDouble ? 14 : 43), this.guiTop+89-i, 176, (this.isDouble ? 44 : 23), 16, i);
}
if(this.tileGrinder.firstCrushTime > 0){
int i = this.tileGrinder.getFirstTimeToScale(23);
this.drawTexturedModalRect(this.guiLeft+(isDouble ? 51 : 80), this.guiTop+40, 176, 0, 24, i);
this.drawTexturedModalRect(this.guiLeft+(this.isDouble ? 51 : 80), this.guiTop+40, 176, 0, 24, i);
}
if(this.isDouble){
if(this.tileGrinder.secondCrushTime > 0){

View file

@ -80,39 +80,39 @@ public class GuiInputter extends GuiContainer{
public void initGui(){
super.initGui();
this.fieldPullStart = new GuiTextField(3000, this.fontRendererObj, guiLeft+13, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPullStart = new GuiTextField(3000, this.fontRendererObj, this.guiLeft+13, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPullStart.setMaxStringLength(4);
this.fieldPullStart.setEnableBackgroundDrawing(false);
this.fieldPullEnd = new GuiTextField(3001, this.fontRendererObj, guiLeft+50, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPullEnd = new GuiTextField(3001, this.fontRendererObj, this.guiLeft+50, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPullEnd.setMaxStringLength(4);
this.fieldPullEnd.setEnableBackgroundDrawing(false);
this.fieldPutStart = new GuiTextField(3002, this.fontRendererObj, guiLeft+98, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPutStart = new GuiTextField(3002, this.fontRendererObj, this.guiLeft+98, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPutStart.setMaxStringLength(4);
this.fieldPutStart.setEnableBackgroundDrawing(false);
this.fieldPutEnd = new GuiTextField(3004, this.fontRendererObj, guiLeft+135, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPutEnd = new GuiTextField(3004, this.fontRendererObj, this.guiLeft+135, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0), 27, 8);
this.fieldPutEnd.setMaxStringLength(4);
this.fieldPutEnd.setEnableBackgroundDrawing(false);
SmallerButton buttonSidePutP = new SmallerButton(0, guiLeft+155, guiTop+43+(isAdvanced ? OFFSET_ADVANCED : 0), ">");
SmallerButton buttonSidePutM = new SmallerButton(1, guiLeft+90, guiTop+43+(isAdvanced ? OFFSET_ADVANCED : 0), "<");
SmallerButton buttonSidePutP = new SmallerButton(0, this.guiLeft+155, this.guiTop+43+(this.isAdvanced ? OFFSET_ADVANCED : 0), ">");
SmallerButton buttonSidePutM = new SmallerButton(1, this.guiLeft+90, this.guiTop+43+(this.isAdvanced ? OFFSET_ADVANCED : 0), "<");
SmallerButton buttonSidePullP = new SmallerButton(2, guiLeft+70, guiTop+43+(isAdvanced ? OFFSET_ADVANCED : 0), ">");
SmallerButton buttonSidePullM = new SmallerButton(3, guiLeft+5, guiTop+43+(isAdvanced ? OFFSET_ADVANCED : 0), "<");
SmallerButton buttonSidePullP = new SmallerButton(2, this.guiLeft+70, this.guiTop+43+(this.isAdvanced ? OFFSET_ADVANCED : 0), ">");
SmallerButton buttonSidePullM = new SmallerButton(3, this.guiLeft+5, this.guiTop+43+(this.isAdvanced ? OFFSET_ADVANCED : 0), "<");
whitelistPull = new SmallerButton(TileEntityInputter.WHITELIST_PULL_BUTTON_ID, guiLeft+3, guiTop+16, "");
whitelistPut = new SmallerButton(TileEntityInputter.WHITELIST_PUT_BUTTON_ID, guiLeft+157, guiTop+16, "");
this.whitelistPull = new SmallerButton(TileEntityInputter.WHITELIST_PULL_BUTTON_ID, this.guiLeft+3, this.guiTop+16, "");
this.whitelistPut = new SmallerButton(TileEntityInputter.WHITELIST_PUT_BUTTON_ID, this.guiLeft+157, this.guiTop+16, "");
this.buttonList.add(buttonSidePutP);
this.buttonList.add(buttonSidePullP);
this.buttonList.add(buttonSidePutM);
this.buttonList.add(buttonSidePullM);
if(this.isAdvanced){
this.buttonList.add(whitelistPut);
this.buttonList.add(whitelistPull);
this.buttonList.add(this.whitelistPut);
this.buttonList.add(this.whitelistPull);
}
this.buttonList.add(new TinyButton(TileEntityInputter.OKAY_BUTTON_ID, guiLeft+84, guiTop+80+(isAdvanced ? OFFSET_ADVANCED : 0)));
this.buttonList.add(new TinyButton(TileEntityInputter.OKAY_BUTTON_ID, this.guiLeft+84, this.guiTop+80+(this.isAdvanced ? OFFSET_ADVANCED : 0)));
}
@Override
@ -126,14 +126,14 @@ public class GuiInputter extends GuiContainer{
if(this.isAdvanced){
List infoList = this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.whitelistInfo"), 200);
String text1 = this.tileInputter.isPullWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist");
if(x >= guiLeft+3 && y >= guiTop+16 && x <= guiLeft+18 && y <= guiTop+31){
if(x >= this.guiLeft+3 && y >= this.guiTop+16 && x <= this.guiLeft+18 && y <= this.guiTop+31){
ArrayList list = new ArrayList();
list.add(TextFormatting.BOLD+text1);
list.addAll(infoList);
this.drawHoveringText(list, x, y);
}
String text2 = this.tileInputter.isPutWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist");
if(x >= guiLeft+157 && y >= guiTop+16 && x <= guiLeft+172 && y <= guiTop+31){
if(x >= this.guiLeft+157 && y >= this.guiTop+16 && x <= this.guiLeft+172 && y <= this.guiTop+31){
ArrayList list = new ArrayList();
list.add(TextFormatting.BOLD+text2);
list.addAll(infoList);
@ -143,23 +143,23 @@ public class GuiInputter extends GuiContainer{
int newTopOffset = this.guiTop+(this.isAdvanced ? OFFSET_ADVANCED : 0);
//Info Mode on!
if(x >= guiLeft+11 && y >= newTopOffset+65 && x <= guiLeft+11+31 && y <= newTopOffset+65+12){
if(x >= this.guiLeft+11 && y >= newTopOffset+65 && x <= this.guiLeft+11+31 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.1").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull")), 200), x, y);
}
if(x >= guiLeft+96 && y >= newTopOffset+65 && x <= guiLeft+96+31 && y <= newTopOffset+65+12){
if(x >= this.guiLeft+96 && y >= newTopOffset+65 && x <= this.guiLeft+96+31 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.1").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put")), 200), x, y);
}
if(x >= guiLeft+48 && y >= newTopOffset+65 && x <= guiLeft+48+31 && y <= newTopOffset+65+12){
if(x >= this.guiLeft+48 && y >= newTopOffset+65 && x <= this.guiLeft+48+31 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.2").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull")), 200), x, y);
}
if(x >= guiLeft+133 && y >= newTopOffset+65 && x <= guiLeft+133+31 && y <= newTopOffset+65+12){
if(x >= this.guiLeft+133 && y >= newTopOffset+65 && x <= this.guiLeft+133+31 && y <= newTopOffset+65+12){
this.drawHoveringText(this.fontRendererObj.listFormattedStringToWidth(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID+".inputter.info.2").replace("<p>", StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put")), 200), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileInputter.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileInputter.getName());
}
@Override
@ -167,21 +167,21 @@ public class GuiInputter 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+93+(isAdvanced ? OFFSET_ADVANCED : 0), 0, 0, 176, 86);
this.drawTexturedModalRect(this.guiLeft, this.guiTop+93+(this.isAdvanced ? OFFSET_ADVANCED : 0), 0, 0, 176, 86);
this.mc.getTextureManager().bindTexture(this.isAdvanced ? resLocAdvanced : resLoc);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93+(isAdvanced ? OFFSET_ADVANCED : 0));
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93+(this.isAdvanced ? OFFSET_ADVANCED : 0));
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull"), guiLeft+22+3, guiTop+32+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put"), guiLeft+107+3, guiTop+32+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.pull"), this.guiLeft+22+3, this.guiTop+32+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(StringUtil.localize("info."+ModUtil.MOD_ID+".gui.put"), this.guiLeft+107+3, this.guiTop+32+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(sideString[tileInputter.sideToPull+1], guiLeft+24+1, guiTop+45+3+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(sideString[tileInputter.sideToPut+1], guiLeft+109+1, guiTop+45+3+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(sideString[this.tileInputter.sideToPull+1], this.guiLeft+24+1, this.guiTop+45+3+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(sideString[this.tileInputter.sideToPut+1], this.guiLeft+109+1, this.guiTop+45+3+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPutStart), guiLeft+99, guiTop+67+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPutEnd), guiLeft+136, guiTop+67+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPullStart), guiLeft+14, guiTop+67+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPullEnd), guiLeft+51, guiTop+67+(isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPutStart), this.guiLeft+99, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPutEnd), this.guiLeft+136, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPullStart), this.guiLeft+14, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(Integer.toString(this.tileInputter.slotToPullEnd), this.guiLeft+51, this.guiTop+67+(this.isAdvanced ? OFFSET_ADVANCED : 0), StringUtil.DECIMAL_COLOR_WHITE);
this.fieldPutStart.drawTextBox();
this.fieldPutEnd.drawTextBox();
@ -238,13 +238,13 @@ public class GuiInputter extends GuiContainer{
public void setVariable(GuiTextField field, int sendInt){
if(!field.getText().isEmpty()){
this.sendPacket(parse(field.getText()), sendInt);
this.sendPacket(this.parse(field.getText()), sendInt);
field.setText("");
}
}
private void sendPacket(int text, int textID){
PacketHandler.theNetwork.sendToServer(new PacketGuiNumber(x, y, z, world, text, textID, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiNumber(this.x, this.y, this.z, this.world, text, textID, Minecraft.getMinecraft().thePlayer));
}
private int parse(String theInt){
@ -265,7 +265,7 @@ public class GuiInputter extends GuiContainer{
this.setVariable(this.fieldPullEnd, 3);
}
else{
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(x, y, z, world, button.id, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(this.x, this.y, this.z, this.world, button.id, Minecraft.getMinecraft().thePlayer));
}
}
@ -280,7 +280,7 @@ public class GuiInputter extends GuiContainer{
@Override
public void drawButton(Minecraft mc, int x, int y){
if(this.visible){
mc.getTextureManager().bindTexture(resLoc);
mc.getTextureManager().bindTexture(this.resLoc);
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);
@ -291,8 +291,8 @@ public class GuiInputter extends GuiContainer{
this.mouseDragged(mc, x, y);
int color = 14737632;
if(packedFGColour != 0){
color = packedFGColour;
if(this.packedFGColour != 0){
color = this.packedFGColour;
}
else if(!this.enabled){
color = 10526880;
@ -317,7 +317,7 @@ public class GuiInputter extends GuiContainer{
@Override
public void drawButton(Minecraft mc, int x, int y){
if(this.visible){
mc.getTextureManager().bindTexture(resLoc);
mc.getTextureManager().bindTexture(this.resLoc);
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);

View file

@ -44,10 +44,10 @@ public class GuiMiner extends GuiContainer{
public void initGui(){
super.initGui();
GuiButton buttonMode = new GuiButton(0, guiLeft+xSize/2-51, guiTop+75, 50, 20, "Mode");
GuiButton buttonMode = new GuiButton(0, this.guiLeft+this.xSize/2-51, this.guiTop+75, 50, 20, "Mode");
this.buttonList.add(buttonMode);
GuiButton buttonReset = new GuiButton(1, guiLeft+xSize/2+1, guiTop+75, 50, 20, "Reset");
GuiButton buttonReset = new GuiButton(1, this.guiLeft+this.xSize/2+1, this.guiTop+75, 50, 20, "Reset");
this.buttonList.add(buttonReset);
}
@ -58,7 +58,7 @@ public class GuiMiner extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.miner.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.miner.getName());
}
@Override
@ -72,11 +72,11 @@ public class GuiMiner extends GuiContainer{
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything";
this.fontRendererObj.drawString(mining, this.guiLeft+this.xSize/2-fontRendererObj.getStringWidth(mining)/2, guiTop+8, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
this.fontRendererObj.drawString(mining, this.guiLeft+this.xSize/2-this.fontRendererObj.getStringWidth(mining)/2, this.guiTop+8, StringUtil.DECIMAL_COLOR_GRAY_TEXT);
}
@Override
public void actionPerformed(GuiButton button){
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(miner.getPos().getX(), miner.getPos().getY(), miner.getPos().getZ(), miner.getWorld(), button.id, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(this.miner.getPos().getX(), this.miner.getPos().getY(), this.miner.getPos().getZ(), this.miner.getWorld(), button.id, Minecraft.getMinecraft().thePlayer));
}
}

View file

@ -41,18 +41,18 @@ public class GuiOilGenerator extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text1 = this.generator.storage.getEnergyStored()+"/"+this.generator.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){
if(x >= this.guiLeft+43 && y >= this.guiTop+6 && x <= this.guiLeft+58 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
String text2 = StringUtil.getFluidInfo(this.generator.tank);
if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){
if(x >= this.guiLeft+117 && y >= this.guiTop+6 && x <= this.guiLeft+132 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text2), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.generator.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.generator.getName());
}
@Override
@ -67,17 +67,17 @@ public class GuiOilGenerator extends GuiContainer{
if(this.generator.storage.getEnergyStored() > 0){
int i = this.generator.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i);
this.drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i);
}
if(this.generator.tank.getFluidAmount() > 0){
int i = this.generator.getTankScaled(83);
drawTexturedModalRect(this.guiLeft+117, this.guiTop+89-i, 192, 0, 16, i);
this.drawTexturedModalRect(this.guiLeft+117, this.guiTop+89-i, 192, 0, 16, i);
}
if(this.generator.currentBurnTime > 0){
int i = this.generator.getBurningScaled(13);
this.drawTexturedModalRect(guiLeft+72, guiTop+44+12-i, 176, 96-i, 14, i);
this.drawTexturedModalRect(this.guiLeft+72, this.guiTop+44+12-i, 176, 96-i, 14, i);
}
}
}

View file

@ -41,7 +41,7 @@ public class GuiPhantomPlacer extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.placer.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.placer.getName());
}
@Override

View file

@ -59,7 +59,7 @@ public class GuiRangedCollector extends GuiContainer{
public void initGui(){
super.initGui();
this.whitelistButton = new GuiInputter.SmallerButton(0, guiLeft+3, guiTop+16, "");
this.whitelistButton = new GuiInputter.SmallerButton(0, this.guiLeft+3, this.guiTop+16, "");
this.buttonList.add(this.whitelistButton);
}
@ -71,14 +71,14 @@ public class GuiRangedCollector extends GuiContainer{
this.whitelistButton.displayString = this.collector.isWhitelist ? "O" : "X";
String text1 = this.collector.isWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID+".gui.blacklist");
if(x >= guiLeft+3 && y >= guiTop+16 && x <= guiLeft+18 && y <= guiTop+31){
if(x >= this.guiLeft+3 && y >= this.guiTop+16 && x <= this.guiLeft+18 && y <= this.guiTop+31){
this.drawHoveringText(Collections.singletonList(text1), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.collector.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.collector.getName());
}
@Override
@ -94,6 +94,6 @@ public class GuiRangedCollector extends GuiContainer{
@Override
public void actionPerformed(GuiButton button){
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(x, y, z, world, button.id, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(this.x, this.y, this.z, this.world, button.id, Minecraft.getMinecraft().thePlayer));
}
}

View file

@ -40,14 +40,14 @@ public class GuiRepairer extends GuiContainer{
public void drawScreen(int x, int y, float f){
super.drawScreen(x, y, f);
String text = this.tileRepairer.storage.getEnergyStored()+"/"+this.tileRepairer.storage.getMaxEnergyStored()+" RF";
if(x >= guiLeft+28 && y >= guiTop+6 && x <= guiLeft+43 && y <= guiTop+88){
if(x >= this.guiLeft+28 && y >= this.guiTop+6 && x <= this.guiLeft+43 && y <= this.guiTop+88){
this.drawHoveringText(Collections.singletonList(text), x, y);
}
}
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.tileRepairer.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.tileRepairer.getName());
}
@Override
@ -62,7 +62,7 @@ public class GuiRepairer extends GuiContainer{
if(this.tileRepairer.storage.getEnergyStored() > 0){
int i = this.tileRepairer.getEnergyScaled(83);
drawTexturedModalRect(this.guiLeft+28, this.guiTop+89-i, 176, 44, 16, i);
this.drawTexturedModalRect(this.guiLeft+28, this.guiTop+89-i, 176, 44, 16, i);
}
if(TileEntityItemRepairer.canBeRepaired(this.tileRepairer.slots[TileEntityItemRepairer.SLOT_INPUT])){
int i = this.tileRepairer.getItemDamageToScale(22);

View file

@ -61,7 +61,7 @@ public class GuiSmileyCloud extends GuiContainer{
public void initGui(){
super.initGui();
this.nameField = new GuiTextField(4000, this.fontRendererObj, guiLeft+5, guiTop+6, 114, 8);
this.nameField = new GuiTextField(4000, this.fontRendererObj, this.guiLeft+5, this.guiTop+6, 114, 8);
this.nameField.setMaxStringLength(20);
this.nameField.setEnableBackgroundDrawing(false);
this.nameField.setFocused(true);
@ -75,9 +75,9 @@ public class GuiSmileyCloud extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
String name = cloud.name == null || cloud.name.isEmpty() ? "" : TextFormatting.GOLD+cloud.name+TextFormatting.RESET+" "+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.the")+" ";
String name = this.cloud.name == null || this.cloud.name.isEmpty() ? "" : TextFormatting.GOLD+this.cloud.name+TextFormatting.RESET+" "+StringUtil.localize("info."+ModUtil.MOD_ID+".gui.the")+" ";
String localizedName = name+StringUtil.localize("container."+ModUtil.MOD_ID+".cloud.name");
this.fontRendererObj.drawString(localizedName, xSize/2-this.fontRendererObj.getStringWidth(localizedName)/2, -10, StringUtil.DECIMAL_COLOR_WHITE);
this.fontRendererObj.drawString(localizedName, this.xSize/2-this.fontRendererObj.getStringWidth(localizedName)/2, -10, StringUtil.DECIMAL_COLOR_WHITE);
}
@Override
@ -123,6 +123,6 @@ public class GuiSmileyCloud extends GuiContainer{
}
private void sendPacket(String text, int textID){
PacketHandler.theNetwork.sendToServer(new PacketGuiString(x, y, z, world, text, textID, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiString(this.x, this.y, this.z, this.world, text, textID, Minecraft.getMinecraft().thePlayer));
}
}

View file

@ -53,15 +53,15 @@ public class GuiXPSolidifier extends GuiContainer{
public void initGui(){
super.initGui();
GuiButton buttonOne = new GuiInputter.SmallerButton(0, guiLeft+62, guiTop+44, "1");
GuiButton buttonFive = new GuiInputter.SmallerButton(1, guiLeft+80, guiTop+44, "5");
GuiButton buttonTen = new GuiInputter.SmallerButton(2, guiLeft+99, guiTop+44, "10");
GuiButton buttonTwenty = new GuiInputter.SmallerButton(3, guiLeft+62, guiTop+61, "20");
GuiButton buttonThirty = new GuiInputter.SmallerButton(4, guiLeft+80, guiTop+61, "30");
GuiButton buttonForty = new GuiInputter.SmallerButton(5, guiLeft+99, guiTop+61, "40");
GuiButton buttonFifty = new GuiInputter.SmallerButton(6, guiLeft+62, guiTop+78, "50");
GuiButton buttonSixtyFour = new GuiInputter.SmallerButton(7, guiLeft+80, guiTop+78, "64");
GuiButton buttonAll = new GuiInputter.SmallerButton(8, guiLeft+99, guiTop+78, "All");
GuiButton buttonOne = new GuiInputter.SmallerButton(0, this.guiLeft+62, this.guiTop+44, "1");
GuiButton buttonFive = new GuiInputter.SmallerButton(1, this.guiLeft+80, this.guiTop+44, "5");
GuiButton buttonTen = new GuiInputter.SmallerButton(2, this.guiLeft+99, this.guiTop+44, "10");
GuiButton buttonTwenty = new GuiInputter.SmallerButton(3, this.guiLeft+62, this.guiTop+61, "20");
GuiButton buttonThirty = new GuiInputter.SmallerButton(4, this.guiLeft+80, this.guiTop+61, "30");
GuiButton buttonForty = new GuiInputter.SmallerButton(5, this.guiLeft+99, this.guiTop+61, "40");
GuiButton buttonFifty = new GuiInputter.SmallerButton(6, this.guiLeft+62, this.guiTop+78, "50");
GuiButton buttonSixtyFour = new GuiInputter.SmallerButton(7, this.guiLeft+80, this.guiTop+78, "64");
GuiButton buttonAll = new GuiInputter.SmallerButton(8, this.guiLeft+99, this.guiTop+78, "All");
this.buttonList.add(buttonOne);
this.buttonList.add(buttonFive);
@ -81,7 +81,7 @@ public class GuiXPSolidifier extends GuiContainer{
@Override
public void drawGuiContainerForegroundLayer(int x, int y){
AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.solidifier.getName());
AssetUtil.displayNameString(this.fontRendererObj, this.xSize, -10, this.solidifier.getName());
}
@Override
@ -94,12 +94,12 @@ public class GuiXPSolidifier extends GuiContainer{
this.mc.getTextureManager().bindTexture(resLoc);
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93);
this.drawCenteredString(this.fontRendererObj, Integer.toString(this.solidifier.amount), guiLeft+88, guiTop+30, StringUtil.DECIMAL_COLOR_WHITE);
this.drawCenteredString(this.fontRendererObj, Integer.toString(this.solidifier.amount), this.guiLeft+88, this.guiTop+30, StringUtil.DECIMAL_COLOR_WHITE);
}
@Override
public void actionPerformed(GuiButton button){
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(x, y, z, world, button.id, Minecraft.getMinecraft().thePlayer));
PacketHandler.theNetwork.sendToServer(new PacketGuiButton(this.x, this.y, this.z, this.world, button.id, Minecraft.getMinecraft().thePlayer));
this.solidifier.onButtonPressed(button.id, Minecraft.getMinecraft().thePlayer);
}
}

View file

@ -102,7 +102,7 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int pass){
return pass > 0 ? color : 0xFFFFFF;
return pass > 0 ? ItemAllToolAA.this.color : 0xFFFFFF;
}
};
}

View file

@ -68,7 +68,7 @@ public class ItemLeafBlower extends ItemBase{
@Override
public void onUsingTick(ItemStack stack, EntityLivingBase player, int time){
if(!player.worldObj.isRemote){
if(time <= getMaxItemUseDuration(stack) && (this.isAdvanced || time%3 == 0)){
if(time <= this.getMaxItemUseDuration(stack) && (this.isAdvanced || time%3 == 0)){
//Breaks the Blocks
this.breakStuff(player.worldObj, MathHelper.floor_double(player.posX), MathHelper.floor_double(player.posY), MathHelper.floor_double(player.posZ));
//Plays a Minecart sounds (It really sounds like a Leaf Blower!)

View file

@ -99,8 +99,8 @@ public abstract class ItemEnergy extends ItemEnergyContainer{
@Override
public double getDurabilityForDisplay(ItemStack stack){
double energyDif = getMaxEnergyStored(stack)-getEnergyStored(stack);
double maxAmount = getMaxEnergyStored(stack);
double energyDif = this.getMaxEnergyStored(stack)-this.getEnergyStored(stack);
double maxAmount = this.getMaxEnergyStored(stack);
return energyDif/maxAmount;
}

View file

@ -226,7 +226,7 @@ public class LaserRelayConnectionHandler{
}
public boolean contains(BlockPos relay){
return (this.firstRelay != null && PosUtil.areSamePos(firstRelay, relay)) || (this.secondRelay != null && PosUtil.areSamePos(secondRelay, relay));
return (this.firstRelay != null && PosUtil.areSamePos(this.firstRelay, relay)) || (this.secondRelay != null && PosUtil.areSamePos(this.secondRelay, relay));
}
@Override

View file

@ -89,7 +89,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
private void doWork(){
if(this.storage.getEnergyStored() >= ENERGY_USE){
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj));
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));
//Extract energy for shooting the laser itself too!
this.storage.extractEnergy(ENERGY_USE, false);
@ -124,7 +124,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple
System.out.println("SOUND!");
this.worldObj.playSound(null, this.getX(), this.getY(), this.getZ(), SoundHandler.reconstructor, SoundCategory.BLOCKS, 0.35F, 1.0F);
}
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getX(), this.getY(), this.getZ(), endX, endY, endZ, currentLens.getColor(), ConfigValues.lessParticles ? 2 : 8, 2F), new NetworkRegistry.TargetPoint(worldObj.provider.getDimension(), this.getX(), this.getY(), this.getZ(), 64));
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getX(), this.getY(), this.getZ(), endX, endY, endZ, currentLens.getColor(), ConfigValues.lessParticles ? 2 : 8, 2F), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.getX(), this.getY(), this.getZ(), 64));
}
@Override

View file

@ -55,7 +55,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered && !this.activateOnceWithSignal){
if(this.currentTime > 0){
this.currentTime--;
@ -76,28 +76,28 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements IRedst
}
private void doWork(){
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj));
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));
BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, this.pos, 0);
if(coordsBlock != null){
Block blockToBreak = PosUtil.getBlock(coordsBlock, worldObj);
IBlockState stateToBreak = worldObj.getBlockState(coordsBlock);
if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(stateToBreak, worldObj, coordsBlock) > -1.0F){
Block blockToBreak = PosUtil.getBlock(coordsBlock, this.worldObj);
IBlockState stateToBreak = this.worldObj.getBlockState(coordsBlock);
if(!this.isPlacer && blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(stateToBreak, this.worldObj, coordsBlock) > -1.0F){
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, stateToBreak, 0));
drops.addAll(blockToBreak.getDrops(this.worldObj, coordsBlock, stateToBreak, 0));
if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigValues.lessBlockBreakingEffects){
worldObj.playAuxSFX(2001, coordsBlock, Block.getStateId(stateToBreak));
this.worldObj.playAuxSFX(2001, coordsBlock, Block.getStateId(stateToBreak));
}
WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos);
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.pos);
WorldUtil.addToInventory(this, drops, true, true);
this.markDirty();
}
}
else if(this.isPlacer){
int theSlot = WorldUtil.findFirstFilledSlot(this.slots);
this.setInventorySlotContents(theSlot, WorldUtil.useItemAtSide(sideToManipulate, worldObj, this.pos, this.slots[theSlot]));
this.setInventorySlotContents(theSlot, WorldUtil.useItemAtSide(sideToManipulate, this.worldObj, this.pos, this.slots[theSlot]));
if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0){
this.slots[theSlot] = null;
}

View file

@ -75,7 +75,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.isCanola(0) && PRODUCE <= this.tank.getCapacity()-this.tank.getFluidAmount()){
if(this.storage.getEnergyStored() >= ENERGY_USE){
this.currentProcessTime++;
@ -97,15 +97,15 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IE
this.currentProcessTime = 0;
}
WorldUtil.fillBucket(tank, slots, 1, 2);
WorldUtil.fillBucket(this.tank, this.slots, 1, 2);
if(this.tank.getFluidAmount() > 0){
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.DOWN, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.DOWN, this.tank);
if(!this.isRedstonePowered){
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.NORTH, this.tank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.EAST, this.tank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.SOUTH, this.tank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.WEST, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.NORTH, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.EAST, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.SOUTH, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.WEST, this.tank);
}
}

View file

@ -65,7 +65,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
boolean flag = this.currentBurnTime > 0;
if(this.currentBurnTime > 0){
@ -85,19 +85,19 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements
}
if(this.storage.getEnergyStored() > 0){
WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage);
WorldUtil.pushEnergyToAllSides(this.worldObj, this.pos, this.storage);
}
if(flag != this.currentBurnTime > 0){
this.markDirty();
int meta = PosUtil.getMetadata(this.getPos(), worldObj);
int meta = PosUtil.getMetadata(this.getPos(), this.worldObj);
if(meta == 1){
if(!(this.currentBurnTime <= 0 && this.slots[0] != null && TileEntityFurnace.getItemBurnTime(this.slots[0]) > 0 && this.storage.getEnergyStored() < this.storage.getMaxEnergyStored())){
PosUtil.setMetadata(this.pos, worldObj, 0, 2);
PosUtil.setMetadata(this.pos, this.worldObj, 0, 2);
}
}
else{
PosUtil.setMetadata(this.pos, worldObj, 1, 2);
PosUtil.setMetadata(this.pos, this.worldObj, 1, 2);
}
}

View file

@ -95,7 +95,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
this.storeCoffee();
if(this.brewTime > 0 || this.isRedstonePowered){
@ -103,7 +103,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
}
if((this.coffeeCacheAmount != this.lastCoffeeAmount || this.storage.getEnergyStored() != this.lastEnergy || this.tank.getFluidAmount() != this.lastTank || this.brewTime != this.lastBrewTime) && this.sendUpdateWithInterval()){
this.lastCoffeeAmount = coffeeCacheAmount;
this.lastCoffeeAmount = this.coffeeCacheAmount;
this.lastEnergy = this.storage.getEnergyStored();
this.lastTank = this.tank.getFluidAmount();
this.lastBrewTime = this.brewTime;
@ -128,11 +128,11 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements
}
}
WorldUtil.emptyBucket(tank, slots, SLOT_WATER_INPUT, SLOT_WATER_OUTPUT, FluidRegistry.WATER);
WorldUtil.emptyBucket(this.tank, this.slots, SLOT_WATER_INPUT, SLOT_WATER_OUTPUT, FluidRegistry.WATER);
}
public void brew(){
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.slots[SLOT_INPUT] != null && this.slots[SLOT_INPUT].getItem() == InitItems.itemMisc && this.slots[SLOT_INPUT].getItemDamage() == TheMiscItems.CUP.ordinal() && this.slots[SLOT_OUTPUT] == null && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == FluidRegistry.WATER && this.tank.getFluidAmount() >= WATER_USE){
if(this.storage.getEnergyStored() >= ENERGY_USED){
if(this.brewTime%30 == 0 && !ConfigValues.lessSound){

View file

@ -51,7 +51,7 @@ public class TileEntityCompost extends TileEntityInventoryBase{
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
boolean theFlag = this.conversionTime > 0;
if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= AMOUNT){
this.conversionTime++;

View file

@ -57,7 +57,7 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered && !this.activateOnceWithSignal){
if(this.storage.getEnergyStored() >= ENERGY_USE*RANGE){
if(this.currentTime > 0){
@ -79,21 +79,21 @@ public class TileEntityDirectionalBreaker extends TileEntityInventoryBase implem
}
private void doWork(){
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj));
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));
for(int i = 0; i < RANGE; i++){
BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, pos, i);
BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, this.pos, i);
if(coordsBlock != null){
Block blockToBreak = PosUtil.getBlock(coordsBlock, worldObj);
if(blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(worldObj.getBlockState(coordsBlock), worldObj, pos) > -1.0F){
Block blockToBreak = PosUtil.getBlock(coordsBlock, this.worldObj);
if(blockToBreak != null && !(blockToBreak instanceof BlockAir) && blockToBreak.getBlockHardness(this.worldObj.getBlockState(coordsBlock), this.worldObj, this.pos) > -1.0F){
ArrayList<ItemStack> drops = new ArrayList();
drops.addAll(blockToBreak.getDrops(worldObj, coordsBlock, worldObj.getBlockState(coordsBlock), 0));
drops.addAll(blockToBreak.getDrops(this.worldObj, coordsBlock, this.worldObj.getBlockState(coordsBlock), 0));
if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigValues.lessBlockBreakingEffects){
worldObj.playAuxSFX(2001, coordsBlock, Block.getStateId(worldObj.getBlockState(coordsBlock)));
this.worldObj.playAuxSFX(2001, coordsBlock, Block.getStateId(this.worldObj.getBlockState(coordsBlock)));
}
WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.getPos(), i);
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.getPos(), i);
WorldUtil.addToInventory(this, drops, true, true);
this.storage.extractEnergy(ENERGY_USE, false);
this.markDirty();

View file

@ -41,7 +41,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered && !this.activateOnceWithSignal){
if(this.currentTime > 0){
this.currentTime--;
@ -65,7 +65,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements IRedst
if(this.removeFromInventory(false) != null){
ItemStack stack = this.removeFromInventory(true);
stack.stackSize = 1;
WorldUtil.dropItemAtSide(WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj)), worldObj, this.pos, stack);
WorldUtil.dropItemAtSide(WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj)), this.worldObj, this.pos, stack);
}
}

View file

@ -43,7 +43,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.slots[0] != null && this.slots[0].getItem() instanceof IEnergyContainerItem && this.slots[1] == null){
if(this.storage.getEnergyStored() > 0){
int received = ((IEnergyContainerItem)this.slots[0].getItem()).receiveEnergy(this.slots[0], this.storage.getEnergyStored(), false);
@ -59,7 +59,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements IEne
}
}
if(lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){
if(this.lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){
this.lastEnergy = this.storage.getEnergyStored();
}
}

View file

@ -44,7 +44,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.slots[0] != null && this.slots[0].getItem() instanceof IEnergyContainerItem && this.slots[1] == null){
if(((IEnergyContainerItem)this.slots[0].getItem()).getEnergyStored(this.slots[0]) > 0){
int toReceive = ((IEnergyContainerItem)this.slots[0].getItem()).extractEnergy(this.slots[0], this.storage.getMaxEnergyStored()-this.storage.getEnergyStored(), false);
@ -61,10 +61,10 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements IEne
}
if(this.storage.getEnergyStored() > 0){
WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage);
WorldUtil.pushEnergyToAllSides(this.worldObj, this.pos, this.storage);
}
if(lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){
if(this.lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){
this.lastEnergy = this.storage.getEnergyStored();
}
}

View file

@ -62,10 +62,10 @@ public class TileEntityFeeder extends TileEntityInventoryBase{
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
boolean theFlag = this.currentTimer > 0;
int range = 5;
List<EntityAnimal> animals = worldObj.getEntitiesWithinAABB(EntityAnimal.class, new AxisAlignedBB(this.pos.getX()-range, this.pos.getY()-range, this.pos.getZ()-range, this.pos.getX()+range, this.pos.getY()+range, this.pos.getZ()+range));
List<EntityAnimal> animals = this.worldObj.getEntitiesWithinAABB(EntityAnimal.class, new AxisAlignedBB(this.pos.getX()-range, this.pos.getY()-range, this.pos.getZ()-range, this.pos.getX()+range, this.pos.getY()+range, this.pos.getZ()+range));
if(animals != null){
this.currentAnimalAmount = animals.size();
if(this.currentAnimalAmount >= 2){
@ -120,7 +120,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase{
double d = Util.RANDOM.nextGaussian()*0.02D;
double d1 = Util.RANDOM.nextGaussian()*0.02D;
double d2 = Util.RANDOM.nextGaussian()*0.02D;
worldObj.spawnParticle(EnumParticleTypes.HEART, (animal.posX+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, animal.posY+0.5D+(double)(Util.RANDOM.nextFloat()*animal.height), (animal.posZ+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, d, d1, d2);
this.worldObj.spawnParticle(EnumParticleTypes.HEART, (animal.posX+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, animal.posY+0.5D+(double)(Util.RANDOM.nextFloat()*animal.height), (animal.posZ+(double)(Util.RANDOM.nextFloat()*animal.width*2.0F))-animal.width, d, d1, d2);
}
}

View file

@ -56,7 +56,7 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
int produce = 80;
if(this.canolaTank.getFluidAmount() >= produce && produce <= this.oilTank.getCapacity()-this.oilTank.getFluidAmount()){
this.currentProcessTime++;
@ -72,16 +72,16 @@ public class TileEntityFermentingBarrel extends TileEntityInventoryBase implemen
this.currentProcessTime = 0;
}
WorldUtil.emptyBucket(canolaTank, slots, 0, 1, InitFluids.fluidCanolaOil);
WorldUtil.fillBucket(oilTank, slots, 2, 3);
WorldUtil.emptyBucket(this.canolaTank, this.slots, 0, 1, InitFluids.fluidCanolaOil);
WorldUtil.fillBucket(this.oilTank, this.slots, 2, 3);
if(this.oilTank.getFluidAmount() > 0){
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.DOWN, this.oilTank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.DOWN, this.oilTank);
if(!this.isRedstonePowered){
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.NORTH, this.oilTank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.EAST, this.oilTank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.SOUTH, this.oilTank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.WEST, this.oilTank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.NORTH, this.oilTank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.EAST, this.oilTank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.SOUTH, this.oilTank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.WEST, this.oilTank);
}
}

View file

@ -47,25 +47,25 @@ public class TileEntityFishingNet extends TileEntityBase{
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered){
if(PosUtil.getMaterial(PosUtil.offset(this.pos, 0, -1, 0), this.worldObj) == Material.WATER){
if(this.timeUntilNextDrop > 0){
this.timeUntilNextDrop--;
if(timeUntilNextDrop <= 0){
if(this.timeUntilNextDrop <= 0){
LootContext.Builder builder = new LootContext.Builder((WorldServer)this.worldObj);
List<ItemStack> fishables = this.worldObj.getLootTableManager().getLootTableFromLocation(LootTableList.GAMEPLAY_FISHING).generateLootForPools(Util.RANDOM, builder.build());
for(ItemStack fishable : fishables){
TileEntity tile = worldObj.getTileEntity(PosUtil.offset(pos, 0, 1, 0));
TileEntity tile = this.worldObj.getTileEntity(PosUtil.offset(this.pos, 0, 1, 0));
if(tile != null && tile instanceof IInventory){
ArrayList<ItemStack> list = new ArrayList<ItemStack>();
list.add(fishable);
WorldUtil.addToInventory((IInventory)tile, list, EnumFacing.DOWN, true, false);
}
else{
EntityItem item = new EntityItem(worldObj, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, fishable);
EntityItem item = new EntityItem(this.worldObj, this.pos.getX()+0.5, this.pos.getY()+0.5, this.pos.getZ()+0.5, fishable);
item.lifespan = 2000;
worldObj.spawnEntityInWorld(item);
this.worldObj.spawnEntityInWorld(item);
}
}
}

View file

@ -56,35 +56,35 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
}
private void doWork(){
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, worldObj));
EnumFacing sideToManipulate = WorldUtil.getDirectionByPistonRotation(PosUtil.getMetadata(this.pos, this.worldObj));
BlockPos coordsBlock = WorldUtil.getCoordsFromSide(sideToManipulate, this.pos, 0);
if(coordsBlock != null){
Block blockToBreak = PosUtil.getBlock(coordsBlock, worldObj);
if(!this.isPlacer && blockToBreak != null && PosUtil.getMetadata(coordsBlock, worldObj) == 0 && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){
Block blockToBreak = PosUtil.getBlock(coordsBlock, this.worldObj);
if(!this.isPlacer && blockToBreak != null && PosUtil.getMetadata(coordsBlock, this.worldObj) == 0 && FluidContainerRegistry.BUCKET_VOLUME <= this.tank.getCapacity()-this.tank.getFluidAmount()){
if(blockToBreak instanceof IFluidBlock && ((IFluidBlock)blockToBreak).getFluid() != null){
if(this.tank.fill(new FluidStack(((IFluidBlock)blockToBreak).getFluid(), FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){
this.tank.fill(new FluidStack(((IFluidBlock)blockToBreak).getFluid(), FluidContainerRegistry.BUCKET_VOLUME), true);
WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos);
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.pos);
}
}
else if(blockToBreak == Blocks.LAVA || blockToBreak == Blocks.FLOWING_LAVA){
if(this.tank.fill(new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){
this.tank.fill(new FluidStack(FluidRegistry.LAVA, FluidContainerRegistry.BUCKET_VOLUME), true);
WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos);
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.pos);
}
}
else if(blockToBreak == Blocks.WATER || blockToBreak == Blocks.FLOWING_WATER){
if(this.tank.fill(new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), false) >= FluidContainerRegistry.BUCKET_VOLUME){
this.tank.fill(new FluidStack(FluidRegistry.WATER, FluidContainerRegistry.BUCKET_VOLUME), true);
WorldUtil.breakBlockAtSide(sideToManipulate, worldObj, this.pos);
WorldUtil.breakBlockAtSide(sideToManipulate, this.worldObj, this.pos);
}
}
}
else if(this.isPlacer && PosUtil.getBlock(coordsBlock, worldObj).isReplaceable(worldObj, coordsBlock)){
else if(this.isPlacer && PosUtil.getBlock(coordsBlock, this.worldObj).isReplaceable(this.worldObj, coordsBlock)){
if(this.tank.getFluidAmount() >= FluidContainerRegistry.BUCKET_VOLUME){
if(this.tank.getFluid().getFluid().getBlock() != null){
WorldUtil.useItemAtSide(sideToManipulate, worldObj, this.pos, new ItemStack(this.tank.getFluid().getFluid().getBlock()));
WorldUtil.useItemAtSide(sideToManipulate, this.worldObj, this.pos, new ItemStack(this.tank.getFluid().getFluid().getBlock()));
this.tank.drain(FluidContainerRegistry.BUCKET_VOLUME, true);
}
}
@ -149,7 +149,7 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered && !this.activateOnceWithSignal){
if(this.currentTime > 0){
this.currentTime--;
@ -163,24 +163,24 @@ public class TileEntityFluidCollector extends TileEntityInventoryBase implements
}
if(!this.isPlacer){
WorldUtil.fillBucket(tank, slots, 0, 1);
WorldUtil.fillBucket(this.tank, this.slots, 0, 1);
}
else{
WorldUtil.emptyBucket(tank, slots, 0, 1);
WorldUtil.emptyBucket(this.tank, this.slots, 0, 1);
}
if(!this.isPlacer && this.tank.getFluidAmount() > 0){
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.DOWN, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.DOWN, this.tank);
if(!this.isRedstonePowered){
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.NORTH, this.tank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.EAST, this.tank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.SOUTH, this.tank);
WorldUtil.pushFluid(worldObj, this.pos, EnumFacing.WEST, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.NORTH, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.EAST, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.SOUTH, this.tank);
WorldUtil.pushFluid(this.worldObj, this.pos, EnumFacing.WEST, this.tank);
}
}
if(lastTankAmount != this.tank.getFluidAmount() && this.sendUpdateWithInterval()){
lastTankAmount = this.tank.getFluidAmount();
if(this.lastTankAmount != this.tank.getFluidAmount() && this.sendUpdateWithInterval()){
this.lastTankAmount = this.tank.getFluidAmount();
}
}
}

View file

@ -59,7 +59,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
boolean flag = this.firstSmeltTime > 0 || this.secondSmeltTime > 0;
boolean canSmeltOnFirst = this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1);
@ -97,18 +97,18 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){
this.markDirty();
int meta = PosUtil.getMetadata(this.pos, worldObj);
int meta = PosUtil.getMetadata(this.pos, this.worldObj);
if(meta > 3){
if(!this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1) && !this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2)){
PosUtil.setMetadata(this.pos, worldObj, meta-4, 2);
PosUtil.setMetadata(this.pos, this.worldObj, meta-4, 2);
}
}
else{
PosUtil.setMetadata(this.pos, worldObj, meta+4, 2);
PosUtil.setMetadata(this.pos, this.worldObj, meta+4, 2);
}
}
if((lastEnergy != this.storage.getEnergyStored() || this.lastFirstSmelt != this.firstSmeltTime || this.lastSecondSmelt != this.secondSmeltTime) && this.sendUpdateWithInterval()){
if((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstSmelt != this.firstSmeltTime || this.lastSecondSmelt != this.secondSmeltTime) && this.sendUpdateWithInterval()){
this.lastEnergy = this.storage.getEnergyStored();
this.lastFirstSmelt = this.firstSmeltTime;
this.lastSecondSmelt = this.secondSmeltTime;

View file

@ -61,8 +61,8 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.hasBlockAbove() && worldObj.isDaytime()){
if(!this.worldObj.isRemote){
if(!this.hasBlockAbove() && this.worldObj.isDaytime()){
if(PRODUCE <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){
this.storage.receiveEnergy(PRODUCE, false);
this.markDirty();
@ -70,7 +70,7 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
}
if(this.storage.getEnergyStored() > 0){
WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage);
WorldUtil.pushEnergyToAllSides(this.worldObj, this.pos, this.storage);
}
if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){
@ -80,9 +80,9 @@ public class TileEntityFurnaceSolar extends TileEntityBase implements IEnergyPro
}
public boolean hasBlockAbove(){
for(int y = 1; y <= worldObj.getHeight(); y++){
for(int y = 1; y <= this.worldObj.getHeight(); y++){
BlockPos offset = PosUtil.offset(this.pos, 0, y, 0);
if(!PosUtil.getBlock(offset, worldObj).isAir(worldObj.getBlockState(offset), worldObj, offset)){
if(!PosUtil.getBlock(offset, this.worldObj).isAir(this.worldObj.getBlockState(offset), this.worldObj, offset)){
return true;
}
}

View file

@ -39,18 +39,18 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(worldObj.canBlockSeeSky(this.getPos()) && worldObj.isDaytime()){
if(!this.worldObj.isRemote){
if(this.worldObj.canBlockSeeSky(this.getPos()) && this.worldObj.isDaytime()){
if(this.timeUntilNextFert > 0){
this.timeUntilNextFert--;
if(timeUntilNextFert <= 0){
if(this.timeUntilNextFert <= 0){
BlockPos blockToFert = this.blockToFertilize();
if(blockToFert != null){
int metaBefore = PosUtil.getMetadata(blockToFert, worldObj);
PosUtil.getBlock(blockToFert, worldObj).updateTick(worldObj, blockToFert, worldObj.getBlockState(blockToFert), Util.RANDOM);
int metaBefore = PosUtil.getMetadata(blockToFert, this.worldObj);
PosUtil.getBlock(blockToFert, this.worldObj).updateTick(this.worldObj, blockToFert, this.worldObj.getBlockState(blockToFert), Util.RANDOM);
if(PosUtil.getMetadata(blockToFert, worldObj) != metaBefore){
worldObj.playAuxSFX(2005, blockToFert, 0);
if(PosUtil.getMetadata(blockToFert, this.worldObj) != metaBefore){
this.worldObj.playAuxSFX(2005, blockToFert, 0);
}
}
}
@ -66,8 +66,8 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
public BlockPos blockToFertilize(){
for(int i = -1; i > 0; i--){
BlockPos offset = PosUtil.offset(this.pos, 0, i, 0);
Block block = PosUtil.getBlock(pos, worldObj);
if(block != null && !(worldObj.isAirBlock(offset))){
Block block = PosUtil.getBlock(this.pos, this.worldObj);
if(block != null && !(this.worldObj.isAirBlock(offset))){
if((block instanceof IGrowable || block instanceof IPlantable) && !(block instanceof BlockGrass)){
return offset;
}

View file

@ -96,7 +96,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
boolean flag = this.firstCrushTime > 0 || this.secondCrushTime > 0;
boolean canCrushOnFirst = this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2);
@ -113,7 +113,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
shouldPlaySound = true;
}
this.firstCrushTime++;
if(this.firstCrushTime >= getMaxCrushTime()){
if(this.firstCrushTime >= this.getMaxCrushTime()){
this.finishCrushing(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2);
this.firstCrushTime = 0;
}
@ -130,7 +130,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
shouldPlaySound = true;
}
this.secondCrushTime++;
if(this.secondCrushTime >= getMaxCrushTime()){
if(this.secondCrushTime >= this.getMaxCrushTime()){
this.finishCrushing(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2);
this.secondCrushTime = 0;
}
@ -147,18 +147,18 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){
this.markDirty();
int meta = PosUtil.getMetadata(this.pos, worldObj);
int meta = PosUtil.getMetadata(this.pos, this.worldObj);
if(meta == 1){
if(!this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2) && (!this.isDouble || !this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2))){
PosUtil.setMetadata(this.pos, worldObj, 0, 2);
PosUtil.setMetadata(this.pos, this.worldObj, 0, 2);
}
}
else{
PosUtil.setMetadata(this.pos, worldObj, 1, 2);
PosUtil.setMetadata(this.pos, this.worldObj, 1, 2);
}
}
if((lastEnergy != this.storage.getEnergyStored() || this.lastFirstCrush != this.firstCrushTime || this.lastSecondCrush != this.secondCrushTime) && this.sendUpdateWithInterval()){
if((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstCrush != this.firstCrushTime || this.lastSecondCrush != this.secondCrushTime) && this.sendUpdateWithInterval()){
this.lastEnergy = this.storage.getEnergyStored();
this.lastFirstCrush = this.firstCrushTime;
this.lastSecondCrush = this.secondCrushTime;

View file

@ -47,13 +47,13 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
ArrayList<Integer> blocksAround = new ArrayList<Integer>();
if(ENERGY_PRODUCE <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored()){
for(int i = 1; i <= 5; i++){
BlockPos coords = WorldUtil.getCoordsFromSide(WorldUtil.getDirectionBySidesInOrder(i), this.pos, 0);
Block block = PosUtil.getBlock(coords, worldObj);
if(block != null && block.getMaterial(worldObj.getBlockState(coords)) == Material.LAVA && PosUtil.getMetadata(coords, worldObj) == 0){
Block block = PosUtil.getBlock(coords, this.worldObj);
if(block != null && block.getMaterial(this.worldObj.getBlockState(coords)) == Material.LAVA && PosUtil.getMetadata(coords, this.worldObj) == 0){
blocksAround.add(i);
}
}
@ -64,13 +64,13 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr
if(Util.RANDOM.nextInt(10000) == 0){
int randomSide = blocksAround.get(Util.RANDOM.nextInt(blocksAround.size()));
WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, this.pos);
WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), this.worldObj, this.pos);
}
}
}
if(this.storage.getEnergyStored() > 0){
WorldUtil.pushEnergy(worldObj, this.pos, EnumFacing.UP, this.storage);
WorldUtil.pushEnergy(this.worldObj, this.pos, EnumFacing.UP, this.storage);
}
if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){

View file

@ -83,7 +83,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
*/
private void pull(){
//The Inventory to pull from
IInventory theInventory = (IInventory)placeToPull;
IInventory theInventory = (IInventory)this.placeToPull;
//Does the Inventory even have Slots!?
if(theInventory.getSizeInventory() > 0){
//The slot currently pulling from (for later)
@ -181,7 +181,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
* (Check pull() for Description, similar to this)
*/
private void put(){
IInventory theInventory = (IInventory)placeToPut;
IInventory theInventory = (IInventory)this.placeToPut;
if(theInventory.getSizeInventory() > 0){
int theSlotToPut = this.slotToPutStart;
int maxSize = theInventory.getInventoryStackLimit();
@ -266,7 +266,7 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
* @return If the Item is filtered correctly
*/
private boolean checkBothFilters(ItemStack stack){
return this.checkFilter(stack, true, isPullWhitelist) || this.checkFilter(stack, false, isPutWhitelist);
return this.checkFilter(stack, true, this.isPullWhitelist) || this.checkFilter(stack, false, this.isPutWhitelist);
}
/**
@ -395,23 +395,23 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
this.initVars();
//Is Block not powered by Redstone?
if(!this.isRedstonePowered){
if(!(this.sideToPull == this.sideToPut && this.slotToPullStart == this.slotToPutStart && this.slotToPullEnd == this.slotToPutEnd)){
if(sideToPull != -1 && this.placeToPull instanceof IInventory){
if(this.sideToPull != -1 && this.placeToPull instanceof IInventory){
this.pull();
}
if(sideToPut != -1 && this.placeToPut instanceof IInventory){
if(this.sideToPut != -1 && this.placeToPut instanceof IInventory){
this.put();
}
}
}
//Update the Client
if((this.sideToPut != this.lastPutSide || this.sideToPull != this.lastPullSide || this.slotToPullStart != this.lastPullStart || this.slotToPullEnd != this.lastPullEnd || this.slotToPutStart != this.lastPutStart || this.slotToPutEnd != this.lastPutEnd || this.isPullWhitelist != lastPullWhite || this.isPutWhitelist != this.lastPutWhite) && this.sendUpdateWithInterval()){
if((this.sideToPut != this.lastPutSide || this.sideToPull != this.lastPullSide || this.slotToPullStart != this.lastPullStart || this.slotToPullEnd != this.lastPullEnd || this.slotToPutStart != this.lastPutStart || this.slotToPutEnd != this.lastPutEnd || this.isPullWhitelist != this.lastPullWhite || this.isPutWhitelist != this.lastPutWhite) && this.sendUpdateWithInterval()){
this.lastPutSide = this.sideToPut;
this.lastPullSide = this.sideToPull;
this.lastPullStart = this.slotToPullStart;

View file

@ -41,11 +41,11 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
if(!isForSync || this.shouldSyncSlots()){
if(this.slots.length > 0){
NBTTagList tagList = new NBTTagList();
for(int currentIndex = 0; currentIndex < slots.length; currentIndex++){
for(int currentIndex = 0; currentIndex < this.slots.length; currentIndex++){
NBTTagCompound tagCompound = new NBTTagCompound();
tagCompound.setByte("Slot", (byte)currentIndex);
if(slots[currentIndex] != null){
slots[currentIndex].writeToNBT(tagCompound);
if(this.slots[currentIndex] != null){
this.slots[currentIndex].writeToNBT(tagCompound);
}
tagList.appendTag(tagCompound);
}
@ -67,8 +67,8 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
for(int i = 0; i < tagList.tagCount(); i++){
NBTTagCompound tagCompound = tagList.getCompoundTagAt(i);
byte slotIndex = tagCompound.getByte("Slot");
if(slotIndex >= 0 && slotIndex < slots.length){
slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
if(slotIndex >= 0 && slotIndex < this.slots.length){
this.slots[slotIndex] = ItemStack.loadItemStackFromNBT(tagCompound);
}
}
}
@ -83,7 +83,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
@Override
public int[] getSlotsForFace(EnumFacing side){
if(this.slots.length > 0){
int[] theInt = new int[slots.length];
int[] theInt = new int[this.slots.length];
for(int i = 0; i < theInt.length; i++){
theInt[i] = i;
}
@ -148,31 +148,31 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
@Override
public int getSizeInventory(){
return slots.length;
return this.slots.length;
}
@Override
public ItemStack getStackInSlot(int i){
if(i < this.getSizeInventory()){
return slots[i];
return this.slots[i];
}
return null;
}
@Override
public ItemStack decrStackSize(int i, int j){
if(slots[i] != null){
if(this.slots[i] != null){
ItemStack stackAt;
if(slots[i].stackSize <= j){
stackAt = slots[i];
slots[i] = null;
if(this.slots[i].stackSize <= j){
stackAt = this.slots[i];
this.slots[i] = null;
this.markDirty();
return stackAt;
}
else{
stackAt = slots[i].splitStack(j);
if(slots[i].stackSize == 0){
slots[i] = null;
stackAt = this.slots[i].splitStack(j);
if(this.slots[i].stackSize == 0){
this.slots[i] = null;
}
this.markDirty();
return stackAt;

View file

@ -53,7 +53,7 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.slots[SLOT_OUTPUT] == null && canBeRepaired(this.slots[SLOT_INPUT])){
if(this.slots[SLOT_INPUT].getItemDamage() <= 0){
this.slots[SLOT_OUTPUT] = this.slots[SLOT_INPUT].copy();

View file

@ -115,7 +115,7 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei
if(maxTransmit > 0){
LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(this.pos);
if(network != null){
transmitted = LaserRelayConnectionHandler.getInstance().transferEnergyToReceiverInNeed(worldObj, blockFrom, network, Math.min(ConfigIntValues.LASER_RELAY_MAX_TRANSFER.getValue(), maxTransmit), simulate);
transmitted = LaserRelayConnectionHandler.getInstance().transferEnergyToReceiverInNeed(this.worldObj, blockFrom, network, Math.min(ConfigIntValues.LASER_RELAY_MAX_TRANSFER.getValue(), maxTransmit), simulate);
}
}
return transmitted;

View file

@ -51,12 +51,12 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.storage.getEnergyStored() >= ENERGY_USE && this.isMultiblock() == HAS_AIR){
this.currentWorkTime++;
if(this.currentWorkTime >= 200){
this.currentWorkTime = 0;
PosUtil.setBlock(PosUtil.offset(this.pos, 0, 1, 0), worldObj, Blocks.LAVA, 0, 2);
PosUtil.setBlock(PosUtil.offset(this.pos, 0, 1, 0), this.worldObj, Blocks.LAVA, 0, 2);
this.storage.extractEnergy(ENERGY_USE, false);
}
}
@ -79,12 +79,12 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I
PosUtil.offset(thisPos, 0, 1, -1)
};
if(WorldUtil.hasBlocksInPlacesGiven(positions, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), worldObj)){
if(WorldUtil.hasBlocksInPlacesGiven(positions, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), this.worldObj)){
BlockPos pos = PosUtil.offset(thisPos, 0, 1, 0);
if(PosUtil.getBlock(pos, worldObj) == Blocks.LAVA || PosUtil.getBlock(pos, worldObj) == Blocks.FLOWING_LAVA){
if(PosUtil.getBlock(pos, this.worldObj) == Blocks.LAVA || PosUtil.getBlock(pos, this.worldObj) == Blocks.FLOWING_LAVA){
return HAS_LAVA;
}
if(PosUtil.getBlock(pos, worldObj) == null || worldObj.isAirBlock(pos)){
if(PosUtil.getBlock(pos, this.worldObj) == null || this.worldObj.isAirBlock(pos)){
return HAS_AIR;
}
}

View file

@ -53,7 +53,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered){
if(this.nextUseCounter >= 5){
@ -66,7 +66,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
for(int reachZ = -RANGE; reachZ < RANGE+1; reachZ++){
for(int reachY = -RANGE; reachY < RANGE+1; reachY++){
BlockPos pos = PosUtil.offset(this.pos, reachX, reachY, reachZ);
Block block = PosUtil.getBlock(pos, worldObj);
Block block = PosUtil.getBlock(pos, this.worldObj);
if(block != null && block.isLeaves(this.worldObj.getBlockState(pos), this.worldObj, pos)){
breakPositions.add(pos);
}
@ -79,7 +79,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
BlockPos theCoord = breakPositions.get(0);
if(!ConfigValues.lessBlockBreakingEffects){
this.worldObj.playAuxSFX(2001, theCoord, Block.getStateId(worldObj.getBlockState(theCoord)));
this.worldObj.playAuxSFX(2001, theCoord, Block.getStateId(this.worldObj.getBlockState(theCoord)));
}
this.worldObj.setBlockToAir(theCoord);
@ -87,7 +87,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
this.storage.receiveEnergy(ENERGY_PRODUCED, false);
if(!ConfigValues.lessParticles){
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(worldObj.provider.getDimension(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), 64));
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.pos.getX(), this.pos.getY(), this.pos.getZ(), 64));
}
}
}
@ -98,7 +98,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements IEnergyPr
}
if(this.storage.getEnergyStored() > 0){
WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage);
WorldUtil.pushEnergyToAllSides(this.worldObj, this.pos, this.storage);
}
if(this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()){

View file

@ -74,7 +74,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
if(!this.isRedstonePowered && this.ticksElapsed%5 == 0){
if(this.layerAt > 0){
if(this.mine(TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, worldObj, this.pos))){
if(this.mine(TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, this.worldObj, this.pos))){
this.layerAt--;
}
}
@ -94,18 +94,18 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
if(this.storage.getEnergyStored() >= actualUse){
BlockPos pos = new BlockPos(this.pos.getX()+anX, this.layerAt, this.pos.getZ()+aZ);
Block block = PosUtil.getBlock(pos, worldObj);
int meta = PosUtil.getMetadata(pos, worldObj);
Block block = PosUtil.getBlock(pos, this.worldObj);
int meta = PosUtil.getMetadata(pos, this.worldObj);
if(block != null && !block.isAir(this.worldObj.getBlockState(pos), this.worldObj, pos)){
if(block.getHarvestLevel(worldObj.getBlockState(pos)) <= 3F && block.getBlockHardness(this.worldObj.getBlockState(pos), this.worldObj, pos) >= 0F && !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock) && this.isMinable(block, meta)){
if(block.getHarvestLevel(this.worldObj.getBlockState(pos)) <= 3F && block.getBlockHardness(this.worldObj.getBlockState(pos), this.worldObj, pos) >= 0F && !(block instanceof BlockLiquid) && !(block instanceof IFluidBlock) && this.isMinable(block, meta)){
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
drops.addAll(block.getDrops(worldObj, pos, worldObj.getBlockState(pos), 0));
drops.addAll(block.getDrops(this.worldObj, pos, this.worldObj.getBlockState(pos), 0));
if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigValues.lessBlockBreakingEffects){
worldObj.playAuxSFX(2001, pos, Block.getStateId(worldObj.getBlockState(pos)));
this.worldObj.playAuxSFX(2001, pos, Block.getStateId(this.worldObj.getBlockState(pos)));
}
worldObj.setBlockToAir(pos);
this.worldObj.setBlockToAir(pos);
WorldUtil.addToInventory(this, drops, true, true);
this.markDirty();
@ -157,7 +157,7 @@ public class TileEntityMiner extends TileEntityInventoryBase implements IEnergyR
private void shootParticles(int endX, int endY, int endZ){
if(!ConfigValues.lessParticles){
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), endX, endY, endZ, new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(worldObj.provider.getDimension(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 96));
PacketHandler.theNetwork.sendToAllAround(new PacketParticle(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), endX, endY, endZ, new float[]{62F/255F, 163F/255F, 74F/255F}, 5, 1.0F), new NetworkRegistry.TargetPoint(this.worldObj.provider.getDimension(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), 96));
}
}

View file

@ -72,7 +72,7 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
boolean flag = this.currentBurnTime > 0;
if(this.currentBurnTime > 0){
@ -88,22 +88,22 @@ public class TileEntityOilGenerator extends TileEntityInventoryBase implements I
}
}
WorldUtil.emptyBucket(tank, slots, 0, 1, InitFluids.fluidOil);
WorldUtil.emptyBucket(this.tank, this.slots, 0, 1, InitFluids.fluidOil);
if(this.storage.getEnergyStored() > 0){
WorldUtil.pushEnergyToAllSides(worldObj, this.pos, this.storage);
WorldUtil.pushEnergyToAllSides(this.worldObj, this.pos, this.storage);
}
if(flag != this.currentBurnTime > 0){
this.markDirty();
int meta = PosUtil.getMetadata(pos, worldObj);
int meta = PosUtil.getMetadata(this.pos, this.worldObj);
if(meta == 1){
if(!(ENERGY_PRODUCED*BURN_TIME <= this.storage.getMaxEnergyStored()-this.storage.getEnergyStored() && this.currentBurnTime <= 0 && this.tank.getFluidAmount() >= fuelUsed)){
PosUtil.setMetadata(this.pos, worldObj, 0, 2);
PosUtil.setMetadata(this.pos, this.worldObj, 0, 2);
}
}
else{
PosUtil.setMetadata(this.pos, worldObj, 1, 2);
PosUtil.setMetadata(this.pos, this.worldObj, 1, 2);
}
}

View file

@ -62,7 +62,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement
public IEnergyProvider getProvider(){
if(this.boundPosition != null){
TileEntity tile = worldObj.getTileEntity(boundPosition);
TileEntity tile = this.worldObj.getTileEntity(this.boundPosition);
if(tile instanceof IEnergyProvider){
return (IEnergyProvider)tile;
}
@ -72,7 +72,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement
public IEnergyReceiver getReceiver(){
if(this.boundPosition != null){
TileEntity tile = worldObj.getTileEntity(boundPosition);
TileEntity tile = this.worldObj.getTileEntity(this.boundPosition);
if(tile instanceof IEnergyReceiver){
return (IEnergyReceiver)tile;
}
@ -84,7 +84,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.isBoundThingInRange() && this.getProvider() != null){
this.pushEnergy(EnumFacing.UP);
this.pushEnergy(EnumFacing.DOWN);
@ -98,11 +98,11 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement
@Override
public boolean isBoundThingInRange(){
return super.isBoundThingInRange() && (worldObj.getTileEntity(boundPosition) instanceof IEnergyReceiver || worldObj.getTileEntity(boundPosition) instanceof IEnergyProvider);
return super.isBoundThingInRange() && (this.worldObj.getTileEntity(this.boundPosition) instanceof IEnergyReceiver || this.worldObj.getTileEntity(this.boundPosition) instanceof IEnergyProvider);
}
private void pushEnergy(EnumFacing side){
TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, this.getPos());
TileEntity tile = WorldUtil.getTileEntityFromSide(side, this.worldObj, this.getPos());
if(tile != null && tile instanceof IEnergyReceiver && this.getProvider().getEnergyStored(side.getOpposite()) > 0){
if(((IEnergyReceiver)tile).canConnectEnergy(side.getOpposite()) && this.canConnectEnergy(side)){
int receive = this.extractEnergy(side, Math.min(((IEnergyReceiver)tile).getMaxEnergyStored(side.getOpposite())-((IEnergyReceiver)tile).getEnergyStored(side.getOpposite()), this.getEnergyStored(side)), true);

View file

@ -95,7 +95,7 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{
public IInventory getInventory(){
if(this.boundPosition != null){
TileEntity tile = worldObj.getTileEntity(boundPosition);
TileEntity tile = this.worldObj.getTileEntity(this.boundPosition);
if(tile instanceof IInventory){
return (IInventory)tile;
}
@ -110,7 +110,7 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface{
@Override
public boolean isBoundThingInRange(){
return super.isBoundThingInRange() && worldObj.getTileEntity(boundPosition) instanceof IInventory;
return super.isBoundThingInRange() && this.worldObj.getTileEntity(this.boundPosition) instanceof IInventory;
}
@Override

View file

@ -30,7 +30,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.isRedstonePowered && this.isBoundThingInRange() && this.getHandler() != null){
this.pushFluid(EnumFacing.UP);
this.pushFluid(EnumFacing.DOWN);
@ -44,7 +44,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements
public IFluidHandler getHandler(){
if(this.boundPosition != null){
TileEntity tile = worldObj.getTileEntity(boundPosition);
TileEntity tile = this.worldObj.getTileEntity(this.boundPosition);
if(tile instanceof IFluidHandler){
return (IFluidHandler)tile;
}
@ -53,7 +53,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements
}
private void pushFluid(EnumFacing side){
TileEntity tile = WorldUtil.getTileEntityFromSide(side, worldObj, this.pos);
TileEntity tile = WorldUtil.getTileEntityFromSide(side, this.worldObj, this.pos);
if(tile != null && tile instanceof IFluidHandler && this.getTankInfo(side) != null && this.getTankInfo(side).length > 0 && ((IFluidHandler)tile).getTankInfo(side.getOpposite()) != null && ((IFluidHandler)tile).getTankInfo(side.getOpposite()).length > 0){
for(FluidTankInfo myInfo : this.getTankInfo(side)){
for(FluidTankInfo hisInfo : ((IFluidHandler)tile).getTankInfo(side.getOpposite())){
@ -73,7 +73,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements
@Override
public boolean isBoundThingInRange(){
return super.isBoundThingInRange() && worldObj.getTileEntity(boundPosition) instanceof IFluidHandler;
return super.isBoundThingInRange() && this.worldObj.getTileEntity(this.boundPosition) instanceof IFluidHandler;
}
@Override

View file

@ -53,9 +53,9 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
super.writeSyncableNBT(compound, sync);
compound.setInteger("Range", this.range);
if(this.boundPosition != null){
compound.setInteger("XCoordOfTileStored", boundPosition.getX());
compound.setInteger("YCoordOfTileStored", boundPosition.getY());
compound.setInteger("ZCoordOfTileStored", boundPosition.getZ());
compound.setInteger("XCoordOfTileStored", this.boundPosition.getX());
compound.setInteger("YCoordOfTileStored", this.boundPosition.getY());
compound.setInteger("ZCoordOfTileStored", this.boundPosition.getZ());
}
}
@ -75,8 +75,8 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
this.range = TileEntityPhantomface.upgradeRange(RANGE, worldObj, this.pos);
if(!this.worldObj.isRemote){
this.range = TileEntityPhantomface.upgradeRange(RANGE, this.worldObj, this.pos);
if(!this.hasBoundPosition()){
this.boundPosition = null;
@ -112,7 +112,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
@Override
public boolean hasBoundPosition(){
if(this.boundPosition != null){
if(this.worldObj.getTileEntity(boundPosition) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ() && this.worldObj.provider.getDimension() == this.worldObj.provider.getDimension())){
if(this.worldObj.getTileEntity(this.boundPosition) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ() && this.worldObj.provider.getDimension() == this.worldObj.provider.getDimension())){
this.boundPosition = null;
return false;
}
@ -123,16 +123,16 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
private void doWork(){
if(this.isBreaker){
Block blockToBreak = PosUtil.getBlock(boundPosition, worldObj);
if(blockToBreak != null && blockToBreak.getBlockHardness(worldObj.getBlockState(boundPosition), worldObj, boundPosition) > -1.0F){
Block blockToBreak = PosUtil.getBlock(this.boundPosition, this.worldObj);
if(blockToBreak != null && blockToBreak.getBlockHardness(this.worldObj.getBlockState(this.boundPosition), this.worldObj, this.boundPosition) > -1.0F){
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
drops.addAll(blockToBreak.getDrops(worldObj, boundPosition, worldObj.getBlockState(boundPosition), 0));
drops.addAll(blockToBreak.getDrops(this.worldObj, this.boundPosition, this.worldObj.getBlockState(this.boundPosition), 0));
if(WorldUtil.addToInventory(this, drops, false, true)){
if(!ConfigValues.lessBlockBreakingEffects){
worldObj.playAuxSFX(2001, this.boundPosition, Block.getStateId(worldObj.getBlockState(this.boundPosition)));
this.worldObj.playAuxSFX(2001, this.boundPosition, Block.getStateId(this.worldObj.getBlockState(this.boundPosition)));
}
worldObj.setBlockToAir(this.boundPosition);
this.worldObj.setBlockToAir(this.boundPosition);
WorldUtil.addToInventory(this, drops, true, true);
this.markDirty();
}
@ -140,7 +140,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
}
else{
int theSlot = WorldUtil.findFirstFilledSlot(this.slots);
this.setInventorySlotContents(theSlot, WorldUtil.useItemAtSide(EnumFacing.UP, worldObj, boundPosition, this.slots[theSlot]));
this.setInventorySlotContents(theSlot, WorldUtil.useItemAtSide(EnumFacing.UP, this.worldObj, this.boundPosition, this.slots[theSlot]));
if(this.slots[theSlot] != null && this.slots[theSlot].stackSize <= 0){
this.slots[theSlot] = null;
}
@ -158,11 +158,11 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements
double d5 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)j1);
double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1;
double d3 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)i1);
worldObj.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5);
this.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5);
}
if(this.ticksElapsed%80 == 0){
PacketParticle.renderParticlesFromAToB(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), 2, 0.35F, TileEntityPhantomface.COLORS, 3);
PacketParticle.renderParticlesFromAToB(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), this.boundPosition.getX(), this.boundPosition.getY(), this.boundPosition.getZ(), 2, 0.35F, TileEntityPhantomface.COLORS, 3);
}
}

View file

@ -61,9 +61,9 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
super.writeSyncableNBT(compound, sync);
compound.setInteger("Range", this.range);
if(this.boundPosition != null){
compound.setInteger("XCoordOfTileStored", boundPosition.getX());
compound.setInteger("YCoordOfTileStored", boundPosition.getY());
compound.setInteger("ZCoordOfTileStored", boundPosition.getZ());
compound.setInteger("XCoordOfTileStored", this.boundPosition.getX());
compound.setInteger("YCoordOfTileStored", this.boundPosition.getY());
compound.setInteger("ZCoordOfTileStored", this.boundPosition.getZ());
}
}
@ -83,14 +83,14 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
this.range = upgradeRange(RANGE, worldObj, this.getPos());
if(!this.worldObj.isRemote){
this.range = upgradeRange(RANGE, this.worldObj, this.getPos());
if(!this.hasBoundPosition()){
this.boundPosition = null;
}
if(this.boundPosition != this.boundPosBefore || (this.boundPosition != null && PosUtil.getBlock(this.boundPosition, worldObj) != this.boundBlockBefore) || this.rangeBefore != this.range){
if(this.boundPosition != this.boundPosBefore || (this.boundPosition != null && PosUtil.getBlock(this.boundPosition, this.worldObj) != this.boundBlockBefore) || this.rangeBefore != this.range){
this.rangeBefore = this.range;
this.boundPosBefore = this.boundPosition;
this.boundBlockBefore = this.boundPosition == null ? null : PosUtil.getBlock(this.boundPosition, this.worldObj);
@ -117,7 +117,7 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
@Override
public boolean hasBoundPosition(){
if(this.boundPosition != null){
if(worldObj.getTileEntity(boundPosition) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ())){
if(this.worldObj.getTileEntity(this.boundPosition) instanceof IPhantomTile || (this.getPos().getX() == this.boundPosition.getX() && this.getPos().getY() == this.boundPosition.getY() && this.getPos().getZ() == this.boundPosition.getZ())){
this.boundPosition = null;
return false;
}
@ -137,11 +137,11 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP
double d5 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)j1);
double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1;
double d3 = (double)(Util.RANDOM.nextFloat()*1.0F*(float)i1);
worldObj.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5);
this.worldObj.spawnParticle(EnumParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5);
}
if(this.ticksElapsed%80 == 0){
PacketParticle.renderParticlesFromAToB(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), boundPosition.getX(), boundPosition.getY(), boundPosition.getZ(), 2, 0.35F, COLORS, 3);
PacketParticle.renderParticlesFromAToB(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), this.boundPosition.getX(), this.boundPosition.getY(), this.boundPosition.getZ(), 2, 0.35F, COLORS, 3);
}
}

View file

@ -48,7 +48,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement
@SuppressWarnings("unchecked")
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!this.isRedstonePowered){
ArrayList<EntityItem> items = (ArrayList<EntityItem>)this.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(this.pos.getX()-RANGE, this.pos.getY()-RANGE, this.pos.getZ()-RANGE, this.pos.getX()+RANGE, this.pos.getY()+RANGE, this.pos.getZ()+RANGE));
if(!items.isEmpty()){

View file

@ -39,7 +39,7 @@ public class TileEntitySmileyCloud extends TileEntityBase implements IStringReac
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(!Objects.equals(this.name, this.nameBefore) && this.sendUpdateWithInterval()){
this.nameBefore = this.name;
this.markDirty();

View file

@ -44,7 +44,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I
@Override
public void updateEntity(){
super.updateEntity();
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
if(this.amount > 0){
if(this.slots[0] == null){
int toSet = this.amount > 64 ? 64 : this.amount;
@ -87,7 +87,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I
int xp = this.buttonAmounts[buttonID] == -999 ? this.getPlayerXP(player)/ItemSolidifiedExperience.SOLID_XP_AMOUNT : this.buttonAmounts[buttonID];
if(this.amount < Short.MAX_VALUE-xp && this.getPlayerXP(player) >= ItemSolidifiedExperience.SOLID_XP_AMOUNT*xp){
this.addPlayerXP(player, -(ItemSolidifiedExperience.SOLID_XP_AMOUNT*xp));
if(!worldObj.isRemote){
if(!this.worldObj.isRemote){
this.amount += xp;
}
}
@ -116,11 +116,11 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I
* @param amount The Amount
*/
private void addPlayerXP(EntityPlayer player, int amount){
int experience = getPlayerXP(player)+amount;
int experience = this.getPlayerXP(player)+amount;
player.experienceTotal = experience;
int level = 0;
while(getExperienceForLevel(level) <= experience){
while(this.getExperienceForLevel(level) <= experience){
level++;
}
player.experienceLevel = level-1;

View file

@ -37,11 +37,11 @@ public class FluidStateMapper extends StateMapperBase implements ItemMeshDefinit
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state){
return location;
return this.location;
}
@Override
public ModelResourceLocation getModelLocation(ItemStack stack){
return location;
return this.location;
}
}