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/FishTrap.java1
-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.java134
-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/item/ModItems.java17
-rw-r--r--src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockDoor.java8
-rw-r--r--src/Java/gtPlusPlus/core/item/base/misc/BaseItemParticle.java5
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/IonParticles.java117
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/StandardBaseParticles.java90
-rw-r--r--src/Java/gtPlusPlus/core/item/general/BufferCore.java66
-rw-r--r--src/Java/gtPlusPlus/core/item/general/ItemControlCore.java11
-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/material/Material.java2
-rw-r--r--src/Java/gtPlusPlus/core/material/Particle.java47
-rw-r--r--src/Java/gtPlusPlus/core/proxy/ClientProxy.java6
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java292
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java425
-rw-r--r--src/Java/gtPlusPlus/core/recipe/common/CI.java641
-rw-r--r--src/Java/gtPlusPlus/core/tileentities/ModTileEntities.java6
-rw-r--r--src/Java/gtPlusPlus/core/util/Utils.java5
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java95
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java152
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/gregtech/recipehandlers/GregtechRecipe.java75
33 files changed, 2624 insertions, 562 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/FishTrap.java b/src/Java/gtPlusPlus/core/block/machine/FishTrap.java
index 8e5f8a33f5..b5e78f23ef 100644
--- a/src/Java/gtPlusPlus/core/block/machine/FishTrap.java
+++ b/src/Java/gtPlusPlus/core/block/machine/FishTrap.java
@@ -50,6 +50,7 @@ public class FishTrap extends BlockContainer implements ITileTooltip
{
super(Material.iron);
this.setBlockName("blockFishTrap");
+ this.setHardness(5f);
this.setCreativeTab(AddToCreativeTab.tabMachines);
GameRegistry.registerBlock(this, ItemBlockBasicTile.class, "blockFishTrap");
LanguageRegistry.addName(this, "Fish Catcher");
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..9176dcc720 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -2,13 +2,13 @@ package gtPlusPlus.core.common;
import static gtPlusPlus.core.lib.CORE.DEBUG;
-import cpw.mods.fml.common.event.*;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
+import cpw.mods.fml.common.event.FMLPostInitializationEvent;
+import cpw.mods.fml.common.event.FMLPreInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.registry.GameRegistry;
-
-import net.minecraft.entity.Entity;
-
import gregtech.api.enums.ItemList;
-
import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.minecraft.ChunkManager;
@@ -18,8 +18,15 @@ import gtPlusPlus.core.entity.InternalEntityRegistry;
import gtPlusPlus.core.entity.monster.EntityGiantChickenBase;
import gtPlusPlus.core.entity.monster.EntitySickBlaze;
import gtPlusPlus.core.entity.monster.EntityStaballoyConstruct;
-import gtPlusPlus.core.handler.*;
-import gtPlusPlus.core.handler.events.*;
+import gtPlusPlus.core.handler.BookHandler;
+import gtPlusPlus.core.handler.BurnableFuelHandler;
+import gtPlusPlus.core.handler.COMPAT_HANDLER;
+import gtPlusPlus.core.handler.COMPAT_IntermodStaging;
+import gtPlusPlus.core.handler.GuiHandler;
+import gtPlusPlus.core.handler.events.BlockEventHandler;
+import gtPlusPlus.core.handler.events.GeneralTooltipEventHandler;
+import gtPlusPlus.core.handler.events.PickaxeBlockBreakEventHandler;
+import gtPlusPlus.core.handler.events.ZombieBackupSpawnEventHandler;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
@@ -33,30 +40,20 @@ import gtPlusPlus.core.util.player.PlayerCache;
import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner;
import gtPlusPlus.xmod.eio.handler.HandlerTooltip_EIO;
import gtPlusPlus.xmod.galacticraft.handler.HandlerTooltip_GC;
-import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
+import net.minecraft.entity.Entity;
import net.minecraftforge.common.ForgeChunkManager;
public class CommonProxy {
- public static Meta_GT_Proxy GtProxy;
private boolean mFluidsGenerated = false;