aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/block/ModBlocks.java10
-rw-r--r--src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java110
-rw-r--r--src/Java/gtPlusPlus/core/block/general/LightGlass.java31
-rw-r--r--src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java215
-rw-r--r--src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java150
-rw-r--r--src/Java/gtPlusPlus/core/common/CommonProxy.java31
-rw-r--r--src/Java/gtPlusPlus/core/container/Container_SuperJukebox.java190
-rw-r--r--src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java2
-rw-r--r--src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java228
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java44
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java1
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java1
-rw-r--r--src/Java/gtPlusPlus/core/lib/LoadedMods.java7
-rw-r--r--src/Java/gtPlusPlus/core/proxy/ClientProxy.java6
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java88
-rw-r--r--src/Java/gtPlusPlus/core/recipe/common/CI.java367
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java6
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java31
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java75
19 files changed, 1377 insertions, 216 deletions
diff --git a/src/Java/gtPlusPlus/core/block/ModBlocks.java b/src/Java/gtPlusPlus/core/block/ModBlocks.java
index eb40fd080e..dc1239f4be 100644
--- a/src/Java/gtPlusPlus/core/block/ModBlocks.java
+++ b/src/Java/gtPlusPlus/core/block/ModBlocks.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.block;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
+import net.minecraft.block.BlockJukebox;
import net.minecraft.block.material.Material;
import gtPlusPlus.api.objects.Logger;
@@ -73,8 +74,10 @@ public final class ModBlocks {
public static Block blockPlayerDoorCustom_Glass;
public static Block blockPlayerDoorCustom_Ice;
public static Block blockPlayerDoorCustom_Cactus;
-
+
public static Block blockCustomMobSpawner;
+ public static Block blockCustomSuperLight;
+ public static Block blockCustomJukebox;
public static void init() {
Logger.INFO("Initializing Blocks.");
@@ -86,7 +89,7 @@ public final class ModBlocks {
public static void registerBlocks(){
Logger.INFO("Registering Blocks.");
- GameRegistry.registerBlock(MatterFabricatorEffectBlock = new LightGlass(Material.glass, false).setHardness(0.1F).setBlockTextureName(CORE.MODID + ":" + "blockMFEffect").setStepSound(Block.soundTypeGlass), "blockMFEffect");
+ MatterFabricatorEffectBlock = new LightGlass(false);
//Fluids
FluidRegistryHandler.registerFluids();
@@ -121,6 +124,9 @@ public final class ModBlocks {
blockPlayerDoorCustom_Glass = new PlayerDoors(Material.glass, "door_glass", false);
blockPlayerDoorCustom_Ice = new PlayerDoors(Material.ice, "door_ice", false);
blockPlayerDoorCustom_Cactus = new PlayerDoors(Material.cactus, "door_cactus", false, 0.6f, Block.soundTypeGrass, "Cactus");
+
+ blockCustomSuperLight = new BlockSuperLight();
+ blockCustomJukebox = new Machine_SuperJukebox();
}
diff --git a/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java b/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java
index bbec95a28e..b979f7864b 100644
--- a/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java
+++ b/src/Java/gtPlusPlus/core/block/general/FluidTankInfinite.java
@@ -4,7 +4,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.tileentities.general.TileEntityInfiniteFluid;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -14,12 +17,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
-
-import gtPlusPlus.core.creative.AddToCreativeTab;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.tileentities.general.TileEntityInfiniteFluid;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import net.minecraftforge.fluids.*;
+import net.minecraftforge.fluids.FluidContainerRegistry;
+import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.fluids.IFluidContainerItem;
+import net.minecraftforge.fluids.ItemFluidContainer;
public class FluidTankInfinite extends BlockContainer {
@@ -68,69 +69,68 @@ public class FluidTankInfinite extends BlockContainer {
final int side, final float lx, final float ly, final float lz) {
if (world.isRemote) {
return true;
- }
- else {
+ } else {
TileEntityInfiniteFluid tank = (TileEntityInfiniteFluid) world.getTileEntity(x, y, z);
- if (tank != null){
+ if (tank != null) {
Item handItem;
try {
handItem = player.getHeldItem().getItem();
- }
- catch (Throwable t){
+ } catch (Throwable t) {
handItem = null;
}
- if (handItem != null && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))){
- if (tank.tank.getFluid() == null){
- try {
- if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())){
- ItemStack handItemStack = player.getHeldItem();
- IFluidContainerItem container = (IFluidContainerItem) handItem;
- FluidStack containerFluid = container.getFluid(handItemStack);
- container.drain(handItemStack, container.getFluid(handItemStack).amount, true);
- tank.tank.setFluid(containerFluid);
- }
- else {
- ItemStack handItemStack = player.getHeldItem();
- FluidContainerRegistry.drainFluidContainer(handItemStack);
- FluidStack containerFluid = FluidContainerRegistry.getFluidForFilledItem(handItemStack);
- ItemStack emptyContainer = FluidContainerRegistry.drainFluidContainer(handItemStack);
- player.setItemInUse(emptyContainer, 0);
-
- tank.tank.setFluid(containerFluid);
+ if (handItem != null
+ && (handItem instanceof IFluidContainerItem || handItem instanceof ItemFluidContainer
+ || FluidContainerRegistry.isFilledContainer(player.getHeldItem()))) {
+ if (tank.tank.getFluid() == null) {
+ try {
+ if (!FluidContainerRegistry.isFilledContainer(player.getHeldItem())) {
+ ItemStack handItemStack = player.getHeldItem();
+ IFluidContainerItem container = (IFluidContainerItem) handItem;
+ FluidStack containerFluid = container.getFluid(handItemStack);
+ container.drain(handItemStack, container.getFluid(handItemStack).amount, true);
+ tank.tank.setFluid(containerFluid);
+ } else {
+ ItemStack handItemStack = player.getHeldItem();
+ FluidContainerRegistry.drainFluidContainer(handItemStack);
+ FluidStack containerFluid = FluidContainerRegistry.getFluidForFilledItem(handItemStack);
+ ItemStack emptyContainer = FluidContainerRegistry.drainFluidContainer(handItemStack);
+ player.setItemInUse(emptyContainer, 0);
+
+ tank.tank.setFluid(containerFluid);
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
}
}
- catch (Throwable t){
- t.printStackTrace();
- }
+
+ }
+ if (tank.tank.getFluid() != null) {
+ PlayerUtils.messagePlayer(player, "This tank contains " + tank.tank.getFluidAmount() + "L of "
+ + tank.tank.getFluid().getLocalizedName());
}
-
- }
- if (tank.tank.getFluid() != null){
- PlayerUtils.messagePlayer(player, "This tank contains "+tank.tank.getFluidAmount()+"L of "+tank.tank.getFluid().getLocalizedName());
}
}
+ return true;
}
- return true;
-}
-@Override
-public int getRenderBlockPass() {
- return 1;
-}
+ @Override
+ public int getRenderBlockPass() {
+ return 1;
+ }
-@Override
-public boolean isOpaqueCube() {
- return false;
-}
+ @Override
+ public boolean isOpaqueCube() {
+ return false;
+ }
-@Override
-public TileEntity createNewTileEntity(final World world, final int p_149915_2_) {
- return new TileEntityInfiniteFluid();
-}
+ @Override
+ public TileEntity createNewTileEntity(final World world, final int p_149915_2_) {
+ return new TileEntityInfiniteFluid();
+ }
-@Override
-public void onBlockAdded(World world, int x, int y, int z) {
- super.onBlockAdded(world, x, y, z);
-}
+ @Override
+ public void onBlockAdded(World world, int x, int y, int z) {
+ super.onBlockAdded(world, x, y, z);
+ }
}
diff --git a/src/Java/gtPlusPlus/core/block/general/LightGlass.java b/src/Java/gtPlusPlus/core/block/general/LightGlass.java
index 5a265ed7ef..30da7f1d56 100644
--- a/src/Java/gtPlusPlus/core/block/general/LightGlass.java
+++ b/src/Java/gtPlusPlus/core/block/general/LightGlass.java
@@ -2,37 +2,46 @@ package gtPlusPlus.core.block.general;
import java.util.Random;
+import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.block.BlockBreakable;
-import net.minecraft.block.material.Material;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockAir;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-public class LightGlass extends BlockBreakable
+/*public class LightGlass extends BlockBreakable
+{*/
+public class LightGlass extends BlockAir
{
- private int state = 0;
+
+private int state = 0;
private final int a = 255;
private int r = 255;
private int g = 0;
private int b = 0;
private int hex;
- public LightGlass(final Material mat, final boolean bool)
+ public LightGlass(final boolean bool)
{
- super("blockMFEffect", mat, bool);
+ //super("blockMFEffect", Material.air, bool);
+ super();
this.setCreativeTab(AddToCreativeTab.tabBlock);
this.setBlockName("blockMFEffect");
this.setLightLevel(12F);
+ setHardness(0.1F);
+ setBlockTextureName(CORE.MODID + ":" + "blockMFEffect");
+ setStepSound(Block.soundTypeGlass);
+ GameRegistry.registerBlock(this, "blockMFEffect");
+
+ /*
this.setLightOpacity(0);
this.setTickRandomly(true);
- this.setResistance(1);
+ this.setResistance(1);*/
}
/**
@@ -60,7 +69,7 @@ public class LightGlass extends BlockBreakable
@Override
public boolean renderAsNormalBlock()
{
- return true;
+ return false;
}
/**
@@ -129,7 +138,7 @@ public class LightGlass extends BlockBreakable
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(final World world, final int posX, final int posY, final int posZ, final Random random){
- Utils.spawnFX(world, posX, posY, posZ, "smoke", "cloud");
+ //Utils.spawnFX(world, posX, posY, posZ, "smoke", "cloud");
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java b/src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java
new file mode 100644
index 0000000000..e3d9d0e646
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/block/machine/Machine_SuperJukebox.java
@@ -0,0 +1,215 @@
+package gtPlusPlus.core.block.machine;
+
+import cpw.mods.fml.common.registry.GameRegistry;
+import cpw.mods.fml.common.registry.LanguageRegistry;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockJukebox;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.player.EntityPlayer;
+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.World;
+
+public class Machine_SuperJukebox extends BlockJukebox
+{
+ @SideOnly(Side.CLIENT)
+ private IIcon mIcon;
+
+ public Machine_SuperJukebox(){
+ this.setBlockName("blockSuperJukebox");
+ this.setCreativeTab(CreativeTabs.tabRedstone);
+ setHardness(2.0F);
+ setResistance(10.0F);
+ setStepSound(soundTypePiston);
+ setBlockTextureName("jukebox");
+ GameRegistry.registerBlock(this, "blockSuperJukebox");
+ LanguageRegistry.addName(this, "Sir Mixalot [Jukebox]");
+ }
+
+ /**
+ * Gets the block's texture. Args: side, meta
+ */
+ @SideOnly(Side.CLIENT)
+ public IIcon getIcon(int aSide, int aMeta)
+ {
+ return aSide == 1 ? this.mIcon : this.blockIcon;
+ }
+
+ /**
+ * Called upon block activation (right click on the block.)
+ */
+ @Override
+ public boolean onBlockActivated(World aWorld, int aX, int aY, int aZ, EntityPlayer aPlayer, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
+ {
+ if (aWorld.getBlockMetadata(aX, aY, aZ) == 0)
+ {
+ return false;
+ }
+ else
+ {
+ this.func_149925_e(aWorld, aX, aY, aZ);
+ return true;
+ }
+ }
+
+ /**
+ * Set the record in the {@link SuperJukebox} {@link TileEntity}.
+ */
+ @Override
+ public final void func_149926_b(World aWorld, int aX, int aY, int aZ, ItemStack aStackToSet) {
+ setRecordInJukeBox(aWorld, aX, aY, aZ, aStackToSet);
+ }
+
+ public void setRecordInJukeBox(World aWorld, int aX, int aY, int aZ, ItemStack aStackToSet) {
+ if (!aWorld.isRemote) {
+ TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX, aY, aZ);
+ if (tileentityjukebox != null) {
+ tileentityjukebox.func_145857_a(aStackToSet.copy());
+ aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 1, 2);
+ }
+ }
+ }
+
+ /**
+ * Function to handle playing of records.
+ */
+ @Override
+ public final void func_149925_e(World aWorld, int aX, int aY, int aZ) {
+ playerJukeboxRecord(aWorld, aX, aY, aZ);
+ }
+
+ public void playerJukeboxRecord(World aWorld, int aX, int aY, int aZ) {
+ if (!aWorld.isRemote) {
+ TileEntitySuperJukebox tileentityjukebox = (TileEntitySuperJukebox) aWorld.getTileEntity(aX,
+ aY, aZ);
+
+ if (tileentityjukebox != null) {
+ ItemStack itemstack = tileentityjukebox.func_145856_a();
+
+ if (itemstack != null) {
+ aWorld.playAuxSFX(1005, aX, aY, aZ, 0);
+ aWorld.playRecord((String) null, aX, aY, aZ);
+ tileentityjukebox.func_145857_a((ItemStack) null);
+ aWorld.setBlockMetadataWithNotify(aX, aY, aZ, 0, 2);
+ float f = 0.7F;
+ double d0 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
+ double d1 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.2D + 0.6D;
+ double d2 = (double) (aWorld.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
+ ItemStack itemstack1 = itemstack.copy();
+ EntityItem entityitem = new EntityItem(aWorld, (double) aX + d0,
+ (double) aY + d1, (double) aZ + d2, itemstack1);
+ entityitem.delayBeforeCanPickup = 10;
+ aWorld.spawnEntityInWorld(entityitem);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
+ {
+ this.func_149925_e(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_);
+ super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
+ }
+
+ /**
+ * Drops the block items with a specified chance of dropping the specified items
+ */
+ @Override
+ public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
+ {
+ if (!p_149690_1_.isRemote)
+ {
+ super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
+ }
+ }
+
+ /**
+ * Returns a new instance of a block's tile entity class. Called on placing the block.
+ */
+ @Override
+ public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
+ {
+ return new TileEntitySuperJukebox();
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void registerBlockIcons(IIconRegister p_149651_1_)
+ {
+ this.blockIcon = p_149651_1_.registerIcon(this.getTextureName() + "_side");
+ this.mIcon = p_149651_1_.registerIcon(this.getTextureName() + "_top");
+ }
+
+ public static class TileEntitySuperJukebox extends TileEntityJukebox {
+
+ private ItemStack field_145858_a;
+
+ @Override
+ public void readFromNBT(NBTTagCompound aNBT)
+ {
+ super.readFromNBT(aNBT);
+
+ if (aNBT.hasKey("RecordItem", 10))
+ {
+ this.func_145857_a(ItemStack.loadItemStackFromNBT(aNBT.getCompoundTag("RecordItem")));
+ }
+ else if (aNBT.getInteger("Record") > 0)
+ {
+ this.func_145857_a(new ItemStack(Item.getItemById(aNBT.getInteger("Record")), 1, 0));
+ }
+ }
+
+ @Override
+ public void writeToNBT(NBTTagCompound aNBT)
+ {
+ super.writeToNBT(aNBT);
+
+ if (this.func_145856_a() != null)
+ {
+ aNBT.setTag("RecordItem", this.func_145856_a().writeToNBT(new NBTTagCompound()));
+ aNBT.setInteger("Record", Item.getIdFromItem(this.func_145856_a().getItem()));
+ }
+ }
+
+ /**
+ * Called to get the internal stack
+ */
+ @Override
+ public ItemStack func_145856_a()
+ {
+ return this.field_145858_a;
+ }
+
+ /**
+ * Called to get the internal stack, wraps vanilla function {@link func_145856_a}.
+ */
+ public ItemStack getCurrentRecord() {
+ return func_145856_a();
+ }
+
+ /**
+ * Called to set the internal stack
+ */
+ @Override
+ public void func_145857_a(ItemStack p_145857_1_)
+ {
+ this.field_145858_a = p_145857_1_;
+ this.markDirty();
+ }
+
+ /**
+ * Called to set the internal stack, wraps vanilla function {@link func_145857_a}.
+ */
+ public void setCurrentRecord(ItemStack aStack) {
+ func_145857_a(aStack);
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java b/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java
new file mode 100644
index 0000000000..fb260eedeb
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/client/renderer/RenderBatKing.java
@@ -0,0 +1,150 @@
+package gtPlusPlus.core.client.renderer;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.client.model.ModelBat;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.passive.EntityBat;
+import net.minecraft.util.MathHelper;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+@SideOnly(Side.CLIENT)
+public class RenderBatKing extends RenderLiving {
+
+ private static final ResourceLocation batTextures = new ResourceLocation("textures/entity/bat.png");
+
+ /**
+ * not actually sure this is size, is not used as of now, but the model would be
+ * recreated if the value changed and it seems a good match for a bats size
+ */
+ private int renderedBatSize;
+
+ public RenderBatKing() {
+ super(new ModelBat(), 1F);
+ this.renderedBatSize = ((ModelBat) this.mainModel).getBatSize();
+ }
+
+ /**
+ * 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.
+ */
+ public void doRender(EntityBat p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
+ float p_76986_8_, float p_76986_9_) {
+ int i = ((ModelBat) this.mainModel).getBatSize();
+
+ if (i != this.renderedBatSize) {
+ this.renderedBatSize = i;
+ this.mainModel = new ModelBat();
+ }
+
+ super.doRender((EntityLiving) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+
+ /**
+ * Returns the location of an entity's texture. Doesn't seem to be called unless
+ * you call Render.bindEntityTexture.
+ */
+ protected ResourceLocation getEntityTexture(EntityBat p_110775_1_) {
+ return batTextures;
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the
+ * model is rendered. Args: entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityBat p_77041_1_, float p_77041_2_) {
+ GL11.glScalef(0.35F, 0.35F, 0.35F);
+ }
+
+ /**
+ * Sets a simple glTranslate on a LivingEntity.
+ */
+ protected void renderLivingAt(EntityBat p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_) {
+ super.renderLivingAt(p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);
+ }
+
+ protected void rotateCorpse(EntityBat p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
+ if (!p_77043_1_.getIsBatHanging()) {
+ GL11.glTranslatef(0.0F, MathHelper.cos(p_77043_2_ * 0.3F) * 0.1F, 0.0F);
+ } else {
+ GL11.glTranslatef(0.0F, -0.1F, 0.0F);
+ }
+
+ super.rotateCorpse(p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
+ }
+
+ /**
+ * 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.
+ */
+ public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
+ float p_76986_8_, float p_76986_9_) {
+ this.doRender((EntityBat) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+
+ /**
+ * Allows the render to do any OpenGL state modifications necessary before the
+ * model is rendered. Args: entityLiving, partialTickTime
+ */
+ protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_) {
+ this.preRenderCallback((EntityBat) p_77041_1_, p_77041_2_);
+ }
+
+ protected void rotateCorpse(EntityLivingBase p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_) {
+ this.rotateCorpse((EntityBat) p_77043_1_, p_77043_2_, p_77043_3_, p_77043_4_);
+ }
+
+ /**
+ * Sets a simple glTranslate on a LivingEntity.
+ */
+ protected void renderLivingAt(EntityLivingBase p_77039_1_, double p_77039_2_, double p_77039_4_,
+ double p_77039_6_) {
+ this.renderLivingAt((EntityBat) p_77039_1_, p_77039_2_, p_77039_4_, p_77039_6_);
+ }
+
+ /**
+ * 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.
+ */
+ public void doRender(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_,
+ float p_76986_8_, float p_76986_9_) {
+ this.doRender((EntityBat) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+
+ /**
+ * Returns the location of an entity's texture. Doesn't seem to be called unless
+ * you call Render.bindEntityTexture.
+ */
+ protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
+ return this.getEntityTexture((EntityBat) p_110775_1_);
+ }
+
+ /**
+ * 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.
+ */
+ 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_) {
+ this.doRender((EntityBat) p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java
index 9e75cd4a16..6bced739c7 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -41,23 +41,16 @@ public class CommonProxy {
public static Meta_GT_Proxy GtProxy;
private boolean mFluidsGenerated = false;
- public CommonProxy(){
- //Should Register Gregtech Materials I've Made
+ public CommonProxy() {
+ // Should Register Gregtech Materials I've Made
Utils.registerEvent(this);
- if (LoadedMods.Gregtech){
- if (!CORE.GTNH) {
- Logger.INFO("We're using Gregtech "+Utils.getGregtechVersionAsString());
- }
- else {
- Logger.INFO("We're using GTNH's Gregtech "+Utils.getGregtechVersionAsString());
- }
-
- Logger.INFO("Setting up our own GT_Proxy.");
- GtProxy = new Meta_GT_Proxy();
- }
- else {
- GtProxy = null;
+ if (!CORE.GTNH) {
+ Logger.INFO("We're using Gregtech " + Utils.getGregtechVersionAsString());
+ } else {
+ Logger.INFO("We're using GTNH's Gregtech " + Utils.getGregtechVersionAsString());
}
+ Logger.INFO("Setting up our own GT_Proxy.");
+ GtProxy = Meta_GT_Proxy.instance;
}
public void preInit(final FMLPreInitializationEvent e) {
@@ -108,6 +101,9 @@ public class CommonProxy {
//Must be done in pre-init.
generateMobSpawners();
+ //Internal GT Proxy
+ GtProxy.preInit();
+
}
public void init(final FMLInitializationEvent e) {
@@ -160,6 +156,9 @@ public class CommonProxy {
COMPAT_HANDLER.registerMyModsOreDictEntries();
COMPAT_HANDLER.intermodOreDictionarySupport();
COMPAT_IntermodStaging.init();
+
+ //Internal GT Proxy
+ GtProxy.init();
}
public void postInit(final FMLPostInitializationEvent e) {
@@ -179,6 +178,8 @@ public class CommonProxy {
COMPAT_HANDLER.startLoadingGregAPIBasedRecipes();
COMPAT_IntermodStaging.postInit();
COMPAT_HANDLER.runQueuedRecipes();
+ //Internal GT Proxy
+ GtProxy.postInit();
}
diff --git a/src/Java/gtPlusPlus/core/container/Container_SuperJukebox.java b/src/Java/gtPlusPlus/core/container/Container_SuperJukebox.java
new file mode 100644
index 0000000000..cb2f33dd47
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/container/Container_SuperJukebox.java
@@ -0,0 +1,190 @@
+package gtPlusPlus.core.container;
+
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+import net.minecraft.world.World;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.inventories.InventoryCircuitProgrammer;
+import gtPlusPlus.core.slots.SlotIntegratedCircuit;
+import gtPlusPlus.core.slots.SlotNoInput;
+import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer;
+
+public class Container_SuperJukebox extends Container {
+
+ protected TileEntityCircuitProgrammer tile_entity;
+ public final InventoryCircuitProgrammer inventoryChest;
+
+ private final World worldObj;
+ private final int posX;
+ private final int posY;
+ private final int posZ;
+
+ public static final int SLOT_OUTPUT = 25;
+
+ public static int StorageSlotNumber = 26; // Number of slots in storage area
+ public static int InventorySlotNumber = 36; // Inventory Slots (Inventory
+ // and Hotbar)
+ public static int FullSlotNumber = InventorySlotNumber + StorageSlotNumber; // All
+ // slots
+
+ public Container_SuperJukebox(final InventoryPlayer inventory, final TileEntityCircuitProgrammer te) {
+ this.tile_entity = te;
+ this.inventoryChest = te.getInventory();
+
+ int var6;
+ int var7;
+ this.worldObj = te.getWorldObj();
+ this.posX = te.xCoord;
+ this.posY = te.yCoord;
+ this.posZ = te.zCoord;
+ Logger.INFO("1");
+
+ int o = 0;
+
+ // Storage Side
+ /*for (var6 = 0; var6 < 3; var6++) {
+ for (var7 = 0; var7 < 5; var7++) {
+ this.addSlotToContainer(new SlotIntegratedCircuit(o, this.inventoryChest, o, 44 + (var7 * 18), 15 + (var6 * 18)));
+ o++;
+ }
+ }*/
+
+
+ int xStart = 8;
+ int yStart = 5;
+
+ try {
+ //0
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart, yStart));
+ //1-10
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+18));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+18));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+18));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+18));
+ //11-20
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+18));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+18));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+36));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+36));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+36));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+36));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+36));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+36));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+18, yStart+54));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+36, yStart+54));
+ //21-24
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+54, yStart+54));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+72, yStart+54));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+90, yStart+54));
+ this.addSlotToContainer(new SlotIntegratedCircuit(this.inventoryChest, o++, xStart+108, yStart+54));
+ Logger.INFO("2");
+
+ //Add Output
+ this.addSlotToContainer(new SlotNoInput(this.inventoryChest, SLOT_OUTPUT, xStart+(8*18), yStart+54));
+ o++;
+ Logger.INFO("3");
+
+
+
+ // Player Inventory
+ for (var6 = 0; var6 < 3; ++var6) {
+ for (var7 = 0; var7 < 9; ++var7) {
+ this.addSlotToContainer(new Slot(inventory, var7 + (var6 * 9) + 9, 8 + (var7 * 18), 84 + (var6 * 18)));
+ }
+ }
+ // Player Hotbar
+ for (var6 = 0; var6 < 9; ++var6) {
+ this.addSlotToContainer(new Slot(inventory, var6, 8 + (var6 * 18), 142));
+ }
+
+
+
+ Logger.INFO("4");
+ }
+ catch (Throwable t) {}
+
+ }
+
+ @Override
+ public ItemStack slotClick(final int aSlotIndex, final int aMouseclick, final int aShifthold,
+ final EntityPlayer aPlayer) {
+
+ if (!aPlayer.worldObj.isRemote) {
+ if ((aSlotIndex == 999) || (aSlotIndex == -999)) {
+ // Utils.LOG_WARNING("??? - "+aSlotIndex);
+ }
+ }
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
+ }
+
+ @Override
+ public void onContainerClosed(final EntityPlayer par1EntityPlayer) {
+ super.onContainerClosed(par1EntityPlayer);
+ }
+
+ @Override
+ public boolean canInteractWith(final EntityPlayer par1EntityPlayer) {
+ if (this.worldObj.getBlock(this.posX, this.posY, this.posZ) != ModBlocks.blockCircuitProgrammer) {
+ return false;
+ }
+
+ return par1EntityPlayer.getDistanceSq(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D) <= 64D;
+ }
+
+ @Override
+ public ItemStack transferStackInSlot(final EntityPlayer par1EntityPlayer, final int par2) {
+ ItemStack var3 = null;
+ final Slot var4 = (Slot) this.inventorySlots.get(par2);
+
+ if ((var4 != null) && var4.getHasStack()) {
+ final ItemStack var5 = var4.getStack();
+ var3 = var5.copy();
+
+ /*
+ * if (par2 == 0) { if (!this.mergeItemStack(var5,
+ * InOutputSlotNumber, FullSlotNumber, true)) { return null; }
+ *
+ * var4.onSlotChange(var5, var3); } else if (par2 >=
+ * InOutputSlotNumber && par2 < InventoryOutSlotNumber) { if
+ * (!this.mergeItemStack(var5, InventoryOutSlotNumber,
+ * FullSlotNumber, false)) { return null; } } else if (par2 >=
+ * InventoryOutSlotNumber && par2 < FullSlotNumber) { if
+ * (!this.mergeItemStack(var5, InOutputSlotNumber,
+ * InventoryOutSlotNumber, false)) { return null; } } else if
+ * (!this.mergeItemStack(var5, InOutputSlotNumber, FullSlotNumber,
+ * false)) { return null; }
+ */
+
+ if (var5.stackSize == 0) {
+ var4.putStack((ItemStack) null);
+ } else {
+ var4.onSlotChanged();
+ }
+
+ if (var5.stackSize == var3.stackSize) {
+ return null;
+ }
+
+ var4.onPickupFromSlot(par1EntityPlayer, var5);
+ }
+
+ return var3;
+ }
+
+ // Can merge Slot
+ @Override
+ public boolean func_94530_a(final ItemStack p_94530_1_, final Slot p_94530_2_) {
+ return super.func_94530_a(p_94530_1_, p_94530_2_);
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
index f130a1f936..36f5b86184 100644
--- a/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
+++ b/src/Java/gtPlusPlus/core/entity/InternalEntityRegistry.java
@@ -8,6 +8,7 @@ import gtPlusPlus.australia.entity.type.EntityAustralianSpiderBase;
import gtPlusPlus.australia.entity.type.EntityBoar;
import gtPlusPlus.australia.entity.type.EntityDingo;
import gtPlusPlus.australia.entity.type.EntityOctopus;
+import gtPlusPlus.core.entity.monster.EntityBatKing;
import gtPlusPlus.core.entity.monster.EntityGiantChickenBase;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
@@ -55,6 +56,7 @@ public class InternalEntityRegistry {
*/
EntityRegistry.registerGlobalEntityID(EntityGiantChickenBase.class, "bigChickenFriendly", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(255, 0, 0), Utils.rgbtoHexValue(175, 175, 175));
+ EntityRegistry.registerGlobalEntityID(EntityBatKing.class, "batKing", EntityRegistry.findGlobalUniqueEntityId(), Utils.rgbtoHexValue(175, 175, 0), Utils.rgbtoHexValue(0, 175, 175));
//EntityRegistry.registerModEntity(EntityGiantChickenBase.class, "bigChickenFriendly", mEntityID++, GTplusplus.instance, 64, 20, true);
diff --git a/src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java b/src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java
new file mode 100644
index 0000000000..114ca50b4b
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/entity/monster/EntityBatKing.java
@@ -0,0 +1,228 @@
+package gtPlusPlus.core.entity.monster;
+
+import java.util.Calendar;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.SharedMonsterAttributes;
+import net.minecraft.entity.passive.EntityBat;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+
+public class EntityBatKing extends EntityBat
+{
+ /** Coordinates of where the bat spawned. */
+ private ChunkCoordinates spawnPosition;
+
+ public EntityBatKing(World p_i1680_1_)
+ {
+ super(p_i1680_1_);
+ this.setSize(2F, 3.6F);
+ this.setIsBatHanging(false);
+ }
+
+ protected void entityInit()
+ {
+ super.entityInit();
+ }
+
+ /**
+ * Returns the volume for the sounds this mob makes.
+ */
+ protected float getSoundVolume()
+ {
+ return 0.3F;
+ }
+
+ /**
+ * Gets the pitch of living sounds in living entities.
+ */
+ protected float getSoundPitch()
+ {
+ return super.getSoundPitch() * 0.35F;
+ }
+
+ /**
+ * Returns the sound this mob makes while it's alive.
+ */
+ protected String getLivingSound()
+ {
+ return this.getIsBatHanging() && this.rand.nextInt(4) != 0 ? null : "mob.bat.idle";
+ }
+
+ /**
+ * Returns the sound this mob makes when it is hurt.
+ */
+ protected String getHurtSound()
+ {
+ return "mob.bat.hurt";
+ }
+
+ /**
+ * Returns the sound this mob makes on death.
+ */
+ protected String getDeathSound()
+ {
+ return "mob.bat.death";
+ }
+
+ /**
+ * Returns true if this entity should push and be pushed by other entities when colliding.
+ */
+ public boolean canBePushed()
+ {
+ return false;
+ }
+
+ protected void collideWithEntity(Entity p_82167_1_) {}
+
+ protected void collideWithNearbyEntities() {}
+
+ protected void applyEntityAttributes()
+ {
+ super.applyEntityAttributes();
+ this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(60.0D);
+ }
+
+ public boolean getIsBatHanging()
+ {
+ return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
+ }
+
+ public void setIsBatHanging(boolean p_82236_1_)
+ {
+ byte b0 = this.dataWatcher.getWatchableObjectByte(16);
+
+ if (p_82236_1_)
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 1)));
+ }
+ else
+ {
+ this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & -2)));
+ }
+ }
+
+ /**
+ * Returns true if the newer Entity AI code should be run
+ */
+ protected boolean isAIEnabled()
+ {
+ return true;
+ }
+
+ /**
+ * Called to update the entity's position/logic.
+ */
+ public void onUpdate()
+ {
+ super.onUpdate();
+ }
+
+ protected void updateAITasks()
+ {
+ super.updateAITasks();
+
+ }
+
+ /**
+ * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
+ * prevent them from trampling crops
+ */
+ protected boolean canTriggerWalking()
+ {
+ return false;
+ }
+
+ /**
+ * Called when the mob is falling. Calculates and applies fall damage.
+ */
+ protected void fall(float p_70069_1_) {}
+
+ /**
+ * Takes in the distance the entity has fallen this tick and whether its on the ground to update the fall distance
+ * and deal fall damage if landing on the ground. Args: distanceFallenThisTick, onGround
+ */
+ protected void updateFallState(double p_70064_1_, boolean p_70064_3_) {}
+
+ /**
+ * Return whether this entity should NOT trigger a pressure plate or a tripwire.
+ */
+ public boolean doesEntityNotTriggerPressurePlate()
+ {
+ return true;
+ }
+
+ /**
+ * Called when the entity is attacked.
+ */
+ public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_)
+ {
+ if (this.isEntityInvulnerable())
+ {
+ return false;
+ }
+ else
+ {
+ if (!this.worldObj.isRemote && this.getIsBatHanging())
+ {
+ this.setIsBatHanging(false);
+ }
+
+ return super.attackEntityFrom(p_70097_1_, p_70097_2_);
+ }
+ }
+
+ /**
+ * (abstract) Protected helper method to read subclass entity data from NBT.
+ */
+ public void readEntityFromNBT(NBTTagCompound p_70037_1_)
+ {
+ super.readEntityFromNBT(p_70037_1_);
+ }
+
+ /**
+ * (abstract) Protected helper method to write subclass entity data to NBT.
+ */
+ public void writeEntityToNBT(NBTTagCompound p_70014_1_)
+ {
+ super.writeEntityToNBT(p_70014_1_);
+ }
+
+ /**
+ * Checks if the entity's current position is a valid location to spawn this entity.
+ */
+ public boolean getCanSpawnHere()
+ {
+ int i = MathHelper.floor_double(this.boundingBox.minY);
+
+ if (i >= 63)
+ {
+ return false;
+ }
+ else
+ {
+ int j = MathHelper.floor_double(this.posX);
+ int k = MathHelper.floor_double(this.posZ);
+ int l = this.worldObj.getBlockLightValue(j, i, k);
+ byte b0 = 4;
+ Calendar calendar = this.worldObj.getCurrentDate();
+
+ if ((calendar.get(2) + 1 != 10 || calendar.get(5) < 20) && (calendar.get(2) + 1 != 11 || calendar.get(5) > 3))
+ {
+ if (this.rand.nextBoolean())
+ {
+ return false;
+ }
+ }
+ else
+ {
+ b0 = 7;
+ }
+
+ return l > this.rand.nextInt(b0) ? false : super.getCanSpawnHere();
+ }
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java
new file mode 100644
index 0000000000..adaf8469ad
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_SuperJukebox.java
@@ -0,0 +1,44 @@
+package gtPlusPlus.core.gui.machine;
+
+import org.lwjgl.opengl.GL11;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.ResourceLocation;
+import gtPlusPlus.core.container.Container_CircuitProgrammer;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.tileentities.general.TileEntityCircuitProgrammer;
+
+@SideOnly(Side.CLIENT)
+public class GUI_SuperJukebox extends GuiContainer {
+
+ private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation(CORE.MODID, "textures/gui/CircuitProgrammer.png");
+
+ public GUI_SuperJukebox(final InventoryPlayer player_inventory, final TileEntityCircuitProgrammer te){
+ super(new Container_CircuitProgrammer(player_inventory, te));
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(final int i, final int j){
+ super.drawGuiContainerForegroundLayer(i, j);
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(final float f, final int i, final int j){
+ GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+ this.mc.renderEngine.bindTexture(craftingTableGuiTextures);
+ final int x = (this.width - this.xSize) / 2;
+ final int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ }
+
+ //This method is called when the Gui is first called!
+ @Override
+ public void initGui(){
+ super.initGui();
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index c37369b00f..eaa17f9f87 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -120,6 +120,7 @@ public class COMPAT_HANDLER {
GregtechIndustrialArcFurnace.run();
GregtechSolarTower.run();
GregtechLargeTurbinesAndHeatExchanger.run();
+ GregtechPowerBreakers.run();
//New Horizons Content
NewHorizonsAccelerator.run();
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index 3c18e2f6f7..97da974967 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -115,7 +115,6 @@ public class CORE {
@Deprecated
public static IGregtech_RecipeAdder sRecipeAdder;
public static IGregtech_RecipeAdder RA;
- public static GregtechRecipe GT_Recipe = new GregtechRecipe();
public static final GT_Materials[] sMU_GeneratedMaterials = new GT_Materials[1000];
diff --git a/src/Java/gtPlusPlus/core/lib/LoadedMods.java b/src/Java/gtPlusPlus/core/lib/LoadedMods.java
index 2a7ef9bc39..da0357a9c4 100644
--- a/src/Java/gtPlusPlus/core/lib/LoadedMods.java
+++ b/src/Java/gtPlusPlus/core/lib/LoadedMods.java
@@ -11,7 +11,6 @@ import gtPlusPlus.xmod.gregtech.recipes.GregtechRecipeAdder;
public class LoadedMods {
-
//Initialize Variables
public static boolean Gregtech = false;
public static boolean PlayerAPI = false;
@@ -53,6 +52,7 @@ public class LoadedMods {
public static boolean TiCon = false;
public static boolean StevesCarts = false;
public static boolean Witchery = false;
+ public static boolean Waila = false;
@@ -185,6 +185,11 @@ public class LoadedMods {
Logger.INFO("Components enabled for: Railcraft");
totalMods++;
}
+ if (Loader.isModLoaded("Waila")){
+ Waila = true;
+ Logger.INFO("Components enabled for: WAILA");
+ totalMods++;
+ }
if (Loader.isModLoaded("Mekanism")){
Mekanism = true;
Logger.INFO("Components enabled for: Mekanism - This feature is not configurable and balances Mekanism to suit GT.");
diff --git a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
index 727a411e4f..c7374ca7d5 100644
--- a/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
+++ b/src/Java/gtPlusPlus/core/proxy/ClientProxy.java
@@ -30,6 +30,7 @@ import gtPlusPlus.australia.entity.type.EntityDingo;
import gtPlusPlus.australia.entity.type.EntityOctopus;
import gtPlusPlus.core.client.model.ModelGiantChicken;
import gtPlusPlus.core.client.renderer.CustomOreBlockRenderer;
+import gtPlusPlus.core.client.renderer.RenderBatKing;
import gtPlusPlus.core.client.renderer.RenderDecayChest;
import gtPlusPlus.core.client.renderer.RenderGiantChicken;
import gtPlusPlus.core.client.renderer.RenderMiningExplosivesPrimed;
@@ -41,6 +42,7 @@ import gtPlusPlus.core.common.CommonProxy;
import gtPlusPlus.core.common.compat.COMPAT_PlayerAPI;
import gtPlusPlus.core.entity.EntityPrimedMiningExplosive;
import gtPlusPlus.core.entity.EntityTeslaTowerLightning;
+import gtPlusPlus.core.entity.monster.EntityBatKing;
import gtPlusPlus.core.entity.monster.EntityGiantChickenBase;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
@@ -55,7 +57,9 @@ import gtPlusPlus.core.tileentities.general.TileEntityDecayablesChest;
import gtPlusPlus.core.tileentities.general.TileEntityFirepit;
import gtPlusPlus.core.util.minecraft.particles.EntityParticleFXMysterious;
import gtPlusPlus.xmod.gregtech.common.render.GTPP_CapeRenderer;
+import gtPlusPlus.xmod.gregtech.common.render.GTPP_Render_MachineBlock;
import net.minecraft.client.Minecraft;
+import net.minecraft.client.model.ModelBat;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.client.renderer.entity.RenderSnowball;
import net.minecraft.entity.Entity;
@@ -106,6 +110,7 @@ public class ClientProxy extends CommonProxy implements Runnable{
* Custom Block Renderers
*/
new CustomOreBlockRenderer();
+ new GTPP_Render_MachineBlock();
super.init(e);
}
@@ -132,6 +137,7 @@ public class ClientProxy extends CommonProxy implements Runnable{
RenderingRegistry.registerEntityRenderingHandler(EntityHydrofluoricAcidPotion.class, new RenderSnowball(ModItems.itemHydrofluoricPotion));
RenderingRegistry.registerEntityRenderingHandler(EntityTeslaTowerLightning.class, new RenderPlasmaBolt());
RenderingRegistry.registerEntityRenderingHandler(EntityGiantChickenBase.class, new RenderGiantChicken(new ModelGiantChicken(), 1f));
+ RenderingRegistry.registerEntityRenderingHandler(EntityBatKing.class, new RenderBatKing());
/**
* Tiles
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index 12195c2dc0..e2cfb3516e 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -209,6 +209,7 @@ public class RECIPES_Machines {
initModItems();
controlCores();
energyCores();
+ wirelessChargers();
}
private static void initModItems(){
@@ -1281,53 +1282,6 @@ public class RECIPES_Machines {
o_Fermenter, o_Distillery, o_Extractor,
GregtechItemList.Industrial_MultiMachine.get(1));
}
-
- //Wireless Chargers
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_LV, CI.circuitTier1, CI.emitter_LV,
- CI.component_Plate[3], CI.machineHull_LV, CI.component_Plate[3],
- CI.sensor_LV, CI.fieldGenerator_LV, CI.sensor_LV,
- GregtechItemList.Charger_LV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_MV, CI.circuitTier2, CI.emitter_MV,
- CI.component_Plate[4], CI.machineHull_MV, CI.component_Plate[4],
- CI.sensor_MV, CI.fieldGenerator_MV, CI.sensor_MV,
- GregtechItemList.Charger_MV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_HV, CI.circuitTier3, CI.emitter_HV,
- CI.component_Plate[5], CI.machineHull_HV, CI.component_Plate[5],
- CI.sensor_HV, CI.fieldGenerator_HV, CI.sensor_HV,
- GregtechItemList.Charger_HV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_EV, CI.circuitTier4, CI.emitter_EV,
- CI.component_Plate[6], CI.machineHull_EV, CI.component_Plate[6],
- CI.sensor_EV, CI.fieldGenerator_EV, CI.sensor_EV,
- GregtechItemList.Charger_EV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_IV, CI.circuitTier5, CI.emitter_IV,
- CI.component_Plate[7], CI.machineHull_IV, CI.component_Plate[7],
- CI.sensor_IV, CI.fieldGenerator_IV, CI.sensor_IV,
- GregtechItemList.Charger_IV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_LuV, CI.circuitTier6, CI.emitter_LuV,
- CI.component_Plate[8], CI.machineHull_LuV, CI.component_Plate[8],
- CI.sensor_LuV, CI.fieldGenerator_LuV, CI.sensor_LuV,
- GregtechItemList.Charger_LuV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_ZPM, CI.circuitTier7, CI.emitter_ZPM,
- CI.component_Plate[9], CI.machineHull_ZPM, CI.component_Plate[9],
- CI.sensor_ZPM, CI.fieldGenerator_ZPM, CI.sensor_ZPM,
- GregtechItemList.Charger_ZPM.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_UV, CI.circuitTier8, CI.emitter_UV,
- CI.component_Plate[10], CI.machineHull_UV, CI.component_Plate[10],
- CI.sensor_UV, CI.fieldGenerator_UV, CI.sensor_UV,
- GregtechItemList.Charger_UV.get(1));
- RecipeUtils.addShapedGregtechRecipe(
- CI.emitter_MAX, CI.circuitTier9, CI.emitter_MAX,
- CI.component_Plate[11], CI.machineHull_MAX, CI.component_Plate[11],
- CI.sensor_MAX, CI.fieldGenerator_MAX, CI.sensor_MAX,
- GregtechItemList.Charger_MAX.get(1));
@@ -1819,4 +1773,44 @@ public class RECIPES_Machines {
}
+
+ private static void wirelessChargers() {
+
+ ItemStack[] aChargers = new ItemStack[] {
+ null,
+ GregtechItemList.Charger_LV.get(1),
+ GregtechItemList.Charger_MV.get(1),
+ GregtechItemList.Charger_HV.get(1),
+ GregtechItemList.Charger_EV.get(1),
+ GregtechItemList.Charger_IV.get(1),
+ GregtechItemList.Charger_LuV.get(1),
+ GregtechItemList.Charger_ZPM.get(1),
+ GregtechItemList.Charger_UV.get(1),
+ GregtechItemList.Charger_MAX.get(1)
+ };
+
+ int aCostMultiplier = GTNH ? 2 : 1;
+
+ for (int i = 0; i < 10; i++) {
+ if (i == 0) {
+ continue;
+ }
+ int aTier = (i + 1);
+ ItemStack[] aInputs = new ItemStack[] {
+ CI.getTieredMachineHull(i, 1 * aCostMultiplier),
+ CI.getEmitter(i, 2 * aCostMultiplier),
+ CI.getSensor(i, 2 * aCostMultiplier),
+ CI.getFieldGenerator(i, 1 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.plate, aTier, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.circuit, aTier, 2 * aCostMultiplier),
+ };
+ CORE.RA.addSixSlotAssemblingRecipe(
+ aInputs,
+ CI.getAlternativeTieredFluid(i, (144 * 2 * aTier)), //Input Fluid
+ aChargers[i],
+ 45 * 10 * 1 * (aTier),
+ MaterialUtils.getVoltageForTier(i));
+
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java
index 5f334cdc71..13a30a510c 100644
--- a/src/Java/gtPlusPlus/core/recipe/common/CI.java
+++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java
@@ -606,10 +606,22 @@ public class CI {
public static FluidStack getTieredFluid(int aTier, int aAmount) {
+ return getTieredFluid(aTier, aAmount, 0);
+ }
+
+ public static FluidStack getAlternativeTieredFluid(int aTier, int aAmount) {
+ return getTieredFluid(aTier, aAmount, 1);
+ }
+
+ public static FluidStack getTertiaryTieredFluid(int aTier, int aAmount) {
+ return getTieredFluid(aTier, aAmount, 2);
+ }
+
+ public static FluidStack getTieredFluid(int aTier, int aAmount, int aType) {
ItemStack aCell = getTieredComponent(OrePrefixes.liquid, aTier, 1);
FluidStack a = GT_Utility.getFluidForFilledItem(aCell, true);
if (a == null) {
- a = aMaster[0][aTier].getFluid(aAmount);
+ a = aMaster[aType][aTier].getFluid(aAmount);
}
a.amount = aAmount;
return a;
@@ -782,5 +794,358 @@ public class CI {
}
+
+ public static ItemStack getElectricMotor(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricMotor_MAX;
+ }
+ else {
+ aType = CI.electricMotor_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getElectricPiston(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPiston_MAX;
+ }
+ else {
+ aType = CI.electricPiston_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getElectricPump(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.electricPump_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.electricPump_MAX;
+ }
+ else {
+ aType = CI.electricPump_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getRobotArm(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.robotArm_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.robotArm_MAX;
+ }
+ else {
+ aType = CI.robotArm_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getConveyor(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.conveyorModule_MAX;
+ }
+ else {
+ aType = CI.conveyorModule_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getEmitter(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.emitter_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.emitter_MAX;
+ }
+ else {
+ aType = CI.emitter_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getSensor(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.sensor_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.sensor_MAX;
+ }
+ else {
+ aType = CI.sensor_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+ public static ItemStack getFieldGenerator(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.fieldGenerator_MAX;
+ }
+ else {
+ aType = CI.fieldGenerator_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
+
+
+
+ public static ItemStack getTieredMachineHull(int aTier, int aSize) {
+ ItemStack aType;
+ int aLazyTier = 0;
+ if (aTier == aLazyTier++) {
+ aType = CI.machineHull_ULV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_LV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_MV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_HV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_EV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_IV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_LuV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_ZPM;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_UV;
+ }
+ else if (aTier == aLazyTier++) {
+ aType = CI.machineHull_MAX;
+ }
+ else {
+ aType = CI.machineHull_LV;
+ }
+ return ItemUtils.getSimpleStack(aType, aSize);
+ }
}
diff --git a/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java b/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java
index 771283d686..da018675f3 100644
--- a/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java
+++ b/src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java
@@ -3,6 +3,8 @@ package gtPlusPlus.core.tileentities;
import cpw.mods.fml.common.registry.GameRegistry;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.general.BlockSuperLight.TileEntitySuperLight;
+import gtPlusPlus.core.block.machine.Machine_SuperJukebox.TileEntitySuperJukebox;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.tileentities.general.*;
import gtPlusPlus.core.tileentities.machines.*;
@@ -25,7 +27,9 @@ public class ModTileEntities {
GameRegistry.registerTileEntity(TileEntityGenericSpawner.class, "TileEntityGenericSpawner");
GameRegistry.registerTileEntity(TileEntityCircuitProgrammer.class, "TileCircuitProgrammer");
GameRegistry.registerTileEntity(TileEntityPlayerDoorBase.class, "TilePlayerDoorBase");
- GameRegistry.registerTileEntity(TileEntityDecayablesChest.class, "TileDecayablesChest");
+ GameRegistry.registerTileEntity(TileEntityDecayablesChest.class, "TileDecayablesChest");
+ GameRegistry.registerTileEntity(TileEntitySuperJukebox.class, "TileEntitySuperJukebox");
+ GameRegistry.registerTileEntity(TileEntitySuperLight.class, "TileEntitySuperLight");
//Mod TEs
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
index 3f08715914..486cda42f9 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
@@ -608,25 +608,40 @@ public class ItemUtils {
public static String getArrayStackNames(final ItemStack[] aStack) {
String itemNames = "Item Array: ";
- for (final ItemStack alph : aStack) {
-
+ int aPos = 0;
+ for (final ItemStack alph : aStack) {
+ if (alph == null) {
+ continue;
+ }
if (alph != null) {
final String temp = itemNames;
- itemNames = temp + ", " + alph.getDisplayName() + " x" + alph.stackSize;
- } else {
- final String temp = itemNames;
- itemNames = temp + ", " + "null" + " x" + "0";
+ itemNames = temp + (aPos > 0 ? ", " : "") + alph.getDisplayName() + " x" + alph.stackSize;
+ aPos++;
}
}
return itemNames;
}
public static String[] getArrayStackNamesAsArray(final ItemStack[] aStack) {
- final String[] itemNames = {};
+ final String[] itemNames = aStack == null ? new String[] {} : new String[aStack.length];
+ Logger.INFO(""+aStack.length);
+
+ if (aStack == null || aStack.length < 1) {
+ return itemNames;
+ }
+
int arpos = 0;
- for (final ItemStack alph : aStack) {
+ for (final ItemStack alph : aStack) {
+ if (alph == null) {
+ continue;
+ }
+ try {
itemNames[arpos] = alph.getDisplayName();
arpos++;
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ }
}
return itemNames;
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
index afba320fe7..635239bbfc 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java
@@ -1,76 +1,3 @@
package gtPlusPlus.core.util.minecraft.gregtech.recipehandlers;
-import java.lang.reflect.Method;
-
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.util.GT_ModHandler;
-
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-
-public final class GregtechRecipe {
-
- public LibraryProxy ourProxy;
- public GregtechRecipe(){
- Logger.INFO("Initializing a recipe handler for different versions of Gregtech 5.");
- try {
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- this.ourProxy = new LibProxy1();
- Logger.INFO("Selecting GT 5.7/5.8 Recipe Set");
- }
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
- this.ourProxy = new LibProxy2();
- Logger.INFO("Selecting GT 5.9 Recipe Set");
- }
- } catch (final NoSuchMethodException e) {
- this.ourProxy = null;
- }
- }
-
- public boolean addSmeltingAndAlloySmeltingRecipe(final ItemStack aInput, final ItemStack aOutput) {
- Logger.WARNING("Adding a GT Furnace/Alloy Smelter Recipe"+"| Input:"+aInput.getDisplayName()+" | Output:"+aOutput.getDisplayName()+" |");
- return this.ourProxy.addSmeltingAndAlloySmeltingRecipe(aInput, aOutput);
- }
-
-}
-
-abstract class LibraryProxy { // can also be interface unless you want to have common code here
- abstract public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aInput, ItemStack aOutput);
-}
-
-class LibProxy1 extends LibraryProxy {
- final Method m1;
-
- public LibProxy1() throws NoSuchMethodException {
- this.m1 = GT_ModHandler.class.getDeclaredMethod("addSmeltingAndAlloySmeltingRecipe", ItemStack.class, ItemStack.class);
- }
-
- @Override
- public boolean addSmeltingAndAlloySmeltingRecipe(final ItemStack aInput, final ItemStack aOutput) {
- try {
- //Logger.INFO("Trying with Gt 5.7/5.8 Method.");
- return (boolean) this.m1.invoke(null, aInput, aOutput);
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
-
-class LibProxy2 extends LibraryProxy {
- final Method m2;
-
- public LibProxy2() throws NoSuchMethodException {
- this.m2 = GT_ModHandler.class.getDeclaredMethod("addSmeltingAndAlloySmeltingRecipe", ItemStack.class, ItemStack.class, boolean.class);
- }
-
- @Override
- public boolean addSmeltingAndAlloySmeltingRecipe(final ItemStack aInput, final ItemStack aOutput) {
- try {
- //Logger.INFO("Trying with Gt 5.9 Method.");
- return (boolean) this.m2.invoke(null, aInput, aOutput, true);
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
- }
-} \ No newline at end of file
+public final class GregtechRecipe {} \ No newline at end of file