Upload my Code Changes/Format/imports

This commit is contained in:
Alexander committed 2014-02-16 14:23:50 -05:00
1 parent 5bcdb7ca46
commit 5d4e38c0cb
264 files changed
+4014 -3972

No files matched your search

+8 -8
View File
@@ -4,10 +4,8 @@ import mantle.lib.TabTools;
import net.minecraft.world.gen.structure.MapGenStructureIO;
import net.minecraftforge.common.MinecraftForge;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.LoggerConfig;
import tconstruct.achievements.TAchievements;
import tconstruct.client.TControls;
@@ -51,8 +49,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.VillagerRegistry;
import cpw.mods.fml.relauncher.Side;
/** TConstruct, the tool mod.
* Craft your tools with style, then modify until the original is gone!
/**
* TConstruct, the tool mod. Craft your tools with style, then modify until the
* original is gone!
*
* @author mDiyo
*/
@@ -79,13 +79,13 @@ public class TConstruct
@SidedProxy(clientSide = "tconstruct.client.TProxyClient", serverSide = "tconstruct.common.TProxyCommon")
public static TProxyCommon proxy;
//The packet pipeline
// The packet pipeline
public static final PacketPipeline packetPipeline = new PacketPipeline();
public TConstruct()
{
//logger.setParent(FMLCommonHandler.instance().getFMLLogger());
// logger.setParent(FMLCommonHandler.instance().getFMLLogger());
if (Loader.isModLoaded("Natura"))
{
logger.info("Natura, what are we going to do tomorrow night?");
@@ -132,7 +132,7 @@ public class TConstruct
GameRegistry.registerWorldGenerator(new TBaseWorldGenerator(), 0);
MinecraftForge.TERRAIN_GEN_BUS.register(new TerrainGenEventHandler());
GameRegistry.registerFuelHandler(content);
//GameRegistry.registerCraftingHandler(new TCraftingHandler());
// GameRegistry.registerCraftingHandler(new TCraftingHandler());
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
if (PHConstruct.addToVillages)
@@ -155,7 +155,7 @@ public class TConstruct
}
playerTracker = new TPlayerHandler();
//GameRegistry.registerPlayerTracker(playerTracker);
// GameRegistry.registerPlayerTracker(playerTracker);
FMLCommonHandler.instance().bus().register(playerTracker);
if (event.getSide() == Side.CLIENT)
@@ -9,10 +9,10 @@ import net.minecraftforge.common.AchievementPage;
public class TAchievements
{
//Add achievements in here before the load executes(end of TC's init event)
// Add achievements in here before the load executes(end of TC's init event)
public static HashMap<String, Achievement> achievements = new HashMap<String, Achievement>();
//Warning: Will be null until after the init stage
// Warning: Will be null until after the init stage
public static AchievementPage achievementPage = null;
public static void init ()
@@ -52,9 +52,15 @@ public class BlockFalling extends Block
{
if (!p_149830_1_.isRemote)
{
//EntityFallingBlock entityfallingblock = new EntityFallingBlock(p_149830_1_, (double)((float)p_149830_2_ + 0.5F), (double)((float)p_149830_3_ + 0.5F), (double)((float)p_149830_4_ + 0.5F), this, p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_, p_149830_4_));
//this.func_149829_a(entityfallingblock);
//p_149830_1_.spawnEntityInWorld(entityfallingblock);
// EntityFallingBlock entityfallingblock = new
// EntityFallingBlock(p_149830_1_,
// (double)((float)p_149830_2_ + 0.5F),
// (double)((float)p_149830_3_ + 0.5F),
// (double)((float)p_149830_4_ + 0.5F), this,
// p_149830_1_.getBlockMetadata(p_149830_2_, p_149830_3_,
// p_149830_4_));
// this.func_149829_a(entityfallingblock);
// p_149830_1_.spawnEntityInWorld(entityfallingblock);
}
}
else
@@ -97,9 +103,10 @@ public class BlockFalling extends Block
}
else
{
//TODO: King, take a look here when doing liquids!
//Material material = block.blockMaterial;
//return material == Material.water ? true : material == Material.lava;
// TODO: King, take a look here when doing liquids!
// Material material = block.blockMaterial;
// return material == Material.water ? true : material ==
// Material.lava;
return false;
}
}
@@ -1,26 +1,44 @@
package tconstruct.blocks;
import static net.minecraftforge.common.util.ForgeDirection.*;
import static net.minecraftforge.common.util.ForgeDirection.DOWN;
import static net.minecraftforge.common.util.ForgeDirection.EAST;
import static net.minecraftforge.common.util.ForgeDirection.NORTH;
import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
import static net.minecraftforge.common.util.ForgeDirection.UP;
import static net.minecraftforge.common.util.ForgeDirection.WEST;
import java.util.Iterator;
import java.util.List;
import java.util.Random;
import java.util.*;
import mantle.blocks.BlockUtils;
import mantle.world.WorldHelper;
import net.minecraft.block.*;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.BlockPressurePlate.Sensitivity;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.*;
import net.minecraft.entity.item.*;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.item.EntityTNTPrimed;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.*;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.world.*;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.*;
import tconstruct.blocks.logic.LandmineExplodeLogic;
import tconstruct.blocks.logic.TileEntityLandmine;
import tconstruct.client.block.RenderLandmine;
import tconstruct.common.TProxyCommon;
import tconstruct.util.landmine.Helper;
@@ -33,7 +51,8 @@ import tconstruct.util.landmine.Helper;
public class BlockLandmine extends BlockContainer
{
// Should explode when broken instead of dropping items(may not actually work
// Should explode when broken instead of dropping items(may not actually
// work
boolean explodeOnBroken = false;
public BlockLandmine()
@@ -445,7 +464,7 @@ public class BlockLandmine extends BlockContainer
TileEntityLandmine te = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4);
Sensitivity triggerType;
// Change to return 1 if you want the landmine to blow up when the block
// holding it is broken
if (te == null)
@@ -509,7 +528,9 @@ public class BlockLandmine extends BlockContainer
protected AxisAlignedBB getSensitiveAABB (World par1World, int par2, int par3, int par4)
{
float f = 0.125F;
// return AxisAlignedBB.getAABBPool().getAABB((double)((float)par1 + f), (double)par2, (double)((float)par3 + f), (double)((float)(par1 + 1) - f), (double)par2 + 0.25D, (double)((float)(par3 + 1) - f));
// return AxisAlignedBB.getAABBPool().getAABB((double)((float)par1 + f),
// (double)par2, (double)((float)par3 + f), (double)((float)(par1 + 1) -
// f), (double)par2 + 0.25D, (double)((float)(par3 + 1) - f));
int l = par1World.getBlockMetadata(par2, par3, par4);
int i1 = l & 7;
@@ -543,7 +564,7 @@ public class BlockLandmine extends BlockContainer
TileEntityLandmine te = (TileEntityLandmine) par1World.getTileEntity(par2, par3, par4);
Sensitivity triggerType;
// Change to return 1 if you want the landmine to blow up when the
// block holding it is broken
if (te == null)
@@ -639,16 +660,17 @@ public class BlockLandmine extends BlockContainer
this.setBlockBounds(0.0F, 0.0625F, 0.0625F, 0.0625F, 1.0F - 0.0625F, 1.0F - 0.0625F);
break;
default:
this.setBlockBounds(0, 0, 0, 1, 1, 1);
break;
this.setBlockBounds(0, 0, 0, 1, 1, 1);
break;
}
}
@Override
public int damageDropped (int par1){
return par1;
public int damageDropped (int par1)
{
return par1;
}
@Override
public Item getItemDropped (int par1, Random par2Random, int par3)
{
@@ -41,10 +41,10 @@ public class CastingChannelBlock extends BlockContainer
}
else
{
//int amount = 0;
//if (tile.getFluid() != null)
//amount = tile.getLiquidAmount();
//player.addChatMessage("LiquidAmount: " + amount);
// int amount = 0;
// if (tile.getFluid() != null)
// amount = tile.getLiquidAmount();
// player.addChatMessage("LiquidAmount: " + amount);
tile.setActive(true);
}
}
@@ -29,7 +29,7 @@ public class CraftingStationBlock extends InventoryBlock
this.stepSound = Block.soundTypeWood;
}
//Block.hasComparatorInputOverride and Block.getComparatorInputOverride
// Block.hasComparatorInputOverride and Block.getComparatorInputOverride
/* Rendering */
@Override
+41 -96
View File
@@ -254,105 +254,50 @@ public class DryingRack extends InventoryBlock
return new DryingRackLogic();
}
/*@Override
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
return true;
}*/
/*
* @Override public boolean shouldSideBeRendered (IBlockAccess
* par1IBlockAccess, int par2, int par3, int par4, int par5) { return true;
* }
*/
/*@Override
public void getSubBlocks (int id, CreativeTabs tab, List list)
{
for (int iter = 0; iter < 3; iter++)
{
list.add(new ItemStack(id, 1, iter));
}
}*/
/*
* @Override public void getSubBlocks (int id, CreativeTabs tab, List list)
* { for (int iter = 0; iter < 3; iter++) { list.add(new ItemStack(id, 1,
* iter)); } }
*/
/*@Override
public void setBlockBoundsBasedOnState (IBlockAccess world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta != 1)
{
this.setBlockBounds(0, 0, 0, 1, 1, 1);
}
else
{
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
float xMin = 0.25F;
float xMax = 0.75F;
float zMin = 0.25F;
float zMax = 0.75F;
/*
* @Override public void setBlockBoundsBasedOnState (IBlockAccess world, int
* x, int y, int z) { int meta = world.getBlockMetadata(x, y, z); if (meta
* != 1) { this.setBlockBounds(0, 0, 0, 1, 1, 1); } else { FaucetLogic logic
* = (FaucetLogic) world.getBlockTileEntity(x, y, z); float xMin = 0.25F;
* float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F;
*
* switch (logic.getRenderDirection()) { case 2: zMin = 0.625F; zMax = 1.0F;
* break; case 3: zMax = 0.375F; zMin = 0F; break; case 4: xMin = 0.625F;
* xMax = 1.0F; break; case 5: xMax = 0.375F; xMin = 0F; break; }
*
* this.setBlockBounds(xMin, 0.25F, zMin, xMax, 0.625F, zMax); } }
*/
switch (logic.getRenderDirection())
{
case 2:
zMin = 0.625F;
zMax = 1.0F;
break;
case 3:
zMax = 0.375F;
zMin = 0F;
break;
case 4:
xMin = 0.625F;
xMax = 1.0F;
break;
case 5:
xMax = 0.375F;
xMin = 0F;
break;
}
this.setBlockBounds(xMin, 0.25F, zMin, xMax, 0.625F, zMax);
}
}*/
/*@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
if (meta != 1)
{
return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1, z + 1);
}
else
{
FaucetLogic logic = (FaucetLogic) world.getBlockTileEntity(x, y, z);
if (logic != null)
{
float xMin = 0.25F;
float xMax = 0.75F;
float zMin = 0.25F;
float zMax = 0.75F;
switch (logic.getRenderDirection())
{
case 2:
zMin = 0.625F;
zMax = 1.0F;
break;
case 3:
zMax = 0.375F;
zMin = 0F;
break;
case 4:
xMin = 0.625F;
xMax = 1.0F;
break;
case 5:
xMax = 0.375F;
xMin = 0F;
break;
}
return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin), (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x + xMax), (double) y + 0.625, (double) ((float) z + zMax));
}
}
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}*/
/*
* @Override public AxisAlignedBB getCollisionBoundingBoxFromPool (World
* world, int x, int y, int z) { int meta = world.getBlockMetadata(x, y, z);
* if (meta != 1) { return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x +
* 1, y + 1, z + 1); } else { FaucetLogic logic = (FaucetLogic)
* world.getBlockTileEntity(x, y, z); if (logic != null) { float xMin =
* 0.25F; float xMax = 0.75F; float zMin = 0.25F; float zMax = 0.75F;
*
* switch (logic.getRenderDirection()) { case 2: zMin = 0.625F; zMax = 1.0F;
* break; case 3: zMax = 0.375F; zMin = 0F; break; case 4: xMin = 0.625F;
* xMax = 1.0F; break; case 5: xMax = 0.375F; xMin = 0F; break; }
*
* return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + xMin),
* (double) y + 0.25, (double) ((float) z + zMin), (double) ((float) x +
* xMax), (double) y + 0.625, (double) ((float) z + zMax)); } }
*
* return super.getCollisionBoundingBoxFromPool(world, x, y, z); }
*/
/* Redstone */
}
@@ -33,7 +33,7 @@ public class EquipBlock extends InventoryBlock
super(material);
this.setHardness(0.3f);
this.setBlockBounds(0, 0, 0, 1, 0.25f, 1);
//this.setCreativeTab(ToolConstruct.materialTab);
// this.setCreativeTab(ToolConstruct.materialTab);
}
@Override
@@ -50,7 +50,8 @@ public class EquipBlock extends InventoryBlock
@SideOnly(Side.CLIENT)
public void registerBlockIcons (IIconRegister par1IconRegister)
{
//this.blockIcon = par1iconRegister.registerIcon(Block.blockIron.getUnlocalizedName());
// this.blockIcon =
// par1iconRegister.registerIcon(Block.blockIron.getUnlocalizedName());
}
@Override
@@ -11,7 +11,8 @@ import net.minecraft.world.World;
import tconstruct.library.TConstructRegistry;
import tconstruct.util.config.PHConstruct;
/** @author fuj1n
/**
* @author fuj1n
*
*/
@@ -32,7 +33,7 @@ public class GlassBlockConnected extends MantleBlock
this.setCreativeTab(TConstructRegistry.blockTab);
}
//For FMP support
// For FMP support
public IIcon[] getIcons ()
{
return icons;
@@ -58,11 +59,18 @@ public class GlassBlockConnected extends MantleBlock
/**
* This is checked to see if the texture should connect to this block
* @param par2 x
* @param par3 y
* @param par4 z
* @param par5 ID this block is asking to connect to (may be 0 if there is no block)
* @param par6 Metadata of the block this block is trying to connect to
*
* @param par2
* x
* @param par3
* y
* @param par4
* z
* @param par5
* ID this block is asking to connect to (may be 0 if there is no
* block)
* @param par6
* Metadata of the block this block is trying to connect to
* @return true if should connect
*/
public boolean shouldConnectToBlock (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, Block par5, int par6)
@@ -12,8 +12,9 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import tconstruct.util.config.PHConstruct;
/** @author fuj1n
*
/**
* @author fuj1n
*
*/
public class GlassBlockConnectedMeta extends GlassBlockConnected
@@ -686,11 +686,11 @@ public class GlassPaneConnected extends GlassBlockConnected
@Override
public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
{
// if(par5 == 0 || par5 == 1){
// return par1IBlockAccess.getBlock(par2, par3, par4) != this.blockID;
// }else{
// return true;
// }
// if(par5 == 0 || par5 == 1){
// return par1IBlockAccess.getBlock(par2, par3, par4) != this.blockID;
// }else{
// return true;
// }
return true;
}
}
@@ -10,7 +10,7 @@ public class GlassPaneStained extends PaneBase
public GlassPaneStained()
{
super(Material.glass, "glass/", assembleBlockTextures());
//TODO setHardness
// TODO setHardness
this.setHardness(0.3F);
this.stepSound = soundTypeGlass;
this.setBlockName("tconstruct.glasspanestained");
@@ -22,7 +22,7 @@ public class GravelOre extends BlockFalling
super();
this.setCreativeTab(TConstructRegistry.blockTab);
this.stepSound = soundTypeGravel;
//this.blockMaterial = Material.craftedSnow;
// this.blockMaterial = Material.craftedSnow;
}
@Override
@@ -54,15 +54,17 @@ public class GravelOre extends BlockFalling
@Override
public int damageDropped (int meta)
{
/*if (meta == 1)
return 0;*/
/*
* if (meta == 1) return 0;
*/
return meta;
}
public Block idDropped (int par1, Random par2Random, int par3)
{
/*if (par1 == 1)
return Item.goldNugget.itemID;*/
/*
* if (par1 == 1) return Item.goldNugget.itemID;
*/
return this;
}
@@ -22,7 +22,6 @@ import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.LavaTankLogic;
import tconstruct.client.block.TankRender;
import tconstruct.library.TConstructRegistry;
@@ -91,11 +90,11 @@ public class LavaTankBlock extends BlockContainer
@Override
public boolean shouldSideBeRendered (IBlockAccess world, int x, int y, int z, int side)
{
//if (side == 0 && world.getBlockMetadata(x, y, z) == 0)
//return super.shouldSideBeRendered(world, x, y, z, side);
// if (side == 0 && world.getBlockMetadata(x, y, z) == 0)
// return super.shouldSideBeRendered(world, x, y, z, side);
Block bID = world.getBlock(x, y, z);
return bID == this ? false : super.shouldSideBeRendered(world, x, y, z, side);
//return true;
// return true;
}
@Override
@@ -107,11 +106,9 @@ public class LavaTankBlock extends BlockContainer
return 0;
}
/*@Override
public int getRenderBlockPass()
{
return 1;
}*/
/*
* @Override public int getRenderBlockPass() { return 1; }
*/
@Override
public int getRenderType ()
@@ -159,38 +156,10 @@ public class LavaTankBlock extends BlockContainer
@Override
public boolean onBlockActivated (World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9)
{
/**ItemStack current = entityplayer.inventory.getCurrentItem();
if (current != null)
{
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
LavaTankLogic tank = (LavaTankLogic) world.getTileEntity(i, j, k);
if (liquid != null)
{
int qty = tank.fill(ForgeDirection.UNKNOWN, liquid, true);
if (qty != 0 && !entityplayer.capabilities.isCreativeMode)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, consumeItem(current));
}
return true;
}
else
{
}
}*/
ItemStack current = entityplayer.inventory.getCurrentItem();
if (current != null)
{
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
//FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
TConstruct.logger.error(liquid);
LavaTankLogic logic = (LavaTankLogic) world.getTileEntity(i, j, k);
if (liquid != null)
{
@@ -208,7 +177,7 @@ public class LavaTankBlock extends BlockContainer
else if (FluidContainerRegistry.isBucket(current))
{
FluidTankInfo[] tanks = logic.getTankInfo(ForgeDirection.UNKNOWN);
FluidStack fillFluid = tanks[0].fluid;//getFluid();
FluidStack fillFluid = tanks[0].fluid;// getFluid();
ItemStack fillStack = FluidContainerRegistry.fillFluidContainer(fillFluid, current);
if (fillStack != null)
{
+24 -25
View File
@@ -24,7 +24,7 @@ public class MeatBlock extends BlockWood
{
this.setHardness(1.0F);
this.setStepSound(Block.soundTypeWood);
//setBurnProperties(this.blockID, 5, 20);
// setBurnProperties(this.blockID, 5, 20);
this.setCreativeTab(TConstructRegistry.blockTab);
}
@@ -36,7 +36,7 @@ public class MeatBlock extends BlockWood
int orientation = metadata / 4;
switch (orientation)
//Ends of logs
// Ends of logs
{
case 0:
if (side == 0 || side == 1)
@@ -73,7 +73,8 @@ public class MeatBlock extends BlockWood
}
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
* ejects contained items into the world, and notifies neighbours of an
* update, as appropriate
*/
public void breakBlock (World par1World, int par2, int par3, int par4, int par5, int par6)
{
@@ -101,7 +102,8 @@ public class MeatBlock extends BlockWood
}
/**
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z,
* side, hitX, hitY, hitZ, block metadata
*/
public int onBlockPlaced (World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
@@ -127,7 +129,8 @@ public class MeatBlock extends BlockWood
}
/**
* Determines the damage on the item the block drops. Used in cloth and wood.
* Determines the damage on the item the block drops. Used in cloth and
* wood.
*/
public int damageDropped (int par1)
{
@@ -152,16 +155,12 @@ public class MeatBlock extends BlockWood
return false;
}
/*public void onBlockHarvested (World world, int x, int y, int z, int meta, EntityPlayer player)
{
if (meta % 4 == 1)
{
if (world.difficultySetting > 2)
world.createExplosion(null, x, y, z, 1.75f, false);
else
world.createExplosion(null, x, y, z, 2f, false);
}
}*/
/*
* public void onBlockHarvested (World world, int x, int y, int z, int meta,
* EntityPlayer player) { if (meta % 4 == 1) { if (world.difficultySetting >
* 2) world.createExplosion(null, x, y, z, 1.75f, false); else
* world.createExplosion(null, x, y, z, 2f, false); } }
*/
@SideOnly(Side.CLIENT)
@Override
@@ -171,17 +170,17 @@ public class MeatBlock extends BlockWood
par3List.add(new ItemStack(b, 1, i));
}
// @Override
// public boolean canSustainLeaves (World world, int x, int y, int z)
// {
// return true;
// }
// @Override
// public boolean canSustainLeaves (World world, int x, int y, int z)
// {
// return true;
// }
//
// @Override
// public boolean isWood (World world, int x, int y, int z)
// {
// return true;
// }
// @Override
// public boolean isWood (World world, int x, int y, int z)
// {
// return true;
// }
public boolean isBeaconBase (World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ)
{
@@ -22,7 +22,7 @@ public class MetalOre extends TConstructBlock
return 10f;
else
return 3f;
//return this.blockHardness;
// return this.blockHardness;
}
@Override
@@ -110,7 +110,7 @@ public class MultiBrick extends TConstructBlock
}
}
//TODO getCollisionBoundingBoxFromPool
// TODO getCollisionBoundingBoxFromPool
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z)
{
@@ -120,11 +120,9 @@ public class MultiBrick extends TConstructBlock
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}
/*@Override
public int getRenderType ()
{
return BrickRender.model;
}*/
/*
* @Override public int getRenderType () { return BrickRender.model; }
*/
@Override
public boolean isNormalCube (IBlockAccess world, int x, int y, int z)
@@ -22,7 +22,7 @@ public class MultiBrickFancy extends TConstructBlock
super(Material.rock, 3f, blockTextures);
}
//TODO getBlockHardness
// TODO getBlockHardness
@Override
public float getBlockHardness (World world, int x, int y, int z)
{
@@ -104,7 +104,7 @@ public class MultiBrickFancy extends TConstructBlock
}
}
//TODO onEntityCollidedWithBlock
// TODO onEntityCollidedWithBlock
@Override
public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity)
{
@@ -126,11 +126,9 @@ public class MultiBrickFancy extends TConstructBlock
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}
/*@Override
public int getRenderType ()
{
return BrickRender.model;
}*/
/*
* @Override public int getRenderType () { return BrickRender.model; }
*/
@Override
public boolean isNormalCube (IBlockAccess world, int x, int y, int z)
@@ -138,14 +136,14 @@ public class MultiBrickFancy extends TConstructBlock
return world.getBlockMetadata(x, y, z) != 8;
}
//TODO canProvidePower
// TODO canProvidePower
@Override
public boolean canProvidePower ()
{
return false;
}
//TODO isProvindingWeakPower
// TODO isProvindingWeakPower
@Override
public int isProvidingWeakPower (IBlockAccess world, int x, int y, int z, int side)
{
@@ -199,8 +199,9 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
@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)
return false;*/
/*
* if (world.isRemote) return false;
*/
int meta = world.getBlockMetadata(x, y, z);
if (meta >= 12)
@@ -258,7 +259,8 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
return;
}
if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= 8)
if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <=
// 8)
{
if (world.getFullBlockLightValue(x, y, z) < 10)
{
@@ -268,10 +270,10 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
world.setBlock(x, y, z, this, meta + 4, 3);
}
}
/*else if (meta < 8)
{
world.setBlock(x, y, z, blockID, meta + 4, 3);
}*/
/*
* else if (meta < 8) { world.setBlock(x, y, z, blockID, meta + 4,
* 3); }
*/
}
}
@@ -290,7 +292,8 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
}
/**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
* returns a list of items with the same ID, but different meta (eg: dye
* returns 16 items)
*/
@SideOnly(Side.CLIENT)
@Override
@@ -23,7 +23,8 @@ public class OreberryBushEssence extends OreberryBush implements IPlantable
return;
}
if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= 8)
if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <=
// 8)
{
int meta = world.getBlockMetadata(x, y, z);
if (world.getFullBlockLightValue(x, y, z) < 10 || meta % 4 == 1)
@@ -33,18 +34,19 @@ public class OreberryBushEssence extends OreberryBush implements IPlantable
world.setBlock(x, y, z, (Block) this, meta + 4, 3);
}
}
/*else if (meta < 8)
{
world.setBlock(x, y, z, blockID, meta + 4, 3);
}*/
/*
* else if (meta < 8) { world.setBlock(x, y, z, blockID, meta + 4,
* 3); }
*/
}
}
public boolean canPlaceBlockAt (World world, int x, int y, int z)
{
return true;
/*if (world.getFullBlockLightValue(x, y, z) < 13)
return super.canPlaceBlockAt(world, x, y, z);
return false;*/
/*
* if (world.getFullBlockLightValue(x, y, z) < 13) return
* super.canPlaceBlockAt(world, x, y, z); return false;
*/
}
}
@@ -182,12 +182,12 @@ public class SearedBlock extends InventoryBlock
public void addItemToInventory (EntityPlayer player, World world, int x, int y, int z, ItemStack stack)
{
AbilityHelper.spawnItemAtPlayer(player, 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);
}*/
/*
* 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); }
*/
}
/* Rendering */
@@ -211,7 +211,7 @@ public class SearedBlock extends InventoryBlock
return textureNames;
}
//TODO getIcon
// TODO getIcon
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
@@ -17,7 +17,7 @@ public class SearedSlab extends SlabBase
{
public SearedSlab()
{
//TODO material.rock
// TODO material.rock
super(Material.rock);
this.setCreativeTab(TConstructRegistry.blockTab);
setHardness(12F);
@@ -96,7 +96,7 @@ public class SmelteryBlock extends InventoryBlock
TileEntity logic = world.getTileEntity(x, y, z);
short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0;
int meta = world.getBlockMetadata(x, y, z);
if (meta == 0) //Smeltery
if (meta == 0) // Smeltery
{
if (side == direction)
{
@@ -114,7 +114,7 @@ public class SmelteryBlock extends InventoryBlock
return icons[0];
}
}
if (meta == 1) //Drain
if (meta == 1) // Drain
{
if (side == direction)
return icons[5];
@@ -136,11 +136,9 @@ public class SmelteryBlock extends InventoryBlock
}
/*@Override
public int getRenderBlockPass()
{
return 1;
}*/
/*
* @Override public int getRenderBlockPass() { return 1; }
*/
public int damageDropped (int meta)
{
@@ -155,7 +153,7 @@ public class SmelteryBlock extends InventoryBlock
@Override
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
{
//return -1;
// return -1;
return TConstruct.proxy.smelteryGuiID;
}
@@ -221,7 +219,7 @@ public class SmelteryBlock extends InventoryBlock
}
else
{
//world.markBlockForUpdate(x, y, z);
// world.markBlockForUpdate(x, y, z);
player.openGui(getModInstance(), integer, world, x, y, z);
return true;
}
@@ -244,7 +242,7 @@ public class SmelteryBlock extends InventoryBlock
else
return new SmelteryDrainLogic();
case 3:
return null; //Furnace
return null; // Furnace
}
return new MultiServantLogic();
}
@@ -263,11 +261,11 @@ public class SmelteryBlock extends InventoryBlock
logic.checkValidPlacement();
}
/*@Override
public void breakBlock (World world, int x, int y, int z, int par5, int par6) //Don't drop inventory
{
world.removeBlockTileEntity(x, y, z);
}*/
/*
* @Override public void breakBlock (World world, int x, int y, int z, int
* par5, int par6) //Don't drop inventory { world.removeBlockTileEntity(x,
* y, z); }
*/
@Override
public void getSubBlocks (Item id, CreativeTabs tab, List list)
@@ -283,7 +281,7 @@ public class SmelteryBlock extends InventoryBlock
@Override
public void onNeighborBlockChange (World world, int x, int y, int z, Block nBlockID)
{
//System.out.println("Neighbor changed");
// System.out.println("Neighbor changed");
TileEntity logic = world.getTileEntity(x, y, z);
if (logic instanceof IServantLogic)
{
@@ -61,12 +61,10 @@ public class SoilBlock extends TConstructBlock
return Blocks.soul_sand.getCollisionBoundingBoxFromPool(world, x, y, z);
}
/*public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
{
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (world.getBlockMetadata(x, y, z) >= 3)
{
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.875F, 1.0F);
}
}*/
/*
* public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y,
* int z) { this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); if
* (world.getBlockMetadata(x, y, z) >= 3) { this.setBlockBounds(0.0F, 0.0F,
* 0.0F, 1.0F, 0.875F, 1.0F); } }
*/
}
@@ -38,7 +38,7 @@ public class SoilSlab extends SlabBase
switch (meta % 8)
{
case 0:
return this.blockIcon;//Block.grass.getIcon(1, 0);
return this.blockIcon;// Block.grass.getIcon(1, 0);
case 1:
return Blocks.dirt.getIcon(side, 0);
case 2:
@@ -70,9 +70,9 @@ public class SoilSlab extends SlabBase
@SideOnly(Side.CLIENT)
public int getRenderColor (int par1)
{
//if (par1 % 8 == 0)
// if (par1 % 8 == 0)
return this.getBlockColor();
//return 0xFFFFFF;
// return 0xFFFFFF;
}
@Override
@@ -19,7 +19,7 @@ public class SpeedBlock extends TConstructBlock
public SpeedBlock()
{
super(Material.rock, 3.0f, textureNames);
//this.setBlockBounds(0f, 0f, 0f, 1.0f, 0.5f, 1.0f);
// this.setBlockBounds(0f, 0f, 0f, 1.0f, 0.5f, 1.0f);
}
@Override
+19 -13
View File
@@ -30,8 +30,8 @@ public class StoneTorch extends MantleBlock
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
* Returns a bounding box from the pool of bounding boxes (this means this
* box can change after the pool has been cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool (World par1World, int par2, int par3, int par4)
{
@@ -39,8 +39,9 @@ public class StoneTorch extends MantleBlock
}
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
* or not to render the shared face of two adjacent blocks and also whether
* the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube ()
{
@@ -48,7 +49,8 @@ public class StoneTorch extends MantleBlock
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
* If this block doesn't render as an ordinary block it will return False
* (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock ()
{
@@ -80,7 +82,8 @@ public class StoneTorch extends MantleBlock
}
/**
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
* Checks to see if its valid to put this block at the specified
* coordinates. Args: world, x, y, z
*/
public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
{
@@ -89,7 +92,8 @@ public class StoneTorch extends MantleBlock
}
/**
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z,
* side, hitX, hitY, hitZ, block metadata
*/
public int onBlockPlaced (World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
@@ -154,8 +158,9 @@ public class StoneTorch extends MantleBlock
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
* Lets the block know when one of its neighbor changes. Doesn't know which
* neighbor changed (coordinates passed are their own) Args: x, y, z,
* neighbor blockID
*/
public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5)
{
@@ -211,8 +216,9 @@ public class StoneTorch extends MantleBlock
}
/**
* Tests if the block can remain at its current location and will drop as an item if it is unable to stay. Returns
* True if it can stay and False if it drops. Args: world, x, y, z
* Tests if the block can remain at its current location and will drop as an
* item if it is unable to stay. Returns True if it can stay and False if it
* drops. Args: world, x, y, z
*/
protected boolean dropTorchIfCantStay (World par1World, int par2, int par3, int par4)
{
@@ -233,8 +239,8 @@ public class StoneTorch extends MantleBlock
}
/**
* Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. Args: world,
* x, y, z, startVec, endVec
* Ray traces through the blocks collision from start vector to end vector
* returning a ray trace hit. Args: world, x, y, z, startVec, endVec
*/
public MovingObjectPosition collisionRayTrace (World par1World, int par2, int par3, int par4, Vec3 par5Vec3, Vec3 par6Vec3)
{
@@ -62,7 +62,7 @@ public class TConstructBlock extends MantleBlock
return 1;
}
//TODO getSubBlocks
// TODO getSubBlocks
@Override
public void getSubBlocks (Item block, CreativeTabs tab, List list)
{
@@ -18,7 +18,7 @@ public class TConstructFluid extends BlockFluidClassic
{
super(fluid, material);
this.texture = texture;
//TODO setCreativeTab()
// TODO setCreativeTab()
this.setCreativeTab(TConstructRegistry.blockTab);
}
@@ -34,7 +34,7 @@ public class TConstructFluid extends BlockFluidClassic
return alpha ? 1 : 0;
}
//TODO registerBlockIcons
// TODO registerBlockIcons
@Override
public void registerBlockIcons (IIconRegister iconRegister)
{
@@ -42,7 +42,7 @@ public class TConstructFluid extends BlockFluidClassic
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
}
//TODO getIcon()
// TODO getIcon()
@Override
public IIcon getIcon (int side, int meta)
{
@@ -2,16 +2,6 @@ package tconstruct.blocks;
import java.util.List;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.PartBuilderLogic;
import tconstruct.blocks.logic.PatternChestLogic;
import tconstruct.blocks.logic.StencilTableLogic;
import tconstruct.blocks.logic.ToolStationLogic;
import tconstruct.client.block.TableRender;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import tconstruct.util.config.PHConstruct;
import mantle.blocks.abstracts.InventoryBlock;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -26,6 +16,15 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import tconstruct.TConstruct;
import tconstruct.blocks.logic.PartBuilderLogic;
import tconstruct.blocks.logic.PatternChestLogic;
import tconstruct.blocks.logic.StencilTableLogic;
import tconstruct.blocks.logic.ToolStationLogic;
import tconstruct.client.block.TableRender;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
import tconstruct.util.config.PHConstruct;
public class ToolStationBlock extends InventoryBlock
{
@@ -37,7 +36,7 @@ public class ToolStationBlock extends InventoryBlock
this.setStepSound(Block.soundTypeWood);
}
//Block.hasComparatorInputOverride and Block.getComparatorInputOverride
// Block.hasComparatorInputOverride and Block.getComparatorInputOverride
/* Rendering */
@Override
@@ -151,8 +150,9 @@ public class ToolStationBlock extends InventoryBlock
return new StencilTableLogic();
case 13:
return new StencilTableLogic();
/*case 14:
return new CastingTableLogic();*/
/*
* case 14: return new CastingTableLogic();
*/
default:
return null;
}
@@ -171,7 +171,7 @@ public class ToolStationBlock extends InventoryBlock
else
return 3;
//return -1;
// return -1;
}
@Override
@@ -43,8 +43,9 @@ public class SmelteryComponent extends LogicComponent
public void update ()
{
/*if (useTime > 0 && inUse)
useTime -= 3;*/
/*
* if (useTime > 0 && inUse) useTime -= 3;
*/
if (activeTemps.length == 0)
inUse = false;
@@ -122,7 +122,7 @@ public class SmelteryScan extends TankLayerScan
}
}
//Sync lava tanks for fuel values
// Sync lava tanks for fuel values
@Override
public void readNetworkNBT (NBTTagCompound tags)
{
@@ -16,7 +16,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandler, IFacingLogic//, ISwitchableMaster
public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandler, IFacingLogic// , ISwitchableMaster
{
byte direction;
@@ -50,7 +50,7 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
// TConstruct.logger.info("Found master");
// TConstruct.logger.info("Found master");
return smeltery.drain(from, maxDrain, doDrain);
}
return null;
@@ -138,7 +138,8 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
{
if (!worldObj.isRemote)
{
//System.out.println("Notifying of change from "+new CoordTuple(x, y, z));
// System.out.println("Notifying of change from "+new CoordTuple(x,
// y, z));
recheckStructure = true;
}
}
@@ -294,21 +295,22 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
static final int pixelLayer = 162;
//Do the Monster Mash~
// Do the Monster Mash~
public void distributeFluids ()
{
//Calculate liquids in each block
// Calculate liquids in each block
int size = structure.getAirLayerSize();
//HashMap<CoordTuple, LiquidDataInstance> blocks = new HashMap<CoordTuple, LiquidDataInstance>();
// HashMap<CoordTuple, LiquidDataInstance> blocks = new
// HashMap<CoordTuple, LiquidDataInstance>();
for (FluidStack fluid : multitank.fluidlist)
{
//Base calculations per liquid
// Base calculations per liquid
LiquidData data = new LiquidData(fluid.amount, size);
int baseY = structure.airCoords.get(0).y;
int layerSize = structure.getAirLayerSize();
//Calculate where to distribute liquids
// Calculate where to distribute liquids
for (int i = 0; i < structure.airCoords.size(); i++)
{
LiquidDataInstance instance;
@@ -326,32 +328,35 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
instance = airUpdates.get(coord);
}
if (instance.openLayers() > 0) //This is capable of sending negative liquid sizes to blocks without the stopgap check
if (instance.openLayers() > 0) // This is capable of sending
// negative liquid sizes to
// blocks without the stopgap
// check
{
if (position > data.blocksWithExtra)
{
//Calculate open layers
// Calculate open layers
int open = data.layers - height + 1;
if (open < 1) //Temporary stopgap check
if (open < 1) // Temporary stopgap check
continue;
if (open > instance.openLayers())
open = instance.openLayers();
//Copy fluid
// Copy fluid
FluidStack newFluid = fluid.copy();
newFluid.amount = pixelLayer * open;
instance.addFluid(open, newFluid);
//Subtract from total
// Subtract from total
data.totalAmount -= newFluid.amount;
if (data.totalAmount <= 0)
break;
}
else if (position == data.blocksWithExtra && data.leftovers > 0)
{
//Calculate open layers
// Calculate open layers
int open = data.layers - height + 1;
if (open < 1) //Temporary stopgap check
if (open < 1) // Temporary stopgap check
continue;
boolean full = false;
if (open > instance.openLayers())
@@ -360,33 +365,33 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
full = true;
}
//Copy fluid
// Copy fluid
FluidStack newFluid = fluid.copy();
newFluid.amount = pixelLayer * open;
if (!full)
newFluid.amount += data.leftovers;
instance.addFluid(open, newFluid);
//Subtract from total
// Subtract from total
data.totalAmount -= newFluid.amount;
if (data.totalAmount <= 0)
break;
}
else
{
//Calculate open layers
// Calculate open layers
int open = data.layers - height;
if (open < 1) //Temporary stopgap check
if (open < 1) // Temporary stopgap check
continue;
if (open > instance.openLayers())
open = instance.openLayers();
//Copy fluid
// Copy fluid
FluidStack newFluid = fluid.copy();
newFluid.amount = pixelLayer * open;
instance.addFluid(open, newFluid);
//Subtract from total
// Subtract from total
data.totalAmount -= newFluid.amount;
if (data.totalAmount <= 0)
break;
@@ -395,7 +400,7 @@ public class AdaptiveSmelteryLogic extends AdaptiveInventoryLogic implements IAc
}
}
//Distribute liquids to each block
// Distribute liquids to each block
}
protected void updateFluidBlocks ()
@@ -2,43 +2,27 @@ package tconstruct.blocks.logic;
import net.minecraft.tileentity.TileEntity;
public class AqueductLogic extends TileEntity //implements ITankContainer
public class AqueductLogic extends TileEntity // implements ITankContainer
{
/*@Override
public int fill (ForgeDirection from, FluidStack resource, boolean doFill)
{
return 0;
}
@Override
public int fill (int tankIndex, FluidStack resource, boolean doFill)
{
return 0;
}
@Override
public FluidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public FluidStack drain (int tankIndex, int maxDrain, boolean doDrain)
{
return null;
}
@Override
public ILiquidTank[] getTanks (ForgeDirection direction)
{
return null;
}
@Override
public ILiquidTank getTank (ForgeDirection direction, FluidStack type)
{
return null;
}*/
/*
* @Override public int fill (ForgeDirection from, FluidStack resource,
* boolean doFill) { return 0; }
*
* @Override public int fill (int tankIndex, FluidStack resource, boolean
* doFill) { return 0; }
*
* @Override public FluidStack drain (ForgeDirection from, int maxDrain,
* boolean doDrain) { return null; }
*
* @Override public FluidStack drain (int tankIndex, int maxDrain, boolean
* doDrain) { return null; }
*
* @Override public ILiquidTank[] getTanks (ForgeDirection direction) {
* return null; }
*
* @Override public ILiquidTank getTank (ForgeDirection direction,
* FluidStack type) { return null; }
*/
}
@@ -43,19 +43,19 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public String getInvName () //Not a gui block
public String getInvName () // Not a gui block
{
return null;
}
@Override
public String getDefaultName () //Still not a gui block
public String getDefaultName () // Still not a gui block
{
return null;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) // Definitely not a gui block
{
return null;
}
@@ -68,7 +68,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
return this.capacity;
}
public int updateCapacity () //Only used to initialize
public int updateCapacity () // Only used to initialize
{
int ret = TConstruct.ingotLiquidValue;
@@ -156,7 +156,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
else if (resource.isFluidEqual(this.liquid))
{
if (resource.amount + this.liquid.amount >= this.capacity) //Start timer here
if (resource.amount + this.liquid.amount >= this.capacity) // Start
// timer
// here
{
int roomInTank = this.capacity - liquid.amount;
if (doFill && roomInTank > 0)
@@ -189,7 +191,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public void markDirty () //Isn't actually called?
public void markDirty () // Isn't actually called?
{
super.markDirty();
worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord);
@@ -220,7 +222,8 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
liquid.amount -= used;
}
FluidStack drained = liquid.copy();//new FluidStack(liquid.itemID, used, liquid.itemMeta);
FluidStack drained = liquid.copy();// new FluidStack(liquid.itemID,
// used, liquid.itemMeta);
drained.amount = used;
// Reset liquid if emptied
@@ -238,9 +241,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
@Override
public int fill (ForgeDirection from, FluidStack resource, boolean doFill)
{
//if (from == ForgeDirection.UP)
// if (from == ForgeDirection.UP)
return fill(resource, doFill);
//return 0;
// return 0;
}
@Override
@@ -303,7 +306,7 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
{
if (castingDelay > 0)
{
//TConstruct.logger.info("Casting");
// TConstruct.logger.info("Casting");
castingDelay--;
if (castingDelay == 0)
castLiquid();
@@ -351,8 +354,9 @@ public class CastingBasinLogic extends InventoryLogic implements IFluidTank, IFl
{
this.liquid = FluidStack.loadFluidStackFromNBT(tags.getCompoundTag("Fluid"));
}
//FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
//this.liquid = new FluidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
// FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
// this.liquid = new FluidStack(tags.getInteger("itemID"),
// tags.getInteger("amount"), tags.getInteger("itemMeta"));
else
this.liquid = null;
@@ -52,7 +52,8 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
if (this.pullingLiquids)
pullLiquids();
}
//this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord);
// this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord,
// this.zCoord);
if (ticks == 20)
{
if (recentlyFilledDelay != 0)
@@ -122,7 +123,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
HashMap tankMap = this.getOutputs();
if (tankMap.size() <= 0)
{
//TConstruct.logger.info("Nope, no connections to go to");
// TConstruct.logger.info("Nope, no connections to go to");
return;
}
boolean yFilled = false;
@@ -212,7 +213,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
HashMap tankMap = this.getOutputs();
if (tankMap.size() <= 0)
{
//TConstruct.logger.info("Nope, no connections to go to");
// TConstruct.logger.info("Nope, no connections to go to");
return;
}
boolean yFilled = false;
@@ -628,7 +629,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidTank, IFlui
@Override
public void setActive (boolean flag)
{
//pullingLiquids = flag;
// pullingLiquids = flag;
pullingLiquids = !pullingLiquids;
}
@@ -1,8 +1,5 @@
package tconstruct.blocks.logic;
import tconstruct.TConstruct;
import tconstruct.library.crafting.CastingRecipe;
import tconstruct.library.util.IPattern;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -20,6 +17,9 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
import net.minecraftforge.fluids.IFluidTank;
import tconstruct.TConstruct;
import tconstruct.library.crafting.CastingRecipe;
import tconstruct.library.util.IPattern;
public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFluidHandler, ISidedInventory
{
@@ -43,19 +43,19 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public String getInvName () //Not a gui block
public String getInvName () // Not a gui block
{
return null;
}
@Override
protected String getDefaultName () //Still not a gui block
protected String getDefaultName () // Still not a gui block
{
return null;
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) // Definitely not a gui block
{
return null;
}
@@ -68,7 +68,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
return this.capacity;
}
public int updateCapacity () //Only used to initialize
public int updateCapacity () // Only used to initialize
{
int ret = TConstruct.ingotLiquidValue;
@@ -156,7 +156,9 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
else if (resource.isFluidEqual(this.liquid))
{
if (resource.amount + this.liquid.amount >= this.capacity) //Start timer here
if (resource.amount + this.liquid.amount >= this.capacity) // Start
// timer
// here
{
int roomInTank = this.capacity - liquid.amount;
if (doFill && roomInTank > 0)
@@ -189,7 +191,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
}
@Override
public void markDirty () //Isn't actually called?
public void markDirty () // Isn't actually called?
{
super.markDirty();
worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord);
@@ -220,7 +222,8 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
liquid.amount -= used;
}
FluidStack drained = liquid.copy();//new FluidStack(liquid.itemID, used, liquid.itemMeta);
FluidStack drained = liquid.copy();// new FluidStack(liquid.itemID,
// used, liquid.itemMeta);
drained.amount = used;
// Reset liquid if emptied
@@ -238,9 +241,9 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
@Override
public int fill (ForgeDirection from, FluidStack resource, boolean doFill)
{
//if (from == ForgeDirection.UP)
// if (from == ForgeDirection.UP)
return fill(resource, doFill);
//return 0;
// return 0;
}
@Override
@@ -304,7 +307,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
{
if (castingDelay > 0)
{
//TConstruct.logger.info("Casting");
// TConstruct.logger.info("Casting");
castingDelay--;
if (castingDelay == 0)
castLiquid();
@@ -425,7 +428,7 @@ public class CastingTableLogic extends InventoryLogic implements IFluidTank, IFl
return false;
}
@Override
public String getInventoryName ()
{
@@ -16,7 +16,7 @@ import tconstruct.inventory.CraftingStationContainer;
public class CraftingStationLogic extends InventoryLogic implements ISidedInventory
{
public WeakReference<IInventory> chest; //TODO: These are prototypes
public WeakReference<IInventory> chest; // TODO: These are prototypes
public WeakReference<IInventory> doubleChest;
public WeakReference<IInventory> patternChest;
public WeakReference<IInventory> furnace;
@@ -25,7 +25,8 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
public CraftingStationLogic()
{
super(17); //9 for crafting, 1 for output, 6 for extensions, 1 for plans
super(17); // 9 for crafting, 1 for output, 6 for extensions, 1 for
// plans
}
@Override
@@ -60,7 +61,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
}
}
}
return new CraftingStationContainer(inventoryplayer, this, x, y, z);
}
@@ -101,7 +102,7 @@ public class CraftingStationLogic extends InventoryLogic implements ISidedInvent
{
return true;
}
@Override
public String getInventoryName ()
{
@@ -103,7 +103,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
@Override
public void setDirection (int side)
{
//direction = (byte) side;
// direction = (byte) side;
}
@Override
@@ -88,7 +88,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
fuel = fuelGague = (int) (getItemBurnTime(inventory[1]) * 2.5);
if (fuel > 0)
{
if (inventory[1].getItem().hasContainerItem()) //Fuel slot
if (inventory[1].getItem().hasContainerItem()) // Fuel slot
{
inventory[1] = new ItemStack(inventory[1].getItem().getContainerItem());
}
@@ -137,7 +137,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
if (!canCook())
return;
for (int id = 2; id < 10; id++) //Check every slot
for (int id = 2; id < 10; id++) // Check every slot
{
if (canCook())
{
@@ -146,7 +146,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
{
int ids = 2;
boolean placed = false;
while (ids < 10 && !placed) //Try to merge stacks first
while (ids < 10 && !placed) // Try to merge stacks first
{
if (inventory[ids] != null && inventory[ids].isItemEqual(result) && inventory[ids].stackSize < inventory[ids].getMaxStackSize())
{
@@ -166,7 +166,7 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
}
ids = 2;
while (!placed && ids < 10) //Place remaining in slot
while (!placed && ids < 10) // Place remaining in slot
{
if (inventory[ids] == null)
{
@@ -187,11 +187,11 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
{
for (int id = 2; id < 10; id++)
{
if (inventory[id] == null) //Nothing here!
if (inventory[id] == null) // Nothing here!
continue;
ItemStack result = getResultFor(inventory[id]);
if (result == null) //Doesn't cook into anything
if (result == null) // Doesn't cook into anything
continue;
for (int slotid = 2; slotid < 10; slotid++)
@@ -214,7 +214,9 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
public ItemStack getResultFor (ItemStack stack)
{
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
if (result != null && result.getItem() instanceof ItemFood) //Only valid for food
if (result != null && result.getItem() instanceof ItemFood) // Only
// valid for
// food
return result.copy();
return null;
@@ -304,14 +306,10 @@ public class FrypanLogic extends EquipLogic implements IActiveLogic
return true;
}
/*@Override
public boolean canDropInventorySlot(int slot)
{
if (slot == 0)
return false;
else
return true;
}*/
/*
* @Override public boolean canDropInventorySlot(int slot) { if (slot == 0)
* return false; else return true; }
*/
@Override
public void openInventory ()
@@ -98,7 +98,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
fuel = fuelGague = (int) (getItemBurnTime(inventory[1]));
if (fuel > 0)
{
if (inventory[1].getItem().hasContainerItem()) //Fuel slot
if (inventory[1].getItem().hasContainerItem()) // Fuel slot
{
inventory[1] = new ItemStack(inventory[1].getItem().getContainerItem());
}
@@ -169,7 +169,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
public boolean canSmelt ()
{
if (inventory[0] == null) //Nothing here!
if (inventory[0] == null) // Nothing here!
return false;
else
{
@@ -193,7 +193,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
public ItemStack getResultFor (ItemStack stack)
{
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
if (result != null) //Only valid for food
if (result != null) // Only valid for food
return result.copy();
return null;
@@ -321,7 +321,7 @@ public class FurnaceLogic extends InventoryLogic implements IActiveLogic, IFacin
@Deprecated
public void setDirection (int side)
{
//Nope!
// Nope!
}
@Override
@@ -58,7 +58,7 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
@Override
public boolean canFill (ForgeDirection from, Fluid fluid)
{
//return tank.fill(fluid, false) > 0;
// return tank.fill(fluid, false) > 0;
return false;
}
@@ -78,17 +78,13 @@ public class LavaTankLogic extends MultiServantLogic implements IFluidHandler
return new FluidTankInfo[] { new FluidTankInfo(fluid, tank.getCapacity()) };
}
/*@Override
public IFluidTank[] getTanks (ForgeDirection direction)
{
return new IFluidTank[] { tank };
}
@Override
public IFluidTank getTank (ForgeDirection direction, FluidStack type)
{
return tank;
}*/
/*
* @Override public IFluidTank[] getTanks (ForgeDirection direction) {
* return new IFluidTank[] { tank }; }
*
* @Override public IFluidTank getTank (ForgeDirection direction, FluidStack
* type) { return tank; }
*/
public float getFluidAmountScaled ()
{
@@ -1,9 +1,5 @@
package tconstruct.blocks.logic;
import tconstruct.inventory.PartCrafterChestContainer;
import tconstruct.inventory.PartCrafterContainer;
import tconstruct.library.crafting.PatternBuilder;
import tconstruct.library.util.IPattern;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -12,6 +8,10 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import tconstruct.inventory.PartCrafterChestContainer;
import tconstruct.inventory.PartCrafterContainer;
import tconstruct.library.crafting.PatternBuilder;
import tconstruct.library.util.IPattern;
public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
{
@@ -49,7 +49,7 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
return new PartCrafterContainer(inventoryplayer, this);
}
//Called when emptying a slot, not when another item is placed in it
// Called when emptying a slot, not when another item is placed in it
public ItemStack decrStackSize (int slotID, int quantity)
{
ItemStack returnStack = super.decrStackSize(slotID, quantity);
@@ -71,7 +71,8 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
int decrease = cost / value;
if (cost % value != 0)
decrease++;
super.decrStackSize(2, decrease); //Call super to avoid crafting again
super.decrStackSize(2, decrease); // Call super to avoid
// crafting again
}
}
@@ -96,7 +97,8 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
int decrease = cost / value;
if (cost % value != 0)
decrease++;
super.decrStackSize(3, decrease); //Call super to avoid crafting again
super.decrStackSize(3, decrease); // Call super to avoid
// crafting again
}
}
@@ -110,7 +112,7 @@ public class PartBuilderLogic extends InventoryLogic implements ISidedInventory
buildBottomPart();
}
//Called when a slot has something placed into it.
// Called when a slot has something placed into it.
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
super.setInventorySlotContents(slot, itemstack);
@@ -1,10 +1,10 @@
package tconstruct.blocks.logic;
import tconstruct.inventory.PatternChestContainer;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.world.World;
import tconstruct.inventory.PatternChestContainer;
public class PatternChestLogic extends InventoryLogic
{
@@ -29,7 +29,7 @@ public class PatternChestLogic extends InventoryLogic
{
return new PatternChestContainer(inventoryplayer, this);
}
@Override
public String getInventoryName ()
{
@@ -15,29 +15,24 @@ public class RedwireLogic extends TileEntity
public void readCustomNBT (NBTTagCompound tags)
{
/*hasMaster = tags.getBoolean("HasMaster");
if (hasMaster)
{
int xCenter = tags.getInteger("xCenter");
int yCenter = tags.getInteger("yCenter");
int zCenter = tags.getInteger("zCenter");
master = new CoordTuple(xCenter, yCenter, zCenter);
masterID = tags.getShort("MasterID");
masterMeat = tags.getByte("masterMeat");
}*/
/*
* hasMaster = tags.getBoolean("HasMaster"); if (hasMaster) { int
* xCenter = tags.getInteger("xCenter"); int yCenter =
* tags.getInteger("yCenter"); int zCenter = tags.getInteger("zCenter");
* master = new CoordTuple(xCenter, yCenter, zCenter); masterID =
* tags.getShort("MasterID"); masterMeat = tags.getByte("masterMeat"); }
*/
}
public void writeCustomNBT (NBTTagCompound tags)
{
/*tags.setBoolean("HasMaster", hasMaster);
if (hasMaster)
{
tags.setInteger("xCenter", master.x);
tags.setInteger("yCenter", master.y);
tags.setInteger("zCenter", master.z);
tags.setShort("MasterID", masterID);
tags.setByte("masterMeat", masterMeat);
}*/
/*
* tags.setBoolean("HasMaster", hasMaster); if (hasMaster) {
* tags.setInteger("xCenter", master.x); tags.setInteger("yCenter",
* master.y); tags.setInteger("zCenter", master.z);
* tags.setShort("MasterID", masterID); tags.setByte("masterMeat",
* masterMeat); }
*/
}
@Override
@@ -69,13 +69,13 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
public boolean canFill (ForgeDirection from, Fluid fluid)
{
return true;
//return from == getForgeDirection();//.getOpposite();
// return from == getForgeDirection();//.getOpposite();
}
@Override
public boolean canDrain (ForgeDirection from, Fluid fluid)
{
// Check that the drain is coming from the from the front of the block
// Check that the drain is coming from the from the front of the block
// and that the fluid to be drained is in the smeltery.
boolean containsFluid = fluid == null;
if (fluid != null)
@@ -90,7 +90,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
}
}
}
//return from == getForgeDirection().getOpposite() && containsFluid;
// return from == getForgeDirection().getOpposite() && containsFluid;
return containsFluid;
}
@@ -101,7 +101,7 @@ public class SmelteryDrainLogic extends MultiServantLogic implements IFluidHandl
{
SmelteryLogic smeltery = (SmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
return smeltery.getMultiTankInfo();
//return new FluidTankInfo[] { smeltery.getInfo() };
// return new FluidTankInfo[] { smeltery.getInfo() };
}
return null;
}
@@ -270,8 +270,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
/* Updating */
public void updateEntity ()
{
/*if (worldObj.isRemote)
return;*/
/*
* if (worldObj.isRemote) return;
*/
tick++;
if (tick % 4 == 0)
@@ -381,13 +382,15 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
private void handleItemEntity (EntityItem item)
{
// Clients like to play merry hell with this and cause breakage (we update their inv on syncs)
// Clients like to play merry hell with this and cause breakage (we
// update their inv on syncs)
if (worldObj.isRemote)
return;
item.age = 0;
ItemStack istack = item.getEntityItem();
if (istack == null || istack.stackSize <= 0) //Probably most definitely not necessary
if (istack == null || istack.stackSize <= 0) // Probably most definitely
// not necessary
return;
int maxSlot = this.getSizeInventory();
@@ -481,12 +484,13 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return false;
currentLiquid += liquid.amount;
//TConstruct.logger.info("Current liquid: "+currentLiquid);
// TConstruct.logger.info("Current liquid: "+currentLiquid);
boolean added = false;
for (int i = 0; i < moltenMetal.size(); i++)
{
FluidStack l = moltenMetal.get(i);
//if (l.itemID == liquid.itemID && l.itemMeta == liquid.itemMeta)
// if (l.itemID == liquid.itemID && l.itemMeta ==
// liquid.itemMeta)
if (l.isFluidEqual(liquid))
{
l.amount += liquid.amount;
@@ -559,7 +563,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
}
void updateFuelGague () //TODO: Call this method when the GUI is opened
void updateFuelGague () // TODO: Call this method when the GUI is opened
{
if (activeLavaTank == null || useTime > 0)
return;
@@ -611,18 +615,21 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
TileEntity newTankContainer = worldObj.getTileEntity(possibleTank.x, possibleTank.y, possibleTank.z);
if (newTankContainer instanceof IFluidHandler)
{
//TConstruct.logger.info("Tank: "+possibleTank.toString());
// TConstruct.logger.info("Tank: "+possibleTank.toString());
FluidStack newliquid = ((IFluidHandler) newTankContainer).drain(ForgeDirection.UNKNOWN, 150, false);
if (newliquid != null && newliquid.getFluid().getBlock() == Blocks.lava && newliquid.amount > 0)
{
//TConstruct.logger.info("Tank: "+possibleTank.toString());
// TConstruct.logger.info("Tank: "+possibleTank.toString());
foundTank = true;
activeLavaTank = possibleTank;
iter = lavaTanks.size();
/*IFluidTank newTank = ((IFluidHandler) newTankContainer).getTank(ForgeDirection.UNKNOWN, liquid);
liquid = newTank.getFluid();
int capacity = newTank.getCapacity();*/
/*
* IFluidTank newTank = ((IFluidHandler)
* newTankContainer).getTank(ForgeDirection.UNKNOWN,
* liquid); liquid = newTank.getFluid(); int
* capacity = newTank.getCapacity();
*/
FluidTankInfo[] info = ((IFluidHandler) tankContainer).getTankInfo(ForgeDirection.DOWN);
liquid = info[0].fluid;
int capacity = info[0].capacity;
@@ -642,7 +649,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (iter >= lavaTanks.size())
foundTank = true;
}
//TConstruct.logger.info("Searching for tank, size: "+lavaTanks.size());
// TConstruct.logger.info("Searching for tank, size: "+lavaTanks.size());
}
}
}
@@ -653,13 +660,11 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
/* Inventory */
/*public int getMaxStackStackSize (ItemStack stack)
{
FluidStack liquid = getResultFor(stack);
if (liquid == null)
return 0;
return liquid.amount;
}*/
/*
* public int getMaxStackStackSize (ItemStack stack) { FluidStack liquid =
* getResultFor(stack); if (liquid == null) return 0; return liquid.amount;
* }
*/
public int getInventoryStackLimit ()
{
@@ -672,15 +677,16 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
updateEntity();
super.markDirty();
needsUpdate = true;
//worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
//worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
// worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
// worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
/*@Override
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
inventory[slot] = itemstack != null ? itemstack.splitStack(1) : null; //May include unintended side effects. Possible fix for max stack size of 1?
}*/
/*
* @Override public void setInventorySlotContents (int slot, ItemStack
* itemstack) { inventory[slot] = itemstack != null ?
* itemstack.splitStack(1) : null; //May include unintended side effects.
* Possible fix for max stack size of 1? }
*/
/* Multiblock */
@Override
@@ -745,7 +751,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
checkValidStructure(x + 1, y, z);
}
//Not valid, sorry
// Not valid, sorry
}
public void checkValidStructure (int x, int y, int z)
@@ -759,7 +765,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
checkLayers += recurseStructureDown(x, y - 1, z, 0);
}
//maxLiquid = capacity * 20000;
// maxLiquid = capacity * 20000;
if (tempValidStructure != validStructure || checkLayers != this.layers)
{
@@ -785,7 +791,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
lavaTanks.clear();
Block block;
//Check inside
// Check inside
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
@@ -796,7 +802,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
}
//Check outer layer
// Check outer layer
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
numBricks += checkBricks(xPos, y, z - 2);
@@ -818,7 +824,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public int recurseStructureUp (int x, int y, int z, int count)
{
numBricks = 0;
//Check inside
// Check inside
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
@@ -829,7 +835,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
}
//Check outer layer
// Check outer layer
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
numBricks += checkBricks(xPos, y, z - 2);
@@ -852,7 +858,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public int recurseStructureDown (int x, int y, int z, int count)
{
numBricks = 0;
//Check inside
// Check inside
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
@@ -868,7 +874,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
}
}
//Check outer layer
// Check outer layer
for (int xPos = x - 1; xPos <= x + 1; xPos++)
{
numBricks += checkBricks(xPos, y, z - 2);
@@ -908,8 +914,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
return count;
}
/* Returns whether the brick is a lava tank or not.
* Increments bricks, sets them as part of the structure, and adds tanks to the list.
/*
* Returns whether the brick is a lava tank or not. Increments bricks, sets
* them as part of the structure, and adds tanks to the list.
*/
int checkBricks (int x, int y, int z)
{
@@ -978,7 +985,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
FluidStack liq = liquid.copy();
if (doDrain)
{
//liquid = null;
// liquid = null;
moltenMetal.remove(liquid);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
currentLiquid = 0;
@@ -1007,7 +1014,9 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
@Override
public int fill (FluidStack resource, boolean doFill)
{
if (resource != null && currentLiquid < maxLiquid)//resource.amount + currentLiquid < maxLiquid)
if (resource != null && currentLiquid < maxLiquid)// resource.amount +
// currentLiquid <
// maxLiquid)
{
if (resource.amount + currentLiquid > maxLiquid)
resource.amount = maxLiquid - currentLiquid;
@@ -1074,7 +1083,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
inventory = new ItemStack[layers * 9];
super.readFromNBT(tags);
//validStructure = tags.getBoolean("ValidStructure");
// validStructure = tags.getBoolean("ValidStructure");
internalTemp = tags.getInteger("InternalTemp");
inUse = tags.getBoolean("InUse");
@@ -1101,8 +1110,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (fluid != null)
moltenMetal.add(fluid);
}
//adjustLayers(layers, true);
//checkValidPlacement();
// adjustLayers(layers, true);
// checkValidPlacement();
}
@Override
@@ -1110,7 +1119,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
super.writeToNBT(tags);
//tags.setBoolean("ValidStructure", validStructure);
// tags.setBoolean("ValidStructure", validStructure);
tags.setInteger("InternalTemp", internalTemp);
tags.setBoolean("InUse", inUse);
@@ -1,8 +1,5 @@
package tconstruct.blocks.logic;
import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.inventory.PatternShaperContainer;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -10,6 +7,8 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import tconstruct.common.TRepo;
import tconstruct.inventory.PatternShaperContainer;
public class StencilTableLogic extends InventoryLogic implements ISidedInventory
{
@@ -35,24 +34,25 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory
return new PatternShaperContainer(inventoryplayer, this);
}
/*@Override
public void markDirty()
{
if (inventory[0] == null)
inventory[1] = null;
super.markDirty();
}*/
/*
* @Override public void markDirty() { if (inventory[0] == null)
* inventory[1] = null; super.markDirty(); }
*/
@Override
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
super.setInventorySlotContents(slot, itemstack);
if (slot == 0 && itemstack != null && itemstack.getItem() == TRepo.blankPattern)//instanceof tconstruct.items.Pattern)
if (slot == 0 && itemstack != null && itemstack.getItem() == TRepo.blankPattern)// instanceof
// tconstruct.items.Pattern)
{
if (itemstack.getItemDamage() == 0)
setInventorySlotContents(1, new ItemStack(TRepo.woodPattern, 1, 1));
/*else if (itemstack.getItemDamage() == 1)
setInventorySlotContents(1, new ItemStack(TContent.metalPattern, 1, 0));*/
/*
* else if (itemstack.getItemDamage() == 1)
* setInventorySlotContents(1, new ItemStack(TContent.metalPattern,
* 1, 0));
*/
}
}
@@ -121,7 +121,7 @@ public class StencilTableLogic extends InventoryLogic implements ISidedInventory
{
return false;
}
@Override
public String getInventoryName ()
{
@@ -32,8 +32,10 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
public void overrideFluids (ArrayList<FluidStack> fluids)
{
/*multitank.overrideFluids(fluids);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);*/
/*
* multitank.overrideFluids(fluids); worldObj.markBlockForUpdate(xCoord,
* yCoord, zCoord);
*/
}
public boolean hasItem ()
@@ -54,25 +56,26 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
@Override
public void setInventorySlotContents (int slot, ItemStack itemstack)
{
/*inventory[slot] = itemstack;
if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
{
itemstack.stackSize = getInventoryStackLimit();
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, itemstack.getItemDamage(), 3);
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}*/
/*
* inventory[slot] = itemstack; if (itemstack != null &&
* itemstack.stackSize > getInventoryStackLimit()) { itemstack.stackSize
* = getInventoryStackLimit();
* worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord,
* itemstack.getItemDamage(), 3); worldObj.markBlockForUpdate(xCoord,
* yCoord, zCoord); }
*/
}
@Override
public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z)
{
return null; //Not a gui block
return null; // Not a gui block
}
@Override
protected String getDefaultName ()
{
return null; //Not a gui block
return null; // Not a gui block
}
@Override
@@ -84,20 +87,21 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
@Override
public void notifyMasterOfChange ()
{
//Probably not useful here
// Probably not useful here
}
@Override
public boolean setPotentialMaster (IMasterLogic master, World world, int xMaster, int yMaster, int zMaster)
{
return false; //Master should be verified right after placement
return false; // Master should be verified right after placement
}
@Override
public boolean verifyMaster (IMasterLogic logic, World world, int xMaster, int yMaster, int zMaster)
{
/*if (master != null) //Is this even needed?
return false;*/
/*
* if (master != null) //Is this even needed? return false;
*/
master = new CoordTuple(xMaster, yMaster, zMaster);
return true;
@@ -127,19 +131,17 @@ public class TankAirLogic extends InventoryLogic implements IServantLogic, ISide
return false;
}
/*@Override
public boolean canUpdate()
{
return false;
}*/
/*
* @Override public boolean canUpdate() { return false; }
*/
//DELETE
// DELETE
public void updateEntity ()
{
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
}
//Keep TE regardless of metadata
// Keep TE regardless of metadata
public boolean shouldRefresh (int oldID, int newID, int oldMeta, int newMeta, World world, int x, int y, int z)
{
return oldID != newID;
@@ -13,7 +13,7 @@ import net.minecraft.tileentity.TileEntity;
/**
*
* @author fuj1n
*
*
*/
public class TileEntityLandmine extends TileEntity implements IInventory
{
@@ -232,15 +232,16 @@ public class TileEntityLandmine extends TileEntity implements IInventory
@Override
public boolean isItemValidForSlot (int i, ItemStack itemstack)
{
//Should automatic camo insertion be allowed.
// Should automatic camo insertion be allowed.
if (i == 3)
{
return false;
}
else
{
//Here for mDiyo to decide if he wants automation for insertion/extraction of the items to be an option.
//Would be useful for building automated mine laying machines.
// Here for mDiyo to decide if he wants automation for
// insertion/extraction of the items to be an option.
// Would be useful for building automated mine laying machines.
return false;
}
}
@@ -1,7 +1,5 @@
package tconstruct.blocks.logic;
import tconstruct.inventory.ToolStationContainer;
import tconstruct.library.crafting.ToolBuilder;
import mantle.blocks.abstracts.InventoryLogic;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@@ -9,6 +7,8 @@ import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import tconstruct.inventory.ToolStationContainer;
import tconstruct.library.crafting.ToolBuilder;
/* Simple class for storing items in the block
*/
@@ -73,7 +73,7 @@ public class SlimeGel extends TConstructBlock
{
par3List.add(new ItemStack(b, 1, 0));
par3List.add(new ItemStack(b, 1, 1));
//par3List.add(new ItemStack(par1, 1, 2));
// par3List.add(new ItemStack(par1, 1, 2));
}
public boolean canSustainLeaves (World world, int x, int y, int z)
@@ -24,7 +24,8 @@ import cpw.mods.fml.relauncher.SideOnly;
public class SlimeGrass extends MantleBlock
{
public String[] textureNames = { "slimegrass_green_top", "slimedirt_blue", "slimegrass_green_blue_side", "slimegrass_green_dirt_side" };//green, purple
public String[] textureNames = { "slimegrass_green_top", "slimedirt_blue", "slimegrass_green_blue_side", "slimegrass_green_dirt_side" };// green,
// purple
public IIcon[] icons;
public SlimeGrass()
@@ -38,11 +39,11 @@ public class SlimeGrass extends MantleBlock
@Override
public int damageDropped (int meta)
{
if (meta == 1) //dirt
if (meta == 1) // dirt
return 0;
else
//slime dirt
// slime dirt
return 5;
}
@@ -103,7 +103,8 @@ public class SlimeLeaves extends BlockLeaves
}
/**
* Drops the block items with a specified chance of dropping the specified items
* Drops the block items with a specified chance of dropping the specified
* items
*/
public void dropBlockAsItemWithChance (World world, int x, int y, int z, int meta, float chance, int fortune)
{
@@ -111,10 +112,9 @@ public class SlimeLeaves extends BlockLeaves
{
int dropChance = 35;
/*if ((meta & 3) == 3)
{
j1 = 40;
}*/
/*
* if ((meta & 3) == 3) { j1 = 40; }
*/
if (fortune > 0)
{
@@ -39,10 +39,9 @@ public class SlimeTallGrass extends BlockBush implements IShearable
*/
public IIcon getIcon (int side, int meta)
{
/*if (meta >= this.iconArray.length)
{
meta = 0;
}*/
/*
* if (meta >= this.iconArray.length) { meta = 0; }
*/
return this.iconArray[meta];
}
@@ -56,7 +55,8 @@ public class SlimeTallGrass extends BlockBush implements IShearable
}
/**
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).
* Returns the usual quantity dropped by the block plus a bonus of 1 to 'i'
* (inclusive).
*/
public int quantityDroppedWithBonus (int par1, Random par2Random)
{
@@ -64,8 +64,8 @@ public class Landmine extends MantleBlock
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
* Returns a bounding box from the pool of bounding boxes (this means this
* box can change after the pool has been cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool (World par1World, int par2, int par3, int par4)
{
@@ -73,8 +73,9 @@ public class Landmine extends MantleBlock
}
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
* or not to render the shared face of two adjacent blocks and also whether
* the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube ()
{
@@ -82,7 +83,8 @@ public class Landmine extends MantleBlock
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
* If this block doesn't render as an ordinary block it will return False
* (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock ()
{
@@ -95,7 +97,8 @@ public class Landmine extends MantleBlock
}
/**
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
* Checks to see if its valid to put this block at the specified
* coordinates. Args: world, x, y, z
*/
public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
{
@@ -103,8 +106,9 @@ public class Landmine extends MantleBlock
}
/**
* Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
* their own) Args: x, y, z, neighbor blockID
* Lets the block know when one of its neighbor changes. Doesn't know which
* neighbor changed (coordinates passed are their own) Args: x, y, z,
* neighbor blockID
*/
public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5)
{
@@ -118,7 +122,7 @@ public class Landmine extends MantleBlock
if (var6)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
//par1World.setBlock(par2, par3, par4, 0);
// par1World.setBlock(par2, par3, par4, 0);
}
}
@@ -137,7 +141,8 @@ public class Landmine extends MantleBlock
}
/**
* Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity
* Triggered whenever an entity collides with this block (enters into the
* block). Args: world, x, y, z, entity
*/
public void onEntityCollidedWithBlock (World par1World, int par2, int par3, int par4, Entity par5Entity)
{
@@ -151,7 +156,8 @@ public class Landmine extends MantleBlock
}
/**
* Checks if there are mobs on the plate. If a mob is on the plate and it is off, it turns it on, and vice versa.
* Checks if there are mobs on the plate. If a mob is on the plate and it is
* off, it turns it on, and vice versa.
*/
private void setStateIfMobInteractsWithPlate (World world, int posX, int posY, int posZ)
{
@@ -176,13 +182,14 @@ public class Landmine extends MantleBlock
(double) ((float) (posZ + 1) - var7)));
}
/*if (this.triggerMobType == EnumCreatureType.players)
{
var8 = world.getEntitiesWithinAABB(
EntityPlayer.class,
AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7), (double) posY, (double) ((float) posZ + var7), (double) ((float) (posX + 1) - var7), (double) posY + 0.25D,
(double) ((float) (posZ + 1) - var7)));
}*/
/*
* if (this.triggerMobType == EnumCreatureType.players) { var8 =
* world.getEntitiesWithinAABB( EntityPlayer.class,
* AxisAlignedBB.getAABBPool().getAABB((double) ((float) posX + var7),
* (double) posY, (double) ((float) posZ + var7), (double) ((float)
* (posX + 1) - var7), (double) posY + 0.25D, (double) ((float) (posZ +
* 1) - var7))); }
*/
if (!var8.isEmpty())
{
@@ -204,30 +211,35 @@ public class Landmine extends MantleBlock
{
WorldHelper.setBlockToAir(world, posX, posY, posZ);
world.createExplosion((Entity) null, posX, posY, posZ, 2.0F, true);
/*par1World.setBlockMetadataWithNotify(posX, posY, posZ, 1);
par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, this.blockID);
par1World.notifyBlocksOfNeighborChange(posX, posY - 1, posZ, this.blockID);
par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, posY, posZ);
par1World.playSoundEffect((double)posX + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, 0.6F);*/
/*
* par1World.setBlockMetadataWithNotify(posX, posY, posZ, 1);
* par1World.notifyBlocksOfNeighborChange(posX, posY, posZ,
* this.blockID); par1World.notifyBlocksOfNeighborChange(posX, posY
* - 1, posZ, this.blockID);
* par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX,
* posY, posZ); par1World.playSoundEffect((double)posX + 0.5D,
* (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F,
* 0.6F);
*/
}
/*if (!var6 && var5)
{
par1World.setBlockMetadataWithNotify(posX, posY, posZ, 0);
par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, this.blockID);
par1World.notifyBlocksOfNeighborChange(posX, posY - 1, posZ, this.blockID);
par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, posY, posZ);
par1World.playSoundEffect((double)posX + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, 0.5F);
}
if (var6)
{
par1World.scheduleBlockUpdate(posX, posY, posZ, this.blockID, this.tickRate());
}*/
/*
* if (!var6 && var5) { par1World.setBlockMetadataWithNotify(posX, posY,
* posZ, 0); par1World.notifyBlocksOfNeighborChange(posX, posY, posZ,
* this.blockID); par1World.notifyBlocksOfNeighborChange(posX, posY - 1,
* posZ, this.blockID); par1World.markBlockRangeForRenderUpdate(posX,
* posY, posZ, posX, posY, posZ); par1World.playSoundEffect((double)posX
* + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click",
* 0.3F, 0.5F); }
*
* if (var6) { par1World.scheduleBlockUpdate(posX, posY, posZ,
* this.blockID, this.tickRate()); }
*/
}
/**
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
* ejects contained items into the world, and notifies neighbours of an
* update, as appropriate
*/
public void breakBlock (World par1World, int par2, int par3, int par4, Block par5, int par6)
{
@@ -241,7 +253,8 @@ public class Landmine extends MantleBlock
}
/**
* Updates the blocks bounds based on its current state. Args: world, x, y, z
* Updates the blocks bounds based on its current state. Args: world, x, y,
* z
*/
public void setBlockBoundsBasedOnState (IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
{
@@ -270,8 +283,8 @@ public class Landmine extends MantleBlock
}
/**
* Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility
* and stop pistons
* Returns the mobility information of the block, 0 = free, 1 = can't push
* but can move over, 2 = total immobility and stop pistons
*/
public int getMobilityFlag ()
{
@@ -50,8 +50,9 @@ public class Punji extends MantleBlock
@Override
public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int par6, float hitX, float hitY, float hitZ)
{
/*if (world.isRemote)
return false;*/
/*
* if (world.isRemote) return false;
*/
int meta = world.getBlockMetadata(x, y, z);
if (meta < 4)
@@ -81,8 +82,9 @@ public class Punji extends MantleBlock
}
/**
* Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
* Is this block (a) opaque and (b) a full 1m cube? This determines whether
* or not to render the shared face of two adjacent blocks and also whether
* the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube ()
{
@@ -90,7 +92,8 @@ public class Punji extends MantleBlock
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
* If this block doesn't render as an ordinary block it will return False
* (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock ()
{
@@ -54,7 +54,7 @@ public class CustomBowRenderer implements IItemRenderer
block = BlockUtils.getBlockFromItem(stack.getItem());
}
IIcon icon = null; //living.getItemIcon(stack, renderPass);
IIcon icon = null; // living.getItemIcon(stack, renderPass);
if (living instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) living;
+70 -52
View File
@@ -19,9 +19,9 @@ import org.lwjgl.opengl.GL11;
/**
*
* @author TheObliterator
*
* A class to create and draw true type
* fonts onto the Minecraft game engine.
*
* A class to create and draw true type fonts onto the Minecraft game
* engine.
*/
public class CustomFont
{
@@ -33,15 +33,17 @@ public class CustomFont
private FontMetrics metrics;
/**
* Instantiates the font, filling in default start
* and end character parameters.
* Instantiates the font, filling in default start and end character
* parameters.
*
* 'new CustomFont(ModLoader.getMinecraftInstance(),
* "Arial", 12);
* 'new CustomFont(ModLoader.getMinecraftInstance(), "Arial", 12);
*
* @param mc The Minecraft instance for the font to be bound to.
* @param fontName The name of the font to be drawn.
* @param size The size of the font to be drawn.
* @param mc
* The Minecraft instance for the font to be bound to.
* @param fontName
* The name of the font to be drawn.
* @param size
* The size of the font to be drawn.
*/
public CustomFont(Minecraft mc, Object font, int size)
{
@@ -49,19 +51,22 @@ public class CustomFont
}
/**
* Instantiates the font, pre-rendering a sprite
* font image by using a true type font on a
* bitmap. Then allocating that bitmap to the
* Minecraft rendering engine for later use.
* Instantiates the font, pre-rendering a sprite font image by using a true
* type font on a bitmap. Then allocating that bitmap to the Minecraft
* rendering engine for later use.
*
* 'new CustomFont(ModLoader.getMinecraftInstance(),
* "Arial", 12, 32, 126);'
* 'new CustomFont(ModLoader.getMinecraftInstance(), "Arial", 12, 32, 126);'
*
* @param mc The Minecraft instance for the font to be bound to.
* @param fontName The name of the font to be drawn.
* @param size The size of the font to be drawn.
* @param startChar The starting ASCII character id to be drawable. (Default 32)
* @param endChar The ending ASCII character id to be drawable. (Default 126)
* @param mc
* The Minecraft instance for the font to be bound to.
* @param fontName
* The name of the font to be drawn.
* @param size
* The size of the font to be drawn.
* @param startChar
* The starting ASCII character id to be drawable. (Default 32)
* @param endChar
* The ending ASCII character id to be drawable. (Default 126)
*/
public CustomFont(Minecraft mc, Object font, int size, int startChar, int endChar)
{
@@ -128,17 +133,22 @@ public class CustomFont
// Render the finished bitmap into the Minecraft
// graphics engine.
// Sadly broken by 1.6
//texID = mc.renderEngine.allocateAndSetupTexture(img);
// texID = mc.renderEngine.allocateAndSetupTexture(img);
}
/**
* Draws a given string with an automatically
* calculated shadow below it.
* @param gui The gui/subclass to be drawn on
* @param text The string to be drawn
* @param x The x position to start drawing
* @param y The y position to start drawing
* @param color The color of the non-shadowed text (Hex)
* Draws a given string with an automatically calculated shadow below it.
*
* @param gui
* The gui/subclass to be drawn on
* @param text
* The string to be drawn
* @param x
* The x position to start drawing
* @param y
* The y position to start drawing
* @param color
* The color of the non-shadowed text (Hex)
*/
public void drawStringS (Gui gui, String text, int x, int y, int color)
{
@@ -151,17 +161,23 @@ public class CustomFont
/**
* Draws a given string onto a gui/subclass.
* @param gui The gui/subclass to be drawn on
* @param text The string to be drawn
* @param x The x position to start drawing
* @param y The y position to start drawing
* @param color The color of the non-shadowed text (Hex)
*
* @param gui
* The gui/subclass to be drawn on
* @param text
* The string to be drawn
* @param x
* The x position to start drawing
* @param y
* The y position to start drawing
* @param color
* The color of the non-shadowed text (Hex)
*/
public void drawString (Gui gui, String text, int x, int y, int color)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glEnable(3553 /*GL_TEXTURE_2D*/);
GL11.glBindTexture(3553 /*GL_TEXTURE_2D*/, texID);
GL11.glEnable(3553 /* GL_TEXTURE_2D */);
GL11.glBindTexture(3553 /* GL_TEXTURE_2D */, texID);
float red = (float) (color >> 16 & 0xff) / 255F;
float green = (float) (color >> 8 & 0xff) / 255F;
float blue = (float) (color & 0xff) / 255F;
@@ -188,9 +204,9 @@ public class CustomFont
}
/**
* Returns the created FontMetrics
* which is used to retrive various
* Returns the created FontMetrics which is used to retrive various
* information about the True Type Font
*
* @return FontMetrics of the created font.
*/
public FontMetrics getMetrics ()
@@ -199,9 +215,10 @@ public class CustomFont
}
/**
* Gets the drawing width of a given
* string of string.
* @param text The string to be measured
* Gets the drawing width of a given string of string.
*
* @param text
* The string to be measured
* @return The width of the given string.
*/
public int getStringWidth (String text)
@@ -210,9 +227,10 @@ public class CustomFont
}
/**
* Gets the drawing height of a given
* string of string.
* @param text The string to be measured
* Gets the drawing height of a given string of string.
*
* @param text
* The string to be measured
* @return The height of the given string.
*/
public int getStringHeight (String text)
@@ -221,12 +239,13 @@ public class CustomFont
}
/**
* A method that returns a Rectangle that
* contains the width and height demensions
* of the given string.
* @param text The string to be measured
* @return Rectangle containing width and height that
* the text will consume when drawn.
* A method that returns a Rectangle that contains the width and height
* demensions of the given string.
*
* @param text
* The string to be measured
* @return Rectangle containing width and height that the text will consume
* when drawn.
*/
private Rectangle getBounds (String text)
{
@@ -259,8 +278,7 @@ public class CustomFont
}
/**
* Private drawing method used within other
* drawing methods.
* Private drawing method used within other drawing methods.
*/
private void drawChar (Gui gui, char c, int x, int y)
{
@@ -47,12 +47,13 @@ public class TClientEvents
initSounds = true;
try
{
/* SoundManager soundmanager = event.manager;
soundmanager.addSound("tinker:frypan_hit.ogg");
soundmanager.addSound("tinker:little_saw.ogg");
soundmanager.addSound("tinker:launcher_clank.ogg");
TConstruct.logger.info("Successfully loaded sounds.");
*/
/*
* SoundManager soundmanager = event.manager;
* soundmanager.addSound("tinker:frypan_hit.ogg");
* soundmanager.addSound("tinker:little_saw.ogg");
* soundmanager.addSound("tinker:launcher_clank.ogg");
* TConstruct.logger.info("Successfully loaded sounds.");
*/
}
catch (Exception e)
{
@@ -92,8 +93,8 @@ public class TClientEvents
private static final ResourceLocation hearts = new ResourceLocation("tinker", "textures/gui/newhearts.png");
private static final ResourceLocation icons = new ResourceLocation("textures/gui/icons.png");
//public static int left_height = 39;
//public static int right_height = 39;
// public static int left_height = 39;
// public static int right_height = 39;
Random rand = new Random();
int updateCounter = 0;
@@ -103,7 +104,8 @@ public class TClientEvents
@SubscribeEvent
public void renderHealthbar (RenderGameOverlayEvent.Pre event)
{
if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting with a GUI mod (thanks Vazkii!)
if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting
// with a GUI mod (thanks Vazkii!)
{
if (event.type == ElementType.HEALTH)
{
@@ -171,25 +173,25 @@ public class TClientEvents
if (highlight)
{
if (i * 2 + 1 < healthLast)
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); // 6
else if (i * 2 + 1 == healthLast)
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); // 7
}
if (absorbRemaining > 0.0F)
{
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); // 17
else
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); // 16
absorbRemaining -= 2.0F;
}
else
{
if (i * 2 + 1 < health)
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); // 4
else if (i * 2 + 1 == health)
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); // 5
}
}
@@ -200,7 +202,7 @@ public class TClientEvents
if (potion != null)
return;
//Extra hearts
// Extra hearts
this.mc.getTextureManager().bindTexture(hearts);
int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth());
@@ -248,43 +250,28 @@ public class TClientEvents
double zLevel = 0;
/*@SubscribeEvent
public void fovModifier(FOVUpdateEvent event)
{
float f = 1.0F;
if (event.entity.capabilities.isFlying)
{
f *= 1.1F;
}
if (event.entity.isUsingItem() && event.entity.getItemInUse().getItem() == Items.bow)
{
int i = event.entity.getItemInUseDuration();
float f1 = (float) i / 20.0F;
if (f1 > 1.0F)
{
f1 = 1.0F;
}
else
{
f1 *= f1;
}
f *= 1.0F - f1 * 0.15F;
}
event.newfov = f;
}*/
/*
* @SubscribeEvent public void fovModifier(FOVUpdateEvent event) { float f =
* 1.0F;
*
* if (event.entity.capabilities.isFlying) { f *= 1.1F; }
*
* if (event.entity.isUsingItem() && event.entity.getItemInUse().getItem()
* == Items.bow) { int i = event.entity.getItemInUseDuration(); float f1 =
* (float) i / 20.0F;
*
* if (f1 > 1.0F) { f1 = 1.0F; } else { f1 *= f1; }
*
* f *= 1.0F - f1 * 0.15F; } event.newfov = f; }
*/
/* Armor */
ModelBiped model = new ModelBiped(5f);
WingModel wings = new WingModel();
/*static
{
model.bipedHead.showModel = false;
}*/
/*
* static { model.bipedHead.showModel = false; }
*/
private float interpolateRotation (float par1, float par2, float par3)
{
@@ -33,10 +33,8 @@ public class TClientTickHandler
}
}
/* @Override
public EnumSet<TickType> ticks ()
{
return EnumSet.of(TickType.RENDER);
}
*/
/*
* @Override public EnumSet<TickType> ticks () { return
* EnumSet.of(TickType.RENDER); }
*/
}
+25 -33
View File
@@ -16,8 +16,8 @@ import cpw.mods.fml.common.gameevent.TickEvent.Type;
public class TControls extends TKeyHandler
{
//static KeyBinding grabKey = new KeyBinding("key.grab", 29);
//static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46);
// static KeyBinding grabKey = new KeyBinding("key.grab", 29);
// static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46);
public static KeyBinding armorKey = new KeyBinding("key.tarmor", 24, null);
public static KeyBinding refreshCapes = new KeyBinding("key.tcapes.reload", 88, null);
static KeyBinding jumpKey;
@@ -32,12 +32,12 @@ public class TControls extends TKeyHandler
int currentTab = 1;
//boolean onStilts = false;
// boolean onStilts = false;
public TControls()
{
super(new KeyBinding[] { armorKey, refreshCapes }, new boolean[] { false, false }, getVanillaKeyBindings(), new boolean[] { false, false });
//TConstruct.logger.info("Controls registered");
// TConstruct.logger.info("Controls registered");
}
private static KeyBinding[] getVanillaKeyBindings ()
@@ -53,11 +53,12 @@ public class TControls extends TKeyHandler
{
if (tickEnd && mc.theWorld != null)
{
if (kb == armorKey && mc.currentScreen == null) //Extended Armor
if (kb == armorKey && mc.currentScreen == null) // Extended Armor
{
openArmorGui();//mc.thePlayer.username);
openArmorGui();// mc.thePlayer.username);
}
if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && !mc.playerController.isInCreativeMode())
if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// &&
// !mc.playerController.isInCreativeMode())
{
TabRegistry.addTabsToInventory((GuiContainer) mc.currentScreen);
}
@@ -65,7 +66,7 @@ public class TControls extends TKeyHandler
{
EventCloakRender.instance.refreshCapes();
}
if (kb == jumpKey) //Double jump
if (kb == jumpKey) // Double jump
{
if (mc.thePlayer.capabilities.isCreativeMode)
return;
@@ -88,29 +89,19 @@ public class TControls extends TKeyHandler
jumping = mc.thePlayer.isAirBorne;
}
}
/*else if (kb == stiltsKey) //Stilts
{
float size = 1.8F;
if (!onStilts)
size = 0.8F;
TConstruct.playerTracker.updateSize(mc.thePlayer.username, size);
onStilts = !onStilts;
//updateServer(mc.thePlayer.username, (byte) 11);
if (onStilts)
{
onStilts = false;
}
else
{
onStilts = true;
}
}*/
/*
* else if (kb == stiltsKey) //Stilts { float size = 1.8F; if
* (!onStilts) size = 0.8F;
* TConstruct.playerTracker.updateSize(mc.thePlayer.username, size);
* onStilts = !onStilts; //updateServer(mc.thePlayer.username, (byte)
* 11); if (onStilts) { onStilts = false; } else { onStilts = true; } }
*/
}
@Override
public void keyUp (Type types, KeyBinding kb, boolean tickEnd)
{
//landOnGround();
// landOnGround();
}
public void landOnGround ()
@@ -216,14 +207,15 @@ public class TControls extends TKeyHandler
static void updateServer (ByteArrayOutputStream bos)
{
/*Packet250CustomPayload packet = new Packet250CustomPayload();
packet.channel = "TConstruct";
packet.data = bos.toByteArray();
packet.length = bos.size();
/*
* Packet250CustomPayload packet = new Packet250CustomPayload();
* packet.channel = "TConstruct"; packet.data = bos.toByteArray();
* packet.length = bos.size();
*
* PacketDispatcher.sendPacketToServer(packet);
*/
PacketDispatcher.sendPacketToServer(packet);*/
//TODO Find out what packet should be used here
// TODO Find out what packet should be used here
TConstruct.packetPipeline.sendToServer(new PacketDoubleJump());
}
@@ -24,7 +24,7 @@ public abstract class TKeyHandler
/**
* Pass an array of keybindings and a repeat flag for each one
*
*
* @param keyBindings
* @param repeatings
*/
@@ -40,9 +40,9 @@ public abstract class TKeyHandler
}
/**
* Register the keys into the system. You will do your own keyboard management elsewhere. No events will fire
* if you use this method
*
* Register the keys into the system. You will do your own keyboard
* management elsewhere. No events will fire if you use this method
*
* @param keyBindings
*/
public TKeyHandler(KeyBinding[] keyBindings)
@@ -116,24 +116,30 @@ public abstract class TKeyHandler
}
/**
* Called when the key is first in the down position on any tick from the {@link #ticks()}
* set. Will be called subsequently with isRepeat set to true
*
* Called when the key is first in the down position on any tick from the
* {@link #ticks()} set. Will be called subsequently with isRepeat set to
* true
*
* @see #keyUp(EnumSet, KeyBinding, boolean)
*
* @param types the type(s) of tick that fired when this key was first down
* @param tickEnd was it an end or start tick which fired the key
* @param isRepeat is it a repeat key event
*
* @param types
* the type(s) of tick that fired when this key was first down
* @param tickEnd
* was it an end or start tick which fired the key
* @param isRepeat
* is it a repeat key event
*/
public abstract void keyDown (Type types, KeyBinding kb, boolean tickEnd, boolean isRepeat);
/**
* Fired once when the key changes state from down to up
*
*
* @see #keyDown(EnumSet, KeyBinding, boolean, boolean)
*
* @param types the type(s) of tick that fired when this key was first down
* @param tickEnd was it an end or start tick which fired the key
*
* @param types
* the type(s) of tick that fired when this key was first down
* @param tickEnd
* was it an end or start tick which fired the key
*/
public abstract void keyUp (Type types, KeyBinding kb, boolean tickEnd);
@@ -219,7 +219,7 @@ public class TProxyClient extends TProxyCommon
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 1.0F, 0.0F);
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getIcon(block.getIcon(1, meta)));//block.getIcon(1, meta));
renderblocks.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, getIcon(block.getIcon(1, meta)));// block.getIcon(1, meta));
tessellator.draw();
tessellator.startDrawingQuads();
tessellator.setNormal(0.0F, 0.0F, -1F);
@@ -597,12 +597,12 @@ public class TProxyClient extends TProxyCommon
MantleClientRegistry.registerManualLargeRecipe("smelterybasin", new ItemStack(TRepo.searedBlock, 1, 2), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick,
searedbrick, searedbrick);
//Traps
// Traps
ItemStack reed = new ItemStack(Items.sugar);
MantleClientRegistry.registerManualLargeRecipe("punji", new ItemStack(TRepo.punji), reed, null, reed, null, reed, null, reed, null, reed);
MantleClientRegistry.registerManualSmallRecipe("barricade", new ItemStack(TRepo.barricadeOak), null, log, null, log);
//Machines
// Machines
ItemStack alubrassIngot = new ItemStack(TRepo.materials, 1, 14);
ItemStack bronzeIngot = new ItemStack(TRepo.materials, 1, 13);
ItemStack blankCast = new ItemStack(TRepo.blankPattern, 1, 1);
@@ -1034,7 +1034,8 @@ public class TProxyClient extends TProxyCommon
@Override
public void postInit ()
{
//MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID, new RenderArmorCast());
// MinecraftForgeClient.registerItemRenderer(TRepo.armorPattern.itemID,
// new RenderArmorCast());
}
private static IIcon getIcon (IIcon icon)
@@ -52,7 +52,7 @@ public class ToolCoreRenderer implements IItemRenderer
if (data.length > 1)
ent = (Entity) data[1];
int iconParts = toolIcons;//tool.getRenderPasses(item.getItemDamage());
int iconParts = toolIcons;// tool.getRenderPasses(item.getItemDamage());
IIcon[] tempParts = new IIcon[iconParts];
label:
@@ -78,7 +78,8 @@ public class ToolCoreRenderer implements IItemRenderer
for (int i = 0; i < iconParts; ++i)
{
IIcon part = tempParts[i];
if (part == null)// || part == ToolCore.blankSprite | part == ToolCore.emptyIcon)
if (part == null)// || part == ToolCore.blankSprite | part ==
// ToolCore.emptyIcon)
++count;
else
parts[i - count] = part;
@@ -24,16 +24,17 @@ public class WingModel extends ModelBase
textureWidth = 64;
textureHeight = 64;
//Right Wing
// Right Wing
WingBaseRight = new ModelRenderer(this, 0, 41);
WingBaseRight.addBox(-0.5F, -1F, 0F, 1, 2, 10);
WingBaseRight.setRotationPoint(-1F, 1F, 0F);
setRotation(WingBaseRight, 0.5235988F, -0.5235988F, 0F);
WingEdgeRight = new ModelRenderer(this, 0, 53); //Texture position
WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); //Offset, Size
WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); //Negative x, y - 1, Position
setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); //Angle in radians
WingEdgeRight = new ModelRenderer(this, 0, 53); // Texture position
WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); // Offset, Size
WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); // Negative x, y - 1,
// Position
setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); // Angle in radians
WingInsetRight = new ModelRenderer(this, 6, 53);
WingInsetRight.addBox(0F, 0F, -1F, 1, 9, 2);
@@ -61,7 +62,7 @@ public class WingModel extends ModelBase
WingBaseRight.addChild(WingFlangeRight);
WingBaseRight.addChild(WingAuxRight);
//Left Wing
// Left Wing
WingBaseLeft = new ModelRenderer(this, 42, 41);
WingBaseLeft.addBox(-0.5F, -1F, 0F, 1, 2, 10);
WingBaseLeft.setRotationPoint(1F, 1F, 0F);
@@ -26,8 +26,8 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 0)
{
//if (type >= 0)
//TODO setRenderBounds
// if (type >= 0)
// TODO setRenderBounds
renderer.setRenderBounds(0.125, 0.0, 0.5, 0.375, 1.0, 0.75);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -52,7 +52,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 1)
{
//if (type >= 0)
// if (type >= 0)
renderer.setRenderBounds(0.25, 0.0, 0.125, 0.5, 1.0, 0.375);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -77,7 +77,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 2)
{
//if (type >= 0)
// if (type >= 0)
renderer.setRenderBounds(0.125, 0.0, 0.25, 0.375, 1.0, 0.5);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -102,7 +102,7 @@ public class BarricadeRender implements ISimpleBlockRenderingHandler
if (meta / 4 == 3)
{
//if (type >= 0)
// if (type >= 0)
renderer.setRenderBounds(0.5, 0.0, 0.125, 0.75, 1.0, 0.375);
renderer.renderStandardBlock(barricade, x, y, z);
@@ -25,27 +25,27 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
//Floor
// Floor
renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.6875D, 0.5D, 0.6875D);
this.renderStandardBlock(block, metadata, renderer);
//Channel Z-
// Channel Z-
renderer.setRenderBounds(0.3125D, 0.375D, 0D, 0.6875D, 0.5D, 0.3125D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.3125D, 0.5D, 0D, 0.375D, 0.625D, 0.3125D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.625D, 0.5D, 0D, 0.6875D, 0.625D, 0.3125D);
this.renderStandardBlock(block, metadata, renderer);
//Channel Z+
// Channel Z+
renderer.setRenderBounds(0.3125D, 0.375D, 0.6875D, 0.6875D, 0.5D, 1D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.3125D, 0.5D, 0.6875D, 0.375D, 0.625D, 1D);
this.renderStandardBlock(block, metadata, renderer);
renderer.setRenderBounds(0.625D, 0.5D, 0.6875D, 0.6875D, 0.625D, 1D);
this.renderStandardBlock(block, metadata, renderer);
//Wall X-
// Wall X-
renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, 0.625D, 0.6875D);
this.renderStandardBlock(block, metadata, renderer);
//Wall X+
// Wall X+
renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, 0.625D, 0.6875D);
this.renderStandardBlock(block, metadata, renderer);
}
@@ -57,13 +57,16 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
{
CastingChannelLogic tile = (CastingChannelLogic) world.getTileEntity(x, y, z);
if (!tile.hasTankConnected(ForgeDirection.DOWN))//CentrePiece, floor is removed if tank below is found
if (!tile.hasTankConnected(ForgeDirection.DOWN))// CentrePiece,
// floor is removed
// if tank below is
// found
{
renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.6875D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
else
//"Guiding Borders" when tank below is found
// "Guiding Borders" when tank below is found
{
renderer.setRenderBounds(0.375D, 0.125D, 0.3125D, 0.625D, 0.5D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
@@ -74,15 +77,17 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.625D, 0.125D, 0.3125D, 0.6875D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
/*renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D, 0.625D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.3125D, 0.375D, 0.625D, 0.375D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D, 0.625D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.625D, 0.375D, 0.625D, 0.6875D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);*/
if (tile.hasTankConnected(ForgeDirection.NORTH))//Channel to Z-
/*
* renderer.setRenderBounds(0.3125D, 0.375D, 0.3125D, 0.375D,
* 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.3125D, 0.375D, 0.625D, 0.375D, 0.625D,
* 0.6875D); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.625D, 0.375D, 0.3125D, 0.6875D,
* 0.625D, 0.375D); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.625D, 0.375D, 0.625D, 0.6875D, 0.625D,
* 0.6875D); renderer.renderStandardBlock(block, x, y, z);
*/
if (tile.hasTankConnected(ForgeDirection.NORTH))// Channel to Z-
{
renderer.setRenderBounds(0.3125D, 0.375D, 0D, 0.6875D, 0.5D, 0.3125D);
renderer.renderStandardBlock(block, x, y, z);
@@ -92,13 +97,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to Z-
// Wall to Z-
{
renderer.setRenderBounds(0.375D, 0.5D, 0.3125D, 0.625D, 0.625D, 0.375D);
renderer.renderStandardBlock(block, x, y, z);
}
if (tile.hasTankConnected(ForgeDirection.SOUTH))//Channel to Z+
if (tile.hasTankConnected(ForgeDirection.SOUTH))// Channel to Z+
{
renderer.setRenderBounds(0.3125D, 0.375D, 0.6875D, 0.6875D, 0.5D, 1D);
renderer.renderStandardBlock(block, x, y, z);
@@ -108,13 +113,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to Z+
// Wall to Z+
{
renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
if (tile.hasTankConnected(ForgeDirection.WEST))//Channel to X-
if (tile.hasTankConnected(ForgeDirection.WEST))// Channel to X-
{
renderer.setRenderBounds(0D, 0.375D, 0.3125D, 0.3125D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
@@ -124,13 +129,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to X-
// Wall to X-
{
renderer.setRenderBounds(0.3125D, 0.5D, 0.3125D, 0.375D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
}
if (tile.hasTankConnected(ForgeDirection.EAST))//Channel to X+
if (tile.hasTankConnected(ForgeDirection.EAST))// Channel to X+
{
renderer.setRenderBounds(0.6875D, 0.375D, 0.3125D, 1D, 0.5D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
@@ -140,7 +145,7 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
}
else
//Wall to X+
// Wall to X+
{
renderer.setRenderBounds(0.625D, 0.5D, 0.3125D, 0.6875D, 0.625D, 0.6875D);
renderer.renderStandardBlock(block, x, y, z);
@@ -151,12 +156,13 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
float height = tile.getLiquidAmount() / (tile.getCapacity() * 1.05F);
float j = tile.liquid.amount / tile.fillMax;
double startY = tile.tankBelow();
//if(tile.nearbyChannel(ForgeDirection.DOWN))startY = -0.5D;
//else if(tile.hasTankConnected(ForgeDirection.DOWN))startY = 0D;
// if(tile.nearbyChannel(ForgeDirection.DOWN))startY = -0.5D;
// else if(tile.hasTankConnected(ForgeDirection.DOWN))startY =
// 0D;
float liquidAmount = tile.liquid.amount / 288f * 0.125f;
renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); //Center
renderer.setRenderBounds(0.375D, startY, 0.375D, 0.625D, 0.5 + liquidAmount, 0.625D); // Center
renderLiquidPart(world, x, y, z, block, renderer, tile);
//TConstruct.logger.info(tile.recentlyFilledDelay);
// TConstruct.logger.info(tile.recentlyFilledDelay);
if (tile.hasTankConnected(ForgeDirection.NORTH))
{
@@ -223,84 +229,71 @@ public class BlockRenderCastingChannel implements ISimpleBlockRenderingHandler
}
}
/*if(tile.lastProvider==ForgeDirection.UP && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.375D, 0.5D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}*/
/*
* if(tile.lastProvider==ForgeDirection.UP &&
* tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.375D, 0.5D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); }
*/
/*if(tile.hasTankConnected(ForgeDirection.NORTH)&&tile.lastProvider!=ForgeDirection.NORTH)//Channel to Z-
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, 0.375D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.hasTankConnected(ForgeDirection.SOUTH)&&tile.lastProvider!=ForgeDirection.SOUTH)//Channel to Z+
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 1D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.hasTankConnected(ForgeDirection.WEST)&&tile.lastProvider!=ForgeDirection.WEST)//Channel to X-
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0D, 0.5D, 0.375D, 0.375D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.hasTankConnected(ForgeDirection.EAST)&&tile.lastProvider!=ForgeDirection.EAST)//Channel to X+
{
if(tile.recentlyFilledDelay == 0 || tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.recentlyFilledDelay != 0 && tile.lastProvider == ForgeDirection.UP)
{
renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
}
if(tile.lastProvider==ForgeDirection.NORTH && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D, 0.625D, 1D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.lastProvider==ForgeDirection.SOUTH && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D, 0.375D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.lastProvider==ForgeDirection.WEST && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}
if(tile.lastProvider==ForgeDirection.EAST && tile.recentlyFilledDelay != 0)
{
renderer.setRenderBounds(0D, 0.5D, 0.375D, 0.375D, 0.625D, 0.625D);
renderLiquidPart(world, x, y, z, block, renderer, tile);
}*/
/*
* if(tile.hasTankConnected(ForgeDirection.NORTH)&&tile.lastProvider
* !=ForgeDirection.NORTH)//Channel to Z- {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0.375D, 0.5D,
* 0D, 0.625D, 0.625D, 0.375D); renderLiquidPart(world, x, y, z,
* block, renderer, tile); } if(tile.recentlyFilledDelay != 0 &&
* tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } }
* if(tile.hasTankConnected(ForgeDirection.SOUTH)&&tile
* .lastProvider!=ForgeDirection.SOUTH)//Channel to Z+ {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0.375D, 0.5D,
* 0.625D, 0.625D, 0.625D, 1D); renderLiquidPart(world, x, y, z,
* block, renderer, tile); } if(tile.recentlyFilledDelay != 0 &&
* tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } }
* if(tile.hasTankConnected(ForgeDirection.WEST)&&tile
* .lastProvider!=ForgeDirection.WEST)//Channel to X- {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0D, 0.5D,
* 0.375D, 0.375D, 0.625D, 0.625D); renderLiquidPart(world, x,
* y, z, block, renderer, tile); } if(tile.recentlyFilledDelay
* != 0 && tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } }
* if(tile.hasTankConnected(ForgeDirection.EAST)&&tile
* .lastProvider!=ForgeDirection.EAST)//Channel to X+ {
* if(tile.recentlyFilledDelay == 0 || tile.lastProvider ==
* ForgeDirection.UP) { renderer.setRenderBounds(0.625D, 0.5D,
* 0.375D, 1D, 0.625D, 0.625D); renderLiquidPart(world, x, y, z,
* block, renderer, tile); } if(tile.recentlyFilledDelay != 0 &&
* tile.lastProvider == ForgeDirection.UP) {
* renderer.setRenderBounds(0.375D, 0.375D, 0.375D, 0.625D, 1D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } } if(tile.lastProvider==ForgeDirection.NORTH &&
* tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.375D, 0.5D, 0.625D, 0.625D,
* 0.625D, 1D); renderLiquidPart(world, x, y, z, block,
* renderer, tile); } if(tile.lastProvider==ForgeDirection.SOUTH
* && tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.375D, 0.5D, 0D, 0.625D, 0.625D,
* 0.375D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } if(tile.lastProvider==ForgeDirection.WEST &&
* tile.recentlyFilledDelay != 0) {
* renderer.setRenderBounds(0.625D, 0.5D, 0.375D, 1D, 0.625D,
* 0.625D); renderLiquidPart(world, x, y, z, block, renderer,
* tile); } if(tile.lastProvider==ForgeDirection.EAST &&
* tile.recentlyFilledDelay != 0) { renderer.setRenderBounds(0D,
* 0.5D, 0.375D, 0.375D, 0.625D, 0.625D);
* renderLiquidPart(world, x, y, z, block, renderer, tile); }
*/
}
}
@@ -13,7 +13,7 @@ public class BlockSkinRenderHelper
{
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
//TODO CHECK THESE!!!!
// TODO CHECK THESE!!!!
int var5 = block.colorMultiplier(world, x, y, z);
float var6 = (float) (var5 >> 16 & 255) / 255.0F;
float var7 = (float) (var5 >> 8 & 255) / 255.0F;
@@ -52,7 +52,7 @@ public class CastingBasinSpecialRender extends TileEntitySpecialRenderer
entityitem.hoverStart = 0.0F;
GL11.glPushMatrix();
GL11.glTranslatef(1F, 0.675F, 1.0F);
//GL11.glRotatef(90F, 1, 0F, 0F);
// GL11.glRotatef(90F, 1, 0F, 0F);
GL11.glScalef(1.75F, 1.75F, 1.75F);
if (stack.getItem() instanceof ItemBlock)
{
@@ -23,7 +23,7 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
@Override
public void renderTileEntityAt (TileEntity logic, double var2, double var4, double var6, float var8)
{
//TConstruct.logger.info("Render!!!");
// TConstruct.logger.info("Render!!!");
this.render((CastingTableLogic) logic, var2, var4, var6, var8);
}
@@ -69,7 +69,7 @@ public class DryingRackSpecialRender extends TileEntitySpecialRenderer
GL11.glScalef(2F, 2F, 2F);
if (stack.getItem() instanceof ItemBlock)
{
//GL11.glRotatef(90F, -1, 0F, 0F);
// GL11.glRotatef(90F, -1, 0F, 0F);
GL11.glTranslatef(0F, 0.2125F, 0.0375F);
}
@@ -13,7 +13,7 @@ public class FrypanRender implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
//Inventory should be an item. This is not here!
// Inventory should be an item. This is not here!
}
@Override
@@ -29,8 +29,8 @@ public class FrypanRender implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.125F, 0.125F, 0.0F, 0.875F, 0.25F, 0.125F);
renderer.renderStandardBlock(block, x, y, z);
// renderer.setRenderBounds(1F, 0.0F, 0.4375F, 2F, 0.125F, 0.5625F);
// renderer.renderStandardBlock(block, x, y, z);
// renderer.setRenderBounds(1F, 0.0F, 0.4375F, 2F, 0.125F, 0.5625F);
// renderer.renderStandardBlock(block, x, y, z);
renderHandle(world, x, y, z, block, renderer);
return true;
}
@@ -47,11 +47,11 @@ public class PaneConnectedRender implements ISimpleBlockRenderingHandler
}
else
{
// renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D);
// renderer.renderStandardBlock(block, x, y, z);
// renderer.setRenderBounds(0.45D, 0D, 0.45D, 0.55D, 1D, 0.55D);
// renderer.renderStandardBlock(block, x, y, z);
}
// renderer.setOverrideBlockTexture(sideTexture);
// renderer.setOverrideBlockTexture(sideTexture);
if (flag)
{
@@ -96,27 +96,22 @@ public class PaneRender implements ISimpleBlockRenderingHandler
double d8 = (double) icon1.getInterpolatedV(8.0D);
double d9 = (double) icon1.getMaxV();
/*int blockTextureIndex;
int blockSideIndex;
int j1 = iblockaccess.getBlockMetadata(x, y, z);
blockTextureIndex = pane.getBlockTextureFromSideAndMetadata(0, j1);
blockSideIndex = pane.getSideTextureIndex(j1);
int k1 = (blockTextureIndex & 0xf) << 4;
int j2 = blockTextureIndex & 0xf0;
double d = (float) k1 / 256F;
double d1 = ((float) k1 + 7.99F) / 256F;
double d2 = ((float) k1 + 15.99F) / 256F;
double d3 = (float) j2 / 256F;
double d4 = ((float) j2 + 15.99F) / 256F;
int k2 = (blockSideIndex & 0xf) << 4;
int l2 = blockSideIndex & 0xf0;
double d5 = (float) (k2 + 7) / 256F;
double d6 = ((float) k2 + 8.99F) / 256F;
double d7 = (float) l2 / 256F;
double d8 = (float) (l2 + 8) / 256F;
double d9 = ((float) l2 + 15.99F) / 256F;*/
/*
* int blockTextureIndex; int blockSideIndex;
*
* int j1 = iblockaccess.getBlockMetadata(x, y, z); blockTextureIndex =
* pane.getBlockTextureFromSideAndMetadata(0, j1); blockSideIndex =
* pane.getSideTextureIndex(j1);
*
* int k1 = (blockTextureIndex & 0xf) << 4; int j2 = blockTextureIndex &
* 0xf0; double d = (float) k1 / 256F; double d1 = ((float) k1 + 7.99F)
* / 256F; double d2 = ((float) k1 + 15.99F) / 256F; double d3 = (float)
* j2 / 256F; double d4 = ((float) j2 + 15.99F) / 256F; int k2 =
* (blockSideIndex & 0xf) << 4; int l2 = blockSideIndex & 0xf0; double
* d5 = (float) (k2 + 7) / 256F; double d6 = ((float) k2 + 8.99F) /
* 256F; double d7 = (float) l2 / 256F; double d8 = (float) (l2 + 8) /
* 256F; double d9 = ((float) l2 + 15.99F) / 256F;
*/
double xBot = x;
double xMid = (double) x + 0.5D;
@@ -52,24 +52,20 @@ public class PunjiRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.75, 0.0, 0.125, 0.875, 0.375f, 0.25);
renderer.renderStandardBlock(block, x, y, z);
}
/*if (metadata == 5)
{
renderer.setRenderBounds(0.0F, 0.0, 0.0F, 1.0F, 0.875F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
}
else
{
renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F, 1.0F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
}*/
/*
* if (metadata == 5) { renderer.setRenderBounds(0.0F, 0.0, 0.0F,
* 1.0F, 0.875F, 1.0F); renderer.renderStandardBlock(block, x, y,
* z); } else { renderer.setRenderBounds(0.0F, 0.75F, 0.0F, 1.0F,
* 1.0F, 1.0F); renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.25F, 0.75F, 0.25F);
* renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.75F, 0.0F, 0.0F, 1.0F, 0.75F, 0.25F);
* renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.0F, 0.0F, 0.75F, 0.25F, 0.75F, 1.0F);
* renderer.renderStandardBlock(block, x, y, z);
* renderer.setRenderBounds(0.75F, 0.0F, 0.75F, 1.0F, 0.75F, 1.0F);
* renderer.renderStandardBlock(block, x, y, z); }
*/
}
return true;
}
@@ -14,7 +14,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
/**
*
* @author fuj1n
*
*
*/
public class RenderLandmine implements ISimpleBlockRenderingHandler
{
@@ -56,7 +56,7 @@ public class RenderLandmine implements ISimpleBlockRenderingHandler
ForgeDirection dir = Helper.convertMetaToForgeOrientation(i1);
//TConstruct.logger.info(i1 + " for " + dir);
// TConstruct.logger.info(i1 + " for " + dir);
switch (dir)
{
@@ -14,7 +14,7 @@ import net.minecraft.world.IBlockAccess;
*/
public class RenderLiquid
{//TODO CHECK THIS!!!!
{// TODO CHECK THIS!!!!
public static boolean renderMetadataBlock (Block block, int metadata, int x, int y, int z, RenderBlocks renderer, IBlockAccess world)
{
int var5 = block.colorMultiplier(world, x, y, z);
@@ -26,11 +26,11 @@ public class SearedRender implements ISimpleBlockRenderingHandler
{
if (metadata == 0)
{
//Top
// Top
renderer.setRenderBounds(0.0F, 0.625F, 0.0F, 1.0F, 0.9375F, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Lip
// Lip
renderer.setRenderBounds(0.0F, 0.9375, 0.0F, 0.0625, 1.0, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.0625, 0.9375, 0.9375, 0.9375, 1.0, 1.0F);
@@ -40,7 +40,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.0625, 0.9375, 0.0F, 0.9375, 1.0, 0.0625);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.625F, 0.3125F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.6875, 0.0F, 0.0F, 1.0F, 0.625F, 0.25F);
@@ -65,7 +65,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.125F, 0.125f, 0.125F, 0.875F, 0.25F, 0.875F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Details
// Details
renderer.setRenderBounds(0.001f, 0.1245f, 0.001f, 0.1245f, 0.999f, 0.4375f);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.001f, 0.1245f, 0.5625f, 0.1245f, 0.999f, 0.999f);
@@ -102,7 +102,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.4375f, 0.1245f, 0.001f, 0.5625f, 0.25F, 0.1245f);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.125, 0.3125F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.6875F, 0.0F, 0.0F, 1.0F, 0.125, 0.3125F);
@@ -112,7 +112,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.6875F, 0.0F, 0.6875F, 1.0F, 0.125, 1.0F);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
//Outside
// Outside
renderer.setRenderBounds(0.0f, 0.125, 0f, 0.125, 1.0F, 1);
TProxyClient.renderStandardInvBlock(renderer, block, metadata);
renderer.setRenderBounds(0.875f, 0.125, 0f, 1, 1.0F, 1);
@@ -138,11 +138,11 @@ public class SearedRender implements ISimpleBlockRenderingHandler
int metadata = world.getBlockMetadata(x, y, z);
if (metadata == 0)
{
//Top
// Top
renderer.setRenderBounds(0.0F, 0.625F, 0.0F, 1.0F, 0.9375F, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
//Lip
// Lip
renderer.setRenderBounds(0.0F, 0.9375, 0.0F, 0.0625, 1.0, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.0625, 0.9375, 0.9375, 0.9375, 1.0, 1.0F);
@@ -152,7 +152,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.0625, 0.9375, 0.0F, 0.9375, 1.0, 0.0625);
renderer.renderStandardBlock(block, x, y, z);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.625F, 0.3125F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.6875, 0.0F, 0.0F, 1.0F, 0.625F, 0.25F);
@@ -193,7 +193,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler
float percent = (float) logic.getLiquidAmount() / (float) logic.getCapacity();
float height = percent * (maxHeight - minHeight);
//float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F;
// float height = logic.getLiquidAmount() /
// (logic.getCapacity() * 1.03F) / 16F;
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
Fluid fluid = logic.liquid.getFluid();
@@ -218,7 +219,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.375, 0.375, 0.625, 0.625, 0.625, 1);
zMin = 0.5F;
//zMin = 0.625F;
// zMin = 0.625F;
break;
case 3:
renderer.setRenderBounds(0.25, 0.25, 0, 0.75, 0.375, 0.375);
@@ -278,7 +279,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(xMin, yMin, zMin, xMax, 0.625, zMax);
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), x, y, z, renderer, world);
//float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F, zMax = 0.625F;
// float xMin = 0.375F, zMin = 0.375F, xMax = 0.625F,
// zMax = 0.625F;
switch (logic.getRenderDirection())
{
case 3:
@@ -308,7 +310,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.125F, 0.125f, 0.125F, 0.875F, 0.25F, 0.875F);
renderer.renderStandardBlock(block, x, y, z);
//Outside
// Outside
renderer.setRenderBounds(0.0f, 0.125, 0f, 0.125, 1.0F, 1);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.875f, 0.125, 0f, 1, 1.0F, 1);
@@ -318,7 +320,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.125f, 0.125, 0.875f, 0.875f, 1.0F, 1);
renderer.renderStandardBlock(block, x, y, z);
//Details
// Details
renderer.setRenderBounds(0.001f, 0.1245f, 0.001f, 0.1245f, 0.999f, 0.4375f);
renderer.renderStandardBlock(block, x, y, z);
@@ -356,7 +358,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.4375f, 0.1245f, 0.001f, 0.5625f, 0.25F, 0.1245f);
renderer.renderStandardBlock(block, x, y, z);
//Legs
// Legs
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 0.3125F, 0.125, 0.3125F);
renderer.renderStandardBlock(block, x, y, z);
renderer.setRenderBounds(0.6875F, 0.0F, 0.0F, 1.0F, 0.125, 0.3125F);
@@ -366,7 +368,7 @@ public class SearedRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(0.6875F, 0.0F, 0.6875F, 1.0F, 0.125, 1.0F);
renderer.renderStandardBlock(block, x, y, z);
//Liquids
// Liquids
if (world.getTileEntity(x, y, z) instanceof CastingBasinLogic)
{
CastingBasinLogic logic = (CastingBasinLogic) world.getTileEntity(x, y, z);
@@ -398,7 +400,8 @@ public class SearedRender implements ISimpleBlockRenderingHandler
float percent = (float) logic.getLiquidAmount() / (float) logic.getCapacity();
float height = percent * (maxHeight - minHeight);
//float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
// float height = (logic.getLiquidAmount() /
// (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
Fluid fluid = logic.liquid.getFluid();
@@ -46,7 +46,7 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler
Tessellator tessellator = Tessellator.instance;
int bMeta = world.getBlockMetadata(x, y, z);
IIcon iconStill = block.getIcon(1, bMeta);
float flowDir = (float) (bMeta / 8f * 2 * Math.PI); //Tau, radians
float flowDir = (float) (bMeta / 8f * 2 * Math.PI); // Tau, radians
double u1, u2, u3, u4, v1, v2, v3, v4;
@@ -87,19 +87,15 @@ public class SlimeChannelRender implements ISimpleBlockRenderingHandler
tessellator.addVertexWithUV(x + 1, y + 0.5, z + 0, u3, v3);
}
renderer.renderStandardBlock(block, x, y, z);
/*int direction = world.getBlockMetadata(x, y, z) % 4;
if (direction == 0)
renderer.uvRotateTop = 2;
if (direction == 1)
renderer.uvRotateTop = 1;
if (direction == 2)
renderer.uvRotateTop = 0;
if (direction == 3)
renderer.uvRotateTop = 3;
boolean flag = renderer.renderStandardBlock(block, x, y, z);
renderer.uvRotateTop = 0;
return flag;*/
/*
* int direction = world.getBlockMetadata(x, y, z) % 4; if (direction ==
* 0) renderer.uvRotateTop = 2; if (direction == 1) renderer.uvRotateTop
* = 1; if (direction == 2) renderer.uvRotateTop = 0; if (direction ==
* 3) renderer.uvRotateTop = 3;
*
* boolean flag = renderer.renderStandardBlock(block, x, y, z);
* renderer.uvRotateTop = 0; return flag;
*/
return true;
}
@@ -41,7 +41,7 @@ public class SlimePadRender implements ISimpleBlockRenderingHandler
float[] size (int meta)
{
//xMin, zMin, xMax, zMax
// xMin, zMin, xMax, zMax
switch (meta)
{
case 0:
@@ -47,7 +47,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
if (logic.validStructure)
{
int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1;
//Melting
// Melting
if (logic.getSizeInventory() > 0)
{
for (int i = 0; i < logic.layers; i++)
@@ -56,7 +56,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
}
}
//Liquids
// Liquids
float base = 0F;
int yBase = 0;
int liquidBase = 0;
@@ -70,7 +70,8 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
liquidSize -= countSize;
float height = countSize > 20000 ? 1.0F : countSize / 20000F;
//renderer.setRenderBounds(0, base, 0, 1, height + base, 1);
// renderer.setRenderBounds(0, base, 0, 1, height + base,
// 1);
float renderBase = base;
float renderHeight = height + base;
base += height;
@@ -89,33 +90,27 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
else
BlockSkinRenderHelper.renderLiquidBlock(fluid.getStillIcon(), fluid.getFlowingIcon(), posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
}
/*if (liquid.itemID < 4096) //Block
{
Block liquidBlock = Block.blocksList[liquid.itemID];
for (int i = 0; i < 9; i++)
{
float minX = i % 3 == 0 ? -0.001F : 0F;
float minZ = i / 3 == 0 ? -0.001F : 0F;
float maxX = i % 3 == 2 ? 1.001F : 1F;
float maxZ = i / 3 == 2 ? 1.001F : 1F;
renderer.setRenderBounds(minX, renderBase, minZ, maxX, renderHeight, maxZ);
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, liquid.itemMeta, posX + i % 3, posY + yBase, posZ + i / 3, renderer, world);
}
}
else
//Item
{
Item liquidItem = Item.itemsList[liquid.itemID];
for (int i = 0; i < 9; i++)
{
float minX = i % 3 == 0 ? -0.001F : 0F;
float minZ = i / 3 == 0 ? -0.001F : 0F;
float maxX = i % 3 == 2 ? 1.001F : 1F;
float maxZ = i / 3 == 2 ? 1.001F : 1F;
renderer.setRenderBounds(minX, renderBase, minZ, maxX, renderHeight, maxZ);
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(liquid.itemMeta), posX, posY + yBase, posZ, renderer, world);
}
}*/
/*
* if (liquid.itemID < 4096) //Block { Block liquidBlock =
* Block.blocksList[liquid.itemID]; for (int i = 0; i < 9;
* i++) { float minX = i % 3 == 0 ? -0.001F : 0F; float minZ
* = i / 3 == 0 ? -0.001F : 0F; float maxX = i % 3 == 2 ?
* 1.001F : 1F; float maxZ = i / 3 == 2 ? 1.001F : 1F;
* renderer.setRenderBounds(minX, renderBase, minZ, maxX,
* renderHeight, maxZ);
* BlockSkinRenderHelper.renderMetadataBlock(liquidBlock,
* liquid.itemMeta, posX + i % 3, posY + yBase, posZ + i /
* 3, renderer, world); } } else //Item { Item liquidItem =
* Item.itemsList[liquid.itemID]; for (int i = 0; i < 9;
* i++) { float minX = i % 3 == 0 ? -0.001F : 0F; float minZ
* = i / 3 == 0 ? -0.001F : 0F; float maxX = i % 3 == 2 ?
* 1.001F : 1F; float maxZ = i / 3 == 2 ? 1.001F : 1F;
* renderer.setRenderBounds(minX, renderBase, minZ, maxX,
* renderHeight, maxZ);
* BlockSkinRenderHelper.renderFakeBlock
* (liquidItem.getIconFromDamage(liquid.itemMeta), posX,
* posY + yBase, posZ, renderer, world); } }
*/
if (countSize == room)
{
@@ -143,20 +138,21 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
float blockHeight = input.stackSize / (float) blockToRender.stackSize;
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, MathHelper.clamp_float(blockHeight, 0.01F, 1.0F), 1.0F);
//TODO is this needed???
//if (blockToRender.itemID < 4096) //Block
// TODO is this needed???
// if (blockToRender.itemID < 4096) //Block
// {
Block liquidBlock = BlockUtils.getBlockFromItemStack(blockToRender);
BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, blockToRender.getItemDamage(), posX + i % 3, posY, posZ + i / 3, renderer, world);
//}
// }
/*else //No items, only blocks
//Item
{
Item liquidItem = Item.itemsList[blockToRender.itemID];
int metadata = blockToRender.getItemDamage();
BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), posX + i % 3, posY, posZ + i / 3, renderer, world);
}*/
/*
* else //No items, only blocks //Item { Item liquidItem =
* Item.itemsList[blockToRender.itemID]; int metadata =
* blockToRender.getItemDamage();
* BlockSkinRenderHelper.renderFakeBlock
* (liquidItem.getIconFromDamage(metadata), posX + i % 3,
* posY, posZ + i / 3, renderer, world); }
*/
}
}
}
@@ -21,7 +21,7 @@ public class TankAirRender implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
{
//No inventory block
// No inventory block
}
@Override
@@ -47,7 +47,8 @@ public class TankAirRender implements ISimpleBlockRenderingHandler
for (FluidStack fluidstack : logic.getFluids())
{
Fluid fluid = fluidstack.getFluid();
//System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base, fluidstack.amount)+", fluid amount: "+fluidstack.amount);
// System.out.println("Base: "+getBaseAmount(base)+", Height: "+getHeightAmount(base,
// fluidstack.amount)+", fluid amount: "+fluidstack.amount);
renderer.setRenderBounds(0.0, getBaseAmount(base), 0.0, 1.0, getHeightAmount(base, fluidstack.amount), 1.0);
if (fluid.canBePlacedInWorld())
BlockSkinRenderHelper.renderMetadataBlock(fluid.getBlock(), 0, x, y, z, renderer, world);
@@ -38,7 +38,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
{
if (modelID == tankModelID)
{
//Liquid
// Liquid
LavaTankLogic logic = (LavaTankLogic) world.getTileEntity(x, y, z);
if (logic.containsFluid())
{
@@ -53,7 +53,7 @@ public class TankRender implements ISimpleBlockRenderingHandler
renderer.setRenderBounds(00, 0.001, 0.001, 0.999, logic.getFluidAmountScaled(), 0.999);
}
//Block
// Block
int meta = world.getBlockMetadata(x, y, z);
if (meta == 0 && world.getBlock(x, y + 1, z) == Blocks.air)
{
@@ -90,7 +90,7 @@ public class CartRender extends Render
if (cart.getCartType() != 0)
{
//this.loadTexture("/terrain.png");
// this.loadTexture("/terrain.png");
float var29 = 0.75F;
GL11.glScalef(var29, var29, var29);
@@ -111,20 +111,22 @@ public class CartRender extends Render
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
//GL11.glScalef(1.0F / var29, 1.0F / var29, 1.0F / var29);
// GL11.glScalef(1.0F / var29, 1.0F / var29, 1.0F / var29);
}
//this.loadTexture("/tinkertextures/entity/pullcart.png");
// this.loadTexture("/tinkertextures/entity/pullcart.png");
GL11.glScalef(-1.0F, -1.0F, 1.0F);
this.modelCart.render(cart, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
/**
* 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 doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* 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 doRender(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 par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -4,47 +4,31 @@ import net.minecraft.client.model.ModelBase;
public class CrystalModelSmall extends ModelBase
{
/*ModelRenderer body;
ModelRendererTurbo top;
ModelRendererTurbo bottom;
public CrystalModelSmall()
{
textureWidth = 32;
textureHeight = 32;
body = new ModelRenderer(this, 0, 8);
body.addBox(-2F, 0F, -2F, 4, 6, 4);
body.setRotationPoint(0F, 0F, 0F);
setRotation(body, 0, 0.7853982F, 0);
top = new ModelRendererTurbo(this, 0, 0, 32, 32);
top.addCone(0, 0, 0, 2.8F, 4, 4, 0, ModelRendererTurbo.MR_BOTTOM, 4, 8);
top.setRotationPoint(0F, -4F, 0F);
setRotation(top, 0F, 0F, 0F);
bottom = new ModelRendererTurbo(this, 0, 18, 32, 32);
top.addCone(0, 10, 0, 2.8F, 4, 4, 0, ModelRendererTurbo.MR_TOP, 4, 8);
bottom.setRotationPoint(0F, 6F, 0F);
//setRotation(bottom, 0F, 0F, 0F);
}
public void render (Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity);
body.render(f5);
top.render(f5);
bottom.render(f5);
}
private void setRotation (ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
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);
}*/
/*
* ModelRenderer body; ModelRendererTurbo top; ModelRendererTurbo bottom;
*
* public CrystalModelSmall() { textureWidth = 32; textureHeight = 32;
*
* body = new ModelRenderer(this, 0, 8); body.addBox(-2F, 0F, -2F, 4, 6, 4);
* body.setRotationPoint(0F, 0F, 0F); setRotation(body, 0, 0.7853982F, 0);
* top = new ModelRendererTurbo(this, 0, 0, 32, 32); top.addCone(0, 0, 0,
* 2.8F, 4, 4, 0, ModelRendererTurbo.MR_BOTTOM, 4, 8);
* top.setRotationPoint(0F, -4F, 0F); setRotation(top, 0F, 0F, 0F); bottom =
* new ModelRendererTurbo(this, 0, 18, 32, 32); top.addCone(0, 10, 0, 2.8F,
* 4, 4, 0, ModelRendererTurbo.MR_TOP, 4, 8); bottom.setRotationPoint(0F,
* 6F, 0F); //setRotation(bottom, 0F, 0F, 0F); }
*
* public void render (Entity entity, float f, float f1, float f2, float f3,
* float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5);
* setRotationAngles(f, f1, f2, f3, f4, f5, entity); body.render(f5);
* top.render(f5); bottom.render(f5); }
*
* private void setRotation (ModelRenderer model, float x, float y, float z)
* { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z;
* }
*
* 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); }
*/
}
@@ -35,16 +35,17 @@ public class CrystalRender extends RenderLiving
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
* Allows the render to do any OpenGL state modifications necessary before
* the model is rendered. Args: entityLiving, partialTickTime
*/
/*
* protected void preRenderCallback(EntityLiving par1EntityLiving, float
* par2) { this.updateCreeperScale((Skyla)par1EntityLiving, par2); }
*/
/*protected void preRenderCallback(EntityLiving par1EntityLiving, float par2)
{
this.updateCreeperScale((Skyla)par1EntityLiving, par2);
}*/
/**
* Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime
* Returns an ARGB int color back. Args: entityLiving, lightBrightness,
* partialTickTime
*/
protected int getColorMultiplier (EntityLiving par1EntityLiving, float par2, float par3)
{
@@ -242,7 +242,8 @@ public class FancyItemRender extends Render
for (int k = 0; k < b0; ++k)
{
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
// Makes items offset when in 3D, like when in 2D, looks much
// better. Considered a vanilla bug...
if (k > 0 && shouldSpreadItems())
{
float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
@@ -320,7 +321,7 @@ public class FancyItemRender extends Render
int i1;
float f1;
float f2;
//TODO make this be the block equivalent to k
// TODO make this be the block equivalent to k
Block block = BlockUtils.getBlockFromItem(k);
if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(block.getRenderType()))
{
@@ -439,25 +440,20 @@ public class FancyItemRender extends Render
this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
}
/* Modders must handle this themselves if they use custom renderers!
if (par3ItemStack.hasEffect())
{
GL11.glDepthFunc(GL11.GL_GREATER);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
par2TextureManager.bindTexture(RES_ITEM_GLINT);
this.zLevel -= 50.0F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
this.renderGlint(par4 * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
this.zLevel += 50.0F;
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
*/
/*
* Modders must handle this themselves if they use custom renderers!
* if (par3ItemStack.hasEffect()) {
* GL11.glDepthFunc(GL11.GL_GREATER);
* GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false);
* par2TextureManager.bindTexture(RES_ITEM_GLINT); this.zLevel -=
* 50.0F; GL11.glEnable(GL11.GL_BLEND);
* GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
* GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F); this.renderGlint(par4 *
* 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
* GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true);
* this.zLevel += 50.0F; GL11.glEnable(GL11.GL_LIGHTING);
* GL11.glDepthFunc(GL11.GL_LEQUAL); }
*/
}
}
@@ -498,8 +494,8 @@ public class FancyItemRender extends Render
}
/**
* Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the
* specified position.
* Renders the item's overlay information. Examples being stack count or
* damage on top of the item's image at the specified position.
*/
public void renderItemOverlayIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5)
{
@@ -542,8 +538,8 @@ public class FancyItemRender extends Render
}
/**
* Adds a quad to the tesselator at the specified position with the set width and height and color. Args:
* tessellator, x, y, width, height, color
* Adds a quad to the tesselator at the specified position with the set
* width and height and color. Args: tessellator, x, y, width, height, color
*/
private void renderQuad (Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
{
@@ -573,10 +569,12 @@ public class FancyItemRender extends Render
}
/**
* 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 doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* 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 doRender(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 par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -585,6 +583,7 @@ public class FancyItemRender extends Render
/**
* Items should spread out when rendered in 3d?
*
* @return
*/
public boolean shouldSpreadItems ()
@@ -594,6 +593,7 @@ public class FancyItemRender extends Render
/**
* Items should have a bob effect
*
* @return
*/
public boolean shouldBob ()
@@ -618,6 +618,7 @@ public class FancyItemRender extends Render
/**
* Allows for a subclass to override how many rendered items appear in a
* "mini item 3d stack"
*
* @param stack
* @return
*/
@@ -80,8 +80,8 @@ public class SlimeRender extends RenderLiving
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
* Allows the render to do any OpenGL state modifications necessary before
* the model is rendered. Args: entityLiving, partialTickTime
*/
@Override
protected void preRenderCallback (EntityLivingBase par1EntityLiving, float par2)
@@ -77,7 +77,8 @@ public class ExplosiveRender extends Render
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
* Returns the location of an entity's texture. Doesn't seem to be called
* unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture (Entity par1Entity)
{
@@ -85,10 +86,12 @@ public class ExplosiveRender extends Render
}
/**
* 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 doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* 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 doRender(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 par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -206,7 +206,8 @@ public class ArrowRender extends Render
{
GL11.glRotatef(arrow.prevRotationYaw + (arrow.rotationYaw - arrow.prevRotationYaw) * par4 - 90.0F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(arrow.prevRotationPitch + (arrow.rotationPitch - arrow.prevRotationPitch) * par4 - 45.0F, 0.0F, 0.0F, 1.0F);
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
// Makes items offset when in 3D, like when in 2D, looks much
// better. Considered a vanilla bug...
if (k > 0 && shouldSpreadItems())
{
float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
@@ -273,10 +274,12 @@ public class ArrowRender extends Render
}
/**
* 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 doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* 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 doRender(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 par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -285,6 +288,7 @@ public class ArrowRender extends Render
/**
* Items should spread out when rendered in 3d?
*
* @return
*/
public boolean shouldSpreadItems ()
@@ -294,6 +298,7 @@ public class ArrowRender extends Render
/**
* Items should have a bob effect
*
* @return
*/
public boolean shouldBob ()
@@ -216,8 +216,10 @@ public class DaggerRender extends Render
float f11;
float rotation = dagger.prevRotationPitch + (dagger.rotationPitch - dagger.prevRotationPitch) * par7 * -20;
//GL11.glRotatef(arrow.prevRotationYaw + (arrow.rotationYaw - arrow.prevRotationYaw) * par4 - 90.0F, 0.0F, 1.0F, 0.0F);
//GL11.glRotatef(arrow.prevRotationPitch + (arrow.rotationPitch - arrow.prevRotationPitch) * par4 - 45.0F, 0.0F, 0.0F, 1.0F);
// GL11.glRotatef(arrow.prevRotationYaw + (arrow.rotationYaw -
// arrow.prevRotationYaw) * par4 - 90.0F, 0.0F, 1.0F, 0.0F);
// GL11.glRotatef(arrow.prevRotationPitch + (arrow.rotationPitch -
// arrow.prevRotationPitch) * par4 - 45.0F, 0.0F, 0.0F, 1.0F);
GL11.glPushMatrix();
@@ -240,7 +242,8 @@ public class DaggerRender extends Render
for (int k = 0; k < b0; ++k)
{
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
// Makes items offset when in 3D, like when in 2D, looks much
// better. Considered a vanilla bug...
GL11.glTranslatef(0f, 0f, f12 + f11);
if (itemstack.getItemSpriteNumber() == 0)
@@ -257,36 +260,28 @@ public class DaggerRender extends Render
GL11.glRotatef(rotation, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, f5, f6, f4, f7, ((IIcon) par2Icon).getIconWidth(), ((IIcon) par2Icon).getIconHeight(), f12);
/*if (itemstack.hasEffect(pass))
{
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
this.renderManager.renderEngine.bindTexture(RES_ITEM_GLINT);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
float f13 = 0.76F;
GL11.glColor4f(0.5F * f13, 0.25F * f13, 0.8F * f13, 1.0F);
GL11.glMatrixMode(GL11.GL_TEXTURE);
GL11.glPushMatrix();
float f14 = 0.125F;
GL11.glScalef(f14, f14, f14);
float f15 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
GL11.glTranslatef(f15, 0.0F, 0.0F);
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, f12);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glScalef(f14, f14, f14);
f15 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
GL11.glTranslatef(-f15, 0.0F, 0.0F);
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 255, 255, f12);
GL11.glPopMatrix();
GL11.glMatrixMode(GL11.GL_MODELVIEW);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}*/
/*
* if (itemstack.hasEffect(pass)) { GL11.glDepthFunc(GL11.GL_EQUAL);
* GL11.glDisable(GL11.GL_LIGHTING);
* this.renderManager.renderEngine.bindTexture(RES_ITEM_GLINT);
* GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_COLOR,
* GL11.GL_ONE); float f13 = 0.76F; GL11.glColor4f(0.5F * f13, 0.25F
* * f13, 0.8F * f13, 1.0F); GL11.glMatrixMode(GL11.GL_TEXTURE);
* GL11.glPushMatrix(); float f14 = 0.125F; GL11.glScalef(f14, f14,
* f14); float f15 = (float) (Minecraft.getSystemTime() % 3000L) /
* 3000.0F * 8.0F; GL11.glTranslatef(f15, 0.0F, 0.0F);
* GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
* ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F,
* 255, 255, f12); GL11.glPopMatrix(); GL11.glPushMatrix();
* GL11.glScalef(f14, f14, f14); f15 = (float)
* (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
* GL11.glTranslatef(-f15, 0.0F, 0.0F); GL11.glRotatef(10.0F, 0.0F,
* 0.0F, 1.0F); ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F,
* 1.0F, 1.0F, 255, 255, f12); GL11.glPopMatrix();
* GL11.glMatrixMode(GL11.GL_MODELVIEW);
* GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_LIGHTING);
* GL11.glDepthFunc(GL11.GL_LEQUAL); }
*/
}
GL11.glPopMatrix();
@@ -428,25 +423,20 @@ public class DaggerRender extends Render
this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5, true);
}
/* Modders must handle this themselves if they use custom renderers!
if (par3ItemStack.hasEffect())
{
GL11.glDepthFunc(GL11.GL_GREATER);
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDepthMask(false);
par2TextureManager.bindTexture(RES_ITEM_GLINT);
this.zLevel -= 50.0F;
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F);
this.renderGlint(par4 * 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
this.zLevel += 50.0F;
GL11.glEnable(GL11.GL_LIGHTING);
GL11.glDepthFunc(GL11.GL_LEQUAL);
}
*/
/*
* Modders must handle this themselves if they use custom renderers!
* if (par3ItemStack.hasEffect()) {
* GL11.glDepthFunc(GL11.GL_GREATER);
* GL11.glDisable(GL11.GL_LIGHTING); GL11.glDepthMask(false);
* par2TextureManager.bindTexture(RES_ITEM_GLINT); this.zLevel -=
* 50.0F; GL11.glEnable(GL11.GL_BLEND);
* GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_DST_COLOR);
* GL11.glColor4f(0.5F, 0.25F, 0.8F, 1.0F); this.renderGlint(par4 *
* 431278612 + par5 * 32178161, par4 - 2, par5 - 2, 20, 20);
* GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true);
* this.zLevel += 50.0F; GL11.glEnable(GL11.GL_LIGHTING);
* GL11.glDepthFunc(GL11.GL_LEQUAL); }
*/
}
}
@@ -487,8 +477,8 @@ public class DaggerRender extends Render
}
/**
* Renders the item's overlay information. Examples being stack count or damage on top of the item's image at the
* specified position.
* Renders the item's overlay information. Examples being stack count or
* damage on top of the item's image at the specified position.
*/
public void renderItemOverlayIntoGUI (FontRenderer par1FontRenderer, TextureManager par2TextureManager, ItemStack par3ItemStack, int par4, int par5)
{
@@ -531,8 +521,8 @@ public class DaggerRender extends Render
}
/**
* Adds a quad to the tesselator at the specified position with the set width and height and color. Args:
* tessellator, x, y, width, height, color
* Adds a quad to the tesselator at the specified position with the set
* width and height and color. Args: tessellator, x, y, width, height, color
*/
private void renderQuad (Tessellator par1Tessellator, int par2, int par3, int par4, int par5, int par6)
{
@@ -562,10 +552,12 @@ public class DaggerRender extends Render
}
/**
* 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 doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* 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 doRender(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 par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -574,6 +566,7 @@ public class DaggerRender extends Render
/**
* Items should spread out when rendered in 3d?
*
* @return
*/
public boolean shouldSpreadItems ()
@@ -583,6 +576,7 @@ public class DaggerRender extends Render
/**
* Items should have a bob effect
*
* @return
*/
public boolean shouldBob ()
@@ -607,6 +601,7 @@ public class DaggerRender extends Render
/**
* Allows for a subclass to override how many rendered items appear in a
* "mini item 3d stack"
*
* @param stack
* @return
*/
@@ -35,10 +35,12 @@ public class LaunchedItemRender extends Render
}
/**
* 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 doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
* 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 doRender(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 par1Entity, double par2, double par4, double par6, float par8, float par9)
{
@@ -15,10 +15,10 @@ import java.util.HashMap;
import javax.swing.ImageIcon;
import tconstruct.TConstruct;
import mantle.lib.environment.EnvironmentChecks;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraftforge.client.event.RenderPlayerEvent;
import tconstruct.TConstruct;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@@ -70,10 +70,10 @@ public class AdaptiveSmelteryGui extends NewContainerGui
int topo = this.guiTop;
int xScroll = lefto + 67;
int yScroll = topo + 8;
int scrollwidth = xScroll + 14;
int scrollheight = yScroll + 144;
int scrollWidth = xScroll + 14;
int scrollHeight = yScroll + 144;
if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollwidth && mouseY < scrollheight)
if (!this.wasClicking && mouseDown && mouseX >= xScroll && mouseY >= yScroll && mouseX < scrollWidth && mouseY < scrollHeight)
{
this.isScrolling = true;
}
@@ -92,7 +92,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
if (this.isScrolling)
{
this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollheight - yScroll - 15.0F);
this.currentScroll = (mouseY - yScroll - 7.5F) / (scrollHeight - yScroll - 15.0F);
if (this.currentScroll < 0.0F)
{
@@ -182,7 +182,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
int cornerY = (height - ySize) / 2;
drawTexturedModalRect(cornerX + 46, cornerY, 0, 0, 176, ySize);
//Fuel - Lava
// Fuel - Lava
this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
if (scomp.fuelGague > 0)
{
@@ -208,7 +208,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
capacity += info[i].capacity;
}
//Liquids - molten metal
// Liquids - molten metal
int base = 0;
for (int i = 0; i < info.length - 1; i++)
{
@@ -234,35 +234,32 @@ public class AdaptiveSmelteryGui extends NewContainerGui
}
}
//Liquid gague
// Liquid gague
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(background);
drawTexturedModalRect(cornerX + 54, cornerY + 16, 176, 76, 52, 52);
//Side inventory
// Side inventory
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(backgroundSide);
//if (logic.layers > 0)
// if (logic.layers > 0)
{
/*if (logic.layers == 1)
{
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 43);
drawTexturedModalRect(cornerX - 46, cornerY + 43, 0, 133, 98, 25);
}
else if (logic.layers == 2)
{
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 61);
drawTexturedModalRect(cornerX - 46, cornerY + 61, 0, 97, 98, 61);
}
else*/
/*
* if (logic.layers == 1) { drawTexturedModalRect(cornerX - 46,
* cornerY, 0, 0, 98, 43); drawTexturedModalRect(cornerX - 46,
* cornerY + 43, 0, 133, 98, 25); } else if (logic.layers == 2) {
* drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, 61);
* drawTexturedModalRect(cornerX - 46, cornerY + 61, 0, 97, 98, 61);
* } else
*/
{
drawTexturedModalRect(cornerX - 46, cornerY, 0, 0, 98, ySize - 8);
}
drawTexturedModalRect(cornerX + 32, (int) (cornerY + 8 + 127 * currentScroll), 98, 0, 12, 15);
}
//Temperature
// Temperature
int slotSize = logic.getSizeInventory();
if (slotSize > 24)
slotSize = 24;
@@ -297,7 +294,7 @@ public class AdaptiveSmelteryGui extends NewContainerGui
ArrayList list = new ArrayList();
if (liquid.fluidID == -37)
{
list.add("\u00A7f" + (StatCollector.translateToLocal("gui.smeltery1")));
list.add("\u00A7f" + StatCollector.translateToLocal("gui.smeltery1"));
list.add("mB: " + liquid.amount);
}
else
@@ -431,80 +428,54 @@ public class AdaptiveSmelteryGui extends NewContainerGui
{
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());//Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());//Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());//Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); //Top left
tessellator.addVertexWithUV(startU + 0, startV + endV, this.zLevel, par3Icon.getMinU(), par3Icon.getMaxV());// Bottom left
tessellator.addVertexWithUV(startU + endU, startV + endV, this.zLevel, par3Icon.getMaxU(), par3Icon.getMaxV());// Bottom right
tessellator.addVertexWithUV(startU + endU, startV + 0, this.zLevel, par3Icon.getMaxU(), par3Icon.getMinV());// Top right
tessellator.addVertexWithUV(startU + 0, startV + 0, this.zLevel, par3Icon.getMinU(), par3Icon.getMinV()); // Top left
tessellator.draw();
}
/*@Override
public void mouseClicked(int mouseX, int mouseY, int mouseButton)
{
super.mouseClicked(mouseX, mouseY, mouseButton);
int base = 0;
int cornerX = (width - xSize) / 2 + 36;
int cornerY = (height - ySize) / 2;
int fluidToBeBroughtUp = -1;
for (FluidStack liquid : multitank.getAllFluids())
{
int basePos = 54;
int initialLiquidSize = 0;
int liquidSize = 0;//liquid.amount * 52 / liquidLayers;
if (multitank.getCapacity() > 0)
{
int total = multitank.getFluidAmount();
int liquidLayers = (total / 20000 + 1) * 20000;
if (liquidLayers > 0)
{
liquidSize = liquid.amount * 52 / liquidLayers;
if (liquidSize == 0)
liquidSize = 1;
base += liquidSize;
}
}
int leftX = cornerX + basePos;
int topY = (cornerY + 68) - base;
int sizeX = 52;
int sizeY = liquidSize;
if (mouseX >= leftX && mouseX <= leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY)
{
fluidToBeBroughtUp = liquid.fluidID;
Packet250CustomPayload packet = new Packet250CustomPayload();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(bos);
try
{
dos.write(11);
dos.writeInt(logic.getWorld().provider.dimensionId);
dos.writeInt(logic.xCoord);
dos.writeInt(logic.yCoord);
dos.writeInt(logic.zCoord);
dos.writeBoolean(this.isShiftKeyDown());
dos.writeInt(fluidToBeBroughtUp);
}
catch (Exception e)
{
e.printStackTrace();
}
packet.channel = "TConstruct";
packet.data = bos.toByteArray();
packet.length = bos.size();
PacketDispatcher.sendPacketToServer(packet);
}
}
}*/
/*
* @Override public void mouseClicked(int mouseX, int mouseY, int
* mouseButton) { super.mouseClicked(mouseX, mouseY, mouseButton);
*
* int base = 0; int cornerX = (width - xSize) / 2 + 36; int cornerY =
* (height - ySize) / 2; int fluidToBeBroughtUp = -1;
*
* for (FluidStack liquid : multitank.getAllFluids()) { int basePos = 54;
* int initialLiquidSize = 0; int liquidSize = 0;//liquid.amount * 52 /
* liquidLayers; if (multitank.getCapacity() > 0) { int total =
* multitank.getFluidAmount(); int liquidLayers = (total / 20000 + 1) *
* 20000; if (liquidLayers > 0) { liquidSize = liquid.amount * 52 /
* liquidLayers; if (liquidSize == 0) liquidSize = 1; base += liquidSize; }
* }
*
* int leftX = cornerX + basePos; int topY = (cornerY + 68) - base; int
* sizeX = 52; int sizeY = liquidSize; if (mouseX >= leftX && mouseX <=
* leftX + sizeX && mouseY >= topY && mouseY < topY + sizeY) {
* fluidToBeBroughtUp = liquid.fluidID;
*
* Packet250CustomPayload packet = new Packet250CustomPayload();
*
* ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream
* dos = new DataOutputStream(bos);
*
* try { dos.write(11);
*
* dos.writeInt(logic.worldObj.provider.dimensionId);
* dos.writeInt(logic.xCoord); dos.writeInt(logic.yCoord);
* dos.writeInt(logic.zCoord);
*
* dos.writeBoolean(this.isShiftKeyDown());
*
* dos.writeInt(fluidToBeBroughtUp); } catch (Exception e) {
* e.printStackTrace(); }
*
* packet.channel = "TConstruct"; packet.data = bos.toByteArray();
* packet.length = bos.size();
*
* PacketDispatcher.sendPacketToServer(packet); } } }
*/
@Override
public void onGuiClosed ()
@@ -39,11 +39,13 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
int cornerY = (this.width - this.ySize) / 2;
this.buttonList.clear();
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new ItemStack(Block.workbench), 0);
// this.buttonList.add(tab);
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new ItemStack(Item.plateDiamond), 1);
// tab.enabled = false;
// this.buttonList.add(tab);
// InventoryTab tab = new InventoryTab(2, cornerX, cornerY - 28, new
// ItemStack(Block.workbench), 0);
// this.buttonList.add(tab);
// tab = new InventoryTab(3, cornerX + 28, cornerY - 28, new
// ItemStack(Item.plateDiamond), 1);
// tab.enabled = false;
// this.buttonList.add(tab);
TabRegistry.updateTabValues(cornerX, cornerY, InventoryTabArmorExtended.class);
TabRegistry.addTabsToList(this.buttonList);
@@ -51,8 +53,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
//fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"), 60, 6, 0x404040);
//fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 17, (ySize - 96) + 2, 0x404040);
// fontRenderer.drawString(StatCollector.translateToLocal("inventory.armorextended"),
// 60, 6, 0x404040);
// fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"),
// 17, (ySize - 96) + 2, 0x404040);
}
public void drawScreen (int par1, int par2, float par3)
@@ -60,23 +64,25 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
super.drawScreen(par1, par2, par3);
this.xSize_lo = (float) par1;
this.ySize_lo = (float) par2;
// if (stats.inventory[2] != null && stats.inventory[2].getItem() == TContent.knapsack)
// {
// if (this.buttonList.size() < 3)
// {
// int cornerX = guiLeft;
// int cornerY = (this.height - this.ySize) / 2;
// InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28, new ItemStack(TContent.knapsack), 1);
// this.buttonList.add(tab);
// }
// }
// else
// {
// if (this.buttonList.size() >= 3)
// {
// buttonList.remove(2);
// }
// }
// if (stats.inventory[2] != null && stats.inventory[2].getItem() ==
// TContent.knapsack)
// {
// if (this.buttonList.size() < 3)
// {
// int cornerX = guiLeft;
// int cornerY = (this.height - this.ySize) / 2;
// InventoryTab tab = new InventoryTab(4, cornerX + 56, cornerY - 28,
// new ItemStack(TContent.knapsack), 1);
// this.buttonList.add(tab);
// }
// }
// else
// {
// if (this.buttonList.size() >= 3)
// {
// buttonList.remove(2);
// }
// }
}
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/armorextended.png");
@@ -84,7 +90,7 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
protected void drawGuiContainerBackgroundLayer (float f, int i, int j)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
//mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
// mc.renderEngine.bindTexture("/mods/tinker/textures/gui/armorextended.png");
this.mc.getTextureManager().bindTexture(background);
int cornerX = guiLeft;
int cornerY = (width - ySize) / 2;
@@ -143,13 +149,10 @@ public class ArmorExtendedGui extends InventoryEffectRenderer
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
}
/*protected void keyTyped(char par1, int par2)
{
if (par2 == TControls.armorKey.keyCode)
{
this.mc.thePlayer.closeScreen();
}
super.keyTyped(par1, par2);
}*/
/*
* protected void keyTyped(char par1, int par2) { if (par2 ==
* TControls.armorKey.keyCode) { this.mc.thePlayer.closeScreen(); }
*
* super.keyTyped(par1, par2); }
*/
}
@@ -32,8 +32,9 @@ public class CraftingStationGui extends GuiContainer
{
super(logic.getGuiContainer(inventory, world, x, y, z));
this.logic = logic;
//text = new GuiTextField(this.fontRendererObj, this.xSize / 2 - 5, 8, 30, 12);
//this.text.setText("");
// text = new GuiTextField(this.fontRendererObj, this.xSize / 2 - 5, 8,
// 30, 12);
// this.text.setText("");
title = "\u00A7n" + StatCollector.translateToLocal("gui.toolforge1");
body = StatCollector.translateToLocal("gui.toolforge2");
toolName = "";
@@ -46,7 +47,8 @@ public class CraftingStationGui extends GuiContainer
this.fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 0x202020);
if (logic.chest != null)
this.fontRendererObj.drawString(StatCollector.translateToLocal(logic.chest.get().getInventoryName()), -108, this.ySize - 160, 0x202020);
//this.fontRendererObj.drawString(toolName + "_", this.xSize / 2 - 18, 8, 0xffffff);
// this.fontRendererObj.drawString(toolName + "_", this.xSize / 2 - 18,
// 8, 0xffffff);
if (logic.tinkerTable)
{
@@ -111,7 +113,7 @@ public class CraftingStationGui extends GuiContainer
final int maxDur = tags.getInteger("TotalDurability");
int availableDurability = maxDur - durability;
//Durability
// Durability
int base = 24;
int offset = 0;
if (maxDur > 0)
@@ -131,7 +133,7 @@ public class CraftingStationGui extends GuiContainer
}
final float stonebound = tags.getFloat("Shoddy");
//Attack
// Attack
if (categories.contains("weapon"))
{
int attack = (int) (tags.getInteger("Attack"));
@@ -202,12 +204,15 @@ public class CraftingStationGui extends GuiContainer
offset++;
this.fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation9") + df.format(accuracy - 4) + "%", xSize + 8, base + offset * 10, 0xffffff);
offset++;
/*this.fontRendererObj.drawString("Chance to break: " + df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
offset++;*/
/*
* this.fontRendererObj.drawString("Chance to break: " +
* df.format(shatter)+"%", xSize + 8, base + offset * 10, 0xffffff);
* offset++;
*/
offset++;
}
//Mining
// Mining
if (categories.contains("dualharvest"))
{
float mineSpeed = tags.getInteger("MiningSpeed") / 100f;
@@ -371,7 +376,7 @@ public class CraftingStationGui extends GuiContainer
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.getTextureManager().bindTexture(icons);
//Draw chest side
// Draw chest side
if (logic.chest != null)
{
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@@ -25,7 +25,8 @@ public class FurnaceGui extends GuiContainer
}
/**
* Draw the foreground layer for the GuiContainer (everything in front of the items)
* Draw the foreground layer for the GuiContainer (everything in front of
* the items)
*/
protected void drawGuiContainerForegroundLayer (int par1, int par2)
{
@@ -35,7 +36,8 @@ public class FurnaceGui extends GuiContainer
}
/**
* Draw the background layer for the GuiContainer (everything behind the items)
* Draw the background layer for the GuiContainer (everything behind the
* items)
*/
protected void drawGuiContainerBackgroundLayer (float par1, int par2, int par3)
{
@@ -14,13 +14,16 @@ import cpw.mods.fml.relauncher.SideOnly;
public class GuiButtonTool extends GuiButton
{
/**
* True for pointing right (next page), false for pointing left (previous page).
* True for pointing right (next page), false for pointing left (previous
* page).
*/
int textureX;
int textureY;
public String texture;
public ToolGuiElement element;
private static ResourceLocation background;// = new ResourceLocation("tinker", "textures/gui/armorextended.png");
private static ResourceLocation background;// = new
// ResourceLocation("tinker",
// "textures/gui/armorextended.png");
public GuiButtonTool(int id, int posX, int posY, int texX, int texY, String domain, String tex, ToolGuiElement e)
{
Loaded 100 of 264 files, more files were not shown because too many files have changed in this diff. Show more