The Nameless
This commit is contained in:
parent
52efa99d34
commit
a001b2f664
8
resources/lang/TConstruct_en_US.xml
Normal file
8
resources/lang/TConstruct_en_US.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<lang>
|
||||
<entry key="itemGroup.TConstructTools">TConstruct Tools</entry>
|
||||
<entry key="itemGroup.TConstructMaterials">TConstruct Materials</entry>
|
||||
<entry key="itemGroup.TConstructBlocks">TConstruct Blocks</entry>
|
||||
|
||||
</lang>
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 236 B |
41
tinker/common/fancyitem/FancyEntityItem.java
Normal file
41
tinker/common/fancyitem/FancyEntityItem.java
Normal file
@ -0,0 +1,41 @@
|
||||
package tinker.common.fancyitem;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.stats.AchievementList;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.entity.item.ItemExpireEvent;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class FancyEntityItem extends EntityItem
|
||||
{
|
||||
public FancyEntityItem(World par1World, double par2, double par4, double par6)
|
||||
{
|
||||
super(par1World, par2, par4, par6);
|
||||
}
|
||||
|
||||
public FancyEntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
|
||||
{
|
||||
this(par1World, par2, par4, par6);
|
||||
this.func_92013_a(par8ItemStack);
|
||||
this.lifespan = (par8ItemStack.getItem() == null ? 6000 : par8ItemStack.getItem().getEntityLifespan(par8ItemStack, par1World));
|
||||
}
|
||||
|
||||
public FancyEntityItem(World par1World)
|
||||
{
|
||||
super(par1World);
|
||||
}
|
||||
}
|
620
tinker/common/fancyitem/FancyItemRender.java
Normal file
620
tinker/common/fancyitem/FancyItemRender.java
Normal file
@ -0,0 +1,620 @@
|
||||
package tinker.common.fancyitem;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.RenderEngine;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class FancyItemRender extends Render
|
||||
{
|
||||
private RenderBlocks itemRenderBlocks = new RenderBlocks();
|
||||
|
||||
/** The RNG used in RenderItem (for bobbing itemstacks on the ground) */
|
||||
private Random random = new Random();
|
||||
public boolean field_77024_a = true;
|
||||
|
||||
/** Defines the zLevel of rendering of item on GUI. */
|
||||
public float zLevel = 0.0F;
|
||||
public static boolean field_82407_g = false;
|
||||
|
||||
public FancyItemRender()
|
||||
{
|
||||
this.shadowSize = 0.15F;
|
||||
this.shadowOpaque = 0.75F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the item
|
||||
*/
|
||||
public void doRenderItem(EntityItem par1EntityItem, double par2, double par4, double par6, float par8, float par9)
|
||||
{
|
||||
this.random.setSeed(187L);
|
||||
ItemStack var10 = par1EntityItem.func_92014_d();
|
||||
|
||||
if (var10.getItem() != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float var11 = shouldBob() ? MathHelper.sin(((float)par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F;
|
||||
float var12 = (((float)par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI);
|
||||
byte var13 = getMiniBlockCountForItemStack(var10);
|
||||
|
||||
GL11.glTranslatef((float)par2, (float)par4 + var11, (float)par6);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
int var16;
|
||||
float var19;
|
||||
float var20;
|
||||
float var24;
|
||||
|
||||
if (ForgeHooksClient.renderEntityItem(par1EntityItem, var10, var11, var12, random, renderManager.renderEngine, renderBlocks))
|
||||
{
|
||||
;
|
||||
}
|
||||
else if (var10.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[var10.itemID].getRenderType()))
|
||||
{
|
||||
GL11.glRotatef(var12, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
if (field_82407_g)
|
||||
{
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glTranslatef(0.0F, 0.05F, 0.0F);
|
||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
this.loadTexture(Block.blocksList[var10.itemID].getTextureFile());
|
||||
float var22 = 0.25F;
|
||||
var16 = Block.blocksList[var10.itemID].getRenderType();
|
||||
|
||||
if (var16 == 1 || var16 == 19 || var16 == 12 || var16 == 2)
|
||||
{
|
||||
var22 = 0.5F;
|
||||
}
|
||||
|
||||
GL11.glScalef(var22, var22, var22);
|
||||
|
||||
for (int var23 = 0; var23 < var13; ++var23)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (var23 > 0)
|
||||
{
|
||||
var24 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var22;
|
||||
var19 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var22;
|
||||
var20 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.2F / var22;
|
||||
GL11.glTranslatef(var24, var19, var20);
|
||||
}
|
||||
|
||||
var24 = 1.0F;
|
||||
this.itemRenderBlocks.renderBlockAsItem(Block.blocksList[var10.itemID], var10.getItemDamage(), var24);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int var15;
|
||||
float var17;
|
||||
|
||||
if (var10.getItem().requiresMultipleRenderPasses())
|
||||
{
|
||||
if (field_82407_g)
|
||||
{
|
||||
GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
|
||||
GL11.glTranslatef(0.0F, -0.05F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
|
||||
for (var15 = 0; var15 <= var10.getItem().getRenderPasses(var10.getItemDamage()); ++var15)
|
||||
{
|
||||
this.loadTexture(Item.itemsList[var10.itemID].getTextureFile());
|
||||
this.random.setSeed(187L);
|
||||
var16 = var10.getItem().getIconIndex(var10, var15);
|
||||
var17 = 1.0F;
|
||||
|
||||
if (this.field_77024_a)
|
||||
{
|
||||
int var18 = Item.itemsList[var10.itemID].getColorFromItemStack(var10, var15);
|
||||
var19 = (float)(var18 >> 16 & 255) / 255.0F;
|
||||
var20 = (float)(var18 >> 8 & 255) / 255.0F;
|
||||
float var21 = (float)(var18 & 255) / 255.0F;
|
||||
GL11.glColor4f(var19 * var17, var20 * var17, var21 * var17, 1.0F);
|
||||
this.func_77020_a(par1EntityItem, var16, var13, par9, var19 * var17, var20 * var17, var21 * var17);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.func_77020_a(par1EntityItem, var16, var13, par9, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (field_82407_g)
|
||||
{
|
||||
GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
|
||||
GL11.glTranslatef(0.0F, -0.05F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
var15 = var10.getIconIndex();
|
||||
|
||||
this.loadTexture(var10.getItem().getTextureFile());
|
||||
|
||||
if (this.field_77024_a)
|
||||
{
|
||||
var16 = Item.itemsList[var10.itemID].getColorFromItemStack(var10, 0);
|
||||
var17 = (float)(var16 >> 16 & 255) / 255.0F;
|
||||
var24 = (float)(var16 >> 8 & 255) / 255.0F;
|
||||
var19 = (float)(var16 & 255) / 255.0F;
|
||||
var20 = 1.0F;
|
||||
this.func_77020_a(par1EntityItem, var15, var13, par9, var17 * var20, var24 * var20, var19 * var20);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.func_77020_a(par1EntityItem, var15, var13, par9, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
private void func_77020_a(EntityItem par1EntityItem, int par2, int par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
Tessellator var8 = Tessellator.instance;
|
||||
float var9 = (float)(par2 % 16 * 16 + 0) / 256.0F;
|
||||
float var10 = (float)(par2 % 16 * 16 + 16) / 256.0F;
|
||||
float var11 = (float)(par2 / 16 * 16 + 0) / 256.0F;
|
||||
float var12 = (float)(par2 / 16 * 16 + 16) / 256.0F;
|
||||
float var13 = 1.0F;
|
||||
float var14 = 0.5F;
|
||||
float var15 = 0.25F;
|
||||
float var17;
|
||||
|
||||
//if (true)
|
||||
//{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (field_82407_g)
|
||||
{
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glRotatef((((float)par1EntityItem.age + par4) / 20.0F + par1EntityItem.hoverStart) * (180F / (float)Math.PI), 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
float var16 = 0.0625F;
|
||||
var17 = 0.021875F;
|
||||
ItemStack var18 = par1EntityItem.func_92014_d();
|
||||
int var19 = var18.stackSize;
|
||||
byte var24 = getMiniItemCountForItemStack(var18);
|
||||
|
||||
|
||||
GL11.glTranslatef(-var14, -var15, -((var16 + var17) * (float)var24 / 2.0F));
|
||||
|
||||
for (int var20 = 0; var20 < var24; ++var20)
|
||||
{
|
||||
// Makes items offset when in 3D, like when in 2D, looks much better. Considered a vanilla bug...
|
||||
if (var20 > 0 && shouldSpreadItems())
|
||||
{
|
||||
float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
float y = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
float z = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
GL11.glTranslatef(x, y, var16 + var17);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef(0f, 0f, var16 + var17);
|
||||
}
|
||||
|
||||
this.loadTexture(Item.itemsList[var18.itemID].getTextureFile());
|
||||
|
||||
GL11.glColor4f(par5, par6, par7, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(var8, var10, var11, var9, var12, var16);
|
||||
|
||||
if (var18 != null && var18.hasEffect())
|
||||
{
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
this.renderManager.renderEngine.bindTexture(this.renderManager.renderEngine.getTexture("%blur%/misc/glint.png"));
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
|
||||
float var21 = 0.76F;
|
||||
GL11.glColor4f(0.5F * var21, 0.25F * var21, 0.8F * var21, 1.0F);
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glPushMatrix();
|
||||
float var22 = 0.125F;
|
||||
GL11.glScalef(var22, var22, var22);
|
||||
float var23 = (float)(Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
|
||||
GL11.glTranslatef(var23, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(var8, 0.0F, 0.0F, 1.0F, 1.0F, var16);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(var22, var22, var22);
|
||||
var23 = (float)(Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
|
||||
GL11.glTranslatef(-var23, 0.0F, 0.0F);
|
||||
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(var8, 0.0F, 0.0F, 1.0F, 1.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDepthFunc(GL11.GL_LEQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
//}
|
||||
/*else
|
||||
{
|
||||
for (int var25 = 0; var25 < par3; ++var25)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
if (var25 > 0)
|
||||
{
|
||||
var17 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
|
||||
float var27 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
|
||||
float var26 = (this.random.nextFloat() * 2.0F - 1.0F) * 0.3F;
|
||||
GL11.glTranslatef(var17, var27, var26);
|
||||
}
|
||||
|
||||
if (!field_82407_g)
|
||||
{
|
||||
GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
}
|
||||
|
||||
GL11.glColor4f(par5, par6, par7, 1.0F);
|
||||
var8.startDrawingQuads();
|
||||
var8.setNormal(0.0F, 1.0F, 0.0F);
|
||||
var8.addVertexWithUV((double)(0.0F - var14), (double)(0.0F - var15), 0.0D, (double)var9, (double)var12);
|
||||
var8.addVertexWithUV((double)(var13 - var14), (double)(0.0F - var15), 0.0D, (double)var10, (double)var12);
|
||||
var8.addVertexWithUV((double)(var13 - var14), (double)(1.0F - var15), 0.0D, (double)var10, (double)var11);
|
||||
var8.addVertexWithUV((double)(0.0F - var14), (double)(1.0F - var15), 0.0D, (double)var9, (double)var11);
|
||||
var8.draw();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the item's icon or block into the UI at the specified position.
|
||||
*/
|
||||
public void renderItemIntoGUI(FontRenderer par1FontRenderer, RenderEngine par2RenderEngine, ItemStack par3ItemStack, int par4, int par5)
|
||||
{
|
||||
int var6 = par3ItemStack.itemID;
|
||||
int var7 = par3ItemStack.getItemDamage();
|
||||
int var8 = par3ItemStack.getIconIndex();
|
||||
int var10;
|
||||
float var12;
|
||||
float var13;
|
||||
float var16;
|
||||
|
||||
if (par3ItemStack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[par3ItemStack.itemID].getRenderType()))
|
||||
{
|
||||
Block var15 = Block.blocksList[var6];
|
||||
par2RenderEngine.bindTexture(par2RenderEngine.getTexture(var15.getTextureFile()));
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
|
||||
GL11.glScalef(10.0F, 10.0F, 10.0F);
|
||||
GL11.glTranslatef(1.0F, 0.5F, 1.0F);
|
||||
GL11.glScalef(1.0F, 1.0F, -1.0F);
|
||||
GL11.glRotatef(210.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||
var10 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, 0);
|
||||
var16 = (float)(var10 >> 16 & 255) / 255.0F;
|
||||
var12 = (float)(var10 >> 8 & 255) / 255.0F;
|
||||
var13 = (float)(var10 & 255) / 255.0F;
|
||||
|
||||
if (this.field_77024_a)
|
||||
{
|
||||
GL11.glColor4f(var16, var12, var13, 1.0F);
|
||||
}
|
||||
|
||||
GL11.glRotatef(-90.0F, 0.0F, 1.0F, 0.0F);
|
||||
this.itemRenderBlocks.useInventoryTint = this.field_77024_a;
|
||||
this.itemRenderBlocks.renderBlockAsItem(var15, var7, 1.0F);
|
||||
this.itemRenderBlocks.useInventoryTint = true;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
int var9;
|
||||
|
||||
if (Item.itemsList[var6].requiresMultipleRenderPasses())
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
par2RenderEngine.bindTexture(par2RenderEngine.getTexture(Item.itemsList[var6].getTextureFile()));
|
||||
|
||||
for (var9 = 0; var9 < Item.itemsList[var6].getRenderPasses(var7); ++var9)
|
||||
{
|
||||
var10 = Item.itemsList[var6].getIconIndex(par3ItemStack, var9);
|
||||
int var11 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, var9);
|
||||
var12 = (float)(var11 >> 16 & 255) / 255.0F;
|
||||
var13 = (float)(var11 >> 8 & 255) / 255.0F;
|
||||
float var14 = (float)(var11 & 255) / 255.0F;
|
||||
|
||||
if (this.field_77024_a)
|
||||
{
|
||||
GL11.glColor4f(var12, var13, var14, 1.0F);
|
||||
}
|
||||
|
||||
this.renderTexturedQuad(par4, par5, var10 % 16 * 16, var10 / 16 * 16, 16, 16);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
else if (var8 >= 0)
|
||||
{
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
par2RenderEngine.bindTexture(par2RenderEngine.getTexture(par3ItemStack.getItem().getTextureFile()));
|
||||
|
||||
var9 = Item.itemsList[var6].getColorFromItemStack(par3ItemStack, 0);
|
||||
float var17 = (float)(var9 >> 16 & 255) / 255.0F;
|
||||
var16 = (float)(var9 >> 8 & 255) / 255.0F;
|
||||
var12 = (float)(var9 & 255) / 255.0F;
|
||||
|
||||
if (this.field_77024_a)
|
||||
{
|
||||
GL11.glColor4f(var17, var16, var12, 1.0F);
|
||||
}
|
||||
|
||||
this.renderTexturedQuad(par4, par5, var8 % 16 * 16, var8 / 16 * 16, 16, 16);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the item's icon or block into the GUI, including the glint effect.
|
||||
*/
|
||||
public void renderItemAndEffectIntoGUI(FontRenderer par1FontRenderer, RenderEngine par2RenderEngine, ItemStack par3ItemStack, int par4, int par5)
|
||||
{
|
||||
if (par3ItemStack != null)
|
||||
{
|
||||
if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2RenderEngine, par3ItemStack, field_77024_a, zLevel, (float)par4, (float)par5))
|
||||
{
|
||||
this.renderItemIntoGUI(par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5);
|
||||
}
|
||||
|
||||
if (par3ItemStack != null && par3ItemStack.hasEffect())
|
||||
{
|
||||
GL11.glDepthFunc(GL11.GL_GREATER);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDepthMask(false);
|
||||
par2RenderEngine.bindTexture(par2RenderEngine.getTexture("%blur%/misc/glint.png"));
|
||||
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.func_77018_a(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void func_77018_a(int par1, int par2, int par3, int par4, int par5)
|
||||
{
|
||||
for (int var6 = 0; var6 < 2; ++var6)
|
||||
{
|
||||
if (var6 == 0)
|
||||
{
|
||||
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
|
||||
}
|
||||
|
||||
if (var6 == 1)
|
||||
{
|
||||
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
|
||||
}
|
||||
|
||||
float var7 = 0.00390625F;
|
||||
float var8 = 0.00390625F;
|
||||
float var9 = (float)(Minecraft.getSystemTime() % (long)(3000 + var6 * 1873)) / (3000.0F + (float)(var6 * 1873)) * 256.0F;
|
||||
float var10 = 0.0F;
|
||||
Tessellator var11 = Tessellator.instance;
|
||||
float var12 = 4.0F;
|
||||
|
||||
if (var6 == 1)
|
||||
{
|
||||
var12 = -1.0F;
|
||||
}
|
||||
|
||||
var11.startDrawingQuads();
|
||||
var11.addVertexWithUV((double)(par2 + 0), (double)(par3 + par5), (double)this.zLevel, (double)((var9 + (float)par5 * var12) * var7), (double)((var10 + (float)par5) * var8));
|
||||
var11.addVertexWithUV((double)(par2 + par4), (double)(par3 + par5), (double)this.zLevel, (double)((var9 + (float)par4 + (float)par5 * var12) * var7), (double)((var10 + (float)par5) * var8));
|
||||
var11.addVertexWithUV((double)(par2 + par4), (double)(par3 + 0), (double)this.zLevel, (double)((var9 + (float)par4) * var7), (double)((var10 + 0.0F) * var8));
|
||||
var11.addVertexWithUV((double)(par2 + 0), (double)(par3 + 0), (double)this.zLevel, (double)((var9 + 0.0F) * var7), (double)((var10 + 0.0F) * var8));
|
||||
var11.draw();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, RenderEngine par2RenderEngine, ItemStack par3ItemStack, int par4, int par5)
|
||||
{
|
||||
if (par3ItemStack != null)
|
||||
{
|
||||
if (par3ItemStack.stackSize > 1)
|
||||
{
|
||||
String var6 = "" + par3ItemStack.stackSize;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
par1FontRenderer.drawStringWithShadow(var6, par4 + 19 - 2 - par1FontRenderer.getStringWidth(var6), par5 + 6 + 3, 16777215);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
if (par3ItemStack.isItemDamaged())
|
||||
{
|
||||
int var11 = (int)Math.round(13.0D - (double)par3ItemStack.getItemDamageForDisplay() * 13.0D / (double)par3ItemStack.getMaxDamage());
|
||||
int var7 = (int)Math.round(255.0D - (double)par3ItemStack.getItemDamageForDisplay() * 255.0D / (double)par3ItemStack.getMaxDamage());
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
Tessellator var8 = Tessellator.instance;
|
||||
int var9 = 255 - var7 << 16 | var7 << 8;
|
||||
int var10 = (255 - var7) / 4 << 16 | 16128;
|
||||
this.renderQuad(var8, par4 + 2, par5 + 13, 13, 2, 0);
|
||||
this.renderQuad(var8, par4 + 2, par5 + 13, 12, 1, var10);
|
||||
this.renderQuad(var8, par4 + 2, par5 + 13, var11, 1, var9);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
par1Tessellator.startDrawingQuads();
|
||||
par1Tessellator.setColorOpaque_I(par6);
|
||||
par1Tessellator.addVertex((double)(par2 + 0), (double)(par3 + 0), 0.0D);
|
||||
par1Tessellator.addVertex((double)(par2 + 0), (double)(par3 + par5), 0.0D);
|
||||
par1Tessellator.addVertex((double)(par2 + par4), (double)(par3 + par5), 0.0D);
|
||||
par1Tessellator.addVertex((double)(par2 + par4), (double)(par3 + 0), 0.0D);
|
||||
par1Tessellator.draw();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a textured quad to the tesselator at the specified position with the specified texture coords, width and
|
||||
* height. Args: x, y, u, v, width, height
|
||||
*/
|
||||
public void renderTexturedQuad(int par1, int par2, int par3, int par4, int par5, int par6)
|
||||
{
|
||||
float var7 = 0.00390625F;
|
||||
float var8 = 0.00390625F;
|
||||
Tessellator var9 = Tessellator.instance;
|
||||
var9.startDrawingQuads();
|
||||
var9.addVertexWithUV((double)(par1 + 0), (double)(par2 + par6), (double)this.zLevel, (double)((float)(par3 + 0) * var7), (double)((float)(par4 + par6) * var8));
|
||||
var9.addVertexWithUV((double)(par1 + par5), (double)(par2 + par6), (double)this.zLevel, (double)((float)(par3 + par5) * var7), (double)((float)(par4 + par6) * var8));
|
||||
var9.addVertexWithUV((double)(par1 + par5), (double)(par2 + 0), (double)this.zLevel, (double)((float)(par3 + par5) * var7), (double)((float)(par4 + 0) * var8));
|
||||
var9.addVertexWithUV((double)(par1 + 0), (double)(par2 + 0), (double)this.zLevel, (double)((float)(par3 + 0) * var7), (double)((float)(par4 + 0) * var8));
|
||||
var9.draw();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
this.doRenderItem((EntityItem)par1Entity, par2, par4, par6, par8, par9);
|
||||
}
|
||||
|
||||
/* ==== Forge start ===== */
|
||||
/**
|
||||
* Items should spread out when rendered in 3d?
|
||||
* @return
|
||||
*/
|
||||
public boolean shouldSpreadItems()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Items should have a bob effect
|
||||
* @return
|
||||
*/
|
||||
public boolean shouldBob()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public byte getMiniBlockCountForItemStack(ItemStack stack)
|
||||
{
|
||||
byte var13 = 1;
|
||||
if (stack.stackSize > 1)
|
||||
{
|
||||
var13 = 2;
|
||||
}
|
||||
|
||||
if (stack.stackSize > 5)
|
||||
{
|
||||
var13 = 3;
|
||||
}
|
||||
|
||||
if (stack.stackSize > 20)
|
||||
{
|
||||
var13 = 4;
|
||||
}
|
||||
|
||||
if (stack.stackSize > 40)
|
||||
{
|
||||
var13 = 5;
|
||||
}
|
||||
return var13;
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows for a subclass to override how many rendered items appear in a
|
||||
* "mini item 3d stack"
|
||||
* @param stack
|
||||
* @return
|
||||
*/
|
||||
public byte getMiniItemCountForItemStack(ItemStack stack)
|
||||
{
|
||||
byte var24;
|
||||
int var19 = stack.stackSize;
|
||||
if (var19 < 2)
|
||||
{
|
||||
var24 = 1;
|
||||
}
|
||||
else if (var19 < 16)
|
||||
{
|
||||
var24 = 2;
|
||||
}
|
||||
else if (var19 < 32)
|
||||
{
|
||||
var24 = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
var24 = 4;
|
||||
}
|
||||
return var24;
|
||||
}
|
||||
}
|
@ -44,9 +44,9 @@ public class PHConstruct {
|
||||
heldItemBlock = config.getBlock("Held Item Block", 1472).getInt(1472);
|
||||
lavaTank = config.getBlock("Lava Tank", 1473).getInt(1473);
|
||||
smeltery = config.getBlock("Smeltery", 1474).getInt(1474);
|
||||
searedBrick = config.getBlock("Seared Brick", 1477).getInt(1477);
|
||||
oreSlag = config.getBlock("Ores Slag", 1475).getInt(1475);
|
||||
craftedSoil = config.getBlock("Special Soil", 1476).getInt(1476);
|
||||
landmine = config.getBlock("Landmine", 1475).getInt(1475);
|
||||
landmine = config.getBlock("Landmine", 1477).getInt(1477);
|
||||
|
||||
ironFlowing = config.getBlock("Liquid Iron Flowing", 1478).getInt(1478);
|
||||
ironStill = config.getBlock("Liquid Iron Still", 1479).getInt(1479);
|
||||
@ -72,6 +72,8 @@ public class PHConstruct {
|
||||
alumiteStill = config.getBlock("Liquid Alumite Still", 1499).getInt(1499);
|
||||
obsidianFlowing = config.getBlock("Liquid Obsidian Flowing", 1500).getInt(1500);
|
||||
obsidianStill = config.getBlock("Liquid Obsidian Still", 1501).getInt(1501);
|
||||
steelFlowing = config.getBlock("Liquid Steel Flowing", 1502).getInt(1502);
|
||||
steelStill = config.getBlock("Liquid Steel Still", 1503).getInt(1503);
|
||||
|
||||
manual = config.getItem("Patterns and Misc", "Tinker's Manual", 14018).getInt(14018);
|
||||
blankPattern = config.getItem("Patterns and Misc", "Blank Patterns", 14019).getInt(14019);
|
||||
@ -154,7 +156,7 @@ public class PHConstruct {
|
||||
public static int lavaTank;
|
||||
public static int smeltery;
|
||||
public static int craftedSoil;
|
||||
public static int searedBrick;
|
||||
public static int oreSlag;
|
||||
public static int axle;
|
||||
|
||||
//Traps
|
||||
@ -187,6 +189,8 @@ public class PHConstruct {
|
||||
|
||||
public static int obsidianFlowing;
|
||||
public static int obsidianStill;
|
||||
public static int steelFlowing;
|
||||
public static int steelStill;
|
||||
|
||||
//Patterns and misc
|
||||
public static int blankPattern;
|
||||
|
@ -13,10 +13,12 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
import tinker.common.*;
|
||||
import tinker.common.fancyitem.FancyEntityItem;
|
||||
import tinker.tconstruct.blocks.*;
|
||||
import tinker.tconstruct.blocks.liquids.*;
|
||||
import tinker.tconstruct.client.gui.*;
|
||||
import tinker.tconstruct.crafting.*;
|
||||
import tinker.tconstruct.entity.*;
|
||||
import tinker.tconstruct.items.*;
|
||||
import tinker.tconstruct.modifiers.*;
|
||||
import tinker.tconstruct.tools.*;
|
||||
@ -75,7 +77,7 @@ public class TContent implements IFuelHandler
|
||||
public static Block heldItemBlock;
|
||||
public static Block lavaTank;
|
||||
public static Block craftedSoil;
|
||||
public static Block searedBrick;
|
||||
public static Block oreSlag;
|
||||
|
||||
//Traps
|
||||
public static Block landmine;
|
||||
@ -107,6 +109,8 @@ public class TContent implements IFuelHandler
|
||||
|
||||
public static Block obsidianFlowing;
|
||||
public static Block obsidianStill;
|
||||
public static Block steelFlowing;
|
||||
public static Block steelStill;
|
||||
|
||||
//public static Block axle;
|
||||
|
||||
@ -130,8 +134,9 @@ public class TContent implements IFuelHandler
|
||||
|
||||
void createEntities ()
|
||||
{
|
||||
EntityRegistry.registerModEntity(tinker.tconstruct.entity.CartEntity.class, "Small Wagon", 0, TConstruct.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(tinker.tconstruct.entity.Skyla.class, "Skyla", 1, TConstruct.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 0, TConstruct.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(Skyla.class, "Skyla", 1, TConstruct.instance, 32, 5, true);
|
||||
EntityRegistry.registerModEntity(FancyEntityItem.class, "Fancy Item", 1, TConstruct.instance, 32, 5, true);
|
||||
}
|
||||
|
||||
void registerBlocks()
|
||||
@ -161,17 +166,22 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.MultiServantLogic.class, "TConstruct.Servants");
|
||||
|
||||
lavaTank = new LavaTankBlock(PHConstruct.lavaTank);
|
||||
lavaTank.setStepSound(Block.soundGlassFootstep);
|
||||
GameRegistry.registerBlock(lavaTank, "LavaTank");
|
||||
GameRegistry.registerTileEntity(tinker.tconstruct.logic.LavaTankLogic.class, "TConstruct.LavaTank");
|
||||
|
||||
searedBrick = new MetalOre(PHConstruct.searedBrick, 80, Material.iron, 10.0F, 6);
|
||||
GameRegistry.registerBlock(searedBrick, tinker.tconstruct.items.MetalOreItemBlock.class, "SearedBrick");
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 0, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 1, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 2, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 3, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 4, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(searedBrick, 5, "pickaxe", 1);
|
||||
oreSlag = new MetalOre(PHConstruct.oreSlag, 80, Material.iron, 10.0F, 6);
|
||||
GameRegistry.registerBlock(oreSlag, tinker.tconstruct.items.MetalOreItemBlock.class, "SearedBrick");
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 0, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 1, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 2, "pickaxe", 4);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 3, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 4, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(oreSlag, 5, "pickaxe", 1);
|
||||
|
||||
//Traps
|
||||
landmine = new Landmine(PHConstruct.landmine, 0, EnumMobType.mobs, Material.cactus).setBlockName("landmine");
|
||||
GameRegistry.registerBlock(landmine, "landmine");
|
||||
|
||||
//Liquids
|
||||
ironFlowing = new IronFlowing(PHConstruct.ironFlowing).setBlockName("liquid.ironFlow");
|
||||
@ -222,10 +232,10 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.registerBlock(obsidianFlowing, "Liquid obsidian Flowing");
|
||||
obsidianStill = new ObsidianStill(PHConstruct.obsidianStill).setBlockName("liquid.obsidianStill");
|
||||
GameRegistry.registerBlock(obsidianStill, "Liquid obsidian Still");
|
||||
|
||||
//Traps
|
||||
landmine = new Landmine(PHConstruct.landmine, 0, EnumMobType.mobs, Material.cactus).setBlockName("landmine");
|
||||
GameRegistry.registerBlock(landmine, "landmine");
|
||||
steelFlowing = new SteelFlowing(PHConstruct.steelFlowing).setBlockName("liquid.steelFlow");
|
||||
GameRegistry.registerBlock(steelFlowing, "Liquid steel Flowing");
|
||||
steelStill = new SteelStill(PHConstruct.steelStill).setBlockName("liquid.steelStill");
|
||||
GameRegistry.registerBlock(steelStill, "Liquid steel Still");
|
||||
}
|
||||
|
||||
void createItems ()
|
||||
@ -407,9 +417,9 @@ public class TContent implements IFuelHandler
|
||||
Smeltery.addMelting(new ItemStack(Item.ingotGold, 8), Block.blockGold.blockID, 0, 450, new LiquidStack(goldStill.blockID, 250, 0));
|
||||
Smeltery.addMelting(Block.blockSteel, 0, 500, new LiquidStack(ironStill.blockID, 2250, 0));
|
||||
Smeltery.addMelting(Block.blockGold, 0, 450, new LiquidStack(goldStill.blockID, 2250, 0));
|
||||
Smeltery.addMelting(searedBrick, 3, 550, new LiquidStack(copperStill.blockID, 250, 0));
|
||||
Smeltery.addMelting(searedBrick, 4, 175, new LiquidStack(tinStill.blockID, 250, 0));
|
||||
Smeltery.addMelting(searedBrick, 5, 350, new LiquidStack(aluminumStill.blockID, 250, 0));
|
||||
Smeltery.addMelting(oreSlag, 3, 550, new LiquidStack(copperStill.blockID, 250, 0));
|
||||
Smeltery.addMelting(oreSlag, 4, 175, new LiquidStack(tinStill.blockID, 250, 0));
|
||||
Smeltery.addMelting(oreSlag, 5, 350, new LiquidStack(aluminumStill.blockID, 250, 0));
|
||||
|
||||
Smeltery.addAlloyMixing(new LiquidStack(bronzeStill.blockID, 4, 0), new LiquidStack(copperStill.blockID, 3, 0), new LiquidStack(tinStill.blockID, 1, 0));
|
||||
Smeltery.addAlloyMixing(new LiquidStack(alBrassStill.blockID, 4, 0), new LiquidStack(aluminumStill.blockID, 3, 0), new LiquidStack(copperStill.blockID, 1, 0));
|
||||
@ -447,13 +457,13 @@ public class TContent implements IFuelHandler
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 0, new ItemStack(materials, 1, 1), 2f); //Slime
|
||||
FurnaceRecipes.smelting().addSmelting(craftedSoil.blockID, 1, new ItemStack(materials, 1, 2), 2f); //Seared brick item
|
||||
GameRegistry.addRecipe(new ItemStack(searedBrick, 1, 0), "pp", "pp", 'p', new ItemStack(materials, 1, 2)); //Seared brick block
|
||||
GameRegistry.addRecipe(new ItemStack(oreSlag, 1, 0), "pp", "pp", 'p', new ItemStack(materials, 1, 2)); //Seared brick block
|
||||
|
||||
FurnaceRecipes.smelting().addSmelting(searedBrick.blockID, 1, new ItemStack(materials, 1, 3), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(searedBrick.blockID, 2, new ItemStack(materials, 1, 4), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(searedBrick.blockID, 3, new ItemStack(materials, 1, 9), 0.5f);
|
||||
FurnaceRecipes.smelting().addSmelting(searedBrick.blockID, 4, new ItemStack(materials, 1, 10), 0.5f);
|
||||
FurnaceRecipes.smelting().addSmelting(searedBrick.blockID, 5, new ItemStack(materials, 1, 12), 0.5f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 1, new ItemStack(materials, 1, 3), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 2, new ItemStack(materials, 1, 4), 3f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 3, new ItemStack(materials, 1, 9), 0.5f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 4, new ItemStack(materials, 1, 10), 0.5f);
|
||||
FurnaceRecipes.smelting().addSmelting(oreSlag.blockID, 5, new ItemStack(materials, 1, 12), 0.5f);
|
||||
|
||||
/*for (int i = 0; i < 12; i++)
|
||||
{
|
||||
@ -532,11 +542,11 @@ public class TContent implements IFuelHandler
|
||||
|
||||
public void oreRegistry ()
|
||||
{
|
||||
OreDictionary.registerOre("oreCobalt", new ItemStack(searedBrick, 1, 1));
|
||||
OreDictionary.registerOre("oreArdite", new ItemStack(searedBrick, 1, 2));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(searedBrick, 1, 3));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(searedBrick, 1, 4));
|
||||
OreDictionary.registerOre("oreAluminum", new ItemStack(searedBrick, 1, 5));
|
||||
OreDictionary.registerOre("oreCobalt", new ItemStack(oreSlag, 1, 1));
|
||||
OreDictionary.registerOre("oreArdite", new ItemStack(oreSlag, 1, 2));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(oreSlag, 1, 3));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(oreSlag, 1, 4));
|
||||
OreDictionary.registerOre("oreAluminum", new ItemStack(oreSlag, 1, 5));
|
||||
|
||||
OreDictionary.registerOre("ingotCobalt", new ItemStack(materials, 1, 3));
|
||||
OreDictionary.registerOre("ingotArdite", new ItemStack(materials, 1, 4));
|
||||
|
19
tinker/tconstruct/blocks/liquids/SteelFlowing.java
Normal file
19
tinker/tconstruct/blocks/liquids/SteelFlowing.java
Normal file
@ -0,0 +1,19 @@
|
||||
package tinker.tconstruct.blocks.liquids;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class SteelFlowing extends LiquidMetalFlowing
|
||||
{
|
||||
|
||||
public SteelFlowing(int id)
|
||||
{
|
||||
super(id);
|
||||
blockIndexInTexture = 70;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int stillLiquidId ()
|
||||
{
|
||||
return TContent.steelStill.blockID;
|
||||
}
|
||||
}
|
20
tinker/tconstruct/blocks/liquids/SteelStill.java
Normal file
20
tinker/tconstruct/blocks/liquids/SteelStill.java
Normal file
@ -0,0 +1,20 @@
|
||||
package tinker.tconstruct.blocks.liquids;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class SteelStill extends LiquidMetalStill
|
||||
{
|
||||
|
||||
public SteelStill(int id)
|
||||
{
|
||||
super(id);
|
||||
blockIndexInTexture = 70;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int flowingLiquidID ()
|
||||
{
|
||||
return TContent.steelFlowing.blockID;
|
||||
}
|
||||
|
||||
}
|
@ -18,6 +18,7 @@ import net.minecraft.world.storage.MapData;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import tinker.common.fancyitem.FancyEntityItem;
|
||||
import tinker.tconstruct.logic.CastingTableLogic;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -51,13 +52,13 @@ public class CastingTableSpecialRenderer extends TileEntitySpecialRenderer
|
||||
|
||||
if (stack != null)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
|
||||
FancyEntityItem entityitem = new FancyEntityItem(logic.worldObj, 0.0D, 0.0D, 0.0D, stack);
|
||||
entityitem.func_92014_d().stackSize = 1;
|
||||
entityitem.hoverStart = 0.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(1F, 1.4375F, 0.61F);
|
||||
GL11.glTranslatef(1F, 1.478F, 0.55F);
|
||||
GL11.glRotatef(90F, 1, 0F, 0F);
|
||||
GL11.glScalef(1.94F, 1.94F, 1.94F);
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
/*GL11.glTranslatef(-0.453125F * (float)Direction.offsetX[logic.hangingDirection], -0.18F, -0.453125F * (float)Direction.offsetZ[logic.hangingDirection]);
|
||||
GL11.glRotatef(180.0F + logic.rotationYaw, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef((float)(-90 * logic.getRotation()), 0.0F, 0.0F, 1.0F);
|
||||
|
@ -14,9 +14,12 @@ import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import tinker.common.fancyitem.FancyEntityItem;
|
||||
import tinker.common.fancyitem.FancyItemRender;
|
||||
import tinker.tconstruct.*;
|
||||
import tinker.tconstruct.client.entityrender.*;
|
||||
import tinker.tconstruct.client.liquidrender.*;
|
||||
import tinker.tconstruct.entity.*;
|
||||
import tinker.tconstruct.logic.*;
|
||||
import tinker.tconstruct.tools.*;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
@ -27,8 +30,9 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
public class TProxyClient extends TProxyCommon
|
||||
{
|
||||
public static SmallFontRenderer smallFontRenderer;
|
||||
|
||||
/* Registers any rendering code. */
|
||||
public void registerRenderer()
|
||||
public void registerRenderer ()
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
smallFontRenderer = new SmallFontRenderer(mc.gameSettings, "/font/default.png", mc.renderEngine, false);
|
||||
@ -38,7 +42,7 @@ public class TProxyClient extends TProxyCommon
|
||||
RenderingRegistry.registerBlockHandler(new FrypanRender());
|
||||
RenderingRegistry.registerBlockHandler(new RenderLiquidMetal());
|
||||
//RenderingRegistry.registerBlockHandler(new AxleRender());
|
||||
|
||||
|
||||
RenderEngine renderEngine = FMLClientHandler.instance().getClient().renderEngine;
|
||||
renderEngine.registerTextureFX(new LiquidIronFX());
|
||||
renderEngine.registerTextureFX(new LiquidIronFlowFX());
|
||||
@ -56,15 +60,17 @@ public class TProxyClient extends TProxyCommon
|
||||
renderEngine.registerTextureFX(new LiquidArditeFlowFX());
|
||||
renderEngine.registerTextureFX(new LiquidBronzeFX());
|
||||
renderEngine.registerTextureFX(new LiquidBronzeFlowFX());
|
||||
renderEngine.registerTextureFX(new LiquidBrassFX());
|
||||
renderEngine.registerTextureFX(new LiquidBrassFlowFX());
|
||||
renderEngine.registerTextureFX(new LiquidAlBrassFX());
|
||||
renderEngine.registerTextureFX(new LiquidAlBrassFlowFX());
|
||||
renderEngine.registerTextureFX(new LiquidManyullynFX());
|
||||
renderEngine.registerTextureFX(new LiquidManyullynFlowFX());
|
||||
renderEngine.registerTextureFX(new LiquidAlumiteFX());
|
||||
renderEngine.registerTextureFX(new LiquidAlumiteFlowFX());
|
||||
renderEngine.registerTextureFX(new LiquidObsidianFX());
|
||||
renderEngine.registerTextureFX(new LiquidObsidianFlowFX());
|
||||
|
||||
renderEngine.registerTextureFX(new LiquidSteelFX());
|
||||
renderEngine.registerTextureFX(new LiquidSteelFlowFX());
|
||||
|
||||
//Tools
|
||||
MinecraftForgeClient.preloadTexture(TContent.blockTexture);
|
||||
IItemRenderer render = new SuperCustomToolRenderer();
|
||||
@ -72,41 +78,57 @@ public class TProxyClient extends TProxyCommon
|
||||
{
|
||||
MinecraftForgeClient.registerItemRenderer(tool.itemID, render);
|
||||
}
|
||||
|
||||
|
||||
//Special Renderers
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(CastingTableLogic.class, new CastingTableSpecialRenderer());
|
||||
|
||||
|
||||
//Entities
|
||||
RenderingRegistry.registerEntityRenderingHandler(tinker.tconstruct.entity.CartEntity.class, new CartRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(tinker.tconstruct.entity.Skyla.class, new SkylaRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(CartEntity.class, new CartRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(Skyla.class, new SkylaRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(FancyEntityItem.class, new FancyItemRender());
|
||||
//RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo!
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Ties an internal name to a visible one. */
|
||||
public void addNames()
|
||||
public void addNames ()
|
||||
{
|
||||
LanguageRegistry.addName(TContent.lavaTank, "Lava Tank");
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructTools", "TConstruct Tools");
|
||||
//LanguageRegistry.addName(TContent.lavaTank, "Lava Tank");
|
||||
/*LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructTools", "TConstruct Tools");
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructMaterials", "TConstruct Materials");
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructBlocks", "TConstruct Blocks");
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructBlocks", "TConstruct Blocks");*/
|
||||
|
||||
String langDir = "/lang/";
|
||||
String[] langFiles =
|
||||
{ "TConstruct_en_US.xml" };
|
||||
|
||||
for (String langFile : langFiles)
|
||||
//{
|
||||
try
|
||||
{
|
||||
LanguageRegistry.instance().loadLocalization(langDir + langFile, langFile.substring(langFile.lastIndexOf('/') + 1, langFile.lastIndexOf('.')), true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
//}
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("crafters.ToolStation", "Tool Station");
|
||||
LanguageRegistry.instance().addStringLocalization("crafters.PartBuilder", "Part Builder");
|
||||
LanguageRegistry.instance().addStringLocalization("crafters.PatternShaper", "Pattern Shaper");
|
||||
LanguageRegistry.instance().addStringLocalization("inventory.PatternChest", "Pattern Chest");
|
||||
LanguageRegistry.instance().addStringLocalization("crafters.Smeltery", "Smeltery");
|
||||
LanguageRegistry.instance().addStringLocalization("crafters.Frypan", "Frying Pan");
|
||||
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("ToolStation.Crafter.name", "Tool Station");
|
||||
LanguageRegistry.instance().addStringLocalization("ToolStation.Parts.name", "Part Builder");
|
||||
LanguageRegistry.instance().addStringLocalization("ToolStation.PatternChest.name", "Pattern Chest");
|
||||
LanguageRegistry.instance().addStringLocalization("ToolStation.PatternShaper.name", "Stencil Table");
|
||||
LanguageRegistry.instance().addStringLocalization("ToolStation.CastingTable.name", "Casting Table");
|
||||
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("CraftedSoil.Slime.name", "Slimy Mud");
|
||||
LanguageRegistry.instance().addStringLocalization("CraftedSoil.Grout.name", "Grout");
|
||||
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("MetalOre.NetherSlag.name", "Netherack Slag");
|
||||
LanguageRegistry.instance().addStringLocalization("MetalOre.Cobalt.name", "Cobalt Ore");
|
||||
LanguageRegistry.instance().addStringLocalization("MetalOre.Ardite.name", "Ardite Ore");
|
||||
@ -114,13 +136,13 @@ public class TProxyClient extends TProxyCommon
|
||||
LanguageRegistry.instance().addStringLocalization("MetalOre.Tin.name", "Tin Ore");
|
||||
LanguageRegistry.instance().addStringLocalization("MetalOre.Aluminum.name", "Aluminum Ore");
|
||||
LanguageRegistry.instance().addStringLocalization("MetalOre.Slag.name", "Stone Slag");
|
||||
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization("Smeltery.Controller.name", "Smeltery");
|
||||
LanguageRegistry.instance().addStringLocalization("Smeltery.Drain.name", "Smeltery Drain");
|
||||
LanguageRegistry.instance().addStringLocalization("Smeltery.Brick.name", "Seared Bricks");
|
||||
LanguageRegistry.instance().addStringLocalization("Smeltery.Gague.name", "Seared Glass");
|
||||
LanguageRegistry.instance().addStringLocalization("Smeltery.Window.name", "Seared Window");
|
||||
|
||||
|
||||
for (int mat = 0; mat < materialTypes.length; mat++)
|
||||
{
|
||||
for (int type = 0; type < toolMaterialNames.length; type++)
|
||||
@ -128,30 +150,30 @@ public class TProxyClient extends TProxyCommon
|
||||
String internalName = new StringBuilder().append("item.tconstruct.").append(materialTypes[mat]).append(".").append(toolMaterialNames[type]).append(".name").toString();
|
||||
String visibleName = new StringBuilder().append(toolMaterialNames[type]).append(materialNames[mat]).toString();
|
||||
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < shardNames.length; i++)
|
||||
{
|
||||
String internalName = "item.tconstruct.ToolShard."+toolMaterialNames[i]+".name";
|
||||
String internalName = "item.tconstruct.ToolShard." + toolMaterialNames[i] + ".name";
|
||||
String visibleName = shardNames[i];
|
||||
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < materialItemNames.length; i++)
|
||||
{
|
||||
String internalName = "item.tconstruct.Materials."+materialItemInternalNames[i]+".name";
|
||||
String internalName = "item.tconstruct.Materials." + materialItemInternalNames[i] + ".name";
|
||||
String visibleName = materialItemNames[i];
|
||||
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < patterns.length; i++)
|
||||
{
|
||||
String internalName = "item.tconstruct.Pattern."+patterns[i]+".name";
|
||||
String visibleName = patternNames[i]+" Pattern";
|
||||
String internalName = "item.tconstruct.Pattern." + patterns[i] + ".name";
|
||||
String visibleName = patternNames[i] + " Pattern";
|
||||
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
|
||||
}
|
||||
|
||||
|
||||
LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
|
||||
LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern");
|
||||
LanguageRegistry.addName(TContent.pickaxe, "Pickaxe");
|
||||
@ -164,7 +186,7 @@ public class TProxyClient extends TProxyCommon
|
||||
LanguageRegistry.addName(TContent.battlesign, "Battlesign");
|
||||
LanguageRegistry.addName(TContent.mattock, "Mattock");
|
||||
//LanguageRegistry.addName(TContent.lumberaxe, "Lumber Axe");
|
||||
|
||||
|
||||
LanguageRegistry.addName(TContent.ironFlowing, "Liquid Iron");
|
||||
LanguageRegistry.addName(TContent.ironStill, "Liquid Iron");
|
||||
LanguageRegistry.addName(TContent.goldFlowing, "Liquid Gold");
|
||||
@ -190,47 +212,37 @@ public class TProxyClient extends TProxyCommon
|
||||
LanguageRegistry.addName(TContent.manyullynStill, "Liquid Manyullyn");
|
||||
LanguageRegistry.addName(TContent.obsidianFlowing, "Liquid Obsidian");
|
||||
LanguageRegistry.addName(TContent.obsidianStill, "Liquid Obsidian");
|
||||
LanguageRegistry.addName(TContent.steelFlowing, "Liquid Steel");
|
||||
LanguageRegistry.addName(TContent.steelStill, "Liquid Steel");
|
||||
}
|
||||
|
||||
|
||||
public static final String[] shardNames = new String[] {
|
||||
"Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard", "Slime Crystal Fragment", "Paper",
|
||||
"Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk" };
|
||||
|
||||
public static final String[] materialItemInternalNames = new String[] {
|
||||
"PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone",
|
||||
"CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum" };
|
||||
|
||||
public static final String[] materialItemNames = new String[] {
|
||||
"Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone",
|
||||
"Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum"};
|
||||
|
||||
public static final String[] toolMaterialNames = new String[] {
|
||||
"Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
|
||||
|
||||
public static final String[] materialTypes = new String[] {
|
||||
"ToolRod", "PickaxeHead", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
|
||||
|
||||
public static final String[] materialNames = new String[] {
|
||||
" Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" };
|
||||
|
||||
public static final String[] patterns = new String[] {
|
||||
"blank", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
|
||||
|
||||
public static final String[] patternNames = new String[] {
|
||||
"Blank", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" };
|
||||
public static final String[] shardNames = new String[] { "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard", "Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk" };
|
||||
|
||||
public static final String[] materialItemInternalNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal", "NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum" };
|
||||
|
||||
public static final String[] materialItemNames = new String[] { "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal", "Necrotic Bone", "Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum" };
|
||||
|
||||
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn", "Copper", "Bronze" };
|
||||
|
||||
public static final String[] materialTypes = new String[] { "ToolRod", "PickaxeHead", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead", "SignHead", "LumberHead" };
|
||||
|
||||
public static final String[] materialNames = new String[] { " Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan", " Board", " Broad Axe Head" };
|
||||
|
||||
public static final String[] patterns = new String[] { "blank", "rod", "pickaxe", "shovel", "axe", "blade", "largeguard", "medguard", "crossbar", "binding", "frypan", "sign", "lumber" };
|
||||
|
||||
public static final String[] patternNames = new String[] { "Blank", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding", "Pan", "Board", "Broad Axe Head" };
|
||||
|
||||
public static Document diary;
|
||||
public static Document volume1;
|
||||
|
||||
|
||||
public void readManuals ()
|
||||
{
|
||||
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
|
||||
diary = readManual("/manuals/diary.xml", dbFactory);
|
||||
volume1 = readManual("/manuals/materials.xml", dbFactory);
|
||||
}
|
||||
|
||||
Document readManual(String location, DocumentBuilderFactory dbFactory)
|
||||
|
||||
Document readManual (String location, DocumentBuilderFactory dbFactory)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -247,19 +259,21 @@ public class TProxyClient extends TProxyCommon
|
||||
}
|
||||
}
|
||||
|
||||
public static Document getManualFromStack(ItemStack stack)
|
||||
public static Document getManualFromStack (ItemStack stack)
|
||||
{
|
||||
switch (stack.getItemDamage())
|
||||
{
|
||||
case 0: return diary;
|
||||
case 1: return volume1;
|
||||
case 0:
|
||||
return diary;
|
||||
case 1:
|
||||
return volume1;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public File getLocation()
|
||||
public File getLocation ()
|
||||
{
|
||||
return Minecraft.getMinecraftDir();
|
||||
}
|
||||
|
11
tinker/tconstruct/client/liquidrender/LiquidAlBrassFX.java
Normal file
11
tinker/tconstruct/client/liquidrender/LiquidAlBrassFX.java
Normal file
@ -0,0 +1,11 @@
|
||||
package tinker.tconstruct.client.liquidrender;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class LiquidAlBrassFX extends TextureLiquidStillFX
|
||||
{
|
||||
public LiquidAlBrassFX()
|
||||
{
|
||||
super(200, 255, 165, 255, 20, 100, TContent.alBrassStill.blockIndexInTexture, TContent.alBrassStill.getTextureFile());
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package tinker.tconstruct.client.liquidrender;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class LiquidAlBrassFlowFX extends TextureLiquidFlowingFX
|
||||
{
|
||||
public LiquidAlBrassFlowFX()
|
||||
{
|
||||
super(200, 255, 165, 255, 20, 100, TContent.alBrassFlowing.blockIndexInTexture+1, TContent.alBrassFlowing.getTextureFile());
|
||||
}
|
||||
}
|
@ -6,6 +6,6 @@ public class LiquidAluminumFX extends TextureLiquidStillFX
|
||||
{
|
||||
public LiquidAluminumFX()
|
||||
{
|
||||
super(140, 255, 30, 190, 30, 190, TContent.aluminumStill.blockIndexInTexture, TContent.aluminumStill.getTextureFile());
|
||||
super(50, 255, 0, 150, 0, 120, TContent.aluminumStill.blockIndexInTexture, TContent.aluminumStill.getTextureFile());
|
||||
}
|
||||
}
|
@ -6,6 +6,6 @@ public class LiquidAluminumFlowFX extends TextureLiquidFlowingFX
|
||||
{
|
||||
public LiquidAluminumFlowFX()
|
||||
{
|
||||
super(140, 255, 30, 190, 30, 190, TContent.aluminumFlowing.blockIndexInTexture+1, TContent.aluminumFlowing.getTextureFile());
|
||||
super(50, 255, 0, 150, 0, 120, TContent.aluminumFlowing.blockIndexInTexture+1, TContent.aluminumFlowing.getTextureFile());
|
||||
}
|
||||
}
|
@ -6,6 +6,6 @@ public class LiquidAlumiteFX extends TextureLiquidStillFX
|
||||
{
|
||||
public LiquidAlumiteFX()
|
||||
{
|
||||
super(0, 255, 0, 255, 0, 255, TContent.alumiteStill.blockIndexInTexture, TContent.alumiteStill.getTextureFile());
|
||||
super(0, 255, 0, 200, 0, 255, TContent.alumiteStill.blockIndexInTexture, TContent.alumiteStill.getTextureFile());
|
||||
}
|
||||
}
|
@ -6,6 +6,6 @@ public class LiquidAlumiteFlowFX extends TextureLiquidFlowingFX
|
||||
{
|
||||
public LiquidAlumiteFlowFX()
|
||||
{
|
||||
super(0, 255, 0, 255, 0, 255, TContent.alumiteFlowing.blockIndexInTexture+1, TContent.alumiteFlowing.getTextureFile());
|
||||
super(0, 255, 0, 200, 0, 255, TContent.alumiteFlowing.blockIndexInTexture+1, TContent.alumiteFlowing.getTextureFile());
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package tinker.tconstruct.client.liquidrender;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class LiquidBrassFX extends TextureLiquidStillFX
|
||||
{
|
||||
public LiquidBrassFX()
|
||||
{
|
||||
super(200, 255, 200, 255, 40, 80, TContent.alBrassStill.blockIndexInTexture, TContent.alBrassStill.getTextureFile());
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package tinker.tconstruct.client.liquidrender;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class LiquidBrassFlowFX extends TextureLiquidFlowingFX
|
||||
{
|
||||
public LiquidBrassFlowFX()
|
||||
{
|
||||
super(200, 255, 200, 255, 40, 80, TContent.alBrassFlowing.blockIndexInTexture+1, TContent.alBrassFlowing.getTextureFile());
|
||||
}
|
||||
}
|
11
tinker/tconstruct/client/liquidrender/LiquidSteelFX.java
Normal file
11
tinker/tconstruct/client/liquidrender/LiquidSteelFX.java
Normal file
@ -0,0 +1,11 @@
|
||||
package tinker.tconstruct.client.liquidrender;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class LiquidSteelFX extends TextureLiquidStillFX
|
||||
{
|
||||
public LiquidSteelFX()
|
||||
{
|
||||
super(30, 150, 30, 150, 30, 150, TContent.steelStill.blockIndexInTexture, TContent.steelStill.getTextureFile());
|
||||
}
|
||||
}
|
11
tinker/tconstruct/client/liquidrender/LiquidSteelFlowFX.java
Normal file
11
tinker/tconstruct/client/liquidrender/LiquidSteelFlowFX.java
Normal file
@ -0,0 +1,11 @@
|
||||
package tinker.tconstruct.client.liquidrender;
|
||||
|
||||
import tinker.tconstruct.TContent;
|
||||
|
||||
public class LiquidSteelFlowFX extends TextureLiquidFlowingFX
|
||||
{
|
||||
public LiquidSteelFlowFX()
|
||||
{
|
||||
super(30, 150, 30, 150, 30, 150, TContent.steelFlowing.blockIndexInTexture+1, TContent.steelFlowing.getTextureFile());
|
||||
}
|
||||
}
|
@ -70,8 +70,6 @@ public class ToolStationContainer extends Container
|
||||
{
|
||||
this.addSlotToContainer(new Slot(invPlayer, column, 8 + column * 18, 142));
|
||||
}
|
||||
|
||||
logic.dumpExtraItems(posX.length, invPlayer.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
29
tinker/tconstruct/items/LavaTankItemBlock.java
Normal file
29
tinker/tconstruct/items/LavaTankItemBlock.java
Normal file
@ -0,0 +1,29 @@
|
||||
package tinker.tconstruct.items;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class LavaTankItemBlock extends ItemBlock
|
||||
{
|
||||
public static final String blockType[] =
|
||||
{
|
||||
"Tank", "Gague", "Window"
|
||||
};
|
||||
|
||||
public LavaTankItemBlock(int id)
|
||||
{
|
||||
super(id);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
public String getItemNameIS(ItemStack itemstack)
|
||||
{
|
||||
return (new StringBuilder()).append("LavaTank.").append(blockType[itemstack.getItemDamage()]).toString();
|
||||
}
|
||||
}
|
@ -26,6 +26,11 @@ public class LavaTankLogic extends TileEntity
|
||||
pressure = 0;
|
||||
}
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack getLiquid ()
|
||||
{
|
||||
|
@ -8,6 +8,11 @@ public class MultiServantLogic extends TileEntity
|
||||
{
|
||||
boolean hasMaster;
|
||||
CoordTuple master;
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasValidMaster ()
|
||||
{
|
||||
|
@ -12,6 +12,11 @@ public class PatternChestLogic extends InventoryLogic
|
||||
{
|
||||
super(30);
|
||||
}
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName ()
|
||||
|
@ -14,6 +14,11 @@ public class PatternShaperLogic extends InventoryLogic
|
||||
{
|
||||
super(2);
|
||||
}
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName ()
|
||||
|
@ -13,6 +13,11 @@ public class SmelteryDrainLogic extends MultiServantLogic
|
||||
isDrain = true;
|
||||
}
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LiquidStack getLiquid ()
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ public class SmelteryLogic extends InventoryLogic
|
||||
{
|
||||
int southID = worldObj.getBlockId(xPos, y, z - 2);
|
||||
int northID = worldObj.getBlockId(xPos, y, z + 2);
|
||||
if (southID == TContent.searedBrick.blockID)
|
||||
if (southID == TContent.smeltery.blockID)
|
||||
numBricks++;
|
||||
else if (southID == TContent.lavaTank.blockID)
|
||||
{
|
||||
@ -309,7 +309,7 @@ public class SmelteryLogic extends InventoryLogic
|
||||
hasLavaTank = true;
|
||||
}
|
||||
|
||||
if (northID == TContent.searedBrick.blockID)
|
||||
if (northID == TContent.smeltery.blockID)
|
||||
numBricks++;
|
||||
else if (northID == TContent.lavaTank.blockID)
|
||||
{
|
||||
@ -321,7 +321,7 @@ public class SmelteryLogic extends InventoryLogic
|
||||
{
|
||||
int westID = worldObj.getBlockId(x - 2, y, zPos);
|
||||
int eastID = worldObj.getBlockId(x + 2, y, zPos);
|
||||
if (westID == TContent.searedBrick.blockID)
|
||||
if (westID == TContent.smeltery.blockID)
|
||||
numBricks++;
|
||||
else if (westID == TContent.lavaTank.blockID)
|
||||
{
|
||||
@ -343,12 +343,14 @@ public class SmelteryLogic extends InventoryLogic
|
||||
{
|
||||
for (int zPos = z - 1; zPos <= z + 1; zPos++)
|
||||
{
|
||||
if (worldObj.getBlockId(xPos, y - 1, zPos) == TContent.searedBrick.blockID)
|
||||
if (worldObj.getBlockId(xPos, y - 1, zPos) == TContent.smeltery.blockID)
|
||||
numBricks++;
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(numBricks);
|
||||
|
||||
if (numBricks == 19 && hasLavaTank)
|
||||
if (numBricks == 20 && hasLavaTank)
|
||||
{
|
||||
if (!validStructure)
|
||||
{
|
||||
|
@ -88,20 +88,9 @@ public class ToolStationLogic extends InventoryLogic
|
||||
/*if (container != null)
|
||||
container.detectAndSendChanges();*/
|
||||
}
|
||||
|
||||
public void dumpExtraItems (int usedSlots, EntityPlayer player)
|
||||
{
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
for (int iter = 0; iter < inventory.length; iter++)
|
||||
{
|
||||
if (iter > usedSlots && inventory[iter] != null)
|
||||
{
|
||||
EntityItem entityitem = new EntityItem(worldObj, player.posX, player.posY - 1.0D, player.posZ, inventory[iter]);
|
||||
worldObj.spawnEntityInWorld(entityitem);
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ public class TBaseWorldGenerator
|
||||
{
|
||||
public TBaseWorldGenerator()
|
||||
{
|
||||
copper = new ManhattanOreGenerator(TContent.searedBrick.blockID, 3, 5, 10, 100, true, true);
|
||||
tin = new ManhattanOreGenerator(TContent.searedBrick.blockID, 4, 5, 10, 100, true, true);
|
||||
aluminum = new ManhattanOreGenerator(TContent.searedBrick.blockID, 5, 8, 20, 100, false, true);
|
||||
copper = new ManhattanOreGenerator(TContent.oreSlag.blockID, 3, 5, 10, 100, true, true);
|
||||
tin = new ManhattanOreGenerator(TContent.oreSlag.blockID, 4, 5, 10, 100, true, true);
|
||||
aluminum = new ManhattanOreGenerator(TContent.oreSlag.blockID, 5, 8, 20, 100, false, true);
|
||||
|
||||
cobalt = new ManhattanOreGenerator(TContent.searedBrick.blockID, 1, 2, 4, 100, true, false, Block.netherrack.blockID);
|
||||
ardite = new ManhattanOreGenerator(TContent.searedBrick.blockID, 2, 2, 4, 100, true, false, Block.netherrack.blockID);
|
||||
cobalt = new ManhattanOreGenerator(TContent.oreSlag.blockID, 1, 2, 4, 100, true, false, Block.netherrack.blockID);
|
||||
ardite = new ManhattanOreGenerator(TContent.oreSlag.blockID, 2, 2, 4, 100, true, false, Block.netherrack.blockID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user