get rid of some orphaned classes

This commit is contained in:
Progwml6 committed 2013-12-31 16:56:55 -05:00
1 parent 3c23d27cf7
commit b9cdef8209
11 files changed
+16 -1976

No files matched your search

@@ -1,115 +0,0 @@
package tconstruct.blocks;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.GolemCoreLogic;
import tconstruct.client.block.GolemCoreRender;
import tconstruct.library.TConstructRegistry;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class GolemCoreBlock extends InventoryBlock
{
public GolemCoreBlock(int id)
{
super(id, Material.rock);
this.setCreativeTab(TConstructRegistry.blockTab);
}
public boolean isOpaqueCube ()
{
return false;
}
public boolean renderAsNormalBlock ()
{
return false;
}
public int getRenderType ()
{
return GolemCoreRender.model;
}
@Override
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
{
if (!world.isRemote)
{
GolemCoreLogic logic = (GolemCoreLogic) world.getBlockTileEntity(x, y, z);
if (!logic.isStackInSlot(0))
{
ItemStack stack = player.getCurrentEquippedItem();
stack = player.inventory.decrStackSize(player.inventory.currentItem, 1);
logic.setInventorySlotContents(0, stack);
}
else
{
ItemStack stack = logic.decrStackSize(0, 1);
if (stack != null)
addItemToInventory(player, world, x, y, z, stack);
}
world.markBlockForUpdate(x, y, z);
}
return true;
}
protected void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
{
if (!world.isRemote)
{
EntityItem entityitem = new EntityItem(world, (double) x + 0.5D, (double) y + 0.9325D, (double) z + 0.5D, stack);
world.spawnEntityInWorld(entityitem);
entityitem.onCollideWithPlayer(player);
}
}
public int damageDropped (int meta)
{
return meta;
}
@Override
public Icon getIcon (int side, int meta)
{
return icons[0];
}
@Override
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return true;
}
@Override
public TileEntity createTileEntity (World world, int metadata)
{
return new GolemCoreLogic();
}
@Override
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
{
return null; //Not sure if gui block or not, probably not
}
@Override
public Object getModInstance ()
{
return TConstruct.instance;
}
@Override
public String[] getTextureNames ()
{
return new String[] { "golemcore" };
}
}
File diff suppressed because it is too large. Load diff
@@ -1,146 +0,0 @@
package tconstruct.blocks;
import java.util.Random;
import tconstruct.blocks.logic.GolemPedestalLogic;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class GolemPedestalBlock extends InventoryBlock
{
/*public static int texTop;
public static int texTopp;
public static int texSide;
public static int texBottom;*/
public GolemPedestalBlock(int i)
{
super(i, Material.wood);
/*texTop = ModLoader.addOverride("/terrain.png", "/GGE/pedestaltop.png");
texTopp = ModLoader.addOverride("/terrain.png", "/GGE/pedestaltopp.png");
texSide = ModLoader.addOverride("/terrain.png", "/GGE/pedestalside.png");
texBottom = ModLoader.addOverride("/terrain.png", "/GGE/pedestalbottom.png");*/
}
/*public int getIcon(int i, int j)
{
if (i == 1)
{
return j == 0 ? texTop : texTopp;
}
if (i == 0)
{
return texBottom;
}
if (i == 2 || i == 4)
{
return texSide;
}
else
{
return texSide;
}
}*/
/*public int idDropped(int i, Random random, int j)
{
return super.idDropped(i, random, j);
}*/
/*public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
super.onBlockPlacedBy(world, i, j, k, entityliving);
ItemStack itemstack = ((EntityPlayer)entityliving).getCurrentEquippedItem();
world.setBlockMetadata(i, j, k, itemstack.getItemDamage());
}*/
public void onBlockRemoval (World world, int i, int j, int k)
{
Random random = new Random();
GolemPedestalLogic tileentitygolempedestal = (GolemPedestalLogic) world.getBlockTileEntity(i, j, k);
if (tileentitygolempedestal != null)
{
label0: for (int l = 0; l < tileentitygolempedestal.getSizeInventory(); l++)
{
ItemStack itemstack = tileentitygolempedestal.getStackInSlot(l);
if (itemstack == null)
{
continue;
}
float f = random.nextFloat() * 0.8F + 0.1F;
float f1 = random.nextFloat() * 0.8F + 0.1F;
float f2 = random.nextFloat() * 0.8F + 0.1F;
do
{
if (itemstack.stackSize <= 0)
{
continue label0;
}
int i1 = random.nextInt(21) + 10;
if (i1 > itemstack.stackSize)
{
i1 = itemstack.stackSize;
}
itemstack.stackSize -= i1;
EntityItem entityitem = new EntityItem(world, (float) i + f, (float) j + f1, (float) k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getItemDamage()));
float f3 = 0.05F;
entityitem.motionX = (float) random.nextGaussian() * f3;
entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F;
entityitem.motionZ = (float) random.nextGaussian() * f3;
world.spawnEntityInWorld(entityitem);
} while (true);
}
}
//super.onBlockRemoval(world, i, j, k);
}
public boolean blockActivated (World world, int i, int j, int k, EntityPlayer entityplayer)
{
/*ItemStack itemstack = entityplayer.getCurrentEquippedItem();
if (world.isRemote)
{
return true;
}
if (itemstack == null || itemstack != null && (itemstack.itemID >= 256 || itemstack.itemID == 0 || itemstack.itemID == Block.slowSand.blockID))
{
ModLoader.openGUI(entityplayer, new GuiGolemPedestal(entityplayer.inventory, world, i, j, k));
return true;
}
else
{
return false;
}*/
return false;
}
@Override
public TileEntity createTileEntity (World world, int metadata)
{
return new GolemPedestalLogic();
}
@Override
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
{
// TODO Auto-generated method stub
return null;
}
@Override
public Object getModInstance ()
{
return null;
}
@Override
public String[] getTextureNames ()
{
return null;
}
}
@@ -1,117 +0,0 @@
package tconstruct.blocks.logic;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.world.World;
public class GolemCoreLogic extends InventoryLogic implements IInventory
{
public GolemCoreLogic()
{
super(1);
}
public ItemStack getKey ()
{
return inventory[0];
}
public void setKey (ItemStack itemstack)
{
inventory[0] = itemstack;
onInventoryChanged();
}
public void clear ()
{
inventory[0] = null;
}
public int getSizeInventory ()
{
return 1;
}
public ItemStack getStackInSlot (int slot)
{
return inventory[0];
}
public int getInventoryStackLimit ()
{
return 1;
}
public boolean canInteractWith (EntityPlayer entityplayer)
{
return true;
}
public void openChest ()
{
}
public void closeChest ()
{
}
public boolean isUseableByPlayer (EntityPlayer entityplayer)
{
return true;
}
@Override
public ItemStack getStackInSlotOnClosing (int i)
{
return null;
}
@Override
public boolean isInvNameLocalized ()
{
return false;
}
@Override
public boolean isItemValidForSlot (int i, ItemStack itemstack)
{
return true;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z)
{
return null;
}
@Override
protected String getDefaultName ()
{
return "golems.core";
}
/* Packets */
@Override
public Packet getDescriptionPacket ()
{
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
{
readFromNBT(packet.data);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
}
@@ -1,363 +0,0 @@
package tconstruct.blocks.logic;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
import tconstruct.TConstruct;
public class GolemPedestalLogic extends TileEntity implements IInventory
{
public ItemStack supply;
public static int cost[] = null;
public static int souls[] = null;
public GolemPedestalLogic()
{
supply = null;
if (cost == null)
{
cost = new int[512];
souls = new int[512];
cost[Blocks.planks] = 0;
cost[Blocks.wood] = 32;
cost[Blocks.cloth] = 8;
cost[Blocks.cobblestoneMossy] = 16;
cost[Blocks.obsidian] = 8;
cost[Blocks.pumpkin] = 8;
cost[Blocks.netherrack] = 64;
cost[Blocks.slowSand] = 1;
cost[Blocks.glowStone] = 1;
cost[Blocks.pumpkinLantern] = 8;
cost[Blocks.blockDiamond] = 1;
cost[Blocks.blockGold] = 1;
cost[Blocks.blockIron] = 1;
cost[Blocks.blockLapis] = 1;
cost[Blocks.jukebox] = 1;
cost[Blocks.music] = 1;
cost[Blocks.melon] = 8;
cost[Blocks.torchRedstoneIdle] = 6;
cost[Blocks.torchRedstoneActive] = cost[Blocks.torchRedstoneIdle];
cost[Items.redstone] = 6;
cost[Items.beefRaw] = 8;
cost[Items.beefCooked] = cost[Items.beefRaw];
cost[Items.porkRaw] = cost[Items.beefRaw];
cost[Items.porkCooked] = cost[Items.beefRaw];
cost[Items.enderPearl] = 1;
cost[Items.eyeOfEnder] = 1;
cost[Items.blazeRod] = 2;
cost[Blocks.mushroomBrown] = 16;
cost[Blocks.mushroomRed] = cost[Blocks.mushroomBrown];
cost[Blocks.netherStalk] = 6;
cost[Items.glowstone] = 4;
cost[Items.diamond] = 1;
cost[Items.ingotIron] = 8;
cost[Items.ingotGold] = 2;
cost[Items.reed] = 8;
cost[Items.sugar] = cost[Items.reed];
cost[Items.bucketLava] = 1;
cost[Items.cake] = 1;
cost[Items.bucketMilk] = 1;
cost[Items.wheat] = 32;
cost[Items.bread] = 8;
cost[Blocks.plantYellow] = 32;
cost[Blocks.plantRed] = cost[Blocks.plantYellow];
cost[Blocks.dragonEgg] = 1;
cost[Blocks.tallGrass] = 64;
cost[Blocks.sapling] = 64;
cost[Items.ghastTear] = 8;
cost[Items.goldNugget] = 18;
cost[Items.spiderEye] = 16;
cost[Items.fermentedSpiderEye] = 6;
cost[Items.bowlSoup] = 0;
cost[Items.fishRaw] = 1;
cost[Items.fishCooked] = cost[Items.fishRaw];
cost[Items.magmaCream] = 2;
cost[Items.blazePowder] = 4;
cost[Items.speckledMelon] = 1;
cost[Items.paper] = 8;
cost[Items.book] = 2;
cost[Items.egg] = 4;
cost[Items.slimeBall] = 2;
cost[Items.saddle] = 1;
cost[Items.feather] = 48;
cost[Items.gunpowder] = 16;
cost[Items.appleRed] = 8;
cost[Items.appleGold] = 1;
cost[Items.dyePowder] = 64;
cost[Items.bone] = 2;
cost[Items.rottenFlesh] = 48;
cost[Items.cookie] = 16;
cost[Items.melon] = 32;
cost[Items.chickenCooked] = 8;
cost[Items.chickenRaw] = cost[Items.chickenCooked];
cost[Items.silk] = 64;
cost[Blocks.cactus] = 32;
souls[Blocks.planks] = 0;
souls[Blocks.wood] = 1;
souls[Blocks.cloth] = 1;
souls[Blocks.cobblestoneMossy] = 1;
souls[Blocks.obsidian] = 1;
souls[Blocks.pumpkin] = 1;
souls[Blocks.netherrack] = 1;
souls[Blocks.slowSand] = 1;
souls[Blocks.glowStone] = 2;
souls[Blocks.pumpkinLantern] = 1;
souls[Blocks.blockDiamond] = 27;
souls[Blocks.blockGold] = 2;
souls[Blocks.blockIron] = 2;
souls[Blocks.blockLapis] = 3;
souls[Blocks.jukebox] = 3;
souls[Blocks.music] = 1;
souls[Blocks.melon] = 1;
souls[Blocks.torchRedstoneIdle] = 1;
souls[Blocks.torchRedstoneActive] = souls[Blocks.torchRedstoneIdle];
souls[Items.redstone] = 1;
souls[Items.beefRaw] = 1;
souls[Items.beefCooked] = souls[Items.beefRaw];
souls[Items.porkRaw] = souls[Items.beefRaw];
souls[Items.porkCooked] = souls[Items.beefRaw];
souls[Items.enderPearl] = 1;
souls[Items.eyeOfEnder] = 2;
souls[Items.blazeRod] = 2;
souls[Blocks.mushroomBrown] = 1;
souls[Blocks.mushroomRed] = souls[Blocks.mushroomBrown];
souls[Blocks.netherStalk] = 1;
souls[Items.glowstone] = 1;
souls[Items.diamond] = 3;
souls[Items.ingotIron] = 1;
souls[Items.ingotGold] = 1;
souls[Items.reed] = 1;
souls[Items.sugar] = souls[Items.reed];
souls[Items.bucketLava] = 1;
souls[Items.cake] = 1;
souls[Items.bucketMilk] = 1;
souls[Items.wheat] = 1;
souls[Items.bread] = 1;
souls[Blocks.plantYellow] = 1;
souls[Blocks.plantRed] = souls[Blocks.plantYellow];
souls[Blocks.dragonEgg] = 1;
souls[Blocks.tallGrass] = 1;
souls[Blocks.sapling] = 1;
souls[Items.ghastTear] = 1;
souls[Items.goldNugget] = 1;
souls[Items.spiderEye] = 1;
souls[Items.fermentedSpiderEye] = 1;
souls[Items.bowlSoup] = 1;
souls[Items.fishRaw] = 1;
souls[Items.fishCooked] = souls[Items.fishRaw];
souls[Items.magmaCream] = 1;
souls[Items.blazePowder] = 1;
souls[Items.speckledMelon] = 1;
souls[Items.paper] = 1;
souls[Items.book] = 1;
souls[Items.egg] = 1;
souls[Items.slimeBall] = 1;
souls[Items.saddle] = 1;
souls[Items.feather] = 1;
souls[Items.gunpowder] = 1;
souls[Items.appleRed] = 1;
souls[Items.appleGold] = 3;
souls[Items.dyePowder] = 1;
souls[Items.bone] = 1;
souls[Items.rottenFlesh] = 1;
souls[Items.cookie] = 1;
souls[Items.melon] = 1;
souls[Items.chickenCooked] = 1;
souls[Items.chickenRaw] = souls[Items.chickenCooked];
souls[Items.silk] = 1;
souls[Blocks.cactus] = 1;
}
}
public int getSizeInventory ()
{
return 9;
}
public ItemStack getStackInSlot (int i)
{
if (supply != null && supply.getItem() == null)
{
supply = null;
}
return supply;
}
public boolean subtractSoul (int i)
{
TConstruct.logger.info("SUBTRACT WHY");
if (supply == null || supply.itemID >= 512 || cost[supply] == 0)
{
worldObj.playSoundAtEntity(Minecraft.getMinecraft().thePlayer, "mob.blaze.death", 1.0F, 0.5F);
Minecraft.getMinecraft().thePlayer.addChatMessage("I require more souls...");
return false;
}
int j = cost[supply];
int k = souls[supply];
int l = (supply.stackSize / j) * k;
TConstruct.logger.info((new StringBuilder()).append("Subtracting amt").append(i).append(" s").append(k).append(" c").append(j).append(" ss").append(supply.stackSize).append(" id")
.append(supply.itemID).append(" sa").append(l).append(" calc").append(Math.ceil((double) i / (double) k)).toString());
if (l < i)
{
worldObj.playSoundAtEntity(Minecraft.getMinecraft().thePlayer, "mob.blaze.death", 1.0F, 0.5F);
Minecraft.getMinecraft().thePlayer.addChatMessage("I need more souls...");
return false;
}
supply.stackSize -= Math.ceil((double) i / (double) k) * (double) j;
if (supply.stackSize == 0)
{
supply = null;
}
else if (supply.stackSize < 0)
{
throw new UnsupportedOperationException((new StringBuilder())
.append("If you are getting this error then your golems mod has derped, \nplease contact billythegoat101 on the minecraftforums with the error code: LERN YO MATHS [i")
.append(supply.itemID).append(",ss").append(supply.stackSize).append(",a").append(i).append("]").toString());
}
return true;
}
public ItemStack decrStackSize (int i, int j)
{
if (supply != null && supply.getItem() == null)
{
supply = null;
}
if (supply != null)
{
if (supply.stackSize <= j)
{
ItemStack itemstack = supply;
supply = null;
onInventoryChanged();
return itemstack;
}
ItemStack itemstack1 = supply.splitStack(j);
if (supply.stackSize == 0)
{
supply = null;
}
onInventoryChanged();
return itemstack1;
}
else
{
return null;
}
}
public void setInventorySlotContents (int i, ItemStack itemstack)
{
supply = itemstack;
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
{
itemstack.stackSize = getInventoryStackLimit();
}
if (supply != null && supply.getItem() == null)
{
supply = null;
}
onInventoryChanged();
}
public void writeToNBT (NBTTagCompound nbttagcompound)
{
super.writeToNBT(nbttagcompound);
if (supply == null)
{
supply = new ItemStack(0, 0, 0);
}
NBTTagList nbttaglist = new NBTTagList();
if (supply != null)
{
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) 0);
supply.writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
nbttagcompound.setTag("Items", nbttaglist);
}
public void readFromNBT (NBTTagCompound nbttagcompound)
{
super.readFromNBT(nbttagcompound);
supply = new ItemStack(0, 0, 0);
NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
for (int i = 0; i < nbttaglist.tagCount(); i++)
{
NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(i);
int j = nbttagcompound1.getByte("Slot") & 0xff;
if (j >= 0 && j < 1)
{
supply = ItemStack.loadItemStackFromNBT(nbttagcompound1);
}
}
if (supply != null && supply.getItem() == null)
{
supply = null;
}
}
public String getInvName ()
{
return "golempedestalinv";
}
public int getInventoryStackLimit ()
{
return 64;
}
public boolean canInteractWith (EntityPlayer entityplayer)
{
return true;
}
public void openChest ()
{
}
public void closeChest ()
{
}
public void clear ()
{
supply = null;
}
public boolean isUseableByPlayer (EntityPlayer entityplayer)
{
return true;
}
@Override
public ItemStack getStackInSlotOnClosing (int i)
{
// TODO Auto-generated method stub
return null;
}
@Override
public boolean isInvNameLocalized ()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isItemValidForSlot (int i, ItemStack itemstack)
{
// TODO Auto-generated method stub
return false;
}
}
@@ -19,9 +19,9 @@ import cpw.mods.fml.relauncher.SideOnly;
public class SlimeGel extends TConstructBlock
{
public SlimeGel(int id)
public SlimeGel()
{
super(id, Material.sponge, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" });
super(Material.sponge, 0.5f, new String[] { "slimeblock_blue", "slimeblock_green", "slimeblock_purple" });
setCreativeTab(TConstructRegistry.blockTab);
}
@@ -22,9 +22,9 @@ public class SlimeLeaves extends BlockLeaves
private static final String[] fastLeaves = new String[] { "slimeleaves_blue_fast" };
private static final String[] fancyLeaves = new String[] { "slimeleaves_blue_fancy" };
@SideOnly(Side.CLIENT)
private Icon[] fastIcons;
private IIcon[] fastIcons;
@SideOnly(Side.CLIENT)
private Icon[] fancyIcons;
private IIcon[] fancyIcons;
public SlimeLeaves()
{
@@ -66,7 +66,7 @@ public class SlimeLeaves extends BlockLeaves
}
}
public Icon getIcon (int side, int meta)
public IIcon getIcon (int side, int meta)
{
int tex = meta % 4;
@@ -4,12 +4,13 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFlower;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.IShearable;
@@ -21,11 +22,11 @@ public class SlimeTallGrass extends BlockFlower implements IShearable
{
private static final String[] grassTypes = new String[] { "slimegrass_blue_tall" };
@SideOnly(Side.CLIENT)
private Icon[] iconArray;
private IIcon[] iconArray;
public SlimeTallGrass(int par1)
public SlimeTallGrass()
{
super(par1, Material.vine);
super(Material.vine);
float f = 0.4F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.8F, 0.5F + f);
setCreativeTab(TConstructRegistry.blockTab);
@@ -35,7 +36,7 @@ public class SlimeTallGrass extends BlockFlower implements IShearable
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public Icon getIcon (int side, int meta)
public IIcon getIcon (int side, int meta)
{
/*if (meta >= this.iconArray.length)
{
@@ -73,11 +74,11 @@ public class SlimeTallGrass extends BlockFlower implements IShearable
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
public void getSubBlocks (int par1, CreativeTabs par2CreativeTabs, List par3List)
public void getSubBlocks (Block b, CreativeTabs par2CreativeTabs, List par3List)
{
for (int j = 0; j < 1; ++j)
{
par3List.add(new ItemStack(par1, 1, j));
par3List.add(new ItemStack(b, 1, j));
}
}
@@ -86,9 +87,9 @@ public class SlimeTallGrass extends BlockFlower implements IShearable
* When this method is called, your block should register all the icons it needs with the given IconRegister. This
* is the only chance you get to register icons.
*/
public void registerIcons (IconRegister par1IconRegister)
public void registerIcons (IIconRegister par1IconRegister)
{
this.iconArray = new Icon[grassTypes.length];
this.iconArray = new IIcon[grassTypes.length];
for (int i = 0; i < this.iconArray.length; ++i)
{
@@ -1,60 +0,0 @@
package tconstruct.client.block;
import tconstruct.client.TProxyClient;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.world.IBlockAccess;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class GolemCoreRender implements ISimpleBlockRenderingHandler
{
public static int model = RenderingRegistry.getNextAvailableRenderId();
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
renderer.setRenderBounds(0.0F, 0F, 0.0F, 1.0F, 0.1875F, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.0F, 0.8125F, 0.0F, 1.0F, 1.0F, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.0F, 0.1875F, 0.0F, 0.1875F, 0.8125F, 0.1875F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.8175, 0.1875F, 0.0F, 1f, 0.8125F, 0.1875F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.0F, 0.1875F, 0.8175, 0.1875F, 0.8125F, 1f);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.8175F, 0.1875F, 0.8175, 1f, 0.8125F, 1f);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
}
@Override
public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
{
renderer.setRenderBounds(0.0F, 0F, 0.0F, 1.0F, 0.1875F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.8125F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.1875F, 0.0F, 0.1875F, 0.8125F, 0.1875F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.8175, 0.1875F, 0.0F, 1f, 0.8125F, 0.1875F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.1875F, 0.8175, 0.1875F, 0.8125F, 1f);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.8175F, 0.1875F, 0.8175, 1f, 0.8125F, 1f);
renderer.renderStandardBlock(block, x, y, z);
return true;
}
@Override
public boolean shouldRender3DInInventory ()
{
return true;
}
@Override
public int getRenderId ()
{
return model;
}
}
@@ -1,65 +0,0 @@
package tconstruct.client.block;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import tconstruct.blocks.logic.GolemCoreLogic;
import tconstruct.entity.FancyEntityItem;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/* Special renderer, only used for drawing tools */
@SideOnly(Side.CLIENT)
public class GolemCoreSpecialRender extends TileEntitySpecialRenderer
{
@Override
public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8)
{
this.render((GolemCoreLogic) logic, var2, var4, var6, var8);
}
public void render (GolemCoreLogic logic, double posX, double posY, double posZ, float var8)
{
GL11.glPushMatrix();
float var10 = (float) (posX - 0.5F);
float var11 = (float) (posY - 0.5F);
float var12 = (float) (posZ - 0.5F);
GL11.glTranslatef(var10, var11, var12);
ItemStack stack = logic.getStackInSlot(0);
if (stack != null)
renderItem(logic, stack);
GL11.glPopMatrix();
}
void renderItem (GolemCoreLogic logic, ItemStack stack)
{
FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
entityitem.getEntityItem().stackSize = 1;
entityitem.hoverStart = 0.0F;
GL11.glPushMatrix();
GL11.glTranslatef(1F, 0.675F, 1.0F);
//GL11.glRotatef(90F, 1, 0F, 0F);
GL11.glScalef(1.4F, 1.4F, 1.4F);
if (stack.getItem() instanceof ItemBlock)
{
GL11.glScalef(1.6F, 1.6F, 1.6F);
GL11.glTranslatef(0F, 0.045F, 0.0f);
}
RenderItem.renderInFrame = true;
RenderManager.instance.renderEntityWithPosYaw(entityitem, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
RenderItem.renderInFrame = false;
GL11.glPopMatrix();
}
}
@@ -1,79 +0,0 @@
package tconstruct.client.entity;
import net.minecraft.client.model.ModelPig;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.util.MathHelper;
public class GolemBaseModel extends ModelPig
{
ModelRenderer rightArm;
ModelRenderer leftArm;
public GolemBaseModel()
{
float f = 0.0F;
float f1 = 0.0F;
head = new ModelRenderer(this, 0, 0);
head.addBox(-4F, -8F, -4F, 8, 8, 8, f);
head.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
head.showModel = false;
body = new ModelRenderer(this, 16, 16);
body.addBox(-4F, 0.0F, -2F, 8, 12, 4, f);
body.setRotationPoint(0.0F, 0.0F + f1, 0.0F);
body.showModel = false;
rightArm = new ModelRenderer(this, 40, 16);
rightArm.addBox(-3F, -2F, -2F, 4, 12, 4, f);
rightArm.setRotationPoint(-5F, 2.0F + f1, 0.0F);
leftArm = new ModelRenderer(this, 40, 16);
leftArm.mirror = true;
leftArm.addBox(-1F, -2F, -2F, 4, 12, 4, f);
leftArm.setRotationPoint(5F, 2.0F + f1, 0.0F);
leg3 = new ModelRenderer(this, 0, 16);
leg3.addBox(-2F, 0.0F, -2F, 4, 12, 4, f);
leg3.setRotationPoint(-2F, 12F + f1, 0.0F);
leg4 = new ModelRenderer(this, 0, 16);
leg4.mirror = true;
leg4.addBox(-2F, 0.0F, -2F, 4, 12, 4, f);
leg4.setRotationPoint(2.0F, 12F + f1, 0.0F);
rightArm = new ModelRenderer(this, 40, 16);
rightArm.addBox(-1F, -2F, -1F, 2, 12, 2, f);
rightArm.setRotationPoint(-5F, 2.0F, 0.0F);
rightArm.showModel = false;
leftArm = new ModelRenderer(this, 40, 16);
leftArm.mirror = true;
leftArm.addBox(-1F, -2F, -1F, 2, 12, 2, f);
leftArm.setRotationPoint(5F, 2.0F, 0.0F);
leftArm.showModel = false;
leg3 = new ModelRenderer(this, 0, 16);
leg3.addBox(-1F, 0.0F, -1F, 2, 12, 2, f);
leg3.setRotationPoint(-2F, 12F, 0.0F);
leg3.showModel = false;
leg4 = new ModelRenderer(this, 0, 16);
leg4.mirror = true;
leg4.addBox(-1F, 0.0F, -1F, 2, 12, 2, f);
leg4.setRotationPoint(2.0F, 12F, 0.0F);
leg4.showModel = false;
leg1.showModel = leg2.showModel = false;
}
@Override
public void setRotationAngles (float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
float f6 = 0.0F;
float f7 = 0.0F;
rightArm.rotateAngleZ = 0.0F;
leftArm.rotateAngleZ = 0.0F;
rightArm.rotateAngleY = -(0.1F - f6 * 0.6F) + head.rotateAngleY;
leftArm.rotateAngleY = (0.1F - f6 * 0.6F) + head.rotateAngleY + 0.4F;
rightArm.rotateAngleX = -1.570796F + head.rotateAngleX;
leftArm.rotateAngleX = -1.570796F + head.rotateAngleX;
rightArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
leftArm.rotateAngleX -= f6 * 1.2F - f7 * 0.4F;
rightArm.rotateAngleZ += MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
leftArm.rotateAngleZ -= MathHelper.cos(f2 * 0.09F) * 0.05F + 0.05F;
rightArm.rotateAngleX += MathHelper.sin(f2 * 0.067F) * 0.05F;
leftArm.rotateAngleX -= MathHelper.sin(f2 * 0.067F) * 0.05F;
}
}