diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang
index 2a76c8882ae..4a2d1063acc 100644
--- a/resources/assets/tinker/lang/en_US.lang
+++ b/resources/assets/tinker/lang/en_US.lang
@@ -1,6 +1,7 @@
itemGroup.TConstructTools=TConstruct Tools
itemGroup.TConstructMaterials=TConstruct Materials
itemGroup.TConstructBlocks=TConstruct Blocks
+itemGroup.TConstructParts=TConstruct Tool Parts
crafters.ToolStation=Tool Station
crafters.ToolForge=Tool Forge
@@ -500,6 +501,7 @@ item.tconstruct.canister.yellow.name=Yellow Heart Canister
item.tconstruct.canister.miniheart.green.name=Miniature Green Heart
item.tconstruct.canister.green.name=Green Heart Canister
item.tconstruct.glove.name=Dirtmover Gloves
+item.tconstruct.modifier.creative.name=Creative Tool Modifier
SearedBlock.Table.name=Casting Table
SearedBlock.Faucet.name=Seared Faucet
@@ -734,4 +736,6 @@ gui.toolstation16=Usage Speed:
gui.toolstation17=Modifiers
gui.toolstation18=Modifiers remaining:
+creativeModLock.tooltip=Target Lock:
+
attribute.generic.ammo.attackDamage=Average Shot Damage
\ No newline at end of file
diff --git a/resources/assets/tinker/manuals/materials.xml b/resources/assets/tinker/manuals/materials.xml
index 87b184f0a4c..03d13fd52e3 100644
--- a/resources/assets/tinker/manuals/materials.xml
+++ b/resources/assets/tinker/manuals/materials.xml
@@ -11,7 +11,6 @@ By Skyla
Table of Contents
-Table of Contents
Tools
ironpick
@@ -1052,6 +1051,22 @@ Stackable: No
tier1free
+
+Additional Modifiers
+Attaching a solid gold apple and encrusting the tool with a block of diamond warps the tool in places you did not notice before.
+
+Effects:
+- Adds an additional modifier slot to the tool
+
+Type: Single-use
+Stackable: No
+
+
+
+tool
+tier1.5free
+
+
Additional Modifiers
Working the tool with a nether star gives it the ability to attach parts they would not otherwise stay.
@@ -1068,4 +1083,21 @@ Stackable: No
tier2free
-
+
+Additional Modifiers
+For the creative types or the map makers in the world, this item is for you.
+
+Effects:
+- Adds an additional modifier slot to the tool
+- If it has a target lock, it will only work on that tool.
+
+Type: Single-use
+Stackable: Yes
+
+
+
+tool
+creativefree
+
+
+
\ No newline at end of file
diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java
index f2e6ac438f7..99f72ef1cff 100644
--- a/src/main/java/tconstruct/TConstruct.java
+++ b/src/main/java/tconstruct/TConstruct.java
@@ -109,6 +109,7 @@ public void preInit (FMLPreInitializationEvent event)
PHConstruct.initProps(event.getSuggestedConfigurationFile());
TConstructRegistry.materialTab = new TabTools("TConstructMaterials");
TConstructRegistry.toolTab = new TabTools("TConstructTools");
+ TConstructRegistry.partTab = new TabTools("TConstructParts");
TConstructRegistry.blockTab = new TabTools("TConstructBlocks");
tableCasting = new LiquidCasting();
diff --git a/src/main/java/tconstruct/blocks/LiquidMetalFinite.java b/src/main/java/tconstruct/blocks/LiquidMetalFinite.java
index 9199df35037..41279fa4904 100644
--- a/src/main/java/tconstruct/blocks/LiquidMetalFinite.java
+++ b/src/main/java/tconstruct/blocks/LiquidMetalFinite.java
@@ -9,10 +9,9 @@
import net.minecraft.world.World;
import net.minecraftforge.fluids.BlockFluidFinite;
import net.minecraftforge.fluids.Fluid;
+import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.library.TConstructRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
public class LiquidMetalFinite extends BlockFluidFinite
{
@@ -41,7 +40,6 @@ public void registerBlockIcons (IIconRegister iconRegister)
}
@Override
- @SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
{
if (side == 0 || side == 1)
@@ -59,7 +57,7 @@ public void onEntityCollidedWithBlock (World par1World, int x, int y, int z, Ent
}
if (!(entity instanceof EntityItem) && !entity.isImmuneToFire())
{
- entity.attackEntityFrom(DamageSource.lava, 4);
+ entity.attackEntityFrom(DamageSource.lava, 4.0F);
entity.setFire(15);
}
}
diff --git a/src/main/java/tconstruct/blocks/SearedBlock.java b/src/main/java/tconstruct/blocks/SearedBlock.java
index b13e5a96609..558a368460e 100644
--- a/src/main/java/tconstruct/blocks/SearedBlock.java
+++ b/src/main/java/tconstruct/blocks/SearedBlock.java
@@ -3,6 +3,7 @@
import java.util.List;
import mantle.blocks.abstracts.InventoryBlock;
+import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
@@ -360,7 +361,8 @@ public boolean canConnectRedstone (IBlockAccess world, int x, int y, int z, int
return world.getBlockMetadata(x, y, z) == 1;
}
- public void onNeighborBlockChange (World world, int x, int y, int z, int neighborBlockID)
+ @Override
+ public void onNeighborBlockChange (World world, int x, int y, int z, Block neighborBlock)
{
if (world.isBlockIndirectlyGettingPowered(x, y, z) && world.getBlockMetadata(x, y, z) == 1)
{
diff --git a/src/main/java/tconstruct/blocks/SmelteryBlock.java b/src/main/java/tconstruct/blocks/SmelteryBlock.java
index 7a9a23eed4b..2ef6c8938c9 100644
--- a/src/main/java/tconstruct/blocks/SmelteryBlock.java
+++ b/src/main/java/tconstruct/blocks/SmelteryBlock.java
@@ -295,9 +295,9 @@ public void getSubBlocks (Item id, CreativeTabs tab, List list)
/* Updating */
@Override
- public void onNeighborBlockChange (World world, int x, int y, int z, Block nBlockID)
+ public void onNeighborBlockChange (World world, int x, int y, int z, Block block)
{
- // System.out.println("Neighbor changed");
+ //System.out.println("Neighbor changed");
TileEntity logic = world.getTileEntity(x, y, z);
if (logic instanceof IServantLogic)
{
diff --git a/src/main/java/tconstruct/blocks/StoneTorch.java b/src/main/java/tconstruct/blocks/StoneTorch.java
index d0d5266560f..ce7a694c88a 100644
--- a/src/main/java/tconstruct/blocks/StoneTorch.java
+++ b/src/main/java/tconstruct/blocks/StoneTorch.java
@@ -89,11 +89,14 @@ private boolean canPlaceTorchOn (World par1World, int par2, int par3, int par4)
* Checks to see if its valid to put this block at the specified
* coordinates. Args: world, x, y, z
*/
- @Override
- public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
+ @Override
+ public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
{
- return par1World.isSideSolid(par2 - 1, par3, par4, EAST, true) || par1World.isSideSolid(par2 + 1, par3, par4, WEST, true) || par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true)
- || par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true) || canPlaceTorchOn(par1World, par2, par3 - 1, par4);
+ return par1World.isSideSolid(par2 - 1, par3, par4, EAST, true) ||
+ par1World.isSideSolid(par2 + 1, par3, par4, WEST, true) ||
+ par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true) ||
+ par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true) ||
+ canPlaceTorchOn(par1World, par2, par3 - 1, par4);
}
/**
@@ -101,34 +104,10 @@ public boolean canPlaceBlockAt (World par1World, int par2, int par3, int par4)
* side, hitX, hitY, hitZ, block metadata
*/
@Override
- public int onBlockPlaced (World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
+ public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
int j1 = par9;
- if (par5 == 0)
- {
- if (this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))
- {
- j1 = 5;
- }
- else if (par1World.isSideSolid(par2, par3, par4 + 1, NORTH, true))
- {
- j1 = 4;
- }
- else if (par1World.isSideSolid(par2, par3, par4 - 1, SOUTH, true))
- {
- j1 = 3;
- }
- else if (par1World.isSideSolid(par2 + 1, par3, par4, WEST, true))
- {
- j1 = 2;
- }
- else if (par1World.isSideSolid(par2 - 1, par3, par4, EAST, true))
- {
- j1 = 1;
- }
- }
-
if (par5 == 1 && this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))
{
j1 = 5;
@@ -156,6 +135,46 @@ else if (par1World.isSideSolid(par2 - 1, par3, par4, EAST, true))
return j1;
}
+
+ public void updateTick(World par1World, int par2, int par3, int par4, Random random)
+ {
+ super.updateTick(par1World, par2, par3, par4, random);
+
+ if (par1World.getBlockMetadata(par2, par3, par4) == 0)
+ {
+ this.onBlockAdded(par1World, par2, par3, par4);
+ }
+ }
+
+ // JAVADOC METHOD $$ func_149726_b
+ public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)
+ {
+ if (p_149726_1_.getBlockMetadata(p_149726_2_, p_149726_3_, p_149726_4_) == 0)
+ {
+ if (p_149726_1_.isSideSolid(p_149726_2_ - 1, p_149726_3_, p_149726_4_, EAST, true))
+ {
+ p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 1, 2);
+ }
+ else if (p_149726_1_.isSideSolid(p_149726_2_ + 1, p_149726_3_, p_149726_4_, WEST, true))
+ {
+ p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 2, 2);
+ }
+ else if (p_149726_1_.isSideSolid(p_149726_2_, p_149726_3_, p_149726_4_ - 1, SOUTH, true))
+ {
+ p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 3, 2);
+ }
+ else if (p_149726_1_.isSideSolid(p_149726_2_, p_149726_3_, p_149726_4_ + 1, NORTH, true))
+ {
+ p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 4, 2);
+ }
+ else if (this.canPlaceTorchOn(p_149726_1_, p_149726_2_, p_149726_3_ - 1, p_149726_4_))
+ {
+ p_149726_1_.setBlockMetadataWithNotify(p_149726_2_, p_149726_3_, p_149726_4_, 5, 2);
+ }
+ }
+
+ this.dropTorchIfCantStay(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);
+ }
@Override
@SideOnly(Side.CLIENT)
@@ -169,12 +188,13 @@ public void registerBlockIcons (IIconRegister par1IconRegister)
* neighbor changed (coordinates passed are their own) Args: x, y, z,
* neighbor blockID
*/
- public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, int par5)
+ @Override
+ public void onNeighborBlockChange (World par1World, int par2, int par3, int par4, Block par5)
{
this.func_94397_d(par1World, par2, par3, par4, par5);
}
-
- protected boolean func_94397_d (World par1World, int par2, int par3, int par4, int par5)
+
+ protected boolean func_94397_d(World par1World, int par2, int par3, int par4, Block par5)
{
if (this.dropTorchIfCantStay(par1World, par2, par3, par4))
{
@@ -209,6 +229,7 @@ protected boolean func_94397_d (World par1World, int par2, int par3, int par4, i
if (flag)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
+ par1World.setBlockToAir(par2, par3, par4);
return true;
}
else
@@ -234,7 +255,8 @@ protected boolean dropTorchIfCantStay (World par1World, int par2, int par3, int
if (par1World.getBlock(par2, par3, par4) == (Block) this)
{
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
- WorldHelper.setBlockToAir(par1World, par2, par3, par4);
+ par1World.setBlockToAir(par2, par3, par4);
+ //WorldHelper.setBlockToAir(par1World, par2, par3, par4);
}
return false;
diff --git a/src/main/java/tconstruct/blocks/TConstructFluid.java b/src/main/java/tconstruct/blocks/TConstructFluid.java
index 67650fc3f3d..2a7487e2f9f 100644
--- a/src/main/java/tconstruct/blocks/TConstructFluid.java
+++ b/src/main/java/tconstruct/blocks/TConstructFluid.java
@@ -6,8 +6,6 @@
import net.minecraftforge.fluids.BlockFluidClassic;
import net.minecraftforge.fluids.Fluid;
import tconstruct.library.TConstructRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
public class TConstructFluid extends BlockFluidClassic
{
@@ -20,7 +18,6 @@ public TConstructFluid(Fluid fluid, Material material, String texture)
{
super(fluid, material);
this.texture = texture;
- // TODO setCreativeTab()
this.setCreativeTab(TConstructRegistry.blockTab);
}
@@ -36,7 +33,6 @@ public int getRenderBlockPass ()
return alpha ? 1 : 0;
}
- // TODO registerBlockIcons
@Override
public void registerBlockIcons (IIconRegister iconRegister)
{
@@ -44,13 +40,11 @@ public void registerBlockIcons (IIconRegister iconRegister)
flowIcon = iconRegister.registerIcon("tinker:" + texture + "_flow");
}
- // TODO getIcon()
@Override
- @SideOnly(Side.CLIENT)
public IIcon getIcon (int side, int meta)
{
if (side == 0 || side == 1)
return stillIcon;
return flowIcon;
}
-}
+}
\ No newline at end of file
diff --git a/src/main/java/tconstruct/blocks/TankAirBlock.java b/src/main/java/tconstruct/blocks/TankAirBlock.java
index 94b0c5d12ab..38e8086fbaf 100644
--- a/src/main/java/tconstruct/blocks/TankAirBlock.java
+++ b/src/main/java/tconstruct/blocks/TankAirBlock.java
@@ -15,6 +15,7 @@
import net.minecraft.util.Vec3;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
+import net.minecraftforge.common.ForgeHooks;
import tconstruct.blocks.logic.TankAirLogic;
import tconstruct.client.block.TankAirRender;
import cpw.mods.fml.relauncher.Side;
@@ -29,7 +30,7 @@ public TankAirBlock(Material material)
}
@Override
- public TileEntity createNewTileEntity (World world, int i)
+ public TileEntity createNewTileEntity (World world, int var2)
{
return new TankAirLogic();
}
diff --git a/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java b/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java
index 21d74ff7219..aef2772057e 100644
--- a/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java
+++ b/src/main/java/tconstruct/blocks/logic/AdaptiveDrainLogic.java
@@ -1,5 +1,7 @@
package tconstruct.blocks.logic;
+import tconstruct.TConstruct;
+import tconstruct.library.crafting.AlloyMix;
import mantle.blocks.abstracts.MultiServantLogic;
import mantle.blocks.iface.IFacingLogic;
import mantle.blocks.iface.IMasterLogic;
@@ -20,7 +22,6 @@ public class AdaptiveDrainLogic extends MultiServantLogic implements IFluidHandl
{
byte direction;
- @Override
public boolean canUpdate ()
{
return false;
@@ -51,7 +52,7 @@ public FluidStack drain (ForgeDirection from, int maxDrain, boolean doDrain)
if (hasValidMaster() && canDrain(from, null))
{
AdaptiveSmelteryLogic smeltery = (AdaptiveSmelteryLogic) worldObj.getTileEntity(getMasterPosition().x, getMasterPosition().y, getMasterPosition().z);
- // TConstruct.logger.info("Found master");
+ // TConstruct.logger.info("Found master");
return smeltery.drain(from, maxDrain, doDrain);
}
return null;
@@ -150,7 +151,6 @@ else if (pitch < -45)
}
}
- @Override
public void readFromNBT (NBTTagCompound tags)
{
super.readFromNBT(tags);
@@ -176,7 +176,7 @@ public Packet getDescriptionPacket ()
@Override
public void onDataPacket (NetworkManager net, S35PacketUpdateTileEntity packet)
{
- worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord);
readFromNBT(packet.func_148857_g());
+ worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord);
}
}
\ No newline at end of file
diff --git a/src/main/java/tconstruct/blocks/logic/BattlesignLogic.java b/src/main/java/tconstruct/blocks/logic/BattlesignLogic.java
new file mode 100644
index 00000000000..644be4d1712
--- /dev/null
+++ b/src/main/java/tconstruct/blocks/logic/BattlesignLogic.java
@@ -0,0 +1,70 @@
+package tconstruct.blocks.logic;
+
+import tconstruct.inventory.FrypanContainer;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemFood;
+import net.minecraft.item.ItemHoe;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemSword;
+import net.minecraft.item.ItemTool;
+import net.minecraft.item.crafting.FurnaceRecipes;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+import cpw.mods.fml.common.registry.GameRegistry;
+
+/* Slots
+ * 0: Battlesign item
+ */
+
+public class BattlesignLogic extends EquipLogic
+{
+
+ public BattlesignLogic()
+ {
+ super(1);
+ }
+
+ @Override
+ public String getDefaultName ()
+ {
+ return "decoration.battlesign";
+ }
+
+ /* NBT */
+ public void readFromNBT (NBTTagCompound tags)
+ {
+ super.readFromNBT(tags);
+ }
+
+ public void writeToNBT (NBTTagCompound tags)
+ {
+ super.writeToNBT(tags);
+ }
+
+ @Override
+ public Container getGuiContainer (InventoryPlayer inventoryplayer, World world, int x, int y, int z)
+ {
+ return null; //Not a normal gui block
+ }
+
+ @Override
+ public String getInventoryName()
+ {
+ return null;
+ }
+
+ @Override
+ public void openInventory()
+ {
+ }
+
+ @Override
+ public void closeInventory()
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/tconstruct/blocks/logic/FaucetLogic.java b/src/main/java/tconstruct/blocks/logic/FaucetLogic.java
index 85e915a7ade..00fd16ae647 100644
--- a/src/main/java/tconstruct/blocks/logic/FaucetLogic.java
+++ b/src/main/java/tconstruct/blocks/logic/FaucetLogic.java
@@ -1,5 +1,6 @@
package tconstruct.blocks.logic;
+import tconstruct.TConstruct;
import mantle.blocks.iface.IActiveLogic;
import mantle.blocks.iface.IFacingLogic;
import net.minecraft.entity.EntityLivingBase;
@@ -14,7 +15,6 @@
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
-import tconstruct.TConstruct;
public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogic, IFluidHandler
{
@@ -103,7 +103,7 @@ public ForgeDirection getForgeDirection ()
@Override
public void setDirection (int side)
{
- // direction = (byte) side;
+ //direction = (byte) side;
}
@Override
diff --git a/src/main/java/tconstruct/client/TProxyClient.java b/src/main/java/tconstruct/client/TProxyClient.java
index d67be1861fd..f0a787d1fcf 100644
--- a/src/main/java/tconstruct/client/TProxyClient.java
+++ b/src/main/java/tconstruct/client/TProxyClient.java
@@ -644,7 +644,9 @@ public void initManualRecipes ()
TConstructClientRegistry.registerManualModifier("fluxmod2", ironpick.copy(), new ItemStack(Blocks.dirt));
TConstructClientRegistry.registerManualModifier("tier1free", ironpick.copy(), new ItemStack(Items.diamond), new ItemStack(Blocks.gold_block));
+ TConstructClientRegistry.registerManualModifier("tier1.5free", ironpick.copy(), new ItemStack(Items.golden_apple, 1, 1), new ItemStack(Blocks.diamond_block));
TConstructClientRegistry.registerManualModifier("tier2free", ironpick.copy(), new ItemStack(Items.nether_star));
+ TConstructClientRegistry.registerManualModifier("creativefree", ironpick.copy(), new ItemStack(TRepo.creativeModifier));
TConstructClientRegistry.registerManualSmeltery("brownstone", new ItemStack(TRepo.speedBlock), new ItemStack(TRepo.moltenTin, 1), new ItemStack(Blocks.gravel));
TConstructClientRegistry.registerManualSmeltery("clearglass", new ItemStack(TRepo.clearGlass), new ItemStack(TRepo.moltenGlass, 1), null);
@@ -733,7 +735,7 @@ public static Document getManualFromStack (ItemStack stack)
"The Dagger is a short blade that can be thrown.\n\nSpecial Ability:\n- Throw Item\n\nDamage: Low\nDurability: Moderate\n\nRequired parts:\n- Knife Blade\n- Crossbar\n- Handle",
"The Frying is a heavy weapon that uses sheer weight to stun foes.\n\nSpecial Ability: Block\nNatural Ability: Heavy\nShift+rClick: Place Frying Pan\nDamage: Low\nDurability: High\n\nRequired parts:\n- Pan\n- Handle",
// "The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nShift-rClick: Place sign\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Board\n- Handle"
- "The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Sign Board\n- Handle",
+ "The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability:\nDamage Reflector\n\nNatural Ability: Writable\n\nDamage: Low\nDurability: Average",
"The Chisel is a utility tool that carves shapes into blocks.\n\nCrafting Grid:\n- Shape Items\nSpecial Ability: Chisel\nDurability: Average\n\nRequired parts:\n- Chisel Head\n- Handle" };
void addToolButtons ()
diff --git a/src/main/java/tconstruct/common/TContent.java b/src/main/java/tconstruct/common/TContent.java
index 90dc3776224..9b886c97ad3 100644
--- a/src/main/java/tconstruct/common/TContent.java
+++ b/src/main/java/tconstruct/common/TContent.java
@@ -84,6 +84,7 @@
import tconstruct.entity.projectile.DaggerEntity;
import tconstruct.entity.projectile.LaunchedPotion;
import tconstruct.items.Bowstring;
+import tconstruct.items.CreativeModifier;
import tconstruct.items.DiamondApple;
import tconstruct.items.FilledBucket;
import tconstruct.items.Fletching;
@@ -184,6 +185,10 @@ void registerBlocks ()
TRepo.furnaceSlab = new FurnaceSlab(Material.rock).setBlockName("FurnaceSlab");
TRepo.heldItemBlock = new EquipBlock(Material.wood).setBlockName("Frypan");
+
+ /* battlesignBlock = new BattlesignBlock(PHConstruct.battlesignBlock).setUnlocalizedName("Battlesign");
+ GameRegistry.registerBlock(battlesignBlock, "BattlesignBlock");
+ ameRegistry.registerTileEntity(BattlesignLogic.class, "BattlesignLogic");*/
TRepo.craftedSoil = new SoilBlock().setLightOpacity(0).setBlockName("TConstruct.Soil");
TRepo.craftedSoil.stepSound = Block.soundTypeGravel;
@@ -681,6 +686,9 @@ void registerItems ()
// GameRegistry.registerItem(TRepo.glove, "glove");
GameRegistry.registerItem(TRepo.knapsack, "knapsack");
GameRegistry.registerItem(TRepo.goldHead, "goldHead");
+
+ TRepo.creativeModifier = new CreativeModifier().setUnlocalizedName("tconstruct.modifier.creative");
+ GameRegistry.registerItem(TRepo.creativeModifier, "creativeModifier");
LiquidCasting basinCasting = TConstruct.getBasinCasting();
TRepo.materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] { 1, 2, 2, 1 }, 3);
@@ -725,7 +733,6 @@ void registerItems ()
// Vanilla stack sizes
Items.wooden_door.setMaxStackSize(16);
Items.iron_door.setMaxStackSize(16);
- Items.snowball.setMaxStackSize(64);
Items.boat.setMaxStackSize(16);
Items.minecart.setMaxStackSize(3);
// Items.minecartEmpty.setMaxStackSize(3);
@@ -877,6 +884,8 @@ void addCraftingRecipes ()
void setupToolTabs ()
{
TConstructRegistry.materialTab.init(new ItemStack(TRepo.titleIcon, 1, 255));
+ TConstructRegistry.materialTab.init(new ItemStack(TRepo.manualBook, 1, 0));
+ TConstructRegistry.partTab.init(new ItemStack(TRepo.titleIcon, 1, 255));
TConstructRegistry.blockTab.init(new ItemStack(TRepo.toolStationWood));
ItemStack tool = new ItemStack(TRepo.longsword, 1, 0);
diff --git a/src/main/java/tconstruct/common/TRecipes.java b/src/main/java/tconstruct/common/TRecipes.java
index 84a911526a7..93f215b490e 100644
--- a/src/main/java/tconstruct/common/TRecipes.java
+++ b/src/main/java/tconstruct/common/TRecipes.java
@@ -99,6 +99,7 @@
import tconstruct.modifiers.tools.ModAutoSmelt;
import tconstruct.modifiers.tools.ModBlaze;
import tconstruct.modifiers.tools.ModButtertouch;
+import tconstruct.modifiers.tools.ModCreativeToolModifier;
import tconstruct.modifiers.tools.ModDurability;
import tconstruct.modifiers.tools.ModExtraModifier;
import tconstruct.modifiers.tools.ModFlux;
@@ -374,6 +375,7 @@ protected static void addRecipesForToolBuilder ()
tb.registerToolMod(new ModExtraModifier(new ItemStack[] { diamond, new ItemStack(Blocks.gold_block) }, "Tier1Free"));
tb.registerToolMod(new ModExtraModifier(new ItemStack[] { new ItemStack(Blocks.diamond_block), new ItemStack(Items.golden_apple, 1, 1) }, "Tier1.5Free"));
tb.registerToolMod(new ModExtraModifier(new ItemStack[] { new ItemStack(Items.nether_star) }, "Tier2Free"));
+ tb.registerToolMod(new ModCreativeToolModifier(new ItemStack[] { new ItemStack(TRepo.creativeModifier) }));
ItemStack silkyJewel = new ItemStack(TRepo.materials, 1, 26);
tb.registerToolMod(new ModButtertouch(new ItemStack[] { silkyJewel }, 12));
@@ -675,7 +677,7 @@ protected static void addRecipesForCraftingTable ()
GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 2), patBlock, '#', new ItemStack(TRepo.materials, 1, 5)); // Manyullyn
GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 8), patBlock, '#', new ItemStack(TRepo.materials, 1, 15)); // Alumite
GameRegistry.addRecipe(new ItemStack(TRepo.metalBlock, 1, 9), patBlock, '#', new ItemStack(TRepo.materials, 1, 16)); // Steel
- GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), patBlock, '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum raw ->
+ GameRegistry.addRecipe(new ItemStack(TRepo.materials, 1, 11), "#", '#', new ItemStack(TRepo.materials, 1, 12)); // Aluminum raw ->
// ingot
GameRegistry.addRecipe(new ItemStack(TRepo.materials, 9, 9), "m", 'm', new ItemStack(TRepo.metalBlock, 1, 3)); // Copper
@@ -794,8 +796,7 @@ protected static void addRecipesForCraftingTable ()
GameRegistry.addRecipe(new ItemStack(TRepo.diamondApple), " d ", "d#d", " d ", 'd', new ItemStack(Items.diamond), '#', new ItemStack(Items.apple));
GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.diamondApple), new ItemStack(TRepo.materials, 1, 8), new ItemStack(TRepo.heartCanister, 1, 0),
new ItemStack(TRepo.heartCanister, 1, 1));
- GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 4), new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.heartCanister, 1, 3), new ItemStack(Items.golden_apple,
- 1, 1));
+ GameRegistry.addShapelessRecipe(new ItemStack(TRepo.heartCanister, 1, 4), new ItemStack(TRepo.heartCanister, 1, 2), new ItemStack(TRepo.heartCanister, 1, 3), new ItemStack(Items.golden_apple, 1, 1));
//GameRegistry.addShapelessRecipe(new ItemStack(heartCanister, 1, 6), new ItemStack(heartCanister, 1, 0), new ItemStack(heartCanister, 1, 4), new ItemStack(heartCanister, 1, 5));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(TRepo.knapsack, 1, 0), "###", "rmr", "###", '#', new ItemStack(Items.leather), 'r', new ItemStack(TRepo.toughRod, 1, 2), 'm',
diff --git a/src/main/java/tconstruct/common/TRepo.java b/src/main/java/tconstruct/common/TRepo.java
index 7d6c952a092..739ad54d426 100644
--- a/src/main/java/tconstruct/common/TRepo.java
+++ b/src/main/java/tconstruct/common/TRepo.java
@@ -106,6 +106,7 @@ public class TRepo
public static Block furnaceSlab;
public static Block heldItemBlock;
+ public static Block battlesignBlock;
public static Block craftedSoil;
public static Block smeltery;
@@ -238,6 +239,8 @@ public class TRepo
public static ModFlux modFlux;
public static ModLapis modLapis;
public static ModAttack modAttack;
+
+ public static Item creativeModifier;
// Wearables
public static Item heavyHelmet;
diff --git a/src/main/java/tconstruct/entity/FancyEntityItem.java b/src/main/java/tconstruct/entity/FancyEntityItem.java
index b45687752ae..4dbddee8c7d 100644
--- a/src/main/java/tconstruct/entity/FancyEntityItem.java
+++ b/src/main/java/tconstruct/entity/FancyEntityItem.java
@@ -1,7 +1,9 @@
package tconstruct.entity;
+import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.DamageSource;
import net.minecraft.world.World;
public class FancyEntityItem extends EntityItem
@@ -9,6 +11,8 @@ public class FancyEntityItem extends EntityItem
public FancyEntityItem(World par1World, double par2, double par4, double par6)
{
super(par1World, par2, par4, par6);
+ this.isImmuneToFire = true;
+ this.lifespan = 72000;
}
public FancyEntityItem(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
@@ -21,5 +25,24 @@ public FancyEntityItem(World par1World, double par2, double par4, double par6, I
public FancyEntityItem(World par1World)
{
super(par1World);
+ this.isImmuneToFire = true;
+ this.lifespan = 72000;
+ }
+
+ public FancyEntityItem(World world, Entity original, ItemStack stack)
+ {
+ this(world, original.posX, original.posY, original.posZ);
+ this.delayBeforeCanPickup = 20;
+ this.motionX = original.motionX;
+ this.motionY = original.motionY;
+ this.motionZ = original.motionZ;
+ this.setEntityItemStack(stack);
+ }
+
+ public boolean attackEntityFrom (DamageSource par1DamageSource, float par2)
+ {
+ if (par1DamageSource.getDamageType().equals("outOfWorld"))
+ return true;
+ return false;
}
}
diff --git a/src/main/java/tconstruct/entity/Skyla.java b/src/main/java/tconstruct/entity/Skyla.java
deleted file mode 100644
index ee5886944c0..00000000000
--- a/src/main/java/tconstruct/entity/Skyla.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package tconstruct.entity;
-
-import net.minecraft.entity.monster.EntityCreeper;
-import net.minecraft.world.World;
-
-public class Skyla extends EntityCreeper
-{
-
- public Skyla(World par1World)
- {
- super(par1World);
- // username = "Skyla";
- // texture = "/mods/tinker/textures/mob/skyla.png";
- }
-
- /*
- * @Override public void sendChatToPlayer (String var1) {}
- *
- * @Override public boolean canCommandSenderUseCommand (int var1, String
- * var2) { return false; }
- *
- * @Override public ChunkCoordinates getPlayerCoordinates () { return null;
- * }
- */
-
-}
diff --git a/src/main/java/tconstruct/items/CreativeModifier.java b/src/main/java/tconstruct/items/CreativeModifier.java
new file mode 100644
index 00000000000..19e5047b56b
--- /dev/null
+++ b/src/main/java/tconstruct/items/CreativeModifier.java
@@ -0,0 +1,67 @@
+package tconstruct.items;
+
+import java.util.List;
+
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.util.StatCollector;
+import tconstruct.library.TConstructRegistry;
+import tconstruct.library.crafting.ToolBuilder;
+import tconstruct.library.crafting.ToolRecipe;
+import tconstruct.library.tools.ToolCore;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
+public class CreativeModifier extends Item
+{
+
+ public CreativeModifier()
+ {
+ super();
+ this.setCreativeTab(TConstructRegistry.materialTab);
+ }
+
+ @SideOnly(Side.CLIENT)
+ /**
+ * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
+ */
+ @Override
+ public void getSubItems (Item par1, CreativeTabs par2CreativeTabs, List par3List)
+ {
+ par3List.add(new ItemStack(par1, 1, 0));
+
+ for (ToolRecipe recipe : ToolBuilder.instance.combos)
+ {
+ ToolCore tool = recipe.getType();
+ ItemStack item = new ItemStack(par1, 1, 0);
+ NBTTagCompound compound = new NBTTagCompound();
+ compound.setString("TargetLock", tool.getToolName());
+
+ item.setTagCompound(compound);
+ par3List.add(item);
+ }
+ }
+
+ @SideOnly(Side.CLIENT)
+ @Override
+ public void registerIcons (IIconRegister iconRegister)
+ {
+ this.itemIcon = iconRegister.registerIcon("tinker:skull_char_gold");
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void addInformation (ItemStack stack, EntityPlayer player, List list, boolean par4)
+ {
+ if (stack.hasTagCompound())
+ {
+ String targetLock = "None";
+ targetLock = stack.getTagCompound().getString("TargetLock");
+ list.add(StatCollector.translateToLocal("creativeModLock.tooltip") + targetLock);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/tconstruct/items/ToolPart.java b/src/main/java/tconstruct/items/ToolPart.java
index fd746bfcbed..53f8e7debed 100644
--- a/src/main/java/tconstruct/items/ToolPart.java
+++ b/src/main/java/tconstruct/items/ToolPart.java
@@ -18,6 +18,7 @@ public class ToolPart extends CraftingItem implements IToolPart
public ToolPart(String textureType, String name)
{
super(toolMaterialNames, buildTextureNames(textureType), "parts/", "tinker", TConstructRegistry.materialTab);
+ this.setCreativeTab(TConstructRegistry.partTab);
this.setHasSubtypes(true);
this.setMaxDamage(0);
this.partName = name;
diff --git a/src/main/java/tconstruct/library/TConstructRegistry.java b/src/main/java/tconstruct/library/TConstructRegistry.java
index a33c9f88450..7e5f0f0472c 100644
--- a/src/main/java/tconstruct/library/TConstructRegistry.java
+++ b/src/main/java/tconstruct/library/TConstructRegistry.java
@@ -38,6 +38,7 @@ public class TConstructRegistry
/* Creative tabs */
public static TabTools toolTab;
+ public static TabTools partTab;
public static TabTools materialTab;
public static TabTools blockTab;
diff --git a/src/main/java/tconstruct/library/tools/ToolCore.java b/src/main/java/tconstruct/library/tools/ToolCore.java
index 4087acb002e..f60b57ea0bd 100644
--- a/src/main/java/tconstruct/library/tools/ToolCore.java
+++ b/src/main/java/tconstruct/library/tools/ToolCore.java
@@ -22,6 +22,7 @@
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
+import tconstruct.entity.FancyEntityItem;
import tconstruct.library.ActiveToolMod;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.crafting.ToolBuilder;
@@ -57,8 +58,8 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem
{
// TE power constants -- TODO grab these from the items added
protected int capacity = 400000;
- protected int maxReceive = 80;
- protected int maxExtract = 80;
+ protected int maxReceive = 2000;
+ protected int maxExtract = 2000;
protected Random random = new Random();
protected int damageVsEntity;
@@ -777,6 +778,17 @@ public int getItemDamageFromStackForDisplay (ItemStack stack)
}
return tags.getCompoundTag("InfiTool").getInteger("Damage");
}
+
+ /* Prevent tools from dying */
+ public boolean hasCustomEntity (ItemStack stack)
+ {
+ return true;
+ }
+
+ public Entity createEntity (World world, Entity location, ItemStack itemstack)
+ {
+ return new FancyEntityItem(world, location, itemstack);
+ }
// TE support section -- from COFH core API reference section
public void setMaxTransfer (int maxTransfer)
diff --git a/src/main/java/tconstruct/modifiers/tools/ModCreativeToolModifier.java b/src/main/java/tconstruct/modifiers/tools/ModCreativeToolModifier.java
new file mode 100644
index 00000000000..233895b02c2
--- /dev/null
+++ b/src/main/java/tconstruct/modifiers/tools/ModCreativeToolModifier.java
@@ -0,0 +1,43 @@
+package tconstruct.modifiers.tools;
+
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import tconstruct.library.tools.ToolCore;
+import tconstruct.library.tools.ToolMod;
+
+public class ModCreativeToolModifier extends ToolMod
+{
+ public ModCreativeToolModifier(ItemStack[] items)
+ {
+ super(items, 0, "");
+ }
+
+ @Override
+ protected boolean canModify (ItemStack tool, ItemStack[] input)
+ {
+ ToolCore toolItem = (ToolCore) tool.getItem();
+ for (ItemStack stack : input)
+ {
+ if (stack != null && stack.hasTagCompound())
+ {
+ String targetLock = stack.getTagCompound().getString("TargetLock");
+ if (!targetLock.equals("") && !targetLock.equals(toolItem.getToolName()))
+ return false;
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public void modify (ItemStack[] input, ItemStack tool)
+ {
+ NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
+ int modifiers = tags.getInteger("Modifiers");
+ modifiers += 1;
+ tags.setInteger("Modifiers", modifiers);
+ }
+
+ public void addMatchingEffect (ItemStack tool)
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/tconstruct/util/TEventHandler.java b/src/main/java/tconstruct/util/TEventHandler.java
index 6a354be3895..6b9e57364c2 100644
--- a/src/main/java/tconstruct/util/TEventHandler.java
+++ b/src/main/java/tconstruct/util/TEventHandler.java
@@ -23,17 +23,23 @@
import net.minecraft.entity.passive.EntityChicken;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.DamageSource;
+import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
+import net.minecraft.util.Vec3;
import net.minecraft.world.GameRules;
import net.minecraft.world.World;
+import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
@@ -162,6 +168,13 @@ else if (thaum >= 1)
event.overrideResult(arrow);
}
}
+
+ if (event.tool == TRepo.battlesign)
+ {
+ int modifiers = toolTag.getInteger("Modifiers");
+ modifiers += 1;
+ toolTag.setInteger("Modifiers", modifiers);
+ }
}
private boolean allowCrafting (int head, int handle, int accessory)
@@ -240,14 +253,95 @@ public static boolean matchesLeaves (ItemStack stack)
@SubscribeEvent
public void onHurt (LivingHurtEvent event)
{
- if (event.entityLiving instanceof EntityPlayer)
+ EntityLivingBase reciever = event.entityLiving;
+ if (reciever instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entityLiving;
// Cutlass
ItemStack stack = player.getCurrentEquippedItem();
- if (stack != null && stack.getItem() == TRepo.cutlass && player.isUsingItem())
+ if (stack != null && player.isUsingItem())
{
- player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 3 * 20, 1));
+ Item item = stack.getItem();
+ if (item == TRepo.cutlass)
+ {
+ player.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 3 * 20, 1));
+ }
+ else if (item == TRepo.battlesign)
+ {
+ event.ammount *= 1.5; //Puts battlesign blocking at 3/4 instead of 1/2
+ }
+ }
+ }
+ else if (reciever instanceof EntityCreeper)
+ {
+ Entity attacker = event.source.getEntity();
+ if (attacker instanceof EntityLivingBase)
+ {
+ Entity target = ((EntityCreeper) reciever).getAttackTarget();
+ if (target != null)
+ {
+ float d1 = reciever.getDistanceToEntity(((EntityCreeper) reciever).getAttackTarget());
+ float d2 = reciever.getDistanceToEntity(attacker);
+ if (d2 < d1)
+ {
+ ((EntityCreeper) event.entityLiving).setAttackTarget((EntityLivingBase) event.source.getEntity());
+ }
+ }
+ }
+ }
+ }
+
+ @SubscribeEvent
+ public void onAttack (LivingAttackEvent event)
+ {
+ //System.out.println("Damage: "+event.ammount);
+ if (event.entityLiving instanceof EntityPlayer)
+ {
+ EntityPlayer player = (EntityPlayer) event.entityLiving;
+ //Cutlass
+ ItemStack stack = player.getCurrentEquippedItem();
+ if (stack != null && stack.getItem() == TRepo.battlesign && player.isUsingItem())
+ {
+ DamageSource source = event.source;
+ if (!source.isUnblockable() && !source.isMagicDamage() && !source.isExplosion())
+ {
+ if (source instanceof EntityDamageSourceIndirect)
+ {
+ if (random.nextInt(3) == 0)
+ {
+ Entity attacker = source.getEntity();
+ Entity projectile = ((EntityDamageSourceIndirect) source).getSourceOfDamage();
+ projectile.motionX *= -1;
+ projectile.motionZ *= -1;
+ projectile.setDead();
+ event.setCanceled(true);
+
+ if (projectile.getClass() == EntityArrow.class && !player.worldObj.isRemote)
+ {
+ EntityArrow reflection = null;
+ if (attacker instanceof EntityLivingBase)
+ reflection = new EntityArrow(player.worldObj, (EntityLivingBase) attacker, 0);
+ else
+ reflection = new EntityArrow(player.worldObj, player, 0);
+
+ Vec3 look = player.getLookVec();
+ reflection.posX = projectile.posX;
+ reflection.posY = projectile.posY;
+ reflection.posZ = projectile.posZ;
+ reflection.motionX = (projectile.motionX + (look.xCoord * 8)) / 6;
+ reflection.motionY = (projectile.motionY + (look.yCoord * 8)) / 6;
+ reflection.motionZ = (projectile.motionZ + (look.zCoord * 8)) / 6;
+ reflection.damage = ((EntityArrow) projectile).damage;
+ player.worldObj.spawnEntityInWorld(reflection);
+ }
+ }
+ }
+ else
+ {
+ Entity attacker = source.getEntity();
+ attacker.attackEntityFrom(DamageSource.causeThornsDamage(player), event.ammount);
+ }
+ }
}
}
}
diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java
index 6ac6bcf0506..a5c582bdba8 100644
--- a/src/main/java/tconstruct/util/config/PHConstruct.java
+++ b/src/main/java/tconstruct/util/config/PHConstruct.java
@@ -40,6 +40,7 @@ public static void initProps (File confFile)
vanillaMetalBlocks = config.get("Difficulty Changes", "Craft vanilla metal blocks", true).getBoolean(true);
lavaFortuneInteraction = config.get("Difficulty Changes", "Enable Auto-Smelt and Fortune interaction", true).getBoolean(true);
removeVanillaToolRecipes = config.get("Difficulty Changes", "Remove Vanilla Tool Recipes", false).getBoolean(false);
+ labotimizeVanillaTools = config.get("Difficulty Changes", "Remove Vanilla Tool Effectiveness", false).getBoolean(false);
stencilTableCrafting = config.get("Difficulty Changes", "Craft Stencil Tables", true).getBoolean(true);
miningLevelIncrease = config.get("Difficulty Changes", "Modifiers increase Mining Level", true).getBoolean(true);
denyMattock = config.get("Difficulty Changes", "Deny creation of non-metal mattocks", false).getBoolean(false);
@@ -273,6 +274,7 @@ public static void initProps (File confFile)
public static boolean craftMetalTools;
public static boolean vanillaMetalBlocks;
public static boolean removeVanillaToolRecipes;
+ public static boolean labotimizeVanillaTools;
public static boolean stencilTableCrafting;
public static boolean miningLevelIncrease;
public static boolean denyMattock;
diff --git a/src/main/java/tconstruct/util/player/TPlayerHandler.java b/src/main/java/tconstruct/util/player/TPlayerHandler.java
index 31e87dcaed5..41909eb4d4c 100644
--- a/src/main/java/tconstruct/util/player/TPlayerHandler.java
+++ b/src/main/java/tconstruct/util/player/TPlayerHandler.java
@@ -18,6 +18,7 @@
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
import net.minecraftforge.event.entity.player.PlayerDropsEvent;
+import tconstruct.common.TContent;
import tconstruct.common.TRepo;
import tconstruct.library.tools.AbilityHelper;
import tconstruct.util.config.PHConstruct;
@@ -70,6 +71,8 @@ public void onPlayerLogin (EntityPlayer entityplayer)
stats.level = entityplayer.experienceLevel;
stats.hunger = entityplayer.getFoodStats().getFoodLevel();
+
+ //stats.battlesignBonus = tags.getCompoundTag("TConstruct").getBoolean("battlesignBonus");
// gamerule naturalRegeneration false
if (!PHConstruct.enableHealthRegen)
@@ -77,6 +80,7 @@ public void onPlayerLogin (EntityPlayer entityplayer)
if (!stats.beginnerManual)
{
stats.beginnerManual = true;
+ stats.battlesignBonus = true;
if (PHConstruct.beginnerBook)
{
ItemStack diary = new ItemStack(TRepo.manualBook);
@@ -116,6 +120,34 @@ public void onPlayerLogin (EntityPlayer entityplayer)
AbilityHelper.spawnItemAtPlayer(entityplayer, pattern);
}
+ if (entityplayer.getDisplayName().toLowerCase().equals("zisteau"))
+ {
+ spawnPigmanModifier(entityplayer);
+ }
+ }
+ else
+ {
+ if (!stats.battlesignBonus)
+ {
+ stats.battlesignBonus = true;
+ ItemStack modifier = new ItemStack(TRepo.creativeModifier);
+
+ NBTTagCompound compound = new NBTTagCompound();
+ compound.setTag("display", new NBTTagCompound());
+ NBTTagList list = new NBTTagList();
+ list.appendTag(new NBTTagString("Battlesigns were buffed recently."));
+ list.appendTag(new NBTTagString("This might make up for it."));
+ compound.getCompoundTag("display").setTag("Lore", list);
+ compound.setString("TargetLock", TRepo.battlesign.getToolName());
+ modifier.setTagCompound(compound);
+
+ AbilityHelper.spawnItemAtPlayer(entityplayer, modifier);
+
+ if (entityplayer.getDisplayName().toLowerCase().equals("zisteau"))
+ {
+ spawnPigmanModifier(entityplayer);
+ }
+ }
}
if (PHConstruct.gregtech && Loader.isModLoaded("GregTech-Addon"))
@@ -129,6 +161,23 @@ public void onPlayerLogin (EntityPlayer entityplayer)
}
}
}
+
+ void spawnPigmanModifier(EntityPlayer entityplayer)
+ {
+ ItemStack modifier = new ItemStack(TRepo.creativeModifier);
+
+ NBTTagCompound compound = new NBTTagCompound();
+ compound.setTag("display", new NBTTagCompound());
+ compound.getCompoundTag("display").setString("Name", "Zistonian Bonus Modifier");
+ NBTTagList list = new NBTTagList();
+ list.appendTag(new NBTTagString("Zombie Pigmen seem to have a natural affinty"));
+ list.appendTag(new NBTTagString("for these types of weapons."));
+ compound.getCompoundTag("display").setTag("Lore", list);
+ compound.setString("TargetLock", TRepo.battlesign.getToolName());
+ modifier.setTagCompound(compound);
+
+ AbilityHelper.spawnItemAtPlayer(entityplayer, modifier);
+ }
public void onPlayerRespawn (EntityPlayer entityplayer)
{
diff --git a/src/main/java/tconstruct/util/player/TPlayerStats.java b/src/main/java/tconstruct/util/player/TPlayerStats.java
index 692c293439c..a22b1dd07f5 100644
--- a/src/main/java/tconstruct/util/player/TPlayerStats.java
+++ b/src/main/java/tconstruct/util/player/TPlayerStats.java
@@ -20,6 +20,7 @@ public class TPlayerStats implements IExtendedEntityProperties
public boolean beginnerManual;
public boolean materialManual;
public boolean smelteryManual;
+ public boolean battlesignBonus;
public ArmorExtended armor;
public KnapsackInventory knapsack;
@@ -47,6 +48,7 @@ public void saveNBTData(NBTTagCompound compound)
tTag.setBoolean("beginnerManual", this.beginnerManual);
tTag.setBoolean("materialManual", this.materialManual);
tTag.setBoolean("smelteryManual", this.smelteryManual);
+ tTag.setBoolean("battlesignBonus", this.battlesignBonus);
compound.setTag(PROP_NAME, tTag);
}
@@ -60,6 +62,7 @@ public void loadNBTData(NBTTagCompound compound)
this.beginnerManual = properties.getBoolean("beginnerManual");
this.materialManual = properties.getBoolean("materialManual");
this.smelteryManual = properties.getBoolean("smelteryManual");
+ this.battlesignBonus = properties.getBoolean("battlesignBonus");
}
@Override