aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/core
diff options
context:
space:
mode:
authormiozune <miozune@gmail.com>2023-05-17 00:01:01 +0900
committerGitHub <noreply@github.com>2023-05-16 17:01:01 +0200
commit04514282c08ebefdb3e68a46db34092f72be2316 (patch)
tree0c9bc99f480f7e7f45a99a55a5b6619ebb5b014b /src/main/java/gtPlusPlus/core
parentcd58ff7cd4dc4b5ffe917a24a4b4c6da577f462d (diff)
downloadGT5-Unofficial-04514282c08ebefdb3e68a46db34092f72be2316.tar.gz
GT5-Unofficial-04514282c08ebefdb3e68a46db34092f72be2316.tar.bz2
GT5-Unofficial-04514282c08ebefdb3e68a46db34092f72be2316.zip
Remove a lot of unused classes (#629)
Diffstat (limited to 'src/main/java/gtPlusPlus/core')
-rw-r--r--src/main/java/gtPlusPlus/core/block/ModBlocks.java4
-rw-r--r--src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java41
-rw-r--r--src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java74
-rw-r--r--src/main/java/gtPlusPlus/core/block/base/MetaBlock.java35
-rw-r--r--src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java37
-rw-r--r--src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java260
-rw-r--r--src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java4
-rw-r--r--src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java41
-rw-r--r--src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java4
-rw-r--r--src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java68
-rw-r--r--src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java36
-rw-r--r--src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java98
-rw-r--r--src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java50
-rw-r--r--src/main/java/gtPlusPlus/core/common/CommonProxy.java6
-rw-r--r--src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java7
-rw-r--r--src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java26
-rw-r--r--src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java17
-rw-r--r--src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java17
-rw-r--r--src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java17
-rw-r--r--src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java17
-rw-r--r--src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java242
-rw-r--r--src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java220
-rw-r--r--src/main/java/gtPlusPlus/core/handler/CraftingManager.java13
-rw-r--r--src/main/java/gtPlusPlus/core/handler/events/PlayerTickHandler.java15
-rw-r--r--src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java123
-rw-r--r--src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java115
-rw-r--r--src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java37
-rw-r--r--src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java160
-rw-r--r--src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java177
-rw-r--r--src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java120
-rw-r--r--src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java206
-rw-r--r--src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java160
-rw-r--r--src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java165
-rw-r--r--src/main/java/gtPlusPlus/core/item/ModItems.java15
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java94
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java27
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java105
-rw-r--r--src/main/java/gtPlusPlus/core/item/base/BaseItemWithCharge.java67
-rw-r--r--src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java35
-rw-r--r--src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java37
-rw-r--r--src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java28
-rw-r--r--src/main/java/gtPlusPlus/core/item/effects/RarityRare.java28
-rw-r--r--src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java22
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java95
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java60
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java188
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java205
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java12
-rw-r--r--src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java107
-rw-r--r--src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java66
-rw-r--r--src/main/java/gtPlusPlus/core/item/materials/MaterialHandler.java7
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/ConnectedBlockFinder.java127
-rw-r--r--src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java73
-rw-r--r--src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java9
-rw-r--r--src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java9
-rw-r--r--src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java9
-rw-r--r--src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java119
-rw-r--r--src/main/java/gtPlusPlus/core/material/Ion.java30
-rw-r--r--src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java39
-rw-r--r--src/main/java/gtPlusPlus/core/proxy/ServerProxy.java1
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java86
-rw-r--r--src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java15
-rw-r--r--src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java45
-rw-r--r--src/main/java/gtPlusPlus/core/slots/SlotFrame.java24
-rw-r--r--src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java92
-rw-r--r--src/main/java/gtPlusPlus/core/slots/SlotOutput.java92
-rw-r--r--src/main/java/gtPlusPlus/core/slots/SlotRTG.java24
-rw-r--r--src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java39
-rw-r--r--src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java289
-rw-r--r--src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java288
-rw-r--r--src/main/java/gtPlusPlus/core/util/data/EnumUtils.java45
-rw-r--r--src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java50
-rw-r--r--src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java24
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java30
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java53
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java953
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java45
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java84
-rw-r--r--src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java1338
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java17
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java125
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java55
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java4
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java41
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java25
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java99
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java73
-rw-r--r--src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java83
-rw-r--r--src/main/java/gtPlusPlus/core/util/sys/Log.java25
89 files changed, 1 insertions, 8388 deletions
diff --git a/src/main/java/gtPlusPlus/core/block/ModBlocks.java b/src/main/java/gtPlusPlus/core/block/ModBlocks.java
index d5dd4958da..9957ae3f92 100644
--- a/src/main/java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/main/java/gtPlusPlus/core/block/ModBlocks.java
@@ -107,8 +107,6 @@ public final class ModBlocks {
public static void init() {
Logger.INFO("Initializing Blocks.");
- // blockGriefSaver = new
- // TowerDevice().setBlockName("blockGriefSaver").setCreativeTab(AddToCreativeTab.tabBlock).setBlockTextureName("blockDefault");
registerBlocks();
}
@@ -126,8 +124,6 @@ public final class ModBlocks {
blockFirePit = new FirePit();
blockFishTrap = new FishTrap();
blockInfiniteFLuidTank = new FluidTankInfinite();
- // blockOreFluorite = new BlockBaseOre.oldOreBlock("oreFluorite", "Fluorite", Material.rock, BlockTypes.ORE,
- // Utils.rgbtoHexValue(120, 120, 30), 3);
blockMiningExplosive = new MiningExplosives();
blockHellfire = new HellFire();
blockProjectTable = new Machine_ProjectTable();
diff --git a/src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java b/src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java
deleted file mode 100644
index 932fe7b48d..0000000000
--- a/src/main/java/gtPlusPlus/core/block/base/AdvancedBlock.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gtPlusPlus.core.block.base;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-public class AdvancedBlock extends Block {
-
- protected AdvancedBlock(final String unlocalizedName, final Material material, final CreativeTabs x,
- final float blockHardness, final float blockResistance, final float blockLightLevel,
- final String blockHarvestTool, final int blockHarvestLevel, final SoundType BlockSound) {
- super(material);
- this.setBlockName(unlocalizedName);
- this.setBlockTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setCreativeTab(x);
- this.setHardness(blockHardness); // block Hardness
- this.setResistance(blockResistance);
- this.setLightLevel(blockLightLevel);
- this.setHarvestLevel(blockHarvestTool, blockHarvestLevel);
- this.setStepSound(BlockSound);
- }
-
- @Override
- public boolean onBlockActivated(final World p_149727_1_, final int p_149727_2_, final int p_149727_3_,
- final int p_149727_4_, final EntityPlayer p_149727_5_, final int p_149727_6_, final float p_149727_7_,
- final float p_149727_8_, final float p_149727_9_) {
- return false;
- }
-
- @Override
- public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y,
- final int z) {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java
index c7d8866ec5..208838859b 100644
--- a/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java
+++ b/src/main/java/gtPlusPlus/core/block/base/BlockBaseOre.java
@@ -130,78 +130,4 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock {
@Override
public void registerBlockIcons(IIconRegister p_149651_1_) {}
- public static class oldOreBlock extends BlockBaseModular implements ITexturedBlock {
-
- public oldOreBlock(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType,
- final int colour) {
- this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2);
- }
-
- public oldOreBlock(final String unlocalizedName, final String blockMaterial,
- final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType,
- final int colour, final int miningLevel) {
- super(unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel);
- }
-
- @Override
- public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y,
- final int z) {
- return false;
- }
-
- @Override
- public int getRenderType() {
- if (CustomOreBlockRenderer.INSTANCE != null) {
- return CustomOreBlockRenderer.INSTANCE.mRenderID;
- }
- return super.getRenderType();
- }
-
- @Override
- public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int ordinalSide) {
- return Blocks.stone.getIcon(0, 0);
- }
-
- @Override
- public IIcon getIcon(int ordinalSide, int aMeta) {
- return Blocks.stone.getIcon(0, 0);
- }
-
- /**
- * GT Texture Handler
- */
-
- // .08 compat
- IIconContainer[] hiddenTextureArray;
-
- @Override
- public ITexture[] getTexture(ForgeDirection side) {
- return getTexture(null, side);
- }
-
- @Override
- public ITexture[] getTexture(Block block, ForgeDirection side) {
- if (this.blockMaterial != null) {
- GTPP_RenderedTexture aIconSet = new GTPP_RenderedTexture(
- blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex],
- this.blockMaterial.getRGBA());
- return new ITexture[] { new GTPP_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet };
- }
-
- if (hiddenTextureArray == null) {
- try {
- Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES");
- if (o != null) {
- hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class);
- }
- if (hiddenTextureArray == null) {
- hiddenTextureArray = new IIconContainer[6];
- }
- } catch (IllegalArgumentException | IllegalAccessException e) {
- hiddenTextureArray = new IIconContainer[6];
- }
- }
- return new ITexture[] { new GTPP_RenderedTexture(hiddenTextureArray[0], new short[] { 240, 240, 240, 0 }) };
- }
- }
}
diff --git a/src/main/java/gtPlusPlus/core/block/base/MetaBlock.java b/src/main/java/gtPlusPlus/core/block/base/MetaBlock.java
deleted file mode 100644
index 5995fb7d49..0000000000
--- a/src/main/java/gtPlusPlus/core/block/base/MetaBlock.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gtPlusPlus.core.block.base;
-
-import java.util.List;
-
-import net.minecraft.block.material.Material;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.IBlockAccess;
-
-public class MetaBlock extends MultiTextureBlock {
-
- protected MetaBlock(final String unlocalizedName, final Material material, final SoundType soundType) {
- super(unlocalizedName, material, soundType);
- }
-
- @Override
- public int damageDropped(final int meta) {
- return meta;
- }
-
- @Override
- public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) {
- for (int i = 0; i < 6; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- @Override
- public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y,
- final int z) {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java b/src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java
deleted file mode 100644
index bb6aee18d5..0000000000
--- a/src/main/java/gtPlusPlus/core/block/base/MultiTextureBlock.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package gtPlusPlus.core.block.base;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.util.IIcon;
-
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class MultiTextureBlock extends Block {
-
- public IIcon[] icons = new IIcon[6];
-
- protected MultiTextureBlock(final String unlocalizedName, final Material material, final SoundType blockSound) {
- super(material);
- this.setBlockName(unlocalizedName);
- this.setBlockTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setCreativeTab(AddToCreativeTab.tabBlock);
- this.setHardness(2.0F);
- this.setResistance(6.0F);
- this.setStepSound(blockSound);
- }
-
- @Override
- public void registerBlockIcons(final IIconRegister reg) {
- for (int i = 0; i < 6; i++) {
- this.icons[i] = reg.registerIcon(this.textureName + "_" + i);
- }
- }
-
- @Override
- public IIcon getIcon(final int side, final int meta) {
- return this.icons[side];
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java b/src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java
deleted file mode 100644
index 58fbced6c3..0000000000
--- a/src/main/java/gtPlusPlus/core/block/general/antigrief/TowerDevice.java
+++ /dev/null
@@ -1,260 +0,0 @@
-package gtPlusPlus.core.block.general.antigrief;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-import static gtPlusPlus.core.block.ModBlocks.blockGriefSaver;
-
-import java.util.List;
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.IBlockAccess;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.tileentities.general.TileEntityReverter;
-
-public class TowerDevice extends Block {
-
- private static IIcon TEX_ANTIBUILDER;
- public static final int META_ANTIBUILDER = 9;
- private boolean bUnbreakable;
-
- public TowerDevice() {
- super(Material.wood);
- this.setHardness(10.0F);
- this.setResistance(35.0F);
- this.setStepSound(Block.soundTypeWood);
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- }
-
- public int tickRate() {
- return 15;
- }
-
- public void saveNBTData(final NBTTagCompound aNBT) {
- aNBT.setBoolean("bUnbreakable", this.bUnbreakable);
- }
-
- public void loadNBTData(final NBTTagCompound aNBT) {
- this.bUnbreakable = aNBT.getBoolean("bUnbreakable");
- }
-
- @Override
- public IIcon getIcon(final int side, final int meta) {
- return TEX_ANTIBUILDER;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(final IIconRegister par1IconRegister) {
- TEX_ANTIBUILDER = par1IconRegister.registerIcon(GTPlusPlus.ID + ":" + "blockAntiGrief");
- }
-
- @Override
- public void getSubBlocks(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) {
- par3List.add(new ItemStack(par1, 1, 9));
- }
-
- @Override
- public boolean onBlockActivated(final World par1World, final int x, final int y, final int z,
- final EntityPlayer par5EntityPlayer, final int par6, final float par7, final float par8, final float par9) {
- final int meta = par1World.getBlockMetadata(x, y, z);
- return false;
- }
-
- @Override
- public float getExplosionResistance(final Entity par1Entity, final World world, final int x, final int y,
- final int z, final double explosionX, final double explosionY, final double explosionZ) {
- final int meta = world.getBlockMetadata(x, y, z);
- return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ);
- }
-
- @Override
- public float getBlockHardness(final World world, final int x, final int y, final int z) {
- final int meta = world.getBlockMetadata(x, y, z);
- return super.getBlockHardness(world, x, y, z);
- }
-
- public static boolean areNearbyLockBlocks(final World world, final int x, final int y, final int z) {
- boolean locked = false;
- for (int dx = x - 2; dx <= (x + 2); dx++) {
- for (int dy = y - 2; dy <= (y + 2); dy++) {
- for (int dz = z - 2; dz <= (z + 2); dz++) {
- if ((world.getBlock(dx, dy, dz) == blockGriefSaver) && (world.getBlockMetadata(dx, dy, dz) == 4)) {
- locked = true;
- }
- }
- }
- }
- return locked;
- }
-
- public static void unlockBlock(final World par1World, final int x, final int y, final int z) {
- final Block thereBlockID = par1World.getBlock(x, y, z);
- final int thereBlockMeta = par1World.getBlockMetadata(x, y, z);
- if ((thereBlockID == blockGriefSaver) || (thereBlockMeta == 4)) {
- changeToBlockMeta(par1World, x, y, z, 5);
- par1World.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.click", 0.3F, 0.6F);
- }
- }
-
- private static void changeToBlockMeta(final World par1World, final int x, final int y, final int z,
- final int meta) {
- final Block thereBlockID = par1World.getBlock(x, y, z);
- if ((thereBlockID == blockGriefSaver)) {
- par1World.setBlock(x, y, z, thereBlockID, meta, 3);
- par1World.markBlockRangeForRenderUpdate(x, y, z, x, y, z);
- par1World.notifyBlocksOfNeighborChange(x, y, z, thereBlockID);
- }
- }
-
- @Override
- public void onBlockAdded(final World par1World, final int x, final int y, final int z) {
- final int meta = par1World.getBlockMetadata(x, y, z);
- if (!par1World.isRemote) {}
- }
-
- @Override
- public void onNeighborBlockChange(final World par1World, final int x, final int y, final int z,
- final Block myBlockID) {
- final int meta = par1World.getBlockMetadata(x, y, z);
- if (!par1World.isRemote) {}
- }
-
- @Override
- public void updateTick(final World par1World, final int x, final int y, final int z, final Random par5Random) {
- if (!par1World.isRemote) {
- final int meta = par1World.getBlockMetadata(x, y, z);
- }
- }
-
- private void letsBuild(final World par1World, final int x, final int y, final int z) {}
-
- private boolean isInactiveTrapCharged(final World par1World, final int x, final int y, final int z) {
- return false;
- }
-
- private boolean isReactorReady(final World world, final int x, final int y, final int z) {
- if ((world.getBlock(x, y + 1, z) != Blocks.redstone_block)
- || (world.getBlock(x, y - 1, z) != Blocks.redstone_block)
- || (world.getBlock(x + 1, y, z) != Blocks.redstone_block)
- || (world.getBlock(x - 1, y, z) != Blocks.redstone_block)
- || (world.getBlock(x, y, z + 1) != Blocks.redstone_block)
- || (world.getBlock(x, y, z - 1) != Blocks.redstone_block)) {
- return false;
- }
- return true;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void randomDisplayTick(final World par1World, final int x, final int y, final int z,
- final Random par5Random) {
- final int meta = par1World.getBlockMetadata(x, y, z);
- if ((meta == 3) || (meta == 1) || (meta == 9)) {
- for (int i = 0; i < 1; i++) {
- this.sparkle(par1World, x, y, z, par5Random);
- }
- }
- }
-
- public void sparkle(final World world, final int x, final int y, final int z, final Random rand) {
- final double offset = 0.0625D;
- for (int ordinalSide = 0; ordinalSide < 6; ordinalSide++) {
- double rx = x + rand.nextFloat();
- double ry = y + rand.nextFloat();
- double rz = z + rand.nextFloat();
- if ((ordinalSide == 0) && (!world.getBlock(x, y + 1, z).isOpaqueCube())) {
- ry = y + 1 + offset;
- }
- if ((ordinalSide == 1) && (!world.getBlock(x, y - 1, z).isOpaqueCube())) {
- ry = (y + 0) - offset;
- }
- if ((ordinalSide == 2) && (!world.getBlock(x, y, z + 1).isOpaqueCube())) {
- rz = z + 1 + offset;
- }
- if ((ordinalSide == 3) && (!world.getBlock(x, y, z - 1).isOpaqueCube())) {
- rz = (z + 0) - offset;
- }
- if ((ordinalSide == 4) && (!world.getBlock(x + 1, y, z).isOpaqueCube())) {
- rx = x + 1 + offset;
- }
- if ((ordinalSide == 5) && (!world.getBlock(x - 1, y, z).isOpaqueCube())) {
- rx = (x + 0) - offset;
- }
- if ((rx < x) || (rx > (x + 1)) || (ry < 0.0D) || (ry > (y + 1)) || (rz < z) || (rz > (z + 1))) {
- world.spawnParticle("reddust", rx, ry, rz, 0.0D, 0.0D, 0.0D);
- }
- }
- }
-
- public static void checkAndActivateVanishBlock(final World world, final int x, final int y, final int z) {
- final Block thereID = world.getBlock(x, y, z);
- final int thereMeta = world.getBlockMetadata(x, y, z);
- }
-
- public static void changeToActiveVanishBlock(final World par1World, final int x, final int y, final int z,
- final int meta) {
- changeToBlockMeta(par1World, x, y, z, meta);
- par1World.playSoundEffect(x + 0.5D, y + 0.5D, z + 0.5D, "random.pop", 0.3F, 0.6F);
-
- final Block thereBlockID = par1World.getBlock(x, y, z);
- par1World.scheduleBlockUpdate(x, y, z, thereBlockID, getTickRateFor(thereBlockID, meta, par1World.rand));
- }
-
- private static int getTickRateFor(final Block thereBlockID, final int meta, final Random rand) {
- return 15;
- }
-
- @Override
- public int getLightValue(final IBlockAccess world, final int x, final int y, final int z) {
- final Block blockID = world.getBlock(x, y, z);
- final int meta = world.getBlockMetadata(x, y, z);
- if (blockID != this) {
- return 0;
- }
- return 10;
- }
-
- @Override
- public boolean hasTileEntity(final int metadata) {
- return (metadata == 0);
- }
-
- @Override
- public TileEntity createTileEntity(final World world, final int metadata) {
- if (metadata == 0) {
- Logger.INFO("I have been created. [Antigriefer]" + this.getLocalizedName());
- return new TileEntityReverter();
- }
- return null;
- }
-
- @Override
- public Item getItemDropped(final int meta, final Random par2Random, final int par3) {
- switch (meta) {
- case 0:
- return null;
- }
- return Item.getItemFromBlock(this);
- }
-
- @Override
- public int damageDropped(final int meta) {
- return meta;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java b/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java
deleted file mode 100644
index fd5b996160..0000000000
--- a/src/main/java/gtPlusPlus/core/block/general/redstone/BlockGenericRedstoneEmitter.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package gtPlusPlus.core.block.general.redstone;
-
-public class BlockGenericRedstoneEmitter {
-}
diff --git a/src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java b/src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java
deleted file mode 100644
index fa28ef38f9..0000000000
--- a/src/main/java/gtPlusPlus/core/block/machine/BlockGtFrameBox.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gtPlusPlus.core.block.machine;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.EnumCreatureType;
-import net.minecraft.world.IBlockAccess;
-
-import gtPlusPlus.core.block.base.BasicBlock.BlockTypes;
-import gtPlusPlus.core.block.base.MetaBlock;
-
-public class BlockGtFrameBox extends MetaBlock {
-
- private int[] colours;
- private int totalColours;
-
- public BlockGtFrameBox(final String unlocalizedName, final Material material, final BlockTypes blockTypeENUM,
- final boolean recolour, final int... colour) {
- super(unlocalizedName, material, blockTypeENUM.getBlockSoundType());
- this.setBlockTextureName(GTPlusPlus.ID + ":" + "blockGtFrame");
- this.setHarvestLevel(blockTypeENUM.getHarvestTool(), 2);
- if (recolour && ((colour != null) && (colour.length > 0))) {
- this.colours = colour;
- this.totalColours = this.colours.length;
- }
- }
-
- @Override
- public int colorMultiplier(final IBlockAccess p_149720_1_, final int p_149720_2_, final int p_149720_3_,
- final int p_149720_4_) {
- for (final int i : this.colours) {}
-
- return super.colorMultiplier(p_149720_1_, p_149720_2_, p_149720_3_, p_149720_4_);
- }
-
- @Override
- public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y,
- final int z) {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java b/src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java
deleted file mode 100644
index 688dfbb742..0000000000
--- a/src/main/java/gtPlusPlus/core/block/machine/Machine_WireiusDeletus.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package gtPlusPlus.core.block.machine;
-
-public class Machine_WireiusDeletus { // A Block that removes GT Cable and Wire from it's inventory.
-}
diff --git a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java b/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java
deleted file mode 100644
index 49a0878678..0000000000
--- a/src/main/java/gtPlusPlus/core/client/model/ModelEggBox.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package gtPlusPlus.core.client.model;
-
-import net.minecraft.client.model.ModelRenderer;
-import net.minecraft.entity.Entity;
-
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Pair;
-import gtPlusPlus.core.client.model.tabula.ModelTabulaBase;
-import gtPlusPlus.core.client.renderer.tabula.RenderTabulaBase;
-import gtPlusPlus.core.tileentities.general.TileEntityEggBox;
-
-/**
- * ModelEggBox - Alkalus Created using Tabula 4.1.1
- */
-public class ModelEggBox extends ModelTabulaBase {
-
- private final AutoMap<Pair<ModelRenderer, Float>> mParts = new AutoMap<Pair<ModelRenderer, Float>>();
-
- private static RenderTabulaBase mRendererInstance;
-
- public ModelRenderer bottom;
- // EggBox_full.png
-
- public ModelEggBox() {
- super(64, 64);
- this.textureWidth = 64;
- this.textureHeight = 64;
-
- this.bottom = new ModelRenderer(this, 0, 19);
- this.bottom.setRotationPoint(1.0F, 6.0F, 1.0F);
- this.bottom.addBox(0.0F, 0.0F, 0.0F, 14, 10, 14, 0.0F);
- mParts.add(new Pair<ModelRenderer, Float>(bottom, 0f));
- }
-
- @Override
- public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
- // Logger.INFO("Rendering EggBox");
- this.bottom.render(f5);
- }
-
- /**
- * This is a helper function from Tabula to set the rotation of model parts
- */
- @Override
- public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
- modelRenderer.rotateAngleX = x;
- modelRenderer.rotateAngleY = y;
- modelRenderer.rotateAngleZ = z;
- }
-
- @Override
- protected AutoMap<Pair<ModelRenderer, Float>> getModelParts() {
- AutoMap<Pair<ModelRenderer, Float>> aParts = new AutoMap<Pair<ModelRenderer, Float>>();
- aParts.add(new Pair<ModelRenderer, Float>(bottom, 0.0625F));
- return aParts;
- // return mParts;
- }
-
- public static RenderTabulaBase getRenderer() {
- if (mRendererInstance == null) {
- mRendererInstance = new RenderTabulaBase(
- new ModelEggBox(),
- "textures/blocks/TileEntities/EggBox_full.png",
- TileEntityEggBox.class);
- }
- return mRendererInstance;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java b/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java
deleted file mode 100644
index 3c13c83391..0000000000
--- a/src/main/java/gtPlusPlus/core/client/model/tabula/ModelTabulaBase.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package gtPlusPlus.core.client.model.tabula;
-
-import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
-
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.data.Pair;
-
-/**
- * ModelEggBox - Alkalus Created using Tabula 4.1.1
- */
-public abstract class ModelTabulaBase extends ModelBase {
-
- public ModelTabulaBase(int aTexWidth, int aTexHeight) {
- this.textureWidth = aTexWidth;
- this.textureHeight = aTexHeight;
- }
-
- protected abstract AutoMap<Pair<ModelRenderer, Float>> getModelParts();
-
- public void renderAll() {
- for (Pair<ModelRenderer, Float> part : getModelParts()) {
- // Logger.INFO("Rendering EggBox");
- part.getKey().render(part.getValue());
- }
- }
-
- /**
- * This is a helper function from Tabula to set the rotation of model parts
- */
- public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
- modelRenderer.rotateAngleX = x;
- modelRenderer.rotateAngleY = y;
- modelRenderer.rotateAngleZ = z;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java b/src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java
deleted file mode 100644
index 0f962df641..0000000000
--- a/src/main/java/gtPlusPlus/core/client/renderer/RenderPotionthrow.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package gtPlusPlus.core.client.renderer;
-
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.entity.Render;
-import net.minecraft.client.renderer.texture.TextureMap;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.projectile.EntityPotion;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemPotion;
-import net.minecraft.potion.PotionHelper;
-import net.minecraft.util.IIcon;
-import net.minecraft.util.ResourceLocation;
-
-import org.lwjgl.opengl.GL11;
-import org.lwjgl.opengl.GL12;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-@SideOnly(Side.CLIENT)
-public class RenderPotionthrow extends Render {
-
- private Item mRenderItem;
- private int mDamage;
-
- public RenderPotionthrow(Item p_i1259_1_, int p_i1259_2_) {
- this.mRenderItem = p_i1259_1_;
- this.mDamage = p_i1259_2_;
- }
-
- public RenderPotionthrow(Item p_i1260_1_) {
- this(p_i1260_1_, 0);
- }
-
- /**
- * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
- * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
- * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
- * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
- */
- @Override
- public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_,
- float p_76986_9_) {
- IIcon iicon = this.mRenderItem.getIconFromDamage(this.mDamage);
-
- if (iicon != null) {
- GL11.glPushMatrix();
- GL11.glTranslatef((float) p_76986_2_, (float) p_76986_4_, (float) p_76986_6_);
- GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- GL11.glScalef(0.5F, 0.5F, 0.5F);
- this.bindEntityTexture(p_76986_1_);
- Tessellator tessellator = Tessellator.instance;
-
- if (iicon == ItemPotion.func_94589_d("bottle_splash")) {
- int i = PotionHelper.func_77915_a(((EntityPotion) p_76986_1_).getPotionDamage(), false);
- float f2 = (i >> 16 & 255) / 255.0F;
- float f3 = (i >> 8 & 255) / 255.0F;
- float f4 = (i & 255) / 255.0F;
- GL11.glColor3f(f2, f3, f4);
- GL11.glPushMatrix();
- this.func_77026_a(tessellator, ItemPotion.func_94589_d("overlay"));
- GL11.glPopMatrix();
- GL11.glColor3f(1.0F, 1.0F, 1.0F);
- }
-
- this.func_77026_a(tessellator, iicon);
- GL11.glDisable(GL12.GL_RESCALE_NORMAL);
- GL11.glPopMatrix();
- }
- }
-
- /**
- * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
- */
- @Override
- protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
- return TextureMap.locationItemsTexture;
- }
-
- private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
- float f = p_77026_2_.getMinU();
- float f1 = p_77026_2_.getMaxU();
- float f2 = p_77026_2_.getMinV();
- float f3 = p_77026_2_.getMaxV();
- float f4 = 1.0F;
- float f5 = 0.5F;
- float f6 = 0.25F;
- GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
- p_77026_1_.startDrawingQuads();
- p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
- p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
- p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
- p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
- p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
- p_77026_1_.draw();
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java b/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java
deleted file mode 100644
index ed3808e815..0000000000
--- a/src/main/java/gtPlusPlus/core/client/renderer/tabula/RenderTabulaBase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package gtPlusPlus.core.client.renderer.tabula;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ResourceLocation;
-
-import cpw.mods.fml.client.registry.RenderingRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.client.model.tabula.ModelTabulaBase;
-
-@SideOnly(Side.CLIENT)
-public class RenderTabulaBase extends TileEntitySpecialRenderer {
-
- private final ModelTabulaBase mModel;
- private final ResourceLocation mTexture;
- private final Class mTileClass;
-
- public final int mRenderID;
- public final RenderTabulaBase mInstance;
-
- public RenderTabulaBase(ModelTabulaBase aModel, String aTexturePath, Class aTileClass) {
- mModel = aModel;
- mTexture = new ResourceLocation(GTPlusPlus.ID, aTexturePath);
- mTileClass = aTileClass;
- this.mRenderID = RenderingRegistry.getNextAvailableRenderId();
- mInstance = this;
- }
-
- public void renderTileEntityAt(Object aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_,
- float p_147500_8_) {
- if (mTileClass.isInstance(aTile)) {
- // Logger.INFO("Rendering EggBox");
- this.bindTexture(mTexture);
- mModel.renderAll();
- }
- }
-
- @Override
- public void renderTileEntityAt(TileEntity aTile, double p_147500_2_, double p_147500_4_, double p_147500_6_,
- float p_147500_8_) {
- if (mTileClass != null && aTile != null) {
- if (mTileClass.isInstance(aTile)) {
- this.renderTileEntityAt((Object) aTile, p_147500_2_, p_147500_4_, p_147500_6_, p_147500_8_);
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/common/CommonProxy.java b/src/main/java/gtPlusPlus/core/common/CommonProxy.java
index d97cb80ba6..b5652af595 100644
--- a/src/main/java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/main/java/gtPlusPlus/core/common/CommonProxy.java
@@ -47,7 +47,6 @@ import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.tileentities.ModTileEntities;
import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.debug.DEBUG_INIT;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.player.PlayerCache;
@@ -104,11 +103,6 @@ public class CommonProxy {
}
public void init(final FMLInitializationEvent e) {
- // Debug Loading
- if (CORE_Preloader.DEBUG_MODE) {
- DEBUG_INIT.registerHandlers();
- }
-
registerCustomItemsForMaterials();
ModBlocks.blockCustomMobSpawner = new BlockGenericSpawner();
CI.init();
diff --git a/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java b/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java
index a960ec618a..1a01f47ef5 100644
--- a/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java
+++ b/src/main/java/gtPlusPlus/core/creative/AddToCreativeTab.java
@@ -16,13 +16,6 @@ public class AddToCreativeTab {
public static void initialiseTabs() {
// GT_CreativeTab
- /*
- * tabBlock = new MiscUtilCreativeTabBlock("MiscUtilBlockTab"); tabMisc = new
- * MiscUtilCreativeTabMisc("MiscUtilMiscTab"); tabTools = new MiscUtilCreativeTabTools("MiscUtilToolsTab");
- * tabMachines = new MiscUtilCreativeTabMachines("MiscUtilMachineTab"); tabOther = new
- * MiscUtilCreativeTabOther("MiscUtilOtherTab"); tabBOP = new MiscUtilsBOPTab("MiscUtilBOP");
- */
-
tabBlock = new GT_CreativeTab("GTPP_BLOCKS", "GT++ Blocks");
tabMisc = new GT_CreativeTab("GTPP_MISC", "GT++ Misc");
tabTools = new GT_CreativeTab("GTPP_TOOLS", "GT++ Tools");
diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java
deleted file mode 100644
index f7b2477398..0000000000
--- a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabBlock.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package gtPlusPlus.core.creative.tabs;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.Item;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class MiscUtilCreativeTabBlock extends CreativeTabs {
-
- public MiscUtilCreativeTabBlock(final String lable) {
- super(lable);
- }
-
- @Override
- public Item getTabIconItem() {
- return Item.getItemFromBlock(Blocks.bedrock);
- }
-
- @SideOnly(Side.CLIENT)
- @Override
- public int func_151243_f() {
- return 0;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java
deleted file mode 100644
index 57fb663d40..0000000000
--- a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMachines.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.creative.tabs;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-
-public class MiscUtilCreativeTabMachines extends CreativeTabs {
-
- public MiscUtilCreativeTabMachines(final String lable) {
- super(lable);
- }
-
- @Override
- public Item getTabIconItem() {
- return Items.netherbrick;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java
deleted file mode 100644
index 397474065f..0000000000
--- a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabMisc.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.creative.tabs;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-
-public class MiscUtilCreativeTabMisc extends CreativeTabs {
-
- public MiscUtilCreativeTabMisc(final String lable) {
- super(lable);
- }
-
- @Override
- public Item getTabIconItem() {
- return Items.painting;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java
deleted file mode 100644
index 7fb99db6f0..0000000000
--- a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabOther.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.creative.tabs;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-
-public class MiscUtilCreativeTabOther extends CreativeTabs {
-
- public MiscUtilCreativeTabOther(final String lable) {
- super(lable);
- }
-
- @Override
- public Item getTabIconItem() {
- return Items.repeater;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java b/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java
deleted file mode 100644
index 1c81c6b952..0000000000
--- a/src/main/java/gtPlusPlus/core/creative/tabs/MiscUtilCreativeTabTools.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.creative.tabs;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-
-public class MiscUtilCreativeTabTools extends CreativeTabs {
-
- public MiscUtilCreativeTabTools(final String lable) {
- super(lable);
- }
-
- @Override
- public Item getTabIconItem() {
- return Items.diamond_pickaxe;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java b/src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java
deleted file mode 100644
index d010624b8c..0000000000
--- a/src/main/java/gtPlusPlus/core/entity/EntityTeleportFX.java
+++ /dev/null
@@ -1,242 +0,0 @@
-package gtPlusPlus.core.entity;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.Items;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.MathHelper;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class EntityTeleportFX extends Entity {
-
- /** 'x' location the eye should float towards. */
- private double targetX;
- /** 'y' location the eye should float towards. */
- private double targetY;
- /** 'z' location the eye should float towards. */
- private double targetZ;
-
- private int despawnTimer;
- private boolean shatterOrDrop;
-
- public EntityTeleportFX(final World p_i1757_1_) {
- super(p_i1757_1_);
- this.setSize(0.25F, 0.25F);
- }
-
- @Override
- protected void entityInit() {}
-
- /**
- * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
- * length * 64 * renderDistanceWeight Args: distance
- */
- @Override
- @SideOnly(Side.CLIENT)
- public boolean isInRangeToRenderDist(final double p_70112_1_) {
- double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D;
- d1 *= 64.0D;
- return p_70112_1_ < (d1 * d1);
- }
-
- public EntityTeleportFX(final World p_i1758_1_, final double p_i1758_2_, final double p_i1758_4_,
- final double p_i1758_6_) {
- super(p_i1758_1_);
- this.despawnTimer = 0;
- this.setSize(0.25F, 0.25F);
- this.setPosition(p_i1758_2_, p_i1758_4_, p_i1758_6_);
- this.yOffset = 0.0F;
- }
-
- /**
- * The location the eye should float/move towards. Currently used for moving towards the nearest stronghold. Args:
- * strongholdX, strongholdY, strongholdZ
- */
- public void moveTowards(final double p_70220_1_, final int p_70220_3_, final double p_70220_4_) {
- final double d2 = p_70220_1_ - this.posX;
- final double d3 = p_70220_4_ - this.posZ;
- final float f = MathHelper.sqrt_double((d2 * d2) + (d3 * d3));
-
- if (f > 12.0F) {
- this.targetX = this.posX + ((d2 / f) * 12.0D);
- this.targetZ = this.posZ + ((d3 / f) * 12.0D);
- this.targetY = this.posY + 8.0D;
- } else {
- this.targetX = p_70220_1_;
- this.targetY = p_70220_3_;
- this.targetZ = p_70220_4_;
- }
-
- this.despawnTimer = 0;
- this.shatterOrDrop = this.rand.nextInt(5) > 0;
- }
-
- /**
- * Sets the velocity to the args. Args: x, y, z
- */
- @Override
- @SideOnly(Side.CLIENT)
- public void setVelocity(final double p_70016_1_, final double p_70016_3_, final double p_70016_5_) {
- this.motionX = p_70016_1_;
- this.motionY = p_70016_3_;
- this.motionZ = p_70016_5_;
-
- if ((this.prevRotationPitch == 0.0F) && (this.prevRotationYaw == 0.0F)) {
- final float f = MathHelper.sqrt_double((p_70016_1_ * p_70016_1_) + (p_70016_5_ * p_70016_5_));
- this.prevRotationYaw = this.rotationYaw = (float) ((Math.atan2(p_70016_1_, p_70016_5_) * 180.0D) / Math.PI);
- this.prevRotationPitch = this.rotationPitch = (float) ((Math.atan2(p_70016_3_, f) * 180.0D) / Math.PI);
- }
- }
-
- /**
- * Called to update the entity's position/logic.
- */
- @Override
- public void onUpdate() {
- this.lastTickPosX = this.posX;
- this.lastTickPosY = this.posY;
- this.lastTickPosZ = this.posZ;
- super.onUpdate();
- this.posX += this.motionX;
- this.posY += this.motionY;
- this.posZ += this.motionZ;
- final float f = MathHelper.sqrt_double((this.motionX * this.motionX) + (this.motionZ * this.motionZ));
- this.rotationYaw = (float) ((Math.atan2(this.motionX, this.motionZ) * 180.0D) / Math.PI);
-
- for (this.rotationPitch = (float) ((Math.atan2(this.motionY, f) * 180.0D) / Math.PI); (this.rotationPitch
- - this.prevRotationPitch) < -180.0F; this.prevRotationPitch -= 360.0F) {
- ;
- }
-
- while ((this.rotationPitch - this.prevRotationPitch) >= 180.0F) {
- this.prevRotationPitch += 360.0F;
- }
-
- while ((this.rotationYaw - this.prevRotationYaw) < -180.0F) {
- this.prevRotationYaw -= 360.0F;
- }
-
- while ((this.rotationYaw - this.prevRotationYaw) >= 180.0F) {
- this.prevRotationYaw += 360.0F;
- }
-
- this.rotationPitch = this.prevRotationPitch + ((this.rotationPitch - this.prevRotationPitch) * 0.2F);
- this.rotationYaw = this.prevRotationYaw + ((this.rotationYaw - this.prevRotationYaw) * 0.2F);
-
- if (!this.worldObj.isRemote) {
- final double d0 = this.targetX - this.posX;
- final double d1 = this.targetZ - this.posZ;
- final float f1 = (float) Math.sqrt((d0 * d0) + (d1 * d1));
- final float f2 = (float) Math.atan2(d1, d0);
- double d2 = f + ((f1 - f) * 0.0025D);
-
- if (f1 < 1.0F) {
- d2 *= 0.8D;
- this.motionY *= 0.8D;
- }
-
- this.motionX = Math.cos(f2) * d2;
- this.motionZ = Math.sin(f2) * d2;
-
- if (this.posY < this.targetY) {
- this.motionY += (1.0D - this.motionY) * 0.014999999664723873D;
- } else {
- this.motionY += (-1.0D - this.motionY) * 0.014999999664723873D;
- }
- }
-
- final float f3 = 0.25F;
-
- if (this.isInWater()) {
- for (int i = 0; i < 4; ++i) {
- this.worldObj.spawnParticle(
- "bubble",
- this.posX - (this.motionX * f3),
- this.posY - (this.motionY * f3),
- this.posZ - (this.motionZ * f3),
- this.motionX,
- this.motionY,
- this.motionZ);
- }
- } else {
- this.worldObj.spawnParticle(
- "portal",
- ((this.posX - (this.motionX * f3)) + (this.rand.nextDouble() * 0.6D)) - 0.3D,
- this.posY - (this.motionY * f3) - 0.5D,
- ((this.posZ - (this.motionZ * f3)) + (this.rand.nextDouble() * 0.6D)) - 0.3D,
- this.motionX,
- this.motionY,
- this.motionZ);
- }
-
- if (!this.worldObj.isRemote) {
- this.setPosition(this.posX, this.posY, this.posZ);
- ++this.despawnTimer;
-
- if ((this.despawnTimer > 80) && !this.worldObj.isRemote) {
- this.setDead();
-
- if (this.shatterOrDrop) {
- this.worldObj.spawnEntityInWorld(
- new EntityItem(
- this.worldObj,
- this.posX,
- this.posY,
- this.posZ,
- new ItemStack(Items.ender_eye)));
- } else {
- this.worldObj.playAuxSFX(
- 2003,
- (int) Math.round(this.posX),
- (int) Math.round(this.posY),
- (int) Math.round(this.posZ),
- 0);
- }
- }
- }
- }
-
- /**
- * (abstract) Protected helper method to write subclass entity data to NBT.
- */
- @Override
- public void writeEntityToNBT(final NBTTagCompound p_70014_1_) {}
-
- /**
- * (abstract) Protected helper method to read subclass entity data from NBT.
- */
- @Override
- public void readEntityFromNBT(final NBTTagCompound p_70037_1_) {}
-
- @Override
- @SideOnly(Side.CLIENT)
- public float getShadowSize() {
- return 0.0F;
- }
-
- /**
- * Gets how bright this entity is.
- */
- @Override
- public float getBrightness(final float p_70013_1_) {
- return 1.0F;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public int getBrightnessForRender(final float p_70070_1_) {
- return 15728880;
- }
-
- /**
- * If returns false, the item will not inflict any damage against entities.
- */
- @Override
- public boolean canAttackWithItem() {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java b/src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java
deleted file mode 100644
index b4a945ad7e..0000000000
--- a/src/main/java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java
+++ /dev/null
@@ -1,220 +0,0 @@
-package gtPlusPlus.core.gui.machine;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import net.minecraft.client.gui.GuiButton;
-import net.minecraft.client.gui.GuiOptionButton;
-import net.minecraft.client.gui.GuiResourcePackAvailable;
-import net.minecraft.client.gui.GuiResourcePackSelected;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.client.resources.ResourcePackListEntry;
-import net.minecraft.client.resources.ResourcePackListEntryFound;
-import net.minecraft.client.resources.ResourcePackRepository;
-import net.minecraft.client.resources.ResourcePackRepository.Entry;
-import net.minecraft.util.Util;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.lwjgl.Sys;
-
-import com.google.common.collect.Lists;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
-
-@SideOnly(Side.CLIENT)
-public class GUI_ScrollTest extends GuiScreen {
-
- private static final Logger logger = LogManager.getLogger();
- private GuiScreen aThisGUIScreen;
- private List<?> field_146966_g;
- private List<?> field_146969_h;
- private GuiResourcePackAvailable MapOfFreeResourcePacks;
- private GuiResourcePackSelected MapOfActiveResourcePacks;
-
- public GUI_ScrollTest(GuiScreen p_i45050_1_) {
- this.aThisGUIScreen = p_i45050_1_;
- }
-
- /**
- * Adds the buttons (and other controls) to the screen in question.
- */
- @Override
- @SuppressWarnings("unchecked")
- public void initGui() {
- this.buttonList.add(
- new GuiOptionButton(
- 2,
- this.width / 2 - 154,
- this.height - 48,
- I18n.format("resourcePack.openFolder", new Object[0])));
- this.buttonList.add(
- new GuiOptionButton(1, this.width / 2 + 4, this.height - 48, I18n.format("gui.done", new Object[0])));
- this.field_146966_g = new ArrayList<Object>();
- this.field_146969_h = new ArrayList<Entry>();
- ResourcePackRepository resourcepackrepository = this.mc.getResourcePackRepository();
- resourcepackrepository.updateRepositoryEntriesAll();
- ArrayList<?> arraylist = Lists.newArrayList(resourcepackrepository.getRepositoryEntriesAll());
- arraylist.removeAll(resourcepackrepository.getRepositoryEntries());
- Iterator<?> iterator = arraylist.iterator();
- ResourcePackRepository.Entry entry;
-
- while (iterator.hasNext()) {
- entry = (ResourcePackRepository.Entry) iterator.next();
- // this.field_146966_g.add(new ResourcePackListEntryFound(this, entry));
- }
-
- iterator = Lists.reverse(resourcepackrepository.getRepositoryEntries()).iterator();
-
- while (iterator.hasNext()) {
- entry = (ResourcePackRepository.Entry) iterator.next();
- // this.field_146969_h.add(new ResourcePackListEntryFound(this, entry));
- }
-
- // this.field_146969_h.add(new ResourcePackListEntryDefault(this));
- this.MapOfFreeResourcePacks = new GuiResourcePackAvailable(this.mc, 200, this.height, this.field_146966_g);
- this.MapOfFreeResourcePacks.setSlotXBoundsFromLeft(this.width / 2 - 4 - 200);
- this.MapOfFreeResourcePacks.registerScrollButtons(7, 8);
- this.MapOfActiveResourcePacks = new GuiResourcePackSelected(this.mc, 200, this.height, this.field_146969_h);
- this.MapOfActiveResourcePacks.setSlotXBoundsFromLeft(this.width / 2 + 4);
- this.MapOfActiveResourcePacks.registerScrollButtons(7, 8);
- }
-
- public boolean func_146961_a(ResourcePackListEntry p_146961_1_) {
- return this.field_146969_h.contains(p_146961_1_);
- }
-
- public List<?> func_146962_b(ResourcePackListEntry p_146962_1_) {
- return this.func_146961_a(p_146962_1_) ? this.field_146969_h : this.field_146966_g;
- }
-
- public List<?> func_146964_g() {
- return this.field_146966_g;
- }
-
- public List<?> func_146963_h() {
- return this.field_146969_h;
- }
-
- @Override
- protected void actionPerformed(GuiButton p_146284_1_) {
- if (p_146284_1_.enabled) {
- if (p_146284_1_.id == 2) {
- File file1 = this.mc.getResourcePackRepository().getDirResourcepacks();
- String s = file1.getAbsolutePath();
-
- if (Util.getOSType() == Util.EnumOS.OSX) {
- try {
- logger.info(s);
- Runtime.getRuntime().exec(new String[] { "/usr/bin/open", s });
- return;
- } catch (IOException ioexception1) {
- logger.error("Couldn\'t open file", ioexception1);
- }
- } else if (Util.getOSType() == Util.EnumOS.WINDOWS) {
- String s1 = String.format("cmd.exe /C start \"Open file\" \"%s\"", new Object[] { s });
-
- try {
- Runtime.getRuntime().exec(s1);
- return;
- } catch (IOException ioexception) {
- logger.error("Couldn\'t open file", ioexception);
- }
- }
-
- boolean flag = false;
-
- try {
- Class<?> oclass = ReflectionUtils.getClass("java.awt.Desktop");
- Object object = ReflectionUtils.getMethod(oclass, "getDesktop", new Class[0])
- .invoke((Object) null, new Object[0]);
- ReflectionUtils.getMethod(oclass, "browse", new Class[] { URI.class })
- .invoke(object, new Object[] { file1.toURI() });
- } catch (Throwable throwable) {
- logger.error("Couldn\'t open link", throwable);
- flag = true;
- }
-
- if (flag) {
- logger.info("Opening via system class!");
- Sys.openURL("file://" + s);
- }
- } else if (p_146284_1_.id == 1) {
- ArrayList<Entry> arraylist = Lists.newArrayList();
- Iterator<?> iterator = this.field_146969_h.iterator();
-
- while (iterator.hasNext()) {
- ResourcePackListEntry resourcepacklistentry = (ResourcePackListEntry) iterator.next();
-
- if (resourcepacklistentry instanceof ResourcePackListEntryFound) {
- arraylist.add(((ResourcePackListEntryFound) resourcepacklistentry).func_148318_i());
- }
- }
-
- Collections.reverse(arraylist);
- this.mc.getResourcePackRepository().func_148527_a(arraylist);
- this.mc.gameSettings.resourcePacks.clear();
- iterator = arraylist.iterator();
-
- while (iterator.hasNext()) {
- ResourcePackRepository.Entry entry = (ResourcePackRepository.Entry) iterator.next();
- this.mc.gameSettings.resourcePacks.add(entry.getResourcePackName());
- }
-
- this.mc.gameSettings.saveOptions();
- this.mc.refreshResources();
- this.mc.displayGuiScreen(this.aThisGUIScreen);
- }
- }
- }
-
- /**
- * Called when the mouse is clicked.
- */
- @Override
- protected void mouseClicked(int p_73864_1_, int p_73864_2_, int p_73864_3_) {
- super.mouseClicked(p_73864_1_, p_73864_2_, p_73864_3_);
- this.MapOfFreeResourcePacks.func_148179_a(p_73864_1_, p_73864_2_, p_73864_3_);
- this.MapOfActiveResourcePacks.func_148179_a(p_73864_1_, p_73864_2_, p_73864_3_);
- }
-
- /**
- * Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY, which) which==-1 is
- * mouseMove, which==0 or which==1 is mouseUp
- */
- @Override
- protected void mouseMovedOrUp(int p_146286_1_, int p_146286_2_, int p_146286_3_) {
- super.mouseMovedOrUp(p_146286_1_, p_146286_2_, p_146286_3_);
- }
-
- /**
- * Draws the screen and all the components in it.
- */
- @Override
- public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) {
- this.drawBackground(0);
- this.MapOfFreeResourcePacks.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
- this.MapOfActiveResourcePacks.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
- this.drawCenteredString(
- this.fontRendererObj,
- I18n.format("resourcePack.title", new Object[0]),
- this.width / 2,
- 16,
- 16777215);
- this.drawCenteredString(
- this.fontRendererObj,
- I18n.format("resourcePack.folderInfo", new Object[0]),
- this.width / 2 - 77,
- this.height - 26,
- 8421504);
- super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/handler/CraftingManager.java b/src/main/java/gtPlusPlus/core/handler/CraftingManager.java
deleted file mode 100644
index 7c7069b631..0000000000
--- a/src/main/java/gtPlusPlus/core/handler/CraftingManager.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package gtPlusPlus.core.handler;
-
-public class CraftingManager {
-
- public static void mainRegistry() {
- addCraftingRecipies();
- addSmeltingRecipies();
- }
-
- public static void addCraftingRecipies() {}
-
- public static void addSmeltingRecipies() {}
-}
diff --git a/src/main/java/gtPlusPlus/core/handler/events/PlayerTickHandler.java b/src/main/java/gtPlusPlus/core/handler/events/PlayerTickHandler.java
deleted file mode 100644
index 14d791bf54..0000000000
--- a/src/main/java/gtPlusPlus/core/handler/events/PlayerTickHandler.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import net.minecraft.entity.player.EntityPlayer;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class PlayerTickHandler {
-
- @SubscribeEvent
- public void onPlayerTick(net.minecraftforge.event.entity.player.PlayerOpenContainerEvent e) {
- if (e.entity instanceof EntityPlayer) {
- if (e.entityPlayer.openContainer != null) {}
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java b/src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
deleted file mode 100644
index a5cf61b066..0000000000
--- a/src/main/java/gtPlusPlus/core/handler/events/UnbreakableBlockManager.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package gtPlusPlus.core.handler.events;
-
-import net.minecraft.block.Block;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.metatileentity.BaseMetaTileEntity;
-import gregtech.api.metatileentity.BaseTileEntity;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaSafeBlock;
-
-public class UnbreakableBlockManager {
-
- private static boolean hasRun = false;
-
- public final BaseMetaTileEntity getmTileEntity() {
- return mTileEntity;
- }
-
- public final void setmTileEntity(final BaseMetaTileEntity mTileEntity /* , EntityPlayer aPlayer */) {
- UnbreakableBlockManager.mTileEntity = mTileEntity;
- if (!hasRun) {
- hasRun = true;
- this.makeIndestructible(/* aPlayer */ );
- } else {
- Logger.WARNING("Why do you run twice?");
- }
- }
-
- // BaseMetaTileEntity
- // GregtechMetaSafeBlock
- private static BaseMetaTileEntity mTileEntity = null;
-
- private void makeIndestructible(/* EntityPlayer aPlayer */ ) {
-
- Logger.WARNING("Initializing the code to set this TE to -1 hardness and make it indestructible.");
- final int X = mTileEntity.xCoord; // (GregtechMetaSafeBlock) this.mTileEntity.getXCoord();
- final int Y = mTileEntity.yCoord;
- final int Z = mTileEntity.zCoord;
- Logger.WARNING("Grabbing TileEntity @ [x,y,z] |" + X + "|" + Y + "|" + Z + "|");
-
- try {
- final GregtechMetaSafeBlock MetaSafeBlock = ((GregtechMetaSafeBlock) UnbreakableBlockManager.mTileEntity
- .getMetaTileEntity());
- final TileEntity BaseMetaTileEntity = mTileEntity.getTileEntity(X, Y, Z);
- // MetaSafeBlockBase.
- final World TE_WORLD = MetaSafeBlock.getBaseMetaTileEntity().getWorld();
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- final TileEntity entity = BaseMetaTileEntity;
- innerInvincible(MetaSafeBlock, entity, TE_WORLD, /* aPlayer, */ X, Y, Z);
- } catch (final NullPointerException e) {
- System.out.print("Caught a NullPointerException involving Safe Blocks. Cause: ");
- e.printStackTrace();
- }
- }
-
- private static void innerInvincible(final GregtechMetaSafeBlock MetaSafeBlock, final TileEntity entity,
- final World TE_WORLD, /* EntityPlayer aPlayer, */
- final int X, final int Y, final int Z) {
- if (entity != null) {
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- Logger.WARNING("Grabbed TE: " + entity.toString());
-
- if ((entity instanceof BaseTileEntity) && !(entity instanceof BaseMetaPipeEntity)) {
- final IMetaTileEntity I = ((BaseMetaTileEntity) entity).getMetaTileEntity();
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- Logger.WARNING(
- "I Details: " + I.getMetaName() + " | " + I.getTileEntityBaseType() + " | " + I.toString());
-
- if (I instanceof GregtechMetaSafeBlock) {
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
-
- final Block ThisBlock = I.getBaseMetaTileEntity().getBlock(X, Y, Z);
- Logger.WARNING("Block Details: " + ThisBlock.toString());
-
- if (((GregtechMetaSafeBlock) I).bUnbreakable) {
- ThisBlock.setHardness(Integer.MAX_VALUE);
- // ThisBlock.setResistance(18000000.0F);
- ThisBlock.setResistance(-1);
- ThisBlock.setBlockUnbreakable();
- Logger.WARNING(
- "Changing State of Flag. Old Value=" + MetaSafeBlock.bUnbreakable
- + " Expected Value=true");
- MetaSafeBlock.bUnbreakable = true;
- // entity.markDirty();
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- Logger.ERROR("New Indestructible Flag enabled.");
- // GT_Utility.sendChatToPlayer(aPlayer, "Block is now unbreakable.");
- } else {
- ThisBlock.setHardness(1);
- ThisBlock.setResistance(1.0F);
- Logger.WARNING(
- "Changing State of Flag. Old Value=" + MetaSafeBlock.bUnbreakable
- + " Expected Value=false");
- MetaSafeBlock.bUnbreakable = false;
- // entity.markDirty();
- Logger.WARNING("Checking new State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- Logger.ERROR("New Indestructible Flag disabled.");
- // GT_Utility.sendChatToPlayer(aPlayer, "Block is now breakable.");
- }
-
- // entity.markDirty();
-
- Logger.WARNING("Block Hardness: " + ThisBlock.getBlockHardness(TE_WORLD, X, Y, Z));
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- hasRun = false;
-
- } else {
- Logger.WARNING("I is not an instanceof MetaSafeBlockBase");
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- }
- } else {
- Logger.WARNING("TE is not an instanceof BaseTileEntity or may be a pipe.");
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- }
- } else {
- Logger.WARNING("Did not grab a TE instance to make a block instance from.");
- Logger.WARNING("Checking State of Flag[nUnbreakable]. Value=" + MetaSafeBlock.bUnbreakable);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java b/src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java
deleted file mode 100644
index 26d944c96d..0000000000
--- a/src/main/java/gtPlusPlus/core/handler/render/CapeHandler.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package gtPlusPlus.core.handler.render;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.Collection;
-
-import net.minecraft.client.entity.AbstractClientPlayer;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.renderer.entity.RenderManager;
-import net.minecraft.client.renderer.entity.RenderPlayer;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.MathHelper;
-import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-
-import org.lwjgl.opengl.GL11;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.core.lib.CORE;
-
-public class CapeHandler extends RenderPlayer {
-
- private final ResourceLocation[] mCapes = { new ResourceLocation(GTPlusPlus.ID + ":textures/TesterCape.png"),
- new ResourceLocation(GTPlusPlus.ID + ":textures/Draknyte1.png"),
- new ResourceLocation("gregtech:textures/GregoriusCape.png") };
- private final Collection<String> mCapeList;
-
- public CapeHandler(final Collection<String> aCapeList) {
- this.mCapeList = aCapeList;
- this.setRenderManager(RenderManager.instance);
- }
-
- public void receiveRenderSpecialsEvent(final RenderPlayerEvent.Specials.Pre aEvent) {
- final AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
- if (GT_Utility.getFullInvisibility(aPlayer)) {
- aEvent.setCanceled(true);
- return;
- }
- final float aPartialTicks = aEvent.partialRenderTick;
- if (aPlayer.isInvisible()) {
- return;
- }
- if (GT_Utility.getPotion(aPlayer, Integer.valueOf(Potion.invisibility.id).intValue())) {
- return;
- }
- try {
- ResourceLocation tResource = null;
- if (aPlayer.getDisplayName().equalsIgnoreCase("XW3B")) {
- tResource = this.mCapes[0];
- }
- if (this.mCapeList.contains(aPlayer.getDisplayName().toLowerCase())) {
- tResource = this.mCapes[0];
- }
- if (aPlayer.getDisplayName().equalsIgnoreCase("Draknyte1")) {
- tResource = this.mCapes[1];
- }
- if (aPlayer.getDisplayName().equalsIgnoreCase("GregoriusT")) {
- tResource = this.mCapes[2];
- }
- if ((tResource != null) && (!(aPlayer.getHideCape()))) {
- this.bindTexture(tResource);
- GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- final double d0 = (aPlayer.field_71091_bM
- + ((aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks))
- - (aPlayer.prevPosX + ((aPlayer.posX - aPlayer.prevPosX) * aPartialTicks));
- final double d1 = (aPlayer.field_71096_bN
- + ((aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks))
- - (aPlayer.prevPosY + ((aPlayer.posY - aPlayer.prevPosY) * aPartialTicks));
- final double d2 = (aPlayer.field_71097_bO
- + ((aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks))
- - (aPlayer.prevPosZ + ((aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks));
- final float f6 = aPlayer.prevRenderYawOffset
- + ((aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks);
- final double d3 = MathHelper.sin((f6 * CORE.PI) / 180.0F);
- final double d4 = -MathHelper.cos((f6 * CORE.PI) / 180.0F);
- float f7 = (float) d1 * 10.0F;
- float f8 = (float) ((d0 * d3) + (d2 * d4)) * 100.0F;
- final float f9 = (float) ((d0 * d4) - (d2 * d3)) * 100.0F;
- if (f7 < -6.0F) {
- f7 = -6.0F;
- }
- if (f7 > 32.0F) {
- f7 = 32.0F;
- }
- if (f8 < 0.0F) {
- f8 = 0.0F;
- }
- final float f10 = aPlayer.prevCameraYaw + ((aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks);
- f7 += MathHelper.sin(
- (aPlayer.prevDistanceWalkedModified
- + ((aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified)
- * aPartialTicks))
- * 6.0F)
- * 32.0F
- * f10;
- if (aPlayer.isSneaking()) {
- f7 += 25.0F;
- }
- GL11.glRotatef(6.0F + (f8 / 2.0F) + f7, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F);
- GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
- ((ModelBiped) this.mainModel).renderCloak(0.0625F);
- GL11.glPopMatrix();
- }
- } catch (final Throwable e) {
- if (GT_Values.D1) {
- e.printStackTrace(GT_Log.err);
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java b/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java
deleted file mode 100644
index 964aaf2bf7..0000000000
--- a/src/main/java/gtPlusPlus/core/handler/workbench/Workbench_RecipeSorter.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package gtPlusPlus.core.handler.workbench;
-
-import java.util.Comparator;
-
-import net.minecraft.item.crafting.IRecipe;
-import net.minecraft.item.crafting.ShapedRecipes;
-import net.minecraft.item.crafting.ShapelessRecipes;
-
-public class Workbench_RecipeSorter implements Comparator<Object> {
-
- final Workbench_CraftingHandler CraftingManagerCrafter;
-
- Workbench_RecipeSorter(final Workbench_CraftingHandler par1CraftingManager) {
- this.CraftingManagerCrafter = par1CraftingManager;
- }
-
- public int compareRecipes(final IRecipe par1IRecipe, final IRecipe par2IRecipe) {
- if ((par1IRecipe instanceof ShapelessRecipes) && (par2IRecipe instanceof ShapedRecipes)) {
- return 1;
- }
-
- if ((par2IRecipe instanceof ShapelessRecipes) && (par1IRecipe instanceof ShapedRecipes)) {
- return -1;
- }
-
- if (par2IRecipe.getRecipeSize() < par1IRecipe.getRecipeSize()) {
- return -1;
- }
-
- return par2IRecipe.getRecipeSize() <= par1IRecipe.getRecipeSize() ? 0 : 1;
- }
-
- @Override
- public int compare(final Object par1Obj, final Object par2Obj) {
- return this.compareRecipes((IRecipe) par1Obj, (IRecipe) par2Obj);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java
deleted file mode 100644
index 08e238241c..0000000000
--- a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchChest.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package gtPlusPlus.core.inventories;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-
-public class InventoryWorkbenchChest implements IInventory {
-
- private final String name = "Inventory Chest";
-
- /** Defining your inventory size this way is handy */
- public static final int INV_SIZE = 16;
-
- /** Inventory's size must be same as number of slots you add to the Container class */
- private ItemStack[] inventory = new ItemStack[INV_SIZE];
-
- /**
- * @param itemstack - the ItemStack to which this inventory belongs
- */
- public InventoryWorkbenchChest() {}
-
- public void readFromNBT(final NBTTagCompound nbt) {
- final NBTTagList list = nbt.getTagList("Items", 10);
- this.inventory = new ItemStack[INV_SIZE];
- for (int i = 0; i < list.tagCount(); i++) {
- final NBTTagCompound data = list.getCompoundTagAt(i);
- final int slot = data.getInteger("Slot");
- if ((slot >= 0) && (slot < INV_SIZE)) {
- this.inventory[slot] = ItemStack.loadItemStackFromNBT(data);
- }
- }
- }
-
- public void writeToNBT(final NBTTagCompound nbt) {
- final NBTTagList list = new NBTTagList();
- for (int i = 0; i < INV_SIZE; i++) {
- final ItemStack stack = this.inventory[i];
- if (stack != null) {
- final NBTTagCompound data = new NBTTagCompound();
- stack.writeToNBT(data);
- data.setInteger("Slot", i);
- list.appendTag(data);
- }
- }
- nbt.setTag("Items", list);
- }
-
- @Override
- public int getSizeInventory() {
- return this.inventory.length;
- }
-
- public ItemStack[] getInventory() {
- return this.inventory;
- }
-
- @Override
- public ItemStack getStackInSlot(final int slot) {
- return this.inventory[slot];
- }
-
- @Override
- public ItemStack decrStackSize(final int slot, final int amount) {
- ItemStack stack = this.getStackInSlot(slot);
- if (stack != null) {
- if (stack.stackSize > amount) {
- stack = stack.splitStack(amount);
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- } else {
- // this method also calls markDirty, so we don't need to call it again
- this.setInventorySlotContents(slot, null);
- }
- }
- return stack;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(final int slot) {
- final ItemStack stack = this.getStackInSlot(slot);
- this.setInventorySlotContents(slot, null);
- return stack;
- }
-
- @Override
- public void setInventorySlotContents(final int slot, final ItemStack stack) {
- this.inventory[slot] = stack;
-
- if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) {
- stack.stackSize = this.getInventoryStackLimit();
- }
-
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- }
-
- // 1.7.2+ renamed to getInventoryName
- @Override
- public String getInventoryName() {
- return this.name;
- }
-
- // 1.7.2+ renamed to hasCustomInventoryName
- @Override
- public boolean hasCustomInventoryName() {
- return this.name.length() > 0;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 64;
- }
-
- /**
- * This is the method that will handle saving the inventory contents, as it is called (or should be called!) anytime
- * the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also let you change
- * things in your inventory without ever opening a Gui, if you want.
- */
- // 1.7.2+ renamed to markDirty
- @Override
- public void markDirty() {
- for (int i = 0; i < this.getSizeInventory(); ++i) {
- final ItemStack temp = this.getStackInSlot(i);
- if (temp != null) {
- // Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize);
- }
-
- if ((temp != null) && (temp.stackSize == 0)) {
- this.inventory[i] = null;
- }
- }
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
- return true;
- }
-
- // 1.7.2+ renamed to openInventory(EntityPlayer player)
- @Override
- public void openInventory() {}
-
- // 1.7.2+ renamed to closeInventory(EntityPlayer player)
- @Override
- public void closeInventory() {}
-
- /**
- * This method doesn't seem to do what it claims to do, as items can still be left-clicked and placed in the
- * inventory even when this returns false
- */
- @Override
- public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) {
- // Don't want to be able to store the inventory item within itself
- // Bad things will happen, like losing your inventory
- // Actually, this needs a custom Slot to work
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java
deleted file mode 100644
index 2dd44c9ea7..0000000000
--- a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchCrafting.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package gtPlusPlus.core.inventories;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.Container;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-
-public class InventoryWorkbenchCrafting implements IInventory {
-
- private final String name = "Inventory Crafting";
-
- /** Defining your inventory size this way is handy */
- public static final int INV_SIZE = 9;
-
- /** Inventory's size must be same as number of slots you add to the Container class */
- private ItemStack[] inventory = new ItemStack[INV_SIZE];
-
- public final InventoryCrafting craftMatrix;
- public final Container parentContainer;
-
- public InventoryCrafting getCrafting() {
- return this.craftMatrix;
- }
-
- /**
- * @param itemstack - the ItemStack to which this inventory belongs
- */
- public InventoryWorkbenchCrafting(final Container containerR) {
- this.parentContainer = containerR;
- this.craftMatrix = new InventoryCrafting(this.parentContainer, 3, 3);
- }
-
- private ItemStack[] getArrayOfCraftingItems() {
- final ItemStack[] array = new ItemStack[9];
- for (int i = 0; i < this.craftMatrix.getSizeInventory(); i++) {
- if (this.craftMatrix.getStackInSlot(i) != null) {
- array[i] = this.craftMatrix.getStackInSlot(i);
- }
- }
- return array;
- }
-
- public void readFromNBT(final NBTTagCompound nbt) {
- final NBTTagList list = nbt.getTagList("Items", 10);
- this.inventory = new ItemStack[INV_SIZE];
- for (int i = 0; i < list.tagCount(); i++) {
- final NBTTagCompound data = list.getCompoundTagAt(i);
- final int slot = data.getInteger("Slot");
- if ((slot >= 0) && (slot < INV_SIZE)) {
- this.getInventory()[slot] = ItemStack.loadItemStackFromNBT(data);
- }
- }
- }
-
- public void writeToNBT(final NBTTagCompound nbt) {
- final NBTTagList list = new NBTTagList();
- for (int i = 0; i < INV_SIZE; i++) {
- final ItemStack stack = this.getInventory()[i];
- if (stack != null) {
- final NBTTagCompound data = new NBTTagCompound();
- stack.writeToNBT(data);
- data.setInteger("Slot", i);
- list.appendTag(data);
- }
- }
- nbt.setTag("Items", list);
- }
-
- @Override
- public int getSizeInventory() {
- return this.getInventory().length;
- }
-
- public ItemStack[] getInventory() {
- return this.getArrayOfCraftingItems();
- }
-
- @Override
- public ItemStack getStackInSlot(final int slot) {
- return this.getInventory()[slot];
- }
-
- @Override
- public ItemStack decrStackSize(final int slot, final int amount) {
- ItemStack stack = this.getStackInSlot(slot);
- if (stack != null) {
- if (stack.stackSize > amount) {
- stack = stack.splitStack(amount);
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- } else {
- // this method also calls markDirty, so we don't need to call it again
- this.setInventorySlotContents(slot, null);
- }
- }
- return stack;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(final int slot) {
- final ItemStack stack = this.getStackInSlot(slot);
- this.setInventorySlotContents(slot, null);
- return stack;
- }
-
- @Override
- public void setInventorySlotContents(final int slot, final ItemStack stack) {
- this.getInventory()[slot] = stack;
-
- if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) {
- stack.stackSize = this.getInventoryStackLimit();
- }
-
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- }
-
- // 1.7.2+ renamed to getInventoryName
- @Override
- public String getInventoryName() {
- return this.name;
- }
-
- // 1.7.2+ renamed to hasCustomInventoryName
- @Override
- public boolean hasCustomInventoryName() {
- return this.name.length() > 0;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 64;
- }
-
- /**
- * This is the method that will handle saving the inventory contents, as it is called (or should be called!) anytime
- * the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also let you change
- * things in your inventory without ever opening a Gui, if you want.
- */
- // 1.7.2+ renamed to markDirty
- @Override
- public void markDirty() {
- for (int i = 0; i < this.getSizeInventory(); ++i) {
- if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) {
- this.getInventory()[i] = null;
- }
- }
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
- return true;
- }
-
- // 1.7.2+ renamed to openInventory(EntityPlayer player)
- @Override
- public void openInventory() {}
-
- // 1.7.2+ renamed to closeInventory(EntityPlayer player)
- @Override
- public void closeInventory() {}
-
- /**
- * This method doesn't seem to do what it claims to do, as items can still be left-clicked and placed in the
- * inventory even when this returns false
- */
- @Override
- public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) {
- // Don't want to be able to store the inventory item within itself
- // Bad things will happen, like losing your inventory
- // Actually, this needs a custom Slot to work
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java
deleted file mode 100644
index 0c1a9bf5f0..0000000000
--- a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloCrafting.java
+++ /dev/null
@@ -1,120 +0,0 @@
-package gtPlusPlus.core.inventories;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-
-public class InventoryWorkbenchHoloCrafting implements IInventory {
-
- private final String name = "Inventory Crafting";
-
- /** Defining your inventory size this way is handy */
- public static final int INV_SIZE = 9;
-
- /** Inventory's size must be same as number of slots you add to the Container class */
- private final ItemStack[] inventory = new ItemStack[INV_SIZE];
-
- /**
- * @param itemstack - the ItemStack to which this inventory belongs
- */
- public InventoryWorkbenchHoloCrafting() {}
-
- /*
- * public void readFromNBT(NBTTagCompound nbt) { NBTTagList list = nbt.getTagList("Items", 10); inventory = new
- * ItemStack[INV_SIZE]; for(int i = 0;i<list.tagCount();i++) { NBTTagCompound data = list.getCompoundTagAt(i); int
- * slot = data.getInteger("Slot"); if(slot >= 0 && slot < INV_SIZE) { inventory[slot] =
- * ItemStack.loadItemStackFromNBT(data); } } } public void writeToNBT(NBTTagCompound nbt) { NBTTagList list = new
- * NBTTagList(); for(int i = 0;i<INV_SIZE;i++) { ItemStack stack = inventory[i]; if(stack != null) { NBTTagCompound
- * data = new NBTTagCompound(); stack.writeToNBT(data); data.setInteger("Slot", i); list.appendTag(data); } }
- * nbt.setTag("Items", list); }
- */
-
- @Override
- public int getSizeInventory() {
- return this.inventory.length;
- }
-
- public ItemStack[] getInventory() {
- return this.inventory;
- }
-
- @Override
- public ItemStack getStackInSlot(final int slot) {
- return this.inventory[slot];
- }
-
- @Override
- public ItemStack decrStackSize(final int slot, final int amount) {
- ItemStack stack = this.getStackInSlot(slot);
- if (stack != null) {
- if (stack.stackSize > amount) {
- stack = stack.splitStack(amount);
- this.markDirty();
- } else {
- this.setInventorySlotContents(slot, null);
- }
- }
- return stack;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(final int slot) {
- final ItemStack stack = this.getStackInSlot(slot);
- this.setInventorySlotContents(slot, null);
- return stack;
- }
-
- @Override
- public void setInventorySlotContents(final int slot, final ItemStack stack) {
- this.inventory[slot] = stack;
- if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) {
- stack.stackSize = this.getInventoryStackLimit();
- }
- this.markDirty();
- }
-
- @Override
- public String getInventoryName() {
- return this.name;
- }
-
- @Override
- public boolean hasCustomInventoryName() {
- return this.name.length() > 0;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 64;
- }
-
- @Override
- public void markDirty() {
- for (int i = 0; i < this.getSizeInventory(); ++i) {
- final ItemStack temp = this.getStackInSlot(i);
- if (temp != null) {
- // Utils.LOG_INFO("Slot "+i+" contains "+temp.getDisplayName()+" x"+temp.stackSize);
- }
-
- if ((temp != null) && (temp.stackSize == 0)) {
- this.inventory[i] = null;
- }
- }
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
- return true;
- }
-
- @Override
- public void openInventory() {}
-
- @Override
- public void closeInventory() {}
-
- @Override
- public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
deleted file mode 100644
index 36ad85052f..0000000000
--- a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchHoloSlots.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package gtPlusPlus.core.inventories;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.InventoryCraftResult;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-
-import gtPlusPlus.api.objects.Logger;
-
-public class InventoryWorkbenchHoloSlots implements IInventory {
-
- private final String name = "Inventory Holo";
-
- // Output Slot
- public IInventory craftResult = new InventoryCraftResult();
-
- /** Defining your inventory size this way is handy */
- public static final int INV_SIZE = 6;
-
- /** Inventory's size must be same as number of slots you add to the Container class */
- private ItemStack[] inventory = new ItemStack[INV_SIZE];
-
- /**
- * @param itemstack - the ItemStack to which this inventory belongs
- */
- public InventoryWorkbenchHoloSlots() {}
-
- public void readFromNBT(final NBTTagCompound nbt) {
- final NBTTagList list = nbt.getTagList("Items", 10);
- this.inventory = new ItemStack[INV_SIZE];
- for (int i = 0; i < list.tagCount(); i++) {
- final NBTTagCompound data = list.getCompoundTagAt(i);
- final int slot = data.getInteger("Slot");
- if ((slot >= 1) && (slot < INV_SIZE)) {
- this.inventory[slot] = ItemStack.loadItemStackFromNBT(data);
- }
- }
- }
-
- public void writeToNBT(final NBTTagCompound nbt) {
- final NBTTagList list = new NBTTagList();
- for (int i = 0; i < INV_SIZE; i++) {
- final ItemStack stack = this.inventory[i];
- if ((stack != null) && (i != 0)) {
- final NBTTagCompound data = new NBTTagCompound();
- stack.writeToNBT(data);
- data.setInteger("Slot", i);
- list.appendTag(data);
- }
- }
- nbt.setTag("Items", list);
- }
-
- @Override
- public int getSizeInventory() {
- return this.inventory.length;
- }
-
- public ItemStack[] getInventory() {
- return this.inventory;
- }
-
- @Override
- public ItemStack getStackInSlot(final int slot) {
- return this.inventory[slot];
- }
-
- @Override
- public void setInventorySlotContents(final int slot, final ItemStack stack) {
- this.inventory[slot] = stack;
-
- if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) {
- stack.stackSize = this.getInventoryStackLimit();
- }
-
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- }
-
- // 1.7.2+ renamed to getInventoryName
- @Override
- public String getInventoryName() {
- return this.name;
- }
-
- // 1.7.2+ renamed to hasCustomInventoryName
- @Override
- public boolean hasCustomInventoryName() {
- return this.name.length() > 0;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 1;
- }
-
- /**
- * This is the method that will handle saving the inventory contents, as it is called (or should be called!) anytime
- * the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also let you change
- * things in your inventory without ever opening a Gui, if you want.
- */
- // 1.7.2+ renamed to markDirty
- @Override
- public void markDirty() {
- for (int i = 0; i < this.getSizeInventory(); ++i) {
- if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) {
- this.inventory[i] = null;
- }
- }
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
- return true;
- }
-
- // 1.7.2+ renamed to openInventory(EntityPlayer player)
- @Override
- public void openInventory() {}
-
- // 1.7.2+ renamed to closeInventory(EntityPlayer player)
- @Override
- public void closeInventory() {}
-
- /**
- * This method doesn't seem to do what it claims to do, as items can still be left-clicked and placed in the
- * inventory even when this returns false
- */
- @Override
- public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) {
- return false;
- }
-
- /** A list of one item containing the result of the crafting formula */
- private final ItemStack[] stackResult = new ItemStack[1];
-
- /**
- * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
- * new stack.
- */
- /*
- * @Override public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) { ItemStack stack = getStackInSlot(0);
- * if (this.stackResult[0] != null) { ItemStack itemstack = this.stackResult[0]; this.stackResult[0] = null; return
- * itemstack; } if(stack != null) { if(stack.stackSize > p_70298_2_) { stack = stack.splitStack(p_70298_2_); //
- * Don't forget this line or your inventory will not be saved! markDirty(); } else { // this method also calls
- * markDirty, so we don't need to call it again setInventorySlotContents(p_70298_1_, null); } } return stack; }
- */
- @Override
- public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) {
- if (this.getStackInSlot(0) != null) {
- Logger.INFO("getStackInSlot(0) contains " + this.getStackInSlot(0).getDisplayName());
- if (this.stackResult[0] == null) {
- Logger.INFO("this.stackResult[0] == null");
- this.stackResult[0] = this.getStackInSlot(0);
- } else if (this.stackResult[0] != null) {
- Logger.INFO("this.stackResult[0] != null");
- if (this.stackResult[0].getDisplayName().toLowerCase()
- .equals(this.getStackInSlot(0).getDisplayName().toLowerCase())) {
- Logger.INFO("Items are the same?");
- } else {
- Logger.INFO("Items are not the same.");
- }
- }
- }
-
- if (this.stackResult[0] != null) {
- Logger.INFO(
- "this.stackResult[0] != null - Really never should be though. - Returning "
- + this.stackResult[0].getDisplayName());
- final ItemStack itemstack = this.stackResult[0];
- this.stackResult[0] = null;
- return itemstack;
- }
- return null;
- }
-
- /**
- * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
- * like when you close a workbench GUI.
- */
- @Override
- public ItemStack getStackInSlotOnClosing(final int p_70304_1_) {
- if (this.stackResult[0] != null) {
- final ItemStack itemstack = this.stackResult[0];
- this.stackResult[0] = null;
- return itemstack;
- }
- return null;
- }
-}
-
-// Default Behaviour
-/*
- * @Override public ItemStack decrStackSize(int slot, int amount) { if(stack != null) { if(stack.stackSize > amount) {
- * stack = stack.splitStack(amount); // Don't forget this line or your inventory will not be saved! markDirty(); } else
- * { // this method also calls markDirty, so we don't need to call it again setInventorySlotContents(slot, null); } }
- * return stack; }
- */
-
-// Default Behaviour
-/*
- * @Override public ItemStack getStackInSlotOnClosing(int slot) { ItemStack stack = getStackInSlot(slot);
- * setInventorySlotContents(slot, null); return stack; }
- */
diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java
deleted file mode 100644
index a15527f935..0000000000
--- a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchTools.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package gtPlusPlus.core.inventories;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-
-import gregtech.api.items.GT_MetaGenerated_Tool;
-
-public class InventoryWorkbenchTools implements IInventory {
-
- private final String name = "Inventory Tools";
-
- /** Defining your inventory size this way is handy */
- public static final int INV_SIZE = 5;
-
- /** Inventory's size must be same as number of slots you add to the Container class */
- private ItemStack[] inventory = new ItemStack[INV_SIZE];
-
- /**
- * @param itemstack - the ItemStack to which this inventory belongs
- */
- public InventoryWorkbenchTools() {}
-
- public void readFromNBT(final NBTTagCompound nbt) {
- final NBTTagList list = nbt.getTagList("Items", 10);
- this.inventory = new ItemStack[INV_SIZE];
- for (int i = 0; i < list.tagCount(); i++) {
- final NBTTagCompound data = list.getCompoundTagAt(i);
- final int slot = data.getInteger("Slot");
- if ((slot >= 0) && (slot < INV_SIZE)) {
- this.inventory[slot] = ItemStack.loadItemStackFromNBT(data);
- }
- }
- }
-
- public void writeToNBT(final NBTTagCompound nbt) {
- final NBTTagList list = new NBTTagList();
- for (int i = 0; i < INV_SIZE; i++) {
- final ItemStack stack = this.inventory[i];
- if (stack != null) {
- final NBTTagCompound data = new NBTTagCompound();
- stack.writeToNBT(data);
- data.setInteger("Slot", i);
- list.appendTag(data);
- }
- }
- nbt.setTag("Items", list);
- }
-
- @Override
- public int getSizeInventory() {
- return this.inventory.length;
- }
-
- public ItemStack[] getInventory() {
- return this.inventory;
- }
-
- @Override
- public ItemStack getStackInSlot(final int slot) {
- return this.inventory[slot];
- }
-
- @Override
- public ItemStack decrStackSize(final int slot, final int amount) {
- ItemStack stack = this.getStackInSlot(slot);
- if (stack != null) {
- if (stack.stackSize > amount) {
- stack = stack.splitStack(amount);
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- } else {
- // this method also calls markDirty, so we don't need to call it again
- this.setInventorySlotContents(slot, null);
- }
- }
- return stack;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(final int slot) {
- final ItemStack stack = this.getStackInSlot(slot);
- this.setInventorySlotContents(slot, null);
- return stack;
- }
-
- @Override
- public void setInventorySlotContents(final int slot, final ItemStack stack) {
- this.inventory[slot] = stack;
-
- if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) {
- stack.stackSize = this.getInventoryStackLimit();
- }
-
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- }
-
- // 1.7.2+ renamed to getInventoryName
- @Override
- public String getInventoryName() {
- return this.name;
- }
-
- // 1.7.2+ renamed to hasCustomInventoryName
- @Override
- public boolean hasCustomInventoryName() {
- return this.name.length() > 0;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 1;
- }
-
- /**
- * This is the method that will handle saving the inventory contents, as it is called (or should be called!) anytime
- * the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also let you change
- * things in your inventory without ever opening a Gui, if you want.
- */
- // 1.7.2+ renamed to markDirty
- @Override
- public void markDirty() {
- for (int i = 0; i < this.getSizeInventory(); ++i) {
- if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) {
- this.inventory[i] = null;
- }
- }
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
- return true;
- }
-
- // 1.7.2+ renamed to openInventory(EntityPlayer player)
- @Override
- public void openInventory() {}
-
- // 1.7.2+ renamed to closeInventory(EntityPlayer player)
- @Override
- public void closeInventory() {}
-
- /**
- * This method doesn't seem to do what it claims to do, as items can still be left-clicked and placed in the
- * inventory even when this returns false
- */
- @Override
- public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) {
- // Don't want to be able to store the inventory item within itself
- // Bad things will happen, like losing your inventory
- // Actually, this needs a custom Slot to work
- if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) {
- return true;
- }
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java b/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java
deleted file mode 100644
index 91965f4826..0000000000
--- a/src/main/java/gtPlusPlus/core/inventories/InventoryWorkbenchToolsElectric.java
+++ /dev/null
@@ -1,165 +0,0 @@
-package gtPlusPlus.core.inventories;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gtPlusPlus.core.slots.SlotGtToolElectric;
-import ic2.api.item.IElectricItem;
-
-public class InventoryWorkbenchToolsElectric implements IInventory {
-
- private final String name = "Inventory Tools";
-
- /** Defining your inventory size this way is handy */
- public static final int INV_SIZE = 5;
-
- /** Inventory's size must be same as number of slots you add to the Container class */
- private ItemStack[] inventory = new ItemStack[INV_SIZE];
-
- private final Slot[] toolSlots = new SlotGtToolElectric[INV_SIZE]; // TODO
-
- /**
- * @param itemstack - the ItemStack to which this inventory belongs
- */
- public InventoryWorkbenchToolsElectric() {}
-
- public void readFromNBT(final NBTTagCompound nbt) {
- final NBTTagList list = nbt.getTagList("Items", 10);
- this.inventory = new ItemStack[INV_SIZE];
- for (int i = 0; i < list.tagCount(); i++) {
- final NBTTagCompound data = list.getCompoundTagAt(i);
- final int slot = data.getInteger("Slot");
- if ((slot >= 0) && (slot < INV_SIZE)) {
- this.inventory[slot] = ItemStack.loadItemStackFromNBT(data);
- }
- }
- }
-
- public void writeToNBT(final NBTTagCompound nbt) {
- final NBTTagList list = new NBTTagList();
- for (int i = 0; i < INV_SIZE; i++) {
- final ItemStack stack = this.inventory[i];
- if (stack != null) {
- final NBTTagCompound data = new NBTTagCompound();
- stack.writeToNBT(data);
- data.setInteger("Slot", i);
- list.appendTag(data);
- }
- }
- nbt.setTag("Items", list);
- }
-
- @Override
- public int getSizeInventory() {
- return this.inventory.length;
- }
-
- public ItemStack[] getInventory() {
- return this.inventory;
- }
-
- @Override
- public ItemStack getStackInSlot(final int slot) {
- return this.inventory[slot];
- }
-
- @Override
- public ItemStack decrStackSize(final int slot, final int amount) {
- ItemStack stack = this.getStackInSlot(slot);
- if (stack != null) {
- if (stack.stackSize > amount) {
- stack = stack.splitStack(amount);
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- } else {
- // this method also calls markDirty, so we don't need to call it again
- this.setInventorySlotContents(slot, null);
- }
- }
- return stack;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(final int slot) {
- final ItemStack stack = this.getStackInSlot(slot);
- this.setInventorySlotContents(slot, null);
- return stack;
- }
-
- @Override
- public void setInventorySlotContents(final int slot, final ItemStack stack) {
- this.inventory[slot] = stack;
-
- if ((stack != null) && (stack.stackSize > this.getInventoryStackLimit())) {
- stack.stackSize = this.getInventoryStackLimit();
- }
-
- // Don't forget this line or your inventory will not be saved!
- this.markDirty();
- }
-
- // 1.7.2+ renamed to getInventoryName
- @Override
- public String getInventoryName() {
- return this.name;
- }
-
- // 1.7.2+ renamed to hasCustomInventoryName
- @Override
- public boolean hasCustomInventoryName() {
- return this.name.length() > 0;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 1;
- }
-
- /**
- * This is the method that will handle saving the inventory contents, as it is called (or should be called!) anytime
- * the inventory changes. Perfect. Much better than using onUpdate in an Item, as this will also let you change
- * things in your inventory without ever opening a Gui, if you want.
- */
- // 1.7.2+ renamed to markDirty
- @Override
- public void markDirty() {
- for (int i = 0; i < this.getSizeInventory(); ++i) {
- if ((this.getStackInSlot(i) != null) && (this.getStackInSlot(i).stackSize == 0)) {
- this.inventory[i] = null;
- }
- }
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
- return true;
- }
-
- // 1.7.2+ renamed to openInventory(EntityPlayer player)
- @Override
- public void openInventory() {}
-
- // 1.7.2+ renamed to closeInventory(EntityPlayer player)
- @Override
- public void closeInventory() {}
-
- /**
- * This method doesn't seem to do what it claims to do, as items can still be left-clicked and placed in the
- * inventory even when this returns false
- */
- @Override
- public boolean isItemValidForSlot(final int slot, final ItemStack itemstack) {
- // Don't want to be able to store the inventory item within itself
- // Bad things will happen, like losing your inventory
- // Actually, this needs a custom Slot to work
- if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) {
- return true;
- }
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/ModItems.java b/src/main/java/gtPlusPlus/core/item/ModItems.java
index dd07d2b138..060285f551 100644
--- a/src/main/java/gtPlusPlus/core/item/ModItems.java
+++ b/src/main/java/gtPlusPlus/core/item/ModItems.java
@@ -113,13 +113,11 @@ import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.data.StringUtils;
-import gtPlusPlus.core.util.debug.DEBUG_INIT;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.everglades.GTplusplus_Everglades;
-import gtPlusPlus.preloader.CORE_Preloader;
import gtPlusPlus.xmod.cofh.HANDLER_COFH;
import gtPlusPlus.xmod.eio.material.MaterialEIO;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
@@ -429,11 +427,6 @@ public final class ModItems {
itemDummyResearch = new ItemDummyResearch();
itemCustomSpawnEgg = new ItemCustomSpawnEgg();
- // Debug Loading
- if (CORE_Preloader.DEBUG_MODE) {
- DEBUG_INIT.registerItems();
- }
-
itemDebugAreaClear = new ItemAreaClear();
// Register meta item, because we need them for everything.
@@ -1025,9 +1018,6 @@ public final class ModItems {
toolGregtechPump.registerPumpType(2, "Super Hand Pump", 128000, 2);
toolGregtechPump.registerPumpType(3, "Ultimate Hand Pump", 512000, 3);
- // Create Multi-tools
- // ItemsMultiTools.load();
-
// Xp Fluids - Dev
if (!FluidRegistry.isFluidRegistered("mobessence")) {
FluidUtils.generateFluidNoPrefix("mobessence", "mobessence", 0, new short[] { 125, 175, 125, 100 });
@@ -1153,11 +1143,6 @@ public final class ModItems {
itemDetCable.setTextureName("string");
itemBomb = new ItemThrowableBomb();
- // Only used for debugging.
- /*
- * if (CORE.DEVENV) { new ConnectedBlockFinder(); }
- */
-
// Misc Items
@SuppressWarnings("unused")
Item tI;
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java
deleted file mode 100644
index cdf98b9547..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemBrain.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package gtPlusPlus.core.item.base;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.StatCollector;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/*
- * Key Point: You can access the NBT compound data from the Item class (in those methods that pass an ItemStack), but
- * the NBT compound can only be set on an ItemStack. The steps to add NBT data to an ItemStack: Create or otherwise get
- * an ItemStack of the desired item Create an NBTTagCompound and fill it with the appropriate data Call
- * ItemStack#setTagCompound() method to set it.
- */
-
-public class BaseItemBrain extends Item {
-
- // This is an array of all the types I am going to be adding.
- String[] brainTypes = { "dead", "preserved", "fresh", "tasty" };
-
- // This method allows us to have different language translation keys for
- // each item we add.
- @Override
- public String getUnlocalizedName(final ItemStack stack) {
- // This makes sure that the stack has a tag compound. This is how data
- // is stored on items.
- if (stack.hasTagCompound()) {
- // This is the object holding all of the item data.
- final NBTTagCompound itemData = stack.getTagCompound();
- // This checks to see if the item has data stored under the
- // brainType key.
- if (itemData.hasKey("brainType")) {
- // This retrieves data from the brainType key and uses it in
- // the return value
- return "item." + itemData.getString("brainType");
- }
- }
- // This will be used if the item is obtained without nbt data on it.
- return "item.nullBrain";
- }
-
- // This is a fun method which allows us to run some code when our item is
- // shown in a creative tab. I am going to use it to add all the brain
- // types.
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Override
- @SideOnly(Side.CLIENT)
- public void getSubItems(final Item item, final CreativeTabs tab, final List itemList) {
- // This creates a loop with a counter. It will go through once for
- // every listing in brainTypes, and gives us a number associated
- // with each listing.
- for (int pos = 0; pos < this.brainTypes.length; pos++) {
- // This creates a new ItemStack instance. The item parameter
- // supplied is this item.
- final ItemStack brainStack = new ItemStack(item);
- // By default, a new ItemStack does not have any nbt compound data.
- // We need to give it some.
- brainStack.setTagCompound(new NBTTagCompound());
- // Now we set the type of the item, brainType is the key, and
- // brainTypes[pos] is grabbing a
- // entry from the brainTypes array.
- brainStack.getTagCompound().setString("brainType", this.brainTypes[pos]);
- // And this adds it to the itemList, which is a list of all items
- // in the creative tab.
- itemList.add(brainStack);
- }
- }
-
- // This code will allow us to tell the items apart in game. You can change
- @SuppressWarnings({ "rawtypes", "unchecked" })
- // texture based on nbt data, but I won't be covering that.
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(final ItemStack stack, final EntityPlayer player, final List tooltip,
- final boolean isAdvanced) {
- if (stack.hasTagCompound() && stack.getTagCompound().hasKey("brainType")) {
- // StatCollector is a class which allows us to handle string
- // language translation. This requires that you fill out the
- // translation in you language class.
- tooltip.add(
- StatCollector.translateToLocal(
- "tooltip.yourmod." + stack.getTagCompound().getString("brainType") + ".desc"));
- } else // If the brain does not have valid tag data, a default message
- {
- tooltip.add(StatCollector.translateToLocal("tooltip.yourmod.nullbrain.desc"));
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java
deleted file mode 100644
index eb75c1fe5d..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemGeneric.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package gtPlusPlus.core.item.base;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-public class BaseItemGeneric extends Item {
-
- public BaseItemGeneric(final String unlocalizedName, final CreativeTabs c, final int stackSize, final int maxDmg) {
- this.setUnlocalizedName(GTPlusPlus.ID + "_" + unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setCreativeTab(c);
- this.setMaxStackSize(stackSize);
- this.setMaxDamage(maxDmg);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- super.addInformation(stack, aPlayer, list, bool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java
deleted file mode 100644
index 5f4795689d..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemLoot.java
+++ /dev/null
@@ -1,105 +0,0 @@
-package gtPlusPlus.core.item.base;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.world.World;
-
-import gregtech.api.enums.Materials;
-import gtPlusPlus.api.enums.Quality;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-
-public class BaseItemLoot extends Item {
-
- private final String materialName;
- private final String unlocalName;
- private final LootTypes lootTypes;
- private Quality lootQuality;
- private final Materials lootMaterial;
-
- public BaseItemLoot(final LootTypes lootType, final Materials material) {
- this.lootTypes = lootType;
- this.lootMaterial = material;
- this.materialName = material.mDefaultLocalName;
- this.unlocalName = "item" + lootType.LOOT_TYPE + this.materialName;
- this.setUnlocalizedName(this.unlocalName);
- this.setMaxStackSize(1);
- this.setTextureName(GTPlusPlus.ID + ":" + "item" + lootType.LOOT_TYPE);
- }
-
- public ItemStack generateLootStack() {
- this.lootQuality = Quality.getRandomQuality();
- return ItemUtils.getSimpleStack(this, 1);
- }
-
- @Override
- public String getItemStackDisplayName(final ItemStack p_77653_1_) {
- return (this.materialName + this.lootTypes.DISPLAY_SUFFIX);
- }
-
- public final String getMaterialName() {
- return this.materialName;
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(this.lootQuality.getQuality());
-
- /*
- * if (componentMaterial.isRadioactive){ list.add(CORE.GT_Tooltip_Radioactive.get()); }
- */
-
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public int getColorFromItemStack(final ItemStack stack, final int HEX_OxFFFFFF) {
- final short[] temp = this.lootMaterial.mRGBa;
- return Utils.rgbtoHexValue(temp[0], temp[1], temp[2]);
- }
-
- @Override
- public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_,
- final boolean p_77663_5_) {
- // EntityUtils.applyRadiationDamageToEntity(lootQuality.vRadioationLevel, world, entityHolding);
- }
-
- public static enum LootTypes {
-
- Sword("Sword", " Longsword", "sword"),
- Shortsword("Sword", " Short Blade", "blade"),
- Helmet("Helmet", " Medium Helm", "helmet"),
- Chestplate("Platebody", " Chestplate", "platebody"),
- Leggings("Platelegs", " Platelegs", "platelegs"),
- Boots("Boots", " Boots", "boots");
-
- private String LOOT_TYPE;
- private String DISPLAY_SUFFIX;
- private String OREDICT_NAME;
-
- private LootTypes(final String LocalName, final String DisplayName, final String OreDictName) {
- this.LOOT_TYPE = LocalName;
- this.DISPLAY_SUFFIX = DisplayName;
- this.OREDICT_NAME = OreDictName;
- }
-
- public String getLootType() {
- return this.LOOT_TYPE;
- }
-
- public String getName() {
- return this.DISPLAY_SUFFIX;
- }
-
- public String getOreDictName() {
- return this.OREDICT_NAME;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/base/BaseItemWithCharge.java b/src/main/java/gtPlusPlus/core/item/base/BaseItemWithCharge.java
deleted file mode 100644
index a056b57852..0000000000
--- a/src/main/java/gtPlusPlus/core/item/base/BaseItemWithCharge.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package gtPlusPlus.core.item.base;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class BaseItemWithCharge extends Item {
-
- public int int_Charge = 0;
- public int int_Max_Charge = 0;
-
- public BaseItemWithCharge(final String unlocalizedName, final int constructor_Charge,
- final int constructor_Max_Charge) {
- this.setUnlocalizedName(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setMaxStackSize(1);
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- this.int_Charge = constructor_Charge;
- this.int_Max_Charge = constructor_Max_Charge;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- int NBT_Charge = this.int_Charge;
- int NBT_Max_Charge = this.int_Max_Charge;
- if (stack.stackTagCompound != null) {
- NBT_Charge = stack.stackTagCompound.getInteger("charge_Current");
- NBT_Max_Charge = stack.stackTagCompound.getInteger("charge_Max");
- final String tempX = String.valueOf(NBT_Charge);
- final String tempY = String.valueOf(NBT_Max_Charge);
- final String formattedX = EnumChatFormatting.RED + tempX + EnumChatFormatting.GRAY;
- final String formattedY = EnumChatFormatting.DARK_RED + tempY + EnumChatFormatting.GRAY;
- list.add(EnumChatFormatting.GRAY + "Charge:" + formattedX + "/" + formattedY + ".");
- super.addInformation(stack, aPlayer, list, bool);
- }
- }
-
- // Ticking and NBT Handling
- /*
- * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
- * update it's contents. public int fuelRemaining = 0; public int maximumFuel = 0; public String fuelType = "";
- * public float heat = 0; public float maxHeat = 5000;
- */
- @Override
- public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) {}
-
- @Override
- public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4,
- final boolean par5) {}
-
- @Override
- public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer par3Entity) {
- itemStack.stackTagCompound = new NBTTagCompound();
- return super.onItemRightClick(itemStack, world, par3Entity);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java b/src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java
deleted file mode 100644
index b3c0842327..0000000000
--- a/src/main/java/gtPlusPlus/core/item/chemistry/OilChem.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package gtPlusPlus.core.item.chemistry;
-
-import gtPlusPlus.api.objects.minecraft.ItemPackage;
-
-public class OilChem extends ItemPackage {
-
- /**
- * Fluids
- */
-
- /**
- * Items
- */
- @Override
- public void items() {}
-
- @Override
- public void blocks() {
- // None yet
- }
-
- @Override
- public void fluids() {}
-
- @Override
- public String errorMessage() {
- return "Failed to generate recipes for OilChem.";
- }
-
- @Override
- public boolean generateRecipes() {
-
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java b/src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java
deleted file mode 100644
index ac51c20a18..0000000000
--- a/src/main/java/gtPlusPlus/core/item/effects/RarityEffect.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package gtPlusPlus.core.item.effects;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-/*
- * This determines the name colour. EnumRarity can be: EnumRarity.common - the standard white colour.
- * EnumRarity.uncommon - a yellow colour. EnumRarity.rare - a light blue colour. This is used for enchanted items.
- * EnumRarity.epic - the purple colour used on the Golden Apple.
- * @SideOnly is an FML annotation. It marks the method below it for existing only on one side. Possible values are:
- * Side.CLIENT is probably the most common one. This marks the method as existing only on the client side. Side.SERVER
- * marks the method as existing only on the server side.
- */
-
-public class RarityEffect extends Item {
-
- public RarityEffect(final int par1) {
- super();
- this.setCreativeTab(CreativeTabs.tabMaterials);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.common;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack) {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java b/src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java
deleted file mode 100644
index a8081615d7..0000000000
--- a/src/main/java/gtPlusPlus/core/item/effects/RarityEpic.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gtPlusPlus.core.item.effects;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class RarityEpic extends Item {
-
- public RarityEpic(final int par1) {
- super();
- this.setCreativeTab(CreativeTabs.tabMaterials);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.epic;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack) {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityRare.java b/src/main/java/gtPlusPlus/core/item/effects/RarityRare.java
deleted file mode 100644
index e448cfafe7..0000000000
--- a/src/main/java/gtPlusPlus/core/item/effects/RarityRare.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package gtPlusPlus.core.item.effects;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class RarityRare extends Item {
-
- public RarityRare() {
- super();
- this.setCreativeTab(CreativeTabs.tabMaterials);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.rare;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack) {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java b/src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java
deleted file mode 100644
index 89764a718f..0000000000
--- a/src/main/java/gtPlusPlus/core/item/effects/RarityUncommon.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package gtPlusPlus.core.item.effects;
-
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class RarityUncommon extends Item {
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.uncommon;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack) {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java b/src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java
deleted file mode 100644
index 099347eb76..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/BedLocator_Base.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class BedLocator_Base extends Item {
-
- public int bed_X = 0;
- public int bed_Y = 0;
- public int bed_Z = 0;
-
- public BedLocator_Base(final String unlocalizedName) {
- this.setUnlocalizedName(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setMaxStackSize(1);
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
-
- int NBT_X = this.bed_X;
- int NBT_Y = this.bed_Y;
- int NBT_Z = this.bed_Z;
-
- if (stack.stackTagCompound != null) {
- NBT_X = stack.stackTagCompound.getInteger("pos_x");
- NBT_Y = stack.stackTagCompound.getInteger("pos_y");
- NBT_Z = stack.stackTagCompound.getInteger("pos_z");
-
- final String tempX = String.valueOf(NBT_X);
- final String tempY = String.valueOf(NBT_Y);
- final String tempZ = String.valueOf(NBT_Z);
- final String formattedX = EnumChatFormatting.DARK_RED + tempX + EnumChatFormatting.GRAY;
- final String formattedY = EnumChatFormatting.RED + tempY + EnumChatFormatting.GRAY;
- final String formattedZ = EnumChatFormatting.RED + tempZ + EnumChatFormatting.GRAY;
-
- list.add(EnumChatFormatting.GRAY + "X: " + formattedX + ".");
- list.add(EnumChatFormatting.GRAY + "Y: " + formattedY + ".");
- list.add(EnumChatFormatting.GRAY + "Z: " + formattedZ + ".");
- super.addInformation(stack, aPlayer, list, bool);
- }
- }
-
- // Ticking and NBT Handling
- /*
- * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
- * update it's contents. public int fuelRemaining = 0; public int maximumFuel = 0; public String fuelType = "";
- * public float heat = 0; public float maxHeat = 5000;
- */
- @Override
- public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) {
- itemStack.stackTagCompound = new NBTTagCompound();
- this.bed_X = 0;
- this.bed_Y = 0;
- this.bed_Z = 0;
- itemStack.stackTagCompound.setInteger("pos_x", this.bed_X);
- itemStack.stackTagCompound.setInteger("pos_y", this.bed_Y);
- itemStack.stackTagCompound.setInteger("pos_z", this.bed_Z);
- }
-
- @Override
- public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4,
- final boolean par5) {}
-
- @Override
- public ItemStack onItemRightClick(final ItemStack itemStack, final World world, final EntityPlayer par3Entity) {
- itemStack.stackTagCompound = new NBTTagCompound();
- if (par3Entity.getBedLocation() != null) {
- this.bed_X = par3Entity.getBedLocation().posX;
- this.bed_Y = par3Entity.getBedLocation().posY;
- this.bed_Z = par3Entity.getBedLocation().posZ;
- } else {
- this.bed_X = 0;
- this.bed_Y = 0;
- this.bed_Z = 0;
- }
- itemStack.stackTagCompound.setInteger("pos_x", this.bed_X);
- itemStack.stackTagCompound.setInteger("pos_y", this.bed_Y);
- itemStack.stackTagCompound.setInteger("pos_z", this.bed_Z);
- return super.onItemRightClick(itemStack, world, par3Entity);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java b/src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java
deleted file mode 100644
index 6decd29b06..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/ItemCreativeTab.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import gregtech.api.GregTech_API;
-
-public class ItemCreativeTab extends Item {
-
- public IIcon[] icons = new IIcon[10];
-
- public ItemCreativeTab() {
- super();
- this.setHasSubtypes(true);
- String unlocalizedName = "itemCreativeTabs";
- this.setUnlocalizedName(unlocalizedName);
- this.setCreativeTab(GregTech_API.TAB_GREGTECH);
- GameRegistry.registerItem(this, unlocalizedName);
- }
-
- @Override
- public void registerIcons(IIconRegister reg) {
- this.icons[0] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_0");
- this.icons[1] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_1");
- this.icons[2] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_2");
- this.icons[3] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_3");
- this.icons[4] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_4");
- this.icons[5] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_5");
- this.icons[6] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_6");
- this.icons[7] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_7");
- this.icons[8] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_8");
- this.icons[9] = reg.registerIcon(GTPlusPlus.ID + ":" + "controlcore/Core_9");
- }
-
- @Override
- public IIcon getIconFromDamage(int meta) {
- return this.icons[meta];
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void getSubItems(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 10; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-
- @Override
- public String getUnlocalizedName(ItemStack stack) {
- return this.getUnlocalizedName() + "_" + stack.getItemDamage();
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java b/src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java
deleted file mode 100644
index 92a5fafe20..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/NuclearFuelRodBase.java
+++ /dev/null
@@ -1,188 +0,0 @@
-package gtPlusPlus.core.item.general;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.MovingObjectPosition;
-import net.minecraft.world.World;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.player.FillBucketEvent;
-
-import cpw.mods.fml.common.eventhandler.Event;
-
-public class NuclearFuelRodBase extends Item {
-
- /** field for checking if the bucket has been filled. */
- private final Block isFull;
-
- public NuclearFuelRodBase(final Block p_i45331_1_) {
- this.maxStackSize = 1;
- this.isFull = p_i45331_1_;
- this.setCreativeTab(CreativeTabs.tabMisc);
- }
-
- /**
- * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
- */
- @Override
- public ItemStack onItemRightClick(final ItemStack p_77659_1_, final World p_77659_2_,
- final EntityPlayer p_77659_3_) {
- final boolean flag = this.isFull == Blocks.air;
- final MovingObjectPosition movingobjectposition = this
- .getMovingObjectPositionFromPlayer(p_77659_2_, p_77659_3_, flag);
-
- if (movingobjectposition == null) {
- return p_77659_1_;
- }
- final FillBucketEvent event = new FillBucketEvent(p_77659_3_, p_77659_1_, p_77659_2_, movingobjectposition);
- if (MinecraftForge.EVENT_BUS.post(event)) {
- return p_77659_1_;
- }
-
- if (event.getResult() == Event.Result.ALLOW) {
- if (p_77659_3_.capabilities.isCreativeMode) {
- return p_77659_1_;
- }
-
- if (--p_77659_1_.stackSize <= 0) {
- return event.result;
- }
-
- if (!p_77659_3_.inventory.addItemStackToInventory(event.result)) {
- p_77659_3_.dropPlayerItemWithRandomChoice(event.result, false);
- }
-
- return p_77659_1_;
- }
- if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
- int i = movingobjectposition.blockX;
- int j = movingobjectposition.blockY;
- int k = movingobjectposition.blockZ;
-
- if (!p_77659_2_.canMineBlock(p_77659_3_, i, j, k)) {
- return p_77659_1_;
- }
-
- if (flag) {
- if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) {
- return p_77659_1_;
- }
-
- final Material material = p_77659_2_.getBlock(i, j, k).getMaterial();
- final int l = p_77659_2_.getBlockMetadata(i, j, k);
-
- if ((material == Material.water) && (l == 0)) {
- p_77659_2_.setBlockToAir(i, j, k);
- return this.func_150910_a(p_77659_1_, p_77659_3_, Items.water_bucket);
- }
-
- if ((material == Material.lava) && (l == 0)) {
- p_77659_2_.setBlockToAir(i, j, k);
- return this.func_150910_a(p_77659_1_, p_77659_3_, Items.lava_bucket);
- }
- } else {
- if (this.isFull == Blocks.air) {
- return new ItemStack(Items.bucket);
- }
-
- if (movingobjectposition.sideHit == 0) {
- --j;
- }
-
- if (movingobjectposition.sideHit == 1) {
- ++j;
- }
-
- if (movingobjectposition.sideHit == 2) {
- --k;
- }
-
- if (movingobjectposition.sideHit == 3) {
- ++k;
- }
-
- if (movingobjectposition.sideHit == 4) {
- --i;
- }
-
- if (movingobjectposition.sideHit == 5) {
- ++i;
- }
-
- if (!p_77659_3_.canPlayerEdit(i, j, k, movingobjectposition.sideHit, p_77659_1_)) {
- return p_77659_1_;
- }
-
- if (this.tryPlaceContainedLiquid(p_77659_2_, i, j, k) && !p_77659_3_.capabilities.isCreativeMode) {
- return new ItemStack(Items.bucket);
- }
- }
- }
-
- return p_77659_1_;
- }
-
- private ItemStack func_150910_a(final ItemStack p_150910_1_, final EntityPlayer p_150910_2_,
- final Item p_150910_3_) {
- if (p_150910_2_.capabilities.isCreativeMode) {
- return p_150910_1_;
- } else if (--p_150910_1_.stackSize <= 0) {
- return new ItemStack(p_150910_3_);
- } else {
- if (!p_150910_2_.inventory.addItemStackToInventory(new ItemStack(p_150910_3_))) {
- p_150910_2_.dropPlayerItemWithRandomChoice(new ItemStack(p_150910_3_, 1, 0), false);
- }
-
- return p_150910_1_;
- }
- }
-
- /**
- * Attempts to place the liquid contained inside the bucket.
- */
- public boolean tryPlaceContainedLiquid(final World p_77875_1_, final int p_77875_2_, final int p_77875_3_,
- final int p_77875_4_) {
- if (this.isFull == Blocks.air) {
- return false;
- }
- final Material material = p_77875_1_.getBlock(p_77875_2_, p_77875_3_, p_77875_4_).getMaterial();
- final boolean flag = !material.isSolid();
-
- if (!p_77875_1_.isAirBlock(p_77875_2_, p_77875_3_, p_77875_4_) && !flag) {
- return false;
- }
- if (p_77875_1_.provider.isHellWorld && (this.isFull == Blocks.flowing_water)) {
- p_77875_1_.playSoundEffect(
- p_77875_2_ + 0.5F,
- p_77875_3_ + 0.5F,
- p_77875_4_ + 0.5F,
- "random.fizz",
- 0.5F,
- 2.6F + ((p_77875_1_.rand.nextFloat() - p_77875_1_.rand.nextFloat()) * 0.8F));
-
- for (int l = 0; l < 8; ++l) {
- p_77875_1_.spawnParticle(
- "largesmoke",
- p_77875_2_ + Math.random(),
- p_77875_3_ + Math.random(),
- p_77875_4_ + Math.random(),
- 0.0D,
- 0.0D,
- 0.0D);
- }
- } else {
- if (!p_77875_1_.isRemote && flag && !material.isLiquid()) {
- p_77875_1_.func_147480_a(p_77875_2_, p_77875_3_, p_77875_4_, true);
- }
-
- p_77875_1_.setBlock(p_77875_2_, p_77875_3_, p_77875_4_, this.isFull, 0, 3);
- }
-
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java b/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java
deleted file mode 100644
index ff0b923ca4..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Base.java
+++ /dev/null
@@ -1,205 +0,0 @@
-package gtPlusPlus.core.item.general.fuelrods;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import gtPlusPlus.core.creative.AddToCreativeTab;
-
-public class FuelRod_Base extends Item {
-
- public int fuelRemaining = 0;
- public int maximumFuel = 0;
- public String fuelType = "";
- public float heat = 0;
- public float maxHeat = this.getMaxHeat();
-
- public FuelRod_Base(final String unlocalizedName, final String type, final int fuelLeft, final int maxFuel) {
- this.setUnlocalizedName(unlocalizedName);
- this.setTextureName(GTPlusPlus.ID + ":" + unlocalizedName);
- this.setMaxStackSize(1);
- this.setMaxDamage(maxFuel);
- this.maximumFuel = maxFuel;
- this.fuelRemaining = fuelLeft;
- this.fuelType = type;
- this.setCreativeTab(AddToCreativeTab.tabMachines);
- }
-
- private float getMaxHeat() {
- float tempvar;
- if (this.fuelType == "Thorium") {
- tempvar = 2500;
- } else if (this.fuelType == "Uranium") {
- tempvar = 5000;
- } else if (this.fuelType == "Plutonium") {
- tempvar = 10000;
- } else {
- tempvar = 5000;
- }
- return tempvar;
- }
-
- private void updateVars(final ItemStack stack) {
- if (stack.stackTagCompound != null) {
- this.heat = stack.stackTagCompound.getFloat("heat");
- this.fuelRemaining = stack.stackTagCompound.getInteger("fuelRemaining");
- }
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
-
- Float NBT_Heat = this.heat;
- Float NBT_MaxHeat = this.maxHeat;
- int NBT_Fuel = this.fuelRemaining;
- String NBT_Type = this.fuelType;
-
- if (stack.stackTagCompound != null) {
- NBT_Heat = stack.stackTagCompound.getFloat("heat");
- NBT_MaxHeat = stack.stackTagCompound.getFloat("maxHeat");
- NBT_Fuel = stack.stackTagCompound.getInteger("fuelRemaining");
- NBT_Type = stack.stackTagCompound.getString("fuelType");
- }
-
- final String tempHeat = String.valueOf(NBT_Heat);
- final String tempMaxHeat = String.valueOf(NBT_MaxHeat);
- final String tempFuel = String.valueOf(NBT_Fuel);
- final String formattedType = EnumChatFormatting.DARK_RED + NBT_Type + EnumChatFormatting.GRAY;
- String formattedHeat = EnumChatFormatting.RED + tempHeat + EnumChatFormatting.GRAY;
- final String formattedMaxHeat = EnumChatFormatting.RED + tempMaxHeat + EnumChatFormatting.GRAY;
- String formattedFuelLeft = tempFuel + EnumChatFormatting.GRAY;
-
- final int tempMax = this.maximumFuel;
- final float tempCurrentHeat = this.heat;
- final int tempFuelLeft = this.fuelRemaining;
-
- // Fuel Usage Formatting
- if (tempFuelLeft <= (this.maximumFuel / 3)) {
- formattedFuelLeft = EnumChatFormatting.RED + tempFuel + EnumChatFormatting.GRAY;
- } else if ((tempFuelLeft >= (this.maximumFuel / 3)) && (tempFuelLeft <= ((this.maximumFuel / 3) * 2))) {
- formattedFuelLeft = EnumChatFormatting.YELLOW + tempFuel + EnumChatFormatting.GRAY;
- } else if ((tempFuelLeft >= ((this.maximumFuel / 3) * 2)) && (tempFuelLeft <= this.maximumFuel)) {
- formattedFuelLeft = EnumChatFormatting.GREEN + tempFuel + EnumChatFormatting.GRAY;
- } else {
- formattedFuelLeft = EnumChatFormatting.GRAY + tempFuel + EnumChatFormatting.GRAY;
- }
-
- // Heat Formatting
- if ((tempCurrentHeat <= 200) && (tempCurrentHeat >= 0)) {
- formattedHeat = EnumChatFormatting.GRAY + tempHeat + EnumChatFormatting.GRAY;
- } else if ((tempCurrentHeat <= (this.maxHeat / 3)) && (tempCurrentHeat > 200)) {
- formattedHeat = EnumChatFormatting.YELLOW + tempHeat + EnumChatFormatting.GRAY;
- } else if ((tempCurrentHeat >= (this.maxHeat / 3)) && (tempMax < ((this.maxHeat / 3) * 2))
- && (tempCurrentHeat != 0)) {
- formattedHeat = EnumChatFormatting.GOLD + tempHeat + EnumChatFormatting.GRAY;
- } else
- if ((tempCurrentHeat >= ((this.maxHeat / 3) * 2)) && (tempMax <= this.maxHeat) && (tempCurrentHeat != 0)) {
- formattedHeat = EnumChatFormatting.RED + tempHeat + EnumChatFormatting.GRAY;
- } else {
- formattedHeat = EnumChatFormatting.BLUE + tempHeat + EnumChatFormatting.GRAY;
- }
- list.add(EnumChatFormatting.GRAY + "A " + formattedType + " Fuel Rod.");
- list.add(EnumChatFormatting.GRAY + "Running at " + formattedHeat + "/" + formattedMaxHeat + " Kelvin.");
- list.add(EnumChatFormatting.GRAY + "Fuel Remaining: " + formattedFuelLeft + "L.");
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- public String getType(final ItemStack stack) {
- if (stack.stackTagCompound != null) {
- return stack.stackTagCompound.getString("fuelType");
- }
- return this.fuelType;
- }
-
- public int getFuelRemaining(final ItemStack stack) {
- if (stack.stackTagCompound != null) {
- return stack.stackTagCompound.getInteger("fuelRemaining");
- }
- return 0;
- }
-
- public int getMaxFuel() {
- return this.maximumFuel;
- }
-
- public int getFuel(final ItemStack stack) {
- if (stack != null) {
- final int i = stack.getItemDamage();
- final int r = this.maximumFuel - i;
- return r;
- }
- return 0;
- }
-
- public boolean setFuelRemainingExplicitly(final int i) {
- final int tempFuel = this.fuelRemaining;
- this.fuelRemaining = i;
- if (i != tempFuel) {
- return true;
- }
- return false;
- }
-
- public boolean addFuel(final int i) {
- final int tempFuel = this.fuelRemaining;
- this.fuelRemaining = tempFuel + i;
- if (this.fuelRemaining != tempFuel) {
- return true;
- }
- return false;
- }
-
- public float getHeat(final ItemStack value) {
- if (value.stackTagCompound != null) {
- return value.stackTagCompound.getFloat("heat");
- }
- return 0f;
- }
-
- public boolean addHeat(final float i) {
- final float tempFuel = this.heat;
- this.heat = tempFuel + i;
- if (this.heat != tempFuel) {
- return true;
- }
- return false;
- }
-
- // Ticking and NBT Handling
- /*
- * Called each tick as long the item is on a player inventory. Uses by maps to check if is on a player hand and
- * update it's contents. public int fuelRemaining = 0; public int maximumFuel = 0; public String fuelType = "";
- * public float heat = 0; public float maxHeat = 5000;
- */
- @Override
- public void onCreated(final ItemStack itemStack, final World world, final EntityPlayer player) {
- itemStack.stackTagCompound = new NBTTagCompound();
- itemStack.stackTagCompound.setInteger("fuelRemaining", this.getFuelRemaining(itemStack));
- itemStack.stackTagCompound.setInteger("maximumFuel", this.maximumFuel);
- itemStack.stackTagCompound.setFloat("heat", this.getHeat(itemStack));
- itemStack.stackTagCompound.setFloat("maxHeat", this.getMaxHeat());
- itemStack.stackTagCompound.setString("fuelType", this.getType(itemStack));
- this.updateVars(itemStack);
- }
-
- @Override
- public void onUpdate(final ItemStack itemStack, final World par2World, final Entity par3Entity, final int par4,
- final boolean par5) {
- itemStack.stackTagCompound = new NBTTagCompound();
- itemStack.stackTagCompound.setInteger("fuelRemaining", this.getFuelRemaining(itemStack));
- itemStack.stackTagCompound.setInteger("maximumFuel", this.maximumFuel);
- itemStack.stackTagCompound.setFloat("heat", this.getHeat(itemStack));
- itemStack.stackTagCompound.setFloat("maxHeat", this.getMaxHeat());
- itemStack.stackTagCompound.setString("fuelType", this.getType(itemStack));
- this.updateVars(itemStack);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java b/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java
deleted file mode 100644
index 4b25d0ae8b..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/fuelrods/FuelRod_Thorium.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package gtPlusPlus.core.item.general.fuelrods;
-
-public class FuelRod_Thorium extends FuelRod_Base {
-
- public FuelRod_Thorium(final String unlocalizedName, final String type, final int fuelLeft, final int maxFuel) {
- super(unlocalizedName, type, fuelLeft, maxFuel);
- this.setMaxDamage(maxFuel);
- this.maximumFuel = maxFuel;
- this.fuelRemaining = fuelLeft;
- this.fuelType = type;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java b/src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java
deleted file mode 100644
index 90dc554165..0000000000
--- a/src/main/java/gtPlusPlus/core/item/general/rfchargingpack/ChargingPackBase.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package gtPlusPlus.core.item.general.rfchargingpack;
-
-import java.util.List;
-
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import cofh.api.energy.ItemEnergyContainer;
-import gtPlusPlus.core.util.math.MathUtils;
-
-public class ChargingPackBase extends ItemEnergyContainer {
-
- protected final int mCapacityMax;
- protected final byte mTier;
-
- public ChargingPackBase(byte tier) {
- this(
- tier,
- (tier == 1 ? 4000000 : tier == 2 ? 8000000 : tier == 3 ? 16000000 : tier == 4 ? 32000000 : 64000000));
- }
-
- private ChargingPackBase(byte tier, int maxStorage) {
- super(maxStorage);
- mTier = tier;
- mCapacityMax = maxStorage;
- }
-
- public int getMaxEnergyInput(ItemStack container) {
- return this.maxReceive;
- }
-
- public int getMaxEnergyExtracted(ItemStack container) {
- return this.maxExtract;
- }
-
- @Override
- public void onUpdate(ItemStack aStack, World aWorld, Entity aEnt, int p_77663_4_, boolean p_77663_5_) {
- super.onUpdate(aStack, aWorld, aEnt, p_77663_4_, p_77663_5_);
-
- ItemEnergyContainer current = this;
- int currentStored = 0;
- if (current != null) {
- currentStored = current.getEnergyStored(aStack);
- }
- if (currentStored > 0) {
- if (aEnt instanceof EntityPlayer) {
- if (((EntityPlayer) aEnt).inventory != null) {
- for (ItemStack invStack : ((EntityPlayer) aEnt).inventory.mainInventory) {
- if (invStack != null) {
- if (invStack.getItem() instanceof ItemEnergyContainer) {
- if (current != null) {
- currentStored = current.getEnergyStored(aStack);
- if (currentStored > 0) {
- int mTransLimit;
- int mMaxStorage;
- int mCurrent;
- mTransLimit = getMaxEnergyInput(invStack);
- mMaxStorage = current.getMaxEnergyStored(invStack);
- mCurrent = current.getEnergyStored(invStack);
- if (mCurrent + mTransLimit <= mMaxStorage) {
- current.extractEnergy(
- aStack,
- current.receiveEnergy(invStack, mTransLimit, false),
- false);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- @Override
- public void addInformation(ItemStack stack, EntityPlayer p_77624_2_, List list, boolean p_77624_4_) {
- list.add(EnumChatFormatting.RED + "RF Information");
- list.add(
- EnumChatFormatting.GRAY + "Extraction Rate: ["
- + EnumChatFormatting.RED
- + this.maxExtract
- + EnumChatFormatting.GRAY
- + "Rf/t]"
- + " Insert Rate: ["
- + EnumChatFormatting.RED
- + this.maxReceive
- + EnumChatFormatting.GRAY
- + "Rf/t]");
- list.add(
- EnumChatFormatting.GRAY + "Current Charge: ["
- + EnumChatFormatting.RED
- + this.getEnergyStored(stack)
- + EnumChatFormatting.GRAY
- + "Rf / "
- + this.getMaxEnergyStored(stack)
- + "Rf] "
- + EnumChatFormatting.RED
- + MathUtils.findPercentage(this.getEnergyStored(stack), this.getMaxEnergyStored(stack))
- + EnumChatFormatting.GRAY
- + "%");
- super.addInformation(stack, p_77624_2_, list, p_77624_4_);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java b/src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java
deleted file mode 100644
index e8e4807747..0000000000
--- a/src/main/java/gtPlusPlus/core/item/init/ItemsMultiTools.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package gtPlusPlus.core.item.init;
-
-import gregtech.api.enums.Materials;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.item.ModItems;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.material.ALLOY;
-import gtPlusPlus.core.material.Material;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-
-public class ItemsMultiTools {
-
- public static void load() {
- run();
- }
-
- private static void run() {
-
- // Load Multitools
- if (CORE.ConfigSwitches.enableMultiSizeTools) {
-
- // GT Materials
- final Materials[] rm = Materials.values();
- for (final Materials m : rm) {
- toolFactoryGT(m);
- }
-
- // GT++ Materials
- toolFactory(ALLOY.HASTELLOY_C276);
- toolFactory(ALLOY.HASTELLOY_N);
- toolFactory(ALLOY.HASTELLOY_W);
- toolFactory(ALLOY.HASTELLOY_X);
- toolFactory(ALLOY.INCOLOY_020);
- toolFactory(ALLOY.INCOLOY_DS);
- toolFactory(ALLOY.INCOLOY_MA956);
- toolFactory(ALLOY.INCONEL_625);
- toolFactory(ALLOY.INCONEL_690);
- toolFactory(ALLOY.INCONEL_792);
- toolFactory(ALLOY.LEAGRISIUM);
- toolFactory(ALLOY.TANTALLOY_60);
- toolFactory(ALLOY.TANTALLOY_61);
- toolFactory(ALLOY.STABALLOY);
- toolFactory(ALLOY.QUANTUM);
- // toolFactory(ALLOY.BEDROCKIUM);
- toolFactory(ALLOY.POTIN);
- toolFactory(ALLOY.TUMBAGA);
- toolFactory(ALLOY.TALONITE);
- toolFactory(ALLOY.STELLITE);
- toolFactory(ALLOY.TUNGSTEN_CARBIDE);
- toolFactory(ALLOY.TANTALUM_CARBIDE);
- }
- }
-
- private static boolean toolFactoryGT(final Materials m) {
- ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(true, m);
- ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(true, m);
- return true;
- }
-
- private static boolean toolFactory(final Material m) {
- Logger.WARNING("Generating Multi-Tools for " + m.getLocalizedName());
- ModItems.MP_GTMATERIAL = ItemUtils.generateMultiPick(m);
- ModItems.MS_GTMATERIAL = ItemUtils.generateMultiShovel(m);
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/materials/MaterialHandler.java b/src/main/java/gtPlusPlus/core/item/materials/MaterialHandler.java
deleted file mode 100644
index 74c9115c3b..0000000000
--- a/src/main/java/gtPlusPlus/core/item/materials/MaterialHandler.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package gtPlusPlus.core.item.materials;
-
-public class MaterialHandler {
-
- @SuppressWarnings("unused")
- private String Staballoy;
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/ConnectedBlockFinder.java b/src/main/java/gtPlusPlus/core/item/tool/misc/ConnectedBlockFinder.java
deleted file mode 100644
index 95dc7822c2..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/ConnectedBlockFinder.java
+++ /dev/null
@@ -1,127 +0,0 @@
-package gtPlusPlus.core.item.tool.misc;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.BaseItemWithDamageValue;
-
-public class ConnectedBlockFinder extends BaseItemWithDamageValue {
-
- public ConnectedBlockFinder() {
- super("item.test.connector");
- this.setTextureName("stick");
- this.setMaxStackSize(1);
- this.setMaxDamage(10000);
- setCreativeTab(AddToCreativeTab.tabTools);
- GameRegistry.registerItem(this, getUnlocalizedName());
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GRAY + "Finds connected blocks, turns them to Glass once found.");
- super.addInformation(stack, aPlayer, list, bool);
- }
-
- @Override
- public boolean doesContainerItemLeaveCraftingGrid(final ItemStack itemStack) {
- return false;
- }
-
- @Override
- public boolean getShareTag() {
- return true;
- }
-
- @Override
- public boolean hasContainerItem(final ItemStack itemStack) {
- return true;
- }
-
- @Override
- public ItemStack getContainerItem(final ItemStack itemStack) {
- return itemStack;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public EnumRarity getRarity(final ItemStack par1ItemStack) {
- return EnumRarity.uncommon;
- }
-
- @Override
- public boolean hasEffect(final ItemStack par1ItemStack) {
- return false;
- }
-
- @Override
- public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side,
- float hitX, float hitY, float hitZ) {
-
- BlockPos mStartPoint = new BlockPos(x, y, z, world);
- Block mBlockType = world.getBlock(x, y, z);
- int mBlockMeta = mBlockType.getDamageValue(world, x, y, z);
-
- // Return if Air.
- if (world.isAirBlock(x, y, z)) {
- return false;
- }
-
- int breaker = 0;
- Set<BlockPos> mTotalIndex = new HashSet<BlockPos>();
-
- Set<BlockPos> mFirstSearch = new HashSet<BlockPos>();
- Set<BlockPos> mSearch_A = new HashSet<BlockPos>();
-
- Set<BlockPos> mSearch_B = new HashSet<BlockPos>();
- Set<BlockPos> mSearch_C = new HashSet<BlockPos>();
- Set<BlockPos> mSearch_D = new HashSet<BlockPos>();
-
- mFirstSearch.add(mStartPoint);
- mTotalIndex.add(mStartPoint);
-
- for (BlockPos G : mSearch_D) {
- if (!world.isAirBlock(G.xPos, G.yPos, G.zPos)) {
- world.setBlock(G.xPos, G.yPos, G.zPos, Blocks.diamond_ore);
- }
- }
-
- return super.onItemUse(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
- }
-
- public Set<BlockPos> getValidNeighboursForSet(Set<BlockPos> set) {
- Set<BlockPos> results = set;
- for (BlockPos F : set) {
- results.addAll(F.getValidNeighboursAndSelf());
- }
- return results;
- }
-
- public Set<BlockPos> getExtraNeighboursForSet(Set<BlockPos> set) {
- Set<BlockPos> results = set;
- for (BlockPos F : set) {
- results.addAll(F.getValidNeighboursAndSelf());
- }
- return results;
- }
-
- @Override
- public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_) {
- // TODO Auto-generated method stub
- return super.onItemRightClick(p_77659_1_, p_77659_2_, p_77659_3_);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java b/src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java
deleted file mode 100644
index 3c7a131a1e..0000000000
--- a/src/main/java/gtPlusPlus/core/item/tool/misc/FakeGregtechTool.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package gtPlusPlus.core.item.tool.misc;
-
-import static gregtech.api.enums.Mods.GregTech;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.IIcon;
-
-import gregtech.api.enums.Materials;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.CoreItem;
-import gtPlusPlus.core.util.Utils;
-
-public class FakeGregtechTool extends CoreItem {
-
- public final int componentColour;
- public Object extraData;
-
- protected IIcon base[] = new IIcon[6];
- protected IIcon overlay[] = new IIcon[6];
-
- public FakeGregtechTool() {
- super("GregeriousT's Display Tool", AddToCreativeTab.tabTools, 1);
- short[] tempCol = Materials.TungstenSteel.getRGBA();
- this.componentColour = Utils.rgbtoHexValue(tempCol[0], tempCol[1], tempCol[2]);
- }
-
- @Override
- public void registerIcons(final IIconRegister i) {
- // ScrewDriver
- this.base[0] = i.registerIcon(GregTech.ID + ":" + "materialicons/METALLIC/" + "toolHeadScrewdriver");
- this.overlay[0] = i.registerIcon(GregTech.ID + ":" + "iconsets/" + "HANDLE_SCREWDRIVER");
- // Soldering iron
- this.base[1] = i.registerIcon(GregTech.ID + ":" + "materialicons/METALLIC/" + "toolHeadSoldering");
- this.overlay[1] = i.registerIcon(GregTech.ID + ":" + "iconsets/" + "HANDLE_SOLDERING");
- // Mallet
- this.base[2] = i.registerIcon(GregTech.ID + ":" + "materialicons/METALLIC/" + "handleMallet");
- this.overlay[2] = i.registerIcon(GregTech.ID + ":" + "materialicons/METALLIC/" + "toolHeadMallet");
- // Hammer
- this.base[3] = i.registerIcon(GregTech.ID + ":" + "materialicons/METALLIC/" + "stick");
- this.overlay[3] = i.registerIcon(GregTech.ID + ":" + "materialicons/METALLIC/" + "toolHeadHammer");
- // Wrench
- this.base[4] = i.registerIcon(GregTech.ID + ":" + "iconsets/" + "WRENCH");
- this.overlay[4] = i.registerIcon(GregTech.ID + ":" + "iconsets/" + "WRENCH_OVERLAY");
- // Crowbar
- this.base[5] = i.registerIcon(GregTech.ID + ":" + "iconsets/" + "CROWBAR");
- this.overlay[5] = i.registerIcon(GregTech.ID + ":" + "iconsets/" + "CROWBAR_OVERLAY");
- }
-
- @Override
- public int getColorFromItemStack(final ItemStack stack, final int renderPass) {
- if (renderPass == 1) {
- return Utils.rgbtoHexValue(230, 230, 230);
- }
- return this.componentColour;
- }
-
- @Override
- public boolean requiresMultipleRenderPasses() {
- return true;
- }
-
- @Override
- public void getSubItems(Item item, CreativeTabs tab, List list) {
- for (int i = 0; i < 6; i++) {
- list.add(new ItemStack(item, 1, i));
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java
deleted file mode 100644
index 5191f9393c..0000000000
--- a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourBoots.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package gtPlusPlus.core.item.wearable.armour.base;
-
-public abstract class BaseArmourBoots extends BaseArmour {
-
- public BaseArmourBoots(ArmorMaterial material, int renderIndex) {
- super(material, renderIndex, 3);
- // TODO Auto-generated constructor stub
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java
deleted file mode 100644
index eb55637ee4..0000000000
--- a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourChest.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package gtPlusPlus.core.item.wearable.armour.base;
-
-public abstract class BaseArmourChest extends BaseArmour {
-
- public BaseArmourChest(ArmorMaterial material, int renderIndex) {
- super(material, renderIndex, 1);
- // TODO Auto-generated constructor stub
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java
deleted file mode 100644
index b376610427..0000000000
--- a/src/main/java/gtPlusPlus/core/item/wearable/armour/base/BaseArmourLegs.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package gtPlusPlus.core.item.wearable.armour.base;
-
-public abstract class BaseArmourLegs extends BaseArmour {
-
- public BaseArmourLegs(ArmorMaterial material, int renderIndex) {
- super(material, renderIndex, 2);
- // TODO Auto-generated constructor stub
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java b/src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java
deleted file mode 100644
index f3972fb400..0000000000
--- a/src/main/java/gtPlusPlus/core/item/wearable/armour/hazmat/ArmourHazmat.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package gtPlusPlus.core.item.wearable.armour.hazmat;
-
-import static gregtech.api.enums.Mods.GTPlusPlus;
-
-import java.util.List;
-
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.DamageSource;
-import net.minecraft.util.IIcon;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gtPlusPlus.core.item.wearable.armour.ArmourLoader;
-import gtPlusPlus.core.item.wearable.armour.base.BaseArmourHelm;
-
-public class ArmourHazmat extends BaseArmourHelm {
-
- public IIcon iconHelm;
-
- public ArmourHazmat() {
- super(ArmourLoader.TinFoilArmour, 0);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister ir) {
- this.iconHelm = ir.registerIcon(GTPlusPlus.ID + ":itemHatTinFoil");
- }
-
- @Override
- public int getRenderIndex() {
- return 0;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public IIcon getIconFromDamage(int par1) {
- return this.iconHelm;
- }
-
- @Override
- public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
- return GTPlusPlus.ID + ":textures/models/TinFoil.png";
- }
-
- @Override
- public EnumRarity getRarity(ItemStack itemstack) {
- return EnumRarity.rare;
- }
-
- @Override
- public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
- return false;
- }
-
- @Override
- public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
- return super.getArmorDisplay(player, armor, slot);
- }
-
- @Override
- public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {}
-
- @SuppressWarnings({ "unchecked" })
- @Override
- public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List aList, boolean p_77624_4_) {
- aList.add("DoomSquirter's protection against cosmic radiation!");
- aList.add("General paranoia makes the wearer unable to collect xp");
- aList.add("Movement speed is also reduced, to keep you safe");
- aList.add("This hat may also have other strange powers");
- }
-
- @Override
- public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage,
- int slot) {
- return new ArmorProperties(0, 0, 0);
- }
-
- @Override
- public boolean isDamageable() {
- return false;
- }
-
- @Override
- public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_,
- EntityLivingBase p_111207_3_) {
- return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_);
- }
-
- @Override
- public void onUpdate(ItemStack aStack, World aWorld, Entity aEntity, int p_77663_4_, boolean p_77663_5_) {
- super.onUpdate(aStack, aWorld, aEntity, p_77663_4_, p_77663_5_);
- }
-
- @Override
- public boolean onEntityItemUpdate(EntityItem entityItem) {
- return super.onEntityItemUpdate(entityItem);
- }
-
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (itemStack != null && player != null && world != null && !world.isRemote) {
- if (player instanceof EntityPlayer) {}
- }
- super.onArmorTick(world, player, itemStack);
- }
-
- @Override
- public boolean showDurabilityBar(ItemStack stack) {
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/material/Ion.java b/src/main/java/gtPlusPlus/core/material/Ion.java
deleted file mode 100644
index 37dc59f642..0000000000
--- a/src/main/java/gtPlusPlus/core/material/Ion.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gtPlusPlus.core.material;
-
-public class Ion {
-
- private final Material mElement;
- private final boolean mContainsPositiveCharge;
- private final int mTotalIonization;
-
- public Ion(Material aMat, int chargeAmount) {
- mElement = aMat;
- mContainsPositiveCharge = (chargeAmount >= 0);
- mTotalIonization = chargeAmount;
- }
-
- public final synchronized Material getElement() {
- return mElement;
- }
-
- public final synchronized boolean containsPositiveCharge() {
- return mContainsPositiveCharge;
- }
-
- public final synchronized int getTotalIonization() {
- return mTotalIonization;
- }
-
- public final boolean isNeutral() {
- return mTotalIonization == 0;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java b/src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java
deleted file mode 100644
index 0530436ca2..0000000000
--- a/src/main/java/gtPlusPlus/core/material/gregtech/CustomGTMaterials.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gtPlusPlus.core.material.gregtech;
-
-public class CustomGTMaterials {
-
- // public static Materials Fireclay = new MaterialBuilder(626, TextureSet.SET_ROUGH,
- // "Fireclay").addDustItems().setRGB(173, 160, 155).setColor(Dyes.dyeBrown).setMaterialList(new MaterialStack(Brick,
- // 1)).constructMaterial();
-
- /**
- * int aMetaItemSubID, TextureSet aIconSet, float aToolSpeed, int aDurability, int aToolQuality, boolean
- * aUnificatable, String aName, String aDefaultLocalName, String aConfigSection, boolean aCustomOre, String
- * aCustomID) {
- *
- **/
-
- /*
- * public static List<Materials> Custom_GT_Materials = new ArrayList<Materials>(); public static Materials Zirconium
- * = materialBuilder_Element(1232, TextureSet.SET_METALLIC, 6.0F, 256, 2, 1|2|8|32|64|128, 200, 200, 200, 0,
- * "Zirconium", "Zirconium", 0, 0, 1811, 0, false, false, 3, 1, 1, Dyes.dyeLightGray, Element.Zr, Arrays.asList(new
- * TC_Aspects.TC_AspectStack(TC_Aspects.METALLUM, 3))); public static Materials Geikielite = materialBuilder(1234,
- * TextureSet.SET_SHINY, new int[]{1,2,3}, "Geikielite", Dyes.dyeBlack, Arrays.asList(new MaterialStack(Titanium,
- * 1), new MaterialStack(Magnesium, 1), new MaterialStack(Oxygen, 3))); public static Materials Zirconolite =
- * materialBuilder(1235, TextureSet.SET_METALLIC, new int[]{1,2,3}, "Zirconolite", Dyes.dyeBlack, Arrays.asList(new
- * MaterialStack(Calcium, 1), new MaterialStack(Zirconium, 1), new MaterialStack(Titanium, 2), new
- * MaterialStack(Oxygen, 7))); public static final void run(){
- * Utils.LOG_INFO("[Custom] Trying to initialise custom materials."); } private final static boolean
- * registerMaterial(Materials r){ Custom_GT_Materials.add(r);
- * Utils.LOG_INFO("[Custom] Registered new Gregtech material - "+r.mName); return true; } public final static
- * Materials materialBuilder(int ID, TextureSet texture, int[] rgb, String materialName, Dyes dyeColour,
- * List<MaterialStack> composition){ Materials newMat = new Materials( ID, texture, 1.0F, 0, 2, 1 |8 , rgb[0],
- * rgb[1], rgb[2], 0, materialName, materialName, 0, 0, -1, 0, false, false, 3, 1, 1, dyeColour, 1, composition );
- * registerMaterial(newMat); return newMat; } public final static Materials materialBuilder_Element( int ID,
- * TextureSet texture, float a, int b, int c, int d, int r2, int g2, int b2, int a2, String materialName, String e,
- * int f, int g, int h, int i, boolean j, boolean k, int l, int m, int n, Dyes dyeColour, Element o,
- * List<TC_AspectStack> aspects){ Materials newMat = new Materials( ID, texture, a, b, c, d, r2, g2, b2, a2,
- * materialName, e, f, g, h, i, j, k, l, m, n, dyeColour, o, aspects ); registerMaterial(newMat); return newMat; }
- */
-
-}
diff --git a/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java b/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java
index ed1674cb3a..73b027af10 100644
--- a/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java
+++ b/src/main/java/gtPlusPlus/core/proxy/ServerProxy.java
@@ -5,6 +5,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import gtPlusPlus.core.common.CommonProxy;
+@SuppressWarnings("unused")
public class ServerProxy extends CommonProxy {
@Override
diff --git a/src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java b/src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java
deleted file mode 100644
index 0b2b452e43..0000000000
--- a/src/main/java/gtPlusPlus/core/recipe/Gregtech_Recipe_Adder.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package gtPlusPlus.core.recipe;
-
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_ModHandler;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.ItemUtils;
-
-public class Gregtech_Recipe_Adder {
-
- private static int euT;
- private static int ticks;
- private static ItemStack inputStack1;
- private static ItemStack inputStack2;
- private static ItemStack outputStack1;
- private static ItemStack outputStack2;
-
- public static void addRecipe(final Item maceratorInput, final int maceratorInputAmount1, final Item maceratorOutput,
- final int maceratorOutputAmount1, final Item compressorInput, final int compressorInputAmount1,
- final Item compressorOutput, final int compressorOutputAmount1, final Item blastFurnaceInput,
- final int blastFurnaceInputAmount1, final Item blastFurnaceOutput, final int blastFurnaceOutputAmount1,
- final Item blastFurnaceInput2, final int blastFurnaceInputAmount2, final Item blastFurnaceOutput2,
- final int blastFurnaceOutputAmount2, final Item smeltingInput, final int smeltingInputAmount1,
- final Item smeltingOutput, final int smeltingOutputAmount1, final int euPerTick, final int timeInTicks,
- final boolean addMaceratorRecipe, final boolean addCompressorRecipe, final boolean addBlastFurnaceRecipe,
- final int blastFurnaceTemp, final boolean addSmeltingRecipe, final boolean addMixerRecipe) {
- euT = euPerTick;
- ticks = timeInTicks;
-
- resetVars();
- if (addMaceratorRecipe) {
- inputStack1 = ItemUtils.getSimpleStack(maceratorInput, maceratorInputAmount1);
- outputStack1 = ItemUtils.getSimpleStack(maceratorOutput, maceratorOutputAmount1);
- addMaceratorRecipe(inputStack1, outputStack1);
- }
- resetVars();
- if (addCompressorRecipe) {
- inputStack1 = ItemUtils.getSimpleStack(compressorInput, compressorInputAmount1);
- outputStack1 = ItemUtils.getSimpleStack(compressorOutput, compressorOutputAmount1);
- addCompressorRecipe(inputStack1, outputStack1);
- }
- resetVars();
- if (addBlastFurnaceRecipe) {
- inputStack1 = ItemUtils.getSimpleStack(blastFurnaceInput, blastFurnaceInputAmount1);
- inputStack2 = ItemUtils.getSimpleStack(blastFurnaceInput2, blastFurnaceInputAmount2);
- outputStack1 = ItemUtils.getSimpleStack(blastFurnaceOutput, blastFurnaceOutputAmount1);
- outputStack2 = ItemUtils.getSimpleStack(blastFurnaceOutput2, blastFurnaceOutputAmount2);
- addBlastFurnaceRecipe(inputStack1, inputStack2, outputStack1, outputStack2, blastFurnaceTemp);
- }
- resetVars();
- if (addSmeltingRecipe) {
- inputStack1 = ItemUtils.getSimpleStack(smeltingInput, smeltingInputAmount1);
- outputStack1 = ItemUtils.getSimpleStack(smeltingOutput, smeltingOutputAmount1);
- addSmeltingRecipe(inputStack1, outputStack1);
- }
- resetVars();
- }
-
- private static void resetVars() {
- inputStack1 = null;
- inputStack2 = null;
- outputStack1 = null;
- outputStack2 = null;
- }
-
- private static void addMaceratorRecipe(final ItemStack input1, final ItemStack output1) {
- GT_ModHandler.addPulverisationRecipe(input1, output1);
- }
-
- private static void addCompressorRecipe(final ItemStack input1, final ItemStack output1) {
- GT_ModHandler.addCompressionRecipe(input1, output1);
- }
-
- private static void addBlastFurnaceRecipe(final ItemStack input1, final ItemStack input2, final ItemStack output1,
- final ItemStack output2, final int tempRequired) {
- Logger.INFO("Registering Blast Furnace Recipes.");
- GT_Values.RA
- .addBlastRecipe(input1, input2, GT_Values.NF, GT_Values.NF, output1, output2, ticks, euT, tempRequired);
- }
-
- private static void addSmeltingRecipe(final ItemStack input1, final ItemStack output1) {
- GT_ModHandler.addSmeltingRecipe(input1, output1);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java b/src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java
deleted file mode 100644
index ec23017166..0000000000
--- a/src/main/java/gtPlusPlus/core/recipe/RECIPES_MTWRAPPER.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package gtPlusPlus.core.recipe;
-
-public class RECIPES_MTWRAPPER {
-
- public static int MT_RECIPES_LOADED = 0;
- public static int MT_RECIPES_FAILED = 0;
-
- public static void run() {}
-
- public static void addShaped(final Object item_Output, final Object item_1, final Object item_2,
- final Object item_3, final Object item_4, final Object item_5, final Object item_6, final Object item_7,
- final Object item_8, final Object item_9) {}
-
- public static void addShapeless() {}
-}
diff --git a/src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java b/src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java
deleted file mode 100644
index 246e7f7495..0000000000
--- a/src/main/java/gtPlusPlus/core/slots/SlotChemicalPlantInput.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gtPlusPlus.core.slots;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidContainerRegistry;
-import net.minecraftforge.fluids.FluidStack;
-
-import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
-import gregtech.api.util.GT_Recipe;
-
-public class SlotChemicalPlantInput extends Slot {
-
- public SlotChemicalPlantInput(final IInventory inventory, final int index, final int x, final int y) {
- super(inventory, index, x, y);
- }
-
- @Override
- public boolean isItemValid(final ItemStack itemstack) {
- return isItemValidForChemicalPlantSlot(itemstack);
- }
-
- public static boolean isItemValidForChemicalPlantSlot(ItemStack aStack) {
- boolean validItem = GTPP_Recipe_Map.sChemicalPlantRecipes.containsInput(aStack);
- if (!validItem) {
- for (GT_Recipe f : GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) {
- if (f.mFluidInputs.length > 0) {
- for (FluidStack g : f.mFluidInputs) {
- if (g != null) {
- if (FluidContainerRegistry.containsFluid(aStack, g)) {
- return true;
- }
- }
- }
- }
- }
- }
- return validItem;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 64;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/slots/SlotFrame.java b/src/main/java/gtPlusPlus/core/slots/SlotFrame.java
deleted file mode 100644
index 9ee2a0d341..0000000000
--- a/src/main/java/gtPlusPlus/core/slots/SlotFrame.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gtPlusPlus.core.slots;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-import forestry.api.apiculture.IHiveFrame;
-
-public class SlotFrame extends Slot {
-
- public SlotFrame(final IInventory inventory, final int x, final int y, final int z) {
- super(inventory, x, y, z);
- }
-
- @Override
- public boolean isItemValid(final ItemStack itemstack) {
- return itemstack.getItem() instanceof IHiveFrame;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java b/src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java
deleted file mode 100644
index 8b57926193..0000000000
--- a/src/main/java/gtPlusPlus/core/slots/SlotGtToolElectric.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package gtPlusPlus.core.slots;
-
-import net.minecraft.init.Items;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gtPlusPlus.api.objects.Logger;
-import ic2.api.info.Info;
-import ic2.api.item.ElectricItem;
-import ic2.api.item.IElectricItem;
-
-public class SlotGtToolElectric extends SlotGtTool {
-
- public int tier;
- private ItemStack content;
-
- public SlotGtToolElectric(final IInventory base, final int x, final int y, final int z, final int tier,
- final boolean allowRedstoneDust) {
- super(base, x, y, z);
- this.tier = tier;
- this.allowRedstoneDust = allowRedstoneDust;
- }
-
- public boolean accepts(final ItemStack stack) {
- if (stack == null) {
- return false;
- }
- if ((stack.getItem() == Items.redstone) && (!this.allowRedstoneDust)) {
- return false;
- }
- return (Info.itemEnergy.getEnergyValue(stack) > 0.0D)
- || (ElectricItem.manager.discharge(stack, (1.0D / 0.0D), this.tier, true, true, true) > 0.0D);
- }
-
- public double discharge(final double amount, final boolean ignoreLimit) {
- if (amount <= 0.0D) {
- throw new IllegalArgumentException("Amount must be > 0.");
- }
- final ItemStack stack = this.get(0);
- if (stack == null) {
- return 0.0D;
- }
- double realAmount = ElectricItem.manager.discharge(stack, amount, this.tier, ignoreLimit, true, false);
- if (realAmount <= 0.0D) {
- realAmount = Info.itemEnergy.getEnergyValue(stack);
- if (realAmount <= 0.0D) {
- return 0.0D;
- }
- stack.stackSize -= 1;
- if (stack.stackSize <= 0) {
- this.put(0, null);
- }
- }
- return realAmount;
- }
-
- public void setTier(final int tier1) {
- this.tier = tier1;
- }
-
- public boolean allowRedstoneDust = true;
-
- public ItemStack get() {
- return this.get(0);
- }
-
- public ItemStack get(final int index) {
- return this.content;
- }
-
- public void put(final ItemStack content) {
- this.put(0, content);
- }
-
- public void put(final int index, final ItemStack content) {
- this.content = content;
- this.onChanged();
- }
-
- public void onChanged() {}
-
- @Override
- public boolean isItemValid(final ItemStack itemstack) {
- if ((itemstack.getItem() instanceof GT_MetaGenerated_Tool) || (itemstack.getItem() instanceof IElectricItem)) {
- Logger.WARNING(itemstack.getDisplayName() + " is a valid Tool.");
- return true;
- }
- Logger.WARNING(itemstack.getDisplayName() + " is not a valid Tool.");
- return false;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/slots/SlotOutput.java b/src/main/java/gtPlusPlus/core/slots/SlotOutput.java
deleted file mode 100644
index 1948b9aa17..0000000000
--- a/src/main/java/gtPlusPlus/core/slots/SlotOutput.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package gtPlusPlus.core.slots;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.InventoryCrafting;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-
-public class SlotOutput extends SlotCrafting {
-
- private final IInventory craftMatrix;
- private final EntityPlayer thePlayer;
- private int amountCrafted;
-
- public SlotOutput(final EntityPlayer player, final InventoryCrafting craftingInventory,
- final IInventory p_i45790_3_, final int slotIndex, final int xPosition, final int yPosition) {
- super(player, craftingInventory, p_i45790_3_, slotIndex, xPosition, yPosition);
- this.thePlayer = player;
- this.craftMatrix = craftingInventory;
- }
-
- /**
- * Check if the stack is a valid item for this slot. Always true beside for the armor slots.
- */
- @Override
- public boolean isItemValid(final ItemStack par1ItemStack) {
- return false;
- }
-
- /**
- * Decrease the size of the stack in slot (first int arg) by the amount of the second int arg. Returns the new
- * stack.
- */
- @Override
- public ItemStack decrStackSize(final int par1) {
- if (this.getHasStack()) {
- this.amountCrafted += Math.min(par1, this.getStack().stackSize);
- }
- return super.decrStackSize(par1);
- }
-
- /**
- * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an
- * internal count then calls onCrafting(item).
- */
- @Override
- protected void onCrafting(final ItemStack par1ItemStack, final int par2) {
- this.amountCrafted += par2;
- this.onCrafting(par1ItemStack);
- }
-
- /**
- * the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
- */
- @Override
- protected void onCrafting(final ItemStack stack) {
- stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.amountCrafted);
- this.amountCrafted = 0;
- }
-
- @Override
- public void onPickupFromSlot(final EntityPlayer playerIn, final ItemStack stack) {
- {
- FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, this.craftMatrix);
- this.onCrafting(stack);
- for (int i = 0; i < this.craftMatrix.getSizeInventory(); ++i) {
- final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i);
- if (itemstack1 != null) {
- this.craftMatrix.decrStackSize(i, 1);
- if (itemstack1.getItem().hasContainerItem(itemstack1)) {
- ItemStack itemstack2 = itemstack1.getItem().getContainerItem(itemstack1);
- if (itemstack2.isItemStackDamageable()
- && (itemstack2.getItemDamage() > itemstack2.getMaxDamage())) {
- MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this.thePlayer, itemstack2));
- itemstack2 = null;
- }
- if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2)) {
- if (this.craftMatrix.getStackInSlot(i) == null) {
- this.craftMatrix.setInventorySlotContents(i, itemstack2);
- } else {
- this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false);
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/slots/SlotRTG.java b/src/main/java/gtPlusPlus/core/slots/SlotRTG.java
deleted file mode 100644
index ef226e99ca..0000000000
--- a/src/main/java/gtPlusPlus/core/slots/SlotRTG.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gtPlusPlus.core.slots;
-
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
-import ic2.core.Ic2Items;
-
-public class SlotRTG extends Slot {
-
- public SlotRTG(final IInventory inventory, final int x, final int y, final int z) {
- super(inventory, x, y, z);
- }
-
- @Override
- public boolean isItemValid(final ItemStack itemstack) {
- return itemstack.getItem().getClass() == Ic2Items.RTGPellets.getItem().getClass();
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java b/src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java
deleted file mode 100644
index ff1484a984..0000000000
--- a/src/main/java/gtPlusPlus/core/tileentities/base/TILE_ENTITY_BASE.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package gtPlusPlus.core.tileentities.base;
-
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.NetworkManager;
-import net.minecraft.network.Packet;
-import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
-import net.minecraft.tileentity.TileEntity;
-
-public class TILE_ENTITY_BASE extends TileEntity {
-
- @Override
- public void writeToNBT(final NBTTagCompound tag) {
- super.writeToNBT(tag);
- this.writeCustomNBT(tag);
- }
-
- @Override
- public void readFromNBT(final NBTTagCompound tag) {
- super.readFromNBT(tag);
- this.readCustomNBT(tag);
- }
-
- public void writeCustomNBT(final NBTTagCompound tag) {}
-
- public void readCustomNBT(final NBTTagCompound tag) {}
-
- @Override
- public Packet getDescriptionPacket() {
- final NBTTagCompound tag = new NBTTagCompound();
- this.writeCustomNBT(tag);
- return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, -999, tag);
- }
-
- @Override
- public void onDataPacket(final NetworkManager net, final S35PacketUpdateTileEntity packet) {
- super.onDataPacket(net, packet);
- this.readCustomNBT(packet.func_148857_g());
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java b/src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java
deleted file mode 100644
index 49be958022..0000000000
--- a/src/main/java/gtPlusPlus/core/tileentities/base/TilePoweredGT.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * package gtPlusPlus.core.tileentities.base; public abstract class TilePoweredGT extends TileEntityBase implements
- * IGregtechPower { public static AutoMap<TilePoweredGT> mPoweredEntities = new AutoMap<TilePoweredGT>(); //Base Tile
- * Fields public boolean ignoreUnloadedChunks; public boolean isDead; //Meta Tile Fields private long mAcceptedAmperes;
- * private boolean[] mActiveEUInputs; private boolean[] mActiveEUOutputs; protected int[] mAverageEUInput; protected int
- * mAverageEUInputIndex; protected int[] mAverageEUOutput; protected int mAverageEUOutputIndex; private final
- * TileEntity[] mBufferedTileEntities; private byte mFacing = 0; private boolean mHasEnoughEnergy; private boolean
- * mNeedsUpdate; private boolean mNeedsBlockUpdate; private boolean mRunningThroughTick; private boolean
- * mSendClientData; protected boolean mReleaseEnergy; private long mTickTimer; protected long mStoredEnergy; protected
- * long mStoredSteam; public TilePoweredGT() { super(); this.mBufferedTileEntities = new TileEntity[6];
- * this.ignoreUnloadedChunks = true; this.isDead = false; mPoweredEntities.put(this); }
- * @Override public boolean acceptsRotationalEnergy(byte p0) { return false; } private boolean canAccessData() { return
- * this.isInvalid() ? false : true; } private final void clearNullMarkersFromTileEntityBuffer() { for (int i = 0; i <
- * this.mBufferedTileEntities.length; ++i) { if (this.mBufferedTileEntities[i] == this) { this.mBufferedTileEntities[i]
- * = null; } } } protected final void clearTileEntityBuffer() { for (int i = 0; i < this.mBufferedTileEntities.length;
- * ++i) { this.mBufferedTileEntities[i] = null; } } private boolean crossedChunkBorder(final int aX, final int aZ) {
- * return aX >> 4 != this.xCoord >> 4 || aZ >> 4 != this.zCoord >> 4; }
- * @Override public boolean decreaseStoredEnergyUnits(final long aEnergy, final boolean aIgnoreTooLessEnergy) { return
- * this.canAccessData() && (this.mHasEnoughEnergy = (this.decreaseStoredEU(aEnergy, aIgnoreTooLessEnergy) ||
- * this.decreaseStoredSteam(aEnergy, false) || (aIgnoreTooLessEnergy && this.decreaseStoredSteam(aEnergy, true)))); }
- * public boolean decreaseStoredEU(final long aEnergy, final boolean aIgnoreTooLessEnergy) { if (!this.canAccessData())
- * { return false; } if (this.getEUVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { return false; }
- * this.setStoredEU(this.getEUVar() - aEnergy); if (this.getEUVar() < 0L) { this.setStoredEU(0L); return false; } return
- * true; } public boolean decreaseStoredSteam(final long aEnergy, final boolean aIgnoreTooLessEnergy) { if
- * (!this.canAccessData()) { return false; } if (this.getSteamVar() - aEnergy < 0L && !aIgnoreTooLessEnergy) { return
- * false; } this.setStoredSteam(this.getSteamVar() - aEnergy); if (this.getSteamVar() < 0L) { this.setStoredSteam(0L);
- * return false; } return true; } public void doExplosion(final long aExplosionPower) { final float tStrength =
- * (aExplosionPower < GT_Values.V[0]) ? 1.0f : ((aExplosionPower < GT_Values.V[1]) ? 2.0f : ((aExplosionPower <
- * GT_Values.V[2]) ? 3.0f : ((aExplosionPower < GT_Values.V[3]) ? 4.0f : ((aExplosionPower < GT_Values.V[4]) ? 5.0f :
- * ((aExplosionPower < GT_Values.V[4] * 2L) ? 6.0f : ((aExplosionPower < GT_Values.V[5]) ? 7.0f : ((aExplosionPower <
- * GT_Values.V[6]) ? 8.0f : ((aExplosionPower < GT_Values.V[7]) ? 9.0f : 10.0f)))))))); final int tX = this.getXCoord();
- * final int tY = this.getYCoord(); final int tZ = this.getZCoord(); final World tWorld = this.getWorld();
- * GT_Utility.sendSoundToPlayers(tWorld, (String) GregTech_API.sSoundList.get(209), 1.0f, -1.0f, tX, tY, tZ);
- * tWorld.setBlock(tX, tY, tZ, Blocks.air); if (GregTech_API.sMachineExplosions) { tWorld.createExplosion((Entity) null,
- * tX + 0.5, tY + 0.5, tZ + 0.5, tStrength, true); } } public boolean drainEnergyUnits(final byte aSide, final long
- * aVoltage, final long aAmperage) { if (!this.canAccessData() || !this.isElectric() || !this.outputsEnergyTo(aSide) ||
- * this.getStoredEU() - aVoltage * aAmperage < this.getMinimumStoredEU()) { return false; } if
- * (this.decreaseStoredEU(aVoltage * aAmperage, false)) { final int[] mAverageEUOutput = this.mAverageEUOutput; final
- * int mAverageEUOutputIndex = this.mAverageEUOutputIndex; mAverageEUOutput[mAverageEUOutputIndex] += (int) (aVoltage *
- * aAmperage); return true; } return false; }
- * @Override public final boolean getAir(final int aX, final int aY, final int aZ) { return (this.ignoreUnloadedChunks
- * && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) || GT_Utility.isBlockAir(this.worldObj,
- * aX, aY, aZ); }
- * @Override public final boolean getAirAtSide(final byte aSide) { return this.getAirAtSideAndDistance(aSide, 1); }
- * @Override public final boolean getAirAtSideAndDistance(final byte aSide, final int aDistance) { return
- * this.getAir(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), this.getOffsetZ(aSide, aDistance));
- * }
- * @Override public final boolean getAirOffset(final int aX, final int aY, final int aZ) { return
- * this.getAir(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); }
- * @Override public long getAverageElectricInput() { int rEU = 0; for (int i = 0; i < this.mAverageEUInput.length; ++i)
- * { if (i != this.mAverageEUInputIndex) { rEU += this.mAverageEUInput[i]; } } return rEU / (this.mAverageEUInput.length
- * - 1); } public long getAverageElectricOutput() { int rEU = 0; for (int i = 0; i < this.mAverageEUOutput.length; ++i)
- * { if (i != this.mAverageEUOutputIndex) { rEU += this.mAverageEUOutput[i]; } } return rEU /
- * (this.mAverageEUOutput.length - 1); }
- * @Override public byte getBackFacing() { return GT_Utility.getOppositeSide((int) this.mFacing); }
- * @Override public final Block getBlock(final int aX, final int aY, final int aZ) { if (this.ignoreUnloadedChunks &&
- * this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) { return Blocks.air; } return
- * this.worldObj.getBlock(aX, aY, aZ); }
- * @Override public final Block getBlockAtSide(final byte aSide) { return this.getBlockAtSideAndDistance(aSide, 1); }
- * @Override public final Block getBlockAtSideAndDistance(final byte aSide, final int aDistance) { return
- * this.getBlock(this.getOffsetX(aSide, aDistance), this.getOffsetY(aSide, aDistance), this.getOffsetZ(aSide,
- * aDistance)); }
- * @Override public final Block getBlockOffset(final int aX, final int aY, final int aZ) { return
- * this.getBlock(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); }
- * @Override public String[] getDescription() { // TODO Auto-generated method stub return null; }
- * @Override public long getEUCapacity() { if (this.canAccessData()) { return this.maxEUStore(); } return 0L; } public
- * long getEUVar() { return mStoredEnergy; }
- * @Override public byte getFrontFacing() { return this.mFacing; }
- * @Override public final IGregTechTileEntity getIGregTechTileEntity(final int aX, final int aY, final int aZ) { final
- * TileEntity tTileEntity = this.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity) { return
- * (IGregTechTileEntity) tTileEntity; } return null; }
- * @Override public final IGregTechTileEntity getIGregTechTileEntityAtSide(final byte aSide) { final TileEntity
- * tTileEntity = this.getTileEntityAtSide(aSide); if (tTileEntity instanceof IGregTechTileEntity) { return
- * (IGregTechTileEntity) tTileEntity; } return null; }
- * @Override public final IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(final byte aSide, final int
- * aDistance) { final TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); if (tTileEntity
- * instanceof IGregTechTileEntity) { return (IGregTechTileEntity) tTileEntity; } return null; }
- * @Override public final IGregTechTileEntity getIGregTechTileEntityOffset(final int aX, final int aY, final int aZ) {
- * final TileEntity tTileEntity = this.getTileEntityOffset(aX, aY, aZ); if (tTileEntity instanceof IGregTechTileEntity)
- * { return (IGregTechTileEntity) tTileEntity; } return null; }
- * @Override public final IInventory getIInventory(final int aX, final int aY, final int aZ) { final TileEntity
- * tTileEntity = this.getTileEntity(aX, aY, aZ); if (tTileEntity instanceof IInventory) { return (IInventory)
- * tTileEntity; } return null; }
- * @Override public final IInventory getIInventoryAtSide(final byte aSide) { final TileEntity tTileEntity =
- * this.getTileEntityAtSide(aSide); if (tTileEntity instanceof IInventory) { return (IInventory) tTileEntity; } return
- * null; }
- * @Override public final IInventory getIInventoryAtSideAndDistance(final byte aSide, final int aDistance) { final
- * TileEntity tTileEntity = this.getTileEntityAtSideAndDistance(aSide, aDistance); if (tTileEntity instanceof
- * IInventory) { return (IInventory) tTileEntity; } return null; }
- * @Override public final IInventory getIInventoryOffset(final int aX, final int aY, final int aZ) { final TileEntity
- * tTileEntity = this.getTileEntityOffset(aX, aY, aZ); if (tTileEntity instanceof IInventory) { return (IInventory)
- * tTileEntity; } return null; }
- * @Override public String[] getInfoData() { // TODO Auto-generated method stub return null; }
- * @Override public long getInputAmperage() { if (this.canAccessData() && this.isElectric()) { return
- * this.maxAmperesIn(); } return 0L; } public long getInputTier() { return GT_Utility.getTier(this.getInputVoltage()); }
- * @Override public long getInputVoltage() { if (this.canAccessData() && this.isElectric()) { return this.maxEUInput();
- * } return 2147483647L; } private long getMinimumStoredEU() { return 0; }
- * @Override public final int getOffsetX(final byte aSide, final int aMultiplier) { return this.xCoord +
- * ForgeDirection.getOrientation((int) aSide).offsetX * aMultiplier; } public final short getOffsetY(final byte aSide,
- * final int aMultiplier) { return (short) (this.yCoord + ForgeDirection.getOrientation((int) aSide).offsetY *
- * aMultiplier); } public final int getOffsetZ(final byte aSide, final int aMultiplier) { return this.zCoord +
- * ForgeDirection.getOrientation((int) aSide).offsetZ * aMultiplier; }
- * @Override public long getOutputAmperage() { if (this.canAccessData() && this.isElectric()) { return
- * this.maxAmperesOut(); } return 0L; } public long getOutputTier() { return
- * GT_Utility.getTier(this.getOutputVoltage()); }
- * @Override public long getOutputVoltage() { if (this.canAccessData() && this.isElectric() && this.isEnetOutput()) {
- * return this.maxEUOutput(); } return 0L; }
- * @Override public int getRandomNumber(int p0) { return CORE.RANDOM.nextInt(); }
- * @Override public long getSteamCapacity() { if (this.canAccessData()) { return this.maxSteamStore(); } return 0L; }
- * public long getSteamVar() { return mStoredSteam; }
- * @Override public long getStoredEU() { if (this.canAccessData()) { return Math.min(this.getEUVar(),
- * this.getEUCapacity()); } return 0L; }
- * @Override public long getStoredSteam() { if (this.canAccessData()) { return Math.min(this.getSteamVar(),
- * this.getSteamCapacity()); } return 0L; }
- * @Override public final TileEntity getTileEntity(final int aX, final int aY, final int aZ) { if
- * (this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ)) { return
- * null; } return this.worldObj.getTileEntity(aX, aY, aZ); } public final TileEntity getTileEntityAtSide(final byte
- * aSide) { if (aSide < 0 || aSide >= 6 || this.mBufferedTileEntities[aSide] == this) { return null; } final int tX =
- * this.getOffsetX(aSide, 1); final int tY = this.getOffsetY(aSide, 1); final int tZ = this.getOffsetZ(aSide, 1); if
- * (this.crossedChunkBorder(tX, tZ)) { this.mBufferedTileEntities[aSide] = null; if (this.ignoreUnloadedChunks &&
- * !this.worldObj.blockExists(tX, tY, tZ)) { return null; } } if (this.mBufferedTileEntities[aSide] == null) {
- * this.mBufferedTileEntities[aSide] = this.worldObj.getTileEntity(tX, tY, tZ); if (this.mBufferedTileEntities[aSide] ==
- * null) { this.mBufferedTileEntities[aSide] = this; return null; } return this.mBufferedTileEntities[aSide]; } else {
- * if (this.mBufferedTileEntities[aSide].isInvalid()) { this.mBufferedTileEntities[aSide] = null; return
- * this.getTileEntityAtSide(aSide); } if (this.mBufferedTileEntities[aSide].xCoord == tX &&
- * this.mBufferedTileEntities[aSide].yCoord == tY && this.mBufferedTileEntities[aSide].zCoord == tZ) { return
- * this.mBufferedTileEntities[aSide]; } return null; } }
- * @Override public final TileEntity getTileEntityAtSideAndDistance(final byte aSide, final int aDistance) { if
- * (aDistance == 1) { return this.getTileEntityAtSide(aSide); } return this.getTileEntity(this.getOffsetX(aSide,
- * aDistance), this.getOffsetY(aSide, aDistance), this.getOffsetZ(aSide, aDistance)); }
- * @Override public final TileEntity getTileEntityOffset(final int aX, final int aY, final int aZ) { return
- * this.getTileEntity(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); }
- * @Override public long getUniversalEnergyCapacity() { return 0; }
- * @Override public long getUniversalEnergyStored() { return 0; }
- * @Override public World getWorld() { return this.getWorldObj(); }
- * @Override public int getXCoord() { return this.xCoord; }
- * @Override public short getYCoord() { return (short) this.yCoord; }
- * @Override public int getZCoord() { return this.zCoord; } public boolean hasEnoughEnergy() { return
- * (this.getStoredEU() > 0 ? (mHasEnoughEnergy = true) : (mHasEnoughEnergy = false)); }
- * @Override public boolean increaseStoredEnergyUnits(final long aEnergy, final boolean aIgnoreTooMuchEnergy) { if
- * (!this.canAccessData()) { return false; } if (this.getStoredEU() < this.getEUCapacity() || aIgnoreTooMuchEnergy) {
- * this.setStoredEU(this.getEUVar() + aEnergy); return true; } return false; }
- * @Override public boolean increaseStoredSteam(final long aEnergy, final boolean aIgnoreTooMuchEnergy) { if
- * (!this.canAccessData()) { return false; } if (this.getSteamVar() < this.getSteamCapacity() || aIgnoreTooMuchEnergy) {
- * this.setStoredSteam(this.getSteamVar() + aEnergy); return true; } return false; } public long injectEnergyUnits(final
- * byte aSide, final long aVoltage, long aAmperage) { if (!this.canAccessData() || !this.isElectric() ||
- * !this.inputEnergyFrom(aSide) || aAmperage <= 0L || aVoltage <= 0L || this.getStoredEU() >= this.getEUCapacity() ||
- * this.maxAmperesIn() <= this.mAcceptedAmperes) { return 0L; } if (aVoltage > this.getInputVoltage()) {
- * this.doExplosion(aVoltage); return 0L; } if (this.increaseStoredEnergyUnits(aVoltage (aAmperage = Math.min(aAmperage,
- * Math.min(this.maxAmperesIn() - this.mAcceptedAmperes, 1L + (this.getEUCapacity() - this.getStoredEU()) / aVoltage))),
- * true)) { final int[] mAverageEUInput = this.mAverageEUInput; final int mAverageEUInputIndex =
- * this.mAverageEUInputIndex; mAverageEUInput[mAverageEUInputIndex] += (int) (aVoltage * aAmperage);
- * this.mAcceptedAmperes += aAmperage; return aAmperage; } return 0L; }
- * @Override public boolean injectRotationalEnergy(byte p0, long p1, long p2) { return false; }
- * @Override public boolean inputEnergyFrom(final byte aSide) { if (aSide == 6) { return true; } if
- * (this.isServerSide()) { return aSide >= 0 && aSide < 6 && this.mActiveEUInputs[aSide] && !this.mReleaseEnergy; }
- * return this.isEnergyInputSide(aSide); } public final boolean isClientSide() { return this.worldObj.isRemote; }
- * @Override public boolean isDead() { return this.isDead; } private boolean isElectric() { return true; } private
- * boolean isEnergyInputSide(final byte aSide) { if (aSide >= 0 && aSide < 6) { if (this.isInvalid() ||
- * this.mReleaseEnergy) { return false; } if (this.canAccessData() && this.isElectric() && this.isEnetInput()) { return
- * this.isInputFacing(aSide); } } return false; } private boolean isEnergyOutputSide(final byte aSide) { if (aSide >= 0
- * && aSide < 6) { if (this.isInvalid() || this.mReleaseEnergy) { return this.mReleaseEnergy; } if (this.canAccessData()
- * && this.isElectric() && this.isEnetOutput()) { return this.isOutputFacing(side); } } return false; } public boolean
- * isEnetInput() { return false; } public boolean isEnetOutput() { return false; }
- * @Override public boolean isGivingInformation() { return this.canAccessData() && this.isGivingInformation(); } public
- * boolean isInputFacing(final byte aSide) { return false; }
- * @Override public boolean isInvalidTileEntity() { return isDead() ? true : false; } public boolean
- * isOutputFacing(final byte aSide) { return false; } public final boolean isServerSide() { return
- * !this.worldObj.isRemote; } public boolean isUniversalEnergyStored(final long aEnergyAmount) { return
- * this.getUniversalEnergyStored() >= aEnergyAmount || (this.mHasEnoughEnergy = false); }
- * @Override public boolean isValidFacing(final byte aSide) { return this.canAccessData(); } public long maxAmperesIn()
- * { return 1L; } public long maxAmperesOut() { return 1L; } public long maxEUInput() { return 0L; } public long
- * maxEUOutput() { return 0L; } public long maxEUStore() { return 0L; } public long maxSteamStore() { return 256000L; }
- * public final void onAdjacentBlockChange(final int aX, final int aY, final int aZ) {
- * this.clearNullMarkersFromTileEntityBuffer(); }
- * @Override public boolean outputsEnergyTo(final byte aSide) { if (aSide == 6) { return true; } if
- * (this.isServerSide()) { if (aSide < 0 || aSide >= 6 || !this.mActiveEUOutputs[aSide]) { if (!this.mReleaseEnergy) {
- * return false; } } return true; } return this.isEnergyOutputSide(aSide); } public final void sendBlockEvent(final byte
- * aID, final byte aValue) { GT_Values.NW.sendPacketToAllPlayersInRange(this.worldObj, (GT_Packet) new
- * GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue), this.xCoord, this.zCoord); }
- * public void setEUVar(final long aEnergy) { mStoredEnergy = aEnergy; }
- * @Override public void setFrontFacing(byte aFacing) { if (this.isValidFacing(aFacing)) { this.mFacing = aFacing;
- * //this.onFacingChange(); //this.onMachineBlockUpdate(); } } public void setSteamVar(final long aSteam) { mStoredSteam
- * = aSteam; } public boolean setStoredEU(long aEnergy) { if (!this.canAccessData()) { return false; } if (aEnergy < 0L)
- * { aEnergy = 0L; } this.setEUVar(aEnergy); return true; } public boolean setStoredSteam(long aEnergy) { if
- * (!this.canAccessData()) { return false; } if (aEnergy < 0L) { aEnergy = 0L; } this.setSteamVar(aEnergy); return true;
- * }
- * @Override public void writeToNBT(NBTTagCompound nbt) { // TODO Auto-generated method stub super.writeToNBT(nbt); }
- * @Override public void readFromNBT(NBTTagCompound nbt) { // TODO Auto-generated method stub super.readFromNBT(nbt); }
- * @Override public boolean onPreTick(long aTick) { return onPreTick(this, this.mTickTimer); }
- * @Override public boolean onTick(long aTick) { return onTick(this, this.mTickTimer); }
- * @Override public boolean onPostTick(long aTick) { return onPostTick(this, this.mTickTimer); }
- * @Override public boolean onPreTick(TilePoweredGT tilePoweredGT, long mTickTimer2) { return
- * super.onPreTick(mTickTimer2); }
- * @Override public boolean onTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2) { return
- * super.onTick(mTickTimer2); }
- * @Override public boolean onPostTick(TilePoweredGT iGregTechTileEntity, long mTickTimer2) { return
- * super.onPostTick(mTickTimer2); }
- * @Override public void markDirty() { super.markDirty(); }
- * @Override public boolean receiveClientEvent(int p_145842_1_, int p_145842_2_) { // TODO Auto-generated method stub
- * return super.receiveClientEvent(p_145842_1_, p_145842_2_); }
- * @Override public void onChunkUnload() { this.clearNullMarkersFromTileEntityBuffer(); super.onChunkUnload();
- * this.isDead = true; } public void updateEntity() { super.updateEntity(); this.isDead = false;
- * this.mRunningThroughTick = true; long tTime = System.currentTimeMillis(); int tCode = 0; final boolean aSideServer =
- * this.isServerSide(); final boolean aSideClient = this.isClientSide(); try { for (tCode = 0;
- * this.hasValidMetaTileEntity() && tCode >= 0; tCode = -1) { Label_1743 : { switch (tCode) { case 0 : { ++tCode; if
- * (this.mTickTimer++ != 0L) { break Label_1743; } this.oX = this.xCoord; this.oY = this.yCoord; this.oZ = this.zCoord;
- * this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, (TileEntity) this);
- * this.onFirstTick(this); if (!this.hasValidMetaTileEntity()) { this.mRunningThroughTick = false; return; } break
- * Label_1743; } case 1 : { ++tCode; if (!aSideClient) { break Label_1743; } if (this.mNeedsUpdate) {
- * this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); this.mNeedsUpdate = false; } break
- * Label_1743; } case 2 : case 3 : case 4 : case 5 : case 6 : case 7 : { if (aSideServer && this.mTickTimer > 10L) { for
- * (byte i = (byte) (tCode - 2); i < 6; ++i) { } } } case 8 : { tCode = 9; if (aSideServer) { if
- * (++this.mAverageEUInputIndex >= this.mAverageEUInput.length) { this.mAverageEUInputIndex = 0; } if
- * (++this.mAverageEUOutputIndex >= this.mAverageEUOutput.length) { this.mAverageEUOutputIndex = 0; }
- * this.mAverageEUInput[this.mAverageEUInputIndex] = 0; this.mAverageEUOutput[this.mAverageEUOutputIndex] = 0; } } case
- * 9 : { ++tCode; this.onPreTick(this, this.mTickTimer); if (!this.hasValidMetaTileEntity()) { this.mRunningThroughTick
- * = false; return; } } case 10 : { ++tCode; if (!aSideServer) { break Label_1743; } if (this.xCoord != this.oX ||
- * this.yCoord != this.oY || this.zCoord != this.oZ) { this.oX = this.xCoord; this.oY = this.yCoord; this.oZ =
- * this.zCoord; this.issueClientUpdate(); this.clearTileEntityBuffer(); } if (this.mFacing != this.oFacing) {
- * this.oFacing = this.mFacing; this.issueBlockUpdate(); } if (this.mTickTimer > 20L && this.isElectric()) {
- * this.mAcceptedAmperes = 0L; if (this.getOutputVoltage() != this.oOutput) { this.oOutput = this.getOutputVoltage(); }
- * if (this.isEnetOutput() || this.isEnetInput()) { for (byte i = 0; i < 6; ++i) { boolean temp =
- * this.isEnergyInputSide(i); if (temp != this.mActiveEUInputs[i]) { this.mActiveEUInputs[i] = temp; } temp =
- * this.isEnergyOutputSide(i); if (temp != this.mActiveEUOutputs[i]) { this.mActiveEUOutputs[i] = temp; } } } if
- * (this.isEnetOutput() && this.oOutput > 0L) { final long tOutputVoltage = Math.max(this.oOutput, this.oOutput + (1 <<
- * GT_Utility.getTier(this.oOutput))); final long tUsableAmperage = Math.min(this.getOutputAmperage(),
- * (this.getStoredEU() - this.getMinimumStoredEU()) / tOutputVoltage); if (tUsableAmperage > 0L) { final long tEU =
- * tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork( this.oOutput, tUsableAmperage, (IEnergyConnected) this);
- * final int[] mAverageEUOutput = this.mAverageEUOutput; final int mAverageEUOutputIndex = this.mAverageEUOutputIndex;
- * mAverageEUOutput[mAverageEUOutputIndex] += (int) tEU; this.decreaseStoredEU(tEU, true); } } if (this.getEUCapacity()
- * > 0L) { if (GregTech_API.sMachineFireExplosions && this.getRandomNumber(1000) == 0) { final Block tBlock =
- * this.getBlockAtSide((byte) this.getRandomNumber(6)); if (tBlock instanceof BlockFire) { this.doEnergyExplosion(); } }
- * if (!this.hasValidMetaTileEntity()) { this.mRunningThroughTick = false; return; } } } if
- * (!this.hasValidMetaTileEntity()) { this.mRunningThroughTick = false; return; } break Label_1743; } case 13 : {
- * ++tCode; this.updateStatus(); if (!this.hasValidMetaTileEntity()) { this.mRunningThroughTick = false; return; } }
- * case 14 : { ++tCode; this.onPostTick((IGregTechTileEntity) this, this.mTickTimer); if
- * (!this.hasValidMetaTileEntity()) { this.mRunningThroughTick = false; return; } } case 15 : { ++tCode; if
- * (!aSideServer) { break; } if (this.mTickTimer % 10L == 0L && this.mSendClientData) { final IGT_NetworkHandler nw =
- * GT_Values.NW; final World worldObj = this.worldObj; final int xCoord = this.xCoord; final short n = (short)
- * this.yCoord; final int zCoord = this.zCoord; final short mid = this.mID; final int n2 = this.mCoverSides[0]; final
- * int n3 = this.mCoverSides[1]; final int n4 = this.mCoverSides[2]; final int n5 = this.mCoverSides[3]; final int n6 =
- * this.mCoverSides[4]; final int n7 = this.mCoverSides[5]; final byte oTextureData = (byte) ((this.mFacing & 0x7) |
- * (this.mActive ? 8 : 0) | (this.mRedstone ? 16 : 0) | (this.mLockUpgrade ? 32 : 0)); this.oTextureData = oTextureData;
- * final byte oTexturePage = (byte) ((this.hasValidMetaTileEntity() && this.mMetaTileEntity instanceof
- * GT_MetaTileEntity_Hatch) ? ((GT_MetaTileEntity_Hatch) this.mMetaTileEntity).getTexturePage() : 0); this.oTexturePage
- * = oTexturePage; final byte oUpdateData = (byte) (this.hasValidMetaTileEntity() ? this.mMetaTileEntity.getUpdateData()
- * : 0); this.oUpdateData = oUpdateData; final byte oRedstoneData = (byte) (((this.mSidedRedstone[0] > 0) ? 1 : 0) |
- * ((this.mSidedRedstone[1] > 0) ? 2 : 0) | ((this.mSidedRedstone[2] > 0) ? 4 : 0) | ((this.mSidedRedstone[3] > 0) ? 8 :
- * 0) | ((this.mSidedRedstone[4] > 0) ? 16 : 0) | ((this.mSidedRedstone[5] > 0) ? 32 : 0)); this.oRedstoneData =
- * oRedstoneData; final byte mColor = this.mColor; this.oColor = mColor; nw.sendPacketToAllPlayersInRange(worldObj,
- * (GT_Packet) new GT_Packet_TileEntity(xCoord, n, zCoord, mid, n2, n3, n4, n5, n6, n7, oTextureData, oTexturePage,
- * oUpdateData, oRedstoneData, mColor), this.xCoord, this.zCoord); this.mSendClientData = false; } if (this.mTickTimer >
- * 10L) { byte tData = (byte) ((this.mFacing & 0x7) | (this.mActive ? 8 : 0) | (this.mRedstone ? 16 : 0) |
- * (this.mLockUpgrade ? 32 : 0)); if (tData != this.oTextureData) { this.sendBlockEvent((byte) 0, this.oTextureData =
- * tData); } tData = this.mMetaTileEntity.getUpdateData(); if (tData != this.oUpdateData) { this.sendBlockEvent((byte)
- * 1, this.oUpdateData = tData); } if (this.mMetaTileEntity instanceof GT_MetaTileEntity_Hatch) { tData =
- * ((GT_MetaTileEntity_Hatch) this.mMetaTileEntity).getTexturePage(); if (tData != this.oTexturePage) { final byte b =
- * 1; final byte oTexturePage2 = tData; this.oTexturePage = oTexturePage2; this.sendBlockEvent(b, (byte) (oTexturePage2
- * | 0x80)); } } if (this.mColor != this.oColor) { this.sendBlockEvent((byte) 2, this.oColor = this.mColor); } tData =
- * (byte) (((this.mSidedRedstone[0] > 0) ? 1 : 0) | ((this.mSidedRedstone[1] > 0) ? 2 : 0) | ((this.mSidedRedstone[2] >
- * 0) ? 4 : 0) | ((this.mSidedRedstone[3] > 0) ? 8 : 0) | ((this.mSidedRedstone[4] > 0) ? 16 : 0) |
- * ((this.mSidedRedstone[5] > 0) ? 32 : 0)); if (tData != this.oRedstoneData) { this.sendBlockEvent((byte) 3,
- * this.oRedstoneData = tData); } if (this.mLightValue != this.oLightValue) {
- * this.worldObj.setLightValue(EnumSkyBlock.Block, this.xCoord, this.yCoord, this.zCoord, (int) this.mLightValue);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, this.zCoord);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord + 1, this.yCoord, this.zCoord);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord - 1, this.yCoord, this.zCoord);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord + 1, this.zCoord);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord - 1, this.zCoord);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, this.zCoord + 1);
- * this.worldObj.updateLightByType(EnumSkyBlock.Block, this.xCoord, this.yCoord, this.zCoord - 1);
- * this.issueTextureUpdate(); this.sendBlockEvent((byte) 7, this.oLightValue = this.mLightValue); } } if
- * (this.mNeedsBlockUpdate) { this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord,
- * this.getBlockOffset(0, 0, 0)); this.mNeedsBlockUpdate = false; break; } break; } } } } } catch (Throwable e) {
- * e.printStackTrace(GT_Log.err); } if (aSideServer && this.hasValidMetaTileEntity()) { tTime =
- * System.currentTimeMillis() - tTime; if (this.mTimeStatistics.length > 0) {
- * this.mTimeStatistics[this.mTimeStatisticsIndex = (this.mTimeStatisticsIndex + 1) % this.mTimeStatistics.length] =
- * (int) tTime; } if (tTime > 0L && tTime > GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING && this.mTickTimer >
- * 1000L && this.getMetaTileEntity().doTickProfilingMessageDuringThisTick() && this.mLagWarningCount++ < 10) {
- * System.out.println("WARNING: Possible Lag Source at [" + this.xCoord + ", " + this.yCoord + ", " + this.zCoord +
- * "] in Dimension " + this.worldObj.provider.dimensionId + " with " + tTime + "ms caused by an instance of " +
- * this.getMetaTileEntity().getClass()); } } final boolean mWorkUpdate = false; this.mRunningThroughTick = mWorkUpdate;
- * this.mInventoryChanged = mWorkUpdate; this.mWorkUpdate = mWorkUpdate; } private void onFirstTick(TilePoweredGT
- * tilePoweredGT) { // TODO Auto-generated method stub } private boolean hasValidMetaTileEntity() { return
- * Utils.invertBoolean(isDead()); } public void issueBlockUpdate() { this.mNeedsBlockUpdate = true; } public void
- * issueClientUpdate() { this.mSendClientData = true; } public Packet getDescriptionPacket() { this.issueClientUpdate();
- * return null; } }
- */
diff --git a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java b/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java
deleted file mode 100644
index afc7ee130c..0000000000
--- a/src/main/java/gtPlusPlus/core/tileentities/general/TileEntityReverter.java
+++ /dev/null
@@ -1,288 +0,0 @@
-package gtPlusPlus.core.tileentities.general;
-
-import java.util.Random;
-
-import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
-import net.minecraft.tileentity.TileEntity;
-
-import gtPlusPlus.core.block.ModBlocks;
-
-public class TileEntityReverter extends TileEntity {
-
- private static final int REVERT_CHANCE = 10;
- public int radius = 16;
- public int diameter = (8 * this.radius) + 4;
- public double requiredPlayerRange = 64.0D;
- public Random rand = new Random();
- private int tickCount;
- private boolean slowScan;
- private int ticksSinceChange;
- private Block[] blockData;
- private byte[] metaData;
-
- @Override
- public boolean canUpdate() {
- return true;
- }
-
- @Override
- public void updateEntity() {
- if (this.anyPlayerInRange()) {
- this.tickCount += 1;
- if (this.worldObj.isRemote) {
- final double var1 = this.xCoord + this.worldObj.rand.nextFloat();
- final double var3 = this.yCoord + this.worldObj.rand.nextFloat();
- final double var5 = this.zCoord + this.worldObj.rand.nextFloat();
-
- this.worldObj.spawnParticle("enchantmenttable", var1, var3, var5, 0.0D, 0.0D, 0.0D);
- if (this.rand.nextInt(5) == 0) {
- this.makeRandomOutline();
- this.makeRandomOutline();
- this.makeRandomOutline();
- }
- } else {
- if ((this.blockData == null) || (this.metaData == null)) {
- this.captureBlockData();
- this.slowScan = true;
- }
- if ((!this.slowScan) || ((this.tickCount % 20) == 0)) {
- if (this.scanAndRevertChanges()) {
- this.slowScan = false;
- this.ticksSinceChange = 0;
- } else {
- this.ticksSinceChange += 1;
- if (this.ticksSinceChange > 20) {
- this.slowScan = true;
- }
- }
- }
- }
- } else {
- this.blockData = null;
- this.metaData = null;
-
- this.tickCount = 0;
- }
- }
-
- private void makeRandomOutline() {
- this.makeOutline(this.rand.nextInt(12));
- }
-
- private void makeOutline(final int outline) {
- double sx = this.xCoord;
- double sy = this.yCoord;
- double sz = this.zCoord;
-
- double dx = this.xCoord;
- double dy = this.yCoord;
- double dz = this.zCoord;
- switch (outline) {
- case 0:
- sx -= this.radius;
- dx -= this.radius;
- sz -= this.radius;
- dz += this.radius + 1;
- case 8:
- sx -= this.radius;
- dx += this.radius + 1;
- sz -= this.radius;
- dz -= this.radius;
- break;
- case 1:
- case 9:
- sx -= this.radius;
- dx -= this.radius;
- sz -= this.radius;
- dz += this.radius + 1;
- break;
- case 2:
- case 10:
- sx -= this.radius;
- dx += this.radius + 1;
- sz += this.radius + 1;
- dz += this.radius + 1;
- break;
- case 3:
- case 11:
- sx += this.radius + 1;
- dx += this.radius + 1;
- sz -= this.radius;
- dz += this.radius + 1;
- break;
- case 4:
- sx -= this.radius;
- dx -= this.radius;
- sz -= this.radius;
- dz -= this.radius;
- break;
- case 5:
- sx += this.radius + 1;
- dx += this.radius + 1;
- sz -= this.radius;
- dz -= this.radius;
- break;
- case 6:
- sx += this.radius + 1;
- dx += this.radius + 1;
- sz += this.radius + 1;
- dz += this.radius + 1;
- break;
- case 7:
- sx -= this.radius;
- dx -= this.radius;
- sz += this.radius + 1;
- dz += this.radius + 1;
- }
- switch (outline) {
- case 0:
- case 1:
- case 2:
- case 3:
- sy += this.radius + 1;
- dy += this.radius + 1;
- break;
- case 4:
- case 5:
- case 6:
- case 7:
- sy -= this.radius;
- dy += this.radius + 1;
- break;
- case 8:
- case 9:
- case 10:
- case 11:
- sy -= this.radius;
- dy -= this.radius;
- }
- if (this.rand.nextBoolean()) {
- this.drawParticleLine(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, dx, dy, dz);
- } else {
- this.drawParticleLine(sx, sy, sz, this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D);
- }
- this.drawParticleLine(sx, sy, sz, dx, dy, dz);
- }
-
- protected void drawParticleLine(final double srcX, final double srcY, final double srcZ, final double destX,
- final double destY, final double destZ) {
- final int particles = 16;
- for (int i = 0; i < particles; i++) {
- final double trailFactor = i / (particles - 1.0D);
-
- final double tx = srcX + ((destX - srcX) * trailFactor) + (this.rand.nextFloat() * 0.005D);
- final double ty = srcY + ((destY - srcY) * trailFactor) + (this.rand.nextFloat() * 0.005D);
- final double tz = srcZ + ((destZ - srcZ) * trailFactor) + (this.rand.nextFloat() * 0.005D);
- this.worldObj.spawnParticle("portal", tx, ty, tz, 0.0D, 0.0D, 0.0D);
- }
- }
-
- private boolean scanAndRevertChanges() {
- int index = 0;
- boolean reverted = false;
- for (int x = -this.radius; x <= this.radius; x++) {
- for (int y = -this.radius; y <= this.radius; y++) {
- for (int z = -this.radius; z <= this.radius; z++) {
- final Block blockID = this.worldObj.getBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z);
- final byte meta = (byte) this.worldObj
- .getBlockMetadata(this.xCoord + x, this.yCoord + y, this.zCoord + z);
- if (this.blockData[index] != blockID) {
- if (this.revertBlock(
- this.xCoord + x,
- this.yCoord + y,
- this.zCoord + z,
- blockID,
- meta,
- this.blockData[index],
- this.metaData[index])) {
- reverted = true;
- } else {
- this.blockData[index] = blockID;
- this.metaData[index] = meta;
- }
- }
- index++;
- }
- }
- }
- return reverted;
- }
-
- private boolean revertBlock(final int x, final int y, final int z, final Block thereBlockID, final byte thereMeta,
- final Block replaceBlockID, byte replaceMeta) {
- /*
- * if ((thereBlockID == Blocks.air) && (!replaceBlockID.getMaterial().blocksMovement())) {
- * System.out.println("Not replacing block " + replaceBlockID + " because it doesn't block movement"); return
- * false; }
- */
- if (this.isUnrevertable(thereBlockID, thereMeta, replaceBlockID, replaceMeta)) {
- return false;
- }
- if (this.rand.nextInt(5) == 0) {
- if (replaceBlockID != Blocks.air) {
- // replaceBlockID = null;
- replaceMeta = 4;
- }
- this.worldObj.setBlock(x, y, z, replaceBlockID, replaceMeta, 2);
- if (thereBlockID == Blocks.air) {
- this.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(replaceBlockID) + (replaceMeta << 12));
- } else if (replaceBlockID == Blocks.air) {
- this.worldObj.playAuxSFX(2001, x, y, z, Block.getIdFromBlock(thereBlockID) + (thereMeta << 12));
- thereBlockID.dropBlockAsItem(this.worldObj, x, y, z, thereMeta, 0);
- }
- }
- return true;
- }
-
- private boolean isUnrevertable(final Block thereBlockID, final byte thereMeta, final Block replaceBlockID,
- final byte replaceMeta) {
- if ((thereBlockID == ModBlocks.blockGriefSaver) || (replaceBlockID == ModBlocks.blockGriefSaver)) {
- return true;
- }
- /*
- * if (((thereBlockID == towerTranslucent) && (thereMeta != 4)) || ((replaceBlockID == towerTranslucent) &&
- * (replaceMeta != 4))) { return true; }
- */
- if ((thereBlockID == Blocks.redstone_lamp) && (replaceBlockID == Blocks.lit_redstone_lamp)) {
- return true;
- }
- if ((thereBlockID == Blocks.lit_redstone_lamp) && (replaceBlockID == Blocks.redstone_lamp)) {
- return true;
- }
- /*
- * if ((thereBlockID == Blocks.water) || (replaceBlockID == Blocks.flowing_water)) { return true; } if
- * ((thereBlockID == Blocks.flowing_water) || (replaceBlockID == Blocks.water)) { return true; }
- */
- if (replaceBlockID == Blocks.tnt) {
- return true;
- }
- return false;
- }
-
- private void captureBlockData() {
- this.blockData = new Block[this.diameter * this.diameter * this.diameter];
- this.metaData = new byte[this.diameter * this.diameter * this.diameter];
-
- int index = 0;
- for (int x = -this.radius; x <= this.radius; x++) {
- for (int y = -this.radius; y <= this.radius; y++) {
- for (int z = -this.radius; z <= this.radius; z++) {
- final Block blockID = this.worldObj.getBlock(this.xCoord + x, this.yCoord + y, this.zCoord + z);
- final int meta = this.worldObj.getBlockMetadata(this.xCoord + x, this.yCoord + y, this.zCoord + z);
-
- this.blockData[index] = blockID;
- this.metaData[index] = ((byte) meta);
-
- index++;
- }
- }
- }
- }
-
- public boolean anyPlayerInRange() {
- return this.worldObj
- .getClosestPlayer(this.xCoord + 0.5D, this.yCoord + 0.5D, this.zCoord + 0.5D, this.requiredPlayerRange)
- != null;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java b/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java
deleted file mode 100644
index 71d0c16e14..0000000000
--- a/src/main/java/gtPlusPlus/core/util/data/EnumUtils.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gtPlusPlus.core.util.data;
-
-import com.google.common.base.Enums;
-import com.google.common.base.Optional;
-
-public class EnumUtils {
-
- /**
- * Returns the value of an Enum if it exists. If value is not found, case-insensitive search will occur. If value
- * still not found, an IllegalArgumentException is thrown.
- **/
- public static <T extends Enum<T>> T getValue(Class<T> enumeration, String name) {
- Optional<T> j = Enums.getIfPresent(enumeration, name);
- T VALUE;
- if (j == null || !j.isPresent()) {
- VALUE = valueOfIgnoreCase(enumeration, name);
- } else {
- VALUE = j.get();
- }
- return VALUE;
- }
-
- /**
- * Finds the value of the given enumeration by name, case-insensitive. Throws an IllegalArgumentException if no
- * match is found.
- **/
- private static <T extends Enum<T>> T valueOfIgnoreCase(Class<T> enumeration, String name) {
-
- for (T enumValue : enumeration.getEnumConstants()) {
- if (enumValue.name().equalsIgnoreCase(name)) {
- return enumValue;
- }
- }
-
- throw new IllegalArgumentException(
- String.format("There is no value with name '%s' in Enum %s", name, enumeration.getName()));
- }
-
- public static Object getValue(Class class1, String materialName, boolean bool) {
- if (Enum.class.isInstance(class1)) {
- return getValue(class1, materialName);
- }
- return null;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java b/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java
deleted file mode 100644
index 5332c82bf7..0000000000
--- a/src/main/java/gtPlusPlus/core/util/data/LoggingUtils.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package gtPlusPlus.core.util.data;
-
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.Date;
-
-public class LoggingUtils {
-
- public static void profileLog(final Object o) {
- try {
- String content;
- final File file = new File("GregtechTimingsTC.txt");
- // if file doesnt exists, then create it
- if (!file.exists()) {
- file.createNewFile();
- final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
- final BufferedWriter bw = new BufferedWriter(fw);
- bw.write("============================================================");
- bw.write(System.lineSeparator());
- bw.close();
- }
- if (o instanceof String) {
- content = (String) o;
- } else {
- content = o.toString();
- }
- final FileWriter fw = new FileWriter(file.getAbsoluteFile(), true);
- final BufferedWriter bw = new BufferedWriter(fw);
- bw.write(content);
- bw.write(System.lineSeparator());
- bw.close();
- System.out.println("Data Logged.");
-
- } catch (final IOException e) {
- System.out.println("Data logging failed.");
- }
- }
-
- public static boolean logCurrentSystemTime(final String message) {
- final Date date = new Date(System.currentTimeMillis());
- try {
- profileLog(message + " | " + date.toString());
- return true;
- } catch (final Throwable r) {
- return false;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java b/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java
deleted file mode 100644
index 71634b3af7..0000000000
--- a/src/main/java/gtPlusPlus/core/util/data/UUIDUtils.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package gtPlusPlus.core.util.data;
-
-import java.nio.ByteBuffer;
-import java.util.UUID;
-
-public class UUIDUtils {
-
- // UUID Methods below created by https://gist.github.com/jeffjohnson9046
- // https://gist.github.com/jeffjohnson9046/c663dd22bbe6bb0b3f5e
-
- public static byte[] getBytesFromUUID(UUID uuid) {
- ByteBuffer bb = ByteBuffer.wrap(new byte[16]);
- bb.putLong(uuid.getMostSignificantBits());
- bb.putLong(uuid.getLeastSignificantBits());
- return bb.array();
- }
-
- public static UUID getUUIDFromBytes(byte[] bytes) {
- ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);
- Long high = byteBuffer.getLong();
- Long low = byteBuffer.getLong();
- return new UUID(high, low);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java
deleted file mode 100644
index 56c93d4a4d..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_INIT.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import gtPlusPlus.preloader.CORE_Preloader;
-
-public class DEBUG_INIT {
-
- public static void registerBlocks() {
- // Debug Loading
- if (CORE_Preloader.DEBUG_MODE) {}
- }
-
- public static void registerItems() {
- /*
- * ModItems.itemDebugShapeSpawner = new DEBUG_ITEM_ShapeSpawner("itemDebugShapeSpawner",
- * AddToCreativeTab.tabMisc, 1, 500); GameRegistry.registerItem(ModItems.itemDebugShapeSpawner,
- * "itemDebugShapeSpawner"); ModItems.itemBedLocator_Base = new BedLocator_Base("itemBedLocator_Base");
- * GameRegistry.registerItem(ModItems.itemBedLocator_Base, "itemBedLocator_Base");
- * ModItems.itemBaseItemWithCharge = new BaseItemWithCharge("itemBaseItemWithCharge", 0, 1000);
- * GameRegistry.registerItem(ModItems.itemBaseItemWithCharge, "itemBaseItemWithCharge");
- */
- }
-
- public static void registerTEs() {}
-
- public static void registerMisc() {}
-
- public static void registerHandlers() {
- // MinecraftForge.EVENT_BUS.register(new DEBUG_ScreenOverlay());
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
deleted file mode 100644
index 07f8d6385a..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ITEM_ShapeSpawner.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import static net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK;
-
-import java.util.List;
-
-import net.minecraft.creativetab.CreativeTabs;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.event.entity.player.PlayerInteractEvent;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.item.base.BaseItemGeneric;
-
-public class DEBUG_ITEM_ShapeSpawner extends BaseItemGeneric {
-
- public DEBUG_ITEM_ShapeSpawner(String s, CreativeTabs c, int stackSize, int maxDmg) {
- super(s, c, stackSize, maxDmg);
- s = "itemDebugShapeSpawner";
- c = AddToCreativeTab.tabMisc;
- stackSize = 1;
- maxDmg = 500;
- }
-
- @Override
- public ItemStack onItemRightClick(final ItemStack stack, final World world, final EntityPlayer player) {
-
- if (!world.isRemote) {
- Logger.INFO("Constructing the shape for the " + "VACUUM FREEZER");
- final Thread thread = new Thread(new DEBUG_TimerThread(world, player));
- thread.start();
- }
- return stack;
- }
-
- @SubscribeEvent
- public void playerInteractEventHandler(final PlayerInteractEvent event) {
- if (event.isCanceled() || event.world.isRemote || (event.action != RIGHT_CLICK_BLOCK)) {
- return;
- }
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- @Override
- public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
- list.add(EnumChatFormatting.GOLD + "For Testing Gregtech Shapes!");
- super.addInformation(stack, aPlayer, list, bool);
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java
deleted file mode 100644
index 0df691624f..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_MULTIBLOCK_ShapeSpawner.java
+++ /dev/null
@@ -1,953 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import static gregtech.api.enums.GT_Values.V;
-
-import java.util.ArrayList;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.gui.modularui.GT_UIInfos;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-
-public abstract class DEBUG_MULTIBLOCK_ShapeSpawner extends MetaTileEntity {
-
- public static boolean disableMaintenance;
- public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false,
- mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false;
- public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0,
- mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0;
- public ItemStack[] mOutputItems = null;
- public FluidStack[] mOutputFluids = null;
- public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<>();
- public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<>();
-
- public DEBUG_MULTIBLOCK_ShapeSpawner(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional, 2);
- DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- }
-
- public DEBUG_MULTIBLOCK_ShapeSpawner(final String aName) {
- super(aName, 2);
- DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance = GregTech_API.sMachineFile
- .get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- }
-
- public static boolean isValidMetaTileEntity(final MetaTileEntity aMetaTileEntity) {
- return (aMetaTileEntity.getBaseMetaTileEntity() != null)
- && (aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity)
- && !aMetaTileEntity.getBaseMetaTileEntity().isDead();
- }
-
- @Override
- public boolean allowCoverOnSide(final ForgeDirection side, final GT_ItemStack aCoverID) {
- return side != this.getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public boolean isSimpleMachine() {
- return false;
- }
-
- @Override
- public boolean isFacingValid(final ForgeDirection facing) {
- return true;
- }
-
- @Override
- public boolean isAccessAllowed(final EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public boolean isValidSlot(final int aIndex) {
- return aIndex > 0;
- }
-
- @Override
- public int getProgresstime() {
- return this.mProgresstime;
- }
-
- @Override
- public int maxProgresstime() {
- return this.mMaxProgresstime;
- }
-
- @Override
- public int increaseProgress(final int aProgress) {
- return aProgress;
- }
-
- @Override
- public void saveNBTData(final NBTTagCompound aNBT) {
- aNBT.setInteger("mEUt", this.mEUt);
- aNBT.setInteger("mProgresstime", this.mProgresstime);
- aNBT.setInteger("mMaxProgresstime", this.mMaxProgresstime);
- aNBT.setInteger("mEfficiencyIncrease", this.mEfficiencyIncrease);
- aNBT.setInteger("mEfficiency", this.mEfficiency);
- aNBT.setInteger("mPollution", this.mPollution);
- aNBT.setInteger("mRuntime", this.mRuntime);
-
- if (this.mOutputItems != null) {
- for (int i = 0; i < this.mOutputItems.length; i++) {
- if (this.mOutputItems[i] != null) {
- final NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputItems[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputItem" + i, tNBT);
- }
- }
- }
- if (this.mOutputFluids != null) {
- for (int i = 0; i < this.mOutputFluids.length; i++) {
- if (this.mOutputFluids[i] != null) {
- final NBTTagCompound tNBT = new NBTTagCompound();
- this.mOutputFluids[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputFluids" + i, tNBT);
- }
- }
- }
-
- aNBT.setBoolean("mWrench", this.mWrench);
- aNBT.setBoolean("mScrewdriver", this.mScrewdriver);
- aNBT.setBoolean("mSoftHammer", this.mSoftHammer);
- aNBT.setBoolean("mHardHammer", this.mHardHammer);
- aNBT.setBoolean("mSolderingTool", this.mSolderingTool);
- aNBT.setBoolean("mCrowbar", this.mCrowbar);
- }
-
- @Override
- public void loadNBTData(final NBTTagCompound aNBT) {
- this.mEUt = aNBT.getInteger("mEUt");
- this.mProgresstime = aNBT.getInteger("mProgresstime");
- this.mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- if (this.mMaxProgresstime > 0) {
- this.mRunningOnLoad = true;
- }
- this.mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
- this.mEfficiency = aNBT.getInteger("mEfficiency");
- this.mPollution = aNBT.getInteger("mPollution");
- this.mRuntime = aNBT.getInteger("mRuntime");
- this.mOutputItems = new ItemStack[this.getAmountOfOutputs()];
- for (int i = 0; i < this.mOutputItems.length; i++) {
- this.mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
- }
- this.mOutputFluids = new FluidStack[this.getAmountOfOutputs()];
- for (int i = 0; i < this.mOutputFluids.length; i++) {
- this.mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
- }
- this.mWrench = aNBT.getBoolean("mWrench");
- this.mScrewdriver = aNBT.getBoolean("mScrewdriver");
- this.mSoftHammer = aNBT.getBoolean("mSoftHammer");
- this.mHardHammer = aNBT.getBoolean("mHardHammer");
- this.mSolderingTool = aNBT.getBoolean("mSolderingTool");
- this.mCrowbar = aNBT.getBoolean("mCrowbar");
- }
-
- @Override
- public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
- return true;
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return 2;
- }
-
- @Override
- public void onMachineBlockUpdate() {
- this.mUpdate = 50;
- }
-
- @Override
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- if (this.mEfficiency < 0) {
- this.mEfficiency = 0;
- }
- if ((--this.mUpdate == 0) || (--this.mStartUpCheck == 0)) {
- this.mInputHatches.clear();
- this.mInputBusses.clear();
- this.mOutputHatches.clear();
- this.mOutputBusses.clear();
- this.mDynamoHatches.clear();
- this.mEnergyHatches.clear();
- this.mMufflerHatches.clear();
- this.mMaintenanceHatches.clear();
- this.mMachine = this.checkMachine(aBaseMetaTileEntity, this.mInventory[1]);
- }
- if (this.mStartUpCheck < 0) {
- if (this.mMachine) {
- for (final GT_MetaTileEntity_Hatch_Maintenance tHatch : this.mMaintenanceHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (!DEBUG_MULTIBLOCK_ShapeSpawner.disableMaintenance) {
- if (tHatch.mWrench) {
- this.mWrench = true;
- }
- if (tHatch.mScrewdriver) {
- this.mScrewdriver = true;
- }
- if (tHatch.mSoftHammer) {
- this.mSoftHammer = true;
- }
- if (tHatch.mHardHammer) {
- this.mHardHammer = true;
- }
- if (tHatch.mSolderingTool) {
- this.mSolderingTool = true;
- }
- if (tHatch.mCrowbar) {
- this.mCrowbar = true;
- }
- } else {
- this.mWrench = true;
- this.mScrewdriver = true;
- this.mSoftHammer = true;
- this.mHardHammer = true;
- this.mSolderingTool = true;
- this.mCrowbar = true;
- }
-
- tHatch.mWrench = false;
- tHatch.mScrewdriver = false;
- tHatch.mSoftHammer = false;
- tHatch.mHardHammer = false;
- tHatch.mSolderingTool = false;
- tHatch.mCrowbar = false;
- }
- }
- if (this.getRepairStatus() > 0) {
- if ((this.mMaxProgresstime > 0) && this.doRandomMaintenanceDamage()) {
- if (this.onRunningTick(this.mInventory[1])) {
- if (!this.polluteEnvironment(this.getPollutionPerTick(this.mInventory[1]))) {
- this.stopMachine();
- }
- if ((this.mMaxProgresstime > 0) && (++this.mProgresstime >= this.mMaxProgresstime)) {
- if (this.mOutputItems != null) {
- for (final ItemStack tStack : this.mOutputItems) {
- if (tStack != null) {
- try {
- GT_Mod.achievements.issueAchivementHatch(
- aBaseMetaTileEntity.getWorld().getPlayerEntityByName(
- aBaseMetaTileEntity.getOwnerName()),
- tStack);
- } catch (final Exception e) {}
- this.addOutput(tStack);
- }
- }
- }
- if ((this.mOutputFluids != null) && (this.mOutputFluids.length == 1)) {
- for (final FluidStack tStack : this.mOutputFluids) {
- if (tStack != null) {
- this.addOutput(tStack);
- }
- }
- } else if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 1)) {
- this.addFluidOutputs(this.mOutputFluids);
- }
- this.mEfficiency = Math.max(
- 0,
- Math.min(
- this.mEfficiency + this.mEfficiencyIncrease,
- this.getMaxEfficiency(this.mInventory[1])
- - ((this.getIdealStatus() - this.getRepairStatus())
- * 1000)));
- this.mOutputItems = null;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- this.mEfficiencyIncrease = 0;
- if (aBaseMetaTileEntity.isAllowedToWork()) {
- this.checkRecipe(this.mInventory[1]);
- }
- if ((this.mOutputFluids != null) && (this.mOutputFluids.length > 0)) {
- if (this.mOutputFluids.length > 1) {
- GT_Mod.achievements.issueAchievement(
- aBaseMetaTileEntity.getWorld()
- .getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()),
- "oilplant");
- }
- }
- }
- }
- } else {
- if (((aTick % 100) == 0) || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
- || aBaseMetaTileEntity.hasInventoryBeenModified()) {
-
- if (aBaseMetaTileEntity.isAllowedToWork()) {
- this.checkRecipe(this.mInventory[1]);
- }
- if (this.mMaxProgresstime <= 0) {
- this.mEfficiency = Math.max(0, this.mEfficiency - 1000);
- }
- }
- }
- } else {
- this.stopMachine();
- }
- } else {
- this.stopMachine();
- }
- }
- aBaseMetaTileEntity.setErrorDisplayID(
- (aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (this.mWrench ? 0 : 1)
- | (this.mScrewdriver ? 0 : 2)
- | (this.mSoftHammer ? 0 : 4)
- | (this.mHardHammer ? 0 : 8)
- | (this.mSolderingTool ? 0 : 16)
- | (this.mCrowbar ? 0 : 32)
- | (this.mMachine ? 0 : 64));
- aBaseMetaTileEntity.setActive(this.mMaxProgresstime > 0);
- }
- }
-
- public boolean polluteEnvironment(final int aPollutionLevel) {
- this.mPollution += aPollutionLevel;
- for (final GT_MetaTileEntity_Hatch_Muffler tHatch : this.mMufflerHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (this.mPollution >= 10000) {
- if (tHatch.polluteEnvironment()) {
- this.mPollution -= 10000;
- }
- } else {
- break;
- }
- }
- }
- return this.mPollution < 10000;
- }
-
- /**
- * Called every tick the Machine runs
- */
- public boolean onRunningTick(final ItemStack aStack) {
- if (this.mEUt > 0) {
- this.addEnergyOutput(((long) this.mEUt * this.mEfficiency) / 10000);
- return true;
- }
- if (this.mEUt < 0) {
- if (!this.drainEnergyInput(((long) -this.mEUt * 10000) / Math.max(1000, this.mEfficiency))) {
- this.stopMachine();
- return false;
- }
- }
- return true;
- }
-
- /**
- * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example)
- */
- public abstract boolean isCorrectMachinePart(ItemStack aStack);
-
- /**
- * Checks the Recipe
- */
- public abstract boolean checkRecipe(ItemStack aStack);
-
- /**
- * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here.
- */
- public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack);
-
- /**
- * Gets the maximum Efficiency that spare Part can get (0 - 10000)
- */
- public abstract int getMaxEfficiency(ItemStack aStack);
-
- /**
- * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block)
- */
- public abstract int getPollutionPerTick(ItemStack aStack);
-
- /**
- * Gets the damage to the ItemStack, usually 0 or 1.
- */
- public abstract int getDamageToComponent(ItemStack aStack);
-
- /**
- * Gets the Amount of possibly outputted Items for loading the Output Stack Array from NBT. This should be the
- * largest Amount that can ever happen legitimately.
- */
- public abstract int getAmountOfOutputs();
-
- /**
- * If it explodes when the Component has to be replaced.
- */
- public abstract boolean explodesOnComponentBreak(ItemStack aStack);
-
- public void stopMachine() {
- this.mOutputItems = null;
- this.mEUt = 0;
- this.mEfficiency = 0;
- this.mProgresstime = 0;
- this.mMaxProgresstime = 0;
- this.mEfficiencyIncrease = 0;
- this.getBaseMetaTileEntity().disableWorking();
- }
-
- public int getRepairStatus() {
- return (this.mWrench ? 1 : 0) + (this.mScrewdriver ? 1 : 0)
- + (this.mSoftHammer ? 1 : 0)
- + (this.mHardHammer ? 1 : 0)
- + (this.mSolderingTool ? 1 : 0)
- + (this.mCrowbar ? 1 : 0);
- }
-
- public int getIdealStatus() {
- return 6;
- }
-
- public boolean doRandomMaintenanceDamage() {
- if (!this.isCorrectMachinePart(this.mInventory[1]) || (this.getRepairStatus() == 0)) {
- this.stopMachine();
- return false;
- }
- if (this.mRuntime++ > 1000) {
- this.mRuntime = 0;
- if (this.getBaseMetaTileEntity().getRandomNumber(6000) == 0) {
- switch (this.getBaseMetaTileEntity().getRandomNumber(6)) {
- case 0:
- this.mWrench = false;
- break;
- case 1:
- this.mScrewdriver = false;
- break;
- case 2:
- this.mSoftHammer = false;
- break;
- case 3:
- this.mHardHammer = false;
- break;
- case 4:
- this.mSolderingTool = false;
- break;
- case 5:
- this.mCrowbar = false;
- break;
- }
- }
- if ((this.mInventory[1] != null) && (this.getBaseMetaTileEntity().getRandomNumber(2) == 0)
- && !this.mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) {
- if (this.mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
- final NBTTagCompound tNBT = this.mInventory[1].getTagCompound();
- if (tNBT != null) {
- NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");
- if (!tNBT.getBoolean("mDis")) {
- tNBT2 = new NBTTagCompound();
- final Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(this.mInventory[1]);
- final ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1);
- final int i = this.mInventory[1].getItemDamage();
- if (i == 170) {
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 172) {
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 174) {
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 176) {
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }
- tNBT.setTag("GT.CraftingComponents", tNBT2);
- tNBT.setBoolean("mDis", true);
- this.mInventory[1].setTagCompound(tNBT);
- }
- }
-
- ((GT_MetaGenerated_Tool) this.mInventory[1].getItem())
- .doDamage(this.mInventory[1], (long) Math.min(this.mEUt / 5, Math.pow(this.mEUt, 0.7)));
- if (this.mInventory[1].stackSize == 0) {
- this.mInventory[1] = null;
- }
- }
- }
- }
- return true;
- }
-
- public void explodeMultiblock() {
- this.mInventory[1] = null;
- for (final MetaTileEntity tTileEntity : this.mInputBusses) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mOutputBusses) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mInputHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mOutputHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mDynamoHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mMufflerHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mEnergyHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- for (final MetaTileEntity tTileEntity : this.mMaintenanceHatches) {
- tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- }
- this.getBaseMetaTileEntity().doExplosion(V[8]);
- }
-
- public boolean addEnergyOutput(final long aEU) {
- if (aEU <= 0) {
- return true;
- }
- for (final GT_MetaTileEntity_Hatch_Dynamo tHatch : this.mDynamoHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public long getMaxInputVoltage() {
- long rVoltage = 0;
- for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage();
- }
- }
- return rVoltage;
- }
-
- public boolean drainEnergyInput(final long aEU) {
- if (aEU <= 0) {
- return true;
- }
- for (final GT_MetaTileEntity_Hatch_Energy tHatch : this.mEnergyHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public boolean addOutput(final FluidStack aLiquid) {
- if (aLiquid == null) {
- return false;
- }
- final FluidStack tLiquid = aLiquid.copy();
- for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) {
- if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid) ? tHatch.outputsSteam()
- : tHatch.outputsLiquids()) {
- final int tAmount = tHatch.fill(tLiquid, false);
- if (tAmount >= tLiquid.amount) {
- return tHatch.fill(tLiquid, true) >= tLiquid.amount;
- } else if (tAmount > 0) {
- tLiquid.amount = tLiquid.amount - tHatch.fill(tLiquid, true);
- }
- }
- }
- return false;
- }
-
- private void addFluidOutputs(final FluidStack[] mOutputFluids2) {
- for (int i = 0; i < mOutputFluids2.length; i++) {
- if ((this.mOutputHatches.size() > i) && (this.mOutputHatches.get(i) != null)
- && (mOutputFluids2[i] != null)
- && isValidMetaTileEntity(this.mOutputHatches.get(i))) {
- this.mOutputHatches.get(i).fill(mOutputFluids2[i], true);
- }
- }
- }
-
- public boolean depleteInput(final FluidStack aLiquid) {
- if (aLiquid == null) {
- return false;
- }
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- FluidStack tLiquid = tHatch.getFluid();
- if ((tLiquid != null) && tLiquid.isFluidEqual(aLiquid)) {
- tLiquid = tHatch.drain(aLiquid.amount, false);
- if ((tLiquid != null) && (tLiquid.amount >= aLiquid.amount)) {
- tLiquid = tHatch.drain(aLiquid.amount, true);
- return (tLiquid != null) && (tLiquid.amount >= aLiquid.amount);
- }
- }
- }
- }
- return false;
- }
-
- public boolean addOutput(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return false;
- }
- aStack = GT_Utility.copy(aStack);
- // FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
- // if (aLiquid == null) {
- for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, aStack)) {
- return true;
- }
- }
- }
- }
- for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) {
- if (isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, aStack)) {
- return true;
- }
- }
- }
- // }else {
- // for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- // if (isValidMetaTileEntity(tHatch) &&
- // GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) {
- // int tAmount = tHatch.fill(aLiquid, false);
- // if (tAmount >= aLiquid.amount) {
- // return tHatch.fill(aLiquid, true) >= aLiquid.amount;
- // }
- // }
- // }
- // }
- return false;
- }
-
- public boolean depleteInput(final ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) {
- return false;
- }
- final FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
- if (aLiquid != null) {
- return this.depleteInput(aLiquid);
- }
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public ArrayList<ItemStack> getStoredOutputs() {
- final ArrayList<ItemStack> rList = new ArrayList<>();
- for (final GT_MetaTileEntity_Hatch_Output tHatch : this.mOutputHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1));
- }
- }
- for (final GT_MetaTileEntity_Hatch_OutputBus tHatch : this.mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public ArrayList<FluidStack> getStoredFluids() {
- final ArrayList<FluidStack> rList = new ArrayList<>();
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && (tHatch.getFillableStack() != null)) {
- rList.add(tHatch.getFillableStack());
- }
- }
- return rList;
- }
-
- public ArrayList<ItemStack> getStoredInputs() {
- final ArrayList<ItemStack> rList = new ArrayList<>();
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && (tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null)) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0));
- }
- }
- for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- tHatch.mRecipeMap = this.getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- }
- return rList;
- }
-
- public GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- public void updateSlots() {
- for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- tHatch.updateSlots();
- }
- }
- for (final GT_MetaTileEntity_Hatch_InputBus tHatch : this.mInputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- tHatch.updateSlots();
- }
- }
- }
-
- public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addMaintenanceToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addEnergyInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addMufflerToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addOutputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).mMachineBlock = (byte) aBaseCasingIndex;
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- }
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- return new String[] { "Progress:", (this.mProgresstime / 20) + "secs", (this.mMaxProgresstime / 20) + "secs",
- "Efficiency:", (this.mEfficiency / 100.0F) + "%", "Problems:",
- "" + (this.getIdealStatus() - this.getRepairStatus()) };
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean useModularUI() {
- return true;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java
deleted file mode 100644
index 16b6979dcb..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_ScreenOverlay.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.Gui;
-import net.minecraft.client.gui.ScaledResolution;
-import net.minecraft.item.Item;
-import net.minecraftforge.client.event.RenderGameOverlayEvent;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-
-public class DEBUG_ScreenOverlay extends Gui {
-
- int width, height;
- Minecraft mc = Minecraft.getMinecraft();
-
- @SubscribeEvent
- public void eventHandler(final RenderGameOverlayEvent.Text event) {
-
- // if (mc.thePlayer.getHeldItem().equals(ModItems.itemStaballoyPickaxe)){
- final ScaledResolution res = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight);
- final FontRenderer fontRender = this.mc.fontRenderer;
- this.width = res.getScaledWidth();
- this.height = res.getScaledHeight();
- Minecraft.getMinecraft().entityRenderer.setupOverlayRendering();
- final String str = "Words";
- Item heldItem = null;
-
- try {
- heldItem = this.mc.thePlayer.getHeldItem().getItem();
-
- if (heldItem != null) {
- /*
- * if (heldItem instanceof StaballoyPickaxe){ int dmg =((StaballoyPickaxe)
- * heldItem).getDamage(((StaballoyPickaxe) heldItem).thisPickaxe); ((StaballoyPickaxe)
- * heldItem).checkFacing(((StaballoyPickaxe) heldItem).localWorld); str = "DAMAGE: "+ dmg
- * +" | FACING: "+((StaballoyPickaxe) heldItem).FACING+" | FACING_HORIZONTAL: "+((StaballoyPickaxe)
- * heldItem).FACING_HORIZONTAL+" | LOOKING DIRECTION: "+((StaballoyPickaxe) heldItem).lookingDirection;
- * drawString(fontRender, str, (this.width - fontRender.getStringWidth(str)) / 2, this.height / 10,
- * 0xFFAA00); }
- */
- }
- } catch (final NullPointerException e) {}
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java b/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
deleted file mode 100644
index fa53c290fc..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/DEBUG_TimerThread.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import java.util.concurrent.TimeUnit;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import gtPlusPlus.api.objects.Logger;
-
-public class DEBUG_TimerThread implements Runnable {
-
- private final World world;
- private final EntityPlayer player;
-
- public DEBUG_TimerThread(final World WORLD, final EntityPlayer PLAYER) {
- this.world = WORLD;
- this.player = PLAYER;
- }
-
- @Override
- public void run() {
- int xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX;
- int zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ;
-
- final int stepX = Minecraft.getMinecraft().objectMouseOver.blockX;
- final int stepY = Minecraft.getMinecraft().objectMouseOver.blockY;
- final int stepZ = Minecraft.getMinecraft().objectMouseOver.blockZ;
- Logger.INFO(
- "Clicked on a Block @ " + "[X:"
- + stepX
- + "][Y:"
- + stepY
- + "][Z:"
- + stepZ
- + "]"
- + " with xDir:"
- + xDir
- + " zDir:"
- + zDir);
- this.world.setBlock(stepX, stepY, stepZ, Blocks.bedrock, 0, 3);
- Logger.INFO("Makng it Bedrock for future investment.");
- // for (int i = -1; i <= 1; i++) {
- // stepX = stepX+i;
- for (int i = stepX - 1; i <= (stepX + 1); i++) {
- for (int j = stepZ - 1; j <= (stepZ + 1); j++) {
- for (int h = stepY - 1; h <= (stepY + 1); h++) {
-
- xDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posX).offsetX;
- zDir = ForgeDirection.getOrientation(this.player.getPlayerCoordinates().posZ).offsetZ;
-
- // for (int j = -1; j <= 1; j++) {
- // stepZ = stepZ+j;
- // for (int h = -1; h <= 1; h++) {
- // stepY = stepY+h;
- Logger.INFO(
- "Placing Block @ " + "[X:"
- + i
- + "][Y:"
- + h
- + "][Z:"
- + j
- + "]"
- + " with xDir:"
- + xDir
- + " zDir:"
- + zDir);
- if ((h != 0) || ((((xDir + i) != 0) || ((zDir + j) != 0)) && ((i != 0) || (j != 0)))) {
- this.world.setBlock(i, h, j, Blocks.stone, 0, 3);
- } else {
- Logger.INFO("Not even sure what this is for, but I got here.");
- }
- try {
- TimeUnit.MILLISECONDS.sleep(500);
- } catch (final InterruptedException e1) {
- e1.printStackTrace();
- }
- }
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java b/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java
deleted file mode 100644
index e774824fbf..0000000000
--- a/src/main/java/gtPlusPlus/core/util/debug/UtilityGL11Debug.java
+++ /dev/null
@@ -1,1338 +0,0 @@
-package gtPlusPlus.core.util.debug;
-
-import java.nio.ByteBuffer;
-
-import org.lwjgl.BufferUtils;
-import org.lwjgl.opengl.GL11;
-
-/**
- * User: The Grey Ghost Date: 9/02/14
- */
-public class UtilityGL11Debug {
-
- public class GLproperty {
-
- public GLproperty(final int init_gLconstant, final String init_name, final String init_description,
- final String init_category, final String init_fetchCommand) {
- this.gLconstant = init_gLconstant;
- this.name = init_name;
- this.description = init_description;
- this.category = init_category;
- this.fetchCommand = init_fetchCommand;
- }
-
- public int gLconstant;
- public String name;
- public String description;
- public String category;
- public String fetchCommand;
- }
-
- public static UtilityGL11Debug instance = new UtilityGL11Debug();
-
- public GLproperty[] propertyList = {
- new GLproperty(GL11.GL_CURRENT_COLOR, "GL_CURRENT_COLOR", "Current color", "current", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_INDEX,
- "GL_CURRENT_INDEX",
- "Current color index",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_TEXTURE_COORDS,
- "GL_CURRENT_TEXTURE_COORDS",
- "Current texture coordinates",
- "current",
- "glGetFloatv()"),
- new GLproperty(GL11.GL_CURRENT_NORMAL, "GL_CURRENT_NORMAL", "Current normal", "current", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_POSITION,
- "GL_CURRENT_RASTER_POSITION",
- "Current raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_DISTANCE,
- "GL_CURRENT_RASTER_DISTANCE",
- "Current raster distance",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_COLOR,
- "GL_CURRENT_RASTER_COLOR",
- "Color associated with raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_INDEX,
- "GL_CURRENT_RASTER_INDEX",
- "Color index associated with raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_TEXTURE_COORDS,
- "GL_CURRENT_RASTER_TEXTURE_COORDS",
- "Texture coordinates associated with raster position",
- "current",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_CURRENT_RASTER_POSITION_VALID,
- "GL_CURRENT_RASTER_POSITION_VALID",
- "Raster position valid bit",
- "current",
- "glGetBooleanv()"),
- new GLproperty(GL11.GL_EDGE_FLAG, "GL_EDGE_FLAG", "Edge flag", "current", "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY,
- "GL_VERTEX_ARRAY",
- "Vertex array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_SIZE,
- "GL_VERTEX_ARRAY_SIZE",
- "Coordinates per vertex",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_TYPE,
- "GL_VERTEX_ARRAY_TYPE",
- "Type of vertex coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_STRIDE,
- "GL_VERTEX_ARRAY_STRIDE",
- "Stride between vertices",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_VERTEX_ARRAY_POINTER,
- "GL_VERTEX_ARRAY_POINTER",
- "Pointer to the vertex array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY,
- "GL_NORMAL_ARRAY",
- "Normal array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY_TYPE,
- "GL_NORMAL_ARRAY_TYPE",
- "Type of normal coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY_STRIDE,
- "GL_NORMAL_ARRAY_STRIDE",
- "Stride between normals",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NORMAL_ARRAY_POINTER,
- "GL_NORMAL_ARRAY_POINTER",
- "Pointer to the normal array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY,
- "GL_COLOR_ARRAY",
- "RGBA color array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_SIZE,
- "GL_COLOR_ARRAY_SIZE",
- "Colors per vertex",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_TYPE,
- "GL_COLOR_ARRAY_TYPE",
- "Type of color components",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_STRIDE,
- "GL_COLOR_ARRAY_STRIDE",
- "Stride between colors",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_ARRAY_POINTER,
- "GL_COLOR_ARRAY_POINTER",
- "Pointer to the color array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY,
- "GL_INDEX_ARRAY",
- "Color-index array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY_TYPE,
- "GL_INDEX_ARRAY_TYPE",
- "Type of color indices",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY_STRIDE,
- "GL_INDEX_ARRAY_STRIDE",
- "Stride between color indices",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_ARRAY_POINTER,
- "GL_INDEX_ARRAY_POINTER",
- "Pointer to the index array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY,
- "GL_TEXTURE_COORD_ARRAY",
- "Texture coordinate array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_SIZE,
- "GL_TEXTURE_COORD_ARRAY_SIZE",
- "Texture coordinates per element",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_TYPE,
- "GL_TEXTURE_COORD_ARRAY_TYPE",
- "Type of texture coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_STRIDE,
- "GL_TEXTURE_COORD_ARRAY_STRIDE",
- "Stride between texture coordinates",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_COORD_ARRAY_POINTER,
- "GL_TEXTURE_COORD_ARRAY_POINTER",
- "Pointer to the texture coordinate array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_EDGE_FLAG_ARRAY,
- "GL_EDGE_FLAG_ARRAY",
- "Edge flag array enable",
- "vertex-array",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_EDGE_FLAG_ARRAY_STRIDE,
- "GL_EDGE_FLAG_ARRAY_STRIDE",
- "Stride between edge flags",
- "vertex-array",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_EDGE_FLAG_ARRAY_POINTER,
- "GL_EDGE_FLAG_ARRAY_POINTER",
- "Pointer to the edge flag array",
- "vertex-array",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_MODELVIEW_MATRIX,
- "GL_MODELVIEW_MATRIX",
- "Modelview matrix stack",
- "matrix",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_PROJECTION_MATRIX,
- "GL_PROJECTION_MATRIX",
- "Projection matrix stack",
- "matrix",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_TEXTURE_MATRIX,
- "GL_TEXTURE_MATRIX",
- "Texture matrix stack",
- "matrix",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_VIEWPORT,
- "GL_VIEWPORT",
- "Viewport origin and extent",
- "viewport",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DEPTH_RANGE,
- "GL_DEPTH_RANGE",
- "Depth range near and far",
- "viewport",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MODELVIEW_STACK_DEPTH,
- "GL_MODELVIEW_STACK_DEPTH",
- "Modelview matrix stack pointer",
- "matrix",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PROJECTION_STACK_DEPTH,
- "GL_PROJECTION_STACK_DEPTH",
- "Projection matrix stack pointer",
- "matrix",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_STACK_DEPTH,
- "GL_TEXTURE_STACK_DEPTH",
- "Texture matrix stack pointer",
- "matrix",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MATRIX_MODE,
- "GL_MATRIX_MODE",
- "Current matrix mode",
- "transform",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NORMALIZE,
- "GL_NORMALIZE",
- "Current normal normalization on/off",
- "transform/ enable",
- "glIsEnabled()"),
- new GLproperty(GL11.GL_FOG_COLOR, "GL_FOG_COLOR", "Fog color", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_INDEX, "GL_FOG_INDEX", "Fog index", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_DENSITY, "GL_FOG_DENSITY", "Exponential fog density", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_START, "GL_FOG_START", "Linear fog start", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_END, "GL_FOG_END", "Linear fog end", "fog", "glGetFloatv()"),
- new GLproperty(GL11.GL_FOG_MODE, "GL_FOG_MODE", "Fog mode", "fog", "glGetIntegerv()"),
- new GLproperty(GL11.GL_FOG, "GL_FOG", "True if fog enabled", "fog/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_SHADE_MODEL,
- "GL_SHADE_MODEL",
- "glShadeModel() setting",
- "lighting",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LIGHTING,
- "GL_LIGHTING",
- "True if lighting is enabled",
- "lighting/e nable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_MATERIAL,
- "GL_COLOR_MATERIAL",
- "True if color tracking is enabled",
- "lighting",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_MATERIAL_PARAMETER,
- "GL_COLOR_MATERIAL_PARAMETER",
- "Material properties tracking current color",
- "lighting",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_MATERIAL_FACE,
- "GL_COLOR_MATERIAL_FACE",
- "Face(s) affected by color tracking",
- "lighting",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(GL11.GL_SPECULAR, "GL_SPECULAR", "Specular material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(GL11.GL_EMISSION, "GL_EMISSION", "Emissive material color", "lighting", "glGetMaterialfv()"),
- new GLproperty(
- GL11.GL_SHININESS,
- "GL_SHININESS",
- "Specular exponent of material",
- "lighting",
- "glGetMaterialfv()"),
- new GLproperty(
- GL11.GL_LIGHT_MODEL_AMBIENT,
- "GL_LIGHT_MODEL_AMBIENT",
- "Ambient scene color",
- "lighting",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LIGHT_MODEL_LOCAL_VIEWER,
- "GL_LIGHT_MODEL_LOCAL_VIEWER",
- "Viewer is local",
- "lighting",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_LIGHT_MODEL_TWO_SIDE,
- "GL_LIGHT_MODEL_TWO_SIDE",
- "Use two-sided lighting",
- "lighting",
- "glGetBooleanv()"),
- new GLproperty(GL11.GL_AMBIENT, "GL_AMBIENT", "Ambient intensity of light i", "lighting", "glGetLightfv()"),
- new GLproperty(GL11.GL_DIFFUSE, "GL_DIFFUSE", "Diffuse intensity of light i", "lighting", "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPECULAR,
- "GL_SPECULAR",
- "Specular intensity of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(GL11.GL_POSITION, "GL_POSITION", "Position of light i", "lighting", "glGetLightfv()"),
- new GLproperty(
- GL11.GL_CONSTANT_ATTENUATION,
- "GL_CONSTANT_ATTENUATION",
- "Constant attenuation factor",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_LINEAR_ATTENUATION,
- "GL_LINEAR_ATTENUATION",
- "Linear attenuation factor",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_QUADRATIC_ATTENUATION,
- "GL_QUADRATIC_ATTENUATION",
- "Quadratic attenuation factor",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPOT_DIRECTION,
- "GL_SPOT_DIRECTION",
- "Spotlight direction of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPOT_EXPONENT,
- "GL_SPOT_EXPONENT",
- "Spotlight exponent of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(
- GL11.GL_SPOT_CUTOFF,
- "GL_SPOT_CUTOFF",
- "Spotlight angle of light i",
- "lighting",
- "glGetLightfv()"),
- new GLproperty(GL11.GL_LIGHT0, "GL_LIGHT0", "True if light 0 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT1, "GL_LIGHT1", "True if light 1 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT2, "GL_LIGHT2", "True if light 2 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT3, "GL_LIGHT3", "True if light 3 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT4, "GL_LIGHT4", "True if light 4 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT5, "GL_LIGHT5", "True if light 5 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT6, "GL_LIGHT6", "True if light 6 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(GL11.GL_LIGHT7, "GL_LIGHT7", "True if light 7 enabled", "lighting/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_INDEXES,
- "GL_COLOR_INDEXES",
- "ca, cd, and cs for color-index lighting",
- "lighting/e nable",
- "glGetMaterialfv()"),
- new GLproperty(GL11.GL_POINT_SIZE, "GL_POINT_SIZE", "Point size", "point", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_POINT_SMOOTH,
- "GL_POINT_SMOOTH",
- "Point antialiasing on",
- "point/enable",
- "glIsEnabled()"),
- new GLproperty(GL11.GL_LINE_WIDTH, "GL_LINE_WIDTH", "Line width", "line", "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LINE_SMOOTH,
- "GL_LINE_SMOOTH",
- "Line antialiasing on",
- "line/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_LINE_STIPPLE_PATTERN,
- "GL_LINE_STIPPLE_PATTERN",
- "Line stipple",
- "line",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LINE_STIPPLE_REPEAT,
- "GL_LINE_STIPPLE_REPEAT",
- "Line stipple repeat",
- "line",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LINE_STIPPLE,
- "GL_LINE_STIPPLE",
- "Line stipple enable",
- "line/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_CULL_FACE,
- "GL_CULL_FACE",
- "Polygon culling enabled",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_CULL_FACE_MODE,
- "GL_CULL_FACE_MODE",
- "Cull front-/back-facing polygons",
- "polygon",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_FRONT_FACE,
- "GL_FRONT_FACE",
- "Polygon front-face CW/CCW indicator",
- "polygon",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POLYGON_SMOOTH,
- "GL_POLYGON_SMOOTH",
- "Polygon antialiasing on",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_MODE,
- "GL_POLYGON_MODE",
- "Polygon rasterization mode (front and back)",
- "polygon",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_FACTOR,
- "GL_POLYGON_OFFSET_FACTOR",
- "Polygon offset factor",
- "polygon",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_POINT,
- "GL_POLYGON_OFFSET_POINT",
- "Polygon offset enable for GL_POINT mode rasterization",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_LINE,
- "GL_POLYGON_OFFSET_LINE",
- "Polygon offset enable for GL_LINE mode rasterization",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_OFFSET_FILL,
- "GL_POLYGON_OFFSET_FILL",
- "Polygon offset enable for GL_FILL mode rasterization",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_POLYGON_STIPPLE,
- "GL_POLYGON_STIPPLE",
- "Polygon stipple enable",
- "polygon/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_1D,
- "GL_TEXTURE_1D",
- "True if 1-D texturing enabled ",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_2D,
- "GL_TEXTURE_2D",
- "True if 2-D texturing enabled ",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_BINDING_1D,
- "GL_TEXTURE_BINDING_1D",
- "Texture object bound to GL_TEXTURE_1D",
- "texture",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE_BINDING_2D,
- "GL_TEXTURE_BINDING_2D",
- "Texture object bound to GL_TEXTURE_2D",
- "texture",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_TEXTURE,
- "GL_TEXTURE",
- "x-D texture image at level of detail i",
- "UNUSED",
- "glGetTexImage()"),
- new GLproperty(
- GL11.GL_TEXTURE_WIDTH,
- "GL_TEXTURE_WIDTH",
- "x-D texture image i's width",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_HEIGHT,
- "GL_TEXTURE_HEIGHT",
- "x-D texture image i's height",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_BORDER,
- "GL_TEXTURE_BORDER",
- "x-D texture image i's border width",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_RED_SIZE,
- "GL_TEXTURE_RED_SIZE",
- "x-D texture image i's red resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_GREEN_SIZE,
- "GL_TEXTURE_GREEN_SIZE",
- "x-D texture image i's green resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_BLUE_SIZE,
- "GL_TEXTURE_BLUE_SIZE",
- "x-D texture image i's blue resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_ALPHA_SIZE,
- "GL_TEXTURE_ALPHA_SIZE",
- "x-D texture image i's alpha resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_LUMINANCE_SIZE,
- "GL_TEXTURE_LUMINANCE_SIZE",
- "x-D texture image i's luminance resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_INTENSITY_SIZE,
- "GL_TEXTURE_INTENSITY_SIZE",
- "x-D texture image i's intensity resolution",
- "UNUSED",
- "glGetTexLevelParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_BORDER_COLOR,
- "GL_TEXTURE_BORDER_COLOR",
- "Texture border color",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_MIN_FILTER,
- "GL_TEXTURE_MIN_FILTER",
- "Texture minification function",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_MAG_FILTER,
- "GL_TEXTURE_MAG_FILTER",
- "Texture magnification function",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_WRAP_S,
- "GL_TEXTURE_WRAP_S",
- "Texture wrap mode (x is S or T)",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_WRAP_T,
- "GL_TEXTURE_WRAP_T",
- "Texture wrap mode (x is S or T)",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_PRIORITY,
- "GL_TEXTURE_PRIORITY",
- "Texture object priority",
- "texture",
- "glGetTexParameter*()"),
- new GLproperty(
- GL11.GL_TEXTURE_ENV_MODE,
- "GL_TEXTURE_ENV_MODE",
- "Texture application function",
- "texture",
- "glGetTexEnviv()"),
- new GLproperty(
- GL11.GL_TEXTURE_ENV_COLOR,
- "GL_TEXTURE_ENV_COLOR",
- "Texture environment color",
- "texture",
- "glGetTexEnvfv()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_S,
- "GL_TEXTURE_GEN_S",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_T,
- "GL_TEXTURE_GEN_T",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_R,
- "GL_TEXTURE_GEN_R",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_Q,
- "GL_TEXTURE_GEN_Q",
- "Texgen enabled (x is S, T, R, or Q)",
- "texture/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_EYE_PLANE,
- "GL_EYE_PLANE",
- "Texgen plane equation coefficients",
- "texture",
- "glGetTexGenfv()"),
- new GLproperty(
- GL11.GL_OBJECT_PLANE,
- "GL_OBJECT_PLANE",
- "Texgen object linear coefficients",
- "texture",
- "glGetTexGenfv()"),
- new GLproperty(
- GL11.GL_TEXTURE_GEN_MODE,
- "GL_TEXTURE_GEN_MODE",
- "Function used for texgen",
- "texture",
- "glGetTexGeniv()"),
- new GLproperty(
- GL11.GL_SCISSOR_TEST,
- "GL_SCISSOR_TEST",
- "Scissoring enabled",
- "scissor/enable",
- "glIsEnabled()"),
- new GLproperty(GL11.GL_SCISSOR_BOX, "GL_SCISSOR_BOX", "Scissor box", "scissor", "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ALPHA_TEST,
- "GL_ALPHA_TEST",
- "Alpha test enabled",
- "color-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_ALPHA_TEST_FUNC,
- "GL_ALPHA_TEST_FUNC",
- "Alpha test function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ALPHA_TEST_REF,
- "GL_ALPHA_TEST_REF",
- "Alpha test reference value",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_TEST,
- "GL_STENCIL_TEST",
- "Stenciling enabled",
- "stencil-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_STENCIL_FUNC,
- "GL_STENCIL_FUNC",
- "Stencil function",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_VALUE_MASK,
- "GL_STENCIL_VALUE_MASK",
- "Stencil mask",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_REF,
- "GL_STENCIL_REF",
- "Stencil reference value",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_FAIL,
- "GL_STENCIL_FAIL",
- "Stencil fail action",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_PASS_DEPTH_FAIL,
- "GL_STENCIL_PASS_DEPTH_FAIL",
- "Stencil depth buffer fail action",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_PASS_DEPTH_PASS,
- "GL_STENCIL_PASS_DEPTH_PASS",
- "Stencil depth buffer pass action",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DEPTH_TEST,
- "GL_DEPTH_TEST",
- "Depth buffer enabled",
- "depth-buffer/ena ble",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_DEPTH_FUNC,
- "GL_DEPTH_FUNC",
- "Depth buffer test function",
- "depth-buffer",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_BLEND, "GL_BLEND", "Blending enabled", "color-buffer/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_BLEND_SRC,
- "GL_BLEND_SRC",
- "Blending source function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_BLEND_DST,
- "GL_BLEND_DST",
- "Blending destination function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_DITHER, "GL_DITHER", "Dithering enabled", "color-buffer/enable", "glIsEnabled()"),
- new GLproperty(
- GL11.GL_INDEX_LOGIC_OP,
- "GL_INDEX_LOGIC_OP",
- "Color index logical operation enabled",
- "color-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_COLOR_LOGIC_OP,
- "GL_COLOR_LOGIC_OP",
- "RGBA color logical operation enabled",
- "color-buffer/enable",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_LOGIC_OP_MODE,
- "GL_LOGIC_OP_MODE",
- "Logical operation function",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DRAW_BUFFER,
- "GL_DRAW_BUFFER",
- "Buffers selected for drawing",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_WRITEMASK,
- "GL_INDEX_WRITEMASK",
- "Color-index writemask",
- "color-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_WRITEMASK,
- "GL_COLOR_WRITEMASK",
- "Color write enables; R, G, B, or A",
- "color-buffer",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_DEPTH_WRITEMASK,
- "GL_DEPTH_WRITEMASK",
- "Depth buffer enabled for writing",
- "depth-buffer",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_STENCIL_WRITEMASK,
- "GL_STENCIL_WRITEMASK",
- "Stencil-buffer writemask",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_COLOR_CLEAR_VALUE,
- "GL_COLOR_CLEAR_VALUE",
- "Color-buffer clear value (RGBA mode)",
- "color-buffer",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_INDEX_CLEAR_VALUE,
- "GL_INDEX_CLEAR_VALUE",
- "Color-buffer clear value (color-index mode)",
- "color-buffer",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_DEPTH_CLEAR_VALUE,
- "GL_DEPTH_CLEAR_VALUE",
- "Depth-buffer clear value",
- "depth-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_CLEAR_VALUE,
- "GL_STENCIL_CLEAR_VALUE",
- "Stencil-buffer clear value",
- "stencil-buffer",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_CLEAR_VALUE,
- "GL_ACCUM_CLEAR_VALUE",
- "Accumulation-buffer clear value",
- "accum-buffer",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_UNPACK_SWAP_BYTES,
- "GL_UNPACK_SWAP_BYTES",
- "Value of GL_UNPACK_SWAP_BYTES",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_UNPACK_LSB_FIRST,
- "GL_UNPACK_LSB_FIRST",
- "Value of GL_UNPACK_LSB_FIRST",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_UNPACK_ROW_LENGTH,
- "GL_UNPACK_ROW_LENGTH",
- "Value of GL_UNPACK_ROW_LENGTH",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_UNPACK_SKIP_ROWS,
- "GL_UNPACK_SKIP_ROWS",
- "Value of GL_UNPACK_SKIP_ROWS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_UNPACK_SKIP_PIXELS,
- "GL_UNPACK_SKIP_PIXELS",
- "Value of GL_UNPACK_SKIP_PIXELS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_UNPACK_ALIGNMENT,
- "GL_UNPACK_ALIGNMENT",
- "Value of GL_UNPACK_ALIGNMENT",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_SWAP_BYTES,
- "GL_PACK_SWAP_BYTES",
- "Value of GL_PACK_SWAP_BYTES",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_PACK_LSB_FIRST,
- "GL_PACK_LSB_FIRST",
- "Value of GL_PACK_LSB_FIRST",
- "pixel-store",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_PACK_ROW_LENGTH,
- "GL_PACK_ROW_LENGTH",
- "Value of GL_PACK_ROW_LENGTH",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_SKIP_ROWS,
- "GL_PACK_SKIP_ROWS",
- "Value of GL_PACK_SKIP_ROWS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_SKIP_PIXELS,
- "GL_PACK_SKIP_PIXELS",
- "Value of GL_PACK_SKIP_PIXELS",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_PACK_ALIGNMENT,
- "GL_PACK_ALIGNMENT",
- "Value of GL_PACK_ALIGNMENT",
- "pixel-store",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_MAP_COLOR, "GL_MAP_COLOR", "True if colors are mapped", "pixel", "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_MAP_STENCIL,
- "GL_MAP_STENCIL",
- "True if stencil values are mapped",
- "pixel",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_INDEX_SHIFT,
- "GL_INDEX_SHIFT",
- "Value of GL_INDEX_SHIFT",
- "pixel",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_OFFSET,
- "GL_INDEX_OFFSET",
- "Value of GL_INDEX_OFFSET",
- "pixel",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_ZOOM_X, "GL_ZOOM_X", "x zoom factor", "pixel", "glGetFloatv()"),
- new GLproperty(GL11.GL_ZOOM_Y, "GL_ZOOM_Y", "y zoom factor", "pixel", "glGetFloatv()"),
- new GLproperty(GL11.GL_READ_BUFFER, "GL_READ_BUFFER", "Read source buffer", "pixel", "glGetIntegerv()"),
- new GLproperty(GL11.GL_ORDER, "GL_ORDER", "1D map order", "capability", "glGetMapiv()"),
- new GLproperty(GL11.GL_ORDER, "GL_ORDER", "2D map orders", "capability", "glGetMapiv()"),
- new GLproperty(GL11.GL_COEFF, "GL_COEFF", "1D control points", "capability", "glGetMapfv()"),
- new GLproperty(GL11.GL_COEFF, "GL_COEFF", "2D control points", "capability", "glGetMapfv()"),
- new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "1D domain endpoints", "capability", "glGetMapfv()"),
- new GLproperty(GL11.GL_DOMAIN, "GL_DOMAIN", "2D domain endpoints", "capability", "glGetMapfv()"),
- new GLproperty(
- GL11.GL_MAP1_GRID_DOMAIN,
- "GL_MAP1_GRID_DOMAIN",
- "1D grid endpoints",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MAP2_GRID_DOMAIN,
- "GL_MAP2_GRID_DOMAIN",
- "2D grid endpoints",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MAP1_GRID_SEGMENTS,
- "GL_MAP1_GRID_SEGMENTS",
- "1D grid divisions",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_MAP2_GRID_SEGMENTS,
- "GL_MAP2_GRID_SEGMENTS",
- "2D grid divisions",
- "eval",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_AUTO_NORMAL,
- "GL_AUTO_NORMAL",
- "True if automatic normal generation enabled",
- "eval",
- "glIsEnabled()"),
- new GLproperty(
- GL11.GL_PERSPECTIVE_CORRECTION_HINT,
- "GL_PERSPECTIVE_CORRECTION_HINT",
- "Perspective correction hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POINT_SMOOTH_HINT,
- "GL_POINT_SMOOTH_HINT",
- "Point smooth hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LINE_SMOOTH_HINT,
- "GL_LINE_SMOOTH_HINT",
- "Line smooth hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_POLYGON_SMOOTH_HINT,
- "GL_POLYGON_SMOOTH_HINT",
- "Polygon smooth hint",
- "hint",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_FOG_HINT, "GL_FOG_HINT", "Fog hint", "hint", "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_LIGHTS,
- "GL_MAX_LIGHTS",
- "Maximum number of lights",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_CLIP_PLANES,
- "GL_MAX_CLIP_PLANES",
- "Maximum number of user clipping planes",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_MODELVIEW_STACK_DEPTH,
- "GL_MAX_MODELVIEW_STACK_DEPTH",
- "Maximum modelview-matrix stack depth",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_PROJECTION_STACK_DEPTH,
- "GL_MAX_PROJECTION_STACK_DEPTH",
- "Maximum projection-matrix stack depth",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_TEXTURE_STACK_DEPTH,
- "GL_MAX_TEXTURE_STACK_DEPTH",
- "Maximum depth of texture matrix stack",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_SUBPIXEL_BITS,
- "GL_SUBPIXEL_BITS",
- "Number of bits of subpixel precision in x and y",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_TEXTURE_SIZE,
- "GL_MAX_TEXTURE_SIZE",
- "See discussion in Texture Proxy in Chapter 9",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_PIXEL_MAP_TABLE,
- "GL_MAX_PIXEL_MAP_TABLE",
- "Maximum size of a glPixelMap() translation table",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_NAME_STACK_DEPTH,
- "GL_MAX_NAME_STACK_DEPTH",
- "Maximum selection-name stack depth",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_LIST_NESTING,
- "GL_MAX_LIST_NESTING",
- "Maximum display-list call nesting",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_EVAL_ORDER,
- "GL_MAX_EVAL_ORDER",
- "Maximum evaluator polynomial order",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_VIEWPORT_DIMS,
- "GL_MAX_VIEWPORT_DIMS",
- "Maximum viewport dimensions",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_ATTRIB_STACK_DEPTH,
- "GL_MAX_ATTRIB_STACK_DEPTH",
- "Maximum depth of the attribute stack",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_MAX_CLIENT_ATTRIB_STACK_DEPTH,
- "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH",
- "Maximum depth of the client attribute stack",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_AUX_BUFFERS,
- "GL_AUX_BUFFERS",
- "Number of auxiliary buffers",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_RGBA_MODE,
- "GL_RGBA_MODE",
- "True if color buffers store RGBA",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_INDEX_MODE,
- "GL_INDEX_MODE",
- "True if color buffers store indices",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_DOUBLEBUFFER,
- "GL_DOUBLEBUFFER",
- "True if front and back buffers exist",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_STEREO,
- "GL_STEREO",
- "True if left and right buffers exist",
- "capability",
- "glGetBooleanv()"),
- new GLproperty(
- GL11.GL_POINT_SIZE_RANGE,
- "GL_POINT_SIZE_RANGE",
- "Range (low to high) of antialiased point sizes",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_POINT_SIZE_GRANULARITY,
- "GL_POINT_SIZE_GRANULARITY",
- "Antialiased point-size granularity",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LINE_WIDTH_RANGE,
- "GL_LINE_WIDTH_RANGE",
- "Range (low to high) of antialiased line widths",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_LINE_WIDTH_GRANULARITY,
- "GL_LINE_WIDTH_GRANULARITY",
- "Antialiased line-width granularity",
- "capability",
- "glGetFloatv()"),
- new GLproperty(
- GL11.GL_RED_BITS,
- "GL_RED_BITS",
- "Number of bits per red component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_GREEN_BITS,
- "GL_GREEN_BITS",
- "Number of bits per green component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_BLUE_BITS,
- "GL_BLUE_BITS",
- "Number of bits per blue component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ALPHA_BITS,
- "GL_ALPHA_BITS",
- "Number of bits per alpha component in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_INDEX_BITS,
- "GL_INDEX_BITS",
- "Number of bits per index in color buffers",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_DEPTH_BITS,
- "GL_DEPTH_BITS",
- "Number of depth-buffer bitplanes",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_STENCIL_BITS,
- "GL_STENCIL_BITS",
- "Number of stencil bitplanes",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_RED_BITS,
- "GL_ACCUM_RED_BITS",
- "Number of bits per red component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_GREEN_BITS,
- "GL_ACCUM_GREEN_BITS",
- "Number of bits per green component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_BLUE_BITS,
- "GL_ACCUM_BLUE_BITS",
- "Number of bits per blue component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ACCUM_ALPHA_BITS,
- "GL_ACCUM_ALPHA_BITS",
- "Number of bits per alpha component in the accumulation buffer",
- "capability",
- "glGetIntegerv()"),
- new GLproperty(GL11.GL_LIST_BASE, "GL_LIST_BASE", "Setting of glListBase()", "list", "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LIST_INDEX,
- "GL_LIST_INDEX",
- "Number of display list under construction; 0 if none",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_LIST_MODE,
- "GL_LIST_MODE",
- "Mode of display list under construction; undefined if none",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_ATTRIB_STACK_DEPTH,
- "GL_ATTRIB_STACK_DEPTH",
- "Attribute stack pointer",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_CLIENT_ATTRIB_STACK_DEPTH,
- "GL_CLIENT_ATTRIB_STACK_DEPTH",
- "Client attribute stack pointer",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_NAME_STACK_DEPTH,
- "GL_NAME_STACK_DEPTH",
- "Name stack depth",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_RENDER_MODE,
- "GL_RENDER_MODE",
- "glRenderMode() setting",
- "current",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_SELECTION_BUFFER_POINTER,
- "GL_SELECTION_BUFFER_POINTER",
- "Pointer to selection buffer",
- "select",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_SELECTION_BUFFER_SIZE,
- "GL_SELECTION_BUFFER_SIZE",
- "Size of selection buffer",
- "select",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_FEEDBACK_BUFFER_POINTER,
- "GL_FEEDBACK_BUFFER_POINTER",
- "Pointer to feedback buffer",
- "feedback",
- "glGetPointerv()"),
- new GLproperty(
- GL11.GL_FEEDBACK_BUFFER_SIZE,
- "GL_FEEDBACK_BUFFER_SIZE",
- "Size of feedback buffer",
- "feedback",
- "glGetIntegerv()"),
- new GLproperty(
- GL11.GL_FEEDBACK_BUFFER_TYPE,
- "GL_FEEDBACK_BUFFER_TYPE",
- "Type of feedback buffer",
- "feedback",
- "glGetIntegerv()"), };
-
- public static void dumpOpenGLstate() {}
-
- public static void dumpAllIsEnabled() // Call This
- {
- for (int i = 0; i < instance.propertyList.length; ++i) {
-
- if (instance.propertyList[i].fetchCommand == "glIsEnabled()") {
-
- System.out.print(instance.propertyList[i].name + ":");
- System.out.print(GL11.glIsEnabled(instance.propertyList[i].gLconstant));
- System.out.println(" (" + instance.propertyList[i].description + ")");
- }
- }
- }
-
- public static void dumpAllType(final String type) {
-
- for (int i = 0; i < instance.propertyList.length; ++i) {
-
- if (instance.propertyList[i].category.equals(type)) {
-
- System.out.print(instance.propertyList[i].name + ":");
- System.out.println(getPropertyAsString(i));
- System.out.println(" (" + instance.propertyList[i].description + ")");
- }
- }
- }
-
- private static String getPropertyAsString(final int propertyListIndex) {
- final int gLconstant = instance.propertyList[propertyListIndex].gLconstant;
- if (instance.propertyList[propertyListIndex].fetchCommand.equals("glIsEnabled()")) {
- return "" + GL11.glIsEnabled(gLconstant);
- }
-
- if (instance.propertyList[propertyListIndex].fetchCommand == "glGetBooleanv()") {
-
- final ByteBuffer params = BufferUtils.createByteBuffer(16);
-
- GL11.glGetBoolean(gLconstant, params);
- String out = "";
- for (int i = 0; i < params.capacity(); ++i) {
-
- out += (i == 0 ? "" : ", ") + params.get(i);
- }
- return out;
- }
-
- return "";
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java
deleted file mode 100644
index ce14c07489..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/ClientUtils.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package gtPlusPlus.core.util.minecraft;
-
-import cpw.mods.fml.common.FMLCommonHandler;
-import cpw.mods.fml.relauncher.Side;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-
-public class ClientUtils {
-
- static {
- if (FMLCommonHandler.instance().getSide() == Side.SERVER) {
- Logger.ERROR("Something tried to access the ClientUtils class from the Server Side.");
- Logger.ERROR("Soft crashing to prevent data corruption.");
- CORE.crash();
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java b/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
deleted file mode 100644
index 1d86a7482f..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
+++ /dev/null
@@ -1,125 +0,0 @@
-package gtPlusPlus.core.util.minecraft;
-
-import net.minecraft.item.ItemRedstone;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.util.GT_ModHandler;
-import ic2.api.item.IElectricItem;
-import ic2.api.item.IElectricItemManager;
-import ic2.api.item.ISpecialElectricItem;
-
-public class EnergyUtils {
-
- public static class EU {
-
- public static boolean isElectricItem(ItemStack aStack) {
- if (aStack == null || aStack.getItem() == null || aStack.getItem() instanceof ItemRedstone) {
- return false;
- }
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- return true;
- } else if (aStack.getItem() instanceof IElectricItem) {
- return true;
- } else if (aStack.getItem() instanceof IElectricItemManager) {
- return true;
- } else {
- return GT_ModHandler.isElectricItem(aStack);
- }
- }
-
- public static boolean isChargerItem(ItemStack aStack) {
- return GT_ModHandler.isChargerItem(aStack);
- }
-
- public static boolean charge(ItemStack aStack, int aEnergyToInsert, int aTier) {
- return 0 != GT_ModHandler.chargeElectricItem(aStack, aEnergyToInsert, aTier, true, false);
- }
-
- public static boolean discharge(ItemStack aStack, int aEnergyToDrain, int aTier) {
- if (isElectricItem(aStack)) {
- int tTier = ((IElectricItem) aStack.getItem()).getTier(aStack);
- int aDischargeValue = GT_ModHandler
- .dischargeElectricItem(aStack, aEnergyToDrain, tTier, true, false, false);
- // Logger.INFO("Trying to drain "+aDischargeValue);
- return aDischargeValue > 0;
- } else {
- return false;
- }
- }
-
- public static long getMaxStorage(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return (long) bStack.getMaxCharge(aStack);
- }
- if (aStack.getItem() instanceof IElectricItem) {
- IElectricItem bStack = (IElectricItem) aStack.getItem();
- return (long) bStack.getMaxCharge(aStack);
- }
- if (aStack.getItem() instanceof IElectricItemManager) {
- IElectricItemManager bStack = (IElectricItemManager) aStack.getItem();
- return (long) bStack.getCharge(aStack);
- }
- } else {
- return 0;
- }
- return 0;
- }
-
- public static long getCharge(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return (long) bStack.getManager(aStack).getCharge(aStack);
- }
- if (aStack.getItem() instanceof IElectricItemManager) {
- IElectricItemManager bStack = (IElectricItemManager) aStack.getItem();
- return (long) bStack.getCharge(aStack);
- }
- } else {
- return 0;
- }
- return 0;
- }
-
- public static boolean hasCharge(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return bStack.canProvideEnergy(aStack);
- }
- if (aStack.getItem() instanceof IElectricItem) {
- IElectricItem bStack = (IElectricItem) aStack.getItem();
- return bStack.canProvideEnergy(aStack);
- }
- if (aStack.getItem() instanceof IElectricItemManager) {
- IElectricItemManager bStack = (IElectricItemManager) aStack.getItem();
- return bStack.getCharge(aStack) > 0;
- }
- } else {
- return false;
- }
- return false;
- }
-
- public static int getTier(ItemStack aStack) {
- if (isElectricItem(aStack)) {
- if (aStack.getItem() instanceof ISpecialElectricItem) {
- ISpecialElectricItem bStack = (ISpecialElectricItem) aStack.getItem();
- return bStack.getTier(aStack);
- }
- if (aStack.getItem() instanceof IElectricItem) {
- IElectricItem bStack = (IElectricItem) aStack.getItem();
- return bStack.getTier(aStack);
- }
- } else {
- return 0;
- }
- return 0;
- }
- }
-
- public static class RF {
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java
deleted file mode 100644
index ecabeaa294..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/material/MaterialBuilder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package gtPlusPlus.core.util.minecraft.gregtech.material;
-
-public class MaterialBuilder {
- /*
- * public static final int DIESEL = 0, GAS = 1, THERMAL = 2, SEMIFLUID = 3, PLASMA = 4, MAGIC = 5; private int
- * metaItemSubID; private TextureSet iconSet; private float toolSpeed = 1.0f; private int durability = 0; private
- * int toolQuality = 0; private int types = 0; private int r = 255, g = 255, b = 255, a = 0; private String name;
- * private String defaultLocalName; private int fuelType = 0; private int fuelPower = 0; private int meltingPoint =
- * 0; private int blastFurnaceTemp = 0; private boolean blastFurnaceRequired = false; private boolean transparent =
- * false; private int oreValue = 1; private int densityMultiplier = 1; private int densityDivider = 1; private Dyes
- * color = Dyes._NULL; private int extraData = 0; private List<MaterialStack> materialList = new
- * ArrayList<MaterialStack>(); private List<TC_Aspects.TC_AspectStack> aspects = new
- * ArrayList<TC_Aspects.TC_AspectStack>(); private boolean canBeCracked = false; private int liquidTemperature =
- * 300; private int gasTemperature = 300; public MaterialBuilder(int metaItemSubID, TextureSet iconSet, String
- * defaultLocalName) { this.metaItemSubID = metaItemSubID; this.iconSet = iconSet; this.name =
- * defaultLocalName.replace(" ", "").replace("-", ""); this.defaultLocalName = defaultLocalName; } public Materials
- * constructMaterial() { return new Materials( metaItemSubID, iconSet, toolSpeed, durability, toolQuality, types, r,
- * g, b, a, name, defaultLocalName, fuelType, fuelPower, meltingPoint, blastFurnaceTemp, blastFurnaceRequired,
- * transparent, oreValue, densityMultiplier, densityDivider, color, extraData, materialList, aspects); } public
- * MaterialBuilder setName(String name){ this.name = name; return this; } public MaterialBuilder setTypes(int
- * types){ this.types = types; return this; } public MaterialBuilder addDustItems(){ types = types | 1; return this;
- * } public MaterialBuilder addMetalItems(){ types = types | 2; return this; } public MaterialBuilder addGemItems(){
- * types = types | 4; return this; } public MaterialBuilder addOreItems(){ types = types | 8; return this; } public
- * MaterialBuilder addCell(){ types = types | 16; return this; } public MaterialBuilder addPlasma(){ types = types |
- * 32; return this; } public MaterialBuilder addToolHeadItems(){ types = types | 64; return this; } public
- * MaterialBuilder addGearItems(){ types = types | 128; return this; } public MaterialBuilder addFluid(){ return
- * this; } public MaterialBuilder addGas(){ return this; } public MaterialBuilder setRGBA(int r, int g, int b, int
- * a){ this.r = r; this.g = g; this.b = b; this.a = a; return this; } public MaterialBuilder setRGB(int r, int g,
- * int b){ this.r = r; this.g = g; this.b = b; return this; } public MaterialBuilder setTransparent(boolean
- * transparent){ this.transparent = transparent; return this; } public MaterialBuilder setColor(Dyes color){
- * this.color = color; return this; } public MaterialBuilder setToolSpeed(float toolSpeed) { this.toolSpeed =
- * toolSpeed; return this; } public MaterialBuilder setDurability(int durability) { this.durability = durability;
- * return this; } public MaterialBuilder setToolQuality(int toolQuality) { this.toolQuality = toolQuality; return
- * this; } public MaterialBuilder setFuelType(int fuelType) { this.fuelType = fuelType; return this; } public
- * MaterialBuilder setFuelPower(int fuelPower) { this.fuelPower = fuelPower; return this; } public MaterialBuilder
- * setMeltingPoint(int meltingPoint) { this.meltingPoint = meltingPoint; return this; } public MaterialBuilder
- * setBlastFurnaceTemp(int blastFurnaceTemp) { this.blastFurnaceTemp = blastFurnaceTemp; return this; } public
- * MaterialBuilder setBlastFurnaceRequired(boolean blastFurnaceRequired) { this.blastFurnaceRequired =
- * blastFurnaceRequired; return this; } public MaterialBuilder setOreValue(int oreValue) { this.oreValue = oreValue;
- * return this; } public MaterialBuilder setDensityMultiplier(int densityMultiplier) { this.densityMultiplier =
- * densityMultiplier; return this; } public MaterialBuilder setDensityDivider(int densityDivider) {
- * this.densityDivider = densityDivider; return this; } public MaterialBuilder setExtraData(int extraData) {
- * this.extraData = extraData; return this; } public MaterialBuilder addElectrolyzerRecipe(){ extraData = extraData
- * | 1; return this; } public MaterialBuilder addCentrifugeRecipe(){ extraData = extraData | 2; return this; }
- * public MaterialBuilder setMaterialList(List<MaterialStack> materialList) { this.materialList = materialList;
- * return this; } public MaterialBuilder setMaterialList(MaterialStack ... materials) { this.materialList =
- * Arrays.asList(materials); return this; } public MaterialBuilder setAspects(List<TC_Aspects.TC_AspectStack>
- * aspects) { this.aspects = aspects; return this; } public int getLiquidTemperature() { return liquidTemperature; }
- * public MaterialBuilder setLiquidTemperature(int liquidTemperature) { this.liquidTemperature = liquidTemperature;
- * return this; } public int getGasTemperature() { return gasTemperature; } public MaterialBuilder
- * setGasTemperature(int gasTemperature) { this.gasTemperature = gasTemperature; return this; } public boolean
- * canBeCracked() { return canBeCracked; } public MaterialBuilder setCanBeCracked(boolean canBeCracked) {
- * this.canBeCracked = canBeCracked; return this; }
- */
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java b/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
deleted file mode 100644
index 58045150f1..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package gtPlusPlus.core.util.minecraft.gregtech.recipehandlers;
-
-public final class GregtechRecipe {
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java
deleted file mode 100644
index 5a9721204c..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/CustomPacket.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import cpw.mods.fml.common.network.internal.FMLProxyPacket;
-import io.netty.buffer.Unpooled;
-import mods.railcraft.common.util.misc.Game;
-
-public abstract class CustomPacket {
-
- public static final String CHANNEL_NAME = "GTPP";
-
- public enum PacketType {
- TILE_ENTITY,
- }
-
- public FMLProxyPacket getPacket() {
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- DataOutputStream data = new DataOutputStream(bytes);
- try {
- data.writeByte(this.getID());
- this.writeData(data);
- } catch (IOException var4) {
- Game.logThrowable("Error constructing packet: {0}", var4, new Object[] { this.getClass() });
- }
- return new FMLProxyPacket(Unpooled.wrappedBuffer(bytes.toByteArray()), "GTPP");
- }
-
- public abstract void writeData(DataOutputStream var1) throws IOException;
-
- public abstract void readData(DataInputStream var1) throws IOException;
-
- public abstract int getID();
-
- public String toString() {
- return this.getClass().getSimpleName();
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java
deleted file mode 100644
index d9b565591c..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketBuilder.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import net.minecraft.world.WorldServer;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
-public class PacketBuilder {
-
- private static PacketBuilder instance;
-
- public static PacketBuilder instance() {
- if (instance == null) {
- instance = new PacketBuilder();
- }
- return instance;
- }
-
- public void sendTileEntityPacket(IGregTechTileEntity tile) {
- if (tile.getWorld() instanceof WorldServer) {
- WorldServer world = (WorldServer) tile.getWorld();
- PacketTileEntity pkt = new PacketTileEntity(tile);
- PacketDispatcher.sendToWatchers(pkt, world, tile.getXCoord(), tile.getZCoord());
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java
deleted file mode 100644
index 69d94a4f13..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketDispatcher.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.lang.reflect.Method;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.Packet;
-import net.minecraft.server.management.PlayerManager;
-import net.minecraft.world.WorldServer;
-
-import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
-import cpw.mods.fml.relauncher.ReflectionHelper;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.preloader.DevHelper;
-
-@SuppressWarnings("unchecked")
-public class PacketDispatcher {
-
- private static final Class playerInstanceClass;
- private static final Method getOrCreateChunkWatcher;
- private static final Method sendToAllPlayersWatchingChunk;
-
- public static void sendToServer(CustomPacket packet) {
- PacketHandler.INSTANCE.channel.sendToServer(packet.getPacket());
- }
-
- public static void sendToPlayer(CustomPacket packet, EntityPlayerMP player) {
- PacketHandler.INSTANCE.channel.sendTo(packet.getPacket(), player);
- }
-
- public static void sendToAll(CustomPacket packet) {
- PacketHandler.INSTANCE.channel.sendToAll(packet.getPacket());
- }
-
- public static void sendToAllAround(CustomPacket packet, TargetPoint zone) {
- PacketHandler.INSTANCE.channel.sendToAllAround(packet.getPacket(), zone);
- }
-
- public static void sendToDimension(CustomPacket packet, int dimensionId) {
- PacketHandler.INSTANCE.channel.sendToDimension(packet.getPacket(), dimensionId);
- }
-
- public static void sendToWatchers(CustomPacket packet, WorldServer world, int worldX, int worldZ) {
- try {
- Object playerInstance = getOrCreateChunkWatcher
- .invoke(world.getPlayerManager(), worldX >> 4, worldZ >> 4, false);
- if (playerInstance != null) {
- sendToAllPlayersWatchingChunk.invoke(playerInstance, packet.getPacket());
- }
-
- } catch (Exception var5) {
- Logger.ERROR(
- "Reflection Failure in PacketDispatcher.sendToWatchers() {0} {1}" + 20
- + var5
- + new Object[] {
- getOrCreateChunkWatcher.getName() + sendToAllPlayersWatchingChunk.getName() });
- throw new RuntimeException(var5);
- }
- }
-
- static {
- try {
- playerInstanceClass = PlayerManager.class.getDeclaredClasses()[0];
-
- Method a, b;
-
- try {
- a = DevHelper.getForgeMethod(
- PlayerManager.class,
- "getOrCreateChunkWatcher",
- int.class,
- int.class,
- boolean.class);
- } catch (Throwable t) {
- a = ReflectionHelper.findMethod(
- playerInstanceClass,
- (Object) null,
- new String[] { "func_72690_a", "getOrCreateChunkWatcher" },
- new Class[] { Integer.TYPE, Integer.TYPE, Boolean.TYPE });
- }
- try {
- b = DevHelper.getForgeMethod(PlayerManager.class, "sendToAllPlayersWatchingChunk", Packet.class);
- } catch (Throwable t) {
- b = ReflectionHelper.findMethod(
- playerInstanceClass,
- (Object) null,
- new String[] { "func_151251_a", "sendToAllPlayersWatchingChunk" },
- new Class[] { Packet.class });
- }
-
- getOrCreateChunkWatcher = a;
- sendToAllPlayersWatchingChunk = b;
- getOrCreateChunkWatcher.setAccessible(true);
- sendToAllPlayersWatchingChunk.setAccessible(true);
- } catch (Exception var1) {
- Logger.ERROR("Reflection Failure in PacketDispatcher initalization {0} {1}" + var1);
- throw new RuntimeException(var1);
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java
deleted file mode 100644
index 535c192bbe..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketHandler.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.Arrays;
-
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.network.NetHandlerPlayServer;
-
-import cpw.mods.fml.common.eventhandler.SubscribeEvent;
-import cpw.mods.fml.common.network.FMLEventChannel;
-import cpw.mods.fml.common.network.FMLNetworkEvent.ClientCustomPacketEvent;
-import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
-import cpw.mods.fml.common.network.NetworkRegistry;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.network.CustomPacket.PacketType;
-
-public class PacketHandler {
-
- public static final PacketHandler INSTANCE = new PacketHandler();
- private static final PacketType[] packetTypes = PacketType.values();
- final FMLEventChannel channel;
-
- private PacketHandler() {
- this.channel = NetworkRegistry.INSTANCE.newEventDrivenChannel("GTPP");
- this.channel.register(this);
- }
-
- public static void init() {}
-
- @SubscribeEvent
- public void onPacket(ServerCustomPacketEvent event) {
- byte[] data = new byte[event.packet.payload().readableBytes()];
- event.packet.payload().readBytes(data);
- this.onPacketData(data, ((NetHandlerPlayServer) event.handler).playerEntity);
- }
-
- @SubscribeEvent
- public void onPacket(ClientCustomPacketEvent event) {
- byte[] data = new byte[event.packet.payload().readableBytes()];
- event.packet.payload().readBytes(data);
- this.onPacketData(data, (EntityPlayerMP) null);
- }
-
- public void onPacketData(byte[] bData, EntityPlayerMP player) {
- DataInputStream data = new DataInputStream(new ByteArrayInputStream(bData));
-
- try {
- byte packetID = data.readByte();
- if (packetID < 0) {
- return;
- }
- PacketType type = packetTypes[packetID];
- Object pkt;
-
- switch (type.ordinal()) {
- case 0:
- pkt = new PacketTileEntity();
- break;
- default:
- return;
- }
-
- if (pkt != null) {
- ((CustomPacket) pkt).readData(data);
- }
- } catch (IOException var7) {
- Logger.ERROR(
- "Exception in PacketHandler.onPacketData: {0}" + var7 + new Object[] { Arrays.toString(bData) });
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java b/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java
deleted file mode 100644
index 91dba8798d..0000000000
--- a/src/main/java/gtPlusPlus/core/util/minecraft/network/PacketTileEntity.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package gtPlusPlus.core.util.minecraft.network;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.World;
-
-import cpw.mods.fml.client.FMLClientHandler;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gtPlusPlus.api.interfaces.IGregtechPacketEntity;
-import mods.railcraft.common.util.misc.Game;
-
-public class PacketTileEntity extends CustomPacket {
-
- private IGregTechTileEntity tile;
- private IGregtechPacketEntity ptile;
-
- public PacketTileEntity() {}
-
- public PacketTileEntity(IGregTechTileEntity tile) {
- this.tile = tile;
- if (tile instanceof IGregtechPacketEntity) {
- ptile = (IGregtechPacketEntity) tile;
- }
- }
-
- @Override
- public void writeData(DataOutputStream data) throws IOException {
- if (ptile != null) {
- data.writeInt(this.tile.getXCoord());
- data.writeInt(this.tile.getYCoord());
- data.writeInt(this.tile.getZCoord());
- data.writeShort(this.tile.getMetaTileID());
- this.ptile.writePacketData(data);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void readData(DataInputStream data) throws IOException {
- Minecraft mc = FMLClientHandler.instance().getClient();
- World world = mc != null ? mc.theWorld : null;
- if (world != null) {
- int x = data.readInt();
- int y = data.readInt();
- int z = data.readInt();
- short id = data.readShort();
- if (id >= 0 && y >= 0 && world.blockExists(x, y, z)) {
- TileEntity te = world.getTileEntity(x, y, z);
- if (te instanceof IGregTechTileEntity) {
- this.tile = (IGregTechTileEntity) te;
- if (this.tile.getMetaTileID() != id) {
- this.tile = null;
- }
- } else {
- this.tile = null;
- }
- if (this.tile != null) {
- if (tile instanceof IGregtechPacketEntity) {
- ptile = (IGregtechPacketEntity) tile;
- try {
- this.ptile.readPacketData(data);
- } catch (IOException var10) {
- throw var10;
- } catch (RuntimeException var11) {
- Game.logThrowable("Exception in PacketTileEntity.readData:", var11, new Object[0]);
- }
- }
- }
- }
- }
- }
-
- @Override
- public int getID() {
- return 0;
- }
-}
diff --git a/src/main/java/gtPlusPlus/core/util/sys/Log.java b/src/main/java/gtPlusPlus/core/util/sys/Log.java
deleted file mode 100644
index d9ffd5fa42..0000000000
--- a/src/main/java/gtPlusPlus/core/util/sys/Log.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package gtPlusPlus.core.util.sys;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-public final class Log {
-
- public static final Logger LOGGER = LogManager.getLogger("MiscUtils");
-
- public static void warn(final String msg) {
- LOGGER.warn(msg);
- }
-
- public static void error(final String msg) {
- LOGGER.error(msg);
- }
-
- public static void info(final String msg) {
- LOGGER.info(msg);
- }
-
- public static void debug(final String msg) {
- LOGGER.debug(msg);
- }
-}