diff --git a/mods/tinker/resources/lang/en_US.xml b/mods/tinker/resources/lang/en_US.xml
index a93c4e50..a9d94717 100644
--- a/mods/tinker/resources/lang/en_US.xml
+++ b/mods/tinker/resources/lang/en_US.xml
@@ -72,22 +72,22 @@
Endstone Brick
Obsidian Brick
- Obsidian Fancy Brick
- Sandstone Fancy Brick
- Netherrack Fancy Brick
- Iron Fancy Brick
- Gold Fancy Brick
- Diamond Fancy Brick
- Lapis Fancy Brick
- Polished Stone Fancy Brick
- Redstone Fancy Brick
- Bone Fancy Brick
- Slime Fancy Brick
- Slime Fancy Brick
- Endstone Fancy Brick
- Obsidian Fancy Brick
+ Fancy Obsidian Brick
+ Fancy Sandstone Brick
+ Fancy Netherrack Brick
+ Fancy Iron Brick
+ Fancy Gold Brick
+ Fancy Diamond Brick
+ Fancy Lapis Brick
+ Fancy Polished Stone Brick
+ Fancy Redstone Brick
+ Fancy Bone Brick
+ Fancy Slime Brick
+ Fancy Slime Brick
+ Fancy Endstone Brick
+ Fancy Obsidian Brick
Stone Road
- Stone Fancy Brick
+ Fancy Stone Brick
Iron Oreberry
Gold Oreberry
@@ -130,10 +130,22 @@
Smeltery Controller
Smeltery Drain
Seared Bricks
+ Seared Stone
+ Seared Cobblestone
+ Seared Paver
+ Cracked Seared Bricks
+ Seared Road
+ Fancy Seared Bricks
+ Chiseled Seared Bricks
+ Chiseled Seared Bricks
+
Lava Tank
Seared Glass
Seared Window
+ Drawbridge
+ Igniter
+
Block of Cobalt
Block of Ardite
Block of Manyullyn
@@ -145,8 +157,29 @@
Block of Alumite
Block of Steel
+ Clear Glass
+ Soul Glass
+ Clear Soul Glass
+
Torch
+ White Stained Glass
+ Orange Stained Glass
+ Magenta Stained Glass
+ Light Blue Stained Glass
+ Yellow Stained Glass
+ Lime Stained Glass
+ Pink Stained Glass
+ Gray Stained Glass
+ Light Gray Stained Glass
+ Cyan Stained Glass
+ Purple Stained Glass
+ Blue Stained Glass
+ Brown Stained Glass
+ Green Stained Glass
+ Red Stained Glass
+ Black Stained Glass
+
Knapsack
Blank Pattern
Blank Cast
@@ -168,6 +201,10 @@
Liquid Alumite Bucket
Liquid Obsidian Bucket
Liquid Steel Bucket
+ Liquid Glass Bucket
+ Seared Stone Bucket
+ Liquid Emerald Bucket
+ Bucket o' Blood
Liquid Iron
Liquid Gold
@@ -206,4 +243,9 @@
Armor Gui
+ %1$s transformed into Soylent Green
+ %1$s has fused with the Smeltery
+ %1$s will be a stepping stone for our revolution!
+ %1$s thought swimming in hot liquids was a good idea
+
\ No newline at end of file
diff --git a/mods/tinker/tconstruct/TConstruct.java b/mods/tinker/tconstruct/TConstruct.java
index 66ef6ef1..dd252b61 100644
--- a/mods/tinker/tconstruct/TConstruct.java
+++ b/mods/tinker/tconstruct/TConstruct.java
@@ -2,11 +2,11 @@ package mods.tinker.tconstruct;
import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.common.TProxyCommon;
-import mods.tinker.tconstruct.library.SkillRegistry;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.crafting.Detailing;
import mods.tinker.tconstruct.library.crafting.LiquidCasting;
import mods.tinker.tconstruct.library.util.TabTools;
+import mods.tinker.tconstruct.skill.SkillRegistry;
import mods.tinker.tconstruct.util.PHConstruct;
import mods.tinker.tconstruct.util.TCraftingHandler;
import mods.tinker.tconstruct.util.TEventHandler;
@@ -37,7 +37,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
* @dependencies: IC2 API, MFR API
*/
-@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.6.8", dependencies = "required-after:Forge@[7.7.1.675,)")
+@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.4.dev.3", dependencies = "required-after:Forge@[7.7.1.675,)")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.util.network.TPacketHandler.class)
public class TConstruct
{
diff --git a/mods/tinker/tconstruct/blocks/Aggregator.java b/mods/tinker/tconstruct/blocks/Aggregator.java
index 6d745465..c82f4daf 100644
--- a/mods/tinker/tconstruct/blocks/Aggregator.java
+++ b/mods/tinker/tconstruct/blocks/Aggregator.java
@@ -96,7 +96,7 @@ public class Aggregator extends InventoryBlock
@Override
public void getSubBlocks (int id, CreativeTabs tab, List list)
{
- //list.add(new ItemStack(id, 1, 0));
+ list.add(new ItemStack(id, 1, 0));
/*for (int iter = 0; iter < icons.length; iter++)
{
list.add(new ItemStack(id, 1, iter));
@@ -126,4 +126,10 @@ public class Aggregator extends InventoryBlock
{
return textureNames;
}
+
+ public void updateCrystalValue(World world, int x, int y, int z)
+ {
+ GlowstoneAggregator logic = (GlowstoneAggregator) world.getBlockTileEntity(x, y, z);
+ logic.updateCrystalValue();
+ }
}
diff --git a/mods/tinker/tconstruct/blocks/GlassBlock.java b/mods/tinker/tconstruct/blocks/GlassBlock.java
new file mode 100644
index 00000000..115895ab
--- /dev/null
+++ b/mods/tinker/tconstruct/blocks/GlassBlock.java
@@ -0,0 +1,69 @@
+package mods.tinker.tconstruct.blocks;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class GlassBlock extends TConstructBlock
+{
+ static String blockTextures[] = { "glass_clear", "soulglass", "soulglass_clear" };
+
+ public GlassBlock(int id)
+ {
+ super(id, Material.glass, 3f, blockTextures);
+ }
+
+ public boolean isOpaqueCube()
+ {
+ return false;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
+ {
+ int i1 = par1IBlockAccess.getBlockId(par2, par3, par4);
+ return i1 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
+ }
+
+ @Override
+ public float getBlockHardness(World world, int x, int y, int z)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+ switch(meta)
+ {
+ case 0: return 0.3F;
+ case 1: return 50.0F;
+ case 2: return 50.0F;
+ default: return blockHardness;
+ }
+ }
+
+ public float getExplosionResistance(Entity entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+ switch(meta)
+ {
+ case 0: return 1.5F;
+ case 1: return 2000F;
+ case 2: return 2000F;
+ default: return getExplosionResistance(entity);
+ }
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons (IconRegister iconRegister)
+ {
+ this.icons = new Icon[textureNames.length];
+
+ for (int i = 0; i < this.icons.length; ++i)
+ {
+ this.icons[i] = iconRegister.registerIcon("tinker:glass/" + textureNames[i]);
+ }
+ }
+}
diff --git a/mods/tinker/tconstruct/blocks/GlassBlockStained.java b/mods/tinker/tconstruct/blocks/GlassBlockStained.java
new file mode 100644
index 00000000..e20ee3a1
--- /dev/null
+++ b/mods/tinker/tconstruct/blocks/GlassBlockStained.java
@@ -0,0 +1,52 @@
+package mods.tinker.tconstruct.blocks;
+
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class GlassBlockStained extends TConstructBlock
+{
+ static String blockTextures[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan", "purple", "blue", "brown", "green", "red", "black" };
+ String textureName;
+
+ public GlassBlockStained(int id, String tex)
+ {
+ super(id, Material.glass, 3f, blockTextures);
+ this.textureName = tex;
+ }
+
+ @Override
+ public int getRenderBlockPass ()
+ {
+ return 1;
+ }
+
+ public boolean isOpaqueCube ()
+ {
+ return false;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public boolean shouldSideBeRendered (IBlockAccess world, int x, int y, int z, int side)
+ {
+ int blockID = world.getBlockId(x, y, z);
+ return blockID == this.blockID ? false : super.shouldSideBeRendered(world, x, y, z, side);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void registerIcons (IconRegister iconRegister)
+ {
+ this.icons = new Icon[textureNames.length];
+
+ for (int i = 0; i < this.icons.length; ++i)
+ {
+ this.icons[i] = iconRegister.registerIcon("tinker:glass/" + textureName + textureNames[i]);
+ }
+ }
+}
diff --git a/mods/tinker/tconstruct/blocks/LavaTankBlock.java b/mods/tinker/tconstruct/blocks/LavaTankBlock.java
index 80ff164d..239877a9 100644
--- a/mods/tinker/tconstruct/blocks/LavaTankBlock.java
+++ b/mods/tinker/tconstruct/blocks/LavaTankBlock.java
@@ -52,6 +52,12 @@ public class LavaTankBlock extends BlockContainer
this.icons[i] = iconRegister.registerIcon("tinker:" + textureNames[i]);
}
}
+
+ @Override
+ public int getRenderBlockPass ()
+ {
+ return 1;
+ }
@Override
public boolean isOpaqueCube ()
diff --git a/mods/tinker/tconstruct/blocks/LightCrystalBase.java b/mods/tinker/tconstruct/blocks/LightCrystalBase.java
index 6f3c7deb..101dd8a0 100644
--- a/mods/tinker/tconstruct/blocks/LightCrystalBase.java
+++ b/mods/tinker/tconstruct/blocks/LightCrystalBase.java
@@ -4,6 +4,7 @@ import java.util.List;
import mods.natura.common.NContent;
import mods.tinker.tconstruct.client.block.CrystalBlockRender;
+import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.crystal.TheftValueTracker;
import mods.tinker.tconstruct.library.TConstructRegistry;
import net.minecraft.block.Block;
@@ -92,5 +93,11 @@ public class LightCrystalBase extends Block
TheftValueTracker.updateCrystallinity(world.provider.dimensionId, x, z, -60);
break;
}
+
+ Block block = Block.blocksList[world.getBlockId(x, y-1, z)];
+ if (block == TContent.aggregator)
+ {
+ ((Aggregator)block).updateCrystalValue(world, x, y-1, z);
+ }
}
}
diff --git a/mods/tinker/tconstruct/blocks/LiquidMetalBase.java b/mods/tinker/tconstruct/blocks/LiquidMetalBase.java
index 2f47fbe8..9c172d42 100644
--- a/mods/tinker/tconstruct/blocks/LiquidMetalBase.java
+++ b/mods/tinker/tconstruct/blocks/LiquidMetalBase.java
@@ -12,8 +12,6 @@ import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
@@ -34,7 +32,7 @@ public abstract class LiquidMetalBase extends Block
protected LiquidMetalBase(int par1, Material par2Material)
{
super(par1, par2Material);
- textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel", "glass" };
+ textureNames = new String[] { "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel", "glass", "stone", "villager", "cow" };
setLightValue(0.625F);
}
@@ -343,10 +341,13 @@ public abstract class LiquidMetalBase extends Block
* Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
* coordinates. Args: blockAccess, x, y, z, side
*/
- public boolean shouldSideBeRendered (IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
+ public boolean shouldSideBeRendered (IBlockAccess world, int x, int y, int z, int side)
{
- Material var6 = par1IBlockAccess.getBlockMaterial(par2, par3, par4);
- return var6 == this.blockMaterial ? false : (par5 == 1 ? true : (var6 == Material.ice ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5)));
+ Material material = world.getBlockMaterial(x, y, z);
+ int blockID = world.getBlockId(x, y, z);
+ if (blockID != TContent.liquidMetalFlowing.blockID && blockID != TContent.liquidMetalStill.blockID)
+ return true;
+ return material == this.blockMaterial ? false : (side == 1 ? true : (material == Material.ice ? false : super.shouldSideBeRendered(world, x, y, z, side)));
}
/**
diff --git a/mods/tinker/tconstruct/blocks/RedstoneMachine.java b/mods/tinker/tconstruct/blocks/RedstoneMachine.java
new file mode 100644
index 00000000..5147e7b5
--- /dev/null
+++ b/mods/tinker/tconstruct/blocks/RedstoneMachine.java
@@ -0,0 +1,199 @@
+package mods.tinker.tconstruct.blocks;
+
+import static net.minecraftforge.common.ForgeDirection.UP;
+
+import java.util.List;
+
+import mods.tinker.tconstruct.TConstruct;
+import mods.tinker.tconstruct.blocks.logic.DrawbridgeLogic;
+import mods.tinker.tconstruct.blocks.logic.FirestarterLogic;
+import mods.tinker.tconstruct.client.block.MachineRender;
+import mods.tinker.tconstruct.library.TConstructRegistry;
+import mods.tinker.tconstruct.library.blocks.InventoryBlock;
+import mods.tinker.tconstruct.library.util.IActiveLogic;
+import mods.tinker.tconstruct.library.util.IFacingLogic;
+import net.minecraft.block.material.Material;
+import net.minecraft.client.renderer.texture.IconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.Icon;
+import net.minecraft.world.IBlockAccess;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection;
+
+public class RedstoneMachine extends InventoryBlock
+{
+ public RedstoneMachine(int id)
+ {
+ super(id, Material.iron);
+ this.setCreativeTab(TConstructRegistry.blockTab);
+ setHardness(12);
+ setStepSound(soundMetalFootstep);
+ }
+
+ @Override
+ public TileEntity createTileEntity (World world, int metadata)
+ {
+ switch (metadata)
+ {
+ case 0:
+ return new DrawbridgeLogic();
+ case 1:
+ return new FirestarterLogic();
+ default:
+ return null;
+ }
+ }
+
+ @Override
+ public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
+ {
+ int meta = world.getBlockMetadata(x, y, z);
+ switch(meta)
+ {
+ case 0: return TConstruct.proxy.drawbridgeGui;
+ }
+ return null;
+ }
+
+ @Override
+ public Object getModInstance ()
+ {
+ return TConstruct.instance;
+ }
+
+ /* Rendering */
+
+ @Override
+ public String[] getTextureNames ()
+ {
+ String[] textureNames = { "drawbridge_top", "drawbridge_side", "drawbridge_bottom", "drawbridge_top_face", "drawbridge_side_face", "drawbridge_bottom_face",
+ "firestarter_top", "firestarter_side", "firestarter_bottom"
+ };
+
+ return textureNames;
+ }
+
+ @Override
+ public void registerIcons (IconRegister iconRegister)
+ {
+ String[] textureNames = getTextureNames();
+ this.icons = new Icon[textureNames.length];
+
+ for (int i = 0; i < this.icons.length; ++i)
+ {
+ this.icons[i] = iconRegister.registerIcon("tinker:machines/" + textureNames[i]);
+ }
+ }
+
+ @Override
+ public Icon getIcon (int side, int meta)
+ {
+ if (meta == 0)
+ {
+ if (side == 5)
+ return icons[5];
+ return icons[getTextureIndex(side)];
+ }
+ if (meta == 1)
+ {
+ return icons[getTextureIndex(side)+6];
+ }
+ return icons[0];
+ }
+
+ public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
+ {
+ TileEntity logic = world.getBlockTileEntity(x, y, z);
+ short direction = (logic instanceof IFacingLogic) ? ((IFacingLogic) logic).getRenderDirection() : 0;
+ int meta = world.getBlockMetadata(x, y, z);
+ if (meta == 0)
+ {
+ if (side == direction)
+ {
+ return icons[getTextureIndex(side) + 3];
+ }
+ else
+ {
+ return icons[getTextureIndex(side)];
+ }
+ }
+
+ if (meta == 1)
+ {
+ if (side == direction)
+ {
+ return icons[6];
+ }
+ else if (side / 2 == direction / 2)
+ {
+ return icons[8];
+ }
+ return icons[7];
+ }
+ return icons[0];
+ }
+
+ public int getTextureIndex (int side)
+ {
+ if (side == 0)
+ return 2;
+ if (side == 1)
+ return 0;
+
+ return 1;
+ }
+
+ public int getRenderType ()
+ {
+ return MachineRender.model;
+ }
+
+ public boolean isFireSource(World world, int x, int y, int z, int metadata, ForgeDirection side)
+ {
+ if (metadata == 1)
+ return side == UP;
+ return false;
+ }
+
+ /*@Override
+ public boolean renderAsNormalBlock ()
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isOpaqueCube ()
+ {
+ return false;
+ }
+
+ @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 < 2; iter++)
+ {
+ list.add(new ItemStack(id, 1, iter));
+ }
+ }
+
+ /* Redstone */
+ public boolean canConnectRedstone (IBlockAccess world, int x, int y, int z, int side)
+ {
+ return true;
+ }
+
+ public void onNeighborBlockChange (World world, int x, int y, int z, int neighborBlockID)
+ {
+ IActiveLogic logic = (IActiveLogic) world.getBlockTileEntity(x, y, z);
+ logic.setActive(world.isBlockIndirectlyGettingPowered(x, y, z));
+ }
+}
diff --git a/mods/tinker/tconstruct/blocks/SearedBlock.java b/mods/tinker/tconstruct/blocks/SearedBlock.java
index f4fc3e35..f1871ec6 100644
--- a/mods/tinker/tconstruct/blocks/SearedBlock.java
+++ b/mods/tinker/tconstruct/blocks/SearedBlock.java
@@ -47,6 +47,12 @@ public class SearedBlock extends InventoryBlock
return null;
}
}
+
+ @Override
+ public int getRenderBlockPass ()
+ {
+ return 1;
+ }
@Override
public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer)
diff --git a/mods/tinker/tconstruct/blocks/SmelteryBlock.java b/mods/tinker/tconstruct/blocks/SmelteryBlock.java
index b802d2fa..5b3619bf 100644
--- a/mods/tinker/tconstruct/blocks/SmelteryBlock.java
+++ b/mods/tinker/tconstruct/blocks/SmelteryBlock.java
@@ -55,7 +55,15 @@ public class SmelteryBlock extends InventoryBlock
"drain_side",
"drain_out",
"drain_basin",
- "searedbrick",
+ "searedbrick",
+ "searedstone",
+ "searedcobble",
+ "searedpaver",
+ "searedbrickcracked",
+ "searedroad",
+ "searedbrickfancy",
+ "searedbricksquare",
+ "searedcreeper"
};
return textureNames;
@@ -68,10 +76,17 @@ public class SmelteryBlock extends InventoryBlock
int sideTex = side == 3 ? 1 : 0;
return icons[sideTex + meta*3];
}
- else
+ else if (meta == 2)
{
- return icons[6];
+ return icons[6];
}
+ else if (meta == 11)
+ {
+ if (side == 0 || side == 1)
+ return icons[9];
+ }
+
+ return icons[3 + meta];
}
public Icon getBlockTexture (IBlockAccess world, int x, int y, int z, int side)
@@ -106,12 +121,25 @@ public class SmelteryBlock extends InventoryBlock
else
return icons[3];
}
- else //Brick
+ else if (meta == 2)
{
- return icons[6];
+ return icons[6];
}
+ else if (meta == 11)
+ {
+ if (side == 0 || side == 1)
+ return icons[9];
+ }
+ return icons[3 + meta];
+
}
+ @Override
+ public int getRenderBlockPass()
+ {
+ return 1;
+ }
+
public int damageDropped (int meta)
{
return meta;
@@ -211,9 +239,9 @@ public class SmelteryBlock extends InventoryBlock
{
case 0: return new SmelteryLogic();
case 1: return new SmelteryDrainLogic();
- case 2: return new MultiServantLogic();
- default: return null;
+ case 3: return null; //Furnace
}
+ return new MultiServantLogic();
}
@Override
@@ -239,8 +267,9 @@ public class SmelteryBlock extends InventoryBlock
@Override
public void getSubBlocks (int id, CreativeTabs tab, List list)
{
- for (int iter = 0; iter < 3; iter++)
+ for (int iter = 0; iter < 12; iter++)
{
+ if (iter != 3)
list.add(new ItemStack(id, 1, iter));
}
}
diff --git a/mods/tinker/tconstruct/blocks/logic/AqueductLogic.java b/mods/tinker/tconstruct/blocks/logic/AqueductLogic.java
new file mode 100644
index 00000000..57e73805
--- /dev/null
+++ b/mods/tinker/tconstruct/blocks/logic/AqueductLogic.java
@@ -0,0 +1,48 @@
+package mods.tinker.tconstruct.blocks.logic;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.ForgeDirection;
+import net.minecraftforge.liquids.ILiquidTank;
+import net.minecraftforge.liquids.ITankContainer;
+import net.minecraftforge.liquids.LiquidStack;
+
+public class AqueductLogic extends TileEntity implements ITankContainer
+{
+
+ @Override
+ public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
+ {
+ return 0;
+ }
+
+ @Override
+ public int fill (int tankIndex, LiquidStack resource, boolean doFill)
+ {
+ return 0;
+ }
+
+ @Override
+ public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
+ {
+ return null;
+ }
+
+ @Override
+ public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
+ {
+ return null;
+ }
+
+ @Override
+ public ILiquidTank[] getTanks (ForgeDirection direction)
+ {
+ return null;
+ }
+
+ @Override
+ public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
+ {
+ return null;
+ }
+
+}
diff --git a/mods/tinker/tconstruct/blocks/logic/CastingTableLogic.java b/mods/tinker/tconstruct/blocks/logic/CastingTableLogic.java
index b1daa472..2394c13e 100644
--- a/mods/tinker/tconstruct/blocks/logic/CastingTableLogic.java
+++ b/mods/tinker/tconstruct/blocks/logic/CastingTableLogic.java
@@ -21,184 +21,202 @@ import net.minecraftforge.liquids.LiquidStack;
public class CastingTableLogic extends InventoryLogic implements ILiquidTank, ITankContainer, ISidedInventory
{
- public LiquidStack liquid;
- int castingDelay = 0;
- int renderOffset = 0;
- int capacity = 0;
- boolean needsUpdate;
- boolean init = true;
- int tick;
+ public LiquidStack liquid;
+ int castingDelay = 0;
+ int renderOffset = 0;
+ int capacity = 0;
+ boolean needsUpdate;
+ boolean init = true;
+ int tick;
- public CastingTableLogic()
- {
- super(2);
- }
+ public CastingTableLogic()
+ {
+ super(2);
+ }
- @Override
- public int getInventoryStackLimit ()
- {
- return 1;
- }
+ @Override
+ public int getInventoryStackLimit ()
+ {
+ return 1;
+ }
- @Override
- public String getInvName () //Not a gui block
- {
- return null;
- }
+ @Override
+ public String getInvName () //Not a gui block
+ {
+ return null;
+ }
- @Override
- protected String getDefaultName () //Still not a gui block
- {
- return null;
- }
+ @Override
+ 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
- {
- return null;
- }
+ @Override
+ public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z) //Definitely not a gui block
+ {
+ return null;
+ }
- /* Tank */
- @Override
- public LiquidStack getLiquid ()
- {
- return this.liquid;
- }
+ /* Tank */
+ @Override
+ public LiquidStack getLiquid ()
+ {
+ return this.liquid;
+ }
- @Override
- public int getCapacity ()
- {
- return this.capacity;
- }
+ @Override
+ public int getCapacity ()
+ {
+ return this.capacity;
+ }
- public int updateCapacity () //Only used to initialize
- {
- int ret = TConstruct.ingotLiquidValue;
+ public int updateCapacity () //Only used to initialize
+ {
+ int ret = TConstruct.ingotLiquidValue;
- ItemStack inv = inventory[0];
+ ItemStack inv = inventory[0];
- if (inv != null && inv.getItem() instanceof IPattern)
- ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
+ if (inv != null && inv.getItem() instanceof IPattern)
+ {
+ int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
+ if (cost > 0)
+ ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
+ else
+ ret = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
+ }
- else
- ret = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
+ else
+ {
+ ret = TConstruct.tableCasting.getCastingAmount(this.liquid, inv);
+ }
- return ret;
- }
+ System.out.println("Ret: "+ret);
+ return ret;
+ }
- public int updateCapacity (int capacity)
- {
- int ret = TConstruct.ingotLiquidValue;
+ public int updateCapacity (int capacity)
+ {
+ int ret = TConstruct.ingotLiquidValue;
- ItemStack inv = inventory[0];
+ ItemStack inv = inventory[0];
- if (inv != null && inv.getItem() instanceof IPattern)
- ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
+ if (inv != null && inv.getItem() instanceof IPattern)
+ {
+ int cost = ((IPattern) inv.getItem()).getPatternCost(inv);
+ if (cost > 0)
+ ret *= ((IPattern) inv.getItem()).getPatternCost(inv) * 0.5;
+ else
+ ret = capacity;
+ }
- else
- ret = capacity;
+ else
+ ret = capacity;
- return ret;
- }
+ return ret;
+ }
- @Override
- public int fill (LiquidStack resource, boolean doFill)
- {
- if (resource == null)
- return 0;
+ @Override
+ public int fill (LiquidStack resource, boolean doFill)
+ {
+ if (resource == null)
+ return 0;
- if (this.liquid == null)
- {
- CastingRecipe recipe = TConstruct.tableCasting.getCastingRecipe(resource, inventory[0]);
- if (recipe == null)
- return 0;
- this.capacity = updateCapacity(recipe.castingMetal.amount);
+ if (this.liquid == null)
+ {
+ CastingRecipe recipe = TConstruct.tableCasting.getCastingRecipe(resource, inventory[0]);
+ if (recipe == null)
+ return 0;
+ this.capacity = updateCapacity(recipe.castingMetal.amount);
- if (inventory[1] == null)
- {
- LiquidStack copyLiquid = resource.copy();
+ if (inventory[1] == null)
+ {
+ LiquidStack copyLiquid = resource.copy();
- if (copyLiquid.amount > this.capacity)
- {
- copyLiquid.amount = this.capacity;
- }
+ if (copyLiquid.amount > this.capacity)
+ {
+ copyLiquid.amount = this.capacity;
+ }
- if (doFill)
- {
- if (copyLiquid.amount == this.capacity)
- {
- castingDelay = recipe.coolTime;
- }
- renderOffset = copyLiquid.amount;
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- this.liquid = copyLiquid;
- needsUpdate = true;
- }
- return copyLiquid.amount;
- }
- else
- {
- return 0;
- }
- }
+ if (doFill)
+ {
+ if (copyLiquid.amount == this.capacity)
+ {
+ castingDelay = recipe.coolTime;
+ }
+ renderOffset = copyLiquid.amount;
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ this.liquid = copyLiquid;
+ needsUpdate = true;
+ }
+ return copyLiquid.amount;
+ }
+ else
+ {
+ return 0;
+ }
+ }
- else if (resource.isLiquidEqual(this.liquid))
- {
- if (resource.amount + this.liquid.amount >= this.capacity) //Start timer here
- {
- int roomInTank = this.capacity - liquid.amount;
- if (doFill && roomInTank > 0)
- {
- renderOffset = roomInTank;
- castingDelay = TConstruct.tableCasting.getCastingDelay(this.liquid, inventory[0]);
- this.liquid.amount = this.capacity;
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- needsUpdate = true;
- }
- return roomInTank;
- }
+ else if (resource.isLiquidEqual(this.liquid))
+ {
+ if (resource.amount + this.liquid.amount >= this.capacity) //Start timer here
+ {
+ int roomInTank = this.capacity - liquid.amount;
+ if (doFill && roomInTank > 0)
+ {
+ renderOffset = roomInTank;
+ castingDelay = TConstruct.tableCasting.getCastingDelay(this.liquid, inventory[0]);
+ this.liquid.amount = this.capacity;
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ needsUpdate = true;
+ }
+ return roomInTank;
+ }
- else
- {
- if (doFill)
- {
- this.liquid.amount += resource.amount;
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- needsUpdate = true;
- }
- return resource.amount;
- }
- }
+ else
+ {
+ if (doFill)
+ {
+ this.liquid.amount += resource.amount;
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ needsUpdate = true;
+ }
+ return resource.amount;
+ }
+ }
- else
- {
- return 0;
- }
- }
+ else
+ {
+ return 0;
+ }
+ }
- @Override
- public void onInventoryChanged () //Isn't actually called?
- {
- super.onInventoryChanged();
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- needsUpdate = true;
- }
+ @Override
+ public void onInventoryChanged () //Isn't actually called?
+ {
+ super.onInventoryChanged();
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ needsUpdate = true;
+ }
- public ItemStack decrStackSize (int slot, int quantity)
- {
- ItemStack stack = super.decrStackSize(slot, quantity);
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- return stack;
- }
+ public ItemStack decrStackSize (int slot, int quantity)
+ {
+ ItemStack stack = super.decrStackSize(slot, quantity);
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ return stack;
+ }
- @Override
- public LiquidStack drain (int maxDrain, boolean doDrain)
- {
- if (liquid == null || liquid.itemID <= 0 || castingDelay > 0) return null;
- if (liquid.amount <= 0) return null;
+ @Override
+ public LiquidStack drain (int maxDrain, boolean doDrain)
+ {
+ if (liquid == null || liquid.itemID <= 0 || castingDelay > 0)
+ return null;
+ if (liquid.amount <= 0)
+ return null;
int used = maxDrain;
- if (liquid.amount < used) used = liquid.amount;
+ if (liquid.amount < used)
+ used = liquid.amount;
if (doDrain)
{
@@ -208,187 +226,188 @@ public class CastingTableLogic extends InventoryLogic implements ILiquidTank, IT
LiquidStack drained = new LiquidStack(liquid.itemID, used, liquid.itemMeta);
// Reset liquid if emptied
- if (liquid.amount <= 0) liquid = null;
+ if (liquid.amount <= 0)
+ liquid = null;
if (doDrain)
LiquidEvent.fireEvent(new LiquidEvent.LiquidDrainingEvent(drained, this.worldObj, this.xCoord, this.yCoord, this.zCoord, this));
return drained;
- }
+ }
- @Override
- public int getTankPressure ()
- {
- return 0;
- }
+ @Override
+ public int getTankPressure ()
+ {
+ return 0;
+ }
- /* Tank Container */
+ /* Tank Container */
- @Override
- public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
- {
- //if (from == ForgeDirection.UP)
- return fill(0, resource, doFill);
- //return 0;
- }
+ @Override
+ public int fill (ForgeDirection from, LiquidStack resource, boolean doFill)
+ {
+ //if (from == ForgeDirection.UP)
+ return fill(0, resource, doFill);
+ //return 0;
+ }
- @Override
- public int fill (int tankIndex, LiquidStack resource, boolean doFill)
- {
- return fill(resource, doFill);
- }
+ @Override
+ public int fill (int tankIndex, LiquidStack resource, boolean doFill)
+ {
+ return fill(resource, doFill);
+ }
- @Override
- public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
- {
- return drain(0, maxDrain, doDrain);
- }
+ @Override
+ public LiquidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
+ {
+ return drain(0, maxDrain, doDrain);
+ }
- @Override
- public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
- {
- return drain(maxDrain, doDrain);
- }
+ @Override
+ public LiquidStack drain (int tankIndex, int maxDrain, boolean doDrain)
+ {
+ return drain(maxDrain, doDrain);
+ }
- @Override
- public ILiquidTank[] getTanks (ForgeDirection direction)
- {
- return new ILiquidTank[] { this };
- }
+ @Override
+ public ILiquidTank[] getTanks (ForgeDirection direction)
+ {
+ return new ILiquidTank[] { this };
+ }
- @Override
- public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
- {
- return this;
- }
+ @Override
+ public ILiquidTank getTank (ForgeDirection direction, LiquidStack type)
+ {
+ return this;
+ }
- public int getLiquidAmount ()
- {
- return liquid.amount - renderOffset;
- }
+ public int getLiquidAmount ()
+ {
+ return liquid.amount - renderOffset;
+ }
- /* Updating */
- @Override
- public void updateEntity ()
- {
- if (castingDelay > 0)
- {
- //System.out.println("Casting");
- castingDelay--;
- if (castingDelay == 0)
- castLiquid();
- }
- if (renderOffset > 0)
- {
- renderOffset -= 6;
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- }
+ /* Updating */
+ @Override
+ public void updateEntity ()
+ {
+ if (castingDelay > 0)
+ {
+ //System.out.println("Casting");
+ castingDelay--;
+ if (castingDelay == 0)
+ castLiquid();
+ }
+ if (renderOffset > 0)
+ {
+ renderOffset -= 6;
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ }
- tick++;
- if (tick % 20 == 0)
- {
- tick = 0;
- if (needsUpdate)
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- }
- }
+ tick++;
+ if (tick % 20 == 0)
+ {
+ tick = 0;
+ if (needsUpdate)
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ }
+ }
- public void castLiquid ()
- {
- CastingRecipe recipe = TConstruct.tableCasting.getCastingRecipe(liquid, inventory[0]);
- if (recipe != null)
- {
- inventory[1] = recipe.getResult();
- if (recipe.consumeCast)
- inventory[0] = null;
- liquid = null;
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- }
- }
+ public void castLiquid ()
+ {
+ CastingRecipe recipe = TConstruct.tableCasting.getCastingRecipe(liquid, inventory[0]);
+ if (recipe != null)
+ {
+ inventory[1] = recipe.getResult();
+ if (recipe.consumeCast)
+ inventory[0] = null;
+ liquid = null;
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ }
+ }
- /* NBT */
+ /* NBT */
- @Override
- public void readFromNBT (NBTTagCompound tags)
- {
- super.readFromNBT(tags);
- readCustomNBT(tags);
- }
+ @Override
+ public void readFromNBT (NBTTagCompound tags)
+ {
+ super.readFromNBT(tags);
+ readCustomNBT(tags);
+ }
- public void readCustomNBT (NBTTagCompound tags)
- {
- if (tags.getBoolean("hasLiquid"))
- this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
- else
- this.liquid = null;
+ public void readCustomNBT (NBTTagCompound tags)
+ {
+ if (tags.getBoolean("hasLiquid"))
+ this.liquid = new LiquidStack(tags.getInteger("itemID"), tags.getInteger("amount"), tags.getInteger("itemMeta"));
+ else
+ this.liquid = null;
- if (tags.getBoolean("Initialized"))
- this.capacity = tags.getInteger("Capacity");
- else
- this.capacity = updateCapacity();
- }
+ if (tags.getBoolean("Initialized"))
+ this.capacity = tags.getInteger("Capacity");
+ else
+ this.capacity = updateCapacity();
+ }
- @Override
- public void writeToNBT (NBTTagCompound tags)
- {
- super.writeToNBT(tags);
- writeCustomNBT(tags);
- }
+ @Override
+ public void writeToNBT (NBTTagCompound tags)
+ {
+ super.writeToNBT(tags);
+ writeCustomNBT(tags);
+ }
- public void writeCustomNBT (NBTTagCompound tags)
- {
- tags.setBoolean("hasLiquid", liquid != null);
- if (liquid != null)
- {
- tags.setInteger("itemID", liquid.itemID);
- tags.setInteger("amount", liquid.amount);
- tags.setInteger("itemMeta", liquid.itemMeta);
- }
- tags.setBoolean("Initialized", init);
- tags.setInteger("Capacity", capacity);
- }
+ public void writeCustomNBT (NBTTagCompound tags)
+ {
+ tags.setBoolean("hasLiquid", liquid != null);
+ if (liquid != null)
+ {
+ tags.setInteger("itemID", liquid.itemID);
+ tags.setInteger("amount", liquid.amount);
+ tags.setInteger("itemMeta", liquid.itemMeta);
+ }
+ tags.setBoolean("Initialized", init);
+ tags.setInteger("Capacity", capacity);
+ }
- /* Packets */
- @Override
- public Packet getDescriptionPacket ()
- {
- NBTTagCompound tag = new NBTTagCompound();
- writeToNBT(tag);
- return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
- }
+ /* Packets */
+ @Override
+ public Packet getDescriptionPacket ()
+ {
+ NBTTagCompound tag = new NBTTagCompound();
+ writeToNBT(tag);
+ return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
+ }
- @Override
- public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
- {
- readFromNBT(packet.customParam1);
- worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
- }
+ @Override
+ public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
+ {
+ readFromNBT(packet.customParam1);
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ }
- @Override
- public int[] getAccessibleSlotsFromSide (int side)
- {
- return new int[] { 0, 1 };
- }
+ @Override
+ public int[] getAccessibleSlotsFromSide (int side)
+ {
+ return new int[] { 0, 1 };
+ }
- @Override
- public boolean canInsertItem (int slot, ItemStack itemstack, int side)
- {
- if (liquid != null)
- return false;
-
- if (slot == 0)
- return true;
-
- return false;
- }
+ @Override
+ public boolean canInsertItem (int slot, ItemStack itemstack, int side)
+ {
+ if (liquid != null)
+ return false;
- @Override
- public boolean canExtractItem (int slot, ItemStack itemstack, int side)
- {
- if (slot == 1)
- return true;
-
- return false;
- }
+ if (slot == 0)
+ return true;
+
+ return false;
+ }
+
+ @Override
+ public boolean canExtractItem (int slot, ItemStack itemstack, int side)
+ {
+ if (slot == 1)
+ return true;
+
+ return false;
+ }
}
diff --git a/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java b/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java
new file mode 100644
index 00000000..f8966b9f
--- /dev/null
+++ b/mods/tinker/tconstruct/blocks/logic/DrawbridgeLogic.java
@@ -0,0 +1,270 @@
+package mods.tinker.tconstruct.blocks.logic;
+
+import mods.tinker.tconstruct.inventory.DrawbridgeContainer;
+import mods.tinker.tconstruct.library.blocks.InventoryLogic;
+import mods.tinker.tconstruct.library.util.CoordTuple;
+import mods.tinker.tconstruct.library.util.IActiveLogic;
+import mods.tinker.tconstruct.library.util.IFacingLogic;
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.util.MathHelper;
+import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeDirection;
+
+public class DrawbridgeLogic extends InventoryLogic implements IFacingLogic, IActiveLogic
+{
+ boolean active;
+ boolean working;
+ int ticks;
+ byte extension;
+ byte direction;
+
+ public DrawbridgeLogic()
+ {
+ super(1);
+ }
+
+ @Override
+ public boolean getActive ()
+ {
+ return active;
+ }
+
+ @Override
+ public void setActive (boolean flag)
+ {
+ active = flag;
+ working = true;
+ }
+
+ @Override
+ public byte getRenderDirection ()
+ {
+ return direction;
+ }
+
+ @Override
+ public ForgeDirection getForgeDirection ()
+ {
+ return ForgeDirection.VALID_DIRECTIONS[direction];
+ }
+
+ @Override
+ public void setDirection (int side)
+ {
+ }
+
+ @Override
+ public void setDirection (float yaw, float pitch, EntityLiving player)
+ {
+ if (pitch > 45)
+ {
+ direction = 1;
+ }
+ else if (pitch < -45)
+ {
+ direction = 0;
+ }
+ else
+ {
+ int facing = MathHelper.floor_double((double) (yaw / 360) + 0.5D) & 3;
+ switch (facing)
+ {
+ case 0:
+ direction = 2;
+ break;
+
+ case 1:
+ direction = 5;
+ break;
+
+ case 2:
+ direction = 3;
+ break;
+
+ case 3:
+ direction = 4;
+ break;
+ }
+ }
+ }
+
+ @Override
+ public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z)
+ {
+ return new DrawbridgeContainer(inventoryplayer, this);
+ }
+
+ @Override
+ protected String getDefaultName ()
+ {
+ return "tinker.drawbridge";
+ }
+
+ public void updateEntity ()
+ {
+ if (working)
+ {
+ ticks++;
+ if (ticks == 5)
+ {
+ ticks = 0;
+ if (active)
+ {
+ if (inventory[0] != null && inventory[0].stackSize > 1 && extension < 16)
+ {
+ extension++;
+ int xPos = xCoord;
+ int yPos = yCoord;
+ int zPos = zCoord;
+
+ switch (direction)
+ {
+ case 0:
+ yPos -= extension;
+ break;
+ case 1:
+ yPos += extension;
+ break;
+ case 2:
+ zPos -= extension;
+ break;
+ case 3:
+ zPos += extension;
+ break;
+ case 4:
+ xPos -= extension;
+ break;
+ case 5:
+ xPos += extension;
+ break;
+ }
+
+ Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)];
+ if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos))
+ {
+ worldObj.setBlock(xPos, yPos, zPos, inventory[0].itemID, inventory[0].getItemDamage(), 3);
+ inventory[0].stackSize--;
+ //inventory[0].getItem().onItemUse(inventory[0], null, worldObj, xPos, yPos, zPos, direction, 0.5F, 0.5F, 0.5F);
+ }
+ else
+ {
+ extension--;
+ working = false;
+ }
+ }
+
+ else
+ {
+ working = false;
+ }
+ }
+ else
+ {
+ if ((inventory[0] == null || inventory[0].stackSize < inventory[0].getMaxStackSize()) && extension > 0)
+ {
+ int xPos = xCoord;
+ int yPos = yCoord;
+ int zPos = zCoord;
+
+ switch (direction)
+ {
+ case 0:
+ yPos -= extension;
+ break;
+ case 1:
+ yPos += extension;
+ break;
+ case 2:
+ zPos -= extension;
+ break;
+ case 3:
+ zPos += extension;
+ break;
+ case 4:
+ xPos -= extension;
+ break;
+ case 5:
+ xPos += extension;
+ break;
+ }
+
+ //System.out.println("Extension: "+extension+" Coord: "+new CoordTuple(xPos, yPos, zPos));
+
+ Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)];
+ if (block != null)
+ {
+ int meta = worldObj.getBlockMetadata(xPos, yPos, zPos);
+ if (block.blockID == inventory[0].itemID && meta == inventory[0].getItemDamage())
+ {
+ worldObj.setBlock(xPos, yPos, zPos, 0);
+ inventory[0].stackSize++;
+ }
+ else
+ {
+ working = false;
+ }
+ }
+ extension--;
+ }
+ else
+ {
+ working = false;
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void readFromNBT (NBTTagCompound tags)
+ {
+ super.readFromNBT(tags);
+ active = tags.getBoolean("Active");
+ working = tags.getBoolean("Working");
+ extension = tags.getByte("Extension");
+ readCustomNBT(tags);
+ }
+
+ @Override
+ public void writeToNBT (NBTTagCompound tags)
+ {
+ super.writeToNBT(tags);
+ tags.setBoolean("Active", active);
+ tags.setBoolean("Working", working);
+ tags.setByte("Extension", extension);
+ writeCustomNBT(tags);
+ }
+
+ public void readCustomNBT (NBTTagCompound tags)
+ {
+ direction = tags.getByte("Direction");
+ }
+
+ public void writeCustomNBT (NBTTagCompound tags)
+ {
+ tags.setByte("Direction", direction);
+ }
+
+ /* Packets */
+ @Override
+ public Packet getDescriptionPacket ()
+ {
+ NBTTagCompound tag = new NBTTagCompound();
+ writeCustomNBT(tag);
+ return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
+ }
+
+ @Override
+ public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
+ {
+ readCustomNBT(packet.customParam1);
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ }
+}
diff --git a/mods/tinker/tconstruct/blocks/logic/FaucetLogic.java b/mods/tinker/tconstruct/blocks/logic/FaucetLogic.java
index 69352cfd..c0e8bcf7 100644
--- a/mods/tinker/tconstruct/blocks/logic/FaucetLogic.java
+++ b/mods/tinker/tconstruct/blocks/logic/FaucetLogic.java
@@ -122,6 +122,12 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
{
return ForgeDirection.VALID_DIRECTIONS[direction];
}
+
+ @Override
+ public void setDirection (int side)
+ {
+ //direction = (byte) side;
+ }
@Override
public void setDirection (float yaw, float pitch, EntityLiving player)
@@ -253,5 +259,4 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi
{
return null;
}
-
}
diff --git a/mods/tinker/tconstruct/blocks/logic/FirestarterLogic.java b/mods/tinker/tconstruct/blocks/logic/FirestarterLogic.java
new file mode 100644
index 00000000..ffdad9ba
--- /dev/null
+++ b/mods/tinker/tconstruct/blocks/logic/FirestarterLogic.java
@@ -0,0 +1,181 @@
+package mods.tinker.tconstruct.blocks.logic;
+
+import mods.tinker.tconstruct.library.tools.AbilityHelper;
+import mods.tinker.tconstruct.library.util.IActiveLogic;
+import mods.tinker.tconstruct.library.util.IFacingLogic;
+import net.minecraft.block.Block;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.network.INetworkManager;
+import net.minecraft.network.packet.Packet;
+import net.minecraft.network.packet.Packet132TileEntityData;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.MathHelper;
+import net.minecraftforge.common.ForgeDirection;
+
+public class FirestarterLogic extends TileEntity implements IFacingLogic, IActiveLogic
+{
+ boolean active;
+ boolean putOut;
+ byte direction;
+
+ @Override
+ public boolean getActive ()
+ {
+ return active;
+ }
+
+ @Override
+ public void setActive (boolean flag)
+ {
+ if (active && !flag)
+ putOut = true;
+ active = flag;
+ setFire();
+ }
+
+ void setFire ()
+ {
+ int xPos = xCoord;
+ int yPos = yCoord;
+ int zPos = zCoord;
+
+ switch (direction)
+ {
+ case 0:
+ yPos -= 1;
+ break;
+ case 1:
+ yPos += 1;
+ break;
+ case 2:
+ zPos -= 1;
+ break;
+ case 3:
+ zPos += 1;
+ break;
+ case 4:
+ xPos -= 1;
+ break;
+ case 5:
+ xPos += 1;
+ break;
+ }
+
+ Block block = Block.blocksList[worldObj.getBlockId(xPos, yPos, zPos)];
+ if (active)
+ {
+ if (block == null || block.isAirBlock(worldObj, xPos, yPos, zPos))
+ {
+ worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "fire.ignite", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F);
+ worldObj.setBlock(xPos, yPos, zPos, Block.fire.blockID);
+ }
+ }
+ else
+ {
+ if (block == Block.fire)
+ {
+ if (putOut)
+ {
+ worldObj.playSoundEffect((double) xPos + 0.5D, (double) yPos + 0.5D, (double) zPos + 0.5D, "random.fizz", 1.0F, AbilityHelper.random.nextFloat() * 0.4F + 0.8F);
+ putOut = false;
+ }
+ worldObj.setBlock(xPos, yPos, zPos, 0, 0, 3);
+ }
+ }
+ }
+
+ @Override
+ public byte getRenderDirection ()
+ {
+ return direction;
+ }
+
+ @Override
+ public ForgeDirection getForgeDirection ()
+ {
+ return ForgeDirection.VALID_DIRECTIONS[direction];
+ }
+
+ @Override
+ public void setDirection (int side)
+ {
+ }
+
+ @Override
+ public void setDirection (float yaw, float pitch, EntityLiving player)
+ {
+ if (pitch > 45)
+ {
+ direction = 1;
+ }
+ else if (pitch < -45)
+ {
+ direction = 0;
+ }
+ else
+ {
+ int facing = MathHelper.floor_double((double) (yaw / 360) + 0.5D) & 3;
+ switch (facing)
+ {
+ case 0:
+ direction = 2;
+ break;
+
+ case 1:
+ direction = 5;
+ break;
+
+ case 2:
+ direction = 3;
+ break;
+
+ case 3:
+ direction = 4;
+ break;
+ }
+ }
+ }
+
+ @Override
+ public void readFromNBT (NBTTagCompound tags)
+ {
+ super.readFromNBT(tags);
+ tags.setBoolean("Active", active);
+ readCustomNBT(tags);
+ }
+
+ @Override
+ public void writeToNBT (NBTTagCompound tags)
+ {
+ super.writeToNBT(tags);
+ active = tags.getBoolean("Active");
+ writeCustomNBT(tags);
+ }
+
+ public void readCustomNBT (NBTTagCompound tags)
+ {
+ direction = tags.getByte("Direction");
+ }
+
+ public void writeCustomNBT (NBTTagCompound tags)
+ {
+ tags.setByte("Direction", direction);
+ }
+
+ /* Packets */
+ @Override
+ public Packet getDescriptionPacket ()
+ {
+ NBTTagCompound tag = new NBTTagCompound();
+ writeCustomNBT(tag);
+ return new Packet132TileEntityData(xCoord, yCoord, zCoord, 1, tag);
+ }
+
+ @Override
+ public void onDataPacket (INetworkManager net, Packet132TileEntityData packet)
+ {
+ readCustomNBT(packet.customParam1);
+ worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
+ }
+}
diff --git a/mods/tinker/tconstruct/blocks/logic/GlowstoneAggregator.java b/mods/tinker/tconstruct/blocks/logic/GlowstoneAggregator.java
index 5b265ba3..d5d54bde 100644
--- a/mods/tinker/tconstruct/blocks/logic/GlowstoneAggregator.java
+++ b/mods/tinker/tconstruct/blocks/logic/GlowstoneAggregator.java
@@ -45,7 +45,7 @@ public class GlowstoneAggregator extends AggregatorLogic implements IActiveLogic
if (worldObj.isRemote)
return;
- if (worldObj.canBlockSeeTheSky(xCoord, yCoord+1, zCoord) && crystalValue < 64)
+ if (worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord) && crystalValue < 64)
{
Block block = Block.blocksList[worldObj.getBlockId(xCoord, yCoord + 1, zCoord)];
if (block == null || validBlock(block) || block.isAirBlock(worldObj, xCoord, yCoord + 1, zCoord))
@@ -71,7 +71,7 @@ public class GlowstoneAggregator extends AggregatorLogic implements IActiveLogic
}
else if (crystalValue >= 28)
{
- if (meta < 3)
+ if (meta < 2)
{
worldObj.setBlockMetadataWithNotify(xCoord, yCoord + 1, zCoord, 2, 3);
TheftValueTracker.updateCrystallinity(worldObj.provider.dimensionId, xCoord, zCoord, 15); //Total 35
@@ -170,4 +170,28 @@ public class GlowstoneAggregator extends AggregatorLogic implements IActiveLogic
readCustomNBT(packet.customParam1);
worldObj.markBlockForRenderUpdate(xCoord, yCoord, zCoord);
}
+
+ public void updateCrystalValue ()
+ {
+ if (crystalValue > 0)
+ {
+ Block block = Block.blocksList[worldObj.getBlockId(xCoord, yCoord + 1, zCoord)];
+ if (block == TContent.lightCrystalBase)
+ {
+ int meta = worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord);
+ if (meta == 3)
+ crystalValue = 64;
+ else if (meta == 2)
+ crystalValue = 28;
+ else if (meta == 1)
+ crystalValue = 8;
+ else
+ crystalValue = 1;
+ }
+ else
+ {
+ crystalValue = 0;
+ }
+ }
+ }
}
diff --git a/mods/tinker/tconstruct/blocks/logic/SmelteryDrainLogic.java b/mods/tinker/tconstruct/blocks/logic/SmelteryDrainLogic.java
index 8c47f1bf..4fadbf75 100644
--- a/mods/tinker/tconstruct/blocks/logic/SmelteryDrainLogic.java
+++ b/mods/tinker/tconstruct/blocks/logic/SmelteryDrainLogic.java
@@ -132,6 +132,12 @@ public class SmelteryDrainLogic extends MultiServantLogic
return ForgeDirection.VALID_DIRECTIONS[direction];
}
+ @Override
+ public void setDirection (int side)
+ {
+
+ }
+
@Override
public void setDirection (float yaw, float pitch, EntityLiving player)
{
diff --git a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java
index 531d0078..af225d58 100644
--- a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java
+++ b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java
@@ -1,6 +1,7 @@
package mods.tinker.tconstruct.blocks.logic;
import java.util.ArrayList;
+import java.util.List;
import java.util.Random;
import mods.tinker.tconstruct.common.TContent;
@@ -11,9 +12,12 @@ import mods.tinker.tconstruct.library.util.CoordTuple;
import mods.tinker.tconstruct.library.util.IActiveLogic;
import mods.tinker.tconstruct.library.util.IFacingLogic;
import mods.tinker.tconstruct.library.util.IMasterLogic;
+import mods.tinker.tconstruct.util.SmelteryDamageSource;
import net.minecraft.block.Block;
+import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.item.EntityItem;
+import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
@@ -23,6 +27,8 @@ import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet132TileEntityData;
import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.AxisAlignedBB;
+import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
@@ -185,6 +191,12 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
return ForgeDirection.VALID_DIRECTIONS[direction];
}
+
+ @Override
+ public void setDirection (int side)
+ {
+
+ }
@Override
public void setDirection (float yaw, float pitch, EntityLiving player)
@@ -256,9 +268,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
if (tick % 4 == 0)
heatItems();
- if (tick == 20)
+ if (tick % 20 == 0)
{
- tick = 0;
if (!validStructure)
checkValidPlacement();
@@ -276,6 +287,80 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
+
+ if (tick == 60)
+ {
+ tick = 0;
+ if (validStructure)
+ detectEntities();
+ }
+ }
+
+ void detectEntities ()
+ {
+ AxisAlignedBB box = AxisAlignedBB.getAABBPool().getAABB(centerPos.x, centerPos.y, centerPos.z, centerPos.x + 1.0D, centerPos.y + 1.0D, centerPos.z + 1.0D).expand(1.0D, 0.0D, 1.0D);
+
+ List list = worldObj.getEntitiesWithinAABB(Entity.class, box);
+ for (Object o : list)
+ {
+ if (o instanceof EntityVillager)
+ {
+ EntityVillager villager = (EntityVillager) o;
+ if (villager.attackEntityFrom(new SmelteryDamageSource(), 1))
+ {
+ if (currentLiquid + 8 < maxLiquid)
+ {
+ int amount = villager.isChild() ? 4 : 8;
+ this.addMoltenMetal(new LiquidStack(TContent.liquidMetalStill.blockID, amount, 15), false);
+ }
+ }
+ }
+ else if (o instanceof EntityLiving)
+ {
+ EntityLiving living = (EntityLiving) o;
+ if (living.attackEntityFrom(new SmelteryDamageSource(), 1))
+ {
+ if (currentLiquid + 8 < maxLiquid)
+ {
+ int amount = living.isChild() ? 4 : 8;
+ this.addMoltenMetal(new LiquidStack(TContent.liquidMetalStill.blockID, amount, 16), false);
+ }
+ }
+ }
+ boolean itemAdded = false;
+ if (o instanceof EntityItem)
+ {
+ EntityItem item = (EntityItem) o;
+ item.age = 0;
+ int position = 0;
+ boolean canContinue = true;
+ do
+ {
+ if (inventory[position] == null)
+ {
+ ItemStack stack = item.getEntityItem();
+ if (stack.stackSize > 0)
+ {
+ itemAdded = true;
+ this.setInventorySlotContents(position, stack.copy());
+ stack.stackSize--;
+ this.onInventoryChanged();
+ //worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ }
+ if (stack.stackSize < 1)
+ {
+ canContinue = false;
+ item.attackEntityFrom(DamageSource.magic, 1000);
+ }
+ }
+ position++;
+ if (position == inventory.length)
+ canContinue = false;
+ } while (canContinue);
+ }
+ if (itemAdded)
+ this.needsUpdate = true;
+ }
}
void heatItems ()
@@ -745,7 +830,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
{
for (int zPos = z - 1; zPos <= z + 1; zPos++)
{
- if (worldObj.getBlockId(xPos, y, zPos) == TContent.smeltery.blockID && (worldObj.getBlockMetadata(xPos, y, zPos) == 2))
+ if (worldObj.getBlockId(xPos, y, zPos) == TContent.smeltery.blockID && (worldObj.getBlockMetadata(xPos, y, zPos) >= 2))
bottomBricks++;
}
}
diff --git a/mods/tinker/tconstruct/client/TProxyClient.java b/mods/tinker/tconstruct/client/TProxyClient.java
index 0babc9b1..b4c18f64 100644
--- a/mods/tinker/tconstruct/client/TProxyClient.java
+++ b/mods/tinker/tconstruct/client/TProxyClient.java
@@ -106,6 +106,8 @@ public class TProxyClient extends TProxyCommon
return new ToolForgeGui(player.inventory, (ToolForgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
if (ID == glowstoneAggregatorGui)
return new GlowstoneAggregatorGui(player.inventory, (GlowstoneAggregator) world.getBlockTileEntity(x, y, z), world, x, y, z);
+ if (ID == drawbridgeGui)
+ return new DrawbridgeGui(player.inventory, (DrawbridgeLogic) world.getBlockTileEntity(x, y, z), world, x, y, z);
if (ID == manualGuiID)
{
@@ -234,6 +236,7 @@ public class TProxyClient extends TProxyCommon
RenderingRegistry.registerBlockHandler(new OreberryRender());
RenderingRegistry.registerBlockHandler(new BarricadeRender());
RenderingRegistry.registerBlockHandler(new CrystalBlockRender());
+ RenderingRegistry.registerBlockHandler(new MachineRender());
//RenderingRegistry.registerBlockHandler(new BrickRender());
//RenderingRegistry.registerBlockHandler(new BallRepeaterRender());
@@ -246,13 +249,12 @@ public class TProxyClient extends TProxyCommon
RenderingRegistry.registerEntityRenderingHandler(FancyEntityItem.class, new FancyItemRender());
RenderingRegistry.registerEntityRenderingHandler(BlueSlime.class, new SlimeRender(new ModelSlime(16), new ModelSlime(0), 0.25F));
RenderingRegistry.registerEntityRenderingHandler(SlimeClone.class, new SlimeCloneRender(new CloneHeadModel(0), new CloneHeadModel(1f), 0.25F));
- //RenderingRegistry.registerEntityRenderingHandler(GolemBase.class, new GolemRender(0));
RenderingRegistry.registerEntityRenderingHandler(CartEntity.class, new CartRender());
RenderingRegistry.registerEntityRenderingHandler(DaggerEntity.class, new DaggerRender());
+ RenderingRegistry.registerEntityRenderingHandler(Crystal.class, new CrystalRender());
// RenderingRegistry.registerEntityRenderingHandler(Skyla.class, new SkylaRender());
RenderingRegistry.registerEntityRenderingHandler(Automaton.class, new CrystalGuardianRender());
- //RenderingRegistry.registerEntityRenderingHandler(Automaton.class, new RenderBiped(new ModelBiped(), 0));
RenderingRegistry.registerEntityRenderingHandler(LaunchedPotion.class, new LaunchedItemRender(Item.potion, 16384));
//RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo!
diff --git a/mods/tinker/tconstruct/client/block/AxleRender.java b/mods/tinker/tconstruct/client/block/AxleRender.java
deleted file mode 100644
index 8aaceb8e..00000000
--- a/mods/tinker/tconstruct/client/block/AxleRender.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package mods.tinker.tconstruct.client.block;
-
-import mods.tinker.tconstruct.client.TProxyClient;
-import net.minecraft.block.Block;
-import net.minecraft.client.renderer.RenderBlocks;
-import net.minecraft.world.IBlockAccess;
-import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
-import cpw.mods.fml.client.registry.RenderingRegistry;
-
-public class AxleRender implements ISimpleBlockRenderingHandler
-{
- public static int axleModelID = RenderingRegistry.getNextAvailableRenderId();
- @Override
- public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
- {
- renderer.setRenderBounds(0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);
- TProxyClient.renderStandardInvBlock(renderer, block, metadata);
- }
-
- @Override
- public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
- {
- renderer.setRenderBounds(0.375F, 0.0F, 0.375F, 0.625F, 1.0F, 0.625F);
- renderer.renderStandardBlock(block, x, y, z);
- return false;
- }
-
- @Override
- public boolean shouldRender3DInInventory ()
- {
- return true;
- }
-
- @Override
- public int getRenderId ()
- {
- return axleModelID;
- }
-}
diff --git a/mods/tinker/tconstruct/client/block/MachineRender.java b/mods/tinker/tconstruct/client/block/MachineRender.java
new file mode 100644
index 00000000..8debdc67
--- /dev/null
+++ b/mods/tinker/tconstruct/client/block/MachineRender.java
@@ -0,0 +1,102 @@
+package mods.tinker.tconstruct.client.block;
+
+import mods.tinker.tconstruct.client.TProxyClient;
+import mods.tinker.tconstruct.library.util.IFacingLogic;
+import net.minecraft.block.Block;
+import net.minecraft.client.renderer.RenderBlocks;
+import net.minecraft.world.IBlockAccess;
+import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
+import cpw.mods.fml.client.registry.RenderingRegistry;
+
+public class MachineRender implements ISimpleBlockRenderingHandler
+{
+ public static int model = RenderingRegistry.getNextAvailableRenderId();
+
+ @Override
+ public void renderInventoryBlock (Block block, int metadata, int modelID, RenderBlocks renderer)
+ {
+ if (modelID == model)
+ {
+ TProxyClient.renderStandardInvBlock(renderer, block, metadata);
+ }
+ }
+
+ @Override
+ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block block, int modelID, RenderBlocks renderer)
+ {
+ if (modelID == model)
+ {
+ int metadata = world.getBlockMetadata(x, y, z);
+ if (metadata == 0)
+ {
+ renderer.renderStandardBlock(block, x, y, z);
+ }
+ else
+ {
+ renderRotatedBlock(block, x, y, z, world, renderer);
+ }
+ }
+ return true;
+ }
+
+ public boolean renderRotatedBlock(Block block, int x, int y, int z, IBlockAccess world, RenderBlocks renderer)
+ {
+ IFacingLogic logic = (IFacingLogic) world.getBlockTileEntity(x, y, z);
+ byte direction = logic.getRenderDirection();
+
+ if (direction == 0)
+ {
+ renderer.uvRotateEast = 3;
+ renderer.uvRotateWest = 3;
+ renderer.uvRotateNorth = 3;
+ renderer.uvRotateSouth = 3;
+ }
+ if (direction == 2)
+ {
+ renderer.uvRotateNorth = 2;
+ renderer.uvRotateSouth = 1;
+ }
+ if (direction == 3)
+ {
+ renderer.uvRotateNorth = 1;
+ renderer.uvRotateSouth = 2;
+ renderer.uvRotateTop = 3;
+ renderer.uvRotateBottom = 3;
+ }
+ if (direction == 4)
+ {
+ renderer.uvRotateEast = 1;
+ renderer.uvRotateWest = 2;
+ renderer.uvRotateTop = 2;
+ renderer.uvRotateBottom = 1;
+ }
+ if (direction == 5)
+ {
+ renderer.uvRotateEast = 2;
+ renderer.uvRotateWest = 1;
+ renderer.uvRotateTop = 1;
+ renderer.uvRotateBottom = 2;
+ }
+
+ boolean flag = renderer.renderStandardBlock(block, x, y, z);
+ renderer.uvRotateSouth = 0;
+ renderer.uvRotateEast = 0;
+ renderer.uvRotateWest = 0;
+ renderer.uvRotateNorth = 0;
+ renderer.uvRotateTop = 0;
+ renderer.uvRotateBottom = 0;
+ return flag;
+ }
+
+ @Override
+ public boolean shouldRender3DInInventory ()
+ {
+ return true;
+ }
+
+ @Override
+ public int getRenderId ()
+ {
+ return model;
+ }
+}
diff --git a/mods/tinker/tconstruct/client/block/SmelteryRender.java b/mods/tinker/tconstruct/client/block/SmelteryRender.java
index 01f1bb23..72d7ef84 100644
--- a/mods/tinker/tconstruct/client/block/SmelteryRender.java
+++ b/mods/tinker/tconstruct/client/block/SmelteryRender.java
@@ -57,31 +57,6 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler
for (int i = 0; i < logic.layers; i++)
{
renderLayer(logic, i * 9, posX, posY + i, posZ, renderer, world);
- ItemStack input = logic.getStackInSlot(i);
- if (input != null && logic.getTempForSlot(i) > 20)
- {
- ItemStack blockToRender = Smeltery.getRenderIndex(input);
- if (blockToRender != null)
- {
- float blockHeight = input.stackSize / (float) blockToRender.stackSize;
- renderer.setRenderBounds(-0.001F, 0.0F, -0.001F, 1.001F, MathHelper.clamp_float(blockHeight, 0.01F, 1.0F), 1.001F);
-
- if (blockToRender.itemID < 4096) //Block
- {
- Block liquidBlock = Block.blocksList[blockToRender.itemID];
- //ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
- BlockSkinRenderHelper.renderMetadataBlock(liquidBlock, blockToRender.getItemDamage(), posX + i % 3, posY + i / 9, posZ + i / 3, renderer, world);
- }
- else
- //Item
- {
- Item liquidItem = Item.itemsList[blockToRender.itemID];
- //ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
- int metadata = blockToRender.getItemDamage();
- BlockSkinRenderHelper.renderFakeBlock(liquidItem.getIconFromDamage(metadata), posX, posY + i / 9, posZ, renderer, world);
- }
- }
- }
}
}
@@ -99,24 +74,38 @@ 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;
liquidBase += countSize;
if (liquid.itemID < 4096) //Block
{
Block liquidBlock = Block.blocksList[liquid.itemID];
- //ForgeHooksClient.bindTexture(liquidBlock.getTextureFile(), 0);
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];
- //ForgeHooksClient.bindTexture(liquidItem.getTextureFile(), 0);
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)
diff --git a/mods/tinker/tconstruct/client/entity/CrystalModel.java b/mods/tinker/tconstruct/client/entity/CrystalModelSmall.java
similarity index 95%
rename from mods/tinker/tconstruct/client/entity/CrystalModel.java
rename to mods/tinker/tconstruct/client/entity/CrystalModelSmall.java
index 4759b2f0..b8f78c9c 100644
--- a/mods/tinker/tconstruct/client/entity/CrystalModel.java
+++ b/mods/tinker/tconstruct/client/entity/CrystalModelSmall.java
@@ -5,13 +5,13 @@ import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
-public class CrystalModel extends ModelBase
+public class CrystalModelSmall extends ModelBase
{
ModelRenderer body;
ModelRendererTurbo top;
ModelRendererTurbo bottom;
- public CrystalModel()
+ public CrystalModelSmall()
{
textureWidth = 32;
textureHeight = 32;
diff --git a/mods/tinker/tconstruct/client/entity/CrystalRender.java b/mods/tinker/tconstruct/client/entity/CrystalRender.java
new file mode 100644
index 00000000..393ab970
--- /dev/null
+++ b/mods/tinker/tconstruct/client/entity/CrystalRender.java
@@ -0,0 +1,65 @@
+package mods.tinker.tconstruct.client.entity;
+
+import mods.tinker.tconstruct.entity.Crystal;
+import mods.tinker.tconstruct.entity.Skyla;
+import net.minecraft.client.model.ModelBase;
+import net.minecraft.client.renderer.entity.RenderLiving;
+import net.minecraft.entity.EntityLiving;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+@SideOnly(Side.CLIENT)
+public class CrystalRender extends RenderLiving
+{
+ /** The creeper model. */
+ private ModelBase creeperModel = new CrystalModelSmall();
+
+ public CrystalRender()
+ {
+ super(new CrystalModelSmall(), 0.5F);
+ }
+
+ /**
+ * A method used to render a creeper's powered form as a pass model.
+ */
+ protected int renderCreeperPassModel(Crystal par1EntityCreeper, int par2, float par3)
+ {
+
+ return -1;
+ }
+
+ protected int func_77061_b(Crystal par1EntityCreeper, int par2, float par3)
+ {
+ return -1;
+ }
+
+ /**
+ * 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);
+ }*/
+
+ /**
+ * Returns an ARGB int color back. Args: entityLiving, lightBrightness, partialTickTime
+ */
+ protected int getColorMultiplier(EntityLiving par1EntityLiving, float par2, float par3)
+ {
+ return super.getColorMultiplier(par1EntityLiving, par2, par3);
+ }
+
+ /**
+ * Queries whether should render the specified pass or not.
+ */
+ protected int shouldRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
+ {
+ return this.renderCreeperPassModel((Crystal)par1EntityLiving, par2, par3);
+ }
+
+ protected int inheritRenderPass(EntityLiving par1EntityLiving, int par2, float par3)
+ {
+ return this.func_77061_b((Crystal)par1EntityLiving, par2, par3);
+ }
+}
diff --git a/mods/tinker/tconstruct/client/gui/DrawbridgeGui.java b/mods/tinker/tconstruct/client/gui/DrawbridgeGui.java
new file mode 100644
index 00000000..13dfda92
--- /dev/null
+++ b/mods/tinker/tconstruct/client/gui/DrawbridgeGui.java
@@ -0,0 +1,43 @@
+package mods.tinker.tconstruct.client.gui;
+
+import mods.tinker.tconstruct.blocks.logic.DrawbridgeLogic;
+import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.util.StatCollector;
+import net.minecraft.world.World;
+
+import org.lwjgl.opengl.GL11;
+
+public class DrawbridgeGui extends GuiContainer
+{
+ public DrawbridgeLogic logic;
+
+ public DrawbridgeGui(InventoryPlayer inventoryplayer, DrawbridgeLogic frypan, World world, int x, int y, int z)
+ {
+ super(frypan.getGuiContainer(inventoryplayer, world, x, y, z));
+ logic = frypan;
+ }
+
+ protected void drawGuiContainerForegroundLayer(int par1, int par2)
+ {
+ //fontRenderer.drawString(StatCollector.translateToLocal("aggregator.glowstone"), 60, 6, 0x404040);
+ fontRenderer.drawString("Drawbridge", 8, 6, 0x404040);
+ fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
+ }
+
+ 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/drawbridge.png");
+ int cornerX = (width - xSize) / 2;
+ int cornerY = (height - ySize) / 2;
+ drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize);
+ /*if (logic.fuel > 0)
+ {
+ int fuel = logic.gaugeFuelScaled(12);
+ drawTexturedModalRect(cornerX + 27, (cornerY + 40) - fuel, 176, 12 - fuel, 14, fuel + 2);
+ }
+ int fuelgague = logic.gaugeProgressScaled(24);
+ drawTexturedModalRect(cornerX + 140, cornerY + 8, 176, 14, fuelgague, 16);*/
+ }
+}
diff --git a/mods/tinker/tconstruct/client/gui/ToolStationGui.java b/mods/tinker/tconstruct/client/gui/ToolStationGui.java
index 14726691..72c2ea6f 100644
--- a/mods/tinker/tconstruct/client/gui/ToolStationGui.java
+++ b/mods/tinker/tconstruct/client/gui/ToolStationGui.java
@@ -166,17 +166,14 @@ public class ToolStationGui extends NewContainerGui
void drawToolStats ()
{
ItemStack stack = logic.getStackInSlot(0);
- ToolCore tool = (ToolCore) stack.getItem();
- NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
- this.drawCenteredString(fontRenderer, "\u00A7n" + tool.getToolName(), xSize + 63, 8, 0xffffff);
+ if (stack.getItem() instanceof ToolCore)
+ {
+ ToolCore tool = (ToolCore) stack.getItem();
+ NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
+ this.drawCenteredString(fontRenderer, "\u00A7n" + tool.getToolName(), xSize + 63, 8, 0xffffff);
- drawModularToolStats(stack, tool, tags);
- /*if (tool instanceof Weapon)
- drawWeaponStats(stack, tool, tags);
- else if (tool.getHeadType() == 3)
- drawDualStats(stack, tool, tags);
- else
- drawHarvestStats(stack, tool, tags);*/
+ drawModularToolStats(stack, tool, tags);
+ }
}
void drawModularToolStats (ItemStack stack, ToolCore tool, NBTTagCompound tags)
@@ -239,7 +236,7 @@ public class ToolStationGui extends NewContainerGui
df.setRoundingMode(RoundingMode.DOWN);
float trueSpeed = mineSpeed + stoneboundSpeed;
float trueSpeed2 = mineSpeed + stoneboundSpeed;
-
+
fontRenderer.drawString("Mining Speeds: ", xSize + 8, base + offset * 10, 0xffffff);
offset++;
fontRenderer.drawString("- " + df.format(trueSpeed) + ", " + df.format(trueSpeed2), xSize + 8, base + offset * 10, 0xffffff);
@@ -253,7 +250,8 @@ public class ToolStationGui extends NewContainerGui
offset++;
fontRenderer.drawString("Harvest Levels:", xSize + 8, base + offset * 10, 0xffffff);
offset++;
- fontRenderer.drawString("- " + getHarvestLevelName(tags.getInteger("HarvestLevel"))+", " + getHarvestLevelName(tags.getInteger("HarvestLevel2")), xSize + 8, base + offset * 10, 0xffffff);
+ fontRenderer
+ .drawString("- " + getHarvestLevelName(tags.getInteger("HarvestLevel")) + ", " + getHarvestLevelName(tags.getInteger("HarvestLevel2")), xSize + 8, base + offset * 10, 0xffffff);
offset++;
offset++;
}
@@ -261,27 +259,27 @@ public class ToolStationGui extends NewContainerGui
{
float mineSpeed = tags.getInteger("MiningSpeed");
int heads = 1;
-
+
if (tags.hasKey("MiningSpeed2"))
{
mineSpeed += tags.getInteger("MiningSpeed2");
heads++;
}
-
+
if (tags.hasKey("MiningSpeedHandle"))
{
mineSpeed += tags.getInteger("MiningSpeedHandle");
heads++;
}
-
+
if (tags.hasKey("MiningSpeedExtra"))
{
mineSpeed += tags.getInteger("MiningSpeedExtra");
heads++;
}
-
+
float trueSpeed = mineSpeed / (heads * 100f);
-
+
float stoneboundSpeed = (float) Math.log(durability / 90f + 1) * 2 * stonebound;
DecimalFormat df = new DecimalFormat("##.##");
df.setRoundingMode(RoundingMode.DOWN);
@@ -302,7 +300,7 @@ public class ToolStationGui extends NewContainerGui
}
else if (categories.contains("utility"))
{
- float mineSpeed = tags.getInteger("MiningSpeed");
+ float mineSpeed = tags.getInteger("MiningSpeed");
float trueSpeed = mineSpeed / (100f);
fontRenderer.drawString("Usage Speed: " + trueSpeed, xSize + 8, base + offset * 10, 0xffffff);
offset++;
@@ -336,129 +334,6 @@ public class ToolStationGui extends NewContainerGui
}
}
- void drawWeaponStats (ItemStack stack, ToolCore tool, NBTTagCompound tags)
- {
- int dur = tags.getInteger("Damage");
- int maxDur = tags.getInteger("TotalDurability");
- dur = maxDur - dur;
- fontRenderer.drawString("Durability: ", xSize + 8, 24, 0xffffff);
- fontRenderer.drawString("- " + dur + "/" + maxDur, xSize + 8, 35, 0xffffff);
- int attack = (int) (tags.getInteger("Attack") * tool.getDamageModifier());
-
- int durability = tags.getInteger("Damage");
- float stonebound = tags.getFloat("Shoddy");
- float stoneboundDamage = (float) Math.log(durability / 72f + 1) * -2 * stonebound;
- attack += stoneboundDamage;
- if (attack < 1)
- attack = 1;
-
- String heart = attack == 2 ? " Heart" : " Hearts";
- if (attack % 2 == 0)
- this.fontRenderer.drawString("Attack: " + attack / 2 + heart, xSize + 8, 46, 0xffffff);
- else
- this.fontRenderer.drawString("Attack: " + attack / 2f + heart, xSize + 8, 46, 0xffffff);
-
- if (stoneboundDamage != 0)
- {
- heart = stoneboundDamage == 2 ? " Heart" : " Hearts";
- String bloss = stoneboundDamage > 0 ? "Bonus: " : "Loss: ";
- this.fontRenderer.drawString(bloss + (int) stoneboundDamage / 2 + heart, xSize + 8, 46, 0xffffff);
- }
-
- fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 68, 0xffffff);
- if (tags.hasKey("Tooltip1"))
- fontRenderer.drawString("Modifiers:", xSize + 8, 68, 0xffffff);
-
- boolean displayToolTips = true;
- int tipNum = 0;
- while (displayToolTips)
- {
- tipNum++;
- String tooltip = "ModifierTip" + tipNum;
- if (tags.hasKey(tooltip))
- {
- String tipName = tags.getString(tooltip);
- fontRenderer.drawString("- " + tipName, xSize + 8, 68 + tipNum * 11, 0xffffff);
- }
- else
- displayToolTips = false;
- }
- }
-
- void drawHarvestStats (ItemStack stack, ToolCore tool, NBTTagCompound tags)
- {
- int dur = tags.getInteger("Damage");
- int maxDur = tags.getInteger("TotalDurability");
- dur = maxDur - dur;
- fontRenderer.drawString("Durability:", xSize + 8, 24, 0xffffff);
- fontRenderer.drawString("- " + dur + "/" + maxDur, xSize + 8, 35, 0xffffff);
-
- int attack = tags.getInteger("Attack");
- String heart = attack == 2 ? " Heart" : " Hearts";
- if (attack % 2 == 0)
- this.fontRenderer.drawString("Attack: " + attack / 2 + heart, xSize + 8, 46, 0xffffff);
- else
- this.fontRenderer.drawString("Attack: " + attack / 2f + heart, xSize + 8, 46, 0xffffff);
- /*int damage = tags.getInteger("Attack");
- fontRenderer.drawString("Damage: " + damage, xSize + 8, 35, 0xffffff);*/
- float mineSpeed = tags.getInteger("MiningSpeed") / 100f;
- fontRenderer.drawString("Mining Speed: " + mineSpeed, xSize + 8, 57, 0xffffff);
- fontRenderer.drawString("Mining Level: " + getHarvestLevelName(tags.getInteger("HarvestLevel")), xSize + 8, 68, 0xffffff);
-
- fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 90, 0xffffff);
- if (tags.hasKey("Tooltip1"))
- fontRenderer.drawString("Modifiers:", xSize + 8, 101, 0xffffff);
-
- boolean displayToolTips = true;
- int tipNum = 0;
- while (displayToolTips)
- {
- tipNum++;
- String tooltip = "ModifierTip" + tipNum;
- if (tags.hasKey(tooltip))
- {
- String tipName = tags.getString(tooltip);
- fontRenderer.drawString("- " + tipName, xSize + 8, 101 + tipNum * 11, 0xffffff);
- }
- else
- displayToolTips = false;
- }
- }
-
- void drawDualStats (ItemStack stack, ToolCore tool, NBTTagCompound tags)
- {
- int dur = tags.getInteger("Damage");
- int maxDur = tags.getInteger("TotalDurability");
- dur = maxDur - dur;
- fontRenderer.drawString("Durability: " + dur + "/" + maxDur, xSize + 8, 24, 0xffffff);
- float mineSpeed = tags.getInteger("MiningSpeed") / 100f;
- float mineSpeed2 = tags.getInteger("MiningSpeed2") / 100f;
- fontRenderer.drawString("Mining Speeds: ", xSize + 8, 35, 0xffffff);
- fontRenderer.drawString("- " + mineSpeed + ", " + mineSpeed2, xSize + 8, 46, 0xffffff);
- fontRenderer.drawString("Harvest Levels:", xSize + 8, 57, 0xffffff);
- fontRenderer.drawString("- " + getHarvestLevelName(tags.getInteger("HarvestLevel")), xSize + 8, 68, 0xffffff);
- fontRenderer.drawString("- " + getHarvestLevelName(tags.getInteger("HarvestLevel2")), xSize + 8, 79, 0xffffff);
-
- fontRenderer.drawString("Modifiers remaining: " + tags.getInteger("Modifiers"), xSize + 8, 90, 0xffffff);
- if (tags.hasKey("Tooltip1"))
- fontRenderer.drawString("Modifiers:", xSize + 8, 101, 0xffffff);
-
- boolean displayToolTips = true;
- int tipNum = 0;
- while (displayToolTips)
- {
- tipNum++;
- String tooltip = "ModifierTip" + tipNum;
- if (tags.hasKey(tooltip))
- {
- String tipName = tags.getString(tooltip);
- fontRenderer.drawString("- " + tipName, xSize + 8, 101 + tipNum * 11, 0xffffff);
- }
- else
- displayToolTips = false;
- }
- }
-
void drawToolInformation ()
{
this.drawCenteredString(fontRenderer, title, xSize + 63, 8, 0xffffff);
diff --git a/mods/tinker/tconstruct/common/TContent.java b/mods/tinker/tconstruct/common/TContent.java
index ffd12609..cd7e77ee 100644
--- a/mods/tinker/tconstruct/common/TContent.java
+++ b/mods/tinker/tconstruct/common/TContent.java
@@ -3,28 +3,142 @@ package mods.tinker.tconstruct.common;
import java.util.Collection;
import mods.tinker.tconstruct.TConstruct;
-import mods.tinker.tconstruct.blocks.*;
-import mods.tinker.tconstruct.blocks.logic.*;
-import mods.tinker.tconstruct.entity.*;
-import mods.tinker.tconstruct.entity.projectile.*;
-import mods.tinker.tconstruct.items.*;
-import mods.tinker.tconstruct.items.armor.*;
-import mods.tinker.tconstruct.items.blocks.*;
-import mods.tinker.tconstruct.items.tools.*;
+import mods.tinker.tconstruct.blocks.Aggregator;
+import mods.tinker.tconstruct.blocks.EquipBlock;
+import mods.tinker.tconstruct.blocks.GlassBlock;
+import mods.tinker.tconstruct.blocks.GlassBlockStained;
+import mods.tinker.tconstruct.blocks.GravelOre;
+import mods.tinker.tconstruct.blocks.LavaTankBlock;
+import mods.tinker.tconstruct.blocks.LightCrystalBase;
+import mods.tinker.tconstruct.blocks.LiquidMetalFlowing;
+import mods.tinker.tconstruct.blocks.LiquidMetalStill;
+import mods.tinker.tconstruct.blocks.MetalOre;
+import mods.tinker.tconstruct.blocks.MultiBrick;
+import mods.tinker.tconstruct.blocks.MultiBrickFancy;
+import mods.tinker.tconstruct.blocks.OreberryBush;
+import mods.tinker.tconstruct.blocks.RedstoneMachine;
+import mods.tinker.tconstruct.blocks.SearedBlock;
+import mods.tinker.tconstruct.blocks.SmelteryBlock;
+import mods.tinker.tconstruct.blocks.SoilBlock;
+import mods.tinker.tconstruct.blocks.SpeedBlock;
+import mods.tinker.tconstruct.blocks.StoneTorch;
+import mods.tinker.tconstruct.blocks.TMetalBlock;
+import mods.tinker.tconstruct.blocks.ToolForgeBlock;
+import mods.tinker.tconstruct.blocks.ToolStationBlock;
+import mods.tinker.tconstruct.blocks.logic.CastingBasinLogic;
+import mods.tinker.tconstruct.blocks.logic.CastingTableLogic;
+import mods.tinker.tconstruct.blocks.logic.DrawbridgeLogic;
+import mods.tinker.tconstruct.blocks.logic.FaucetLogic;
+import mods.tinker.tconstruct.blocks.logic.FirestarterLogic;
+import mods.tinker.tconstruct.blocks.logic.FrypanLogic;
+import mods.tinker.tconstruct.blocks.logic.GlowstoneAggregator;
+import mods.tinker.tconstruct.blocks.logic.LavaTankLogic;
+import mods.tinker.tconstruct.blocks.logic.LiquidTextureLogic;
+import mods.tinker.tconstruct.blocks.logic.MultiServantLogic;
+import mods.tinker.tconstruct.blocks.logic.PartCrafterLogic;
+import mods.tinker.tconstruct.blocks.logic.PatternChestLogic;
+import mods.tinker.tconstruct.blocks.logic.SmelteryDrainLogic;
+import mods.tinker.tconstruct.blocks.logic.SmelteryLogic;
+import mods.tinker.tconstruct.blocks.logic.StencilTableLogic;
+import mods.tinker.tconstruct.blocks.logic.ToolForgeLogic;
+import mods.tinker.tconstruct.blocks.logic.ToolStationLogic;
+import mods.tinker.tconstruct.entity.Automaton;
+import mods.tinker.tconstruct.entity.BlueSlime;
+import mods.tinker.tconstruct.entity.Crystal;
+import mods.tinker.tconstruct.entity.FancyEntityItem;
+import mods.tinker.tconstruct.entity.SlimeClone;
+import mods.tinker.tconstruct.entity.projectile.DaggerEntity;
+import mods.tinker.tconstruct.items.CraftingItem;
+import mods.tinker.tconstruct.items.DiamondApple;
+import mods.tinker.tconstruct.items.FilledBucket;
+import mods.tinker.tconstruct.items.GoldenHead;
+import mods.tinker.tconstruct.items.Manual;
+import mods.tinker.tconstruct.items.MaterialItem;
+import mods.tinker.tconstruct.items.MetalPattern;
+import mods.tinker.tconstruct.items.OreBerries;
+import mods.tinker.tconstruct.items.Pattern;
+import mods.tinker.tconstruct.items.StrangeFood;
+import mods.tinker.tconstruct.items.TitleIcon;
+import mods.tinker.tconstruct.items.ToolPart;
+import mods.tinker.tconstruct.items.ToolPartHidden;
+import mods.tinker.tconstruct.items.ToolShard;
+import mods.tinker.tconstruct.items.armor.Glove;
+import mods.tinker.tconstruct.items.armor.HeartCanister;
+import mods.tinker.tconstruct.items.armor.Knapsack;
+import mods.tinker.tconstruct.items.armor.TArmorBase;
+import mods.tinker.tconstruct.items.blocks.CraftedSoilItemBlock;
+import mods.tinker.tconstruct.items.blocks.GlassBlockItem;
+import mods.tinker.tconstruct.items.blocks.GravelOreItem;
+import mods.tinker.tconstruct.items.blocks.LavaTankItemBlock;
+import mods.tinker.tconstruct.items.blocks.LightCrystalItem;
+import mods.tinker.tconstruct.items.blocks.LiquidItemBlock;
+import mods.tinker.tconstruct.items.blocks.MetalItemBlock;
+import mods.tinker.tconstruct.items.blocks.MetalOreItemBlock;
+import mods.tinker.tconstruct.items.blocks.MultiBrickFancyItem;
+import mods.tinker.tconstruct.items.blocks.MultiBrickItem;
+import mods.tinker.tconstruct.items.blocks.OreberryBushItem;
+import mods.tinker.tconstruct.items.blocks.OreberryBushSecondItem;
+import mods.tinker.tconstruct.items.blocks.RedstoneMachineItem;
+import mods.tinker.tconstruct.items.blocks.SearedTableItemBlock;
+import mods.tinker.tconstruct.items.blocks.SmelteryItemBlock;
+import mods.tinker.tconstruct.items.blocks.SpeedBlockItem;
+import mods.tinker.tconstruct.items.blocks.StainedGlassClearItem;
+import mods.tinker.tconstruct.items.blocks.ToolForgeItemBlock;
+import mods.tinker.tconstruct.items.blocks.ToolStationItemBlock;
+import mods.tinker.tconstruct.items.tools.BattleSign;
+import mods.tinker.tconstruct.items.tools.Battleaxe;
+import mods.tinker.tconstruct.items.tools.Broadsword;
+import mods.tinker.tconstruct.items.tools.Chisel;
+import mods.tinker.tconstruct.items.tools.Cleaver;
+import mods.tinker.tconstruct.items.tools.Cutlass;
+import mods.tinker.tconstruct.items.tools.Dagger;
+import mods.tinker.tconstruct.items.tools.Excavator;
+import mods.tinker.tconstruct.items.tools.FryingPan;
+import mods.tinker.tconstruct.items.tools.Hammer;
+import mods.tinker.tconstruct.items.tools.Hatchet;
+import mods.tinker.tconstruct.items.tools.Longsword;
+import mods.tinker.tconstruct.items.tools.LumberAxe;
+import mods.tinker.tconstruct.items.tools.Mattock;
+import mods.tinker.tconstruct.items.tools.Pickaxe;
+import mods.tinker.tconstruct.items.tools.PotionLauncher;
+import mods.tinker.tconstruct.items.tools.Rapier;
+import mods.tinker.tconstruct.items.tools.Scythe;
+import mods.tinker.tconstruct.items.tools.Shovel;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.client.TConstructClientRegistry;
-import mods.tinker.tconstruct.library.crafting.*;
+import mods.tinker.tconstruct.library.crafting.Detailing;
+import mods.tinker.tconstruct.library.crafting.LiquidCasting;
+import mods.tinker.tconstruct.library.crafting.PatternBuilder;
+import mods.tinker.tconstruct.library.crafting.Smeltery;
+import mods.tinker.tconstruct.library.crafting.ToolBuilder;
import mods.tinker.tconstruct.library.tools.ToolCore;
import mods.tinker.tconstruct.library.util.IPattern;
-import mods.tinker.tconstruct.modifiers.*;
-import mods.tinker.tconstruct.util.*;
+import mods.tinker.tconstruct.modifiers.ModAntiSpider;
+import mods.tinker.tconstruct.modifiers.ModAttack;
+import mods.tinker.tconstruct.modifiers.ModAutoSmelt;
+import mods.tinker.tconstruct.modifiers.ModBlaze;
+import mods.tinker.tconstruct.modifiers.ModButtertouch;
+import mods.tinker.tconstruct.modifiers.ModDurability;
+import mods.tinker.tconstruct.modifiers.ModElectric;
+import mods.tinker.tconstruct.modifiers.ModExtraModifier;
+import mods.tinker.tconstruct.modifiers.ModInteger;
+import mods.tinker.tconstruct.modifiers.ModLapis;
+import mods.tinker.tconstruct.modifiers.ModPiston;
+import mods.tinker.tconstruct.modifiers.ModRedstone;
+import mods.tinker.tconstruct.modifiers.ModReinforced;
+import mods.tinker.tconstruct.modifiers.ModRepair;
+import mods.tinker.tconstruct.modifiers.ModSmite;
+import mods.tinker.tconstruct.modifiers.TActiveOmniMod;
+import mods.tinker.tconstruct.util.PHConstruct;
+import mods.tinker.tconstruct.util.RecipeRemover;
+import mods.tinker.tconstruct.util.TDispenserBehaviorSpawnEgg;
import net.minecraft.block.Block;
+import net.minecraft.block.BlockDispenser;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.material.MaterialLiquid;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
-import net.minecraft.item.ItemAppleGold;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
@@ -129,6 +243,8 @@ public class TContent implements IFuelHandler
public static Block searedBlock;
public static Block metalBlock;
+ public static Block redstoneMachine;
+
//Decoration
public static Block stoneTorch;
public static Block multiBrick;
@@ -140,6 +256,15 @@ public class TContent implements IFuelHandler
//InfiBlocks
public static Block speedBlock;
+ public static Block glass;
+ public static Block stainedGlass;
+ public static Block stainedGlassClear;
+ public static Block glassPane;
+ public static Block stainedGlassPane;
+ public static Block stainedGlassClearPane;
+ public static Block glassMagicSlab;
+ public static Block stainedGlassMagicSlab;
+ public static Block stainedGlassClearMagicSlab;
//Crystalline
public static Block aggregator;
@@ -208,7 +333,7 @@ public class TContent implements IFuelHandler
{
EntityRegistry.registerModEntity(FancyEntityItem.class, "Fancy Item", 0, TConstruct.instance, 32, 5, true);
EntityRegistry.registerModEntity(DaggerEntity.class, "Dagger", 1, TConstruct.instance, 32, 5, true);
- //EntityRegistry.registerModEntity(Crystal.class, "Crystal", 2, TConstruct.instance, 32, 5, true);
+ EntityRegistry.registerModEntity(Crystal.class, "Crystal", 2, TConstruct.instance, 32, 3, true);
//EntityRegistry.registerModEntity(LaunchedPotion.class, "Launched Potion", 1, TConstruct.instance, 32, 3, true);
//EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1, TConstruct.instance, 32, 5, true);
@@ -312,6 +437,12 @@ public class TContent implements IFuelHandler
GameRegistry.registerTileEntity(FaucetLogic.class, "Faucet");
GameRegistry.registerTileEntity(CastingBasinLogic.class, "CastingBasin");
+ //Redstone machines
+ redstoneMachine = new RedstoneMachine(PHConstruct.redstoneMachine).setUnlocalizedName("Redstone.Machine");
+ GameRegistry.registerBlock(redstoneMachine, RedstoneMachineItem.class, "Redstone.Machine");
+ GameRegistry.registerTileEntity(DrawbridgeLogic.class, "Drawbridge");
+ GameRegistry.registerTileEntity(FirestarterLogic.class, "Firestarter");
+
//Traps
/*landmine = new Landmine(PHConstruct.landmine, 0, EnumMobType.mobs, Material.cactus).setUnlocalizedName("landmine");
GameRegistry.registerBlock(landmine, "landmine");*/
@@ -363,11 +494,22 @@ public class TContent implements IFuelHandler
speedBlock = new SpeedBlock(PHConstruct.speedBlock).setUnlocalizedName("SpeedBlock");
GameRegistry.registerBlock(speedBlock, SpeedBlockItem.class, "SpeedBlock");
+ glass = new GlassBlock(PHConstruct.glass).setUnlocalizedName("GlassBlock");
+ glass.stepSound = Block.soundGlassFootstep;
+ GameRegistry.registerBlock(glass, GlassBlockItem.class, "GlassBlock");
+
+ stainedGlassClear = new GlassBlockStained(PHConstruct.stainedGlassClear, "stainedglass_").setUnlocalizedName("GlassBlock.StainedClear");
+ stainedGlassClear.stepSound = Block.soundGlassFootstep;
+ GameRegistry.registerBlock(stainedGlassClear, StainedGlassClearItem.class, "GlassBlock.StainedClear");
+
+ /*public static Block stainedGlass;
+ public static Block stainedGlassClear;*/
+
aggregator = new Aggregator(PHConstruct.aggregator).setUnlocalizedName("Aggregator");
aggregator.stepSound = Block.soundMetalFootstep;
GameRegistry.registerBlock(aggregator, "Aggregator");
GameRegistry.registerTileEntity(GlowstoneAggregator.class, "GlowstoneAggregator");
-
+
lightCrystalBase = new LightCrystalBase(PHConstruct.lightCrystalBase).setUnlocalizedName("LightCrystalBase");
lightCrystalBase.stepSound = Block.soundGlassFootstep;
GameRegistry.registerBlock(lightCrystalBase, LightCrystalItem.class, "LightCrystalBase");
@@ -399,7 +541,7 @@ public class TContent implements IFuelHandler
void registerItems ()
{
titleIcon = new TitleIcon(PHConstruct.uselessItem).setUnlocalizedName("tconstruct.titleicon");
- String[] blanks = new String[] { "blank_pattern", "blank_cast" };
+ String[] blanks = new String[] { "blank_pattern", "blank_cast", "blank_cast" };
blankPattern = new CraftingItem(PHConstruct.blankPattern, blanks, blanks, "materials/").setUnlocalizedName("tconstruct.Pattern");
materials = new MaterialItem(PHConstruct.materials).setUnlocalizedName("tconstruct.Materials");
@@ -752,11 +894,12 @@ public class TContent implements IFuelHandler
/* Smeltery */
ItemStack ingotcast = new ItemStack(metalPattern, 1, 0);
+ ItemStack jewelCast = new ItemStack(metalPattern, 1, 23);
LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting();
//Blank
tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 1), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8), 80);
- tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 1), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 1), 80);
+ tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 2), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 1), 80);
//Ingots
tableCasting.addCastingRecipe(new ItemStack(Item.ingotIron), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 0), ingotcast, 80); //Iron
@@ -788,6 +931,11 @@ public class TContent implements IFuelHandler
tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 10), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 10), bucket, true, 10); //alumite
tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 11), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 11), bucket, true, 10);// obsidian
tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 12), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 12), bucket, true, 10); //steel
+ tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 13), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 13), bucket, true, 10); //glass
+ tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 14), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 14), bucket, true, 10); //seared stone
+ tableCasting.addCastingRecipe(new ItemStack(buckets, 1, 15), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 15), bucket, true, 10); //emerald
+
+ tableCasting.addCastingRecipe(new ItemStack(Item.emerald), new LiquidStack(liquidMetalStill.blockID, 320, 15), jewelCast, 80);
liquids = new LiquidStack[] { new LiquidStack(liquidMetalStill.blockID, 1, 0), new LiquidStack(liquidMetalStill.blockID, 1, 2), new LiquidStack(liquidMetalStill.blockID, 1, 5),
new LiquidStack(liquidMetalStill.blockID, 1, 6), new LiquidStack(liquidMetalStill.blockID, 1, 9), new LiquidStack(liquidMetalStill.blockID, 1, 7),
@@ -797,12 +945,10 @@ public class TContent implements IFuelHandler
for (int iter = 0; iter < patternOutputs.length; iter++)
{
ItemStack cast = new ItemStack(metalPattern, 1, iter + 1);
-
- tableCasting.addCastingRecipe(cast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8), new ItemStack(woodPattern, 1, iter+1), true, 50);
- tableCasting.addCastingRecipe(cast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*2, 1), new ItemStack(woodPattern, 1, iter+1), true, 50);
+
tableCasting.addCastingRecipe(cast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8), new ItemStack(patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
- tableCasting.addCastingRecipe(cast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*2, 1), new ItemStack(patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
-
+ tableCasting.addCastingRecipe(cast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 1), new ItemStack(patternOutputs[iter], 1, Short.MAX_VALUE), false, 50);
+
for (int iterTwo = 0; iterTwo < liquids.length; iterTwo++)
{
ItemStack metalCast = new ItemStack(patternOutputs[iter], 1, liquidDamage[iterTwo]);
@@ -810,12 +956,10 @@ public class TContent implements IFuelHandler
liquids[iterTwo].itemMeta), cast, 50);
}
}
-
+
ItemStack fullguardCast = new ItemStack(metalPattern, 1, 22);
- tableCasting.addCastingRecipe(fullguardCast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8), new ItemStack(woodPattern, 1, 22), true, 50);
- tableCasting.addCastingRecipe(fullguardCast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*2, 1), new ItemStack(woodPattern, 1, 22), true, 50);
tableCasting.addCastingRecipe(fullguardCast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8), new ItemStack(fullGuard, 1, Short.MAX_VALUE), false, 50);
- tableCasting.addCastingRecipe(fullguardCast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue*2, 1), new ItemStack(fullGuard, 1, Short.MAX_VALUE), false, 50);
+ tableCasting.addCastingRecipe(fullguardCast, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 1), new ItemStack(fullGuard, 1, Short.MAX_VALUE), false, 50);
LiquidCasting basinCasting = TConstructRegistry.getBasinCasting();
basinCasting.addCastingRecipe(new ItemStack(Block.blockIron), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 0), null, true, 100); //Iron
@@ -831,6 +975,8 @@ public class TContent implements IFuelHandler
basinCasting.addCastingRecipe(new ItemStack(metalBlock, 1, 8), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 10), null, true, 100); //alumite
basinCasting.addCastingRecipe(new ItemStack(Block.obsidian), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 11), null, true, 100);// obsidian
basinCasting.addCastingRecipe(new ItemStack(metalBlock, 1, 9), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 12), null, true, 100); //steel
+ basinCasting.addCastingRecipe(new ItemStack(glass, 1, 0), new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 13), null, true, 100); //glass
+ basinCasting.addCastingRecipe(new ItemStack(smeltery, 1, 4), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 14), null, true, 100); //seared stone
basinCasting.addCastingRecipe(new ItemStack(speedBlock, 1, 0), new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue / 9, 3), new ItemStack(Block.gravel), true, 100); //brownstone
@@ -846,14 +992,21 @@ public class TContent implements IFuelHandler
Smeltery.addMelting(new ItemStack(Item.goldNugget, 4), Block.blockGold.blockID, 0, 150, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue / 9, 1));
Smeltery.addMelting(new ItemStack(Item.bucketEmpty), Block.blockIron.blockID, 0, 600, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 3, 0));
- Smeltery.addMelting(new ItemStack(Item.minecartEmpty), Block.blockIron.blockID, 0, 600, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 5, 0));
+ Smeltery.addMelting(new ItemStack(Item.minecartEmpty), Block.blockIron.blockID, 8, 600, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 5, 0));
Smeltery.addMelting(new ItemStack(materials, 1, 18), Block.obsidian.blockID, 0, 750, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 11));//obsidian
+ Smeltery.addMelting(new ItemStack(blankPattern, 4, 1), metalBlock.blockID, 7, 150, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue, 8));
+ Smeltery.addMelting(new ItemStack(blankPattern, 4, 2), metalBlock.blockID, 7, 150, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 1));
+
//Blocks
Smeltery.addMelting(Block.blockIron, 0, 600, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 0));
Smeltery.addMelting(Block.blockGold, 0, 400, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 1));
Smeltery.addMelting(Block.obsidian, 0, 800, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 11));
Smeltery.addMelting(Block.ice, 0, 75, new LiquidStack(Block.waterStill.blockID, 1000, 0));
+ Smeltery.addMelting(Block.sand, 0, 625, new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 13));
+ Smeltery.addMelting(Block.glass, 0, 625, new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, 13));
+ Smeltery.addMelting(Block.stone, 0, 800, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue / 18, 14));
+ Smeltery.addMelting(Block.cobblestone, 0, 800, new LiquidStack(liquidMetalStill.blockID, TConstruct.ingotLiquidValue / 18, 14));
//Alloys
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 16, 7), new LiquidStack(liquidMetalStill.blockID, 24, 2), new LiquidStack(liquidMetalStill.blockID, 8, 3)); //Bronze
@@ -932,6 +1085,13 @@ public class TContent implements IFuelHandler
/*chiseling.addDetailing(multiBrick, 14, multiBrickFancy, 14, chisel);
chiseling.addDetailing(multiBrick, 15, multiBrickFancy, 15, chisel);*/
+ chiseling.addDetailing(smeltery, 4, smeltery, 6, chisel);
+ chiseling.addDetailing(smeltery, 6, smeltery, 11, chisel);
+ chiseling.addDetailing(smeltery, 11, smeltery, 2, chisel);
+ chiseling.addDetailing(smeltery, 2, smeltery, 8, chisel);
+ chiseling.addDetailing(smeltery, 8, smeltery, 9, chisel);
+ chiseling.addDetailing(smeltery, 9, smeltery, 10, chisel);
+
GameRegistry.addRecipe(new ItemStack(toolForge, 1, 0), "bbb", "msm", "m m", 'b', new ItemStack(smeltery, 1, 2), 's', new ItemStack(toolStationWood, 1, 0), 'm', Block.blockIron);
GameRegistry.addRecipe(new ItemStack(toolForge, 1, 1), "bbb", "msm", "m m", 'b', new ItemStack(smeltery, 1, 2), 's', new ItemStack(toolStationWood, 1, 0), 'm', Block.blockGold);
GameRegistry.addRecipe(new ItemStack(toolForge, 1, 2), "bbb", "msm", "m m", 'b', new ItemStack(smeltery, 1, 2), 's', new ItemStack(toolStationWood, 1, 0), 'm', Block.blockDiamond);
@@ -957,6 +1117,14 @@ public class TContent implements IFuelHandler
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(toolForge, 1, 13), "bbb", "msm", "m m", 'b', new ItemStack(smeltery, 1, 2), 's', new ItemStack(toolStationWood, 1, 0), 'm',
"blockSteel"));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 0), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 1),
+ 'r', new ItemStack(Item.redstone), 'd', new ItemStack(Block.dispenser))); //Drawbridge
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 0), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(blankPattern, 1, 2),
+ 'r', new ItemStack(Item.redstone), 'd', new ItemStack(Block.dispenser)));
+
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(redstoneMachine, 1, 1), "aca", "#d#", "#r#", '#', "ingotBronze", 'a', "ingotAluminumBrass", 'c', new ItemStack(heavyPlate, 1, 7),
+ 'r', new ItemStack(Item.redstone), 'd', new ItemStack(Item.flintAndSteel))); //Igniter
+
/* Crafting */
GameRegistry.addRecipe(new ItemStack(toolStationWood, 1, 0), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', Block.workbench);
GameRegistry.addRecipe(new ItemStack(toolStationWood, 1, 1), "p", "w", 'p', new ItemStack(blankPattern, 1, 0), 'w', new ItemStack(Block.wood, 1, 0));
@@ -1044,8 +1212,16 @@ public class TContent implements IFuelHandler
GameRegistry.addRecipe(new ItemStack(materials, 9, 24), "m", 'm', new ItemStack(materials, 1, 14)); //Aluminum Brass Nugget
- /*OreDictionary.registerOre("ingotAluminumBrass", new ItemStack(materials, 1, 14));
- OreDictionary.registerOre("nuggetAluminumBrass", new ItemStack(materials, 1, 24));*/
+ //Dyes
+ String[] pattern = { "###", "#m#", "###" };
+ String[] dyeTypes = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple", "dyeCyan", "dyeLightGray", "dyeGray", "dyePink", "dyeLime", "dyeYellow", "dyeLightBlue",
+ "dyeMagenta", "dyeOrange", "dyeWhite" };
+ for (int i = 0; i < 16; i++)
+ {
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.cloth, 8, i), pattern, 'm', dyeTypes[15 - i], '#', new ItemStack(Block.cloth, 1, Short.MAX_VALUE)));
+ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(stainedGlassClear, 8, i), pattern, 'm', dyeTypes[15 - i], '#', glass));
+ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(stainedGlassClear, 1, i), dyeTypes[15 - i], glass));
+ }
//Smeltery
ItemStack searedBrick = new ItemStack(materials, 1, 2);
@@ -1085,7 +1261,7 @@ public class TContent implements IFuelHandler
RecipeRemover.removeShapedRecipe(new ItemStack(Block.blockIron));
RecipeRemover.removeShapedRecipe(new ItemStack(Block.blockGold));
}
-
+
//Ultra hardcore recipes
String[] surround = { "###", "#m#", "###" };
if (PHConstruct.goldAppleRecipe)
@@ -1093,7 +1269,7 @@ public class TContent implements IFuelHandler
RecipeRemover.removeShapedRecipe(new ItemStack(Item.appleGold));
RecipeRemover.removeShapedRecipe(new ItemStack(Item.goldenCarrot));
RecipeRemover.removeShapelessRecipe(new ItemStack(Item.speckledMelon));
-
+
GameRegistry.addRecipe(new ItemStack(Item.appleGold), surround, '#', new ItemStack(Item.ingotGold), 'm', new ItemStack(Item.appleRed));
GameRegistry.addRecipe(new ItemStack(Item.goldenCarrot), surround, '#', new ItemStack(Item.ingotGold), 'm', new ItemStack(Item.carrot));
GameRegistry.addRecipe(new ItemStack(goldHead), surround, '#', new ItemStack(Item.ingotGold), 'm', new ItemStack(Item.skull, 1, 3));
@@ -1198,19 +1374,29 @@ public class TContent implements IFuelHandler
OreDictionary.registerOre("nuggetSilver", new ItemStack(materials, 1, 23));
OreDictionary.registerOre("nuggetAluminumBrass", new ItemStack(materials, 1, 24));
- String[] names = new String[] { "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "Aluminum Brass", "Manyullyn", "Alumite", "Obsidian", "Steel" };
+ String[] names = new String[] { "Molten Iron", "Molten Gold", "Molten Copper", "Molten Tin", "Molten Aluminum", "Molten Cobalt", "Molten Ardite", "Molten Bronze", "Molten Aluminum Brass",
+ "Molten Manyullyn", "Molten Alumite", "Molten Obsidian", "Molten Steel", "Molten Glass", "Seared Stone", "Liquified Emerald", "Blood" };
liquidIcons = new LiquidStack[names.length];
liquidNames = new String[names.length];
for (int iter = 0; iter < names.length; iter++)
{
LiquidStack liquidstack = new LiquidStack(liquidMetalStill.blockID, LiquidContainerRegistry.BUCKET_VOLUME, iter);
- String name = "Molten " + names[iter];
+ String name = names[iter];
liquidIcons[iter] = liquidstack;
liquidNames[iter] = name;
LiquidDictionary.getOrCreateLiquid(name, liquidstack);
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquidstack, new ItemStack(buckets, 1, iter), new ItemStack(Item.bucketEmpty)));
}
+ String[] glassTypes = { "glassBlack", "glassRed", "glassGreen", "glassBrown", "glassBlue", "glassPurple", "glassCyan", "glassLightGray", "glassGray", "glassPink", "glassLime", "glassYellow",
+ "glassLightBlue", "glassMagenta", "glassOrange", "glassWhite" };
+ for (int i = 0; i < 16; i++)
+ {
+ OreDictionary.registerOre(glassTypes[15 - i], new ItemStack(stainedGlassClear, 1, i));
+ }
+
+ BlockDispenser.dispenseBehaviorRegistry.putObject(titleIcon, new TDispenserBehaviorSpawnEgg());
+
//Vanilla stuff
OreDictionary.registerOre("slimeball", new ItemStack(Item.slimeBall));
OreDictionary.registerOre("slimeball", new ItemStack(strangeFood, 1, 0));
@@ -1228,16 +1414,16 @@ public class TContent implements IFuelHandler
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerry, 1, 15));
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerrySecond, 1, 12));
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerrySecond, 1, 13));
-
+
/* FORESTRY
* Edit these strings to change what items are added to the backpacks
* Format info: "[backpack ID]@[item ID].[metadata or *]:[next item]" and so on
* Avaliable backpack IDs: forester, miner, digger, hunter, adventurer, builder
* May add more backpack items later - Spyboticsguy
*/
-
- String builderItems = "builder@" + String.valueOf(stoneTorch.blockID) + ".*";
-
+
+ String builderItems = "builder@" + String.valueOf(stoneTorch.blockID) + ":*";
+
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", builderItems);
}
diff --git a/mods/tinker/tconstruct/common/TProxyCommon.java b/mods/tinker/tconstruct/common/TProxyCommon.java
index 5c1f45df..335ab32f 100644
--- a/mods/tinker/tconstruct/common/TProxyCommon.java
+++ b/mods/tinker/tconstruct/common/TProxyCommon.java
@@ -26,16 +26,17 @@ public class TProxyCommon implements IGuiHandler
public static int pchestGuiID = 2;
public static int pshaperGuiID = 3;
public static int frypanGuiID = 4;
- public static int toolForge = 5;
+ public static int toolForge = 5;
public static int smelteryGuiID = 7;
public static int glowstoneAggregatorGui = 8;
-
+ public static int drawbridgeGui = 9;
+
public static int inventoryGui = 100;
public static int armorGuiID = 101;
public static int knapsackGuiID = 102;
-
+
public static int manualGuiID = -1;
-
+
@Override
public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
{
@@ -78,13 +79,16 @@ public class TProxyCommon implements IGuiHandler
return null;
}
- public void registerTickHandler()
+ public void registerTickHandler ()
{
//TickRegistry.registerTickHandler(new TimeTicker(), Side.SERVER);
}
-
- /* Registers any rendering code. Does nothing server-side */
- public void registerRenderer() {}
+
+ /* Registers any rendering code. Does nothing server-side */
+ public void registerRenderer ()
+ {
+ }
+
/* Ties an internal name to a visible one. */
public void addNames ()
{
@@ -171,17 +175,24 @@ public class TProxyCommon implements IGuiHandler
LanguageRegistry.addName(TContent.knapsack, "Knapsack");
}
-
- public void readManuals() {}
-
- public void registerKeys() {}
-
- public File getLocation()
- {
- return new File(".");
- }
- public void spawnParticle (String slimeParticle, double xPos, double yPos, double zPos, double velX, double velY, double velZ) {}
+ public void readManuals ()
+ {
+ }
+
+ public void registerKeys ()
+ {
+ }
+
+ public File getLocation ()
+ {
+ return new File(".");
+ }
+
+ public void spawnParticle (String slimeParticle, double xPos, double yPos, double zPos, double velX, double velY, double velZ)
+ {
+ }
+
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", "Alumite Chunk", "Steel Chunk", "Slime Crystal Fragment" };
@@ -200,12 +211,13 @@ public class TProxyCommon implements IGuiHandler
"SignHead", "LumberHead", "KnifeBlade", "ChiselHead", "ScytheBlade", "LumberHead", "ThickRod", "ThickBinding", "LargeSwordBlade", "LargePlate", "ExcavatorHead", "HammerHead", "FullGuard" };
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", " Knife Blade", " Chisel Head", " Scythe Blade", " Broad Axe Head", " Tough Tool Rod", " Tough Binding", " Large Sword Blade", " Large Plate", " Excavator Head",
- " Hammer Head", " Full Guard"};
+ " Board", " Broad Axe Head", " Knife Blade", " Chisel Head", " Scythe Blade", " Broad Axe Head", " Tough Tool Rod", " Tough Binding", " Large Sword Blade", " Large Plate",
+ " Excavator Head", " Hammer Head", " Full Guard" };
- public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign", "knifeblade", "chisel",
- "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard"};
+ public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign",
+ "knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "jewel" };
public static final String[] patternNames = new String[] { "Ingot", "Tool Rod", "Pickaxe Head", "Shovel Head", "Axe Head", "Sword Blade", "Wide Guard", "Hand Guard", "Crossbar", "Tool Binding",
- "Pan", "Board", "Knife Blade", "Chisel Head", "Tough Tool Rod", "Tough Binding", "Large Plate", "Broad Axe Head", "Scythe Head", "Broad Shovel Head", "Large Blade", "Hammer Head", "Full Guard" };
+ "Pan", "Board", "Knife Blade", "Chisel Head", "Tough Tool Rod", "Tough Binding", "Large Plate", "Broad Axe Head", "Scythe Head", "Broad Shovel Head", "Large Blade", "Hammer Head",
+ "Full Guard", "Jewel" };
}
diff --git a/mods/tinker/tconstruct/entity/Crystal.java b/mods/tinker/tconstruct/entity/Crystal.java
new file mode 100644
index 00000000..0f3f3b8b
--- /dev/null
+++ b/mods/tinker/tconstruct/entity/Crystal.java
@@ -0,0 +1,16 @@
+package mods.tinker.tconstruct.entity;
+
+import net.minecraft.entity.monster.EntityCreeper;
+import net.minecraft.util.ChunkCoordinates;
+import net.minecraft.world.World;
+
+public class Crystal extends EntityCreeper
+{
+
+ public Crystal(World par1World)
+ {
+ super(par1World);
+ texture = "/mods/tinker/textures/mob/crystalwater.png";
+ }
+
+}
diff --git a/mods/tinker/tconstruct/inventory/DrawbridgeContainer.java b/mods/tinker/tconstruct/inventory/DrawbridgeContainer.java
new file mode 100644
index 00000000..b4430597
--- /dev/null
+++ b/mods/tinker/tconstruct/inventory/DrawbridgeContainer.java
@@ -0,0 +1,80 @@
+package mods.tinker.tconstruct.inventory;
+
+import mods.tinker.tconstruct.blocks.logic.DrawbridgeLogic;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class DrawbridgeContainer extends Container
+{
+ public DrawbridgeLogic logic;
+ public int progress = 0;
+ public int fuel = 0;
+ public int fuelGague = 0;
+
+ public DrawbridgeContainer(InventoryPlayer inventoryplayer, DrawbridgeLogic logic)
+ {
+ this.logic = logic;
+
+ this.addSlotToContainer(new Slot(logic, 0, 80, 36));
+
+ /* Player inventory */
+ for (int column = 0; column < 3; column++)
+ {
+ for (int row = 0; row < 9; row++)
+ {
+ this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 8 + row * 18, 84 + column * 18));
+ }
+ }
+
+ for (int column = 0; column < 9; column++)
+ {
+ this.addSlotToContainer(new Slot(inventoryplayer, column, 8 + column * 18, 142));
+ }
+ }
+
+
+ @Override
+ public boolean canInteractWith(EntityPlayer entityplayer)
+ {
+ return logic.isUseableByPlayer(entityplayer);
+ }
+
+ @Override
+ public ItemStack transferStackInSlot(EntityPlayer player, int slotID)
+ {
+ ItemStack stack = null;
+ Slot slot = (Slot)this.inventorySlots.get(slotID);
+
+ if (slot != null && slot.getHasStack())
+ {
+ ItemStack slotStack = slot.getStack();
+ stack = slotStack.copy();
+
+ if (slotID < logic.getSizeInventory())
+ {
+ if (!this.mergeItemStack(slotStack, logic.getSizeInventory(), this.inventorySlots.size(), true))
+ {
+ return null;
+ }
+ }
+ else if (!this.mergeItemStack(slotStack, 0, logic.getSizeInventory(), false))
+ {
+ return null;
+ }
+
+ if (slotStack.stackSize == 0)
+ {
+ slot.putStack((ItemStack)null);
+ }
+ else
+ {
+ slot.onSlotChanged();
+ }
+ }
+
+ return stack;
+ }
+}
diff --git a/mods/tinker/tconstruct/items/FilledBucket.java b/mods/tinker/tconstruct/items/FilledBucket.java
index ad0e4efd..a2cf0de0 100644
--- a/mods/tinker/tconstruct/items/FilledBucket.java
+++ b/mods/tinker/tconstruct/items/FilledBucket.java
@@ -147,7 +147,7 @@ public class FilledBucket extends ItemBucket
@Override
public void getSubItems(int id, CreativeTabs tab, List list)
{
- for (int i = 0; i < 13; i++)
+ for (int i = 0; i < icons.length; i++)
list.add(new ItemStack(id, 1, i));
}
@@ -177,9 +177,8 @@ public class FilledBucket extends ItemBucket
}
public static final String[] materialNames = new String[] {
- "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "AlBrass", "Manyullyn", "Alumite", "Obsidian", "Steel",
- "Manganese", "Heptazion", "DSteel", "Angmallen"};
+ "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "AluBrass", "Manyullyn", "Alumite", "Obsidian", "Steel", "Glass", "Stone", "Villager" };
public static final String[] textureNames = new String[] {
- "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel" };
+ "iron", "gold", "copper", "tin", "aluminum", "cobalt", "ardite", "bronze", "alubrass", "manyullyn", "alumite", "obsidian", "steel", "glass", "stone", "villager" };
}
diff --git a/mods/tinker/tconstruct/items/MetalPattern.java b/mods/tinker/tconstruct/items/MetalPattern.java
index 0dbebd48..91504fa9 100644
--- a/mods/tinker/tconstruct/items/MetalPattern.java
+++ b/mods/tinker/tconstruct/items/MetalPattern.java
@@ -15,7 +15,7 @@ public class MetalPattern extends Pattern
public void getSubItems (int id, CreativeTabs tab, List list)
{
- for (int i = 0; i < patternName.length-1; i++)
+ for (int i = 0; i < patternName.length; i++)
list.add(new ItemStack(id, 1, i));
}
}
diff --git a/mods/tinker/tconstruct/items/Pattern.java b/mods/tinker/tconstruct/items/Pattern.java
index 83ca9ba6..9388665e 100644
--- a/mods/tinker/tconstruct/items/Pattern.java
+++ b/mods/tinker/tconstruct/items/Pattern.java
@@ -34,23 +34,15 @@ public class Pattern extends CraftingItem
public static final String[] patternName = new String[] {
"ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign", "knifeblade", "chisel", "largerod", "toughbinding", "largeplate",
- "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard" };
-
- /*@SideOnly(Side.CLIENT)
- public void registerIcons(IconRegister iconRegister)
- {
- this.icons = new Icon[textureNames.length];
-
- for (int i = 0; i < this.icons.length; ++i)
- {
- this.icons[i] = iconRegister.registerIcon("tinker:"+textureNames[i]);
- }
- }*/
+ "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "jewel" };
public void getSubItems (int id, CreativeTabs tab, List list)
{
- for (int i = 1; i < patternName.length-1; i++)
+ for (int i = 1; i < patternName.length; i++)
+ {
+ if (i != 23)
list.add(new ItemStack(id, 1, i));
+ }
}
public ItemStack getContainerItemStack (ItemStack stack)
diff --git a/mods/tinker/tconstruct/items/TitleIcon.java b/mods/tinker/tconstruct/items/TitleIcon.java
index a0b513ee..a07b33ed 100644
--- a/mods/tinker/tconstruct/items/TitleIcon.java
+++ b/mods/tinker/tconstruct/items/TitleIcon.java
@@ -2,6 +2,10 @@ package mods.tinker.tconstruct.items;
import java.util.List;
+import mods.natura.entity.FlameSpider;
+import mods.natura.entity.FlameSpiderBaby;
+import mods.natura.entity.ImpEntity;
+import mods.natura.entity.NitroCreeper;
import mods.tinker.tconstruct.client.TProxyClient;
import mods.tinker.tconstruct.entity.BlueSlime;
import mods.tinker.tconstruct.library.tools.ToolCore;
@@ -22,121 +26,171 @@ import cpw.mods.fml.relauncher.SideOnly;
public class TitleIcon extends Item
{
- int[] primaryColor = { 0x66BBE8, 0x66BBE8 };
- int[] secondaryColor = { 0x1567BF, 0xFFEC6E };
- String[] mobNames = { "TConstruct.EdibleSlime", "TConstruct.KingSlime" };
+ int[] primaryColor = { 0x66BBE8, 0x66BBE8 };
+ int[] secondaryColor = { 0x1567BF, 0xFFEC6E };
+ String[] mobNames = { "TConstruct.EdibleSlime", "TConstruct.KingSlime" };
- public TitleIcon(int par1)
- {
- super(par1);
- this.setCreativeTab(CreativeTabs.tabMisc);
- }
-
- @Override
- public void registerIcons (IconRegister iconRegister)
- {
- ToolCore.blankSprite = iconRegister.registerIcon("tinker:blanksprite");
- TProxyClient.metalBall = iconRegister.registerIcon("tinker:metalball");
- itemIcon = iconRegister.registerIcon("tinker:tparts");
- }
-
- @SideOnly(Side.CLIENT)
- public boolean requiresMultipleRenderPasses ()
- {
- return true;
- }
-
- @SideOnly(Side.CLIENT)
- public Icon getIconFromDamageForRenderPass (int par1, int par2)
- {
- if (par1 == 255)
- return itemIcon;
- return Item.monsterPlacer.getIconFromDamageForRenderPass(par1, par2);
- }
-
- @Override
- public String getItemDisplayName (ItemStack par1ItemStack)
- {
- String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
- String s1 = mobNames[par1ItemStack.getItemDamage()];
-
- if (s1 != null)
- {
- s = s + " " + StatCollector.translateToLocal("entity." + s1 + ".name");
- }
-
- return s;
- }
-
- @Override
- public void getSubItems(int id, CreativeTabs tab, List list)
+ public TitleIcon(int par1)
{
- for (int i = 0; i < mobNames.length; i++)
- list.add(new ItemStack(id, 1, i));
+ super(par1);
+ this.setCreativeTab(CreativeTabs.tabMisc);
}
- @SideOnly(Side.CLIENT)
- public int getColorFromItemStack (ItemStack stack, int pass)
- {
- int damage = stack.getItemDamage();
- if (damage == 255)
- return 0xffffff;
- return pass == 0 ? primaryColor[damage] : secondaryColor[damage];
- }
+ @Override
+ public void registerIcons (IconRegister iconRegister)
+ {
+ ToolCore.blankSprite = iconRegister.registerIcon("tinker:blanksprite");
+ TProxyClient.metalBall = iconRegister.registerIcon("tinker:metalball");
+ itemIcon = iconRegister.registerIcon("tinker:tparts");
+ }
- public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int posX, int posY, int posZ, int par7, float par8, float par9, float par10)
- {
- if (!world.isRemote)
- {
- int i1 = world.getBlockId(posX, posY, posZ);
- posX += Facing.offsetsXForSide[par7];
- posY += Facing.offsetsYForSide[par7];
- posZ += Facing.offsetsZForSide[par7];
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses ()
+ {
+ return true;
+ }
+
+ @SideOnly(Side.CLIENT)
+ public Icon getIconFromDamageForRenderPass (int par1, int par2)
+ {
+ if (par1 == 255)
+ return itemIcon;
+ return Item.monsterPlacer.getIconFromDamageForRenderPass(par1, par2);
+ }
+
+ @Override
+ public String getItemDisplayName (ItemStack par1ItemStack)
+ {
+ String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
+ String s1 = mobNames[par1ItemStack.getItemDamage()];
+
+ if (s1 != null)
+ {
+ s = s + " " + StatCollector.translateToLocal("entity." + s1 + ".name");
+ }
+
+ return s;
+ }
+
+ @Override
+ public void getSubItems (int id, CreativeTabs tab, List list)
+ {
+ for (int i = 0; i < mobNames.length; i++)
+ list.add(new ItemStack(id, 1, i));
+ }
+
+ @SideOnly(Side.CLIENT)
+ public int getColorFromItemStack (ItemStack stack, int pass)
+ {
+ int damage = stack.getItemDamage();
+ if (damage == 255)
+ return 0xffffff;
+ return pass == 0 ? primaryColor[damage] : secondaryColor[damage];
+ }
+
+ public boolean onItemUse (ItemStack stack, EntityPlayer player, World world, int posX, int posY, int posZ, int par7, float par8, float par9, float par10)
+ {
+ if (!world.isRemote)
+ {
+ int i1 = world.getBlockId(posX, posY, posZ);
+ posX += Facing.offsetsXForSide[par7];
+ posY += Facing.offsetsYForSide[par7];
+ posZ += Facing.offsetsZForSide[par7];
double d0 = 0.0D;
if (par7 == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11)
{
d0 = 0.5D;
}
-
+
int damage = stack.getItemDamage();
switch (damage)
{
case 0:
- spawnEntity(posX, posY, posZ, new BlueSlime(world), world, player);
- break;
+ spawnEntity(posX, posY, posZ, new BlueSlime(world), world, player);
+ break;
case 1:
- spawnBossSlime(posX, posY, posZ, new BlueSlime(world), world, player);
- break;
+ spawnBossSlime(posX, posY, posZ, new BlueSlime(world), world, player);
+ break;
}
- if (!player.capabilities.isCreativeMode)
- {
- --stack.stackSize;
- }
- }
- return true;
- }
+ if (!player.capabilities.isCreativeMode)
+ {
+ --stack.stackSize;
+ }
+ }
+ return true;
+ }
- public static void spawnEntity (double x, double y, double z, Entity entity, World world, EntityPlayer player)
- {
- if (!world.isRemote)
- {
- entity.setPosition(x, y, z);
- entity.setAngles(player.cameraYaw, player.cameraYaw);
- ((EntityLiving) entity).initCreature();
- world.spawnEntityInWorld(entity);
- }
- }
+ public static EntityLiving activateSpawnEgg (ItemStack stack, World world, double posX, double posY, double posZ, int par7)
+ {
+ int i1 = world.getBlockId((int) posX, (int) posY, (int) posZ);
+ posX += Facing.offsetsXForSide[par7];
+ posY += Facing.offsetsYForSide[par7];
+ posZ += Facing.offsetsZForSide[par7];
+ double d0 = 0.0D;
- public static void spawnBossSlime (double x, double y, double z, BlueSlime entity, World world, EntityPlayer player)
- {
- if (!world.isRemote)
- {
- entity.setPosition(x, y, z);
- entity.setAngles(player.cameraYaw, player.cameraYaw);
- entity.setSlimeSize(8);
- entity.initCreature();
- world.spawnEntityInWorld(entity);
- }
- }
+ if (par7 == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11)
+ {
+ d0 = 0.5D;
+ }
+
+ int damage = stack.getItemDamage();
+ EntityLiving entity = null;
+ switch (damage)
+ {
+ case 0:
+ entity = new BlueSlime(world);
+ spawnEntity(posX, posY, posZ, entity, world);
+ break;
+ case 1:
+ entity = new BlueSlime(world);
+ spawnBossSlime(posX, posY, posZ, new BlueSlime(world), world);
+ break;
+ }
+ return entity;
+ }
+
+ public static void spawnEntity (double x, double y, double z, Entity entity, World world)
+ {
+ if (!world.isRemote)
+ {
+ entity.setPosition(x, y, z);
+ ((EntityLiving) entity).initCreature();
+ world.spawnEntityInWorld(entity);
+ }
+ }
+
+ public static void spawnEntity (double x, double y, double z, Entity entity, World world, EntityPlayer player)
+ {
+ if (!world.isRemote)
+ {
+ entity.setPosition(x, y, z);
+ entity.setAngles(player.cameraYaw, player.cameraYaw);
+ ((EntityLiving) entity).initCreature();
+ world.spawnEntityInWorld(entity);
+ }
+ }
+
+ public static void spawnBossSlime (double x, double y, double z, BlueSlime entity, World world, EntityPlayer player)
+ {
+ if (!world.isRemote)
+ {
+ entity.setPosition(x, y, z);
+ entity.setAngles(player.cameraYaw, player.cameraYaw);
+ entity.setSlimeSize(8);
+ entity.initCreature();
+ world.spawnEntityInWorld(entity);
+ }
+ }
+
+ public static void spawnBossSlime (double x, double y, double z, BlueSlime entity, World world)
+ {
+ if (!world.isRemote)
+ {
+ entity.setPosition(x, y, z);
+ entity.setSlimeSize(8);
+ entity.initCreature();
+ world.spawnEntityInWorld(entity);
+ }
+ }
}
diff --git a/mods/tinker/tconstruct/items/blocks/GlassBlockItem.java b/mods/tinker/tconstruct/items/blocks/GlassBlockItem.java
new file mode 100644
index 00000000..50341f91
--- /dev/null
+++ b/mods/tinker/tconstruct/items/blocks/GlassBlockItem.java
@@ -0,0 +1,36 @@
+package mods.tinker.tconstruct.items.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class GlassBlockItem extends ItemBlock
+{
+ public static final String blockType[] =
+ {
+ "glass.pure", "glass.soul", "glass.soul.pure"
+ };
+
+ public GlassBlockItem(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata(int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName(ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
+ return (new StringBuilder()).append("block.").append(blockType[pos]).toString();
+ }
+}
diff --git a/mods/tinker/tconstruct/items/blocks/RedstoneMachineItem.java b/mods/tinker/tconstruct/items/blocks/RedstoneMachineItem.java
new file mode 100644
index 00000000..e68e7035
--- /dev/null
+++ b/mods/tinker/tconstruct/items/blocks/RedstoneMachineItem.java
@@ -0,0 +1,31 @@
+package mods.tinker.tconstruct.items.blocks;
+
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class RedstoneMachineItem extends ItemBlock
+{
+ public static final String blockType[] =
+ {
+ "drawbridge", "firestarter"
+ };
+
+ public RedstoneMachineItem(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata(int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName(ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length-1);
+ return (new StringBuilder()).append("block.").append(blockType[pos]).toString();
+ }
+}
diff --git a/mods/tinker/tconstruct/items/blocks/SmelteryItemBlock.java b/mods/tinker/tconstruct/items/blocks/SmelteryItemBlock.java
index 85bf5173..c3e87dde 100644
--- a/mods/tinker/tconstruct/items/blocks/SmelteryItemBlock.java
+++ b/mods/tinker/tconstruct/items/blocks/SmelteryItemBlock.java
@@ -8,7 +8,7 @@ public class SmelteryItemBlock extends ItemBlock
{
public static final String blockType[] =
{
- "Controller", "Drain", "Brick", "Gague", "Window"
+ "Controller", "Drain", "Brick", "Furnace", "Stone", "Cobblestone", "Paver", "Brick.Cracked", "Road", "Brick.Fancy", "Brick.Square"
};
public SmelteryItemBlock(int id)
diff --git a/mods/tinker/tconstruct/items/blocks/StainedGlassClearItem.java b/mods/tinker/tconstruct/items/blocks/StainedGlassClearItem.java
new file mode 100644
index 00000000..2a134e48
--- /dev/null
+++ b/mods/tinker/tconstruct/items/blocks/StainedGlassClearItem.java
@@ -0,0 +1,33 @@
+package mods.tinker.tconstruct.items.blocks;
+
+import java.util.List;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.MathHelper;
+
+public class StainedGlassClearItem extends ItemBlock
+{
+ public static final String blockType[] = { "white", "orange", "magenta", "lightblue", "yellow", "lime", "pink", "gray", "lightgray", "cyan", "purple", "blue", "brown", "green", "red", "black" };
+
+ public StainedGlassClearItem(int id)
+ {
+ super(id);
+ setMaxDamage(0);
+ setHasSubtypes(true);
+ }
+
+ public int getMetadata (int meta)
+ {
+ return meta;
+ }
+
+ public String getUnlocalizedName (ItemStack itemstack)
+ {
+ int pos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, blockType.length - 1);
+ return (new StringBuilder()).append("block.stainedglass.").append(blockType[pos]).toString();
+ }
+}
diff --git a/mods/tinker/tconstruct/items/tools/Battleaxe.java b/mods/tinker/tconstruct/items/tools/Battleaxe.java
index 1bc12805..cd2280c8 100644
--- a/mods/tinker/tconstruct/items/tools/Battleaxe.java
+++ b/mods/tinker/tconstruct/items/tools/Battleaxe.java
@@ -239,10 +239,10 @@ public class Battleaxe extends HarvestTool
public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player)
{
World world = player.worldObj;
- int woodID = world.getBlockId(x, y, z);
- Block wood = Block.blocksList[woodID];
+ final int woodID = world.getBlockId(x, y, z);
+ final Block wood = Block.blocksList[woodID];
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
- int meta = world.getBlockMetadata(x, y, z);
+ final int meta = world.getBlockMetadata(x, y, z);
for (int yPos = y + 1; yPos < y + 9; yPos++)
{
int blockID = world.getBlockId(x, yPos, z);
@@ -250,7 +250,7 @@ public class Battleaxe extends HarvestTool
if (!(tags.getBoolean("Broken")) && block != null && block.blockMaterial == Material.wood)
{
int localblockID = world.getBlockId(x, yPos, z);
- meta = world.getBlockMetadata(x, yPos, z);
+ int localMeta = world.getBlockMetadata(x, yPos, z);
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
if (hlvl <= tags.getInteger("HarvestLevel"))
@@ -266,21 +266,14 @@ public class Battleaxe extends HarvestTool
{
if (block != null && block.blockMaterial == Material.wood)
{
- meta = world.getBlockMetadata(x, yPos, z);
- /*world.setBlockToAir(x, yPos, z);
+ localMeta = world.getBlockMetadata(x, yPos, z);
if (!player.capabilities.isCreativeMode)
{
- Block.blocksList[blockID].harvestBlock(world, player, x, yPos, z, meta);
- onBlockDestroyed(stack, world, blockID, x, yPos, z, player);
- }*/
- if (!player.capabilities.isCreativeMode)
- {
- block.harvestBlock(world, player, x, yPos, z, meta);
- block.onBlockHarvested(world, x, y, z, meta, player);
+ block.harvestBlock(world, player, x, yPos, z, localMeta);
+ block.onBlockHarvested(world, x, y, z, localMeta, player);
onBlockDestroyed(stack, world, localblockID, x, yPos, z, player);
}
world.setBlockToAir(x, yPos, z);
- blockID = localblockID;
}
}
}
diff --git a/mods/tinker/tconstruct/items/tools/Excavator.java b/mods/tinker/tconstruct/items/tools/Excavator.java
index 12a867bb..56a579fb 100644
--- a/mods/tinker/tconstruct/items/tools/Excavator.java
+++ b/mods/tinker/tconstruct/items/tools/Excavator.java
@@ -145,10 +145,12 @@ public class Excavator extends HarvestTool
Block block = Block.blocksList[blockID];
if (!stack.hasTagCompound())
return false;
-
+
if (block == null)
return super.onBlockStartBreak(stack, x, y, z, player);
+ float blockHardness = block.getBlockHardness(world, x, y, z);
+
boolean validStart = false;
for (int iter = 0; iter < materials.length; iter++)
{
@@ -194,8 +196,9 @@ public class Excavator extends HarvestTool
block = Block.blocksList[localblockID];
meta = world.getBlockMetadata(xPos, yPos, zPos);
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
+ float localHardness = block == null ? Float.MAX_VALUE : block.getBlockHardness(world, xPos, yPos, zPos);
- if (hlvl <= tags.getInteger("HarvestLevel"))
+ if (hlvl <= tags.getInteger("HarvestLevel") && localHardness <= blockHardness)
{
boolean cancelHarvest = false;
for (ActiveToolMod mod : TConstructRegistry.activeModifiers)
@@ -212,18 +215,12 @@ public class Excavator extends HarvestTool
{
if (materials[iter] == block.blockMaterial)
{
- /*world.setBlockToAir(xPos, yPos, zPos);
- if (!player.capabilities.isCreativeMode)
- {
- block.harvestBlock(world, player, xPos, yPos, zPos, meta);
- onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
- }
- blockID = localblockID;*/
if (!player.capabilities.isCreativeMode)
{
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
block.onBlockHarvested(world, x, y, z, meta, player);
- onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
+ if (blockHardness > 0f)
+ onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
}
world.setBlockToAir(xPos, yPos, zPos);
blockID = localblockID;
diff --git a/mods/tinker/tconstruct/items/tools/Hammer.java b/mods/tinker/tconstruct/items/tools/Hammer.java
index bbb27ba7..609c2757 100644
--- a/mods/tinker/tconstruct/items/tools/Hammer.java
+++ b/mods/tinker/tconstruct/items/tools/Hammer.java
@@ -221,6 +221,8 @@ public class Hammer extends HarvestTool
if (block == null)
return super.onBlockStartBreak(stack, x, y, z, player);
+ float blockHardness = block.getBlockHardness(world, x, y, z);
+
boolean validStart = false;
for (int iter = 0; iter < materials.length; iter++)
{
@@ -266,8 +268,9 @@ public class Hammer extends HarvestTool
block = Block.blocksList[localblockID];
meta = world.getBlockMetadata(xPos, yPos, zPos);
int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
+ float localHardness = block == null ? Float.MAX_VALUE : block.getBlockHardness(world, xPos, yPos, zPos);
- if (hlvl <= tags.getInteger("HarvestLevel"))
+ if (hlvl <= tags.getInteger("HarvestLevel") && localHardness <= blockHardness)
{
boolean cancelHarvest = false;
for (ActiveToolMod mod : TConstructRegistry.activeModifiers)
@@ -288,7 +291,8 @@ public class Hammer extends HarvestTool
{
block.harvestBlock(world, player, xPos, yPos, zPos, meta);
block.onBlockHarvested(world, x, y, z, meta, player);
- onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
+ if (blockHardness > 0f)
+ onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
}
world.setBlockToAir(xPos, yPos, zPos);
blockID = localblockID;
@@ -305,13 +309,13 @@ public class Hammer extends HarvestTool
world.playAuxSFX(2001, x, y, z, blockID + (meta << 12));
return true;
}
-
+
@Override
public float getStrVsBlock (ItemStack stack, Block block, int meta)
{
if (!stack.hasTagCompound())
return 1.0f;
-
+
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
if (tags.getBoolean("Broken"))
return 0.1f;
@@ -328,13 +332,13 @@ public class Hammer extends HarvestTool
mineSpeed += tags.getInteger("MiningSpeed2");
heads++;
}
-
+
if (tags.hasKey("MiningSpeedHandle"))
{
mineSpeed += tags.getInteger("MiningSpeedHandle");
heads++;
}
-
+
if (tags.hasKey("MiningSpeedExtra"))
{
mineSpeed += tags.getInteger("MiningSpeedExtra");
diff --git a/mods/tinker/tconstruct/items/tools/LumberAxe.java b/mods/tinker/tconstruct/items/tools/LumberAxe.java
index e21471fd..32108f73 100644
--- a/mods/tinker/tconstruct/items/tools/LumberAxe.java
+++ b/mods/tinker/tconstruct/items/tools/LumberAxe.java
@@ -144,7 +144,7 @@ public class LumberAxe extends HarvestTool
{
World world = player.worldObj;
final int woodID = world.getBlockId(x, y, z);
- Block wood = Block.blocksList[woodID];
+ final Block wood = Block.blocksList[woodID];
if (wood.isWood(world, x, y, z))
{
int height = y;
diff --git a/mods/tinker/tconstruct/items/tools/Scythe.java b/mods/tinker/tconstruct/items/tools/Scythe.java
index a3184687..5467fdbe 100644
--- a/mods/tinker/tconstruct/items/tools/Scythe.java
+++ b/mods/tinker/tconstruct/items/tools/Scythe.java
@@ -151,8 +151,8 @@ public class Scythe extends Weapon
public boolean onBlockStartBreak (ItemStack stack, int x, int y, int z, EntityPlayer player)
{
World world = player.worldObj;
- int blockID = 0;
- int meta = 0;
+ final int blockID = world.getBlockId(x, y, z);
+ final int meta = world.getBlockMetadata(x, y, z);
if (!stack.hasTagCompound())
return false;
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
@@ -181,22 +181,14 @@ public class Scythe extends Weapon
{
if (materials[iter] == block.blockMaterial)
{
- meta = world.getBlockMetadata(xPos, yPos, zPos);
- /*world.setBlockToAir(xPos, yPos, zPos);
+ int localMeta = world.getBlockMetadata(xPos, yPos, zPos);
if (!player.capabilities.isCreativeMode)
{
- block.harvestBlock(world, player, xPos, yPos, zPos, meta);
- onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
- }
- blockID = localblockID;*/
- if (!player.capabilities.isCreativeMode)
- {
- block.harvestBlock(world, player, xPos, yPos, zPos, meta);
- block.onBlockHarvested(world, x, y, z, meta, player);
+ block.harvestBlock(world, player, xPos, yPos, zPos, localMeta);
+ block.onBlockHarvested(world, x, y, z, localMeta, player);
onBlockDestroyed(stack, world, localblockID, xPos, yPos, zPos, player);
}
world.setBlockToAir(xPos, yPos, zPos);
- blockID = localblockID;
}
}
}
diff --git a/mods/tinker/tconstruct/library/ActiveToolMod.java b/mods/tinker/tconstruct/library/ActiveToolMod.java
index 8bffb24e..8c292a44 100644
--- a/mods/tinker/tconstruct/library/ActiveToolMod.java
+++ b/mods/tinker/tconstruct/library/ActiveToolMod.java
@@ -55,4 +55,9 @@ public class ActiveToolMod
{
return false;
}
+
+ public boolean doesCriticalHit (ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityLiving player, Entity entity)
+ {
+ return false;
+ }
}
diff --git a/mods/tinker/tconstruct/library/blocks/InventoryBlock.java b/mods/tinker/tconstruct/library/blocks/InventoryBlock.java
index 2622c947..ca33d477 100644
--- a/mods/tinker/tconstruct/library/blocks/InventoryBlock.java
+++ b/mods/tinker/tconstruct/library/blocks/InventoryBlock.java
@@ -104,6 +104,18 @@ public abstract class InventoryBlock extends BlockContainer
}
/* Placement */
+
+
+ public int onBlockPlaced(World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int meta)
+ {
+ TileEntity logic = world.getBlockTileEntity(x, y, z);
+ if (logic instanceof IFacingLogic)
+ {
+ IFacingLogic direction = (IFacingLogic) logic;
+ direction.setDirection(side);
+ }
+ return meta;
+ }
@Override
public void onBlockPlacedBy (World world, int x, int y, int z, EntityLiving entityliving, ItemStack stack)
diff --git a/mods/tinker/tconstruct/library/crafting/CastingRecipe.java b/mods/tinker/tconstruct/library/crafting/CastingRecipe.java
index e06e12ae..2d50ccf2 100644
--- a/mods/tinker/tconstruct/library/crafting/CastingRecipe.java
+++ b/mods/tinker/tconstruct/library/crafting/CastingRecipe.java
@@ -22,8 +22,10 @@ public class CastingRecipe
public boolean matches(LiquidStack metal, ItemStack inputCast)
{
- if (castingMetal.isLiquidEqual(metal) && ((cast != null && cast.itemDamage == Short.MAX_VALUE && inputCast.getItem() == cast.getItem()) || ItemStack.areItemStacksEqual(this.cast, inputCast)) )
+ if (castingMetal.isLiquidEqual(metal) && ( (cast != null && cast.getItemDamage() == Short.MAX_VALUE && inputCast.getItem() == cast.getItem()) || ItemStack.areItemStacksEqual(this.cast, inputCast) ))
+ {
return true;
+ }
else
return false;
}
diff --git a/mods/tinker/tconstruct/library/crafting/ToolRecipe.java b/mods/tinker/tconstruct/library/crafting/ToolRecipe.java
index a9463168..649a0566 100644
--- a/mods/tinker/tconstruct/library/crafting/ToolRecipe.java
+++ b/mods/tinker/tconstruct/library/crafting/ToolRecipe.java
@@ -2,7 +2,6 @@ package mods.tinker.tconstruct.library.crafting;
import java.util.LinkedList;
-import mods.tinker.tconstruct.common.TContent;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.tools.ToolCore;
import net.minecraft.item.Item;
diff --git a/mods/tinker/tconstruct/library/tools/AbilityHelper.java b/mods/tinker/tconstruct/library/tools/AbilityHelper.java
index 4a2f0661..852c36de 100644
--- a/mods/tinker/tconstruct/library/tools/AbilityHelper.java
+++ b/mods/tinker/tconstruct/library/tools/AbilityHelper.java
@@ -41,7 +41,7 @@ import net.minecraftforge.event.entity.player.UseHoeEvent;
public class AbilityHelper
{
- static Random random = new Random();
+ public static Random random = new Random();
/* Normal interactions */
public static boolean onBlockChanged (ItemStack stack, World world, int bID, int x, int y, int z, EntityLiving player, Random random)
@@ -143,9 +143,12 @@ public class AbilityHelper
{
boolean criticalHit = player.fallDistance > 0.0F && !player.onGround && !player.isOnLadder() && !player.isInWater() && !player.isPotionActive(Potion.blindness)
&& player.ridingEntity == null && entity instanceof EntityLiving;
-
- if (tool == TContent.cutlass && random.nextInt(10) == 0)
- criticalHit = true;
+
+ for (ActiveToolMod mod : TConstructRegistry.activeModifiers)
+ {
+ if (mod.doesCriticalHit(tool, tags, toolTags, stack, player, entity))
+ criticalHit = true;
+ }
if (criticalHit)
{
diff --git a/mods/tinker/tconstruct/library/tools/ToolCore.java b/mods/tinker/tconstruct/library/tools/ToolCore.java
index ddd29f46..9359291f 100644
--- a/mods/tinker/tconstruct/library/tools/ToolCore.java
+++ b/mods/tinker/tconstruct/library/tools/ToolCore.java
@@ -578,7 +578,11 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
@Override
public boolean onBlockDestroyed (ItemStack itemstack, World world, int blockID, int x, int y, int z, EntityLiving player)
{
- return AbilityHelper.onBlockChanged(itemstack, world, blockID, x, y, z, player, random);
+ if ((double)Block.blocksList[blockID].getBlockHardness(world, x, y, z) != 0.0D)
+ {
+ return AbilityHelper.onBlockChanged(itemstack, world, blockID, x, y, z, player, random);
+ }
+ return true;
}
@Override
diff --git a/mods/tinker/tconstruct/library/util/IFacingLogic.java b/mods/tinker/tconstruct/library/util/IFacingLogic.java
index 62d921fc..bace279d 100644
--- a/mods/tinker/tconstruct/library/util/IFacingLogic.java
+++ b/mods/tinker/tconstruct/library/util/IFacingLogic.java
@@ -7,5 +7,6 @@ public interface IFacingLogic
{
public byte getRenderDirection();
public ForgeDirection getForgeDirection();
+ public void setDirection(int side);
public void setDirection(float yaw, float pitch, EntityLiving player);
}
\ No newline at end of file
diff --git a/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java b/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java
index 0912a854..9f74aab3 100644
--- a/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java
+++ b/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java
@@ -202,4 +202,11 @@ public class TActiveOmniMod extends ActiveToolMod
}
return bonus;
}
+
+ public boolean doesCriticalHit (ToolCore tool, NBTTagCompound tags, NBTTagCompound toolTags, ItemStack stack, EntityLiving player, Entity entity)
+ {
+ if (tool == TContent.cutlass && random.nextInt(10) == 0)
+ return true;
+ return false;
+ }
}
diff --git a/mods/tinker/tconstruct/library/SkillRegistry.java b/mods/tinker/tconstruct/skill/SkillRegistry.java
similarity index 86%
rename from mods/tinker/tconstruct/library/SkillRegistry.java
rename to mods/tinker/tconstruct/skill/SkillRegistry.java
index 8b809785..14c8ff5b 100644
--- a/mods/tinker/tconstruct/library/SkillRegistry.java
+++ b/mods/tinker/tconstruct/skill/SkillRegistry.java
@@ -1,8 +1,7 @@
-package mods.tinker.tconstruct.library;
+package mods.tinker.tconstruct.skill;
import java.util.HashMap;
-import mods.tinker.tconstruct.skill.Skill;
public class SkillRegistry
{
diff --git a/mods/tinker/tconstruct/util/PHConstruct.java b/mods/tinker/tconstruct/util/PHConstruct.java
index 41f2cd80..e0ab4f3c 100644
--- a/mods/tinker/tconstruct/util/PHConstruct.java
+++ b/mods/tinker/tconstruct/util/PHConstruct.java
@@ -4,6 +4,7 @@ import java.io.File;
import java.io.IOException;
import mods.tinker.tconstruct.TConstruct;
+import net.minecraft.block.Block;
import net.minecraftforge.common.Configuration;
public class PHConstruct
@@ -92,6 +93,10 @@ public class PHConstruct
aggregator = config.getBlock("Aggregator", 3221).getInt(3221);
lightCrystalBase = config.getBlock("Light Crystal", 3222).getInt(3222);
+ glass = config.getBlock("Clear Glass", 3223).getInt(3223);
+ stainedGlass = config.getBlock("Stained Glass", 3224).getInt(3224);
+ stainedGlassClear = config.getBlock("Clear Stained Glass", 3225).getInt(3225);
+ redstoneMachine = config.getBlock("Redstone Machines", 3226).getInt(3226);
/*golemCore = config.getBlock("Golem Core", 1481).getInt(1481);
golemHead = config.getBlock("Golem Head", 1482).getInt(1482);*/
@@ -288,7 +293,8 @@ public class PHConstruct
public static int oreSlag;
public static int oreGravel;
public static int metalBlock;
- //public static int axle;
+
+ public static int redstoneMachine;
public static int golemCore;
public static int golemHead;
@@ -305,6 +311,9 @@ public class PHConstruct
//InfiBlocks
public static int speedBlock;
+ public static int glass;
+ public static int stainedGlass;
+ public static int stainedGlassClear;
//Crystalline
public static int aggregator;
diff --git a/mods/tinker/tconstruct/util/SmelteryDamageSource.java b/mods/tinker/tconstruct/util/SmelteryDamageSource.java
new file mode 100644
index 00000000..8a71e287
--- /dev/null
+++ b/mods/tinker/tconstruct/util/SmelteryDamageSource.java
@@ -0,0 +1,40 @@
+package mods.tinker.tconstruct.util;
+
+import mods.tinker.tconstruct.library.tools.AbilityHelper;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.StatCollector;
+
+public class SmelteryDamageSource extends DamageSource
+{
+ public SmelteryDamageSource()
+ {
+ super("smeltery");
+ }
+
+ public String getDeathMessage (EntityLiving par1EntityLiving)
+ {
+ String type = "";
+ switch (AbilityHelper.random.nextInt(4))
+ {
+ case 0:
+ type = "one.";
+ break;
+ case 1:
+ type = "two.";
+ break;
+ case 2:
+ type = "three.";
+ break;
+ case 3:
+ type = "four.";
+ break;
+ }
+ EntityLiving entityliving1 = par1EntityLiving.func_94060_bK();
+ String s = "death." + type + this.damageType;
+ String s1 = s + ".player";
+ return entityliving1 != null && StatCollector.func_94522_b(s1) ? StatCollector.translateToLocalFormatted(s1,
+ new Object[] { par1EntityLiving.getTranslatedEntityName(), entityliving1.getTranslatedEntityName() }) : StatCollector.translateToLocalFormatted(s,
+ new Object[] { par1EntityLiving.getTranslatedEntityName() });
+ }
+}
diff --git a/mods/tinker/tconstruct/util/TDispenserBehaviorSpawnEgg.java b/mods/tinker/tconstruct/util/TDispenserBehaviorSpawnEgg.java
new file mode 100644
index 00000000..bf1c3225
--- /dev/null
+++ b/mods/tinker/tconstruct/util/TDispenserBehaviorSpawnEgg.java
@@ -0,0 +1,32 @@
+package mods.tinker.tconstruct.util;
+
+import mods.tinker.tconstruct.items.TitleIcon;
+import net.minecraft.block.BlockDispenser;
+import net.minecraft.dispenser.BehaviorDefaultDispenseItem;
+import net.minecraft.dispenser.IBlockSource;
+import net.minecraft.entity.EntityLiving;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumFacing;
+
+public class TDispenserBehaviorSpawnEgg extends BehaviorDefaultDispenseItem
+{
+ /**
+ * Dispense the specified stack, play the dispense sound and spawn particles.
+ */
+ public ItemStack dispenseStack(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
+ {
+ EnumFacing enumfacing = BlockDispenser.getFacing(par1IBlockSource.getBlockMetadata());
+ double d0 = par1IBlockSource.getX() + (double)enumfacing.getFrontOffsetX();
+ double d1 = (double)((float)par1IBlockSource.getYInt() + 0.2F);
+ double d2 = par1IBlockSource.getZ() + (double)enumfacing.getFrontOffsetZ();
+ EntityLiving entity = TitleIcon.activateSpawnEgg(par2ItemStack, par1IBlockSource.getWorld(), d0, d1, d2, 0);
+
+ if (par2ItemStack.hasDisplayName())
+ {
+ ((EntityLiving)entity).func_94058_c(par2ItemStack.getDisplayName());
+ }
+
+ par2ItemStack.splitStack(1);
+ return par2ItemStack;
+ }
+}
diff --git a/mods/tinker/tconstruct/util/network/TPacketHandler.java b/mods/tinker/tconstruct/util/network/TPacketHandler.java
index 0401c489..70960c4c 100644
--- a/mods/tinker/tconstruct/util/network/TPacketHandler.java
+++ b/mods/tinker/tconstruct/util/network/TPacketHandler.java
@@ -8,9 +8,9 @@ import java.util.ArrayList;
import mods.tinker.tconstruct.TConstruct;
import mods.tinker.tconstruct.blocks.logic.ToolForgeLogic;
import mods.tinker.tconstruct.blocks.logic.ToolStationLogic;
-import mods.tinker.tconstruct.library.SkillRegistry;
import mods.tinker.tconstruct.library.blocks.InventoryLogic;
import mods.tinker.tconstruct.skill.Skill;
+import mods.tinker.tconstruct.skill.SkillRegistry;
import mods.tinker.tconstruct.util.player.TPlayerStats;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
diff --git a/mods/tinker/tconstruct/util/player/ArmorExtended.java b/mods/tinker/tconstruct/util/player/ArmorExtended.java
index 07604498..44eb91ad 100644
--- a/mods/tinker/tconstruct/util/player/ArmorExtended.java
+++ b/mods/tinker/tconstruct/util/player/ArmorExtended.java
@@ -4,7 +4,7 @@ import java.lang.ref.WeakReference;
import mods.tinker.tconstruct.TConstruct;
import mods.tinker.tconstruct.common.TContent;
-import mods.tinker.tconstruct.library.SkillRegistry;
+import mods.tinker.tconstruct.skill.SkillRegistry;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
diff --git a/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java b/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java
index 0486db56..9489e16c 100644
--- a/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java
+++ b/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java
@@ -2,7 +2,7 @@ package mods.tinker.tconstruct.util.player;
import mods.tinker.tconstruct.client.TProxyClient;
import mods.tinker.tconstruct.common.TContent;
-import mods.tinker.tconstruct.library.SkillRegistry;
+import mods.tinker.tconstruct.skill.SkillRegistry;
import net.minecraft.entity.player.EntityPlayer;
public class ArmorExtendedClient extends ArmorExtended
diff --git a/mods/tinker/tconstruct/util/player/TPlayerHandler.java b/mods/tinker/tconstruct/util/player/TPlayerHandler.java
index 8424f517..0f20e461 100644
--- a/mods/tinker/tconstruct/util/player/TPlayerHandler.java
+++ b/mods/tinker/tconstruct/util/player/TPlayerHandler.java
@@ -79,13 +79,16 @@ public class TPlayerHandler implements IPlayerTracker
//stats.armor.recalculateSkills(entityplayer, stats);
playerStats.put(entityplayer.username, stats);
-
+
if (PHConstruct.gregtech)
{
PHConstruct.gregtech = false;
- entityplayer.addChatMessage("Warning: Cross-mod Exploit Present!");
- entityplayer.addChatMessage("Solution 1: Disable Reverse Smelting recipes from GregTech.");
- entityplayer.addChatMessage("Solution 2: Disable Auto-Smelt/Fortune interaction from TConstruct.");
+ if (PHConstruct.lavaFortuneInteraction)
+ {
+ entityplayer.addChatMessage("Warning: Cross-mod Exploit Present!");
+ entityplayer.addChatMessage("Solution 1: Disable Reverse Smelting recipes from GregTech.");
+ entityplayer.addChatMessage("Solution 2: Disable Auto-Smelt/Fortune interaction from TConstruct.");
+ }
}
//sendSkills(entityplayer, stats);
diff --git a/mods/tinker/textures/blocks/glass/stainedglass_brown.png b/mods/tinker/textures/blocks/glass/stainedglass_brown.png
new file mode 100644
index 00000000..0442c309
Binary files /dev/null and b/mods/tinker/textures/blocks/glass/stainedglass_brown.png differ
diff --git a/mods/tinker/textures/blocks/liquid_cow.png b/mods/tinker/textures/blocks/liquid_cow.png
new file mode 100644
index 00000000..a267d356
Binary files /dev/null and b/mods/tinker/textures/blocks/liquid_cow.png differ
diff --git a/mods/tinker/textures/blocks/liquid_cow.txt b/mods/tinker/textures/blocks/liquid_cow.txt
new file mode 100644
index 00000000..d8fe765a
--- /dev/null
+++ b/mods/tinker/textures/blocks/liquid_cow.txt
@@ -0,0 +1,32 @@
+0*2
+1*2
+2*2
+3*2
+4*2
+5*2
+6*2
+7*2
+8*2
+9*2
+10*2
+11*2
+12*2
+13*2
+14*2
+15*2
+16*2
+17*2
+18*2
+19*2
+20*2
+21*2
+22*2
+23*2
+24*2
+25*2
+26*2
+27*2
+28*2
+29*2
+30*2
+31*2
diff --git a/mods/tinker/textures/blocks/liquid_cow_flow.png b/mods/tinker/textures/blocks/liquid_cow_flow.png
new file mode 100644
index 00000000..c038f398
Binary files /dev/null and b/mods/tinker/textures/blocks/liquid_cow_flow.png differ
diff --git a/mods/tinker/textures/blocks/liquid_cow_flow.txt b/mods/tinker/textures/blocks/liquid_cow_flow.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/mods/tinker/textures/blocks/liquid_glass.png b/mods/tinker/textures/blocks/liquid_glass.png
index 50859c4f..df991c03 100644
Binary files a/mods/tinker/textures/blocks/liquid_glass.png and b/mods/tinker/textures/blocks/liquid_glass.png differ
diff --git a/mods/tinker/textures/blocks/liquid_glass_flow.png b/mods/tinker/textures/blocks/liquid_glass_flow.png
index db415098..a54abe76 100644
Binary files a/mods/tinker/textures/blocks/liquid_glass_flow.png and b/mods/tinker/textures/blocks/liquid_glass_flow.png differ
diff --git a/mods/tinker/textures/blocks/liquid_stone.png b/mods/tinker/textures/blocks/liquid_stone.png
new file mode 100644
index 00000000..388790f6
Binary files /dev/null and b/mods/tinker/textures/blocks/liquid_stone.png differ
diff --git a/mods/tinker/textures/blocks/liquid_stone.txt b/mods/tinker/textures/blocks/liquid_stone.txt
new file mode 100644
index 00000000..d8fe765a
--- /dev/null
+++ b/mods/tinker/textures/blocks/liquid_stone.txt
@@ -0,0 +1,32 @@
+0*2
+1*2
+2*2
+3*2
+4*2
+5*2
+6*2
+7*2
+8*2
+9*2
+10*2
+11*2
+12*2
+13*2
+14*2
+15*2
+16*2
+17*2
+18*2
+19*2
+20*2
+21*2
+22*2
+23*2
+24*2
+25*2
+26*2
+27*2
+28*2
+29*2
+30*2
+31*2
diff --git a/mods/tinker/textures/blocks/liquid_stone_flow.png b/mods/tinker/textures/blocks/liquid_stone_flow.png
new file mode 100644
index 00000000..39773c30
Binary files /dev/null and b/mods/tinker/textures/blocks/liquid_stone_flow.png differ
diff --git a/mods/tinker/textures/blocks/liquid_stone_flow.txt b/mods/tinker/textures/blocks/liquid_stone_flow.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/mods/tinker/textures/blocks/liquid_villager.png b/mods/tinker/textures/blocks/liquid_villager.png
new file mode 100644
index 00000000..548d72d7
Binary files /dev/null and b/mods/tinker/textures/blocks/liquid_villager.png differ
diff --git a/mods/tinker/textures/blocks/liquid_villager.txt b/mods/tinker/textures/blocks/liquid_villager.txt
new file mode 100644
index 00000000..d8fe765a
--- /dev/null
+++ b/mods/tinker/textures/blocks/liquid_villager.txt
@@ -0,0 +1,32 @@
+0*2
+1*2
+2*2
+3*2
+4*2
+5*2
+6*2
+7*2
+8*2
+9*2
+10*2
+11*2
+12*2
+13*2
+14*2
+15*2
+16*2
+17*2
+18*2
+19*2
+20*2
+21*2
+22*2
+23*2
+24*2
+25*2
+26*2
+27*2
+28*2
+29*2
+30*2
+31*2
diff --git a/mods/tinker/textures/blocks/liquid_villager_flow.png b/mods/tinker/textures/blocks/liquid_villager_flow.png
new file mode 100644
index 00000000..b13a6529
Binary files /dev/null and b/mods/tinker/textures/blocks/liquid_villager_flow.png differ
diff --git a/mods/tinker/textures/blocks/liquid_villager_flow.txt b/mods/tinker/textures/blocks/liquid_villager_flow.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/mods/tinker/textures/blocks/machines/drawbridge_bottom.png b/mods/tinker/textures/blocks/machines/drawbridge_bottom.png
new file mode 100644
index 00000000..8f1393d1
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/drawbridge_bottom.png differ
diff --git a/mods/tinker/textures/blocks/machines/drawbridge_bottom_face.png b/mods/tinker/textures/blocks/machines/drawbridge_bottom_face.png
new file mode 100644
index 00000000..bd6eb719
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/drawbridge_bottom_face.png differ
diff --git a/mods/tinker/textures/blocks/machines/drawbridge_side.png b/mods/tinker/textures/blocks/machines/drawbridge_side.png
new file mode 100644
index 00000000..35f891db
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/drawbridge_side.png differ
diff --git a/mods/tinker/textures/blocks/machines/drawbridge_side_face.png b/mods/tinker/textures/blocks/machines/drawbridge_side_face.png
new file mode 100644
index 00000000..7a0088e3
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/drawbridge_side_face.png differ
diff --git a/mods/tinker/textures/blocks/machines/drawbridge_top.png b/mods/tinker/textures/blocks/machines/drawbridge_top.png
new file mode 100644
index 00000000..285bb70f
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/drawbridge_top.png differ
diff --git a/mods/tinker/textures/blocks/machines/drawbridge_top_face.png b/mods/tinker/textures/blocks/machines/drawbridge_top_face.png
new file mode 100644
index 00000000..312eff9c
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/drawbridge_top_face.png differ
diff --git a/mods/tinker/textures/blocks/machines/firestarter_bottom.png b/mods/tinker/textures/blocks/machines/firestarter_bottom.png
new file mode 100644
index 00000000..06a21a3e
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/firestarter_bottom.png differ
diff --git a/mods/tinker/textures/blocks/machines/firestarter_side.png b/mods/tinker/textures/blocks/machines/firestarter_side.png
new file mode 100644
index 00000000..64462f61
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/firestarter_side.png differ
diff --git a/mods/tinker/textures/blocks/machines/firestarter_top.png b/mods/tinker/textures/blocks/machines/firestarter_top.png
new file mode 100644
index 00000000..29c1e543
Binary files /dev/null and b/mods/tinker/textures/blocks/machines/firestarter_top.png differ
diff --git a/mods/tinker/textures/blocks/searedbrickcracked.png b/mods/tinker/textures/blocks/searedbrickcracked.png
new file mode 100644
index 00000000..1337a9cc
Binary files /dev/null and b/mods/tinker/textures/blocks/searedbrickcracked.png differ
diff --git a/mods/tinker/textures/blocks/searedbrickfancy.png b/mods/tinker/textures/blocks/searedbrickfancy.png
new file mode 100644
index 00000000..30bf0710
Binary files /dev/null and b/mods/tinker/textures/blocks/searedbrickfancy.png differ
diff --git a/mods/tinker/textures/blocks/searedbricksquare.png b/mods/tinker/textures/blocks/searedbricksquare.png
new file mode 100644
index 00000000..d1229458
Binary files /dev/null and b/mods/tinker/textures/blocks/searedbricksquare.png differ
diff --git a/mods/tinker/textures/blocks/searedcobble.png b/mods/tinker/textures/blocks/searedcobble.png
new file mode 100644
index 00000000..f2142b8d
Binary files /dev/null and b/mods/tinker/textures/blocks/searedcobble.png differ
diff --git a/mods/tinker/textures/blocks/searedcreeper.png b/mods/tinker/textures/blocks/searedcreeper.png
new file mode 100644
index 00000000..06f4f4fd
Binary files /dev/null and b/mods/tinker/textures/blocks/searedcreeper.png differ
diff --git a/mods/tinker/textures/blocks/searedpaver.png b/mods/tinker/textures/blocks/searedpaver.png
new file mode 100644
index 00000000..09747818
Binary files /dev/null and b/mods/tinker/textures/blocks/searedpaver.png differ
diff --git a/mods/tinker/textures/blocks/searedroad.png b/mods/tinker/textures/blocks/searedroad.png
new file mode 100644
index 00000000..6f11b101
Binary files /dev/null and b/mods/tinker/textures/blocks/searedroad.png differ
diff --git a/mods/tinker/textures/blocks/searedstone.png b/mods/tinker/textures/blocks/searedstone.png
new file mode 100644
index 00000000..6e7ac16f
Binary files /dev/null and b/mods/tinker/textures/blocks/searedstone.png differ
diff --git a/mods/tinker/textures/gui/drawbridge.png b/mods/tinker/textures/gui/drawbridge.png
new file mode 100644
index 00000000..f9a23bc8
Binary files /dev/null and b/mods/tinker/textures/gui/drawbridge.png differ
diff --git a/mods/tinker/textures/items/frypan/quartz_frypan_effect.png b/mods/tinker/textures/items/frypan/quartz_frypan_effect.png
index 43aef195..db9c0b99 100644
Binary files a/mods/tinker/textures/items/frypan/quartz_frypan_effect.png and b/mods/tinker/textures/items/frypan/quartz_frypan_effect.png differ
diff --git a/mods/tinker/textures/items/materials/bucket_dsteel.png b/mods/tinker/textures/items/materials/bucket_dsteel.png
deleted file mode 100644
index 43b5cb98..00000000
Binary files a/mods/tinker/textures/items/materials/bucket_dsteel.png and /dev/null differ
diff --git a/mods/tinker/textures/items/materials/bucket_emerald.png b/mods/tinker/textures/items/materials/bucket_emerald.png
new file mode 100644
index 00000000..3fa32e9c
Binary files /dev/null and b/mods/tinker/textures/items/materials/bucket_emerald.png differ
diff --git a/mods/tinker/textures/items/materials/bucket_glass.png b/mods/tinker/textures/items/materials/bucket_glass.png
new file mode 100644
index 00000000..e3461068
Binary files /dev/null and b/mods/tinker/textures/items/materials/bucket_glass.png differ
diff --git a/mods/tinker/textures/items/materials/bucket_heptazion.png b/mods/tinker/textures/items/materials/bucket_heptazion.png
deleted file mode 100644
index ac1383f2..00000000
Binary files a/mods/tinker/textures/items/materials/bucket_heptazion.png and /dev/null differ
diff --git a/mods/tinker/textures/items/materials/bucket_stone.png b/mods/tinker/textures/items/materials/bucket_stone.png
new file mode 100644
index 00000000..453467dc
Binary files /dev/null and b/mods/tinker/textures/items/materials/bucket_stone.png differ
diff --git a/mods/tinker/textures/items/materials/cast_jewel.png b/mods/tinker/textures/items/materials/cast_jewel.png
new file mode 100644
index 00000000..b3cd5509
Binary files /dev/null and b/mods/tinker/textures/items/materials/cast_jewel.png differ
diff --git a/test/XinStick.java b/test/XinStick.java
index ccb857af..d4d3c683 100644
--- a/test/XinStick.java
+++ b/test/XinStick.java
@@ -1,6 +1,6 @@
package test;
-import mods.tinker.tconstruct.entity.Automaton;
+import mods.tinker.tconstruct.entity.Crystal;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
@@ -35,8 +35,8 @@ public class XinStick extends Item
//if (!world.isRemote)
//MinecraftServer.getServer().getConfigurationManager().transferPlayerToDimension((EntityPlayerMP) player, -7);
//player.travelToDimension(-7);
- Automaton entity = new Automaton(world);
- entity.setOwner(player);
+ Crystal entity = new Crystal(world);
+ //entity.setOwner(player);
//entity.username = "NekoGloop";
spawnEntity(player.posX, player.posY+1, player.posZ, entity, world, player);
//healPlayer(player);