diff --git a/LICENSE b/LICENSE index 4b15179f0..069d757b0 100644 --- a/LICENSE +++ b/LICENSE @@ -2,4 +2,4 @@ ALL RIGHTS RESERVED. For more Information, check the README.md file. -© 2015 Ellpeck \ No newline at end of file +© 2015 Ellpeck \ No newline at end of file diff --git a/README.md b/README.md index 1ed51d0b7..20d8eb12d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ##It's a Minecraft Mod! -For more information, visit the main Minecraft Forum Thread at http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2374910-actually-additions-a-bunch-of-awesome-gadgets +For more information, visit the main Minecraft Forum Thread at http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2551118 If you want to see Information on how you can use my Mod and its InterModComms Feature in your own Mod, see the InterModCommsInfo.md File! @@ -36,6 +36,7 @@ Everything that is not listed below applies to the above. ### NOTES - The above License only applies for Code I wrote myself, any APIs used (such as the CoFH API) have their own License that is being respected. - There are some excerpts from other code used (such as the OpenBlocks XP System). Credit to the creators of these parts is always given and their Permission is granted or their License is respected. -- Almost all of the Assets used in this Mod are made by Glenthor and are owned by me. You are not allowed to copy them for any other Project without my Permission. +- Almost all of the Assets used in this Mod are made by Glenthor and are owned by me. You are not allowed to copy them for any other Project. +- Parts of this License, especially restrictive ones, can be ignored with Personal Permission. Said Permission, however, will only be given to people I know or someone who has a very good reason for needing it. If you don't, don't ask. -© 2015 Ellpeck \ No newline at end of file +© 2015 Ellpeck \ No newline at end of file diff --git a/TexturesToBeMade.txt b/TexturesToBeMade.txt index ccaf9f1b9..67b773e2c 100644 --- a/TexturesToBeMade.txt +++ b/TexturesToBeMade.txt @@ -2,4 +2,4 @@ Textures to be made -------------------------------------------------------------------------------------------------------------- This file is a reminder to Glenthor for what textures he should make or change. If you want to give making some of these textures a go, go ahead and make a pull request when you're done. --------------------------------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/build.gradle b/build.gradle index e9d1da032..b1143cb93 100644 --- a/build.gradle +++ b/build.gradle @@ -18,12 +18,12 @@ buildscript { apply plugin: 'forge' apply plugin: 'maven' -version = "1.7.10-0.0.9.4" +version = "1.7.10-r2" group = "ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions" minecraft { - version = "1.7.10-10.13.4.1492-1.7.10" + version = "1.7.10-10.13.4.1541-1.7.10" runDir = "idea" } diff --git a/specialPeopleStuff.properties b/specialPeopleStuff.properties new file mode 100644 index 000000000..9b9384fc6 --- /dev/null +++ b/specialPeopleStuff.properties @@ -0,0 +1,4 @@ +ellpeck=ActuallyAdditions:itemPhantomConnector +dqmhose=minecraft:torch +twoofeight=ActuallyAdditions:blockHeatCollector +larixine=ActuallyAdditions:blockBlackLotus \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java index 2081d1d51..c2e5f35fa 100644 --- a/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java +++ b/src/main/java/ellpeck/actuallyadditions/ActuallyAdditions.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions; @@ -45,6 +45,7 @@ import ellpeck.actuallyadditions.tile.TileEntityBase; import ellpeck.actuallyadditions.update.UpdateChecker; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.Util; +import ellpeck.actuallyadditions.util.playerdata.PersistentServerData; import net.minecraft.init.Items; // So that BuildCraft Oil always gets used @@ -69,7 +70,7 @@ public class ActuallyAdditions{ InitItems.init(); InitVillager.init(); FuelHandler.init(); - new UpdateChecker().init(); + UpdateChecker.init(); proxy.preInit(event); ModUtil.LOGGER.info("PreInitialization Finished."); @@ -121,4 +122,10 @@ public class ActuallyAdditions{ WorldData.init(event.getServer()); } + + @EventHandler + public void serverStopped(FMLServerStoppedEvent event){ + //Clear Data so that it won't be carried over to other worlds + PersistentServerData.playerSaveData.clear(); + } } diff --git a/src/main/java/ellpeck/actuallyadditions/achievement/InitAchievements.java b/src/main/java/ellpeck/actuallyadditions/achievement/InitAchievements.java index d9c62d1d5..c2397bae7 100644 --- a/src/main/java/ellpeck/actuallyadditions/achievement/InitAchievements.java +++ b/src/main/java/ellpeck/actuallyadditions/achievement/InitAchievements.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.achievement; diff --git a/src/main/java/ellpeck/actuallyadditions/achievement/TheAchievements.java b/src/main/java/ellpeck/actuallyadditions/achievement/TheAchievements.java index 7002a6ba9..267639438 100644 --- a/src/main/java/ellpeck/actuallyadditions/achievement/TheAchievements.java +++ b/src/main/java/ellpeck/actuallyadditions/achievement/TheAchievements.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.achievement; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockBlackLotus.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockBlackLotus.java new file mode 100644 index 000000000..0918b8d8a --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockBlackLotus.java @@ -0,0 +1,50 @@ +/* + * This file ("BlockFlower.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015 Ellpeck + */ + +package ellpeck.actuallyadditions.blocks; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.util.IActAddItemOrBlock; +import ellpeck.actuallyadditions.util.ModUtil; +import net.minecraft.block.BlockBush; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +public class BlockBlackLotus extends BlockBush implements IActAddItemOrBlock{ + + public BlockBlackLotus(){ + this.setStepSound(soundTypeGrass); + } + + @Override + public String getName(){ + return "blockBlackLotus"; + } + + @Override + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.epic; + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta){ + return this.blockIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister iconReg){ + this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()); + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java index b5c4f7a12..482363b35 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -32,7 +32,9 @@ import net.minecraft.world.World; public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon frontIcon; + @SideOnly(Side.CLIENT) private IIcon topIcon; private boolean isPlacer; @@ -52,6 +54,7 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side != meta && (side == 0 || side == 1)){ @@ -64,6 +67,7 @@ public class BlockBreaker extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 0 || side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java index 2a120a94a..63067a077 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCanolaPress.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -29,6 +29,7 @@ import net.minecraft.world.World; public class BlockCanolaPress extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; public BlockCanolaPress(){ @@ -45,6 +46,7 @@ public class BlockCanolaPress extends BlockContainerBase implements IActAddItemO } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side == 1 || side == 0 ? this.topIcon : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java index b76b4f162..1dc7fe1e3 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoalGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -32,7 +32,9 @@ import java.util.Random; public class BlockCoalGenerator extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockCoalGenerator(){ @@ -50,6 +52,7 @@ public class BlockCoalGenerator extends BlockContainerBase implements IActAddIte } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java index 07ed3f308..8db6d7037 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCoffeeMachine.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -54,6 +54,7 @@ public class BlockCoffeeMachine extends BlockContainerBase implements IActAddIte } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java index 90d7931a6..5d0fb0979 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockColoredLamp.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -37,7 +37,8 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{ public static TheColoredLampColors[] allLampTypes = TheColoredLampColors.values(); public boolean isOn; - private IIcon[] textures = new IIcon[allLampTypes.length]; + @SideOnly(Side.CLIENT) + private IIcon[] textures; public BlockColoredLamp(boolean isOn){ super(Material.redstoneLight); @@ -58,6 +59,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return meta >= allLampTypes.length ? null : textures[meta]; } @@ -127,6 +129,7 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{ @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconReg){ + this.textures = new IIcon[allLampTypes.length]; for(int i = 0; i < allLampTypes.length; i++){ this.textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+((IActAddItemOrBlock)InitBlocks.blockColoredLamp).getName()+allLampTypes[i].name+(isOn ? "On" : "")); } @@ -145,11 +148,6 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{ this.setMaxDamage(0); } - @Override - public int getMetadata(int damage){ - return damage; - } - @Override public String getItemStackDisplayName(ItemStack stack){ if(stack.getItemDamage() >= allLampTypes.length){ @@ -158,15 +156,20 @@ public class BlockColoredLamp extends Block implements IActAddItemOrBlock{ return StringUtil.localize(this.getUnlocalizedName(stack)+".name")+(((BlockColoredLamp)this.field_150939_a).isOn ? " ("+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".onSuffix.desc")+")" : ""); } + @Override + public String getUnlocalizedName(ItemStack stack){ + return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name; + } + + @Override + public int getMetadata(int damage){ + return damage; + } + @Override public EnumRarity getRarity(ItemStack stack){ EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack); return rarity == null ? EnumRarity.common : rarity; } - - @Override - public String getUnlocalizedName(ItemStack stack){ - return InitBlocks.blockColoredLamp.getUnlocalizedName()+allLampTypes[stack.getItemDamage()].name; - } } } \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java index f30e32a6a..ea43954af 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -57,6 +57,7 @@ public class BlockCompost extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockContainerBase.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockContainerBase.java index 53e2304bc..ba9713482 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockContainerBase.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockContainerBase.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockDirectionalBreaker.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockDirectionalBreaker.java index 2b5157e47..2af149383 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockDirectionalBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockDirectionalBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -32,7 +32,9 @@ import net.minecraft.world.World; public class BlockDirectionalBreaker extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon frontIcon; + @SideOnly(Side.CLIENT) private IIcon topIcon; public BlockDirectionalBreaker(){ @@ -49,6 +51,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side != meta && (side == 0 || side == 1)){ @@ -61,6 +64,7 @@ public class BlockDirectionalBreaker extends BlockContainerBase implements IActA } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 0 || side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java index 508b29c38..1a5a14c6e 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockDropper.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -32,7 +32,9 @@ import net.minecraft.world.World; public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon frontIcon; + @SideOnly(Side.CLIENT) private IIcon topIcon; public BlockDropper(){ @@ -49,6 +51,7 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side != meta && (side == 0 || side == 1)){ @@ -61,6 +64,7 @@ public class BlockDropper extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 0 || side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java index d79593005..9152cf5da 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockEnergizer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -30,7 +30,9 @@ import net.minecraft.world.World; public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon sideIcon; private boolean isEnergizer; @@ -49,6 +51,7 @@ public class BlockEnergizer extends BlockContainerBase implements IActAddItemOrB } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side == 1 ? this.topIcon : (side == 0 ? this.blockIcon : this.sideIcon); } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java index b4a65dc9f..f55e9216d 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFeeder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -29,6 +29,7 @@ import net.minecraft.world.World; public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; public BlockFeeder(){ @@ -45,6 +46,7 @@ public class BlockFeeder extends BlockContainerBase implements IActAddItemOrBloc } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return (side == 0 || side == 1) ? this.topIcon : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java index 1d67b3dfc..e8f96cebb 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFermentingBarrel.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -29,6 +29,7 @@ import net.minecraft.world.World; public class BlockFermentingBarrel extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon iconTop; public BlockFermentingBarrel(){ @@ -51,6 +52,7 @@ public class BlockFermentingBarrel extends BlockContainerBase implements IActAdd } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return side <= 1 ? this.iconTop : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java index f027772b7..08b17163f 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFishingNet.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -51,6 +51,7 @@ public class BlockFishingNet extends BlockContainerBase implements IActAddItemOr } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java index 7459967b5..841080045 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -32,7 +32,9 @@ import net.minecraft.world.World; public class BlockFluidCollector extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon frontIcon; + @SideOnly(Side.CLIENT) private IIcon topIcon; private boolean isPlacer; @@ -52,6 +54,7 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side != meta && (side == 0 || side == 1)){ @@ -64,6 +67,7 @@ public class BlockFluidCollector extends BlockContainerBase implements IActAddIt } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 0 || side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java index 46c28cccf..d5dfce51a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFluidFlowing.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -26,7 +26,9 @@ import net.minecraftforge.fluids.Fluid; public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) public IIcon stillIcon; + @SideOnly(Side.CLIENT) public IIcon flowingIcon; private String name; @@ -48,6 +50,7 @@ public class BlockFluidFlowing extends BlockFluidClassic implements IActAddItemO } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side <= 1 ? this.stillIcon : this.flowingIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java index 20e319a87..d50a18404 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceDouble.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -35,8 +35,11 @@ import java.util.Random; public class BlockFurnaceDouble extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon onIcon; + @SideOnly(Side.CLIENT) private IIcon frontIcon; public BlockFurnaceDouble(){ @@ -54,6 +57,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side == 1){ @@ -69,6 +73,7 @@ public class BlockFurnaceDouble extends BlockContainerBase implements IActAddIte } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java index 9259da42d..2cab0b504 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockFurnaceSolar.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -53,6 +53,7 @@ public class BlockFurnaceSolar extends BlockContainerBase implements IActAddItem } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java index be67c0426..e7cc02576 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGeneric.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -35,6 +35,7 @@ public class BlockGeneric extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java index 54775aa24..f018c2c54 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGiantChest.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -29,7 +29,9 @@ import net.minecraft.world.World; public class BlockGiantChest extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockGiantChest(){ @@ -46,6 +48,7 @@ public class BlockGiantChest extends BlockContainerBase implements IActAddItemOr } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon); } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java index f838d0d6e..264278130 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGreenhouseGlass.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -48,6 +48,7 @@ public class BlockGreenhouseGlass extends BlockContainerBase implements IActAddI } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java index 11b6cfc58..169942c4e 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockGrinder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -34,8 +34,11 @@ import java.util.Random; public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlock{ private final boolean isDouble; + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon onIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockGrinder(boolean isDouble){ @@ -54,6 +57,7 @@ public class BlockGrinder extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 1 && meta != 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java index d8d1648ab..92651762b 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockHeatCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -27,7 +27,9 @@ import net.minecraft.world.World; public class BlockHeatCollector extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockHeatCollector(){ @@ -44,6 +46,7 @@ public class BlockHeatCollector extends BlockContainerBase implements IActAddIte } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon); } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java index 84d2737fb..55a718ec0 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockInputter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -54,6 +54,7 @@ public class BlockInputter extends BlockContainerBase implements IActAddItemOrBl } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java index 51c30c724..68e45cfff 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockItemRepairer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -30,7 +30,9 @@ import net.minecraft.world.World; public class BlockItemRepairer extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockItemRepairer(){ @@ -48,6 +50,7 @@ public class BlockItemRepairer extends BlockContainerBase implements IActAddItem } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java index 679a1b89f..c201ea80f 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLampPowerer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -30,6 +30,7 @@ import net.minecraftforge.common.util.ForgeDirection; public class BlockLampPowerer extends Block implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon frontIcon; public BlockLampPowerer(){ @@ -41,6 +42,7 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side == meta){ @@ -50,6 +52,7 @@ public class BlockLampPowerer extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 3){ return this.frontIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLaserRelay.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLaserRelay.java index 9b79eb1f2..c93dfbd3b 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLaserRelay.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLaserRelay.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -45,6 +45,7 @@ public class BlockLaserRelay extends BlockContainerBase implements IActAddItemOr } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java index 531428eac..feaf96ffb 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLavaFactoryController.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -28,6 +28,7 @@ import net.minecraft.world.World; public class BlockLavaFactoryController extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; public BlockLavaFactoryController(){ @@ -44,6 +45,7 @@ public class BlockLavaFactoryController extends BlockContainerBase implements IA } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side == 1 ? this.topIcon : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLeafGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLeafGenerator.java index b60cbe6c5..a1e18ebed 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockLeafGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockLeafGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -28,7 +28,9 @@ import net.minecraft.world.World; public class BlockLeafGenerator extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockLeafGenerator(){ @@ -45,6 +47,7 @@ public class BlockLeafGenerator extends BlockContainerBase implements IActAddIte } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java index 8608cf29f..0735686be 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockMisc.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -31,10 +31,15 @@ import java.util.List; public class BlockMisc extends Block implements IActAddItemOrBlock{ public static final TheMiscBlocks[] allMiscBlocks = TheMiscBlocks.values(); - public IIcon[] textures = new IIcon[allMiscBlocks.length]; + @SideOnly(Side.CLIENT) + public IIcon[] textures; - private IIcon stoneCasingSeasonalTop; + @SideOnly(Side.CLIENT) + private IIcon casingSeasonalTop; + @SideOnly(Side.CLIENT) private IIcon stoneCasingSeasonal; + @SideOnly(Side.CLIENT) + private IIcon ironCasingSeasonal; public BlockMisc(){ super(Material.rock); @@ -44,9 +49,15 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ - if(ClientProxy.jingleAllTheWay && metadata == TheMiscBlocks.STONE_CASING.ordinal() && side != 0){ - return side == 1 ? this.stoneCasingSeasonalTop : this.stoneCasingSeasonal; + if(ClientProxy.jingleAllTheWay && side != 0){ + if(metadata == TheMiscBlocks.STONE_CASING.ordinal()){ + return side == 1 ? this.casingSeasonalTop : this.stoneCasingSeasonal; + } + else if(metadata == TheMiscBlocks.IRON_CASING.ordinal()){ + return side == 1 ? this.casingSeasonalTop : this.ironCasingSeasonal; + } } return metadata >= textures.length ? null : textures[metadata]; } @@ -67,12 +78,14 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{ @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconReg){ + this.textures = new IIcon[allMiscBlocks.length]; for(int i = 0; i < textures.length; i++){ textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscBlocks[i].name); } - this.stoneCasingSeasonalTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnowTop"); + this.casingSeasonalTop = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnowTop"); this.stoneCasingSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscStoneCasingSnow"); + this.ironCasingSeasonal = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":blockMiscIronCasingSnow"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java index 1afcd85d6..f9a4df65a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOilGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -32,7 +32,9 @@ import java.util.Random; public class BlockOilGenerator extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; public BlockOilGenerator(){ @@ -50,6 +52,7 @@ public class BlockOilGenerator extends BlockContainerBase implements IActAddItem } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return side <= 1 ? (side == 0 ? this.bottomIcon : this.topIcon) : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java deleted file mode 100644 index 5a0a0332e..000000000 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockOreMagnet.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file ("BlockOreMagnet.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.blocks; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.ActuallyAdditions; -import ellpeck.actuallyadditions.inventory.GuiHandler; -import ellpeck.actuallyadditions.tile.TileEntityOreMagnet; -import ellpeck.actuallyadditions.util.IActAddItemOrBlock; -import ellpeck.actuallyadditions.util.ModUtil; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.EnumRarity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.IIcon; -import net.minecraft.world.World; - -public class BlockOreMagnet extends BlockContainerBase implements IActAddItemOrBlock{ - - private IIcon topIcon; - private IIcon bottomIcon; - - public BlockOreMagnet(){ - super(Material.rock); - this.setHarvestLevel("pickaxe", 0); - this.setHardness(1.5F); - this.setResistance(10.0F); - this.setStepSound(soundTypeStone); - } - - @Override - public TileEntity createNewTileEntity(World world, int par2){ - return new TileEntityOreMagnet(); - } - - @Override - public IIcon getIcon(int side, int meta){ - return (side == 1 ? this.topIcon : (side == 0 ? this.bottomIcon : this.blockIcon)); - } - - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){ - if(!world.isRemote){ - TileEntityOreMagnet magnet = (TileEntityOreMagnet)world.getTileEntity(x, y, z); - if(magnet != null){ - player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.ORE_MAGNET.ordinal(), world, x, y, z); - } - return true; - } - return true; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister iconReg){ - this.blockIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()); - this.topIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Top"); - this.bottomIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Bottom"); - } - - @Override - public String getName(){ - return "blockOreMagnet"; - } - - @Override - public EnumRarity getRarity(ItemStack stack){ - return EnumRarity.epic; - } - - @Override - public void breakBlock(World world, int x, int y, int z, Block block, int par6){ - this.dropInventory(world, x, y, z); - super.breakBlock(world, x, y, z, block, par6); - } -} diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java index 6cc4b063f..8c3810085 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantom.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -37,6 +37,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo public Type type; public int range; + @SideOnly(Side.CLIENT) private IIcon iconSeasonal; public BlockPhantom(Type type){ @@ -80,6 +81,7 @@ public class BlockPhantom extends BlockContainerBase implements IActAddItemOrBlo } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return (this.type == Type.FACE && ClientProxy.pumpkinBlurPumpkinBlur && side > 1) ? this.iconSeasonal : this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java index f9d37a8b7..43bb9bdc3 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPhantomBooster.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -48,6 +48,7 @@ public class BlockPhantomBooster extends BlockContainerBase implements IActAddIt } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java index 37cfd1176..9df6c4dea 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockPlant.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -31,14 +31,16 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{ public Item seedItem; public Item returnItem; public int returnMeta; + @SideOnly(Side.CLIENT) private IIcon[] textures; + private int stages; private String name; private int minDropAmount; private int addDropAmount; public BlockPlant(String name, int stages, int minDropAmount, int addDropAmount){ this.name = name; - this.textures = new IIcon[stages]; + this.stages = stages; this.minDropAmount = minDropAmount; this.addDropAmount = addDropAmount; } @@ -80,6 +82,7 @@ public class BlockPlant extends BlockCrops implements IActAddItemOrBlock{ @Override @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister iconReg){ + this.textures = new IIcon[this.stages]; for(int i = 0; i < this.textures.length; i++){ textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+"Stage"+(i+1)); } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockRangedCollector.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockRangedCollector.java index 7f8de83d2..fdc4f7a8a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockRangedCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockRangedCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -43,6 +43,7 @@ public class BlockRangedCollector extends BlockContainerBase implements IActAddI } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ return this.blockIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java index f5dca8da0..5ca203db8 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSlabs.java @@ -5,18 +5,20 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.items.ItemBlockBase; import ellpeck.actuallyadditions.util.IActAddItemOrBlock; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; @@ -100,4 +102,41 @@ public class BlockSlabs extends Block implements IActAddItemOrBlock{ public EnumRarity getRarity(ItemStack stack){ return EnumRarity.common; } + + public static class TheItemBlock extends ItemBlockBase{ + + public TheItemBlock(Block block){ + super(block); + this.setHasSubtypes(false); + this.setMaxDamage(0); + } + + @Override + public int getMetadata(int meta){ + return meta; + } + + @Override + public EnumRarity getRarity(ItemStack stack){ + EnumRarity rarity = ((IActAddItemOrBlock)this.field_150939_a).getRarity(stack); + return rarity == null ? EnumRarity.common : rarity; + } + + @Override + public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ){ + if(world.getBlock(x, y, z) == this.field_150939_a && ((side == 1 && world.getBlockMetadata(x, y, z) == 0) || (side == 0 && world.getBlockMetadata(x, y, z) == 1))){ + if(world.setBlock(x, y, z, ((BlockSlabs)this.field_150939_a).fullBlock, 0, 3)){ + world.playSoundEffect(x+0.5F, y+0.5F, z+0.5F, this.field_150939_a.stepSound.getBreakSound(), (this.field_150939_a.stepSound.getVolume()+1.0F)/2.0F, this.field_150939_a.stepSound.getPitch()*0.8F); + stack.stackSize--; + return true; + } + } + return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ); + } + + @Override + public String getUnlocalizedName(ItemStack stack){ + return this.getUnlocalizedName(); + } + } } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java index a10491cc6..2f2634c0a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockSmileyCloud.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -14,7 +14,6 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.ActuallyAdditions; import ellpeck.actuallyadditions.inventory.GuiHandler; -import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.tile.TileEntitySmileyCloud; import ellpeck.actuallyadditions.util.AssetUtil; import ellpeck.actuallyadditions.util.IActAddItemOrBlock; @@ -52,6 +51,7 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return this.blockIcon; } @@ -91,11 +91,6 @@ public class BlockSmileyCloud extends BlockContainerBase implements IActAddItemO } } - @Override - public String getUnlocalizedName(){ - return super.getUnlocalizedName()+(ClientProxy.bulletForMyValentine ? "Valentine" : ""); - } - @Override public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack){ int rotation = MathHelper.floor_double((double)(player.rotationYaw*4.0F/360.0F)+0.5D) & 3; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java index 00b6d8b92..64b407b8f 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockStair.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java index 0872cfbc9..8bdd8e58e 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockTreasureChest.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -36,8 +36,11 @@ import java.util.Random; public class BlockTreasureChest extends Block implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon bottomIcon; + @SideOnly(Side.CLIENT) private IIcon frontIcon; public BlockTreasureChest(){ @@ -50,6 +53,7 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side == 1){ @@ -65,6 +69,7 @@ public class BlockTreasureChest extends Block implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 1){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java index 284c4909b..61abd430d 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockWildPlant.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -33,7 +33,6 @@ import java.util.List; public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{ public static final TheWildPlants[] allWildPlants = TheWildPlants.values(); - public IIcon[] textures = new IIcon[allWildPlants.length]; public BlockWildPlant(){ this.setStepSound(soundTypeGrass); @@ -45,6 +44,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int metadata){ return metadata >= allWildPlants.length ? null : allWildPlants[metadata].wildVersionOf.getIcon(0, 7); } @@ -98,8 +98,8 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{ this.setMaxDamage(0); } - @SideOnly(Side.CLIENT) @Override + @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int meta){ return this.field_150939_a.getIcon(0, meta); } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java index b8e5a4feb..c5de4fa8a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockXPSolidifier.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -35,7 +35,9 @@ import net.minecraft.world.World; public class BlockXPSolidifier extends BlockContainerBase implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) private IIcon topIcon; + @SideOnly(Side.CLIENT) private IIcon frontIcon; public BlockXPSolidifier(){ @@ -52,6 +54,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){ int meta = world.getBlockMetadata(x, y, z); if(side == 1 || side == 0){ @@ -64,6 +67,7 @@ public class BlockXPSolidifier extends BlockContainerBase implements IActAddItem } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta){ if(side == 1 || side == 0){ return this.topIcon; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/FluidAA.java b/src/main/java/ellpeck/actuallyadditions/blocks/FluidAA.java index b68a681c6..e31ac0dbb 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/FluidAA.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/FluidAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java index dc08c5274..1585b1549 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks; @@ -89,7 +89,6 @@ public class InitBlocks{ public static Block blockTreasureChest; public static Block blockXPSolidifier; - public static Block blockOreMagnet; public static Block blockSmileyCloud; @@ -99,14 +98,14 @@ public class InitBlocks{ public static Block blockLaserRelay; - //TODO: Plan for Laser Power Transmitters: - //TODO: When there is a block in the way, they don't render their laser and don't transmit - //TODO: They stay connected and can be connected together even though they're blocked - //TODO: If blocked, they display the block coords blocking them on right-click + public static Block blockBlackLotus; public static void init(){ ModUtil.LOGGER.info("Initializing Blocks..."); + blockBlackLotus = new BlockBlackLotus(); + BlockUtil.register(blockBlackLotus); + blockLaserRelay = new BlockLaserRelay(); BlockUtil.register(blockLaserRelay); @@ -122,9 +121,6 @@ public class InitBlocks{ blockSmileyCloud = new BlockSmileyCloud(); BlockUtil.register(blockSmileyCloud); - blockOreMagnet = new BlockOreMagnet(); - BlockUtil.register(blockOreMagnet); - blockXPSolidifier = new BlockXPSolidifier(); BlockUtil.register(blockXPSolidifier); @@ -137,9 +133,9 @@ public class InitBlocks{ blockTestifiBucksWhiteStairs = new BlockStair(blockTestifiBucksWhiteWall, "blockTestifiBucksWhiteStairs"); BlockUtil.register(blockTestifiBucksWhiteStairs); blockTestifiBucksGreenSlab = new BlockSlabs("blockTestifiBucksGreenSlab", blockTestifiBucksGreenWall); - BlockUtil.register(blockTestifiBucksGreenSlab); + BlockUtil.register(blockTestifiBucksGreenSlab, BlockSlabs.TheItemBlock.class); blockTestifiBucksWhiteSlab = new BlockSlabs("blockTestifiBucksWhiteSlab", blockTestifiBucksWhiteWall); - BlockUtil.register(blockTestifiBucksWhiteSlab); + BlockUtil.register(blockTestifiBucksWhiteSlab, BlockSlabs.TheItemBlock.class); blockColoredLamp = new BlockColoredLamp(false); BlockUtil.register(blockColoredLamp, BlockColoredLamp.TheItemBlock.class); @@ -188,19 +184,19 @@ public class InitBlocks{ BlockUtil.register(blockFermentingBarrel); blockRice = new BlockPlant("blockRice", 6, 1, 2); - BlockUtil.register(blockRice, false); + BlockUtil.register(blockRice); CompatUtil.registerMFRPlant(blockRice); blockCanola = new BlockPlant("blockCanola", 4, 3, 3); - BlockUtil.register(blockCanola, false); + BlockUtil.register(blockCanola); CompatUtil.registerMFRPlant(blockCanola); blockFlax = new BlockPlant("blockFlax", 6, 2, 4); - BlockUtil.register(blockFlax, false); + BlockUtil.register(blockFlax); CompatUtil.registerMFRPlant(blockFlax); blockCoffee = new BlockPlant("blockCoffee", 6, 2, 2); - BlockUtil.register(blockCoffee, false); + BlockUtil.register(blockCoffee); CompatUtil.registerMFRPlant(blockCoffee); blockCompost = new BlockCompost(); @@ -267,7 +263,7 @@ public class InitBlocks{ BlockUtil.register(blockPhantomBooster); blockWildPlant = new BlockWildPlant(); - BlockUtil.register(blockWildPlant, BlockWildPlant.TheItemBlock.class, false); + BlockUtil.register(blockWildPlant, BlockWildPlant.TheItemBlock.class); registerFluids(); } @@ -287,7 +283,7 @@ public class InitBlocks{ //Canola Block if(fluidCanolaOil.getBlock() == null || ConfigBoolValues.PREVENT_CANOLA_BLOCK_OVERRIDE.isEnabled()){ blockCanolaOil = new BlockFluidFlowing(fluidCanolaOil, Material.water, "blockCanolaOil"); - BlockUtil.register(blockCanolaOil, false); + BlockUtil.register(blockCanolaOil); } else{ errorAlreadyRegistered("Canola Oil Block"); @@ -308,7 +304,7 @@ public class InitBlocks{ //Oil Block if(fluidOil.getBlock() == null || ConfigBoolValues.PREVENT_OIL_BLOCK_OVERRIDE.isEnabled()){ blockOil = new BlockFluidFlowing(fluidOil, Material.water, "blockOil"); - BlockUtil.register(blockOil, false); + BlockUtil.register(blockOil); } else{ errorAlreadyRegistered("Oil Block"); diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheColoredLampColors.java b/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheColoredLampColors.java index 7d7f05761..b359b322d 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheColoredLampColors.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheColoredLampColors.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.metalists; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheMiscBlocks.java b/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheMiscBlocks.java index 1b244afd4..b54e14120 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheMiscBlocks.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheMiscBlocks.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.metalists; @@ -23,7 +23,8 @@ public enum TheMiscBlocks{ CHARCOAL_BLOCK("Charcoal", EnumRarity.common), ENDERPEARL_BLOCK("Enderpearl", EnumRarity.rare), LAVA_FACTORY_CASE("LavaFactoryCase", EnumRarity.uncommon), - ENDER_CASING("EnderCasing", EnumRarity.epic); + ENDER_CASING("EnderCasing", EnumRarity.epic), + IRON_CASING("IronCasing", EnumRarity.rare); public final String name; public final EnumRarity rarity; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheWildPlants.java b/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheWildPlants.java index b8d00b392..3bf34a309 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheWildPlants.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/metalists/TheWildPlants.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.metalists; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelBaseAA.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelBaseAA.java index 0b547d633..c71be274d 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelBaseAA.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelBaseAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCoffeeMachine.java index 39ae29d95..58eae3b66 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCoffeeMachine.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java index d40eb2443..ac81682d5 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFishingNet.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFishingNet.java index bd1a78c98..db3371583 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFishingNet.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFishingNet.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFurnaceSolar.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFurnaceSolar.java index 1754511a1..fdd0d09f1 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFurnaceSolar.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelFurnaceSolar.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelLaserRelay.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelLaserRelay.java index ac9b60b27..0c53a6906 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelLaserRelay.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelLaserRelay.java @@ -5,20 +5,14 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; -import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler; -import ellpeck.actuallyadditions.tile.TileEntityLaserRelay; -import ellpeck.actuallyadditions.util.WorldPos; import net.minecraft.client.model.ModelRenderer; -import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; -import java.util.ArrayList; - /** * Made by Canitzp. * Thanks. Seriously. It looks really awesome. I don't think I could do this. @@ -185,21 +179,6 @@ public class ModelLaserRelay extends ModelBaseAA{ return "modelLaserRelay"; } - @Override - public void renderExtra(float f, TileEntity tile){ - TileEntityLaserRelay relay = (TileEntityLaserRelay)tile; - WorldPos firstWP = new WorldPos(relay.getWorldObj(), relay.xCoord, relay.yCoord, relay.zCoord); - ArrayList network = LaserRelayConnectionHandler.getInstance().getNetworkFor(firstWP); - if(network != null){ - for(LaserRelayConnectionHandler.ConnectionPair aPair : network){ - TileEntityLaserRelay firstRelay = (TileEntityLaserRelay) aPair.firstRelay.getTileEntity(); - if(aPair.contains(firstWP) && aPair.firstRelay.isEqual(firstWP)){ - firstRelay.drawLine(aPair.firstRelay, aPair.secondRelay); - } - } - } - } - @Override public boolean doesRotate(){ return true; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelPhantomBooster.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelPhantomBooster.java index dbe6fba6a..402ba8648 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelPhantomBooster.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelPhantomBooster.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelSmileyCloud.java index f8c29fc60..944b7aea4 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelSmileyCloud.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderItems.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderItems.java index 266c1de80..9aa261bd8 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderItems.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderItems.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderLaserRelay.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderLaserRelay.java index e65b9524a..25b4036d1 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderLaserRelay.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderLaserRelay.java @@ -5,13 +5,12 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -54,11 +53,7 @@ public class RenderLaserRelay extends RenderTileEntity{ } theModel.render(0.0625F); - //A Random texture, so it is a smooth Laser! - bindTexture(new ResourceLocation("actuallyadditions:textures/blocks/blockBreaker.png")); - theModel.renderExtra(0.0625F, tile); GL11.glPopMatrix(); - } } diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderSmileyCloud.java index 61156127f..80382ab7a 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderSmileyCloud.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java index 2e4950f17..3ca24fa80 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.blocks.render; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapter.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapter.java index c611f05ce..64878d8f3 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapter.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; @@ -44,14 +44,14 @@ public class BookletChapter{ return this.unlocalizedName; } - public String getLocalizedName(){ - return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name"); - } - public String getNameWithColor(){ return this.color+this.getLocalizedName(); } + public String getLocalizedName(){ + return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.unlocalizedName+".name"); + } + public BookletChapter setImportant(){ this.color = EnumChatFormatting.DARK_GREEN; return this; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCoffee.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCoffee.java index 8014eed17..9e7ef8677 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCoffee.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletChapterCoffee.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletEntryAllSearch.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletEntryAllSearch.java index df900dcc1..41152f432 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletEntryAllSearch.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletEntryAllSearch.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletIndexEntry.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletIndexEntry.java index 140d7259b..493df8d20 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletIndexEntry.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletIndexEntry.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; @@ -19,8 +19,8 @@ import java.util.ArrayList; public class BookletIndexEntry{ private final String unlocalizedName; - private EnumChatFormatting color; public ArrayList chapters = new ArrayList(); + private EnumChatFormatting color; public BookletIndexEntry(String unlocalizedName){ this.unlocalizedName = unlocalizedName; @@ -37,14 +37,14 @@ public class BookletIndexEntry{ this.chapters.add(chapter); } - public String getLocalizedName(){ - return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".indexEntry."+this.unlocalizedName+".name"); - } - public String getNameWithColor(){ return this.color+this.getLocalizedName(); } + public String getLocalizedName(){ + return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".indexEntry."+this.unlocalizedName+".name"); + } + public BookletIndexEntry setImportant(){ this.color = EnumChatFormatting.DARK_GREEN; return this; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/GuiAAAchievements.java b/src/main/java/ellpeck/actuallyadditions/booklet/GuiAAAchievements.java index 42476c136..ee8470a14 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/GuiAAAchievements.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/GuiAAAchievements.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java index 8a4be7990..6b4e1429a 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; @@ -16,10 +16,7 @@ import ellpeck.actuallyadditions.booklet.page.BookletPage; import ellpeck.actuallyadditions.config.GuiConfiguration; import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.update.UpdateChecker; -import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.ModUtil; -import ellpeck.actuallyadditions.util.StringUtil; -import ellpeck.actuallyadditions.util.Util; +import ellpeck.actuallyadditions.util.*; import ellpeck.actuallyadditions.util.playerdata.PersistentClientData; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; @@ -27,6 +24,7 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.IChatComponent; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -35,14 +33,15 @@ import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Locale; @SideOnly(Side.CLIENT) public class GuiBooklet extends GuiScreen{ - public static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiBooklet"); - public static final ResourceLocation resLocHalloween = AssetUtil.getGuiLocation("guiBookletHalloween"); - public static final ResourceLocation resLocChristmas = AssetUtil.getGuiLocation("guiBookletChristmas"); - public static final ResourceLocation resLocValentine = AssetUtil.getGuiLocation("guiBookletValentinesDay"); + public static final ResourceLocation resLoc = AssetUtil.getBookletGuiLocation("guiBooklet"); + public static final ResourceLocation resLocHalloween = AssetUtil.getBookletGuiLocation("guiBookletHalloween"); + public static final ResourceLocation resLocChristmas = AssetUtil.getBookletGuiLocation("guiBookletChristmas"); + public static final ResourceLocation resLocValentine = AssetUtil.getBookletGuiLocation("guiBookletValentinesDay"); public static final int CHAPTER_BUTTONS_AMOUNT = 13; public static final int TOOLTIP_SPLIT_LENGTH = 200; public int xSize; @@ -54,17 +53,17 @@ public class GuiBooklet extends GuiScreen{ public BookletIndexEntry currentIndexEntry; public int pageOpenInIndex; public int indexPageAmount; - public GuiButton buttonForward; - public GuiButton buttonBackward; - public GuiButton buttonPreviousScreen; - public GuiButton buttonPreviouslyOpenedGui; - public GuiButton buttonUpdate; - public GuiButton buttonTwitter; - public GuiButton buttonForum; - public GuiButton buttonAchievements; - public GuiButton buttonConfig; - public GuiButton[] chapterButtons = new GuiButton[CHAPTER_BUTTONS_AMOUNT]; - private GuiTextField searchField; + private GuiButton buttonForward; + private GuiButton buttonBackward; + private GuiButton buttonPreviousScreen; + private GuiButton buttonPreviouslyOpenedGui; + private GuiButton buttonUpdate; + private GuiButton buttonTwitter; + private GuiButton buttonForum; + private GuiButton buttonAchievements; + private GuiButton buttonConfig; + private GuiButton[] chapterButtons = new GuiButton[CHAPTER_BUTTONS_AMOUNT]; + public GuiTextField searchField; private int ticksElapsed; private boolean mousePressed; @@ -149,20 +148,16 @@ public class GuiBooklet extends GuiScreen{ } //Update Checker Hover Text if(x >= this.guiLeft-11 && x <= this.guiLeft-11+10 && y >= this.guiTop-11 && y <= this.guiTop-11+10){ - if(UpdateChecker.doneChecking){ - ArrayList list = new ArrayList(); - if(UpdateChecker.checkFailed){ - list.add(EnumChatFormatting.DARK_RED+"The Update Check failed!"); - list.add("Check your log for more Information!"); - } - else if(UpdateChecker.updateVersion > UpdateChecker.clientVersion){ - list.add(EnumChatFormatting.GOLD+"There is an Update available!"); - list.add(EnumChatFormatting.ITALIC+"You have: "+ModUtil.VERSION+", Newest: "+UpdateChecker.updateVersionS); - list.addAll(this.fontRendererObj.listFormattedStringToWidth(EnumChatFormatting.ITALIC+"Updates include: "+UpdateChecker.changelog, TOOLTIP_SPLIT_LENGTH)); - list.add(EnumChatFormatting.GRAY+"Click this button to visit the download page!"); - } - this.func_146283_a(list, x, y); + ArrayList list = new ArrayList(); + if(UpdateChecker.checkFailed){ + list.add(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed")).getFormattedText()); } + else if(UpdateChecker.needsUpdateNotify){ + list.add(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic")).getFormattedText()); + list.add(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion)).getFormattedText()); + list.add(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.buttonOptions")); + } + this.func_146283_a(list, x, y); } this.fontRendererObj.setUnicodeFlag(unicodeBefore); @@ -172,34 +167,37 @@ public class GuiBooklet extends GuiScreen{ } } - @SuppressWarnings("unchecked") @Override public void keyTyped(char theChar, int key){ if(key != 1 && this.searchField.isFocused()){ this.searchField.textboxKeyTyped(theChar, key); - - if(this.currentIndexEntry instanceof BookletEntryAllSearch){ - BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)this.currentIndexEntry; - if(this.searchField.getText() != null && !this.searchField.getText().isEmpty()){ - currentEntry.chapters.clear(); - - for(BookletChapter chapter : currentEntry.allChapters){ - if(chapter.getLocalizedName().toLowerCase().contains(this.searchField.getText().toLowerCase())){ - currentEntry.chapters.add(chapter); - } - } - } - else{ - currentEntry.chapters = (ArrayList)currentEntry.allChapters.clone(); - } - this.openIndexEntry(this.currentIndexEntry, this.pageOpenInIndex, false); - } + this.updateSearchBar(); } else{ super.keyTyped(theChar, key); } } + @SuppressWarnings("unchecked") + public void updateSearchBar(){ + if(this.currentIndexEntry instanceof BookletEntryAllSearch){ + BookletEntryAllSearch currentEntry = (BookletEntryAllSearch)this.currentIndexEntry; + if(this.searchField.getText() != null && !this.searchField.getText().isEmpty()){ + currentEntry.chapters.clear(); + + for(BookletChapter chapter : currentEntry.allChapters){ + if(chapter.getLocalizedName().toLowerCase(Locale.ROOT).contains(this.searchField.getText().toLowerCase(Locale.ROOT))){ + currentEntry.chapters.add(chapter); + } + } + } + else{ + currentEntry.chapters = (ArrayList)currentEntry.allChapters.clone(); + } + this.openIndexEntry(this.currentIndexEntry, this.pageOpenInIndex, false); + } + } + @Override protected void mouseClicked(int par1, int par2, int par3){ this.searchField.mouseClicked(par1, par2, par3); @@ -219,10 +217,15 @@ public class GuiBooklet extends GuiScreen{ } } else if(button == this.buttonUpdate){ - if(UpdateChecker.doneChecking && UpdateChecker.updateVersion > UpdateChecker.clientVersion){ + if(UpdateChecker.needsUpdateNotify){ try{ if(Desktop.isDesktopSupported()){ - Desktop.getDesktop().browse(new URI(UpdateChecker.DOWNLOAD_LINK)); + if(KeyUtil.isShiftPressed()){ + Desktop.getDesktop().browse(new URI(UpdateChecker.DOWNLOAD_LINK)); + } + else{ + Desktop.getDesktop().browse(new URI(UpdateChecker.CHANGELOG_LINK)); + } } } catch(Exception e){ @@ -243,7 +246,7 @@ public class GuiBooklet extends GuiScreen{ else if(button == this.buttonForum){ try{ if(Desktop.isDesktopSupported()){ - Desktop.getDesktop().browse(new URI("http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2374910-actually-additions-a-bunch-of-awesome-gadgets")); + Desktop.getDesktop().browse(new URI("http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2551118")); } } catch(Exception e){ @@ -335,7 +338,7 @@ public class GuiBooklet extends GuiScreen{ this.buttonList.add(this.buttonPreviouslyOpenedGui); this.buttonUpdate = new TexturedButton(4, this.guiLeft-11, this.guiTop-11, 245, 0, 11, 11); - this.buttonUpdate.visible = UpdateChecker.doneChecking && UpdateChecker.updateVersion > UpdateChecker.clientVersion; + this.buttonUpdate.visible = UpdateChecker.needsUpdateNotify; this.buttonList.add(this.buttonUpdate); this.buttonTwitter = new TexturedButton(5, this.guiLeft, this.guiTop, 213, 0, 8, 8); @@ -385,7 +388,7 @@ public class GuiBooklet extends GuiScreen{ this.currentPage.updateScreen(this.ticksElapsed); } - boolean buttonThere = UpdateChecker.doneChecking && UpdateChecker.updateVersion > UpdateChecker.clientVersion; + boolean buttonThere = UpdateChecker.needsUpdateNotify; this.buttonUpdate.visible = buttonThere; if(buttonThere){ if(this.ticksElapsed%8 == 0){ @@ -399,7 +402,7 @@ public class GuiBooklet extends GuiScreen{ @Override public void onGuiClosed(){ - PersistentClientData.saveBookPage(this.currentIndexEntry, this.currentChapter, this.currentPage, this.pageOpenInIndex); + PersistentClientData.saveBookPage(this.currentIndexEntry, this.currentChapter, this.currentPage, this.pageOpenInIndex, this.searchField.getText()); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java index c6f51faa2..deba0f12a 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet; @@ -20,7 +20,6 @@ import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheFoods; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops; -import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.util.Util; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipe; @@ -46,8 +45,7 @@ public class InitBooklet{ chapterIntro = new BookletChapter("intro", entryMisc, new ItemStack(InitItems.itemLexicon), new PageTextOnly(1), new PageTextOnly(2), new PageTextOnly(3), new PageCrafting(4, ItemCrafting.recipeBook)).setImportant(); //Miscellaneous - BookletPage pageStoneCase = new PageCrafting(5, BlockCrafting.recipeStoneCase); - new BookletChapter("craftingIngs", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), ClientProxy.jingleAllTheWay ? pageStoneCase : pageStoneCase.setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText()).setImportant(); + new BookletChapter("craftingIngs", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeCoil).setNoText(), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced).setNoText(), new PageCrafting(4, BlockCrafting.recipeCase).setNoText(), new PageCrafting(5, BlockCrafting.recipeStoneCase).setNoText(), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock).setNoText(), new PageCrafting(7, BlockCrafting.recipeEnderCase).setNoText(), new PageCrafting(8, ItemCrafting.recipeRing).setNoText(), new PageCrafting(9, ItemCrafting.recipeKnifeHandle).setNoText(), new PageCrafting(10, ItemCrafting.recipeKnifeBlade).setNoText(), new PageCrafting(11, ItemCrafting.recipeKnife).setNoText(), new PageCrafting(12, ItemCrafting.recipeDough).setNoText(), new PageCrafting(13, ItemCrafting.recipeRiceDough).setNoText(), new PageCrafting(14, BlockCrafting.recipeIronCase).setNoText()).setImportant(); new BookletChapter("quartz", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal())).addTextReplacement("", ConfigIntValues.BLACK_QUARTZ_MIN_HEIGHT.getValue()).addTextReplacement("", ConfigIntValues.BLACK_QUARTZ_MAX_HEIGHT.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal())), new PageCrafting(3, BlockCrafting.recipeQuartzBlock).setNoText(), new PageCrafting(4, BlockCrafting.recipeQuartzPillar).setNoText(), new PageCrafting(5, BlockCrafting.recipeQuartzChiseled).setNoText()); new BookletChapter("cloud", entryMisc, new ItemStack(InitBlocks.blockSmileyCloud), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud).setNoText()).setSpecial(); new BookletChapter("coalStuff", entryMisc, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeTinyCoal).setNoText(), new PageCrafting(3, ItemCrafting.recipeTinyChar).setNoText(), new PageCrafting(4, BlockCrafting.recipeBlockChar).setNoText()); @@ -59,13 +57,14 @@ public class InitBooklet{ } new BookletChapter("lamps", entryMisc, new ItemStack(InitBlocks.blockColoredLampOn, 1, TheColoredLampColors.GREEN.ordinal()), lampPages.toArray(new BookletPage[lampPages.size()])); - new BookletChapter("treasureChest", entryMisc, new ItemStack(InitBlocks.blockTreasureChest), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockTreasureChest))).setSpecial(); - new BookletChapter("hairBalls", entryMisc, new ItemStack(InitItems.itemHairyBall), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemHairyBall))).setSpecial(); + new BookletChapter("treasureChest", entryMisc, new ItemStack(InitBlocks.blockTreasureChest), new PagePicture(1, "pageTreasureChest", 150).setStack(new ItemStack(InitBlocks.blockTreasureChest)), new PageTextOnly(2)).setSpecial(); + new BookletChapter("hairBalls", entryMisc, new ItemStack(InitItems.itemHairyBall), new PagePicture(1, "pageFurBalls", 110).setStack(new ItemStack(InitItems.itemHairyBall)), new PageTextOnly(2)).setSpecial(); + new BookletChapter("blackLotus", entryMisc, new ItemStack(InitBlocks.blockBlackLotus), new PageTextOnly(1).setStack(new ItemStack(InitBlocks.blockBlackLotus)), new PageCrafting(2, ItemCrafting.recipeBlackDye)); //No RF Using Blocks new BookletChapter("breaker", entryFunctionalNonRF, new ItemStack(InitBlocks.blockBreaker), new PageCrafting(1, BlockCrafting.recipeBreaker), new PageCrafting(2, BlockCrafting.recipePlacer), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer), new PageCrafting(4, BlockCrafting.recipeLiquidCollector)); new BookletChapter("dropper", entryFunctionalNonRF, new ItemStack(InitBlocks.blockDropper), new PageTextOnly(1), new PageCrafting(1, BlockCrafting.recipeDropper).setNoText()); - new BookletChapter("phantomfaces", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.PHANTOMFACE_RANGE.getValue()), new PageCrafting(ClientProxy.pumpkinBlurPumpkinBlur ? 666 : 2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface), new PageCrafting(5, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(6, BlockCrafting.recipePhantomBooster)).setImportant(); + new BookletChapter("phantomfaces", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomLiquiface), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.PHANTOMFACE_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface), new PageCrafting(5, ItemCrafting.recipePhantomConnector).setNoText(), new PageCrafting(6, BlockCrafting.recipePhantomBooster)).setImportant(); new BookletChapter("phantomBreaker", entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.PHANTOM_PLACER_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText()); new BookletChapter("esd", entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial(); new BookletChapter("xpSolidifier", entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.SOLIDIFIED_EXPERIENCE.ordinal())), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial(); @@ -73,15 +72,15 @@ public class InitBooklet{ new BookletChapter("fishingNet", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText()); new BookletChapter("feeder", entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText()); new BookletChapter("compost", entryFunctionalNonRF, new ItemStack(InitBlocks.blockCompost), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemFertilizer)).addTextReplacement("", ConfigIntValues.COMPOST_AMOUNT.getValue()), new PageCrafting(2, BlockCrafting.recipeCompost).setNoText(), new PageCrafting(3, ItemCrafting.recipesMashedFood)); - new BookletChapter("crate", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate)); + new BookletChapter("crate", entryFunctionalNonRF, new ItemStack(InitBlocks.blockGiantChest), new PageCrafting(1, BlockCrafting.recipeCrate), new PageCrafting(2, ItemCrafting.recipeChestToCrateUpgrade)); new BookletChapter("rangedCollector", entryFunctionalNonRF, new ItemStack(InitBlocks.blockRangedCollector), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.RANGED_COLLECTOR_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeRangedCollector).setNoText()); //RF Using Blocks - new BookletChapterCoffee("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("", ConfigIntValues.COFFEE_MACHINE_WATER_USED.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PageCrafting(3, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(4, ItemCrafting.recipeCup).setNoText()).setImportant(); + new BookletChapter("laserRelays", entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.LASER_RELAY_MAX_DISTANCE.getValue()).addTextReplacement("", ConfigIntValues.LASER_RELAY_LOSS.getValue()), new PagePicture(2, "pageLaserRelay", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLaserRelay).setNoText(), new PageCrafting(4, ItemCrafting.recipeLaserWrench).setNoText()).setImportant(); + new BookletChapterCoffee("coffeeMachine", entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("", ConfigIntValues.COFFEE_MACHINE_ENERGY_USED.getValue()).addTextReplacement("", ConfigIntValues.COFFEE_CACHE_USED_PER_ITEM.getValue()).addTextReplacement("", ConfigIntValues.COFFEE_MACHINE_WATER_USED.getValue()), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "pageCoffeeMachine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant(); new BookletChapter("crusher", entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.GRINDER_ENERGY_USED.getValue()).addTextReplacement("", ConfigIntValues.GRINDER_DOUBLE_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText(), new PageCrusherRecipe(4, CrusherCrafting.recipeSugar).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(7, CrusherCrafting.recipeDiamondHorseArmor).setNoText()); new BookletChapter("furnaceDouble", entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).addTextReplacement("", ConfigIntValues.FURNACE_ENERGY_USED.getValue())); - new BookletChapter("miner", entryFunctionalRF, new ItemStack(InitBlocks.blockOreMagnet), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue()).addTextReplacement("", ConfigIntValues.ORE_MAGNET_OIL_USE.getValue()).addTextReplacement("", ConfigIntValues.ORE_MAGNET_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeMiner).setNoText(), new PageCrafting(3, BlockCrafting.recipeCasing).setNoText()); - new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()), new PageCrafting(2, BlockCrafting.recipeLavaFactory).setNoText()); + new BookletChapter("lavaFactory", entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.LAVA_FACTORY_ENERGY_USED.getValue()), new PagePicture(2, "pageLavaFactory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText()); new BookletChapter("energizer", entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator)); new BookletChapter("repairer", entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("", ConfigIntValues.REPAIRER_ENERGY_USED.getValue())); new BookletChapter("longRangeBreaker", entryFunctionalRF, new ItemStack(InitBlocks.blockDirectionalBreaker), new PageTextOnly(1).addTextReplacement("", ConfigIntValues.DIRECTIONAL_BREAKER_RF_PER_BLOCK.getValue()).addTextReplacement("", ConfigIntValues.DIRECTIONAL_BREAKER_RANGE.getValue()), new PageCrafting(2, BlockCrafting.recipeDirectionalBreaker)); @@ -95,7 +94,7 @@ public class InitBooklet{ //No RF Using Items new BookletChapter("wings", entryItemsNonRF, new ItemStack(InitItems.itemWingsOfTheBats), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.BAT_WING.ordinal())), new PageCrafting(2, ItemCrafting.recipeWings).setNoText()).setSpecial(); - new BookletChapter("foods", entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipePizza).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText()); + new BookletChapter("foods", entryItemsNonRF, new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), new PageCrafting(1, FoodCrafting.recipePizza).setNoText(), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())).setNoText(), new PageCrafting(3, FoodCrafting.recipeHamburger).setNoText(), new PageCrafting(4, FoodCrafting.recipeBigCookie).setNoText(), new PageCrafting(5, FoodCrafting.recipeSubSandwich).setNoText(), new PageCrafting(6, FoodCrafting.recipeFrenchFry).setNoText(), new PageCrafting(7, FoodCrafting.recipeFrenchFries).setNoText(), new PageCrafting(8, FoodCrafting.recipeFishNChips).setNoText(), new PageCrafting(9, FoodCrafting.recipeCheese).setNoText(), new PageCrafting(10, FoodCrafting.recipePumpkinStew).setNoText(), new PageCrafting(11, FoodCrafting.recipeCarrotJuice).setNoText(), new PageCrafting(12, FoodCrafting.recipeSpaghetti).setNoText(), new PageCrafting(13, FoodCrafting.recipeNoodle).setNoText(), new PageCrafting(14, FoodCrafting.recipeChocolate).setNoText(), new PageCrafting(15, FoodCrafting.recipeChocolateCake).setNoText(), new PageCrafting(16, FoodCrafting.recipeToast).setNoText(), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal())).setNoText(), new PageCrafting(18, FoodCrafting.recipeChocolateToast).setNoText()); new BookletChapter("leafBlower", entryItemsNonRF, new ItemStack(InitItems.itemLeafBlowerAdvanced), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeLeafBlower).setNoText(), new PageCrafting(3, ItemCrafting.recipeLeafBlowerAdvanced).setNoText()).setImportant(); ArrayList aiotPages = new ArrayList(); aiotPages.add(new PageTextOnly(aiotPages.size()+1)); @@ -114,7 +113,7 @@ public class InitBooklet{ new BookletChapter("potionRings", entryItemsNonRF, new ItemStack(InitItems.itemPotionRing), potionRingPages.toArray(new BookletPage[potionRingPages.size()])); //RF Using Items - new BookletChapter("drill", entryItemsRF, new ItemStack(InitItems.itemDrill), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(4, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial(); + new BookletChapter("drill", entryItemsRF, new ItemStack(InitItems.itemDrill), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeDrill).setNoText(), new PageCrafting(3, ItemCrafting.recipeDrillCore).setNoText(), new PageCrafting(4, ItemCrafting.recipeDrillSpeedI).setNoText(), new PageCrafting(5, ItemCrafting.recipeDrillSpeedII).setNoText(), new PageCrafting(6, ItemCrafting.recipeDrillSpeedIII).setNoText(), new PageCrafting(7, ItemCrafting.recipeDrillFortuneI).setNoText(), new PageCrafting(8, ItemCrafting.recipeDrillFortuneII).setNoText(), new PageCrafting(9, ItemCrafting.recipeDrillSilk).setNoText(), new PageCrafting(10, ItemCrafting.recipeDrillThree).setNoText(), new PageCrafting(11, ItemCrafting.recipeDrillFive).setNoText(), new PageCrafting(12, ItemCrafting.recipeDrillPlacing).setNoText()).setSpecial(); new BookletChapter("staff", entryItemsRF, new ItemStack(InitItems.itemTeleStaff), new PageTextOnly(1), new PageCrafting(2, ItemCrafting.recipeStaff).setNoText()).setImportant(); new BookletChapter("magnetRing", entryItemsRF, new ItemStack(InitItems.itemMagnetRing), new PageCrafting(1, ItemCrafting.recipeMagnetRing)); new BookletChapter("growthRing", entryItemsRF, new ItemStack(InitItems.itemGrowthRing), new PageCrafting(1, ItemCrafting.recipeGrowthRing)); diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java index e5cd65ea1..a19d97253 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet.page; @@ -41,6 +41,21 @@ public class BookletPage{ this.id = id; } + public void addToPagesWithItemStackData(){ + if(!InitBooklet.pagesWithItemStackData.contains(this)){ + ItemStack[] stacks = this.getItemStacksForPage(); + if(stacks != null && stacks.length > 0){ + //Ensure that there is at least one ItemStack + for(ItemStack stack : stacks){ + if(stack != null){ + InitBooklet.pagesWithItemStackData.add(this); + break; + } + } + } + } + } + public static void renderItem(GuiBooklet gui, ItemStack stack, int x, int y, float scale){ GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCoffeeRecipe.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCoffeeRecipe.java index 9baa889d8..22bb9301d 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCoffeeRecipe.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCoffeeRecipe.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet.page; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java index 4cf0025f1..b97ec3b16 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java @@ -5,14 +5,13 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet.page; import cpw.mods.fml.relauncher.ReflectionHelper; import ellpeck.actuallyadditions.booklet.GuiBooklet; -import ellpeck.actuallyadditions.booklet.InitBooklet; import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; @@ -40,7 +39,7 @@ public class PageCrafting extends BookletPage{ public PageCrafting(int id, IRecipe... recipes){ super(id); this.recipes = recipes; - InitBooklet.pagesWithItemStackData.add(this); + this.addToPagesWithItemStackData(); } @Override @@ -94,7 +93,7 @@ public class PageCrafting extends BookletPage{ for(int i = 0; i < shaped.getInput().length; i++){ Object input = shaped.getInput()[i]; if(input != null){ - stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList)input).get(0); + stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((ArrayList)input).isEmpty() ? null : ((ArrayList)input).get(0)); } } } @@ -102,7 +101,7 @@ public class PageCrafting extends BookletPage{ ShapelessOreRecipe shapeless = (ShapelessOreRecipe)recipe; for(int i = 0; i < shapeless.getInput().size(); i++){ Object input = shapeless.getInput().get(i); - stacks[i] = input instanceof ItemStack ? (ItemStack)input : ((ArrayList)input).get(0); + stacks[i] = input instanceof ItemStack ? (ItemStack)input : (((ArrayList)input).isEmpty() ? null : ((ArrayList)input).get(0)); } } @@ -153,7 +152,7 @@ public class PageCrafting extends BookletPage{ @Override public ItemStack[] getItemStacksForPage(){ - if(this.recipes != null && this.recipes.length > 0){ + if(this.recipes != null && this.recipes.length > 0 && this.recipes[0] != null){ return new ItemStack[]{this.recipes[0].getRecipeOutput()}; } return null; diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java index bc8e76b7a..02aad62f3 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrusherRecipe.java @@ -5,13 +5,12 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet.page; import ellpeck.actuallyadditions.booklet.GuiBooklet; -import ellpeck.actuallyadditions.booklet.InitBooklet; import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.recipe.CrusherRecipeRegistry; import ellpeck.actuallyadditions.util.ModUtil; @@ -34,7 +33,7 @@ public class PageCrusherRecipe extends BookletPage{ public PageCrusherRecipe(int id, CrusherRecipeRegistry.CrusherRecipe recipe){ super(id); this.recipe = recipe; - InitBooklet.pagesWithItemStackData.add(this); + this.addToPagesWithItemStackData(); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java index fed2615e7..bc1e36b25 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageFurnace.java @@ -5,13 +5,12 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet.page; import ellpeck.actuallyadditions.booklet.GuiBooklet; -import ellpeck.actuallyadditions.booklet.InitBooklet; import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; @@ -35,7 +34,7 @@ public class PageFurnace extends BookletPage{ super(id); this.result = result; this.input = input; - InitBooklet.pagesWithItemStackData.add(this); + this.addToPagesWithItemStackData(); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PagePicture.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PagePicture.java new file mode 100644 index 000000000..fbd083f87 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PagePicture.java @@ -0,0 +1,38 @@ +/* + * This file ("PagePicture.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015 Ellpeck + */ + +package ellpeck.actuallyadditions.booklet.page; + +import ellpeck.actuallyadditions.booklet.GuiBooklet; +import ellpeck.actuallyadditions.util.AssetUtil; +import net.minecraft.util.ResourceLocation; + +public class PagePicture extends PageTextOnly{ + + private ResourceLocation resLoc; + private int textStartY; + + public PagePicture(int id, String resLocName, int textStartY){ + super(id); + this.textStartY = textStartY; + this.resLoc = AssetUtil.getBookletGuiLocation(resLocName); + } + + @Override + public void renderPre(GuiBooklet gui, int mouseX, int mouseY, int ticksElapsed, boolean mousePressed){ + gui.mc.getTextureManager().bindTexture(this.resLoc); + gui.drawTexturedModalRect(gui.guiLeft, gui.guiTop, 0, 0, gui.xSize, gui.ySize); + + String text = gui.currentPage.getText(); + if(text != null && !text.isEmpty()){ + gui.mc.fontRenderer.drawSplitString(text, gui.guiLeft+14, gui.guiTop+textStartY, 115, 0); + } + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageTextOnly.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageTextOnly.java index 7c30d94fb..d6021c5d9 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageTextOnly.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageTextOnly.java @@ -5,13 +5,12 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.booklet.page; import ellpeck.actuallyadditions.booklet.GuiBooklet; -import ellpeck.actuallyadditions.booklet.InitBooklet; import net.minecraft.item.ItemStack; public class PageTextOnly extends BookletPage{ @@ -23,10 +22,8 @@ public class PageTextOnly extends BookletPage{ } public PageTextOnly setStack(ItemStack stack){ - if(!InitBooklet.pagesWithItemStackData.contains(this)){ - InitBooklet.pagesWithItemStackData.add(this); - } this.stack = stack; + this.addToPagesWithItemStackData(); return this; } diff --git a/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java b/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java index db8484443..af4ecc7c7 100644 --- a/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java +++ b/src/main/java/ellpeck/actuallyadditions/communication/InterModCommunications.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.communication; diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java index 91d96b874..0be6bb9dd 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config; diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java index 358e8fbbd..43f7279e7 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config; @@ -26,9 +26,6 @@ public class ConfigValues{ public static String[] crusherRecipeExceptions; public static String[] mashedFoodCraftingExceptions; - public static String[] oreMagnetExceptions; - public static String[] oreMagnetExtraWhitelist; - public static String[] paxelExtraMiningWhitelist; public static String[] drillExtraminingWhitelist; @@ -49,8 +46,6 @@ public class ConfigValues{ crusherRecipeExceptions = config.get(ConfigCategories.CRUSHER_RECIPES.name, "Crusher Recipe Exceptions", new String[]{"ingotBrick", "ingotBrickNether"}, "The Ingots, Dusts and Ores blacklisted from being auto-registered to be crushed by the Crusher. This list uses OreDictionary Names of the Inputs only.").getStringList(); mashedFoodCraftingExceptions = config.get(ConfigCategories.ITEMS_CRAFTING.name, "Mashed Food Crafting Exceptions", new String[]{"ActuallyAdditions:itemCoffee"}, "The ItemFood, IGrowable and IPlantable Items that can not be used to craft Mashed Food. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList(); - oreMagnetExceptions = config.get(ConfigCategories.MACHINE_VALUES.name, "Ore Magnet Exceptions", new String[0], "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want any Ore not to be pulled up by the Magnet, put its ORE DICTIONARY name here.").getStringList(); - oreMagnetExtraWhitelist = config.get(ConfigCategories.MACHINE_VALUES.name, "Ore Magnet Extra Whitelist", new String[]{"rftools:dimensionalShardBlock"}, "By default, the Ore Magnet pulls up everything that is registered in the OreDictionary as a String that starts with 'ore'. If you want anything else to be pulled up by the Magnet, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList(); paxelExtraMiningWhitelist = config.get(ConfigCategories.TOOL_VALUES.name, "AIOT Extra Whitelist", new String[]{"TConstruct:GravelOre"}, "By default, the AIOT can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList(); drillExtraminingWhitelist = config.get(ConfigCategories.TOOL_VALUES.name, "Drill Extra Whitelist", new String[]{"TConstruct:GravelOre"}, "By default, the Drill can mine certain blocks. If there is one that it can't mine, but should be able to, put its REGISTRY NAME here. These are the actual registered Item Names, the ones you use, for example, when using the /give Command.").getStringList(); } diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java index 65947c7ce..56cbc9169 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config; diff --git a/src/main/java/ellpeck/actuallyadditions/config/GuiConfiguration.java b/src/main/java/ellpeck/actuallyadditions/config/GuiConfiguration.java index 414c09755..747283569 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/GuiConfiguration.java +++ b/src/main/java/ellpeck/actuallyadditions/config/GuiConfiguration.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config; diff --git a/src/main/java/ellpeck/actuallyadditions/config/GuiFactory.java b/src/main/java/ellpeck/actuallyadditions/config/GuiFactory.java index b351661a1..a5de8a524 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/GuiFactory.java +++ b/src/main/java/ellpeck/actuallyadditions/config/GuiFactory.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config; diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java index 90e927631..2d59a07a7 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config.values; @@ -34,12 +34,13 @@ public enum ConfigBoolValues{ TF_PAXELS("Thermal Foundation Paxels", ConfigCategories.OTHER, true, "If Paxels made of Thermal Foundation Materials should exist"), MT_PAXELS("MekanismTools Paxels", ConfigCategories.OTHER, true, "If Paxels made of MekanismTools Materials should exist"), - DUPLICATE_PAXELS("Allow Duplicate Paxels", ConfigCategories.OTHER, true, "If Paxels are allowed to have Duplicates (for Example ActuallyAdditions' Obsidian and MekanismTools' Obsidian)"), + SO_PAXELS("Simpleores Paxels", ConfigCategories.OTHER, true, "If Paxels made of SimpleOres Materials should exist"), DO_RICE_GEN("Rice Gen", ConfigCategories.WORLD_GEN, true, "If Rice should generate in the World"), DO_CANOLA_GEN("Canola Gen", ConfigCategories.WORLD_GEN, true, "If Canola should generate in the World"), DO_FLAX_GEN("Flax Gen", ConfigCategories.WORLD_GEN, true, "If Flax should generate in the World"), DO_COFFEE_GEN("Coffee Gen", ConfigCategories.WORLD_GEN, true, "If Coffee should generate in the World"), + DO_LOTUS_GEN("Black Lotus Gen", ConfigCategories.WORLD_GEN, true, "If the Black Lotus should generate in the World"), DO_TREASURE_CHEST_GEN("Treasure Chest Gen", ConfigCategories.WORLD_GEN, true, "If Treasure Chests should generate in the World"), DO_SPIDER_DROPS("Spider Cobweb Drop", ConfigCategories.MOB_DROPS, true, "If Cobwebs should sometimes drop from Spiders"), @@ -56,7 +57,8 @@ public enum ConfigBoolValues{ SHOW_BOOKLET_INFO("Booklet Quick Opening Info", ConfigCategories.TOOL_VALUES, true, "If the 'Press key for more information'-text should show when the item has a page in the booklet"), GIVE_BOOKLET_ON_FIRST_CRAFT("Give Booklet on First Craft", ConfigCategories.OTHER, true, "If the booklet should be given to the player when he first crafts something from the Mod"), - ENABLE_SEASONAL("Seasonal Mode", ConfigCategories.OTHER, true, "If Seasonal Mode is enabled"); + ENABLE_SEASONAL("Seasonal Mode", ConfigCategories.OTHER, true, "If Seasonal Mode is enabled"), + LESS_LASER_RELAY_PARTICLES("Laser Relay: Particles", ConfigCategories.MACHINE_VALUES, false, "If the Laser Relay should have less laser particles to prevent lag"); public final String name; public final String category; diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java index 93bf4fa85..b8423fdf9 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config.values; @@ -18,6 +18,7 @@ public enum ConfigCrafting{ CLOUD("Smiley Cloud", ConfigCategories.BLOCKS_CRAFTING), XP_SOLIDIFIER("Experience Solidifier", ConfigCategories.BLOCKS_CRAFTING), WOOD_CASING("Wood Casing", ConfigCategories.BLOCKS_CRAFTING), + IRON_CASING("Iron Casing", ConfigCategories.BLOCKS_CRAFTING), STONE_CASING("Stone Casing", ConfigCategories.BLOCKS_CRAFTING), FISHING_NET("Fishing Net", ConfigCategories.BLOCKS_CRAFTING), REPAIRER("Repairer", ConfigCategories.BLOCKS_CRAFTING), @@ -52,7 +53,7 @@ public enum ConfigCrafting{ CHOCOLATE("Chocolate", ConfigCategories.FOOD_CRAFTING), CHOCOLATE_CAKE("Chocolate Cake", ConfigCategories.FOOD_CRAFTING), TOAST("Toast", ConfigCategories.FOOD_CRAFTING), - CHOCOTOAST("ChocoToast", ConfigCategories.FOOD_CRAFTING), + CHOCOLATE_TOAST("Chocolate Toast", ConfigCategories.FOOD_CRAFTING), LEAF_BLOWER("Leaf Blower", ConfigCategories.ITEMS_CRAFTING), LEAF_BLOWER_ADVANCED("Advanced Leaf Blower", ConfigCategories.ITEMS_CRAFTING), @@ -146,13 +147,17 @@ public enum ConfigCrafting{ TELE_STAFF("Tele Staff", ConfigCategories.ITEMS_CRAFTING), CASING("Casing", ConfigCategories.BLOCKS_CRAFTING), - ORE_MAGNET("Ore Magnet", ConfigCategories.BLOCKS_CRAFTING), MAGNET_RING("Magnet Ring", ConfigCategories.ITEMS_CRAFTING), WATER_RING("Water Ring", ConfigCategories.ITEMS_CRAFTING), GROWTH_RING("Growth Ring", ConfigCategories.ITEMS_CRAFTING), DIRECTIONAL_BREAKER("Long-Range Breaker", ConfigCategories.BLOCKS_CRAFTING), - RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING); + RANGED_COLLECTOR("Ranged Collector", ConfigCategories.BLOCKS_CRAFTING), + LASER_RELAY("Laser Relay", ConfigCategories.BLOCKS_CRAFTING), + LASER_WRENCH("Laser Wrench", ConfigCategories.ITEMS_CRAFTING), + + CHEST_TO_CRATE_UPGRADE("Chest To Crate Upgrade", ConfigCategories.ITEMS_CRAFTING), + DRILL_CORE("Drill Core", ConfigCategories.ITEMS_CRAFTING); public final String name; public final String category; diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java index 7d065ddf7..2fca4bba2 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config.values; diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java index c59cf00b5..e2b23c6a1 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.config.values; @@ -93,6 +93,7 @@ public enum ConfigIntValues{ CANOLA_AMOUNT("Canola Amount", ConfigCategories.WORLD_GEN, 10, 1, 50, "The Chance of Canola generating"), FLAX_AMOUNT("Flax Amount", ConfigCategories.WORLD_GEN, 8, 1, 50, "The Chance of Flax generating"), COFFEE_AMOUNT("Coffee Amount", ConfigCategories.WORLD_GEN, 6, 1, 50, "The Chance of Coffee generating"), + BLACK_LOTUS_AMOUNT("Black Lotus Amount", ConfigCategories.WORLD_GEN, 14, 1, 50, "The Chance of the Black Lotus generating"), RICE_CHANCE("Rice Chance", ConfigCategories.WORLD_GEN, 50, 1, 3000, "The 1 in X chance for Rice to generate"), NORMAL_PLANT_CHANCE("Plant Chance", ConfigCategories.WORLD_GEN, 400, 1, 3000, "The 1 in X chance for Flax, Coffee and Canola to generate"), TREASURE_CHEST_CHANCE("Treasure Chest Chance", ConfigCategories.WORLD_GEN, 300, 1, 3000, "The 1 in X chance for a Treasure Chest to generate in an Ocean"), @@ -171,7 +172,11 @@ public enum ConfigIntValues{ DIRECTIONAL_BREAKER_RF_PER_BLOCK("Directional Breaker: RF per Block", ConfigCategories.MACHINE_VALUES, 5, 0, 1000, "The amount of RF the Directional Breaker uses to break each block"), DIRECTIONAL_BREAKER_RANGE("Directional Breaker: Range", ConfigCategories.MACHINE_VALUES, 8, 1, 1000, "The range of the Directional Breaker"), - RANGED_COLLECTOR_RANGE("Ranged Collector: Range", ConfigCategories.MACHINE_VALUES, 6, 1, 30, "The range of the Ranged Collector"); + RANGED_COLLECTOR_RANGE("Ranged Collector: Range", ConfigCategories.MACHINE_VALUES, 6, 1, 30, "The range of the Ranged Collector"), + + LASER_RELAY_LOSS("Laser Relay: Loss", ConfigCategories.MACHINE_VALUES, 5, 0, 80, "The Energy Loss of the Laser Relay per Transfer in Percent"), + LASER_RELAY_MAX_DISTANCE("Laser Relay: Max Distance", ConfigCategories.MACHINE_VALUES, 15, 3, 80, "The max distance between two connected Laser Relays"), + LASER_RELAY_MAX_TRANSFER("Laser Relay: Max Transfer", ConfigCategories.MACHINE_VALUES, 10000, 100, 1000000, "The max amount of RF a Laser Relay can receive and try to transfer (if it's given 100 RF and can only transfer 50, it will only accept 50, it won't waste any power!)"); public final String name; public final String category; diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java index 65087c57b..f0f83970d 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; @@ -39,6 +39,7 @@ public class BlockCrafting{ public static IRecipe recipeLiquidPlacer; public static IRecipe recipeLiquidCollector; public static IRecipe recipeCase; + public static IRecipe recipeIronCase; public static IRecipe recipeStoneCase; public static IRecipe recipeEnderCase; public static IRecipe recipeEnderPearlBlock; @@ -50,7 +51,6 @@ public class BlockCrafting{ public static IRecipe recipeDoubleCrusher; public static IRecipe recipeFurnace; public static IRecipe recipeSolidifier; - public static IRecipe recipeMiner; public static IRecipe recipeCasing; public static IRecipe recipeGlass; public static IRecipe recipeLavaFactory; @@ -77,9 +77,21 @@ public class BlockCrafting{ public static IRecipe recipeDirectionalBreaker; public static IRecipe recipeDropper; public static IRecipe recipeRangedCollector; + public static IRecipe recipeLaserRelay; public static void init(){ + //Laser Relay + if(ConfigCrafting.LASER_RELAY.isEnabled()){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLaserRelay, 2), + "OBO", "RCR", "OBO", + 'B', new ItemStack(Blocks.redstone_block), + 'O', new ItemStack(Blocks.obsidian), + 'R', new ItemStack(Items.redstone), + 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); + recipeLaserRelay = Util.GetRecipes.lastIRecipe(); + } + //Ranged Collector if(ConfigCrafting.RANGED_COLLECTOR.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockRangedCollector), @@ -144,6 +156,16 @@ public class BlockCrafting{ recipeCase = Util.GetRecipes.lastIRecipe(); } + //Iron Casing + if(ConfigCrafting.IRON_CASING.isEnabled()){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), + "WSW", "SQS", "WSW", + 'Q', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), + 'W', "ingotIron", + 'S', "stickWood")); + recipeIronCase = Util.GetRecipes.lastIRecipe(); + } + //Ender Casing if(ConfigCrafting.ENDER_CASING.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()), @@ -180,7 +202,7 @@ public class BlockCrafting{ "I I", "CAC", "I I", 'I', "ingotIron", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), - 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()))); + 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()))); recipeEnergizer = Util.GetRecipes.lastIRecipe(); } @@ -190,7 +212,7 @@ public class BlockCrafting{ " I ", "CAC", " I ", 'I', "ingotIron", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), - 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()))); + 'A', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()))); recipeEnervator = Util.GetRecipes.lastIRecipe(); } @@ -198,7 +220,7 @@ public class BlockCrafting{ if(ConfigCrafting.LAVA_FACTORY.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockLavaFactoryController), "SCS", "ISI", "LLL", - 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), + 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'S', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'I', "blockIron", 'L', Items.lava_bucket)); @@ -209,7 +231,7 @@ public class BlockCrafting{ if(ConfigCrafting.CASING.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 32, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()), "ICI", - 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), + 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'I', "blockIron")); recipeCasing = Util.GetRecipes.lastIRecipe(); } @@ -225,17 +247,6 @@ public class BlockCrafting{ recipeCanolaPress = Util.GetRecipes.lastIRecipe(); } - //Ore Magnet - if(ConfigCrafting.ORE_MAGNET.isEnabled()){ - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockOreMagnet), - "SSS", "CBC", "ISI", - 'S', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal()), - 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), - 'B', new ItemStack(InitItems.itemBatteryDouble), - 'I', new ItemStack(Blocks.iron_block))); - recipeMiner = Util.GetRecipes.lastIRecipe(); - } - //Fermenting Barrel if(ConfigCrafting.FERMENTING_BARREL.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFermentingBarrel), @@ -336,7 +347,7 @@ public class BlockCrafting{ "IEI", "GLG", "ICI", 'I', "ingotIron", 'G', "ingotGold", - 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), + 'E', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'L', "treeLeaves", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()))); recipeLeafGen = Util.GetRecipes.lastIRecipe(); @@ -392,7 +403,7 @@ public class BlockCrafting{ "IQI", "CDC", "IBI", 'D', "blockDiamond", 'I', "ingotIron", - 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), + 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(Blocks.iron_bars))); recipeSolar = Util.GetRecipes.lastIRecipe(); @@ -402,9 +413,9 @@ public class BlockCrafting{ if(ConfigCrafting.HEAT_COLLECTOR.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector), "BRB", "CDC", "BQB", - 'D', "gemDiamond", + 'D', "ingotIron", 'R', new ItemStack(Items.repeater), - 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), + 'Q', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.IRON_CASING.ordinal()), 'L', new ItemStack(Items.lava_bucket), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), 'B', new ItemStack(Blocks.iron_bars))); diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/CrusherCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/CrusherCrafting.java index db98cd795..daec1de77 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/CrusherCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/CrusherCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java index bcc0b7629..64f94d695 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; @@ -40,7 +40,7 @@ public class FoodCrafting{ public static IRecipe recipeChocolate; public static IRecipe recipeChocolateCake; public static IRecipe recipeToast; - public static IRecipe recipeChocoToast; + public static IRecipe recipeChocolateToast; public static void init(){ @@ -197,10 +197,10 @@ public class FoodCrafting{ recipeToast = Util.GetRecipes.lastIRecipe(); } - //ChocoToast: - if(ConfigCrafting.CHOCOTOAST.isEnabled()){ - GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOTOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal())); - recipeChocoToast = Util.GetRecipes.lastIRecipe(); + //Chocolate Toast + if(ConfigCrafting.CHOCOLATE_TOAST.isEnabled()){ + GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.TOAST.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal())); + recipeChocolateToast = Util.GetRecipes.lastIRecipe(); } } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java index fddc245b8..924c68170 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/InitCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java index d4fd0c062..362b1d989 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; @@ -71,9 +71,17 @@ public class ItemCrafting{ public static IRecipe recipeLeafBlower; public static IRecipe recipeLeafBlowerAdvanced; public static ArrayList recipesPotionRings = new ArrayList(); + public static IRecipe recipeChestToCrateUpgrade; + public static IRecipe recipeLaserWrench; + public static IRecipe recipeDrillCore; + public static IRecipe recipeBlackDye; public static void init(){ + //Black Dye + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.BLACK_DYE.ordinal()), new ItemStack(InitBlocks.blockBlackLotus))); + recipeBlackDye = Util.GetRecipes.lastIRecipe(); + //Booklet GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper))); recipeBook = Util.GetRecipes.lastIRecipe(); @@ -82,6 +90,24 @@ public class ItemCrafting{ GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemLaserWrench), new ItemStack(InitItems.itemLaserWrench)); GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPhantomConnector), new ItemStack(InitItems.itemPhantomConnector)); + //Chest To Crate Upgrade + if(ConfigCrafting.CHEST_TO_CRATE_UPGRADE.isEnabled()){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemChestToCrateUpgrade), + "CWC", "WWW", "CWC", + 'C', new ItemStack(Blocks.chest), + 'W', "plankWood")); + recipeChestToCrateUpgrade = Util.GetRecipes.lastIRecipe(); + } + + //Laser Wrench + if(ConfigCrafting.LASER_WRENCH.isEnabled()){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLaserWrench), + "C ", " S ", " S", + 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), + 'S', "ingotIron")); + recipeLaserWrench = Util.GetRecipes.lastIRecipe(); + } + //Rice Stuff if(ConfigCrafting.RICE_GADGETS.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.paper, 3), @@ -114,11 +140,21 @@ public class ItemCrafting{ "DDD", "CRC", "III", 'D', "gemDiamond", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), - 'R', "dustRedstone", + 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), 'I', "blockIron")); recipeDrill = Util.GetRecipes.lastIRecipe(); } + //Drill Core + if(ConfigCrafting.DRILL_CORE.isEnabled()){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal()), + "ICI", "CRC", "ICI", + 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), + 'R', "dustRedstone", + 'I', "blockIron")); + recipeDrillCore = Util.GetRecipes.lastIRecipe(); + } + //Tele Staff if(ConfigCrafting.TELE_STAFF.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemTeleStaff), diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java index 1033da67f..31dfd10f3 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java index 63d1c538d..8ce69b21a 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.crafting; diff --git a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java index ef045fffa..679df8e7c 100644 --- a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java +++ b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.creative; @@ -39,7 +39,7 @@ public class CreativeTab extends CreativeTabs{ @Override public Item getTabIconItem(){ - return Item.getItemFromBlock(InitBlocks.blockPhantomLiquiface); + return InitItems.itemLexicon; } @Override @@ -50,6 +50,7 @@ public class CreativeTab extends CreativeTabs{ add(InitItems.itemLexicon); add(InitBlocks.blockSmileyCloud); + add(InitBlocks.blockLaserRelay); add(InitBlocks.blockPhantomface); add(InitBlocks.blockPhantomEnergyface); add(InitBlocks.blockPhantomLiquiface); @@ -61,8 +62,6 @@ public class CreativeTab extends CreativeTabs{ add(InitBlocks.blockCoffeeMachine); add(InitBlocks.blockXPSolidifier); - add(InitBlocks.blockOreMagnet); - add(InitBlocks.blockGreenhouseGlass); add(InitBlocks.blockGrinder); add(InitBlocks.blockGrinderDouble); @@ -105,6 +104,11 @@ public class CreativeTab extends CreativeTabs{ add(InitBlocks.blockLampPowerer); add(InitBlocks.blockTreasureChest); + add(InitBlocks.blockBlackLotus); + + add(InitItems.itemLaserWrench); + add(InitItems.itemChestToCrateUpgrade); + add(InitItems.itemDrill); add(InitItems.itemDrillUpgradeSpeed); add(InitItems.itemDrillUpgradeSpeedII); diff --git a/src/main/java/ellpeck/actuallyadditions/event/BucketFillEvent.java b/src/main/java/ellpeck/actuallyadditions/event/BucketFillEvent.java index c19ab4c71..391bd84ef 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/BucketFillEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/BucketFillEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/CraftEvent.java b/src/main/java/ellpeck/actuallyadditions/event/CraftEvent.java index 42aba2872..2e6c6ae88 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/CraftEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/CraftEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/EntityLivingEvent.java b/src/main/java/ellpeck/actuallyadditions/event/EntityLivingEvent.java index fad4a3934..29e5d1b52 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/EntityLivingEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/EntityLivingEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java b/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java index 04bb7365b..02f6e8426 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java +++ b/src/main/java/ellpeck/actuallyadditions/event/InitEvents.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; @@ -31,13 +31,12 @@ public class InitEvents{ Util.registerEvent(new EntityLivingEvent()); Util.registerEvent(new BucketFillEvent()); Util.registerEvent(new LogoutEvent()); - Util.registerEvent(new WorldLoadEvent()); + Util.registerEvent(new WorldLoadingEvents()); MinecraftForge.TERRAIN_GEN_BUS.register(new WorldDecorationEvent()); } public static void initClient(){ Util.registerEvent(new TooltipEvent()); - Util.registerEvent(new RenderPlayerEventAA()); if(Loader.isModLoaded("NotEnoughItems")){ Util.registerEvent(new NeiScreenEvents()); diff --git a/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java b/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java index abcd14501..dacd62cf1 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/LivingDropEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/LogoutEvent.java b/src/main/java/ellpeck/actuallyadditions/event/LogoutEvent.java index c292a10c1..68e83d1b1 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/LogoutEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/LogoutEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/PickupEvent.java b/src/main/java/ellpeck/actuallyadditions/event/PickupEvent.java index acfdf15c2..7776b6367 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/PickupEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/PickupEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java b/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java deleted file mode 100644 index 0477108e5..000000000 --- a/src/main/java/ellpeck/actuallyadditions/event/RenderPlayerEventAA.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file ("RenderPlayerEventAA.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.event; - -import cpw.mods.fml.common.eventhandler.EventPriority; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import ellpeck.actuallyadditions.blocks.InitBlocks; -import ellpeck.actuallyadditions.items.InitItems; -import ellpeck.actuallyadditions.misc.RenderSpecial; -import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraftforge.client.event.RenderPlayerEvent; - -import java.util.UUID; - -public class RenderPlayerEventAA{ - - public static RenderSpecial lariRender = new RenderSpecial(new ItemStack(Items.dye)); - private static RenderSpecial ellpeckRender = new RenderSpecial(new ItemStack(InitItems.itemPhantomConnector)); - private static RenderSpecial hoseRender = new RenderSpecial(new ItemStack(Blocks.torch)); - private static RenderSpecial paktoRender = new RenderSpecial(new ItemStack(Blocks.wool, 1, 6)); - private static RenderSpecial glenRender = new RenderSpecial(new ItemStack(InitBlocks.blockHeatCollector)); - - @SubscribeEvent(priority = EventPriority.HIGHEST) - public void RenderPlayerEvent(RenderPlayerEvent.Specials.Pre event){ - //Ellpeck - if(event.entityPlayer.getUniqueID().equals(UUID.fromString("3f9f4a94-95e3-40fe-8895-e8e3e84d1468"))){ - ellpeckRender.render(event.entityPlayer, 0.4F, 0.2F); - } - //Paktosan - else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("0bac71ad-9156-487e-9ade-9c5b57274b23"))){ - paktoRender.render(event.entityPlayer, 0.3F, 0); - } - //TwoOfEight - else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("a57d2829-9711-4552-a7de-ee800802f643"))){ - glenRender.render(event.entityPlayer, 0.3F, 0); - } - //dqmhose - else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("cb7b293a-5031-484e-b5be-b4f2f4e92726"))){ - hoseRender.render(event.entityPlayer, 0.5F, -0.075F); - } - //Lari - else if(event.entityPlayer.getUniqueID().equals(UUID.fromString("ac275e30-c468-42af-b5d4-b26c1c705b70"))){ - lariRender.render(event.entityPlayer, 0.15F, -0.125F); - } - } -} diff --git a/src/main/java/ellpeck/actuallyadditions/event/SmeltEvent.java b/src/main/java/ellpeck/actuallyadditions/event/SmeltEvent.java index 531128732..e87e943a5 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/SmeltEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/SmeltEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java b/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java index c0112d142..c0688a9d3 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; diff --git a/src/main/java/ellpeck/actuallyadditions/event/WorldDecorationEvent.java b/src/main/java/ellpeck/actuallyadditions/event/WorldDecorationEvent.java index 21bc2abf8..90b5e9123 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/WorldDecorationEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/WorldDecorationEvent.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; @@ -33,6 +33,7 @@ public class WorldDecorationEvent{ this.genPlantNormally(InitBlocks.blockWildPlant, TheWildPlants.CANOLA.ordinal(), ConfigIntValues.CANOLA_AMOUNT.getValue(), ConfigBoolValues.DO_CANOLA_GEN.isEnabled(), Material.grass, event); this.genPlantNormally(InitBlocks.blockWildPlant, TheWildPlants.FLAX.ordinal(), ConfigIntValues.FLAX_AMOUNT.getValue(), ConfigBoolValues.DO_FLAX_GEN.isEnabled(), Material.grass, event); this.genPlantNormally(InitBlocks.blockWildPlant, TheWildPlants.COFFEE.ordinal(), ConfigIntValues.COFFEE_AMOUNT.getValue(), ConfigBoolValues.DO_COFFEE_GEN.isEnabled(), Material.grass, event); + this.genPlantNormally(InitBlocks.blockBlackLotus, 0, ConfigIntValues.BLACK_LOTUS_AMOUNT.getValue(), ConfigBoolValues.DO_LOTUS_GEN.isEnabled(), Material.grass, event); //Generate Treasure Chests if(ConfigBoolValues.DO_TREASURE_CHEST_GEN.isEnabled()){ diff --git a/src/main/java/ellpeck/actuallyadditions/event/WorldLoadEvent.java b/src/main/java/ellpeck/actuallyadditions/event/WorldLoadingEvents.java similarity index 66% rename from src/main/java/ellpeck/actuallyadditions/event/WorldLoadEvent.java rename to src/main/java/ellpeck/actuallyadditions/event/WorldLoadingEvents.java index add130643..a7c6ff860 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/WorldLoadEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/WorldLoadingEvents.java @@ -1,11 +1,11 @@ /* - * This file ("WorldLoadEvent.java") is part of the Actually Additions Mod for Minecraft. + * This file ("WorldLoadingEvents.java") is part of the Actually Additions Mod for Minecraft. * It is created and owned by Ellpeck and distributed * under the Actually Additions License to be found at * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.event; @@ -14,7 +14,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent; import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler; import net.minecraftforge.event.world.WorldEvent; -public class WorldLoadEvent{ +public class WorldLoadingEvents{ @SubscribeEvent public void onLoad(WorldEvent.Load event){ @@ -23,4 +23,9 @@ public class WorldLoadEvent{ } } + @SubscribeEvent + public void onUnload(WorldEvent.Unload event){ + //Clear Data so that it won't be carried over to other worlds + LaserRelayConnectionHandler.getInstance().networks.clear(); + } } diff --git a/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java b/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java index 5dce6d86b..c2a0ca39d 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/gen/JamVillagerTradeHandler.java b/src/main/java/ellpeck/actuallyadditions/gen/JamVillagerTradeHandler.java index b414c9e0a..03c0d152b 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/JamVillagerTradeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/JamVillagerTradeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java b/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java index b505b6a4a..7a268e8c6 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentCustomCropField.java b/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentCustomCropField.java index 5718eb2a0..a2629a1cb 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentCustomCropField.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentCustomCropField.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java b/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java index 31bddc791..85d45101b 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/gen/VillageCustomCropFieldHandler.java b/src/main/java/ellpeck/actuallyadditions/gen/VillageCustomCropFieldHandler.java index 6be4e42d6..a03b53e94 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/VillageCustomCropFieldHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/VillageCustomCropFieldHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/gen/VillageJamHouseHandler.java b/src/main/java/ellpeck/actuallyadditions/gen/VillageJamHouseHandler.java index 00552a653..83e3f0f59 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/VillageJamHouseHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/VillageJamHouseHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.gen; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerBreaker.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerBreaker.java index a02841045..989104924 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCanolaPress.java index d656642af..2c8eca8a9 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCanolaPress.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoalGenerator.java index a512c3476..f81bd2c16 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoalGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoffeeMachine.java index 04b1d4345..0eecd9c60 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCoffeeMachine.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCrafter.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCrafter.java index 21f0edc73..35757373a 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCrafter.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerCrafter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDirectionalBreaker.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDirectionalBreaker.java index 859660998..910fb0bcb 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDirectionalBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDirectionalBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDrill.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDrill.java index 70c6a92b5..bc8fa673a 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDrill.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDrill.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDropper.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDropper.java index 4b2434faf..c84f29f30 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDropper.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerDropper.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnergizer.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnergizer.java index 4f9a73f71..977cb4f16 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnergizer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnervator.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnervator.java index cd00b3586..464b2a4e5 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnervator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerEnervator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFeeder.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFeeder.java index c80aa3719..2c2fae4f8 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFeeder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFermentingBarrel.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFermentingBarrel.java index 5c8eac2c2..631a067a3 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFermentingBarrel.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFermentingBarrel.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFluidCollector.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFluidCollector.java index 8b00bd168..9c0b2df9b 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFluidCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFluidCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java index 78cf29182..203852b71 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java index b22544c21..3307a5833 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGiantChest.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java index 550a9bc8f..f8a5e805b 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java index 16222e833..2c1b14286 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerInputter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOilGenerator.java index 42f660411..697da8a7c 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOilGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOreMagnet.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOreMagnet.java deleted file mode 100644 index 497d2e495..000000000 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerOreMagnet.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * This file ("ContainerOreMagnet.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.inventory; - -import ellpeck.actuallyadditions.blocks.InitBlocks; -import ellpeck.actuallyadditions.inventory.slot.SlotOutput; -import ellpeck.actuallyadditions.tile.TileEntityBase; -import ellpeck.actuallyadditions.tile.TileEntityOreMagnet; -import invtweaks.api.container.InventoryContainer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidStack; - -@InventoryContainer -public class ContainerOreMagnet extends Container{ - - private TileEntityOreMagnet magnet; - - public ContainerOreMagnet(InventoryPlayer inventory, TileEntityBase tile){ - this.magnet = (TileEntityOreMagnet)tile; - - this.addSlotToContainer(new Slot(this.magnet, TileEntityOreMagnet.SLOT_OIL_INPUT, 98, 74)); - this.addSlotToContainer(new SlotOutput(this.magnet, TileEntityOreMagnet.SLOT_OIL_OUTPUT, 98, 43)); - - this.addSlotToContainer(new SlotOutput(this.magnet, TileEntityOreMagnet.SLOT_UPGRADE, 71, 43)); - - for(int i = 0; i < 3; i++){ - for(int j = 0; j < 9; j++){ - this.addSlotToContainer(new Slot(inventory, j+i*9+9, 8+j*18, 97+i*18)); - } - } - for(int i = 0; i < 9; i++){ - this.addSlotToContainer(new Slot(inventory, i, 8+i*18, 155)); - } - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer player, int slot){ - final int inventoryStart = 3; - final int inventoryEnd = inventoryStart+26; - final int hotbarStart = inventoryEnd+1; - final int hotbarEnd = hotbarStart+8; - - Slot theSlot = (Slot)this.inventorySlots.get(slot); - - if(theSlot != null && theSlot.getHasStack()){ - ItemStack newStack = theSlot.getStack(); - ItemStack currentStack = newStack.copy(); - - //Other Slots in Inventory excluded - if(slot >= inventoryStart){ - //Shift from Inventory - if(FluidContainerRegistry.containsFluid(newStack, new FluidStack(InitBlocks.fluidOil, 1))){ - if(!this.mergeItemStack(newStack, TileEntityOreMagnet.SLOT_OIL_INPUT, TileEntityOreMagnet.SLOT_OIL_INPUT+1, false)){ - return null; - } - } - // - - else if(slot >= inventoryStart && slot <= inventoryEnd){ - if(!this.mergeItemStack(newStack, hotbarStart, hotbarEnd+1, false)){ - return null; - } - } - else if(slot >= inventoryEnd+1 && slot < hotbarEnd+1 && !this.mergeItemStack(newStack, inventoryStart, inventoryEnd+1, false)){ - return null; - } - } - else if(!this.mergeItemStack(newStack, inventoryStart, hotbarEnd+1, false)){ - return null; - } - - if(newStack.stackSize == 0){ - theSlot.putStack(null); - } - else{ - theSlot.onSlotChanged(); - } - - if(newStack.stackSize == currentStack.stackSize){ - return null; - } - theSlot.onPickupFromSlot(player, newStack); - - return currentStack; - } - return null; - } - - @Override - public boolean canInteractWith(EntityPlayer player){ - return this.magnet.isUseableByPlayer(player); - } -} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerPhantomPlacer.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerPhantomPlacer.java index 4b31aa261..63dbbe73f 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerPhantomPlacer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerPhantomPlacer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRangedCollector.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRangedCollector.java index 3677e0297..5846d0d55 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRangedCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRangedCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRepairer.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRepairer.java index ac23ab05c..217f5b006 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerRepairer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerSmileyCloud.java index bb2d00993..ae88ff48c 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerSmileyCloud.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerXPSolidifier.java index 3de6f8969..2d35e13a9 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerXPSolidifier.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java b/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java index 6c72b89d8..474f4c5df 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/GuiHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory; @@ -78,8 +78,6 @@ public class GuiHandler implements IGuiHandler{ return new ContainerEnervator(entityPlayer, tile); case XP_SOLIDIFIER: return new ContainerXPSolidifier(entityPlayer.inventory, tile); - case ORE_MAGNET: - return new ContainerOreMagnet(entityPlayer.inventory, tile); case CLOUD: return new ContainerSmileyCloud(); case DIRECTIONAL_BREAKER: @@ -142,8 +140,6 @@ public class GuiHandler implements IGuiHandler{ return new GuiEnervator(entityPlayer, tile); case XP_SOLIDIFIER: return new GuiXPSolidifier(entityPlayer.inventory, tile, x, y, z, world); - case ORE_MAGNET: - return new GuiOreMagnet(entityPlayer.inventory, tile); case CLOUD: return new GuiSmileyCloud(tile, x, y, z, world); case BOOK: @@ -180,7 +176,6 @@ public class GuiHandler implements IGuiHandler{ ENERGIZER, ENERVATOR, XP_SOLIDIFIER, - ORE_MAGNET, CLOUD, BOOK(false), DIRECTIONAL_BREAKER, diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiBreaker.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiBreaker.java index dced1f3ca..890a1da0b 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java index e494349d0..b77b975a3 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCanolaPress.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java index 2f88d52dc..426a87009 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoalGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java index 9d9ef0e29..838db2da1 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCoffeeMachine.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCrafter.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCrafter.java index fb2b0c22d..ca758388e 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCrafter.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiCrafter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDirectionalBreaker.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDirectionalBreaker.java index af17ac28a..43b7696b7 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDirectionalBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDirectionalBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDrill.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDrill.java index e4e1a6c58..3922d80c7 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDrill.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDrill.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDropper.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDropper.java index d346981cd..9ddd6c702 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDropper.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiDropper.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java index 8523a76ae..389347666 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnergizer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java index 3da69fb75..2128a622c 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiEnervator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFeeder.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFeeder.java index ab39d61d3..1aedee295 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFeeder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFermentingBarrel.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFermentingBarrel.java index a30f15b5f..5c219aef8 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFermentingBarrel.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFermentingBarrel.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFluidCollector.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFluidCollector.java index 375515255..01a03bc10 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFluidCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFluidCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java index bb8810ec6..8f44bf966 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiFurnaceDouble.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGiantChest.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGiantChest.java index c7c1c9c53..268bc8812 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGiantChest.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java index a0549f19c..ee6141e50 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiGrinder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java index 7992081d8..c989df169 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java index fac78a7b0..f4f8f9768 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOilGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOreMagnet.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOreMagnet.java deleted file mode 100644 index 6990e7276..000000000 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiOreMagnet.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * This file ("GuiOreMagnet.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.inventory.gui; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.inventory.ContainerOreMagnet; -import ellpeck.actuallyadditions.tile.TileEntityBase; -import ellpeck.actuallyadditions.tile.TileEntityOreMagnet; -import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.StringUtil; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.util.ResourceLocation; -import org.lwjgl.opengl.GL11; - -import java.util.Arrays; -import java.util.Collections; - -@SideOnly(Side.CLIENT) -public class GuiOreMagnet extends GuiContainer{ - - private static final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiOreMagnet"); - private TileEntityOreMagnet magnet; - - public GuiOreMagnet(InventoryPlayer inventory, TileEntityBase tile){ - super(new ContainerOreMagnet(inventory, tile)); - this.magnet = (TileEntityOreMagnet)tile; - this.xSize = 176; - this.ySize = 93+86; - } - - @Override - public void drawScreen(int x, int y, float f){ - super.drawScreen(x, y, f); - String text1 = this.magnet.storage.getEnergyStored()+"/"+this.magnet.storage.getMaxEnergyStored()+" RF"; - if(x >= guiLeft+43 && y >= guiTop+6 && x <= guiLeft+58 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text1), x, y); - } - String text2 = this.magnet.tank.getFluidAmount()+"/"+this.magnet.tank.getCapacity()+" mB "+StringUtil.localize("fluid.oil"); - if(x >= guiLeft+117 && y >= guiTop+6 && x <= guiLeft+132 && y <= guiTop+88){ - this.func_146283_a(Collections.singletonList(text2), x, y); - } - //TODO Upgrade Slot Joke - if(x >= guiLeft+70 && y >= guiTop+42 && x <= guiLeft+70+18 && y <= guiTop+42+18){ - this.func_146283_a(Arrays.asList("@SuppressWarnings(\"unused\")", "This slot is currently unused. Ignore it."), x, y); - } - } - - @Override - public void drawGuiContainerForegroundLayer(int x, int y){ - AssetUtil.displayNameString(this.fontRendererObj, xSize, -10, this.magnet.getInventoryName()); - } - - @Override - public void drawGuiContainerBackgroundLayer(float f, int x, int y){ - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - - this.mc.getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); - this.drawTexturedModalRect(this.guiLeft, this.guiTop+93, 0, 0, 176, 86); - - this.mc.getTextureManager().bindTexture(resLoc); - this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, 176, 93); - - if(this.magnet.storage.getEnergyStored() > 0){ - int i = this.magnet.getEnergyScaled(83); - drawTexturedModalRect(this.guiLeft+43, this.guiTop+89-i, 176, 0, 16, i); - } - - if(this.magnet.tank.getFluidAmount() > 0){ - int i = this.magnet.getTankScaled(83); - drawTexturedModalRect(this.guiLeft+117, this.guiTop+89-i, 192, 0, 16, i); - } - } -} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiPhantomPlacer.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiPhantomPlacer.java index e2e8c1b33..619547e52 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiPhantomPlacer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRangedCollector.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRangedCollector.java index 639b97c75..204225d32 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRangedCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java index 46e8d7882..e33c3ce58 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiRepairer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java index abefd386b..60ab7db3d 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiXPSolidifier.java index dd15dfee2..c0dc82c07 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiXPSolidifier.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotFilter.java b/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotFilter.java index 4a3d5a1f7..d36c31b76 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotFilter.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotFilter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.slot; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotImmovable.java b/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotImmovable.java index 19401f441..edbedaf97 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotImmovable.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotImmovable.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.slot; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotOutput.java b/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotOutput.java index 54f5be088..54e0599a7 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotOutput.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/slot/SlotOutput.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.inventory.slot; diff --git a/src/main/java/ellpeck/actuallyadditions/items/InitForeignPaxels.java b/src/main/java/ellpeck/actuallyadditions/items/InitForeignPaxels.java index f7d97186e..9c6052d92 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/InitForeignPaxels.java +++ b/src/main/java/ellpeck/actuallyadditions/items/InitForeignPaxels.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -27,37 +27,74 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; public class InitForeignPaxels{ + public static final int[] MT_COLORS = new int[]{4166, 2248890, 8882649, 12410135, 11451392, 3684412}; public static final String[] MT_NAMES = new String[]{"Obsidian", "LapisLazuli", "Osmium", "Bronze", "Glowstone", "Steel"}; - private static final String THERMAL_FOUNDATION = "ThermalFoundation"; + public static final int[] TF_COLORS = new int[]{13332762, 5407943, 5407895, 5394789, 12960613, 12960653, 12410135, 2999795, 10143162}; + public static final int[] SO_COLORS = new int[]{9409450, 2040021, 5714944, 526344, 545032}; + //MekanismTools private static final String MEKANISM_TOOLS = "MekanismTools"; - private static final String[] TF_NAMES = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"}; private static final String[] MT_REPAIR_NAMES = new String[]{"ingotRefinedObsidian", "gemLapis", "ingotOsmium", "ingotBronze", "ingotRefinedGlowstone", "ingotSteel"}; + //ThermalFoundation + private static final String THERMAL_FOUNDATION = "ThermalFoundation"; + private static final String[] TF_NAMES = new String[]{"Copper", "Tin", "Silver", "Lead", "Nickel", "Electrum", "Bronze", "Platinum", "Invar"}; + //SimpleOres + private static final String SIMPLE_ORES = "simpleores"; + private static final String[] SO_NAMES = new String[]{"tin", "mythril", "copper", "onyx", "adamantium"}; + private static final String[] SO_REPAIR_NAMES = new String[]{"ingotTin", "ingotMythril", "ingotCopper", "gemOnyx", "ingotAdamantium"}; public static Item[] tfPaxels = new Item[9]; + public static Item[] soPaxels = new Item[5]; private static Item[] mtPaxels = new Item[6]; public static void init(){ + //SimpleOres + if(ConfigBoolValues.SO_PAXELS.isEnabled()){ + if(Loader.isModLoaded(SIMPLE_ORES)){ + ModUtil.LOGGER.info("Initializing "+SIMPLE_ORES+" AIOTs..."); + + for(int i = 0; i < soPaxels.length; i++){ + Item axe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_axe"); + Item pickaxe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_pickaxe"); + Item hoe = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_hoe"); + Item sword = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_sword"); + Item shovel = ItemUtil.getItemFromName(SIMPLE_ORES+":"+SO_NAMES[i]+"_shovel"); + + if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ + Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); + soPaxels[i] = new ItemAllToolAA(material, SO_REPAIR_NAMES[i], "paxelSO"+SO_NAMES[i], EnumRarity.rare, SO_COLORS[i]); + ItemUtil.register(soPaxels[i]); + + if(ConfigCrafting.PAXELS.isEnabled()){ + GameRegistry.addRecipe(new ShapelessOreRecipe(soPaxels[i], axe, pickaxe, hoe, sword, shovel)); + ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe()); + } + } + } + } + else{ + ModUtil.LOGGER.info(SIMPLE_ORES+" not loaded, can't initialize Special AIOTs."); + } + } + //MekanismTools if(ConfigBoolValues.MT_PAXELS.isEnabled()){ if(Loader.isModLoaded(MEKANISM_TOOLS)){ ModUtil.LOGGER.info("Initializing "+MEKANISM_TOOLS+" AIOTs..."); for(int i = 0; i < mtPaxels.length; i++){ - if(!(!ConfigBoolValues.DUPLICATE_PAXELS.isEnabled() && (i == 0 || (i == 3 && ConfigBoolValues.TF_PAXELS.isEnabled() && Loader.isModLoaded(THERMAL_FOUNDATION))))){ - Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe"); - Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe"); - Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe"); - Item sword = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Sword"); - Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Shovel"); + Item axe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Axe"); + Item pickaxe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Pickaxe"); + Item hoe = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Hoe"); + Item sword = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Sword"); + Item shovel = ItemUtil.getItemFromName(MEKANISM_TOOLS+":"+MT_NAMES[i]+"Shovel"); - if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ - Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); - mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare); - ItemUtil.register(mtPaxels[i]); + if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ + Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); + mtPaxels[i] = new ItemAllToolAA(material, MT_REPAIR_NAMES[i], "paxelMT"+MT_NAMES[i], EnumRarity.rare, MT_COLORS[i]); + ItemUtil.register(mtPaxels[i]); - if(ConfigCrafting.PAXELS.isEnabled()){ - GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel)); - ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe()); - } + if(ConfigCrafting.PAXELS.isEnabled()){ + GameRegistry.addRecipe(new ShapelessOreRecipe(mtPaxels[i], axe, pickaxe, hoe, sword, shovel)); + ToolCrafting.recipesPaxels.add(Util.GetRecipes.lastIRecipe()); } } } @@ -67,7 +104,7 @@ public class InitForeignPaxels{ } } - //Thermal Foundation + //ThermalFoundation if(ConfigBoolValues.TF_PAXELS.isEnabled()){ if(Loader.isModLoaded(THERMAL_FOUNDATION)){ ModUtil.LOGGER.info("Initializing "+THERMAL_FOUNDATION+" AIOTs..."); @@ -81,7 +118,7 @@ public class InitForeignPaxels{ if(axe != null && pickaxe != null && hoe != null && sword != null && shovel != null && axe instanceof ItemTool){ Item.ToolMaterial material = ((ItemTool)axe).func_150913_i(); - tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare); + tfPaxels[i] = new ItemAllToolAA(material, "ingot"+TF_NAMES[i], "paxelTF"+TF_NAMES[i], EnumRarity.rare, TF_COLORS[i]); ItemUtil.register(tfPaxels[i]); if(ConfigCrafting.PAXELS.isEnabled()){ @@ -108,5 +145,10 @@ public class InitForeignPaxels{ CreativeTab.instance.add(item); } } + for(Item item : soPaxels){ + if(item != null){ + CreativeTab.instance.add(item); + } + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java index d50739037..e0fc3460d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java +++ b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -291,14 +291,14 @@ public class InitItems{ itemHoeQuartz = new ItemHoeAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "itemHoeQuartz", EnumRarity.rare); ItemUtil.registerItems(new Item[]{itemPickaxeQuartz, itemAxeQuartz, itemShovelQuartz, itemSwordQuartz, itemHoeQuartz}); - woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.uncommon); - stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, "stone", "stonePaxel", EnumRarity.uncommon); - ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, "ingotIron", "ironPaxel", EnumRarity.rare); - goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, "ingotGold", "goldPaxel", EnumRarity.rare); - diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.EMERALD, "gemDiamond", "diamondPaxel", EnumRarity.epic); - emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "emeraldPaxel", EnumRarity.epic); - obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "obsidianPaxel", EnumRarity.epic); - quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "quartzPaxel", EnumRarity.rare); + woodenPaxel = new ItemAllToolAA(Item.ToolMaterial.WOOD, "plankWood", "woodenPaxel", EnumRarity.uncommon, 5192733); + stonePaxel = new ItemAllToolAA(Item.ToolMaterial.STONE, "stone", "stonePaxel", EnumRarity.uncommon, 7040621); + ironPaxel = new ItemAllToolAA(Item.ToolMaterial.IRON, "ingotIron", "ironPaxel", EnumRarity.rare, 10920613); + goldPaxel = new ItemAllToolAA(Item.ToolMaterial.GOLD, "ingotGold", "goldPaxel", EnumRarity.rare, 16770048); + diamondPaxel = new ItemAllToolAA(Item.ToolMaterial.EMERALD, "gemDiamond", "diamondPaxel", EnumRarity.epic, 3250376); + emeraldPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialEmerald, "gemEmerald", "emeraldPaxel", EnumRarity.epic, 7723338); + obsidianPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialObsidian, "obsidian", "obsidianPaxel", EnumRarity.epic, 4166); + quartzPaxel = new ItemAllToolAA(InitToolMaterials.toolMaterialQuartz, "gemQuartzBlack", "quartzPaxel", EnumRarity.rare, 1710103); ItemUtil.registerItems(new Item[]{woodenPaxel, stonePaxel, ironPaxel, goldPaxel, diamondPaxel, emeraldPaxel, obsidianPaxel, quartzPaxel}); } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java b/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java index 9229d96df..c5f1228a0 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemArmorAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -45,6 +45,7 @@ public class ItemArmorAA extends ItemArmor implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java index cec653f67..342640a66 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBattery.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -40,6 +40,7 @@ public class ItemBattery extends ItemEnergy{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBlockBase.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBlockBase.java index 42ad445ce..61d841bab 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBlockBase.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBlockBase.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java index 4bc179d34..dc828a4e6 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBooklet.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java b/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java index fc642384c..c96d92e63 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemBucketAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -44,6 +44,7 @@ public class ItemBucketAA extends ItemBucket implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemChestToCrateUpgrade.java b/src/main/java/ellpeck/actuallyadditions/items/ItemChestToCrateUpgrade.java index cb58a1ead..6394ca3f8 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemChestToCrateUpgrade.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemChestToCrateUpgrade.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -16,6 +16,7 @@ import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.tile.TileEntityGiantChest; import ellpeck.actuallyadditions.util.IActAddItemOrBlock; import ellpeck.actuallyadditions.util.ModUtil; +import net.minecraft.block.Block; import net.minecraft.block.BlockChest; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -48,6 +49,7 @@ public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{ } //Set New Block + world.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(world.getBlock(x, y, z))+(world.getBlockMetadata(x, y, z) << 12)); world.setBlock(x, y, z, InitBlocks.blockGiantChest, 0, 2); //Copy Items into new Chest @@ -86,6 +88,7 @@ public class ItemChestToCrateUpgrade extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java index 558c50db2..5ec9b1070 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffee.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -188,6 +188,7 @@ public class ItemCoffee extends ItemFood implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int par1){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java index 77273a62c..d319cf326 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemCoffeeBean.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java b/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java index 8754e6030..ec6e38d4c 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemCrafterOnAStick.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -50,6 +50,7 @@ public class ItemCrafterOnAStick extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java index a6d04ecc7..fda8b3ff9 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -247,6 +247,7 @@ public class ItemDrill extends ItemEnergy{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java index ec2dd8463..1d5aa5238 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDrillUpgrade.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -67,6 +67,7 @@ public class ItemDrillUpgrade extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java index 4f0eaf00b..ac8d40333 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDust.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -73,6 +73,7 @@ public class ItemDust extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java b/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java index 9d37ae944..c29897bb2 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemEnergy.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java b/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java index e4fceb846..2e56ccf43 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemFertilizer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -48,6 +48,7 @@ public class ItemFertilizer extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java b/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java index f2b4608cf..0c4f8258e 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemFoods.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -28,7 +28,8 @@ import java.util.List; public class ItemFoods extends ItemFood implements IActAddItemOrBlock{ public static final TheFoods[] allFoods = TheFoods.values(); - public IIcon[] textures = new IIcon[allFoods.length]; + @SideOnly(Side.CLIENT) + public IIcon[] textures; public ItemFoods(){ super(0, 0.0F, false); @@ -74,6 +75,7 @@ public class ItemFoods extends ItemFood implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int par1){ return par1 >= textures.length ? null : textures[par1]; } @@ -104,6 +106,7 @@ public class ItemFoods extends ItemFood implements IActAddItemOrBlock{ @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconReg){ + this.textures = new IIcon[allFoods.length]; for(int i = 0; i < textures.length; i++){ textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allFoods[i].name); } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemGrowthRing.java b/src/main/java/ellpeck/actuallyadditions/items/ItemGrowthRing.java index 91f1d8826..a938715a6 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemGrowthRing.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemGrowthRing.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -111,6 +111,7 @@ public class ItemGrowthRing extends ItemEnergy{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java b/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java index efd342d74..31a0a3dda 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemHairyBall.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -60,6 +60,7 @@ public class ItemHairyBall extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java b/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java index 0206b62ec..0d50b38dd 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemJams.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -33,6 +33,7 @@ import java.util.List; public class ItemJams extends ItemFood implements IActAddItemOrBlock{ public static final TheJams[] allJams = TheJams.values(); + @SideOnly(Side.CLIENT) public IIcon overlayIcon; public ItemJams(){ diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java index 7ae823edd..9d1c6e853 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -75,6 +75,7 @@ public class ItemKnife extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemLaserWrench.java b/src/main/java/ellpeck/actuallyadditions/items/ItemLaserWrench.java index c556a4ffd..38f686df0 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemLaserWrench.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemLaserWrench.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -60,6 +60,7 @@ public class ItemLaserWrench extends Item implements IActAddItemOrBlock{ } else{ player.addChatComponentMessage(new ChatComponentText(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".laser.cantConnect.desc"))); + ItemPhantomConnector.clearStorage(stack); } } } @@ -85,15 +86,12 @@ public class ItemLaserWrench extends Item implements IActAddItemOrBlock{ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ WorldPos coords = ItemPhantomConnector.getStoredPosition(stack); if(coords != null){ - World world = coords.getWorld(); - if(world != null){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".boundTo.desc")+":"); - list.add("X: "+coords.getX()); - list.add("Y: "+coords.getY()); - list.add("Z: "+coords.getZ()); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".inWorld.desc")+" "+world.provider.dimensionId); - list.add(EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".clearStorage.desc")); - } + list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".boundTo.desc")+":"); + list.add("X: "+coords.getX()); + list.add("Y: "+coords.getY()); + list.add("Z: "+coords.getZ()); + list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".inWorld.desc")+" "+coords.getWorldID()); + list.add(EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".clearStorage.desc")); } } @@ -109,6 +107,7 @@ public class ItemLaserWrench extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java b/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java index e29ffae57..57a1c5831 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -131,6 +131,7 @@ public class ItemLeafBlower extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemMagnetRing.java b/src/main/java/ellpeck/actuallyadditions/items/ItemMagnetRing.java index eeb235bec..44d7ae55e 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemMagnetRing.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemMagnetRing.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -75,6 +75,7 @@ public class ItemMagnetRing extends ItemEnergy{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java b/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java index 703ec328b..1fc0305d6 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemMisc.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -27,13 +27,15 @@ import java.util.List; public class ItemMisc extends Item implements IActAddItemOrBlock{ public static final TheMiscItems[] allMiscItems = TheMiscItems.values(); - public IIcon[] textures = new IIcon[allMiscItems.length]; + @SideOnly(Side.CLIENT) + public IIcon[] textures; public ItemMisc(){ this.setHasSubtypes(true); } @Override + @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int par1){ return par1 >= textures.length ? null : textures[par1]; } @@ -64,6 +66,7 @@ public class ItemMisc extends Item implements IActAddItemOrBlock{ @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconReg){ + this.textures = new IIcon[allMiscItems.length]; for(int i = 0; i < textures.length; i++){ textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allMiscItems[i].name); } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java b/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java index 546ff22a9..1261312de 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemPhantomConnector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -29,7 +29,6 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; import java.util.List; @@ -82,8 +81,8 @@ public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{ int x = tag.getInteger("XCoordOfTileStored"); int y = tag.getInteger("YCoordOfTileStored"); int z = tag.getInteger("ZCoordOfTileStored"); - World world = DimensionManager.getWorld(tag.getInteger("WorldOfTileStored")); - if(x != 0 && y != 0 && z != 0 && world != null){ + int world = tag.getInteger("WorldOfTileStored"); + if(!(x == 0 && y == 0 && z == 0)){ return new WorldPos(world, x, y, z); } } @@ -126,15 +125,12 @@ public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{ public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld){ WorldPos coords = getStoredPosition(stack); if(coords != null){ - World world = coords.getWorld(); - if(world != null){ - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".boundTo.desc")+":"); - list.add("X: "+coords.getX()); - list.add("Y: "+coords.getY()); - list.add("Z: "+coords.getZ()); - list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".inWorld.desc")+" "+world.provider.dimensionId); - list.add(EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".clearStorage.desc")); - } + list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".boundTo.desc")+":"); + list.add("X: "+coords.getX()); + list.add("Y: "+coords.getY()); + list.add("Z: "+coords.getZ()); + list.add(StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".inWorld.desc")+" "+coords.getWorldID()); + list.add(EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".clearStorage.desc")); } } @@ -150,6 +146,7 @@ public class ItemPhantomConnector extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java b/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java index f1c93079f..e1dd906ef 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemPotionRing.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -117,6 +117,7 @@ public class ItemPotionRing extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java b/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java index b4daf9607..8bb7f9629 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemResonantRice.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -45,6 +45,7 @@ public class ItemResonantRice extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java b/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java index ea2bf912d..8d059a9fc 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemSeed.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -53,6 +53,7 @@ public class ItemSeed extends ItemSeeds implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java b/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java index b5904d646..797b8fc04 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemSpecialDrop.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -32,13 +32,15 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{ public static final int SOLID_XP_AMOUNT = 8; public static final TheSpecialDrops[] allDrops = TheSpecialDrops.values(); - public IIcon[] textures = new IIcon[allDrops.length]; + @SideOnly(Side.CLIENT) + public IIcon[] textures; public ItemSpecialDrop(){ this.setHasSubtypes(true); } @Override + @SideOnly(Side.CLIENT) public IIcon getIconFromDamage(int par1){ return par1 >= textures.length ? null : textures[par1]; } @@ -90,6 +92,7 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{ @Override @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister iconReg){ + this.textures = new IIcon[allDrops.length]; for(int i = 0; i < textures.length; i++){ textures[i] = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()+allDrops[i].name); } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java b/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java index 6a0fd1f18..77daaf80d 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemTeleStaff.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -91,6 +91,7 @@ public class ItemTeleStaff extends ItemEnergy{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemWaterRemovalRing.java b/src/main/java/ellpeck/actuallyadditions/items/ItemWaterRemovalRing.java index 8c348b9cd..ddc9c3adc 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemWaterRemovalRing.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemWaterRemovalRing.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -84,6 +84,7 @@ public class ItemWaterRemovalRing extends ItemEnergy{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java b/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java index 40ece5a05..8b5e9919a 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemWingsOfTheBats.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items; @@ -104,6 +104,7 @@ public class ItemWingsOfTheBats extends Item implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheDusts.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheDusts.java index 01ff4a5fb..8533cc6a0 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheDusts.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheDusts.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.metalists; diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheFoods.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheFoods.java index 6f444ad62..645425d99 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheFoods.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheFoods.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.metalists; @@ -36,7 +36,7 @@ public enum TheFoods{ RICE("Rice", 2, 1F, false, 10, EnumRarity.uncommon), RICE_BREAD("RiceBread", 8, 3F, false, 25, EnumRarity.uncommon), DOUGHNUT("Doughnut", 4, 0.5F, false, 10, EnumRarity.epic), - CHOCOTOAST("ChocoToast", 8, 1.4F, false, 40, EnumRarity.rare); + CHOCOLATE_TOAST("ChocolateToast", 8, 1.4F, false, 40, EnumRarity.rare); public final String name; public final int healAmount; diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheJams.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheJams.java index e7d239946..1f3756df9 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheJams.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheJams.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.metalists; diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheMiscItems.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheMiscItems.java index 2a99be29b..ae7263c3e 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheMiscItems.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheMiscItems.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.metalists; @@ -29,7 +29,9 @@ public enum TheMiscItems{ RICE_SLIME("RiceSlime", EnumRarity.uncommon), CANOLA("Canola", EnumRarity.uncommon), CUP("Cup", EnumRarity.uncommon), - BAT_WING("BatWing", EnumRarity.rare); + BAT_WING("BatWing", EnumRarity.rare), + DRILL_CORE("DrillCore", EnumRarity.uncommon), + BLACK_DYE("BlackDye", EnumRarity.epic); public final String name; public final EnumRarity rarity; diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java index 0a60fd404..a8d701f31 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/ThePotionRings.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.metalists; diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java index 16f26480a..164483248 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.metalists; diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java index 05fe224f8..854e873a8 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAllToolAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.tools; @@ -37,16 +37,21 @@ import java.util.Set; @SuppressWarnings("unchecked") public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{ + @SideOnly(Side.CLIENT) + private IIcon overlayIcon; + private int color; + private String name; private EnumRarity rarity; private String repairItem; - public ItemAllToolAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity){ + public ItemAllToolAA(ToolMaterial toolMat, String repairItem, String unlocalizedName, EnumRarity rarity, int color){ super(4.0F, toolMat, Sets.newHashSet()); this.repairItem = repairItem; this.name = unlocalizedName; this.rarity = rarity; + this.color = color; this.setMaxDamage(this.getMaxDamage()*4); } @@ -84,20 +89,33 @@ public class ItemAllToolAA extends ItemTool implements IActAddItemOrBlock{ } } + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack stack, int pass){ + return pass > 0 ? this.color : super.getColorFromItemStack(stack, pass); + } + @Override public EnumRarity getRarity(ItemStack stack){ return this.rarity; } @Override - @SideOnly(Side.CLIENT) - public void registerIcons(IIconRegister iconReg){ - this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":"+this.getName()); + public boolean requiresMultipleRenderPasses(){ + return true; } @Override - public IIcon getIcon(ItemStack stack, int pass){ - return this.itemIcon; + @SideOnly(Side.CLIENT) + public IIcon getIconFromDamageForRenderPass(int damage, int pass){ + return pass > 0 ? this.overlayIcon : super.getIconFromDamageForRenderPass(damage, pass); + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconReg){ + this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxel"); + this.overlayIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER+":itemPaxelOverlay"); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java index 957ca5a4b..8362e63f8 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemAxeAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.tools; @@ -57,6 +57,7 @@ public class ItemAxeAA extends ItemAxe implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java index 0d6907ae3..b5995960c 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemHoeAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.tools; @@ -59,6 +59,7 @@ public class ItemHoeAA extends ItemHoe implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java index 4811282a2..493ba88c2 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemPickaxeAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.tools; @@ -57,6 +57,7 @@ public class ItemPickaxeAA extends ItemPickaxe implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java index 34f570275..9ea9b3ed1 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemShovelAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.tools; @@ -59,6 +59,7 @@ public class ItemShovelAA extends ItemSpade implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java index 1ba255897..0355fd30b 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java +++ b/src/main/java/ellpeck/actuallyadditions/items/tools/ItemSwordAA.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.items.tools; @@ -59,6 +59,7 @@ public class ItemSwordAA extends ItemSword implements IActAddItemOrBlock{ } @Override + @SideOnly(Side.CLIENT) public IIcon getIcon(ItemStack stack, int pass){ return this.itemIcon; } diff --git a/src/main/java/ellpeck/actuallyadditions/material/InitArmorMaterials.java b/src/main/java/ellpeck/actuallyadditions/material/InitArmorMaterials.java index eda0c5269..d2d1dd67f 100644 --- a/src/main/java/ellpeck/actuallyadditions/material/InitArmorMaterials.java +++ b/src/main/java/ellpeck/actuallyadditions/material/InitArmorMaterials.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.material; diff --git a/src/main/java/ellpeck/actuallyadditions/material/InitToolMaterials.java b/src/main/java/ellpeck/actuallyadditions/material/InitToolMaterials.java index aa3f3990e..72d174db8 100644 --- a/src/main/java/ellpeck/actuallyadditions/material/InitToolMaterials.java +++ b/src/main/java/ellpeck/actuallyadditions/material/InitToolMaterials.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.material; diff --git a/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerEmptyBucket.java b/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerEmptyBucket.java index 4cff8abf1..46bb7be27 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerEmptyBucket.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerEmptyBucket.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc; diff --git a/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFertilize.java b/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFertilize.java index 76899678e..4a96736f3 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFertilize.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFertilize.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc; diff --git a/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFillBucket.java b/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFillBucket.java index 4fc0e849a..b71c70f12 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFillBucket.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/DispenserHandlerFillBucket.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc; diff --git a/src/main/java/ellpeck/actuallyadditions/misc/LaserRelayConnectionHandler.java b/src/main/java/ellpeck/actuallyadditions/misc/LaserRelayConnectionHandler.java index 7c35769ea..a8905c153 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/LaserRelayConnectionHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/LaserRelayConnectionHandler.java @@ -5,74 +5,65 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc; import cofh.api.energy.IEnergyReceiver; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.tile.TileEntityLaserRelay; import ellpeck.actuallyadditions.util.WorldPos; import ellpeck.actuallyadditions.util.WorldUtil; +import io.netty.util.internal.ConcurrentSet; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Vec3; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.util.ForgeDirection; -import java.util.ArrayList; -import java.util.Iterator; - public class LaserRelayConnectionHandler{ private static LaserRelayConnectionHandler instance; /** - * An ArrayList of all of the networks a world has - * (Every place contains an ArrayList of ConnectionPairs, that is a single network!) + * All of the Networks */ - public ArrayList> networks = new ArrayList>(); + public ConcurrentSet networks = new ConcurrentSet(); public static LaserRelayConnectionHandler getInstance(){ return instance; } - public static void setInstance(LaserRelayConnectionHandler i){ - instance = i; + public static void setInstance(LaserRelayConnectionHandler handler){ + instance = handler; } - public void writeNetworkToNBT(ArrayList network, NBTTagCompound tag, String name){ + public NBTTagCompound writeNetworkToNBT(Network network){ + NBTTagList list = new NBTTagList(); + for(ConnectionPair pair : network.connections){ + list.appendTag(pair.writeToNBT()); + } NBTTagCompound compound = new NBTTagCompound(); - compound.setInteger("NetworkSize", network.size()); - - for(int pair = 0; pair < network.size(); pair++){ - network.get(pair).writeToNBT(compound, "Pair"+pair); - } - - tag.setTag(name, compound); + compound.setTag("Network", list); + return compound; } - public ArrayList readNetworkFromNBT(NBTTagCompound tag, String name){ - NBTTagCompound compound = tag.getCompoundTag(name); - - int networkSize = compound.getInteger("NetworkSize"); - - ArrayList network = new ArrayList(); - for(int pair = 0; pair < networkSize; pair++){ - network.add(ConnectionPair.readFromNBT(compound, "Pair"+pair)); + public Network readNetworkFromNBT(NBTTagCompound tag){ + NBTTagList list = tag.getTagList("Network", 10); + Network network = new Network(); + for(int i = 0; i < list.tagCount(); i++){ + network.connections.add(ConnectionPair.readFromNBT(list.getCompoundTagAt(i))); } - return network; } /** * Gets all Connections for a Relay */ - public ArrayList getConnectionsFor(WorldPos relay){ - ArrayList allPairs = new ArrayList(); - for(ArrayList aNetwork : this.networks){ - for(ConnectionPair pair : aNetwork){ + public ConcurrentSet getConnectionsFor(WorldPos relay){ + ConcurrentSet allPairs = new ConcurrentSet(); + for(Network aNetwork : this.networks){ + for(ConnectionPair pair : aNetwork.connections){ if(pair.contains(relay)){ allPairs.add(pair); } @@ -85,23 +76,16 @@ public class LaserRelayConnectionHandler{ * Removes a Relay from its Network */ public void removeRelayFromNetwork(WorldPos relay){ - ArrayList network = this.getNetworkFor(relay); + Network network = this.getNetworkFor(relay); if(network != null){ - //Remove the relay from the network - Iterator iterator = network.iterator(); - while(iterator.hasNext()){ - ConnectionPair next = iterator.next(); - if(next.contains(relay)){ - iterator.remove(); - //System.out.println("Removed "+relay.toString()+" from Network "+network.toString()); - } - } - //Setup new network (so that splitting a network will cause it to break into two) this.networks.remove(network); - for(ConnectionPair pair : network){ - this.addConnection(pair.firstRelay, pair.secondRelay); + for(ConnectionPair pair : network.connections){ + if(!pair.contains(relay)){ + this.addConnection(pair.firstRelay, pair.secondRelay); + } } + //System.out.println("Removing a Relay from the Network!"); } WorldData.makeDirty(); } @@ -109,9 +93,9 @@ public class LaserRelayConnectionHandler{ /** * Gets a Network for a Relay */ - public ArrayList getNetworkFor(WorldPos relay){ - for(ArrayList aNetwork : this.networks){ - for(ConnectionPair pair : aNetwork){ + public Network getNetworkFor(WorldPos relay){ + for(Network aNetwork : this.networks){ + for(ConnectionPair pair : aNetwork.connections){ if(pair.contains(relay)){ return aNetwork; } @@ -125,19 +109,19 @@ public class LaserRelayConnectionHandler{ * (Puts it into the correct network!) */ public boolean addConnection(WorldPos firstRelay, WorldPos secondRelay){ - int distance = (int)Vec3.createVectorHelper(firstRelay.getX(), firstRelay.getY(), firstRelay.getZ()).distanceTo(Vec3.createVectorHelper(secondRelay.getX(), secondRelay.getY(), secondRelay.getZ())); - if(distance > 15 || firstRelay.isEqual(secondRelay) || firstRelay.getWorld() != secondRelay.getWorld()){ + int distance = (int)firstRelay.toVec().distanceTo(secondRelay.toVec()); + if(distance > ConfigIntValues.LASER_RELAY_MAX_DISTANCE.getValue() || firstRelay.isEqual(secondRelay) || firstRelay.getWorld() != secondRelay.getWorld()){ return false; } - ArrayList firstNetwork = this.getNetworkFor(firstRelay); - ArrayList secondNetwork = this.getNetworkFor(secondRelay); + Network firstNetwork = this.getNetworkFor(firstRelay); + Network secondNetwork = this.getNetworkFor(secondRelay); //No Network exists if(firstNetwork == null && secondNetwork == null){ - firstNetwork = new ArrayList(); + firstNetwork = new Network(); this.networks.add(firstNetwork); - firstNetwork.add(new ConnectionPair(firstRelay, secondRelay)); + firstNetwork.connections.add(new ConnectionPair(firstRelay, secondRelay)); } //The same Network else if(firstNetwork == secondNetwork){ @@ -146,19 +130,20 @@ public class LaserRelayConnectionHandler{ //Both relays have networks else if(firstNetwork != null && secondNetwork != null){ this.mergeNetworks(firstNetwork, secondNetwork); - firstNetwork.add(new ConnectionPair(firstRelay, secondRelay)); + firstNetwork.connections.add(new ConnectionPair(firstRelay, secondRelay)); } //Only first network exists else if(firstNetwork != null){ - firstNetwork.add(new ConnectionPair(firstRelay, secondRelay)); + firstNetwork.connections.add(new ConnectionPair(firstRelay, secondRelay)); } //Only second network exists else if(secondNetwork != null){ - secondNetwork.add(new ConnectionPair(firstRelay, secondRelay)); + secondNetwork.connections.add(new ConnectionPair(firstRelay, secondRelay)); } WorldData.makeDirty(); //System.out.println("Connected "+firstRelay.toString()+" to "+secondRelay.toString()); //System.out.println(firstNetwork == null ? secondNetwork.toString() : firstNetwork.toString()); + //System.out.println(this.networks); return true; } @@ -166,19 +151,19 @@ public class LaserRelayConnectionHandler{ * Merges two networks together * (Actually puts everything from the second network into the first one and removes the second one) */ - public void mergeNetworks(ArrayList firstNetwork, ArrayList secondNetwork){ - for(ConnectionPair secondPair : secondNetwork){ - firstNetwork.add(secondPair); + public void mergeNetworks(Network firstNetwork, Network secondNetwork){ + for(ConnectionPair secondPair : secondNetwork.connections){ + firstNetwork.connections.add(secondPair); } this.networks.remove(secondNetwork); WorldData.makeDirty(); //System.out.println("Merged Two Networks!"); } - public int transferEnergyToReceiverInNeed(ArrayList network, int maxTransfer, boolean simulate){ + public int transferEnergyToReceiverInNeed(WorldPos energyGottenFrom, Network network, int maxTransfer, boolean simulate){ int transmitted = 0; //Go through all of the connections in the network - for(ConnectionPair pair : network){ + for(ConnectionPair pair : network.connections){ WorldPos[] relays = new WorldPos[]{pair.firstRelay, pair.secondRelay}; //Go through both relays in the connection for(WorldPos relay : relays){ @@ -186,13 +171,21 @@ public class LaserRelayConnectionHandler{ //Get every side of the relay for(int i = 0; i <= 5; i++){ ForgeDirection side = ForgeDirection.getOrientation(i); - //Get the TileEntity at the side - TileEntity tile = WorldUtil.getTileEntityFromSide(side, relay.getWorld(), relay.getX(), relay.getY(), relay.getZ()); - if(tile instanceof IEnergyReceiver && !(tile instanceof TileEntityLaserRelay)){ - IEnergyReceiver receiver = (IEnergyReceiver)tile; - if(receiver.canConnectEnergy(side.getOpposite())){ - //Transfer the energy - transmitted += ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), maxTransfer-transmitted, simulate); + //Get the Position at the side + WorldPos pos = WorldUtil.getCoordsFromSide(side, relay.getWorld(), relay.getX(), relay.getY(), relay.getZ(), 0); + if(!pos.isEqual(energyGottenFrom)){ + TileEntity tile = pos.getTileEntity(); + if(tile instanceof IEnergyReceiver && !(tile instanceof TileEntityLaserRelay)){ + IEnergyReceiver receiver = (IEnergyReceiver)tile; + if(receiver.canConnectEnergy(side.getOpposite())){ + //Transfer the energy (with the energy loss!) + int theoreticalReceived = ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), maxTransfer-transmitted, true); + //The amount of energy lost during a transfer + int deduct = (int)(theoreticalReceived*((double)ConfigIntValues.LASER_RELAY_LOSS.getValue()/100)); + + transmitted += ((IEnergyReceiver)tile).receiveEnergy(side.getOpposite(), theoreticalReceived-deduct, simulate); + transmitted += deduct; + } } } } @@ -212,14 +205,13 @@ public class LaserRelayConnectionHandler{ this.secondRelay = secondRelay; } - public static ConnectionPair readFromNBT(NBTTagCompound compound, String name){ + public static ConnectionPair readFromNBT(NBTTagCompound compound){ WorldPos[] pos = new WorldPos[2]; for(int i = 0; i < pos.length; i++){ - World aWorld = DimensionManager.getWorld(compound.getInteger("world"+name+i)); - int anX = compound.getInteger("x"+name+i); - int aY = compound.getInteger("y"+name+i); - int aZ = compound.getInteger("z"+name+i); - pos[i] = new WorldPos(aWorld, anX, aY, aZ); + int anX = compound.getInteger("x"+i); + int aY = compound.getInteger("y"+i); + int aZ = compound.getInteger("z"+i); + pos[i] = new WorldPos(compound.getInteger("world"+i), anX, aY, aZ); } return new ConnectionPair(pos[0], pos[1]); } @@ -233,14 +225,26 @@ public class LaserRelayConnectionHandler{ return (this.firstRelay == null ? "-" : this.firstRelay.toString())+" | "+(this.secondRelay == null ? "-" : this.secondRelay.toString()); } - public void writeToNBT(NBTTagCompound compound, String name){ + public NBTTagCompound writeToNBT(){ + NBTTagCompound compound = new NBTTagCompound(); for(int i = 0; i < 2; i++){ WorldPos relay = i == 0 ? this.firstRelay : this.secondRelay; - compound.setInteger("world"+name+i, relay.getWorld().provider.dimensionId); - compound.setInteger("x"+name+i, relay.getX()); - compound.setInteger("y"+name+i, relay.getY()); - compound.setInteger("z"+name+i, relay.getZ()); + compound.setInteger("world"+i, relay.getWorldID()); + compound.setInteger("x"+i, relay.getX()); + compound.setInteger("y"+i, relay.getY()); + compound.setInteger("z"+i, relay.getZ()); } + return compound; } } -} + + public static class Network{ + + public ConcurrentSet connections = new ConcurrentSet(); + + @Override + public String toString(){ + return this.connections.toString(); + } + } +} \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/misc/WorldData.java b/src/main/java/ellpeck/actuallyadditions/misc/WorldData.java index c88dbaa20..81c35550b 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/WorldData.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/WorldData.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc; @@ -13,12 +13,11 @@ package ellpeck.actuallyadditions.misc; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.playerdata.PersistentServerData; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraft.world.WorldSavedData; -import java.util.ArrayList; - public class WorldData extends WorldSavedData{ public static final String DATA_TAG = ModUtil.MOD_ID+"WorldData"; @@ -55,41 +54,35 @@ public class WorldData extends WorldSavedData{ @Override public void readFromNBT(NBTTagCompound compound){ //Laser World Data - int netAmount = compound.getInteger("LaserNetworkAmount"); - LaserRelayConnectionHandler.getInstance().networks.clear(); - for(int i = 0; i < netAmount; i++){ - ArrayList network = LaserRelayConnectionHandler.getInstance().readNetworkFromNBT(compound, "LaserNetwork"+i); - if(network != null){ - LaserRelayConnectionHandler.getInstance().networks.add(network); - } + NBTTagList networkList = compound.getTagList("Networks", 10); + for(int i = 0; i < networkList.tagCount(); i++){ + LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().readNetworkFromNBT(networkList.getCompoundTagAt(i)); + LaserRelayConnectionHandler.getInstance().networks.add(network); } //Player Data - int dataSize = compound.getInteger("PersistentDataSize"); - PersistentServerData.playerSaveData.clear(); - for(int i = 0; i < dataSize; i++){ - PersistentServerData.PlayerSave aSave = PersistentServerData.PlayerSave.fromNBT(compound, "PlayerSaveData"+i); - if(aSave != null){ - PersistentServerData.playerSaveData.add(aSave); - } + NBTTagList playerList = compound.getTagList("PlayerData", 10); + for(int i = 0; i < playerList.tagCount(); i++){ + PersistentServerData.PlayerSave aSave = PersistentServerData.PlayerSave.fromNBT(playerList.getCompoundTagAt(i)); + PersistentServerData.playerSaveData.add(aSave); } } @Override public void writeToNBT(NBTTagCompound compound){ //Laser World Data - int netAmount = LaserRelayConnectionHandler.getInstance().networks.size(); - compound.setInteger("LaserNetworkAmount", netAmount); - - for(int i = 0; i < netAmount; i++){ - LaserRelayConnectionHandler.getInstance().writeNetworkToNBT(LaserRelayConnectionHandler.getInstance().networks.get(i), compound, "LaserNetwork"+i); + NBTTagList networkList = new NBTTagList(); + for(LaserRelayConnectionHandler.Network network : LaserRelayConnectionHandler.getInstance().networks){ + networkList.appendTag(LaserRelayConnectionHandler.getInstance().writeNetworkToNBT(network)); } + compound.setTag("Networks", networkList); //Player Data - compound.setInteger("PersistentDataSize", PersistentServerData.playerSaveData.size()); + NBTTagList playerList = new NBTTagList(); for(int i = 0; i < PersistentServerData.playerSaveData.size(); i++){ PersistentServerData.PlayerSave theSave = PersistentServerData.playerSaveData.get(i); - theSave.toNBT(compound, "PlayerSaveData"+i); + playerList.appendTag(theSave.toNBT()); } + compound.setTag("PlayerData", playerList); } } diff --git a/src/main/java/ellpeck/actuallyadditions/misc/cloud/ISmileyCloudEasterEgg.java b/src/main/java/ellpeck/actuallyadditions/misc/cloud/ISmileyCloudEasterEgg.java index d67538782..bb8e531da 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/cloud/ISmileyCloudEasterEgg.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/cloud/ISmileyCloudEasterEgg.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc.cloud; diff --git a/src/main/java/ellpeck/actuallyadditions/misc/cloud/SmileyCloudEasterEggs.java b/src/main/java/ellpeck/actuallyadditions/misc/cloud/SmileyCloudEasterEggs.java index 93adb8e4b..31adb1b94 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/cloud/SmileyCloudEasterEggs.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/cloud/SmileyCloudEasterEggs.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.misc.cloud; @@ -143,7 +143,7 @@ public class SmileyCloudEasterEggs{ @Override public void renderExtra(float f){ renderHoldingItem(false, new ItemStack(Items.iron_helmet)); - renderHeadBlock(Blocks.cake, 0, 28F); + renderHeadBlock(InitBlocks.blockBlackLotus, 0, 28F); } }); //RotesDing @@ -279,6 +279,7 @@ public class SmileyCloudEasterEggs{ renderHeadBlock(Blocks.gravel, 0, 47F); } }); + //FrauBaerchen register(new ISmileyCloudEasterEgg(){ @Override public String[] getTriggerNames(){ @@ -292,10 +293,11 @@ public class SmileyCloudEasterEggs{ renderHeadBlock(Blocks.coal_block, 0, 60F); } }); + //Diddi register(new ISmileyCloudEasterEgg(){ @Override public String[] getTriggerNames(){ - return new String[]{"0xdd", "didi", "theultimatehose"}; + return new String[]{"0xdd", "didi", "diddi", "theultimatehose"}; } @Override @@ -304,6 +306,7 @@ public class SmileyCloudEasterEggs{ renderHeadBlock(Blocks.redstone_block, 0, 30F); } }); + //MineLoad register(new ISmileyCloudEasterEgg(){ @Override public String[] getTriggerNames(){ @@ -316,6 +319,45 @@ public class SmileyCloudEasterEggs{ renderHeadBlock(Blocks.crafting_table, 0, 35F); } }); + //Kilobyte (When I asked him if he liked the mod, he just looked at the code. Maybe he'll find this eventually.) + register(new ISmileyCloudEasterEgg(){ + @Override + public String[] getTriggerNames(){ + return new String[]{"kilobyte", "kilo", "byte"}; + } + + @Override + public void renderExtra(float f){ + renderHoldingItem(false, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DRILL_CORE.ordinal())); + renderHeadBlock(Blocks.redstone_ore, 0, 80F); + } + }); + //XDjackieXD + register(new ISmileyCloudEasterEgg(){ + @Override + public String[] getTriggerNames(){ + return new String[]{"jackie", "xdjackiexd", "xdjackie", "jackiexd"}; + } + + @Override + public void renderExtra(float f){ + renderHoldingItem(false, new ItemStack(Items.enchanted_book)); + renderHeadBlock(InitBlocks.blockDirectionalBreaker, 0, 40F); + } + }); + //Little Lampi (I still can't get over it) + register(new ISmileyCloudEasterEgg(){ + @Override + public String[] getTriggerNames(){ + return new String[]{"lampi", "littlelampi", "little lampi"}; + } + + @Override + public void renderExtra(float f){ + renderHoldingItem(false, new ItemStack(Items.glowstone_dust)); + renderHeadBlock(InitBlocks.blockColoredLampOn, 4, 40F); + } + }); } private static void register(ISmileyCloudEasterEgg egg){ diff --git a/src/main/java/ellpeck/actuallyadditions/misc/RenderSpecial.java b/src/main/java/ellpeck/actuallyadditions/misc/special/RenderSpecial.java similarity index 63% rename from src/main/java/ellpeck/actuallyadditions/misc/RenderSpecial.java rename to src/main/java/ellpeck/actuallyadditions/misc/special/RenderSpecial.java index e803629a5..5a23913a5 100644 --- a/src/main/java/ellpeck/actuallyadditions/misc/RenderSpecial.java +++ b/src/main/java/ellpeck/actuallyadditions/misc/special/RenderSpecial.java @@ -5,30 +5,25 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ -package ellpeck.actuallyadditions.misc; +package ellpeck.actuallyadditions.misc.special; import ellpeck.actuallyadditions.proxy.ClientProxy; import ellpeck.actuallyadditions.util.AssetUtil; -import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelSquid; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import java.util.Calendar; public class RenderSpecial{ - private static final ResourceLocation squidTextures = new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/specialSquid.png"); private double lastTimeForBobbing; private ItemStack theThingToRender; @@ -36,13 +31,17 @@ public class RenderSpecial{ this.theThingToRender = stack; } - public void render(EntityPlayer player, float size, float offsetUp){ + public void render(EntityPlayer player){ if(player.isInvisible() || player.getHideCape()){ return; } + boolean isBlock = this.theThingToRender.getItem() instanceof ItemBlock; + float size = isBlock ? 0.3F : 0.4F; + float offsetUp = isBlock ? 0F : 0.2F; + if(ClientProxy.pumpkinBlurPumpkinBlur){ - this.theThingToRender = new ItemStack(Calendar.getInstance().get(Calendar.DAY_OF_MONTH) % 2 == 0 ? Blocks.lit_pumpkin : Blocks.pumpkin); + this.theThingToRender = new ItemStack(Calendar.getInstance().get(Calendar.DAY_OF_MONTH)%2 == 0 ? Blocks.lit_pumpkin : Blocks.pumpkin); size = 0.3F; offsetUp = 0; } @@ -71,19 +70,12 @@ public class RenderSpecial{ GL11.glDisable(GL11.GL_LIGHTING); if(this.theThingToRender != null){ - if(this.theThingToRender.getItem() == Items.dye && this.theThingToRender.getItemDamage() == 0){ - Minecraft.getMinecraft().renderEngine.bindTexture(squidTextures); - GL11.glRotatef(180F, 1F, 0F, 0F); - new ModelSquid().render(null, 0F, 0F, 0.25F, 0F, 0F, 0.0625F); + if(isBlock){ + AssetUtil.renderBlock(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage()); } else{ - if(this.theThingToRender.getItem() instanceof ItemBlock){ - AssetUtil.renderBlock(Block.getBlockFromItem(this.theThingToRender.getItem()), this.theThingToRender.getItemDamage()); - } - else{ - GL11.glTranslatef(-0.5F, 0F, 0F); - AssetUtil.renderItem(this.theThingToRender, 0); - } + GL11.glTranslatef(-0.5F, 0F, 0F); + AssetUtil.renderItem(this.theThingToRender, 0); } } GL11.glEnable(GL11.GL_LIGHTING); diff --git a/src/main/java/ellpeck/actuallyadditions/misc/special/SpecialRenderInit.java b/src/main/java/ellpeck/actuallyadditions/misc/special/SpecialRenderInit.java new file mode 100644 index 000000000..ab60e4d60 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/misc/special/SpecialRenderInit.java @@ -0,0 +1,71 @@ +/* + * This file ("Special.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015 Ellpeck + */ + +package ellpeck.actuallyadditions.misc.special; + +import cpw.mods.fml.common.eventhandler.EventPriority; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import ellpeck.actuallyadditions.util.StringUtil; +import ellpeck.actuallyadditions.util.Util; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraftforge.client.event.RenderPlayerEvent; + +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + +public class SpecialRenderInit{ + + public static HashMap specialList = new HashMap(); + + public static void init(){ + new ThreadSpecialFetcher(); + Util.registerEvent(new SpecialRenderInit()); + } + + @SubscribeEvent(priority = EventPriority.HIGHEST) + public void onPlayerRender(RenderPlayerEvent.Specials.Pre event){ + if(!specialList.isEmpty()){ + for(Map.Entry entry : specialList.entrySet()){ + //Does the player have one of the names from the list? + if(StringUtil.equalsToLowerCase(entry.getKey(), event.entityPlayer.getDisplayName())){ + //Render the special Item/Block + entry.getValue().render(event.entityPlayer); + break; + } + } + } + } + + public static void parse(Properties properties){ + for(String key : properties.stringPropertyNames()){ + String value = properties.getProperty(key); + + ItemStack stack = null; + //Get the Item from the String + if(Item.itemRegistry.containsKey(value)){ + stack = new ItemStack((Item)Item.itemRegistry.getObject(value)); + } + else{ + if(Block.blockRegistry.containsKey(value)){ + stack = new ItemStack((Block)Block.blockRegistry.getObject(value)); + } + } + + //Add a new Special Renderer to the list + if(stack != null){ + specialList.put(key, new RenderSpecial(stack)); + } + } + } + +} diff --git a/src/main/java/ellpeck/actuallyadditions/misc/special/ThreadSpecialFetcher.java b/src/main/java/ellpeck/actuallyadditions/misc/special/ThreadSpecialFetcher.java new file mode 100644 index 000000000..0e66a3d92 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/misc/special/ThreadSpecialFetcher.java @@ -0,0 +1,42 @@ +/* + * This file ("ThreadSpecialFetcher.java") is part of the Actually Additions Mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015 Ellpeck + */ + +package ellpeck.actuallyadditions.misc.special; + +import ellpeck.actuallyadditions.util.ModUtil; + +import java.io.InputStreamReader; +import java.net.URL; +import java.util.Properties; + +public class ThreadSpecialFetcher extends Thread{ + + public ThreadSpecialFetcher(){ + this.setName(ModUtil.MOD_ID+" Special Fetcher"); + this.setDaemon(true); + this.start(); + } + + @Override + public void run(){ + ModUtil.LOGGER.info("Fetching Special People Stuff..."); + try{ + URL url = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/specialPeopleStuff.properties"); + Properties specialProperties = new Properties(); + specialProperties.load(new InputStreamReader(url.openStream())); + SpecialRenderInit.parse(specialProperties); + + ModUtil.LOGGER.info("Fetching Special People Stuff done!"); + } + catch(Exception e){ + ModUtil.LOGGER.error("Fetching Special People Stuff failed! (You can ignore this error technically.)", e); + } + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java index 1330c5cff..fe46a335b 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/BookletInfoRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; @@ -14,8 +14,10 @@ import codechicken.lib.gui.GuiDraw; import codechicken.nei.PositionedStack; import codechicken.nei.recipe.RecipeInfo; import codechicken.nei.recipe.TemplateRecipeHandler; +import ellpeck.actuallyadditions.booklet.BookletChapter; import ellpeck.actuallyadditions.booklet.InitBooklet; import ellpeck.actuallyadditions.booklet.page.BookletPage; +import ellpeck.actuallyadditions.booklet.page.PagePicture; import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; @@ -106,11 +108,13 @@ public class BookletInfoRecipeHandler extends TemplateRecipeHandler implements I if(ItemUtil.contains(page.getItemStacksForPage(), stack.theStack, true)){ int maxLines = 6; - String aText = page.getChapter().pages[0].getText(); + BookletChapter chapter = page.getChapter(); + String aText = (chapter.pages[0] instanceof PagePicture && chapter.pages.length > 1 ? chapter.pages[1] : chapter.pages[0]).getText(); List text = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(aText != null ? aText : EnumChatFormatting.DARK_RED+StringUtil.localize("container.nei."+ModUtil.MOD_ID_LOWER+".booklet.noText"), 165); for(int i = 0; i < Math.min(maxLines, text.size()); i++){ GuiDraw.drawString(text.get(i)+(i == maxLines-1 && text.size() > maxLines ? EnumChatFormatting.RESET+""+EnumChatFormatting.BLACK+"..." : ""), 0, 18+25+i*(Minecraft.getMinecraft().fontRenderer.FONT_HEIGHT+1), 0, false); } + break; } } } diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java index f0a5a74bd..e3d11ec77 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/CoffeeMachineRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java index 986205415..b4bc8488a 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/CompostRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java index 97e1fe3f5..85c511f5d 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/CrusherRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java index 7f0d7626e..6838ce0c3 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/FurnaceDoubleRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java index f44ba0981..94ed760c6 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/HairyBallRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java index 0f3444945..2e642ca3f 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/INeiRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java b/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java index ac0c24fd4..a81cd005e 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NEIActuallyAdditionsConfig.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java b/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java index 56ecb0868..734386c48 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/NeiScreenEvents.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java b/src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java index 468e19253..b8e29ecb9 100644 --- a/src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/nei/TreasureChestRecipeHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.nei; diff --git a/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java b/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java index 212089ff1..d61dc3f95 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/network/PacketHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network; diff --git a/src/main/java/ellpeck/actuallyadditions/network/gui/IButtonReactor.java b/src/main/java/ellpeck/actuallyadditions/network/gui/IButtonReactor.java index cc3564fdb..d2d5501ee 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/gui/IButtonReactor.java +++ b/src/main/java/ellpeck/actuallyadditions/network/gui/IButtonReactor.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/network/gui/INumberReactor.java b/src/main/java/ellpeck/actuallyadditions/network/gui/INumberReactor.java index 9cdd89970..a35c2300a 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/gui/INumberReactor.java +++ b/src/main/java/ellpeck/actuallyadditions/network/gui/INumberReactor.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/network/gui/IStringReactor.java b/src/main/java/ellpeck/actuallyadditions/network/gui/IStringReactor.java index ee7a37e88..82019cc4e 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/gui/IStringReactor.java +++ b/src/main/java/ellpeck/actuallyadditions/network/gui/IStringReactor.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiButton.java b/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiButton.java index e2024282e..2cd3d156b 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiButton.java +++ b/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiButton.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiNumber.java b/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiNumber.java index 0541eb89b..e3eef77f7 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiNumber.java +++ b/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiNumber.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiString.java b/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiString.java index 41dd8d5b4..77f471a46 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiString.java +++ b/src/main/java/ellpeck/actuallyadditions/network/gui/PacketGuiString.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.network.gui; diff --git a/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java b/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java index 4cd6ef781..dddcd055e 100644 --- a/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java +++ b/src/main/java/ellpeck/actuallyadditions/ore/InitOreDict.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.ore; @@ -71,6 +71,8 @@ public class InitOreDict{ addOre(InitItems.itemSpecialDrop, TheSpecialDrops.PEARL_SHARD.ordinal(), "nuggetEnderpearl"); addOre(InitItems.itemMisc, TheMiscItems.QUARTZ.ordinal(), "gemQuartzBlack"); + + addOre(InitItems.itemMisc, TheMiscItems.BLACK_DYE.ordinal(), "dyeBlack"); } private static void addOre(ItemStack stack, String name){ diff --git a/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java b/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java index 504b0c4e8..63450a415 100644 --- a/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java +++ b/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.proxy; @@ -22,6 +22,7 @@ import ellpeck.actuallyadditions.blocks.render.*; import ellpeck.actuallyadditions.config.values.ConfigBoolValues; import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.event.InitEvents; +import ellpeck.actuallyadditions.misc.special.SpecialRenderInit; import ellpeck.actuallyadditions.tile.*; import ellpeck.actuallyadditions.util.AssetUtil; import ellpeck.actuallyadditions.util.ModUtil; @@ -99,5 +100,7 @@ public class ClientProxy implements IProxy{ @Override public void postInit(FMLPostInitializationEvent event){ ModUtil.LOGGER.info("PostInitializing ClientProxy..."); + + SpecialRenderInit.init(); } } diff --git a/src/main/java/ellpeck/actuallyadditions/proxy/IProxy.java b/src/main/java/ellpeck/actuallyadditions/proxy/IProxy.java index af8b27ff5..b71f8fda4 100644 --- a/src/main/java/ellpeck/actuallyadditions/proxy/IProxy.java +++ b/src/main/java/ellpeck/actuallyadditions/proxy/IProxy.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.proxy; diff --git a/src/main/java/ellpeck/actuallyadditions/proxy/ServerProxy.java b/src/main/java/ellpeck/actuallyadditions/proxy/ServerProxy.java index 69a0cd35b..5d1b2f181 100644 --- a/src/main/java/ellpeck/actuallyadditions/proxy/ServerProxy.java +++ b/src/main/java/ellpeck/actuallyadditions/proxy/ServerProxy.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.proxy; diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java b/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java index b1851dceb..a881248af 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/CrusherRecipeRegistry.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.recipe; diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/FuelHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/FuelHandler.java index e82daf214..9350f9d8f 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/FuelHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/FuelHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.recipe; diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java index d2cf7604a..ca46805ae 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/HairyBallHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.recipe; diff --git a/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java b/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java index d67b0416e..9d1154882 100644 --- a/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/recipe/TreasureChestHandler.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.recipe; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/IPhantomTile.java b/src/main/java/ellpeck/actuallyadditions/tile/IPhantomTile.java index fc9ba5fca..ddea8f73a 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/IPhantomTile.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/IPhantomTile.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java index babc3bd7c..44e6ca79c 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBase.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; @@ -57,7 +57,6 @@ public abstract class TileEntityBase extends TileEntity{ GameRegistry.registerTileEntity(TileEntityEnergizer.class, ModUtil.MOD_ID_LOWER+":tileEntityEnergizer"); GameRegistry.registerTileEntity(TileEntityEnervator.class, ModUtil.MOD_ID_LOWER+":tileEntityEnervator"); GameRegistry.registerTileEntity(TileEntityXPSolidifier.class, ModUtil.MOD_ID_LOWER+":tileEntityXPSolidifier"); - GameRegistry.registerTileEntity(TileEntityOreMagnet.class, ModUtil.MOD_ID_LOWER+":tileEntityOreMagnet"); GameRegistry.registerTileEntity(TileEntitySmileyCloud.class, ModUtil.MOD_ID_LOWER+":tileEntityCloud"); GameRegistry.registerTileEntity(TileEntityLeafGenerator.class, ModUtil.MOD_ID_LOWER+":tileEntityLeafGenerator"); GameRegistry.registerTileEntity(TileEntityDirectionalBreaker.class, ModUtil.MOD_ID_LOWER+":tileEntityDirectionalBreaker"); diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java index bd82fe3eb..84b737e1d 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java index a8df33e1f..0220e93eb 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCanolaPress.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoalGenerator.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoalGenerator.java index 08a11570f..427d7a24a 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoalGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoalGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java index 47ded202a..2c841c57c 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCoffeeMachine.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java index e39141293..b6343d967 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDirectionalBreaker.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDirectionalBreaker.java index 0b912a9ef..157588820 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDirectionalBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDirectionalBreaker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDropper.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDropper.java index 9d6322a37..3d0bc293c 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDropper.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityDropper.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java index 142ab7657..4f1fd3923 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnergizer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnervator.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnervator.java index 2905b2a97..23cd597fd 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnervator.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityEnervator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java index 57bd9406f..ad9a015b7 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java index 4a6580442..c4838ee5f 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFermentingBarrel.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java index 62c76d26f..304d89adf 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java index 4e5517a78..a3f8c3678 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFluidCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java index 445cd1687..16890f67b 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; @@ -74,7 +74,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements this.secondSmeltTime = 0; } - if(this.storage.getEnergyStored() >= ConfigIntValues.FURNACE_ENERGY_USED.getValue() && this.firstSmeltTime > 0 || this.secondSmeltTime > 0){ + if(this.storage.getEnergyStored() >= ConfigIntValues.FURNACE_ENERGY_USED.getValue() && (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){ this.storage.extractEnergy(ConfigIntValues.FURNACE_ENERGY_USED.getValue(), false); } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java index 5ddb0c4e2..c0d65883e 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java index 45ffd3adc..6a95d4e33 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGiantChest.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java index b314bd10f..d2b16df00 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java index e9ee62030..f2b0599ac 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; @@ -109,7 +109,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg } } - if(this.storage.getEnergyStored() >= getEnergyUse() && this.firstCrushTime > 0 || this.secondCrushTime > 0){ + if(this.storage.getEnergyStored() >= getEnergyUse() && (this.firstCrushTime > 0 || this.secondCrushTime > 0)){ this.storage.extractEnergy(getEnergyUse(), false); } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java index ef04e01b0..bf797b11e 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; @@ -52,9 +52,10 @@ public class TileEntityHeatCollector extends TileEntityBase implements IEnergyPr WorldUtil.breakBlockAtSide(WorldUtil.getDirectionBySidesInOrder(randomSide), worldObj, xCoord, yCoord, zCoord); } } - if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ - WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, this.storage); - } + } + + if(this.getEnergyStored(ForgeDirection.UNKNOWN) > 0){ + WorldUtil.pushEnergy(worldObj, xCoord, yCoord, zCoord, ForgeDirection.UP, this.storage); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java index ca9179606..55ad9230f 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInputter.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; @@ -400,19 +400,6 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt this.markDirty(); } - @Override - public void readSyncableNBT(NBTTagCompound compound, boolean sync){ - this.sideToPut = compound.getInteger("SideToPut"); - this.slotToPutStart = compound.getInteger("SlotToPut"); - this.slotToPutEnd = compound.getInteger("SlotToPutEnd"); - this.sideToPull = compound.getInteger("SideToPull"); - this.slotToPullStart = compound.getInteger("SlotToPull"); - this.slotToPullEnd = compound.getInteger("SlotToPullEnd"); - this.isPullWhitelist = compound.getBoolean("PullWhitelist"); - this.isPutWhitelist = compound.getBoolean("PutWhitelist"); - super.readSyncableNBT(compound, sync); - } - @Override public void writeSyncableNBT(NBTTagCompound compound, boolean sync){ super.writeSyncableNBT(compound, sync); @@ -426,6 +413,19 @@ public class TileEntityInputter extends TileEntityInventoryBase implements IButt compound.setBoolean("PutWhitelist", this.isPutWhitelist); } + @Override + public void readSyncableNBT(NBTTagCompound compound, boolean sync){ + this.sideToPut = compound.getInteger("SideToPut"); + this.slotToPutStart = compound.getInteger("SlotToPut"); + this.slotToPutEnd = compound.getInteger("SlotToPutEnd"); + this.sideToPull = compound.getInteger("SideToPull"); + this.slotToPullStart = compound.getInteger("SlotToPull"); + this.slotToPullEnd = compound.getInteger("SlotToPullEnd"); + this.isPullWhitelist = compound.getBoolean("PullWhitelist"); + this.isPutWhitelist = compound.getBoolean("PutWhitelist"); + super.readSyncableNBT(compound, sync); + } + @Override public boolean isItemValidForSlot(int i, ItemStack stack){ return i == 0; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInventoryBase.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInventoryBase.java index 71aaaec0a..29d8b4771 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInventoryBase.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityInventoryBase.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java index f4177dff0..afd095ffb 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLaserRelay.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLaserRelay.java index ff0910afe..5c32d1eb5 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLaserRelay.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLaserRelay.java @@ -5,39 +5,66 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; import cofh.api.energy.IEnergyReceiver; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.misc.LaserRelayConnectionHandler; import ellpeck.actuallyadditions.util.WorldPos; +import ellpeck.actuallyadditions.util.WorldUtil; +import io.netty.util.internal.ConcurrentSet; import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityReddustFX; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; import net.minecraft.network.Packet; import net.minecraft.network.play.server.S35PacketUpdateTileEntity; import net.minecraftforge.common.util.ForgeDirection; -import org.lwjgl.opengl.GL11; - -import java.util.ArrayList; public class TileEntityLaserRelay extends TileEntityBase implements IEnergyReceiver{ - private GLColor laserColor = GLColor.RED_PURE; - @Override - public void invalidate(){ - super.invalidate(); - if(!worldObj.isRemote){ - LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord)); + public void updateEntity(){ + if(this.worldObj.isRemote){ + this.renderParticles(); } } @Override - public boolean canUpdate(){ - return false; + public void invalidate(){ + super.invalidate(); + LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord)); + } + + @SideOnly(Side.CLIENT) + public void renderParticles(){ + if(this.worldObj.rand.nextInt(2) == 0){ + WorldPos thisPos = new WorldPos(this.getWorldObj(), this.xCoord, this.yCoord, this.zCoord); + LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(thisPos); + if(network != null){ + for(LaserRelayConnectionHandler.ConnectionPair aPair : network.connections){ + if(aPair.contains(thisPos) && thisPos.isEqual(aPair.firstRelay)){ + if(Minecraft.getMinecraft().thePlayer.getDistance(aPair.firstRelay.getX(), aPair.firstRelay.getY(), aPair.firstRelay.getZ()) <= 64){ + int difX = aPair.firstRelay.getX()-aPair.secondRelay.getX(); + int difY = aPair.firstRelay.getY()-aPair.secondRelay.getY(); + int difZ = aPair.firstRelay.getZ()-aPair.secondRelay.getZ(); + + double distance = aPair.firstRelay.toVec().distanceTo(aPair.secondRelay.toVec()); + for(double i = 0; i <= 1; i += 1/(distance*(ConfigBoolValues.LESS_LASER_RELAY_PARTICLES.isEnabled() ? 1 : 5))){ + Minecraft.getMinecraft().effectRenderer.addEffect(new EntityReddustFX(this.worldObj, (difX*i)+aPair.secondRelay.getX()+0.5, (difY*i)+aPair.secondRelay.getY()+0.5, (difZ*i)+aPair.secondRelay.getZ()+0.5, 0.75F, 0, 0, 0)); + } + } + } + } + } + } } @Override @@ -45,13 +72,14 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei NBTTagCompound compound = new NBTTagCompound(); WorldPos thisPos = new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord); - ArrayList connections = LaserRelayConnectionHandler.getInstance().getConnectionsFor(thisPos); + ConcurrentSet connections = LaserRelayConnectionHandler.getInstance().getConnectionsFor(thisPos); if(connections != null){ - compound.setInteger("ConnectionAmount", connections.size()); - for(int i = 0; i < connections.size(); i++){ - connections.get(i).writeToNBT(compound, "Connection"+i); + NBTTagList list = new NBTTagList(); + for(LaserRelayConnectionHandler.ConnectionPair pair : connections){ + list.appendTag(pair.writeToNBT()); } + compound.setTag("Connections", list); return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 3, compound); } return null; @@ -59,20 +87,24 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei @Override public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt){ - NBTTagCompound compound = pkt.func_148857_g(); + if(pkt != null){ + NBTTagCompound compound = pkt.func_148857_g(); - LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord)); + if(compound != null){ + LaserRelayConnectionHandler.getInstance().removeRelayFromNetwork(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord)); - int amount = compound.getInteger("ConnectionAmount"); - for(int i = 0; i < amount; i++){ - LaserRelayConnectionHandler.ConnectionPair pair = LaserRelayConnectionHandler.ConnectionPair.readFromNBT(compound, "Connection"+i); - LaserRelayConnectionHandler.getInstance().addConnection(pair.firstRelay, pair.secondRelay); + NBTTagList list = compound.getTagList("Connections", 10); + for(int i = 0; i < list.tagCount(); i++){ + LaserRelayConnectionHandler.ConnectionPair pair = LaserRelayConnectionHandler.ConnectionPair.readFromNBT(list.getCompoundTagAt(i)); + LaserRelayConnectionHandler.getInstance().addConnection(pair.firstRelay, pair.secondRelay); + } + } } } @Override public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ - return this.transmitEnergy(maxReceive, simulate); + return this.transmitEnergy(WorldUtil.getCoordsFromSide(from, worldObj, xCoord, yCoord, zCoord, 0), maxReceive, simulate); } @Override @@ -85,12 +117,12 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei return 0; } - public int transmitEnergy(int maxTransmit, boolean simulate){ + public int transmitEnergy(WorldPos blockFrom, int maxTransmit, boolean simulate){ int transmitted = 0; if(maxTransmit > 0){ - ArrayList network = LaserRelayConnectionHandler.getInstance().getNetworkFor(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord)); + LaserRelayConnectionHandler.Network network = LaserRelayConnectionHandler.getInstance().getNetworkFor(new WorldPos(this.worldObj, this.xCoord, this.yCoord, this.zCoord)); if(network != null){ - transmitted = LaserRelayConnectionHandler.getInstance().transferEnergyToReceiverInNeed(network, maxTransmit, simulate); + transmitted = LaserRelayConnectionHandler.getInstance().transferEnergyToReceiverInNeed(blockFrom, network, Math.min(ConfigIntValues.LASER_RELAY_MAX_TRANSFER.getValue(), maxTransmit), simulate); } } return transmitted; @@ -100,60 +132,4 @@ public class TileEntityLaserRelay extends TileEntityBase implements IEnergyRecei public boolean canConnectEnergy(ForgeDirection from){ return true; } - - public void drawLine(WorldPos firstPos, WorldPos secondPos){ - double x = firstPos.getX() - secondPos.getX(); - double y = firstPos.getY() - secondPos.getY() + 1; - double z = -(firstPos.getZ() - secondPos.getZ()); - double relativePlayerBlockLocation = Minecraft.getMinecraft().thePlayer.posY - firstPos.getY(); - float f; - if(relativePlayerBlockLocation < 10) f=5; - else if(relativePlayerBlockLocation < 20 && relativePlayerBlockLocation > 10) f = 4; - else if(relativePlayerBlockLocation < 30 && relativePlayerBlockLocation > 20) f = 3; - else if(relativePlayerBlockLocation < 40 && relativePlayerBlockLocation > 30) f = 2; - else if(relativePlayerBlockLocation < 50 && relativePlayerBlockLocation > 40) f = 1; - else f=1; - GL11.glPushMatrix(); - GL11.glLineWidth(f); - GL11.glBegin(GL11.GL_LINE_STRIP); - { - GL11.glColor3f(this.laserColor.getRed(), this.laserColor.getGreen(), this.laserColor.getBlue()); - GL11.glVertex3d(x, y, z); - GL11.glVertex3d(0, 1, 0); - } - GL11.glEnd(); - GL11.glLineWidth(1); - GL11.glPopMatrix(); - } - - public void changeLineColor(GLColor color){this.laserColor = color;} - - - //Colors for the Laser: - public enum GLColor{ - - RED_PURE(1.0F, 0, 0), - GREEN_PURE(0, 1.0F, 0), - BLUE_PURE(0, 0, 1.0F), - DARK_YELLOW(1, 1, 0); - - private float red, green, blue; - GLColor(float red, float green, float blue){ - this.red = red; - this.green = green; - this.blue = blue; - } - - public float getRed() { - return red; - } - - public float getGreen() { - return green; - } - - public float getBlue() { - return blue; - } - } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLavaFactoryController.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLavaFactoryController.java index 874e2a725..35b14a33a 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLavaFactoryController.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLeafGenerator.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLeafGenerator.java index 2f0af50c4..9028e5fe9 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLeafGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityLeafGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOilGenerator.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOilGenerator.java index 87903ad54..2743d10b1 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOilGenerator.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOilGenerator.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOreMagnet.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOreMagnet.java deleted file mode 100644 index 8138937f8..000000000 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityOreMagnet.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * This file ("TileEntityOreMagnet.java") is part of the Actually Additions Mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015 Ellpeck - */ - -package ellpeck.actuallyadditions.tile; - -import cofh.api.energy.EnergyStorage; -import cofh.api.energy.IEnergyReceiver; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.blocks.InitBlocks; -import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks; -import ellpeck.actuallyadditions.config.ConfigValues; -import ellpeck.actuallyadditions.config.values.ConfigIntValues; -import ellpeck.actuallyadditions.util.WorldPos; -import ellpeck.actuallyadditions.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.MathHelper; -import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.*; -import net.minecraftforge.oredict.OreDictionary; - -import java.util.ArrayList; - -public class TileEntityOreMagnet extends TileEntityInventoryBase implements IEnergyReceiver, IFluidHandler{ - - public static final int SLOT_OIL_INPUT = 0; - public static final int SLOT_OIL_OUTPUT = 1; - @SuppressWarnings("unused") - public static final int SLOT_UPGRADE = 2; - - public EnergyStorage storage = new EnergyStorage(2000000); - public FluidTank tank = new FluidTank(16*FluidContainerRegistry.BUCKET_VOLUME); - private int lastEnergy; - private int lastTankAmount; - - private int currentWorkTimer; - - public TileEntityOreMagnet(){ - super(3, "oreMagnet"); - } - - @Override - @SuppressWarnings("unchecked") - public void updateEntity(){ - if(!worldObj.isRemote){ - - if(this.storage.getEnergyStored() >= ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue() && this.tank.getFluid() != null && this.tank.getFluid().getFluid() == InitBlocks.fluidOil && this.tank.getFluidAmount() >= ConfigIntValues.ORE_MAGNET_OIL_USE.getValue() && !worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ - if(this.currentWorkTimer > 0){ - currentWorkTimer--; - - if(currentWorkTimer <= 0){ - this.mine(); - } - } - else{ - this.currentWorkTimer = ConfigIntValues.ORE_MAGNET_MAX_TIMER.getValue()+MathHelper.getRandomIntegerInRange(worldObj.rand, 0, ConfigIntValues.ORE_MAGNET_MAX_TIMER.getValue()); - } - - //Extract energy - this.storage.extractEnergy(ConfigIntValues.ORE_MAGNET_ENERGY_USE.getValue(), false); - } - - //Update Clients - if(this.lastEnergy != this.storage.getEnergyStored() || this.lastTankAmount != this.tank.getFluidAmount()){ - this.lastEnergy = this.storage.getEnergyStored(); - this.lastTankAmount = this.tank.getFluidAmount(); - this.sendUpdate(); - } - - //Empty Oil Bucket - WorldUtil.emptyBucket(this.tank, this.slots, SLOT_OIL_INPUT, SLOT_OIL_OUTPUT, InitBlocks.fluidOil); - } - } - - private void mine(){ - //The possible positions where ores can be mined up in RELATIVE COORDINATES!! - ArrayList possiblePlacingPositions = new ArrayList(); - - for(int x = -ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; x <= ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; x++){ - for(int z = -ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; z <= ConfigIntValues.ORE_MAGNET_RANGE.getValue()/2; z++){ - //Check if there is a casing below the Block to mine - if(WorldUtil.hasBlocksInPlacesGiven(new int[][]{{x, -1, z}}, InitBlocks.blockMisc, TheMiscBlocks.LAVA_FACTORY_CASE.ordinal(), worldObj, xCoord, yCoord, zCoord)){ - //Can the block at the top be replaced? - for(int toPlaceY = 0; toPlaceY < 5; toPlaceY++){ - Block block = worldObj.getBlock(xCoord+x, yCoord+toPlaceY, zCoord+z); - //Check if the Block is okay to be replaced - if(block.isAir(worldObj, xCoord+x, yCoord+toPlaceY, zCoord+z) || block.isReplaceable(worldObj, xCoord+x, yCoord+toPlaceY, zCoord+z)){ - //Add it to the possible positions - possiblePlacingPositions.add(new WorldPos(worldObj, x, toPlaceY, z)); - //Only add the lowest Block, you don't want to make random floating towers, duh! - break; - } - } - } - } - } - - if(!possiblePlacingPositions.isEmpty()){ - //Get a random placing Position - WorldPos randomPlacingPos = possiblePlacingPositions.get(worldObj.rand.nextInt(possiblePlacingPositions.size())); - int x = randomPlacingPos.getX(); - int z = randomPlacingPos.getZ(); - int toPlaceY = randomPlacingPos.getY(); - //Find the first available block - for(int y = this.yCoord-2; y > 0; y--){ - Block block = worldObj.getBlock(xCoord+x, y, zCoord+z); - int meta = worldObj.getBlockMetadata(xCoord+x, y, zCoord+z); - if(block != null && !block.isAir(worldObj, xCoord+x, y, zCoord+z) && !block.hasTileEntity(meta) && block.getBlockHardness(worldObj, xCoord+x, y, zCoord+z) >= 0.0F && ((block.getMaterial() != null && block.getMaterial().isToolNotRequired()) || (block.getHarvestTool(meta) == null || (block.getHarvestTool(meta).equals("pickaxe") && block.getHarvestLevel(meta) <= 3)))){ - //Check Whitelist - if(this.hasExtraWhitelist(block)){ - this.removeBlock(x, y, z, block, meta, toPlaceY); - return; - } - //Check Ores - int[] oreIDs = OreDictionary.getOreIDs(new ItemStack(block, 1, meta)); - for(int ID : oreIDs){ - String oreName = OreDictionary.getOreName(ID); - //Is the block an ore according to the OreDictionary? - if(oreName.substring(0, 3).equals("ore") && !this.hasException(oreName)){ - this.removeBlock(x, y, z, block, meta, toPlaceY); - return; - } - } - } - } - } - } - - private boolean hasExtraWhitelist(Block block){ - String name = Block.blockRegistry.getNameForObject(block); - if(name != null){ - for(String list : ConfigValues.oreMagnetExtraWhitelist){ - if(list.equals(name)){ - return true; - } - } - } - return false; - } - - private void removeBlock(int x, int y, int z, Block block, int meta, int toPlaceY){ - //Remove the Block - worldObj.setBlockToAir(xCoord+x, y, zCoord+z); - worldObj.playAuxSFX(2001, xCoord+x, y, zCoord+z, Block.getIdFromBlock(block)+(meta << 12)); - - //Set the Block at the Top again - worldObj.setBlock(xCoord+x, yCoord+toPlaceY, zCoord+z, block, meta, 2); - worldObj.playSoundEffect((double)xCoord+x+0.5D, (double)yCoord+toPlaceY+0.5D, (double)zCoord+z+0.5D, block.stepSound.func_150496_b(), (block.stepSound.getVolume()+1.0F)/2.0F, block.stepSound.getPitch()*0.8F); - - //Extract oil - this.tank.drain(ConfigIntValues.ORE_MAGNET_OIL_USE.getValue(), true); - } - - private boolean hasException(String name){ - for(String except : ConfigValues.oreMagnetExceptions){ - if(except.equals(name)){ - return true; - } - } - return false; - } - - @SideOnly(Side.CLIENT) - public int getEnergyScaled(int i){ - return this.storage.getEnergyStored()*i/this.storage.getMaxEnergyStored(); - } - - @SideOnly(Side.CLIENT) - public int getTankScaled(int i){ - return this.tank.getFluidAmount()*i/this.tank.getCapacity(); - } - - @Override - public void writeSyncableNBT(NBTTagCompound compound, boolean sync){ - this.storage.writeToNBT(compound); - this.tank.writeToNBT(compound); - compound.setInteger("CurrentWorkTimer", this.currentWorkTimer); - super.writeSyncableNBT(compound, sync); - } - - @Override - public void readSyncableNBT(NBTTagCompound compound, boolean sync){ - this.storage.readFromNBT(compound); - this.tank.readFromNBT(compound); - this.currentWorkTimer = compound.getInteger("CurrentWorkTimer"); - super.readSyncableNBT(compound, sync); - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack stack){ - return FluidContainerRegistry.containsFluid(stack, new FluidStack(InitBlocks.fluidOil, 1)) && i == SLOT_OIL_INPUT; - } - - @Override - public boolean canInsertItem(int slot, ItemStack stack, int side){ - return this.isItemValidForSlot(slot, stack); - } - - @Override - public boolean canExtractItem(int slot, ItemStack stack, int side){ - return slot == SLOT_OIL_OUTPUT; - } - - @Override - public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate){ - return this.storage.receiveEnergy(maxReceive, simulate); - } - - @Override - public int getEnergyStored(ForgeDirection from){ - return this.storage.getEnergyStored(); - } - - @Override - public int getMaxEnergyStored(ForgeDirection from){ - return this.storage.getMaxEnergyStored(); - } - - @Override - public boolean canConnectEnergy(ForgeDirection from){ - return true; - } - - @Override - public int fill(ForgeDirection from, FluidStack resource, boolean doFill){ - if(this.canFill(from, resource.getFluid())){ - return this.tank.fill(resource, doFill); - } - return 0; - } - - @Override - public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain){ - return null; - } - - @Override - public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain){ - return null; - } - - @Override - public boolean canFill(ForgeDirection from, Fluid fluid){ - return from != ForgeDirection.DOWN && fluid == InitBlocks.fluidOil; - } - - @Override - public boolean canDrain(ForgeDirection from, Fluid fluid){ - return false; - } - - @Override - public FluidTankInfo[] getTankInfo(ForgeDirection from){ - return new FluidTankInfo[]{this.tank.getInfo()}; - } -} diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomBooster.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomBooster.java index 04e6d7828..a2ce28086 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomBooster.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomBooster.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomEnergyface.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomEnergyface.java index d64e71c05..2d50071fe 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomEnergyface.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomItemface.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomItemface.java index 7045d08f9..1a2cbdab0 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomItemface.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomItemface.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomLiquiface.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomLiquiface.java index 9ad50d3c7..bb417bdda 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomLiquiface.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomLiquiface.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java index 2997a3fe4..0c484d001 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomPlacer.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomface.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomface.java index 787f1ffef..cb8919913 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomface.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityPhantomface.java @@ -5,11 +5,13 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.blocks.BlockPhantom; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.config.values.ConfigIntValues; @@ -19,7 +21,6 @@ import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; public class TileEntityPhantomface extends TileEntityInventoryBase implements IPhantomTile{ @@ -53,6 +54,11 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP WorldUtil.updateTileAndTilesAround(this); } } + else{ + if(this.boundPosition != null){ + this.renderParticles(); + } + } } public static int upgradeRange(int defaultRange, World world, int x, int y, int z){ @@ -81,6 +87,21 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP return false; } + @SideOnly(Side.CLIENT) + public void renderParticles(){ + if(this.worldObj.rand.nextInt(2) == 0){ + double d1 = (double)((float)this.boundPosition.getY()+worldObj.rand.nextFloat()); + int i1 = worldObj.rand.nextInt(2)*2-1; + int j1 = worldObj.rand.nextInt(2)*2-1; + double d4 = ((double)worldObj.rand.nextFloat()-0.5D)*0.125D; + double d2 = (double)this.boundPosition.getZ()+0.5D+0.25D*(double)j1; + double d5 = (double)(worldObj.rand.nextFloat()*1.0F*(float)j1); + double d0 = (double)this.boundPosition.getX()+0.5D+0.25D*(double)i1; + double d3 = (double)(worldObj.rand.nextFloat()*1.0F*(float)i1); + worldObj.spawnParticle("portal", d0, d1, d2, d3, d4, d5); + } + } + @Override public boolean isBoundThingInRange(){ if(this.hasBoundPosition()){ @@ -122,7 +143,7 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP @Override public void writeSyncableNBT(NBTTagCompound compound, boolean sync){ super.writeSyncableNBT(compound, sync); - if(this.hasBoundPosition()){ + if(this.boundPosition != null){ compound.setInteger("XCoordOfTileStored", boundPosition.getX()); compound.setInteger("YCoordOfTileStored", boundPosition.getY()); compound.setInteger("ZCoordOfTileStored", boundPosition.getZ()); @@ -136,8 +157,8 @@ public class TileEntityPhantomface extends TileEntityInventoryBase implements IP int x = compound.getInteger("XCoordOfTileStored"); int y = compound.getInteger("YCoordOfTileStored"); int z = compound.getInteger("ZCoordOfTileStored"); - World world = DimensionManager.getWorld(compound.getInteger("WorldOfTileStored")); - if(x != 0 && y != 0 && z != 0 && world != null){ + int world = compound.getInteger("WorldOfTileStored"); + if(!(x == 0 && y == 0 && z == 0)){ this.boundPosition = new WorldPos(world, x, y, z); this.markDirty(); } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityRangedCollector.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityRangedCollector.java index 0f6eb5f4d..b1616dd24 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityRangedCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityRangedCollector.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntitySmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntitySmileyCloud.java index 051600dcf..e37a05da7 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntitySmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntitySmileyCloud.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java index bc7ac4678..9ebd62288 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityXPSolidifier.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.tile; diff --git a/src/main/java/ellpeck/actuallyadditions/update/ThreadUpdateChecker.java b/src/main/java/ellpeck/actuallyadditions/update/ThreadUpdateChecker.java index 62fdbeb96..e2b1cf579 100644 --- a/src/main/java/ellpeck/actuallyadditions/update/ThreadUpdateChecker.java +++ b/src/main/java/ellpeck/actuallyadditions/update/ThreadUpdateChecker.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.update; @@ -28,20 +28,18 @@ public class ThreadUpdateChecker extends Thread{ public void run(){ ModUtil.LOGGER.info("Starting Update Check..."); try{ - URL newestURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/newestVersion.txt"); + URL newestURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/updateVersion.txt"); BufferedReader newestReader = new BufferedReader(new InputStreamReader(newestURL.openStream())); - UpdateChecker.updateVersionS = newestReader.readLine(); + UpdateChecker.updateVersion = newestReader.readLine(); newestReader.close(); - URL changeURL = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/update/changelog.txt"); - BufferedReader changeReader = new BufferedReader(new InputStreamReader(changeURL.openStream())); - UpdateChecker.changelog = changeReader.readLine(); - changeReader.close(); + int updateVersion = Integer.parseInt(UpdateChecker.updateVersion.replace("-", "").replace(".", "").replace("r", "")); + int clientVersion = Integer.parseInt(ModUtil.VERSION.replace("-", "").replace(".", "").replace("r", "")); + if(updateVersion > clientVersion){ + UpdateChecker.needsUpdateNotify = true; + } ModUtil.LOGGER.info("Update Check done!"); - - UpdateChecker.updateVersion = Integer.parseInt(UpdateChecker.updateVersionS.replace("-", "").replace(".", "")); - UpdateChecker.clientVersion = Integer.parseInt(ModUtil.VERSION.replace("-", "").replace(".", "")); } catch(Exception e){ ModUtil.LOGGER.error("Update Check failed!", e); @@ -49,18 +47,15 @@ public class ThreadUpdateChecker extends Thread{ } if(!UpdateChecker.checkFailed){ - if(UpdateChecker.updateVersion > UpdateChecker.clientVersion){ - ModUtil.LOGGER.info("There is an Update for "+ModUtil.MOD_ID+" available!"); - ModUtil.LOGGER.info("The installed Version is "+ModUtil.VERSION+", but the newest Version is "+UpdateChecker.updateVersionS+"!"); - ModUtil.LOGGER.info("The Changes are: "+UpdateChecker.changelog); - ModUtil.LOGGER.info("Download the newest Version at "+UpdateChecker.DOWNLOAD_LINK); + if(UpdateChecker.needsUpdateNotify){ + ModUtil.LOGGER.info("There is an Update for "+ModUtil.NAME+" available!"); + ModUtil.LOGGER.info("Current Version: "+ModUtil.VERSION+", newest Version: "+UpdateChecker.updateVersion+"!"); + ModUtil.LOGGER.info("View the Changelog at "+UpdateChecker.CHANGELOG_LINK); + ModUtil.LOGGER.info("Download at "+UpdateChecker.DOWNLOAD_LINK); } else{ - ModUtil.LOGGER.info("There is no new Update for "+ModUtil.MOD_ID+" available!"); - ModUtil.LOGGER.info("That's cool. You're really up to date, you have all of the latest awesome Features!"); + ModUtil.LOGGER.info(ModUtil.NAME+" is up to date!"); } } - - UpdateChecker.doneChecking = true; } } \ No newline at end of file diff --git a/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java b/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java index 7682d495f..c0cd87553 100644 --- a/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java +++ b/src/main/java/ellpeck/actuallyadditions/update/UpdateChecker.java @@ -5,29 +5,25 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.update; import ellpeck.actuallyadditions.config.values.ConfigBoolValues; import ellpeck.actuallyadditions.util.ModUtil; -import ellpeck.actuallyadditions.util.Util; public class UpdateChecker{ public static final String DOWNLOAD_LINK = "http://minecraft.curseforge.com/mc-mods/228404-actually-additions/files"; - public static boolean doneChecking = false; - public static boolean checkFailed = false; - public static String updateVersionS; - public static int updateVersion; - public static int clientVersion; - public static String changelog; + public static final String CHANGELOG_LINK = "https://github.com/Ellpeck/ActuallyAdditions/blob/master/update/changelog.md"; + public static boolean checkFailed; + public static boolean needsUpdateNotify; + public static String updateVersion; - public void init(){ + public static void init(){ if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){ ModUtil.LOGGER.info("Initializing Update Checker..."); - Util.registerEvent(this); new ThreadUpdateChecker(); } } diff --git a/src/main/java/ellpeck/actuallyadditions/update/UpdateCheckerClientNotifier.java b/src/main/java/ellpeck/actuallyadditions/update/UpdateCheckerClientNotifier.java index a46a5cff8..52712dbb5 100644 --- a/src/main/java/ellpeck/actuallyadditions/update/UpdateCheckerClientNotifier.java +++ b/src/main/java/ellpeck/actuallyadditions/update/UpdateCheckerClientNotifier.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.update; @@ -16,7 +16,6 @@ import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; public class UpdateCheckerClientNotifier{ @@ -26,24 +25,15 @@ public class UpdateCheckerClientNotifier{ @SubscribeEvent(receiveCanceled = true) public void onTick(TickEvent.ClientTickEvent event){ //Don't notify directly to prevent the Message getting lost in Spam on World Joining - if(Minecraft.getSystemTime()%300 == 0 && !notified && UpdateChecker.doneChecking && Minecraft.getMinecraft().thePlayer != null){ + if(Minecraft.getSystemTime()%300 == 0 && !notified && Minecraft.getMinecraft().thePlayer != null){ EntityPlayer player = Minecraft.getMinecraft().thePlayer; if(UpdateChecker.checkFailed){ - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed.desc"))); + player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.failed"))); } - else{ - if(UpdateChecker.updateVersion > UpdateChecker.clientVersion){ - String notice1 = "info."+ModUtil.MOD_ID_LOWER+".update.generic.desc"; - String notice2 = "info."+ModUtil.MOD_ID_LOWER+".update.versionComp.desc"; - String notice3 = "info."+ModUtil.MOD_ID_LOWER+".update.changelog.desc"; - String notice4 = "info."+ModUtil.MOD_ID_LOWER+".update.download.desc"; - player.addChatComponentMessage(new ChatComponentText("")); - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize(notice1))); - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted(notice2, ModUtil.VERSION, UpdateChecker.updateVersionS))); - player.addChatComponentMessage(new ChatComponentText(StringUtil.localizeFormatted(notice3, UpdateChecker.changelog))); - player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted(notice4, UpdateChecker.DOWNLOAD_LINK))); - player.addChatComponentMessage(new ChatComponentText("")); - } + else if(UpdateChecker.needsUpdateNotify){ + player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".update.generic"))); + player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.versionCompare", ModUtil.VERSION, UpdateChecker.updateVersion))); + player.addChatComponentMessage(IChatComponent.Serializer.func_150699_a(StringUtil.localizeFormatted("info."+ModUtil.MOD_ID_LOWER+".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK))); } notified = true; } diff --git a/src/main/java/ellpeck/actuallyadditions/util/AssetUtil.java b/src/main/java/ellpeck/actuallyadditions/util/AssetUtil.java index b8446daf9..61775f029 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/AssetUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/AssetUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; @@ -40,6 +40,10 @@ public class AssetUtil{ return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/"+file+".png"); } + public static ResourceLocation getBookletGuiLocation(String file){ + return new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/gui/booklet/"+file+".png"); + } + public static void displayNameString(FontRenderer font, int xSize, int yPositionOfMachineText, String machineName){ String localMachineName = StringUtil.localize(machineName+".name"); font.drawString(localMachineName, xSize/2-font.getStringWidth(localMachineName)/2, yPositionOfMachineText, StringUtil.DECIMAL_COLOR_WHITE); diff --git a/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java b/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java index f21d02579..f91101dac 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/BlockUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; @@ -18,12 +18,12 @@ import net.minecraft.item.ItemBlock; public class BlockUtil{ - public static void register(Block block, Class itemBlock){ - register(block, itemBlock, true); + public static void register(Block block){ + register(block, ItemBlockBase.class); } - public static void register(Block block, Class itemBlock, boolean addTab){ - block.setCreativeTab(addTab ? CreativeTab.instance : null); + public static void register(Block block, Class itemBlock){ + block.setCreativeTab(CreativeTab.instance); block.setBlockName(createUnlocalizedName(block)); GameRegistry.registerBlock(block, itemBlock, ((IActAddItemOrBlock)block).getName()); } @@ -31,12 +31,4 @@ public class BlockUtil{ public static String createUnlocalizedName(Block block){ return ModUtil.MOD_ID_LOWER+"."+((IActAddItemOrBlock)block).getName(); } - - public static void register(Block block){ - register(block, ItemBlockBase.class, true); - } - - public static void register(Block block, boolean addTab){ - register(block, ItemBlockBase.class, addTab); - } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/CompatUtil.java b/src/main/java/ellpeck/actuallyadditions/util/CompatUtil.java index 56c905d05..2f1fc1d8a 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/CompatUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/CompatUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; diff --git a/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java b/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java index 43d352801..f27502bd6 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/FakePlayerUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; diff --git a/src/main/java/ellpeck/actuallyadditions/util/IActAddItemOrBlock.java b/src/main/java/ellpeck/actuallyadditions/util/IActAddItemOrBlock.java index 827e96dd1..5be186b19 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/IActAddItemOrBlock.java +++ b/src/main/java/ellpeck/actuallyadditions/util/IActAddItemOrBlock.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; diff --git a/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java index 0e97bcca5..01a9f17f5 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ItemUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; @@ -36,11 +36,7 @@ public class ItemUtil{ } public static void register(Item item){ - register(item, true); - } - - public static void register(Item item, boolean addTab){ - item.setCreativeTab(addTab ? CreativeTab.instance : null); + item.setCreativeTab(CreativeTab.instance); item.setUnlocalizedName(createUnlocalizedName(item)); GameRegistry.registerItem(item, ((IActAddItemOrBlock)item).getName()); } diff --git a/src/main/java/ellpeck/actuallyadditions/util/KeyUtil.java b/src/main/java/ellpeck/actuallyadditions/util/KeyUtil.java index 0731cb144..081d6d159 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/KeyUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/KeyUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; diff --git a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java index c9d0ac8ef..1b9992df6 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/ModUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; @@ -13,13 +13,15 @@ package ellpeck.actuallyadditions.util; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.util.Locale; + public class ModUtil{ - public static final String VERSION = "1.7.10-0.0.9.4"; + public static final String VERSION = "1.7.10-r2"; public static final String MOD_ID = "ActuallyAdditions"; public static final String NAME = "Actually Additions"; - public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(); + public static final String MOD_ID_LOWER = MOD_ID.toLowerCase(Locale.ROOT); public static final Logger LOGGER = LogManager.getLogger(MOD_ID); diff --git a/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java b/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java index 5fd5b7220..5dba58ca5 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java @@ -5,13 +5,14 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; import net.minecraft.util.StatCollector; +import java.util.Locale; import java.util.Objects; public class StringUtil{ @@ -42,7 +43,7 @@ public class StringUtil{ return null; } else{ - return string.toLowerCase(); + return string.toLowerCase(Locale.ROOT); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/Util.java b/src/main/java/ellpeck/actuallyadditions/util/Util.java index 9d8c7ec97..a8ad80c7c 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/Util.java +++ b/src/main/java/ellpeck/actuallyadditions/util/Util.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; diff --git a/src/main/java/ellpeck/actuallyadditions/util/WorldPos.java b/src/main/java/ellpeck/actuallyadditions/util/WorldPos.java index be5b6f6c1..0fa89625a 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/WorldPos.java +++ b/src/main/java/ellpeck/actuallyadditions/util/WorldPos.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; @@ -14,6 +14,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.DimensionManager; @@ -25,12 +26,20 @@ public class WorldPos{ private int worldID; public WorldPos(World world, int x, int y, int z){ - this.worldID = world.provider.dimensionId; + this(world.provider.dimensionId, x, y, z); + } + + public WorldPos(int worldID, int x, int y, int z){ + this.worldID = worldID; this.x = x; this.y = y; this.z = z; } + public int getWorldID(){ + return this.worldID; + } + public TileEntity getTileEntity(){ return this.getWorld() != null ? this.getWorld().getTileEntity(this.x, this.y, this.z) : null; } @@ -84,4 +93,8 @@ public class WorldPos{ public String toString(){ return "["+this.x+", "+this.y+", "+this.z+" in world "+this.worldID+"]"; } + + public Vec3 toVec(){ + return Vec3.createVectorHelper(this.x, this.y, this.z); + } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java index c3d292bc9..7dfd6bae3 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/WorldUtil.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util; @@ -116,6 +116,7 @@ public class WorldUtil{ tile.getWorldObj().markBlockForUpdate(tile.xCoord, tile.yCoord-1, tile.zCoord); tile.getWorldObj().markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord+1); tile.getWorldObj().markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord-1); + tile.getWorldObj().markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord); tile.markDirty(); } diff --git a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java index bf3f6bea1..58d1d6b72 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java +++ b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentClientData.java @@ -1,11 +1,11 @@ /* * This file ("PersistentClientData.java") is part of the Actually Additions Mod for Minecraft. * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at + * under the Actually Additions License to be found at * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util.playerdata; @@ -31,18 +31,20 @@ public class PersistentClientData{ private static File theFile; - public static void saveBookPage(BookletIndexEntry entry, BookletChapter chapter, BookletPage page, int pageInIndex){ - NBTTagCompound compound = readCompound(); - if(compound != null){ - compound.setInteger(getName("Entry"), entry == null ? -1 : InitBooklet.entries.indexOf(entry)); - compound.setInteger(getName("Chapter"), entry == null || chapter == null ? -1 : entry.chapters.indexOf(chapter)); - compound.setInteger(getName("Page"), page == null ? -1 : page.getID()); - compound.setInteger(getName("PageInIndex"), pageInIndex); - writeCompound(compound); + public static void saveBookPage(BookletIndexEntry entry, BookletChapter chapter, BookletPage page, int pageInIndex, String searchWord){ + NBTTagCompound baseCompound = getBaseCompound(); + NBTTagCompound worldCompound = getCompoundForWorld(baseCompound); + if(worldCompound != null){ + worldCompound.setInteger("Entry", entry == null ? -1 : InitBooklet.entries.indexOf(entry)); + worldCompound.setInteger("Chapter", entry == null || chapter == null ? -1 : entry.chapters.indexOf(chapter)); + worldCompound.setInteger("Page", page == null ? -1 : page.getID()); + worldCompound.setInteger("PageInIndex", pageInIndex); + worldCompound.setString("SearchWord", searchWord); + writeCompound(baseCompound, worldCompound); } } - private static NBTTagCompound readCompound(){ + private static NBTTagCompound getBaseCompound(){ try{ return CompressedStreamTools.readCompressed(new FileInputStream(getTheFile())); } @@ -51,14 +53,21 @@ public class PersistentClientData{ } } - private static String getName(String name){ - return (Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().func_147104_D().serverIP)+"-"+name; + private static String getName(){ + if(Minecraft.getMinecraft().theWorld != null){ + return Minecraft.getMinecraft().isIntegratedServerRunning() ? Minecraft.getMinecraft().getIntegratedServer().getFolderName() : Minecraft.getMinecraft().func_147104_D().serverIP; + } + else return "Invalid"; } - private static void writeCompound(NBTTagCompound compound){ - try{ + private static NBTTagCompound getCompoundForWorld(NBTTagCompound mainCompound){ + return mainCompound.getCompoundTag(getName()); + } - CompressedStreamTools.writeCompressed(compound, new FileOutputStream(getTheFile())); + private static void writeCompound(NBTTagCompound baseCompound, NBTTagCompound worldCompound){ + baseCompound.setTag(getName(), worldCompound); + try{ + CompressedStreamTools.writeCompressed(baseCompound, new FileOutputStream(getTheFile())); } catch(Exception e){ ModUtil.LOGGER.fatal("Couldn't write Persistent Variable!", e); @@ -82,39 +91,45 @@ public class PersistentClientData{ } public static void openLastBookPage(GuiBooklet gui){ - NBTTagCompound compound = readCompound(); - if(compound != null){ - if(compound.hasKey(getName("Entry"))){ - int entry = compound.getInteger(getName("Entry")); - int chapter = compound.getInteger(getName("Chapter")); - int page = compound.getInteger(getName("Page")); + NBTTagCompound worldCompound = getCompoundForWorld(getBaseCompound()); + if(worldCompound != null && worldCompound.hasKey("Entry")){ + int entry = worldCompound.getInteger("Entry"); + int chapter = worldCompound.getInteger("Chapter"); + int page = worldCompound.getInteger("Page"); - BookletIndexEntry currentIndexEntry = entry == -1 ? null : InitBooklet.entries.get(entry); - BookletChapter currentChapter = chapter == -1 || entry == -1 || currentIndexEntry.chapters.size() <= chapter ? null : currentIndexEntry.chapters.get(chapter); - BookletPage currentPage = chapter == -1 || currentChapter == null || currentChapter.pages.length <= page-1 ? null : currentChapter.pages[page-1]; - int pageInIndex = compound.getInteger(getName("PageInIndex")); + BookletIndexEntry currentIndexEntry = entry == -1 ? null : InitBooklet.entries.get(entry); + BookletChapter currentChapter = chapter == -1 || entry == -1 || currentIndexEntry.chapters.size() <= chapter ? null : currentIndexEntry.chapters.get(chapter); + BookletPage currentPage = chapter == -1 || currentChapter == null || currentChapter.pages.length <= page-1 ? null : currentChapter.pages[page-1]; + int pageInIndex = worldCompound.getInteger("PageInIndex"); - gui.openIndexEntry(currentIndexEntry, pageInIndex, true); - if(currentChapter != null){ - gui.openChapter(currentChapter, currentPage); - } - return; + gui.openIndexEntry(currentIndexEntry, pageInIndex, true); + if(currentChapter != null){ + gui.openChapter(currentChapter, currentPage); + } + + String searchText = worldCompound.getString("SearchWord"); + if(!searchText.isEmpty()){ + gui.searchField.setText(searchText); + gui.updateSearchBar(); } } - //If everything fails, initialize the front page - gui.openIndexEntry(null, 1, true); + else{ + //If everything fails, initialize the front page + gui.openIndexEntry(null, 1, true); + } } public static void setBoolean(String name, boolean bool){ - NBTTagCompound compound = readCompound(); - if(compound != null){ - compound.setBoolean(getName(name), bool); - writeCompound(compound); + NBTTagCompound baseCompound = getBaseCompound(); + NBTTagCompound worldCompound = getCompoundForWorld(baseCompound); + if(worldCompound != null){ + worldCompound.setBoolean(name, bool); + writeCompound(baseCompound, worldCompound); } } public static boolean getBoolean(String name){ - NBTTagCompound compound = readCompound(); - return compound != null && compound.getBoolean(getName(name)); + NBTTagCompound worldCompound = getCompoundForWorld(getBaseCompound()); + return worldCompound != null && worldCompound.getBoolean(name); } } diff --git a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java index e58030b49..83c8088bf 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java +++ b/src/main/java/ellpeck/actuallyadditions/util/playerdata/PersistentServerData.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.util.playerdata; @@ -44,17 +44,20 @@ public class PersistentServerData{ this.theCompound = theCompound; } - public static PlayerSave fromNBT(NBTTagCompound compound, String name){ - UUID theID = new UUID(compound.getLong(name+"MostSignificant"), compound.getLong(name+"LeastSignificant")); - NBTTagCompound theCompound = compound.getCompoundTag(name+"Tag"); + public static PlayerSave fromNBT(NBTTagCompound compound){ + UUID theID = new UUID(compound.getLong("MostSignificant"), compound.getLong("LeastSignificant")); + NBTTagCompound theCompound = compound.getCompoundTag("Tag"); return new PlayerSave(theID, theCompound); } - public void toNBT(NBTTagCompound compound, String name){ - compound.setLong(name+"LeastSignificant", this.thePlayerUUID.getLeastSignificantBits()); - compound.setLong(name+"MostSignificant", this.thePlayerUUID.getMostSignificantBits()); + public NBTTagCompound toNBT(){ + NBTTagCompound compound = new NBTTagCompound(); + compound.setLong("LeastSignificant", this.thePlayerUUID.getLeastSignificantBits()); + compound.setLong("MostSignificant", this.thePlayerUUID.getMostSignificantBits()); - compound.setTag(name+"Tag", this.theCompound); + compound.setTag("Tag", this.theCompound); + + return compound; } } diff --git a/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java b/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java index 5e4304fd1..3bda9d2ee 100644 --- a/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java +++ b/src/main/java/ellpeck/actuallyadditions/waila/WailaDataProvider.java @@ -5,7 +5,7 @@ * http://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md * View the source code at https://github.com/Ellpeck/ActuallyAdditions * - * © 2015 Ellpeck + * © 2015 Ellpeck */ package ellpeck.actuallyadditions.waila; diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index cefb56546..310ccdeab 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -64,7 +64,6 @@ tile.actuallyadditions.blockColoredLampLime.name=Lime Lamp tile.actuallyadditions.blockColoredLampPink.name=Pink Lamp tile.actuallyadditions.blockColoredLampCyan.name=Cyan Lamp tile.actuallyadditions.blockColoredLampPurple.name=Purple Lamp -tile.actuallyadditions.blockOreMagnet.name=Magnetic Miner tile.actuallyadditions.blockPhantomface.name=Phantomface tile.actuallyadditions.blockPhantomEnergyface.name=Phantom Energyface tile.actuallyadditions.blockPhantomLiquiface.name=Phantom Liquiface @@ -102,10 +101,12 @@ tile.actuallyadditions.blockFlax.name=Flax Plant tile.actuallyadditions.blockCoffeeMachine.name=Coffee Machine tile.actuallyadditions.blockXPSolidifier.name=Experience Solidifier tile.actuallyadditions.blockSmileyCloud.name=Smiley Cloud -tile.actuallyadditions.blockSmileyCloudValentine.name=Pink Fluffy Unicloud tile.actuallyadditions.blockLeafGenerator.name=Leaf-Eating Generator tile.actuallyadditions.blockDirectionalBreaker.name=Long-Range Breaker tile.actuallyadditions.blockRangedCollector.name=Ranged Collector +tile.actuallyadditions.blockLaserRelay.name=Laser Relay +tile.actuallyadditions.blockMiscIronCasing.name=Iron Casing +tile.actuallyadditions.blockBlackLotus.name=Black Lotus #ESD tile.actuallyadditions.blockInputter.name=ESD @@ -171,6 +172,11 @@ item.actuallyadditions.paxelMTLapisLazuli.name=MT Lapis Lazuli AIOT item.actuallyadditions.paxelMTOsmium.name=MT Osmium AIOT item.actuallyadditions.paxelMTBronze.name=MT Bronze AIOT item.actuallyadditions.paxelMTSteel.name=MT Steel AIOT +item.actuallyadditions.paxelSOadamantium.name=SO Adamantium AIOT +item.actuallyadditions.paxelSOcopper.name=SO Copper AIOT +item.actuallyadditions.paxelSOtin.name=SO Tin AIOT +item.actuallyadditions.paxelSOonyx.name=SO Onyx AIOT +item.actuallyadditions.paxelSOmythril.name=SO Mythril AIOT item.actuallyadditions.itemPhantomConnector.name=Phantom Connector item.actuallyadditions.itemMiscCup.name=Empty Cup item.actuallyadditions.itemCoffee.name=Cup with Coffee @@ -229,7 +235,7 @@ item.actuallyadditions.itemFoodHamburger.name=Hamburger item.actuallyadditions.itemFoodBigCookie.name=Big Cookie item.actuallyadditions.itemFoodSubmarineSandwich.name=Submarine Sandwich item.actuallyadditions.itemFoodToast.name=Toast -item.actuallyadditions.itemFoodChocoToast.name=Toast covered in Chocolate +item.actuallyadditions.itemFoodChocolateToast.name=Toast o' Chocolate item.actuallyadditions.itemFoodChocolate.name=Chocolate item.actuallyadditions.itemFoodChocolateCake.name=Chocolate Cake item.actuallyadditions.itemFoodNoodle.name=Noodle @@ -272,6 +278,10 @@ item.actuallyadditions.itemChestQuartz.name=Black Quartz Chestplate item.actuallyadditions.itemPantsQuartz.name=Black Quartz Pants item.actuallyadditions.itemBootsQuartz.name=Black Quartz Boots item.actuallyadditions.itemBooklet.name=Actually Additions Manual +item.actuallyadditions.itemLaserWrench.name=Laser Wrench +item.actuallyadditions.itemChestToCrateUpgrade.name=Chest To Storage Crate Upgrade +item.actuallyadditions.itemMiscDrillCore.name=Drill Core +item.actuallyadditions.itemMiscBlackDye.name=Black Dye #Tooltips tooltip.actuallyadditions.onSuffix.desc=On @@ -299,6 +309,7 @@ tooltip.actuallyadditions.blockPhantomRange.desc=Range tooltip.actuallyadditions.laser.stored.desc= tooltip.actuallyadditions.laser.connected.desc= tooltip.actuallyadditions.laser.cantConnect.desc=Can't connect: The relays are either part of the same network, the stored relay doesn't exist anymore or it is too far away! +tooltip.actuallyadditions.blockBlackLotus.desc=No, not that one, Vaz! #Gui Information info.actuallyadditions.gui.animals=Animals @@ -353,17 +364,16 @@ container.actuallyadditions.drill.name=Drill container.actuallyadditions.energizer.name=Energizer container.actuallyadditions.enervator.name=Enervator container.actuallyadditions.xpSolidifier.name=Experience Solidifier -container.actuallyadditions.oreMagnet.name=Magnetic Miner container.actuallyadditions.cloud.name=Smiley Cloud container.actuallyadditions.directionalBreaker.name=Long-Range Breaker container.actuallyadditions.rangedCollector.name=Ranged Collector #Update Information -info.actuallyadditions.update.generic.desc=[{"text":"There is an "},{"text":"Update ","bold":"true"},{"text":"for ","bold":"false"},{"text":"Actually Additions ","color":"dark_green","bold":"true"},{"text":"available!","color":"none","bold":"false"}] -info.actuallyadditions.update.versionComp.desc=[{"text":"You have Version "},{"text":"%s","color":"dark_red","italic":"false"},{"text":", the newest one is ","color":"none","italic":"false"},{"text":"%s","color":"dark_green","underlined":"false"},{"text":"!","color":"none","underlined":"false"}] -info.actuallyadditions.update.download.desc=[{"text":"Download the newest Version "},{"text":"here! (Click me!)","color":"dark_green","underlined":"true","clickEvent":{"action":"open_url","value":"%s"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Click here to open your Browser and download the newest Version!"}]}}}] -info.actuallyadditions.update.failed.desc=[{"text":"The Update Check for "},{"text":"Actually Additions ","color":"dark_green","bold":"true"},{"text":"failed! Check your Internet Connection and the Logs for more Info!","color":"none"}] -info.actuallyadditions.update.changelog.desc=Updates: %s +info.actuallyadditions.update.generic=[{"text":"There is an Update for "},{"text":"Actually Additions ","color":"dark_green"},{"text":"available!","color":"none"}] +info.actuallyadditions.update.versionCompare=[{"text":"Current Version: "},{"text":"%s","color":"dark_red"},{"text":", newest Version: ","color":"none"},{"text":"%s","color":"dark_green"}] +info.actuallyadditions.update.buttons=[{"text":"["},{"text":"Click for Changelog","color":"green","clickEvent":{"action":"open_url","value":"%s"}},{"text":"] [","color":"none"},{"text":"Click for Download","color":"green","clickEvent":{"action":"open_url","value":"%s"}},{"text":"]","color":"none"}] +info.actuallyadditions.update.buttonOptions=Click: Changelog, Shift-Click: Download! (In Browser) +info.actuallyadditions.update.failed=[{"text":"The Update Check for "},{"text":"Actually Additions ","color":"dark_green"},{"text":"failed! Check Logs for more Info!","color":"none"}] #Achievements achievement.actuallyadditions.pickUpSolidXP=Square and yummy! @@ -423,14 +433,13 @@ booklet.actuallyadditions.chapter.intro.text.4=If you, for some reason, want to booklet.actuallyadditions.chapter.craftingIngs.name=Crafting Ingredients booklet.actuallyadditions.chapter.craftingIngs.text.1=Actually Additions has lots of items that use certain basic crafting items to be crafted. This chapter has all of these basic items grouped up so that you can see all of them at once. -booklet.actuallyadditions.chapter.craftingIngs.text.5=This thing is terribly snowy right now. If you put this into your machines, you might make them explode. Watch out for that. booklet.actuallyadditions.chapter.quartz.name=Black Quartz booklet.actuallyadditions.chapter.quartz.text.1=Black Quartz is an Ore that generates in the world between layer and . When broken, it can be smelted in a furnace or crushed in a crusher to get broken down into Black Quartz. booklet.actuallyadditions.chapter.quartz.text.2=Black Quartz items are used in lots of Crafting Recipes in Actually Additions. They are very important for most of the Items and, thus, should be mined when found in the world. They can be crafted into a couple of different Decorative Blocks shown on the following pages. Nether Quartz, but deadlier booklet.actuallyadditions.chapter.cloud.name=Smiley Cloud -booklet.actuallyadditions.chapter.cloud.text.1=The Smiley Cloud is a magical floating cloud which is getting put to life through the piece of Solidified Experience inside it. It hovers up and down in its place all jolly and fun, and when right-clicking, you can give it a name. When giving it certain special names like "Ellpeck" or "AcidBlues, it will have some special items it carries! +booklet.actuallyadditions.chapter.cloud.text.1=The Smiley Cloud is a magical floating cloud which is getting put to life through the piece of Solidified Experience inside it. It hovers up and down in its place all jolly and fun, and when right-clicking, you can give it a name. When giving it certain special names like "Ellpeck" or "AcidBlues", it will have some special items it carries! booklet.actuallyadditions.chapter.coalStuff.name=Coal Stuff booklet.actuallyadditions.chapter.coalStuff.text.1=Sometimes your Coal just burns for too long or too short, you know what I mean? For that, you can now craft Tiny Coal, Tiny Charcoal and Blocks of Charcoal for using them in a furnace. While the Block of Charcoal burns for as long as a Block of Coal, the Tiny Coal and Tiny Charcoal will burn for one eighth of a piece of coal, meaning it will smelt one item in a normal furnace. @@ -439,7 +448,8 @@ booklet.actuallyadditions.chapter.lamps.name=Lamps booklet.actuallyadditions.chapter.lamps.text.1=Lamps are a block providing lots of light, similar to the mystic Glowstone or Torches, but they can be dyed with all of the 16 different colors either by crafting them or by placing them on the ground and right-clicking them with a piece of dye. When right-clicking them with an empty hand, they will turn on and off. If you want them, however, to be toggled using Redstone Power, just place a Lamp Controller next to one. booklet.actuallyadditions.chapter.treasureChest.name=Treasure Chests -booklet.actuallyadditions.chapter.treasureChest.text.1=Treasure Chests are a semi-uncommon occurence in Ocean Biomes. They appear on the bottom of the sea, probably left there by bypassing Ships who threw off or lost some load. These Chests however, hold some valuable items, if you're lucky. Breaking them won't yield you anything, though, you just have to right-click them to receive some amazing goodies. +booklet.actuallyadditions.chapter.treasureChest.text.1=A Treasure Chest found underwater. +booklet.actuallyadditions.chapter.treasureChest.text.2=Treasure Chests are a semi-uncommon occurence in Ocean Biomes. They appear on the bottom of the sea, probably left there by bypassing Ships who threw off or lost some load. These Chests however, hold some valuable items, if you're lucky. Breaking them won't yield you anything, though, you just have to right-click them to receive some amazing goodies. booklet.actuallyadditions.chapter.breaker.name=Breakers and Placers booklet.actuallyadditions.chapter.breaker.text.1=The Breaker... well.. it breaks blocks in front of it. That's about it. It can be oriented in every direction like a Piston. It can be turned off with Redstone. @@ -450,7 +460,6 @@ booklet.actuallyadditions.chapter.breaker.text.4=The Liquid Collector w booklet.actuallyadditions.chapter.phantomfaces.name=Phantomfaces booklet.actuallyadditions.chapter.phantomfaces.text.1=Phantomfaces are a simple way to connect inventories together, they have a very important twist however: Instead of just connecting two inventories, a Phantomface simulates the inventory it is connected to, meaning you can put items into and pull out of the Phantomface itself. A Phantomface has a default range of blocks, but it can be upgraded with a Phantom Booster. Phantomfaces are connected by right-clicking an inventory with a Phantom Connector and then right-clicking the Phantomface. booklet.actuallyadditions.chapter.phantomfaces.text.2=The default Phantomface works for items, like described on the first page. -booklet.actuallyadditions.chapter.phantomfaces.text.666=The default Phantomface scares people away by being so terribly creepy. Actually, it just works for items like described on the first page. booklet.actuallyadditions.chapter.phantomfaces.text.3=The Phantom Liquiface acts exactly like the normal Phantomface, but it works for liquid containing blocks. When given a Redstone Signal, it can be set to Auto-Output. Be careful with this though, as it could cause infinte loops and lag under certain conditions! booklet.actuallyadditions.chapter.phantomfaces.text.4=The Phantom Energyface acts exactly like the normal Phantomface, but it works for RF, meaning you can connect it to things like Generators and Crushers. booklet.actuallyadditions.chapter.phantomfaces.text.6=The Phantom Booster, as explained on the first page, ups the range of Phantomfaces by being placed on top of them. The maximum amount above one Phantomface is 3. @@ -479,12 +488,14 @@ booklet.actuallyadditions.chapter.compost.text.3=Mashed Food can be cra booklet.actuallyadditions.chapter.crate.name=Storage Crates booklet.actuallyadditions.chapter.crate.text.1=Storage Crates are big. Really big. They hold tons of items, more than 4 chests worth of them. "F-in' gigantic" -Some Magazine +booklet.actuallyadditions.chapter.crate.text.2=The Chest To Storage Crate Upgrade allows you to convert any chest into a Storage Crate, retaining its items! Just shift-right-click onto the chest to apply it. booklet.actuallyadditions.chapter.coffeeMachine.name=Coffee Machine booklet.actuallyadditions.chapter.coffeeMachine.text.1=The Coffee Machine is a block used to make Coffee, a potion-like item that gives the user several buffs. To use the coffee machine, you need a Empty Cup, Coffee Beans, which can be found in the wild, harvested and planted on farmland again, RF/t and mB of Water per cup brewed. On the coffee machine recipe pages at the back, to see what the item does, just hover over the Cup of Coffee. booklet.actuallyadditions.chapter.coffeeMachine.text.2=To actually give your coffee some buffs, put some of the items shown on the later pages into the slots on the right. The more slots are filled up with one item, the higher the Amplifier of the effect will be. The Maximum Amplifier is the max amount of items to be put into one coffee. Order matters: When using, for example, Milk (to see what it does exactly, go to a later page), you are going to have to plan the items out inside the numbered slots in such a way that it brews the coffee you want. -booklet.actuallyadditions.chapter.coffeeMachine.text.5=Milk is an important item when brewing coffee: It adds 2 minutes to the effect while removing 1 amplifier. When the amplifier of an effect is 1, however, it will remove the effect. -booklet.actuallyadditions.chapter.coffeeMachine.text.6=The fact that you're reading this means that you either have HarvestCraft installed, or that you're looking at the lang file. This does the same thing as Milk, but for veggie guys. +booklet.actuallyadditions.chapter.coffeeMachine.text.3=This is an example of a recipe making a coffee containing Fire Resistance 1 for 0:20 and Speed 1 for 2:30. +booklet.actuallyadditions.chapter.coffeeMachine.text.6=Milk is an important item when brewing coffee: It adds 2 minutes to all effects of items in slots with lower numbers while removing 1 amplifier. When the amplifier of an effect is 1, however, it will remove the effect. +booklet.actuallyadditions.chapter.coffeeMachine.text.7=The fact that you're reading this means that you either have HarvestCraft installed, or that you're looking at the lang file. This does the same thing as Milk, but for veggie guys. booklet.actuallyadditions.chapter.crusher.name=Crusher and Double Crusher booklet.actuallyadditions.chapter.crusher.text.1=The Crusher turns every ore, ingot and gem into its corresponding dust using RF/t. When you put in Ores however, they will yield 2 pieces of dust. The Double Crusher basically does the same, however it can crush two ores at a time and uses RF/t. On the following pages, you can see some additional useful recipes for inside the crusher. He's my crush @@ -492,11 +503,8 @@ booklet.actuallyadditions.chapter.crusher.text.1=The Crusher turns ever booklet.actuallyadditions.chapter.furnaceDouble.name=Double Furnace booklet.actuallyadditions.chapter.furnaceDouble.text.1=The Double Furnace works like a furnace, however, it uses RF/t and can smelt two items at a time. -booklet.actuallyadditions.chapter.miner.name=Magnetic Miner -booklet.actuallyadditions.chapter.miner.text.1=The Magnetic Miner pulls ore blocks out of the ground using RF/t and of Oil/block mined. Every place where an ore should be pulled up must have a Casing Block one block lower than the miner. It has a range of blocks. - booklet.actuallyadditions.chapter.lavaFactory.name=Lava Factory -booklet.actuallyadditions.chapter.lavaFactory.text.1=The Lava Factory can produce blocks of lava given RF/block. The Block above it has to be surrounded with 4 Casing Blocks (which can be found on the Magnetic Miner Page!), otherwise it won't be able to produce Lava. Right-Clicking on the Lava Factory will show you if it's able to produce Lava in its current setup. Lava, for a fact. ory +booklet.actuallyadditions.chapter.lavaFactory.text.1=The Lava Factory can produce blocks of lava given RF/block. The Block above it has to be surrounded with 4 Casing Blocks, otherwise it won't be able to produce Lava. Right-Clicking on the Lava Factory will show you if it's able to produce Lava in its current setup. Lava, for a fact. ory booklet.actuallyadditions.chapter.energizer.name=Energizer and Enervator booklet.actuallyadditions.chapter.energizer.text.1=The Energizer charges items that hold RF using its energy supply. @@ -568,4 +576,12 @@ booklet.actuallyadditions.chapter.rangedCollector.name=Ranged Collector booklet.actuallyadditions.chapter.rangedCollector.text.1=The Ranged Collector works much like a hopper, in that it collects items around it, having the power, however, to pick up items that are in an area of blocks around it. It has a filter that can be set to white- or blacklist. This comes with a disadvantage, however: It doesn't auto-output its items. booklet.actuallyadditions.chapter.hairBalls.name=Ball of Fur-s -booklet.actuallyadditions.chapter.hairBalls.text.1=Balls of Fur are an item rarely dropped by cats which have been tamed by the player. Cats are very mysterious creatures as they appear to get everything stuck in their fur. Balls of Fur may seem disgusting at first, but when removing all of the hair by right-clicking, they will reveal some valuable items. Or just some String. FUURRRRRR!! \ No newline at end of file +booklet.actuallyadditions.chapter.hairBalls.text.1=Balls of Fur dropped by live cats. More information on the next page. +booklet.actuallyadditions.chapter.hairBalls.text.2=Balls of Fur are an item rarely dropped by cats which have been tamed by the player. Cats are very mysterious creatures as they appear to get everything stuck in their fur. Balls of Fur may seem disgusting at first, but when removing all of the hair by right-clicking, they will reveal some valuable items. Or just some String. FUURRRRRR!! + +booklet.actuallyadditions.chapter.laserRelays.name=Laser Relays +booklet.actuallyadditions.chapter.laserRelays.text.1=The Laser Relay is a block that can wirelessly transfer RF just by being connected with a Laser Wrench, generating a network. When placing a Power Generator or Receiver next to the relay, it can receive Power from any other relay in the network. Two relays can be at most blocks apart. During an energy transfer, they have an Energy Loss of %. + +booklet.actuallyadditions.chapter.blackLotus.name=Black Lotus +booklet.actuallyadditions.chapter.blackLotus.text.1=Think of this: You need to craft black wool, black clay or anything else that needs black dye but you are just guilty about killing so many innocent squids? Well, the Black Lotus is exactly the thing you need! Just look around in the wild a bit, and you will find one, then being able to craft some Black Dye that can be used instead of Ink Sacs so that you don't need to kill poor squids and L any longer. +booklet.actuallyadditions.chapter.blackLotus.text.2=No, not that one, Vaz \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockBlackLotus.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockBlackLotus.png new file mode 100644 index 000000000..b36495c93 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/blockBlackLotus.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockMiscIronCasing.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockMiscIronCasing.png new file mode 100644 index 000000000..c8d32c603 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/blockMiscIronCasing.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockMiscIronCasingSnow.png b/src/main/resources/assets/actuallyadditions/textures/blocks/blockMiscIronCasingSnow.png new file mode 100644 index 000000000..c69e414c5 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/blockMiscIronCasingSnow.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelPinkFluffyUnicloud.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelPinkFluffyUnicloud.png new file mode 100644 index 000000000..f666706e4 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelPinkFluffyUnicloud.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBooklet.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png rename to src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBooklet.png diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiBookletChristmas.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletChristmas.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/gui/guiBookletChristmas.png rename to src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletChristmas.png diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiBookletHalloween.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletHalloween.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/gui/guiBookletHalloween.png rename to src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletHalloween.png diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiBookletValentinesDay.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletValentinesDay.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/gui/guiBookletValentinesDay.png rename to src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBookletValentinesDay.png diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageCoffeeMachine.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageCoffeeMachine.png new file mode 100644 index 000000000..e807ff62f Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageCoffeeMachine.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageFurBalls.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageFurBalls.png new file mode 100644 index 000000000..a7ef115ba Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageFurBalls.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageLaserRelay.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageLaserRelay.png new file mode 100644 index 000000000..707780752 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageLaserRelay.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageLavaFactory.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageLavaFactory.png new file mode 100644 index 000000000..a75bb45f6 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageLavaFactory.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageTreasureChest.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageTreasureChest.png new file mode 100644 index 000000000..85488b791 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/pageTreasureChest.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/diamondPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/diamondPaxel.png deleted file mode 100644 index 6c809a312..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/diamondPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/emeraldPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/emeraldPaxel.png deleted file mode 100644 index e184b2400..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/emeraldPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/goldPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/goldPaxel.png deleted file mode 100644 index c0750f43d..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/goldPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/ironPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/ironPaxel.png deleted file mode 100644 index 7cea9949f..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/ironPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemFoodChocoToast.png b/src/main/resources/assets/actuallyadditions/textures/items/itemFoodChocolateToast.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/items/itemFoodChocoToast.png rename to src/main/resources/assets/actuallyadditions/textures/items/itemFoodChocolateToast.png diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBlackDye.png b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBlackDye.png new file mode 100644 index 000000000..a4cd0e1f3 Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscBlackDye.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemMiscDrillCore.png b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscDrillCore.png new file mode 100644 index 000000000..9cae4b99b Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemMiscDrillCore.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/itemPaxel.png new file mode 100644 index 000000000..56f2ff5fb Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemPaxel.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/itemPaxelOverlay.png b/src/main/resources/assets/actuallyadditions/textures/items/itemPaxelOverlay.png new file mode 100644 index 000000000..2c68cb14a Binary files /dev/null and b/src/main/resources/assets/actuallyadditions/textures/items/itemPaxelOverlay.png differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/obsidianPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/obsidianPaxel.png deleted file mode 100644 index 4915838bb..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/obsidianPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTBronze.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelMTBronze.png deleted file mode 100644 index 26e5bb41b..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTBronze.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTGlowstone.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelMTGlowstone.png deleted file mode 100644 index 68ba56c32..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTGlowstone.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTLapisLazuli.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelMTLapisLazuli.png deleted file mode 100644 index c6ddcedec..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTLapisLazuli.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTObsidian.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelMTObsidian.png deleted file mode 100644 index 1f2a4192e..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTObsidian.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTOsmium.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelMTOsmium.png deleted file mode 100644 index 09f276f30..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTOsmium.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTSteel.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelMTSteel.png deleted file mode 100644 index e6fa305d8..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelMTSteel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFBronze.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFBronze.png deleted file mode 100644 index 544378513..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFBronze.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFCopper.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFCopper.png deleted file mode 100644 index a17df28de..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFCopper.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFElectrum.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFElectrum.png deleted file mode 100644 index f8fd4936d..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFElectrum.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFInvar.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFInvar.png deleted file mode 100644 index 53c63bddf..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFInvar.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFLead.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFLead.png deleted file mode 100644 index c12a7b28f..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFLead.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFNickel.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFNickel.png deleted file mode 100644 index 9272ffbe4..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFNickel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFPlatinum.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFPlatinum.png deleted file mode 100644 index e5cf9d762..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFPlatinum.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFSilver.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFSilver.png deleted file mode 100644 index b0e8a6d11..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFSilver.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFTin.png b/src/main/resources/assets/actuallyadditions/textures/items/paxelTFTin.png deleted file mode 100644 index 07e82efe6..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/paxelTFTin.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/quartzPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/quartzPaxel.png deleted file mode 100644 index 6e5e35def..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/quartzPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/stonePaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/stonePaxel.png deleted file mode 100644 index 449737ee1..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/stonePaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/items/woodenPaxel.png b/src/main/resources/assets/actuallyadditions/textures/items/woodenPaxel.png deleted file mode 100644 index d80876661..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/items/woodenPaxel.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/specialSquid.png b/src/main/resources/assets/actuallyadditions/textures/specialSquid.png deleted file mode 100644 index 6ffc37eca..000000000 Binary files a/src/main/resources/assets/actuallyadditions/textures/specialSquid.png and /dev/null differ diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockOreMagnet.png b/src/main/resources/assets/actuallyadditions/textures/unused/blockOreMagnet.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/blocks/blockOreMagnet.png rename to src/main/resources/assets/actuallyadditions/textures/unused/blockOreMagnet.png diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockOreMagnetBottom.png b/src/main/resources/assets/actuallyadditions/textures/unused/blockOreMagnetBottom.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/blocks/blockOreMagnetBottom.png rename to src/main/resources/assets/actuallyadditions/textures/unused/blockOreMagnetBottom.png diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/blockOreMagnetTop.png b/src/main/resources/assets/actuallyadditions/textures/unused/blockOreMagnetTop.png similarity index 100% rename from src/main/resources/assets/actuallyadditions/textures/blocks/blockOreMagnetTop.png rename to src/main/resources/assets/actuallyadditions/textures/unused/blockOreMagnetTop.png diff --git a/update/changelog.md b/update/changelog.md new file mode 100644 index 000000000..1e0fb7113 --- /dev/null +++ b/update/changelog.md @@ -0,0 +1,21 @@ +# 1.7.10-r2 +- Fix a Crash on Server with the Laser Relay +- Gave the Laser Relay an Energy Transfer Cap +- Added Preview Pictures to the booklet (Thanks to KittyVanCat for help!) +- Fix Slabs +- Fixed Bug with Double Furnace and Double Crusher not crushing if both slots are filled (Thanks to KittyVanCat) +- Remove the Magnetic Miner + +# 1.7.10-r1 +- Finally out of beta! ~ +- Added the Laser Relay, a block that works like a cable to transfer RF, only without the cable but with LAZORZ +- Added Laser Wrench (Texture by MineLoad) +- Moved server-side Player Data to WorldSavedData because ExtendedEntityProperties doesn't work properly +- Made PersistentClientData less write-y +- Added Booklet Priority Colors & Changed Selection Design +- Added Valentine's Day Seasonal +- Chocolate Toast (canitzp) +- New AIOT Textures +- AIOT Integration for SimpleOres 2 +- Changed Ball Of Hair Name to "Ball Of Fur", added Booklet Page +- Added Iron Casing & Drill Core diff --git a/update/changelog.txt b/update/changelog.txt index c17e715b0..6e4d36d2d 100644 --- a/update/changelog.txt +++ b/update/changelog.txt @@ -1 +1,2 @@ -Added Seasonal Mode: Halloween & Christmas! \o/ & Bugfixes & Experimental new Server -> Client Syncing that should work better \ No newline at end of file +Laser Relays, out of Beta! +New Update Checker (If you still see this message, you really should update!) +(This is a fallback for the old versions of the mod which use the old versioning System. Don't change.) \ No newline at end of file diff --git a/update/newestVersion.txt b/update/newestVersion.txt index f34f3a624..1c58e90be 100644 --- a/update/newestVersion.txt +++ b/update/newestVersion.txt @@ -1 +1,2 @@ -1.7.10-0.0.9.4 \ No newline at end of file +1.7.10-0.1.0.0 +(This is a fallback for the old versions of the mod which use the old versioning System. Don't change.) \ No newline at end of file diff --git a/update/updateVersion.txt b/update/updateVersion.txt new file mode 100644 index 000000000..80f8d3a63 --- /dev/null +++ b/update/updateVersion.txt @@ -0,0 +1 @@ +1.7.10-r2 \ No newline at end of file