Daggers
@ -2,39 +2,53 @@ package mods.tinker.common;
|
||||
|
||||
public class CoordTuple
|
||||
{
|
||||
public final int x;
|
||||
public final int y;
|
||||
public final int z;
|
||||
|
||||
public CoordTuple(int posX, int posY, int posZ)
|
||||
{
|
||||
x = posX;
|
||||
y = posY;
|
||||
z = posZ;
|
||||
}
|
||||
|
||||
public boolean equals(CoordTuple coord)
|
||||
{
|
||||
if (coord == null)
|
||||
return false;
|
||||
else if (coord == this)
|
||||
return true;
|
||||
else if (coord.x == this.x && coord.y == this.y && coord.z == this.z)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean equals(int posX, int posY, int posZ)
|
||||
{
|
||||
if (this.x == posX && this.y == posY && this.z == posZ)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
return "X: "+x+", Y: "+y+", Z: "+z;
|
||||
}
|
||||
public final int x;
|
||||
public final int y;
|
||||
public final int z;
|
||||
|
||||
public CoordTuple(int posX, int posY, int posZ)
|
||||
{
|
||||
x = posX;
|
||||
y = posY;
|
||||
z = posZ;
|
||||
}
|
||||
|
||||
public boolean equalCoords (int posX, int posY, int posZ)
|
||||
{
|
||||
if (this.x == posX && this.y == posY && this.z == posZ)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
if(getClass() == obj.getClass())
|
||||
{
|
||||
CoordTuple coord = (CoordTuple)obj;
|
||||
if(this.x == coord.x && this.y == coord.y && this.z == coord.z)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode ()
|
||||
{
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + x;
|
||||
result = prime * result + y;
|
||||
result = prime * result + z;
|
||||
return result;
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return "X: " + x + ", Y: " + y + ", Z: " + z;
|
||||
}
|
||||
}
|
||||
|
@ -182,6 +182,28 @@ Class: Melee Weapon</text>
|
||||
</item>
|
||||
</page>
|
||||
|
||||
<page type="toolpage">
|
||||
<title>Dagger</title>
|
||||
<text>The Dagger is a short weapon. It is light and usable as both a striking and throwing weapon.</text>
|
||||
<text>Right-click: Throw Dagger
|
||||
- Toss the item for a ranged attack
|
||||
|
||||
Class: Ranged/Melee Weapon</text>
|
||||
<icon>daggerIcon</icon>
|
||||
<item>
|
||||
<text>Knife Blade</text>
|
||||
<icon>knifeblade</icon>
|
||||
</item>
|
||||
<item>
|
||||
<text>Tool Rod</text>
|
||||
<icon>toolrod</icon>
|
||||
</item>
|
||||
<item>
|
||||
<text>Crossbar</text>
|
||||
<icon>crossbar</icon>
|
||||
</item>
|
||||
</page>
|
||||
|
||||
<page type="toolpage">
|
||||
<title>Frying Pan</title>
|
||||
<text>The Frying is a heavy weapon that uses sheer weight to stun foes or a place to cook your food. It is common to hunt pigs and cook them with the same pan.</text>
|
||||
@ -237,6 +259,9 @@ Class: Lethal Joke Weapon</text>
|
||||
- Awareness: Unknown</text>
|
||||
</page>
|
||||
|
||||
<page type="blank">
|
||||
</page>
|
||||
|
||||
<page type="materialstats">
|
||||
<title>Wood</title>
|
||||
<icon>woodaxe</icon>
|
||||
|
@ -107,6 +107,7 @@ public class PHConstruct
|
||||
signHead = config.getItem("Tool Parts", "Sign Head", 14036).getInt(14036);
|
||||
|
||||
lumberHead = config.getItem("Tool Parts", "Lumber Axe Head", 14037).getInt(14037);
|
||||
knifeBlade = config.getItem("Tool Parts", "Knife Blade", 14038).getInt(14038);
|
||||
|
||||
pickaxe = config.getItem("Tools", "Pickaxe", 14051).getInt(14051);
|
||||
shovel = config.getItem("Tools", "Shovel", 14052).getInt(14052);
|
||||
@ -181,12 +182,12 @@ public class PHConstruct
|
||||
aluminumuMinY = config.get("Worldgen", "Aluminum Underground Min Y", 0).getInt(0);
|
||||
aluminumuMaxY = config.get("Worldgen", "Aluminum Underground Max Y", 64).getInt(64);
|
||||
|
||||
ironsRarity = config.get("Worldgen", "Iron Surface Rarity", 70).getInt(70);
|
||||
goldsRarity = config.get("Worldgen", "Gold Surface Rarity", 200).getInt(200);
|
||||
coppersRarity = config.get("Worldgen", "Copper Surface Rarity", 32).getInt(32);
|
||||
tinsRarity = config.get("Worldgen", "Tin Surface Rarity", 32).getInt(32);
|
||||
aluminumsRarity = config.get("Worldgen", "Aluminum Surface Rarity", 32).getInt(32);
|
||||
cobaltsRarity = config.get("Worldgen", "Cobalt Surface Rarity", 400).getInt(400);
|
||||
ironsRarity = config.get("Worldgen", "Iron Surface Rarity", 200).getInt(200);
|
||||
goldsRarity = config.get("Worldgen", "Gold Surface Rarity", 500).getInt(500);
|
||||
coppersRarity = config.get("Worldgen", "Copper Surface Rarity", 80).getInt(80);
|
||||
tinsRarity = config.get("Worldgen", "Tin Surface Rarity", 80).getInt(80);
|
||||
aluminumsRarity = config.get("Worldgen", "Aluminum Surface Rarity", 70).getInt(70);
|
||||
cobaltsRarity = config.get("Worldgen", "Cobalt Surface Rarity", 1000).getInt(1000);
|
||||
|
||||
ironBushDensity = config.get("Worldgen", "Iron Bush Density", 1).getInt(1);
|
||||
goldBushDensity = config.get("Worldgen", "Gold Bush Density", 1).getInt(1);
|
||||
@ -292,6 +293,7 @@ public class PHConstruct
|
||||
public static int largeGuard;
|
||||
public static int medGuard;
|
||||
public static int crossbar;
|
||||
public static int knifeBlade;
|
||||
|
||||
public static int pickaxeHead;
|
||||
public static int axeHead;
|
||||
|
@ -9,10 +9,12 @@ import mods.tinker.tconstruct.worldgen.village.VillageSmelteryHandler;
|
||||
import mods.tinker.tconstruct.worldgen.village.VillageToolStationHandler;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
@ -26,7 +28,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
* @dependencies: IC2 API, EBXL API
|
||||
*/
|
||||
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.0.3", dependencies = "required-after:Forge@[7.7.1.659,)")
|
||||
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.2.dev1", dependencies = "required-after:Forge@[7.7.1.659,)")
|
||||
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class)
|
||||
public class TConstruct
|
||||
{
|
||||
@ -38,7 +40,7 @@ public class TConstruct
|
||||
@Instance("TConstruct")
|
||||
public static TConstruct instance;
|
||||
/* Proxies for sides, used for graphics processing */
|
||||
@SidedProxy(clientSide = "mods.tinker.tconstruct.client.TProxyClient", serverSide = "mods.tinker.tconstruct.server.TProxyServer")
|
||||
@SidedProxy(clientSide = "mods.tinker.tconstruct.client.TProxyClient", serverSide = "mods.tinker.tconstruct.TProxyCommon")
|
||||
public static TProxyCommon proxy;
|
||||
|
||||
@PreInit
|
||||
@ -77,6 +79,12 @@ public class TConstruct
|
||||
//DimensionManager.unregisterProviderType(0);
|
||||
//DimensionManager.registerProviderType(0, OverworldProvider.class, true);
|
||||
}
|
||||
|
||||
@Init
|
||||
public void init (FMLInitializationEvent event)
|
||||
{
|
||||
content.intermodCommunication();
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void postInit (FMLPostInitializationEvent evt)
|
||||
|
@ -1,21 +1,87 @@
|
||||
package mods.tinker.tconstruct;
|
||||
|
||||
import mods.tinker.common.*;
|
||||
import mods.tinker.common.IPattern;
|
||||
import mods.tinker.common.RecipeRemover;
|
||||
import mods.tinker.common.fancyitem.FancyEntityItem;
|
||||
|
||||
import mods.tinker.tconstruct.blocks.*;
|
||||
import mods.tinker.tconstruct.blocks.infiblocks.*;
|
||||
import mods.tinker.tconstruct.crafting.*;
|
||||
import mods.tinker.tconstruct.entity.*;
|
||||
import mods.tinker.tconstruct.blocks.EquipBlock;
|
||||
import mods.tinker.tconstruct.blocks.GravelOre;
|
||||
import mods.tinker.tconstruct.blocks.LavaTankBlock;
|
||||
import mods.tinker.tconstruct.blocks.LiquidMetalFlowing;
|
||||
import mods.tinker.tconstruct.blocks.LiquidMetalStill;
|
||||
import mods.tinker.tconstruct.blocks.MetalOre;
|
||||
import mods.tinker.tconstruct.blocks.OreberryBush;
|
||||
import mods.tinker.tconstruct.blocks.SearedBlock;
|
||||
import mods.tinker.tconstruct.blocks.SmelteryBlock;
|
||||
import mods.tinker.tconstruct.blocks.StoneTorch;
|
||||
import mods.tinker.tconstruct.blocks.TConstructBlock;
|
||||
import mods.tinker.tconstruct.blocks.TMetalBlock;
|
||||
import mods.tinker.tconstruct.blocks.ToolStationBlock;
|
||||
import mods.tinker.tconstruct.crafting.LiquidBlockCasting;
|
||||
import mods.tinker.tconstruct.crafting.LiquidCasting;
|
||||
import mods.tinker.tconstruct.crafting.PatternBuilder;
|
||||
import mods.tinker.tconstruct.crafting.Smeltery;
|
||||
import mods.tinker.tconstruct.crafting.ToolBuilder;
|
||||
import mods.tinker.tconstruct.entity.BlueSlime;
|
||||
import mods.tinker.tconstruct.entity.NitroCreeper;
|
||||
import mods.tinker.tconstruct.entity.projectile.DaggerEntity;
|
||||
import mods.tinker.tconstruct.items.*;
|
||||
import mods.tinker.tconstruct.items.blocks.*;
|
||||
import mods.tinker.tconstruct.library.*;
|
||||
import mods.tinker.tconstruct.library.client.*;
|
||||
import mods.tinker.tconstruct.logic.*;
|
||||
import mods.tinker.tconstruct.modifiers.*;
|
||||
import mods.tinker.tconstruct.tools.*;
|
||||
|
||||
import mods.tinker.tconstruct.items.CraftingItem;
|
||||
import mods.tinker.tconstruct.items.FilledBucket;
|
||||
import mods.tinker.tconstruct.items.MetalPattern;
|
||||
import mods.tinker.tconstruct.items.OreBerries;
|
||||
import mods.tinker.tconstruct.items.Pattern;
|
||||
import mods.tinker.tconstruct.items.PatternManual;
|
||||
import mods.tinker.tconstruct.items.StrangeFood;
|
||||
import mods.tinker.tconstruct.items.TitleIcon;
|
||||
import mods.tinker.tconstruct.items.ToolPart;
|
||||
import mods.tinker.tconstruct.items.ToolShard;
|
||||
import mods.tinker.tconstruct.items.blocks.CraftedSoilItemBlock;
|
||||
import mods.tinker.tconstruct.items.blocks.GravelOreItem;
|
||||
import mods.tinker.tconstruct.items.blocks.LavaTankItemBlock;
|
||||
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.OreberryBushItem;
|
||||
import mods.tinker.tconstruct.items.blocks.OreberryBushSecondItem;
|
||||
import mods.tinker.tconstruct.items.blocks.SearedTableItemBlock;
|
||||
import mods.tinker.tconstruct.items.blocks.SmelteryItemBlock;
|
||||
import mods.tinker.tconstruct.items.blocks.ToolStationItemBlock;
|
||||
import mods.tinker.tconstruct.library.TConstructRegistry;
|
||||
import mods.tinker.tconstruct.library.ToolCore;
|
||||
import mods.tinker.tconstruct.library.client.TConstructClientRegistry;
|
||||
import mods.tinker.tconstruct.logic.CastingBasinLogic;
|
||||
import mods.tinker.tconstruct.logic.CastingTableLogic;
|
||||
import mods.tinker.tconstruct.logic.FaucetLogic;
|
||||
import mods.tinker.tconstruct.logic.FrypanLogic;
|
||||
import mods.tinker.tconstruct.logic.LavaTankLogic;
|
||||
import mods.tinker.tconstruct.logic.LiquidTextureLogic;
|
||||
import mods.tinker.tconstruct.logic.MultiServantLogic;
|
||||
import mods.tinker.tconstruct.logic.PartCrafterLogic;
|
||||
import mods.tinker.tconstruct.logic.PatternChestLogic;
|
||||
import mods.tinker.tconstruct.logic.PatternShaperLogic;
|
||||
import mods.tinker.tconstruct.logic.SmelteryDrainLogic;
|
||||
import mods.tinker.tconstruct.logic.SmelteryLogic;
|
||||
import mods.tinker.tconstruct.logic.ToolStationLogic;
|
||||
import mods.tinker.tconstruct.modifiers.ModAttack;
|
||||
import mods.tinker.tconstruct.modifiers.ModBlaze;
|
||||
import mods.tinker.tconstruct.modifiers.ModBoolean;
|
||||
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.ModRedstone;
|
||||
import mods.tinker.tconstruct.modifiers.ModRepair;
|
||||
import mods.tinker.tconstruct.tools.Axe;
|
||||
import mods.tinker.tconstruct.tools.BattleSign;
|
||||
import mods.tinker.tconstruct.tools.Broadsword;
|
||||
import mods.tinker.tconstruct.tools.Dagger;
|
||||
import mods.tinker.tconstruct.tools.FryingPan;
|
||||
import mods.tinker.tconstruct.tools.Longsword;
|
||||
import mods.tinker.tconstruct.tools.Mattock;
|
||||
import mods.tinker.tconstruct.tools.Pickaxe;
|
||||
import mods.tinker.tconstruct.tools.PotionLauncher;
|
||||
import mods.tinker.tconstruct.tools.Rapier;
|
||||
import mods.tinker.tconstruct.tools.Shovel;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.MapColor;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -37,6 +103,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@ -80,11 +147,13 @@ public class TContent implements IFuelHandler
|
||||
public static Item pickaxeHead;
|
||||
public static Item shovelHead;
|
||||
public static Item axeHead;
|
||||
public static Item binding;
|
||||
|
||||
public static Item swordBlade;
|
||||
public static Item wideGuard;
|
||||
public static Item handGuard;
|
||||
public static Item crossbar;
|
||||
public static Item binding;
|
||||
public static Item knifeBlade;
|
||||
|
||||
public static Item frypanHead;
|
||||
public static Item signHead;
|
||||
@ -335,11 +404,13 @@ public class TContent implements IFuelHandler
|
||||
pickaxeHead = new ToolPart(PHConstruct.pickaxeHead, "PickaxeHead", "_pickaxe_head").setUnlocalizedName("tconstruct.PickaxeHead");
|
||||
shovelHead = new ToolPart(PHConstruct.shovelHead, "ShovelHead", "_shovel_head").setUnlocalizedName("tconstruct.ShovelHead");
|
||||
axeHead = new ToolPart(PHConstruct.axeHead, "AxeHead", "_axe_head").setUnlocalizedName("tconstruct.AxeHead");
|
||||
binding = new ToolPart(PHConstruct.binding, "Binding", "_binding").setUnlocalizedName("tconstruct.Binding");
|
||||
|
||||
swordBlade = new ToolPart(PHConstruct.swordBlade, "SwordBlade", "_sword_blade").setUnlocalizedName("tconstruct.SwordBlade");
|
||||
wideGuard = new ToolPart(PHConstruct.largeGuard, "LargeGuard", "_large_guard").setUnlocalizedName("tconstruct.LargeGuard");
|
||||
handGuard = new ToolPart(PHConstruct.medGuard, "MediumGuard", "_medium_guard").setUnlocalizedName("tconstruct.MediumGuard");
|
||||
crossbar = new ToolPart(PHConstruct.crossbar, "Crossbar", "_crossbar").setUnlocalizedName("tconstruct.Crossbar");
|
||||
binding = new ToolPart(PHConstruct.binding, "Binding", "_binding").setUnlocalizedName("tconstruct.Binding");
|
||||
knifeBlade = new ToolPart(PHConstruct.knifeBlade, "KnifeBlade", "_knife_blade").setUnlocalizedName("tconstruct.KnifeBlade");
|
||||
|
||||
frypanHead = new ToolPart(PHConstruct.frypanHead, "FrypanHead", "_frypan_head").setUnlocalizedName("tconstruct.FrypanHead");
|
||||
signHead = new ToolPart(PHConstruct.signHead, "SignHead", "_battlesign_head").setUnlocalizedName("tconstruct.SignHead");
|
||||
@ -491,7 +562,7 @@ public class TContent implements IFuelHandler
|
||||
|
||||
RecipeRemover.removeShapedRecipes(removeTools);*/
|
||||
|
||||
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead };
|
||||
patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, axeHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead, knifeBlade };
|
||||
|
||||
ToolBuilder tb = ToolBuilder.instance;
|
||||
tb.addToolRecipe(pickaxe, pickaxeHead, binding);
|
||||
@ -503,7 +574,7 @@ public class TContent implements IFuelHandler
|
||||
tb.addToolRecipe(frypan, frypanHead);
|
||||
tb.addToolRecipe(battlesign, signHead);
|
||||
tb.addToolRecipe(mattock, axeHead, shovelHead);
|
||||
tb.addToolRecipe(dagger, swordBlade);
|
||||
tb.addToolRecipe(dagger, knifeBlade, crossbar);
|
||||
//tb.addToolRecipe(longbow, toolRod, toolRod);
|
||||
//tb.addToolRecipe(lumberaxe, lumberHead);
|
||||
|
||||
@ -801,6 +872,8 @@ public class TContent implements IFuelHandler
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(oreSlag, 1, 4));
|
||||
OreDictionary.registerOre("oreNaturalAluminum", new ItemStack(oreSlag, 1, 5));
|
||||
|
||||
OreDictionary.registerOre("oreIron", new ItemStack(oreGravel, 1, 0));
|
||||
OreDictionary.registerOre("oreGold", new ItemStack(oreGravel, 1, 1));
|
||||
OreDictionary.registerOre("oreCobalt", new ItemStack(oreGravel, 1, 5));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(oreGravel, 1, 2));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(oreGravel, 1, 3));
|
||||
@ -856,6 +929,16 @@ public class TContent implements IFuelHandler
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.pistonStickyBase), "slimeball", Block.pistonBase));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.magmaCream), "slimeball", Item.blazePowder));
|
||||
}
|
||||
|
||||
public void intermodCommunication()
|
||||
{
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerry, 1, 12));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerry, 1, 13));
|
||||
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(oreBerry, 1, 14));
|
||||
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));
|
||||
}
|
||||
|
||||
public void modIntegration ()
|
||||
{
|
||||
|
@ -121,13 +121,13 @@ public class TProxyCommon
|
||||
"Copper", "Bronze", "Alumite", "Steel", "Blue Slime" };
|
||||
|
||||
public static final String[] materialTypes = new String[] { "ToolRod", "PickaxeHead", "ShovelHead", "AxeHead", "SwordBlade", "LargeGuard", "MediumGuard", "Crossbar", "Binding", "FrypanHead",
|
||||
"SignHead", "LumberHead" };
|
||||
"SignHead", "LumberHead", "KnifeBlade" };
|
||||
|
||||
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" };
|
||||
" Board", " Broad Axe Head", " Knife Blade" };
|
||||
|
||||
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign" };
|
||||
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign", "knifeblade" };
|
||||
|
||||
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", "Broad Axe Head" };
|
||||
"Pan", "Board", "Knife Blade" };
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable
|
||||
return;
|
||||
}
|
||||
|
||||
if (random1.nextInt(20) == 0)// && world.getBlockLightValue(x, y, z) <= 8)
|
||||
if (random1.nextInt(12) == 0)// && world.getBlockLightValue(x, y, z) <= 8)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (world.getFullBlockLightValue(x, y, z) < 13)
|
||||
|
@ -13,6 +13,7 @@ import mods.tinker.tconstruct.TContent;
|
||||
import mods.tinker.tconstruct.TProxyCommon;
|
||||
import mods.tinker.tconstruct.client.blockrender.*;
|
||||
import mods.tinker.tconstruct.client.entityrender.*;
|
||||
import mods.tinker.tconstruct.client.projectilerender.DaggerRender;
|
||||
import mods.tinker.tconstruct.client.projectilerender.LaunchedItemRender;
|
||||
import mods.tinker.tconstruct.crafting.ToolBuilder;
|
||||
import mods.tinker.tconstruct.entity.*;
|
||||
@ -71,8 +72,8 @@ public class TProxyClient extends TProxyCommon
|
||||
public static Icon metalBall;
|
||||
public static Minecraft mc;
|
||||
public static ArmorExtended armorExtended = new ArmorExtended();
|
||||
|
||||
public void registerTickHandler()
|
||||
|
||||
public void registerTickHandler ()
|
||||
{
|
||||
TickRegistry.registerTickHandler(new TClientTickHandler(), Side.CLIENT);
|
||||
//TickRegistry.registerTickHandler(new TCommonTickHandler(), Side.CLIENT);
|
||||
@ -110,9 +111,9 @@ public class TProxyClient extends TProxyCommon
|
||||
RenderingRegistry.registerEntityRenderingHandler(NitroCreeper.class, new RenderCreeper());
|
||||
RenderingRegistry.registerEntityRenderingHandler(BlueSlime.class, new SlimeRender(new ModelSlime(16), new ModelSlime(0), 0.25F));
|
||||
RenderingRegistry.registerEntityRenderingHandler(GolemBase.class, new GolemRender(0));
|
||||
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(CartEntity.class, new CartRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(DaggerEntity.class, new RangedItemRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(DaggerEntity.class, new DaggerRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(Skyla.class, new SkylaRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(Crystal.class, new CrystalRender());
|
||||
RenderingRegistry.registerEntityRenderingHandler(LaunchedPotion.class, new LaunchedItemRender(Item.potion, 16384));
|
||||
@ -207,6 +208,7 @@ public class TProxyClient extends TProxyCommon
|
||||
TConstructClientRegistry.registerManualIcon("swordblade", new ItemStack(TContent.swordBlade, 1, 2));
|
||||
TConstructClientRegistry.registerManualIcon("pan", new ItemStack(TContent.frypanHead, 1, 2));
|
||||
TConstructClientRegistry.registerManualIcon("board", new ItemStack(TContent.signHead, 1, 2));
|
||||
TConstructClientRegistry.registerManualIcon("knifeblade", new ItemStack(TContent.knifeBlade, 1, 2));
|
||||
|
||||
TConstructClientRegistry.registerManualIcon("toolrod", new ItemStack(Item.stick));
|
||||
|
||||
@ -228,6 +230,8 @@ public class TProxyClient extends TProxyCommon
|
||||
ToolBuilder.instance.buildTool(new ItemStack(TContent.swordBlade, 1, 10), new ItemStack(TContent.toolRod, 1, 11), new ItemStack(TContent.handGuard, 1, 12), ""));
|
||||
TConstructClientRegistry.registerManualIcon("rapiericon",
|
||||
ToolBuilder.instance.buildTool(new ItemStack(TContent.swordBlade, 1, 10), new ItemStack(TContent.toolRod, 1, 11), new ItemStack(TContent.crossbar, 1, 12), ""));
|
||||
TConstructClientRegistry.registerManualIcon("daggerIcon",
|
||||
ToolBuilder.instance.buildTool(new ItemStack(TContent.knifeBlade, 1, 10), new ItemStack(TContent.toolRod, 1, 11), new ItemStack(TContent.crossbar, 1, 12), ""));
|
||||
TConstructClientRegistry.registerManualIcon("frypanicon", ToolBuilder.instance.buildTool(new ItemStack(TContent.frypanHead, 1, 10), new ItemStack(TContent.toolRod, 1, 11), null, ""));
|
||||
TConstructClientRegistry.registerManualIcon("battlesignicon", ToolBuilder.instance.buildTool(new ItemStack(TContent.signHead, 1, 10), new ItemStack(TContent.toolRod, 1, 11), null, ""));
|
||||
}
|
||||
@ -270,16 +274,18 @@ public class TProxyClient extends TProxyCommon
|
||||
TConstructClientRegistry.registerManualLargeRecipe("slimymud", slimyMud, null, slimeball, slimeball, null, slimeball, slimeball, null, dirt, sand);
|
||||
TConstructClientRegistry.registerManualFurnaceRecipe("slimecrystal", new ItemStack(TContent.materials, 1, 1), slimyMud);
|
||||
TConstructClientRegistry.registerManualSmallRecipe("paperstack", new ItemStack(TContent.materials, 1, 0), paper, paper, paper, paper);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("mossball", new ItemStack(TContent.materials, 1, 6), mossycobble, mossycobble, mossycobble, mossycobble, mossycobble, mossycobble, mossycobble, mossycobble, mossycobble);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("lavacrystal", new ItemStack(TContent.materials, 1, 7), blazerod, firecharge, blazerod, firecharge, new ItemStack(Item.bucketLava), firecharge, blazerod, firecharge, blazerod);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("mossball", new ItemStack(TContent.materials, 1, 6), mossycobble, mossycobble, mossycobble, mossycobble, mossycobble, mossycobble,
|
||||
mossycobble, mossycobble, mossycobble);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("lavacrystal", new ItemStack(TContent.materials, 1, 7), blazerod, firecharge, blazerod, firecharge, new ItemStack(Item.bucketLava),
|
||||
firecharge, blazerod, firecharge, blazerod);
|
||||
|
||||
TConstructClientRegistry.registerManualSmallRecipe("grout", grout, sand, gravel, null, clay);
|
||||
TConstructClientRegistry.registerManualFurnaceRecipe("searedbrick", searedbrick, grout);
|
||||
TConstructClientRegistry.registerManualSmallRecipe("searedbricks", new ItemStack(TContent.smeltery, 1, 2), searedbrick, searedbrick, searedbrick, searedbrick);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterycontroller", new ItemStack(TContent.smeltery, 1, 0), searedbrick, searedbrick, searedbrick, searedbrick, null, searedbrick,
|
||||
searedbrick, searedbrick, searedbrick);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterydrain", new ItemStack(TContent.smeltery, 1, 1), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick,
|
||||
null, searedbrick);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterydrain", new ItemStack(TContent.smeltery, 1, 1), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick, null,
|
||||
searedbrick);
|
||||
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterytank1", new ItemStack(TContent.lavaTank, 1, 0), searedbrick, searedbrick, searedbrick, searedbrick, glass, searedbrick,
|
||||
searedbrick, searedbrick, searedbrick);
|
||||
@ -291,8 +297,8 @@ public class TProxyClient extends TProxyCommon
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterytable", new ItemStack(TContent.searedBlock, 1, 0), searedbrick, searedbrick, searedbrick, searedbrick, null, searedbrick,
|
||||
searedbrick, null, searedbrick);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelteryfaucet", new ItemStack(TContent.searedBlock, 1, 1), searedbrick, null, searedbrick, null, searedbrick, null, null, null, null);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterybasin", new ItemStack(TContent.searedBlock, 1, 2), searedbrick, null, searedbrick, searedbrick, null, searedbrick,
|
||||
searedbrick, searedbrick, searedbrick);
|
||||
TConstructClientRegistry.registerManualLargeRecipe("smelterybasin", new ItemStack(TContent.searedBlock, 1, 2), searedbrick, null, searedbrick, searedbrick, null, searedbrick, searedbrick,
|
||||
searedbrick, searedbrick);
|
||||
|
||||
//Modifier recipes
|
||||
ItemStack ironpick = ToolBuilder.instance.buildTool(new ItemStack(TContent.pickaxeHead, 1, 6), new ItemStack(TContent.toolRod, 1, 2), new ItemStack(TContent.binding, 1, 6), "");
|
||||
@ -347,6 +353,7 @@ public class TProxyClient extends TProxyCommon
|
||||
new int[] { 1, 0, 1 }, //Broadsword
|
||||
new int[] { 1, 1, 1 }, //Longsword
|
||||
new int[] { 1, 2, 1 }, //Rapier
|
||||
new int[] { 1, 5, 1 }, //Dagger
|
||||
new int[] { 2, 3, 1 }, //Frying pan
|
||||
new int[] { 2, 4, 1 } //Battlesign
|
||||
};
|
||||
@ -361,6 +368,7 @@ public class TProxyClient extends TProxyCommon
|
||||
new int[] { 1, 0, 2 }, new int[] { 2, 3, 3 }, //Broadsword
|
||||
new int[] { 1, 0, 3 }, new int[] { 2, 3, 3 }, //Longsword
|
||||
new int[] { 1, 0, 4 }, new int[] { 2, 3, 3 }, //Rapier
|
||||
new int[] { 7, 0, 4 }, new int[] { 2, 3, 3 }, //Dagger
|
||||
new int[] { 4, 0, 13 }, new int[] { 2, 3, 13 }, //Frying Pan
|
||||
new int[] { 5, 0, 13 }, new int[] { 2, 3, 13 } //Battlesign
|
||||
};
|
||||
@ -368,7 +376,7 @@ public class TProxyClient extends TProxyCommon
|
||||
static String[] toolNames = { "Repair and Modification", "Pickaxe", "Shovel", "Axe",
|
||||
//"Lumber Axe",
|
||||
//"Ice Axe",
|
||||
"Mattock", "Broadsword", "Longsword", "Rapier", "Frying Pan", "Battlesign" };
|
||||
"Mattock", "Broadsword", "Longsword", "Rapier", "Dagger", "Frying Pan", "Battlesign" };
|
||||
|
||||
static String[] toolDescriptions = {
|
||||
"The main way to repair or change your tools. Place a tool and a material on the left to get started.",
|
||||
@ -381,6 +389,7 @@ public class TProxyClient extends TProxyCommon
|
||||
"The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle",
|
||||
"The Longsword is an offensive weapon. It is often used for charging into battle at full speed.\n\nNatural Ability:\n- Charge Boost\nSpecial Ability: Lunge\n\nDamage: Moderate\nDurability: Moderate",
|
||||
"The Rapier is a special weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\n- Charge Boost\nSpecial Ability:\n- Backpedal\n\nDamage: High\nDurability: Low",
|
||||
"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" };
|
||||
@ -407,7 +416,11 @@ public class TProxyClient extends TProxyCommon
|
||||
{
|
||||
TConstructClientRegistry.addMaterialRenderMapping(partIter, "tinker", partTypes[partIter], true);
|
||||
}
|
||||
for (int effectIter = 0; effectIter < effectTypes.length; effectIter++)
|
||||
for (int effectIter = 0; effectIter < 2; effectIter++)
|
||||
{
|
||||
TConstructClientRegistry.addEffectRenderMapping(effectIter, "tinker", effectTypes[effectIter], true);
|
||||
}
|
||||
for (int effectIter = 3; effectIter < effectTypes.length; effectIter++)
|
||||
{
|
||||
TConstructClientRegistry.addEffectRenderMapping(effectIter, "tinker", effectTypes[effectIter], true);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package mods.tinker.tconstruct.client.entityrender;
|
||||
package mods.tinker.tconstruct.client.projectilerender;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -24,7 +24,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class RangedItemRender extends Render
|
||||
public class DaggerRender extends Render
|
||||
{
|
||||
|
||||
/** The RNG used in RenderItem (for bobbing itemstacks on the ground) */
|
||||
@ -34,7 +34,7 @@ public class RangedItemRender extends Render
|
||||
/** Defines the zLevel of rendering of item on GUI. */
|
||||
public float zLevel = 0.0F;
|
||||
|
||||
public RangedItemRender()
|
||||
public DaggerRender()
|
||||
{
|
||||
this.shadowSize = 0.15F;
|
||||
this.shadowOpaque = 0.75F;
|
||||
@ -51,8 +51,8 @@ public class RangedItemRender extends Render
|
||||
if (itemstack.getItem() != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
float f2 = shouldBob() ? MathHelper.sin(((float) rotator.age + par9) / 10.0F + rotator.hoverStart) * 0.1F + 0.1F : 0F;
|
||||
float f3 = (((float) rotator.age + par9) / 20.0F + rotator.hoverStart) * (180F / (float) Math.PI);
|
||||
float f2 = shouldBob() ? MathHelper.sin(((float) rotator.boomerangRotation + par9 * 0.2f) / 10.0F + rotator.hoverStart) * 0.1F + 0.1F : 0F;
|
||||
float f3 = (((float) rotator.age + par9 * 0.2f) / 20.0F + rotator.boomerangRotation) * (180F / (float) Math.PI);
|
||||
byte b0 = getMiniBlockCount(itemstack);
|
||||
|
||||
GL11.glTranslatef((float) par2, (float) par4 + f2, (float) par6);
|
||||
@ -66,7 +66,7 @@ public class RangedItemRender extends Render
|
||||
|
||||
if (itemstack.getItem().requiresMultipleRenderPasses())
|
||||
{
|
||||
GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
|
||||
//GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F);
|
||||
GL11.glTranslatef(0.0F, -0.05F, 0.0F);
|
||||
|
||||
this.loadTexture("/gui/items.png");
|
||||
@ -131,13 +131,13 @@ public class RangedItemRender extends Render
|
||||
/**
|
||||
* Renders a dropped item
|
||||
*/
|
||||
private void renderDroppedItem (RotatingBase par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7)
|
||||
private void renderDroppedItem (RotatingBase dagger, Icon par2Icon, int par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
if (par2Icon == null)
|
||||
{
|
||||
par2Icon = this.renderManager.renderEngine.getMissingIcon(par1EntityItem.getEntityItem().getItemSpriteNumber());
|
||||
par2Icon = this.renderManager.renderEngine.getMissingIcon(dagger.getEntityItem().getItemSpriteNumber());
|
||||
}
|
||||
|
||||
float f4 = par2Icon.getMinU();
|
||||
@ -150,11 +150,13 @@ public class RangedItemRender extends Render
|
||||
float f11;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
|
||||
//float rotation = dagger.prevBoomerangRotation + (dagger.boomerangRotation - dagger.prevBoomerangRotation) * par7 * 0.001F;
|
||||
float rotation = dagger.prevRotationPitch + (dagger.rotationPitch - dagger.prevRotationPitch) * par7;
|
||||
GL11.glRotatef(dagger.rotationYaw + 90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-rotation * 15, 0.0F, 0.0F, 1.0F);
|
||||
float f12 = 0.0625F;
|
||||
f11 = 0.021875F;
|
||||
ItemStack itemstack = par1EntityItem.getEntityItem();
|
||||
ItemStack itemstack = dagger.getEntityItem();
|
||||
int j = itemstack.stackSize;
|
||||
byte b0 = getMiniItemCount(itemstack);
|
||||
|
||||
@ -162,20 +164,7 @@ public class RangedItemRender extends Render
|
||||
|
||||
for (int k = 0; k < b0; ++k)
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 0.0F, f12 + f11);
|
||||
// Makes items offset when in 3D, like when in 2D, looks much
|
||||
// better. Considered a vanilla bug...
|
||||
if (k > 0 && shouldSpreadItems())
|
||||
{
|
||||
float x = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
float y = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
float z = (random.nextFloat() * 2.0F - 1.0F) * 0.3F / 0.5F;
|
||||
GL11.glTranslatef(x, y, f12 + f11);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef(0f, 0f, f12 + f11);
|
||||
}
|
||||
GL11.glTranslatef(0f, 0f, f12 + f11);
|
||||
|
||||
if (itemstack.getItemSpriteNumber() == 0)
|
||||
{
|
@ -26,7 +26,7 @@ public class DaggerRenderOld extends RangedRenderBase
|
||||
GL11.glRotatef(f, 0.0F, 1.0F, 0.0F);
|
||||
float f2 = dagger.prevRotationPitch + (dagger.rotationPitch - dagger.prevRotationPitch) * f1;
|
||||
GL11.glRotatef(-f2, 1.0F, 0.0F, 0.0F);
|
||||
if(!dagger.inGround)
|
||||
if(!dagger.onGround)
|
||||
{
|
||||
float f3 = dagger.prevBoomerangRotation + (dagger.boomerangRotation - dagger.prevBoomerangRotation) * f1 * 1.1F;
|
||||
GL11.glRotatef(f3, 1.0F, 0.0F, 0.0F);
|
||||
|
@ -1,28 +1,16 @@
|
||||
package mods.tinker.tconstruct.entity.projectile;
|
||||
|
||||
import mods.tinker.tconstruct.library.AbilityHelper;
|
||||
import mods.tinker.tconstruct.library.ToolCore;
|
||||
import mods.tinker.tconstruct.tools.Dagger;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.stats.AchievementList;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
import com.google.common.io.ByteArrayDataOutput;
|
||||
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
|
||||
public class DaggerEntity extends RotatingBase
|
||||
{
|
||||
|
||||
@ -34,7 +22,7 @@ public class DaggerEntity extends RotatingBase
|
||||
public DaggerEntity(ItemStack itemstack, World world, EntityPlayer entityplayer)
|
||||
{
|
||||
super(world, entityplayer, 0.75F, 0.8F);
|
||||
System.out.println("Stack: "+itemstack);
|
||||
//System.out.println("Stack: "+itemstack);
|
||||
returnStackSlot = entityplayer.inventory.currentItem;
|
||||
returnStack = itemstack;
|
||||
}
|
||||
@ -52,10 +40,6 @@ public class DaggerEntity extends RotatingBase
|
||||
@Override
|
||||
public void onHit (MovingObjectPosition movingobjectposition)
|
||||
{
|
||||
if (worldObj.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (movingobjectposition.entityHit != null)
|
||||
{
|
||||
if (movingobjectposition.entityHit.attackEntityFrom(DamageSource.causeMobDamage(owner), damageDealt))
|
||||
@ -71,13 +55,12 @@ public class DaggerEntity extends RotatingBase
|
||||
{
|
||||
Dagger dagger = (Dagger) returnStack.getItem();
|
||||
this.hitEntity(returnStack, (EntityLiving) movingobjectposition.entityHit, owner, dagger);
|
||||
if (returnStack.getItemDamage() >= returnStack.getMaxDamage())
|
||||
returnStack.stackSize--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
onGround = true;
|
||||
xTile = movingobjectposition.blockX;
|
||||
yTile = movingobjectposition.blockY;
|
||||
zTile = movingobjectposition.blockZ;
|
||||
@ -90,174 +73,22 @@ public class DaggerEntity extends RotatingBase
|
||||
posY -= (motionY / (double) f) * 0.05D;
|
||||
posZ -= (motionZ / (double) f) * 0.05D;
|
||||
worldObj.playSoundAtEntity(this, "random.drr", 1.0F, 1.2F / (rand.nextFloat() * 0.2F + 0.9F));
|
||||
inGround = true;
|
||||
arrowShake = 7;
|
||||
returnStack.damageItem(1, owner);
|
||||
if (!worldObj.isRemote)
|
||||
AbilityHelper.damageTool(returnStack, 1, owner, false);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hitEntity (ItemStack stack, EntityLiving mob, EntityLiving player, ToolCore weapon)
|
||||
public boolean hitEntity (ItemStack stack, EntityLiving mob, EntityPlayer player, ToolCore weapon)
|
||||
{
|
||||
if (player.canAttackWithItem())
|
||||
if (!worldObj.isRemote && player.canAttackWithItem())
|
||||
{
|
||||
int var2 = ((EntityPlayer) player).inventory.getDamageVsEntity(mob);
|
||||
|
||||
if (player.isPotionActive(Potion.damageBoost))
|
||||
{
|
||||
var2 += 3 << player.getActivePotionEffect(Potion.damageBoost).getAmplifier();
|
||||
}
|
||||
|
||||
if (player.isPotionActive(Potion.weakness))
|
||||
{
|
||||
var2 -= 2 << mob.getActivePotionEffect(Potion.weakness).getAmplifier();
|
||||
}
|
||||
|
||||
int var3 = 0;
|
||||
int var4 = 0;
|
||||
|
||||
if (mob instanceof EntityLiving)
|
||||
{
|
||||
var4 = EnchantmentHelper.getEnchantmentModifierLiving(player, mob);
|
||||
var3 += EnchantmentHelper.getKnockbackModifier(player, mob);
|
||||
}
|
||||
|
||||
if (this.isSprinting())
|
||||
{
|
||||
++var3;
|
||||
}
|
||||
|
||||
if (var2 > 0 || var4 > 0)
|
||||
{
|
||||
boolean var5 = this.fallDistance > 0.0F && !this.onGround && !mob.isOnLadder() && !this.isInWater() && !mob.isPotionActive(Potion.blindness) && this.ridingEntity == null
|
||||
&& player instanceof EntityLiving;
|
||||
|
||||
if (var5)
|
||||
{
|
||||
var2 += this.rand.nextInt(var2 / 2 + 2);
|
||||
}
|
||||
|
||||
var2 += var4;
|
||||
boolean var6 = mob.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) player), var2);
|
||||
|
||||
if (var6)
|
||||
{
|
||||
if (var3 > 0)
|
||||
{
|
||||
mob.addVelocity((double) (-MathHelper.sin(this.rotationYaw * (float) Math.PI / 180.0F) * (float) var3 * 0.5F), 0.1D,
|
||||
(double) (MathHelper.cos(this.rotationYaw * (float) Math.PI / 180.0F) * (float) var3 * 0.5F));
|
||||
this.motionX *= 0.6D;
|
||||
this.motionZ *= 0.6D;
|
||||
this.setSprinting(false);
|
||||
}
|
||||
|
||||
if (var5)
|
||||
{
|
||||
((EntityPlayer) player).onCriticalHit(mob);
|
||||
}
|
||||
|
||||
if (var4 > 0)
|
||||
{
|
||||
((EntityPlayer) player).onEnchantmentCritical(mob);
|
||||
}
|
||||
|
||||
if (var2 >= 18)
|
||||
{
|
||||
((EntityPlayer) player).triggerAchievement(AchievementList.overkill);
|
||||
}
|
||||
|
||||
((EntityPlayer) player).setLastAttackingEntity(mob);
|
||||
}
|
||||
|
||||
ItemStack var7 = ((EntityPlayer) player).getCurrentEquippedItem();
|
||||
|
||||
if (mob instanceof EntityLiving)
|
||||
{
|
||||
|
||||
((EntityPlayer) player).addStat(StatList.damageDealtStat, var2);
|
||||
//int var8 = EnchantmentHelper.func_90036_a(player);
|
||||
|
||||
/*if (var8 > 0)
|
||||
{
|
||||
mob.setFire(var8 * 4);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
World world = player.worldObj;
|
||||
/*if (weapon.headType == weapon.handleType)
|
||||
{
|
||||
weapon.attacks(stack, world, player, mob, weapon.getHeadType());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (weapon.random.nextInt(100) + 1 <= 80)
|
||||
{
|
||||
weapon.attacks(stack, world, player, mob, weapon.getHeadType());
|
||||
}
|
||||
if (weapon.random.nextInt(100) + 1 <= 20)
|
||||
{
|
||||
weapon.attacks(stack, world, player, mob, weapon.getHandleType());
|
||||
}
|
||||
}
|
||||
|
||||
int unbreaking = weapon.headUnbreaking;
|
||||
if (weapon.handleUnbreaking > unbreaking)
|
||||
unbreaking = weapon.handleUnbreaking;
|
||||
if (weapon.random.nextInt(100) + 1 <= 100 - (unbreaking * 10))
|
||||
{
|
||||
stack.damageItem(1, mob);
|
||||
}*/
|
||||
AbilityHelper.onLeftClickEntity(stack, player, mob, weapon);
|
||||
}
|
||||
|
||||
this.checkEnchants(stack, mob);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean checkEnchants (ItemStack itemstack, EntityLiving mob)
|
||||
{
|
||||
int freezeCheck = 0;
|
||||
int poisonCheck = 0;
|
||||
NBTTagList nbttaglist = itemstack.getEnchantmentTagList();
|
||||
if (nbttaglist == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
for (int j = 0; j < nbttaglist.tagCount(); j++)
|
||||
{
|
||||
short word0 = ((NBTTagCompound) nbttaglist.tagAt(j)).getShort("id");
|
||||
short word1 = ((NBTTagCompound) nbttaglist.tagAt(j)).getShort("lvl");
|
||||
if (word0 == 42)
|
||||
{
|
||||
freezeCheck = word1;
|
||||
}
|
||||
else if (word0 == 41)
|
||||
{
|
||||
poisonCheck = word1;
|
||||
if (rand.nextInt(5) == 0)
|
||||
{
|
||||
if (poisonCheck > 0)
|
||||
((NBTTagCompound) nbttaglist.tagAt(j)).setInteger("lvl", poisonCheck - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (freezeCheck > 0)
|
||||
{
|
||||
//mob.freeze(freezeCheck * 50);
|
||||
}
|
||||
if (poisonCheck > 0)
|
||||
{
|
||||
mob.addPotionEffect(new PotionEffect(Potion.poison.id, poisonCheck * 5, 0));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void dealFireDamage (int i)
|
||||
{
|
||||
}
|
||||
|
||||
/*public void onUpdate ()
|
||||
{
|
||||
super.onUpdate();
|
||||
}*/
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
|
||||
|
||||
public class RotatingBase extends Entity
|
||||
implements IEntityAdditionalSpawnData
|
||||
{
|
||||
|
||||
public RotatingBase(World world)
|
||||
@ -35,7 +36,7 @@ public class RotatingBase extends Entity
|
||||
yTile = -1;
|
||||
zTile = -1;
|
||||
inTile = 0;
|
||||
inGround = false;
|
||||
onGround = false;
|
||||
arrowShake = 0;
|
||||
ticksInAir = 0;
|
||||
setSize(0.5F, 0.5F);
|
||||
@ -48,7 +49,7 @@ public class RotatingBase extends Entity
|
||||
yOffset = 0.0F;
|
||||
}
|
||||
|
||||
public RotatingBase(World world, EntityLiving entityliving, float f, float f1)
|
||||
public RotatingBase(World world, EntityPlayer entityliving, float f, float f1)
|
||||
{
|
||||
this(world);
|
||||
owner = entityliving;
|
||||
@ -60,16 +61,27 @@ public class RotatingBase extends Entity
|
||||
yOffset = 0.0F;
|
||||
motionX = -MathHelper.sin((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F);
|
||||
motionZ = MathHelper.cos((rotationYaw / 180F) * 3.141593F) * MathHelper.cos((rotationPitch / 180F) * 3.141593F);
|
||||
motionY = -MathHelper.sin((rotationPitch / 180F) * 3.141593F);
|
||||
motionY = -MathHelper.sin((rotationPitch / 180F) * 3.141593F - 0.2f);
|
||||
setArrowHeading(motionX, motionY, motionZ, f, f1);
|
||||
}
|
||||
|
||||
/*public void setOnGround(boolean flag)
|
||||
{
|
||||
onGround = flag;
|
||||
this.dataWatcher.updateObject(6, Byte.valueOf((byte) (flag == true ? 1 : 0)));
|
||||
}
|
||||
|
||||
public boolean getOnGround()
|
||||
{
|
||||
return this.dataWatcher.getWatchableObjectByte(0) == 1 ? true : false;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected void entityInit()
|
||||
{
|
||||
}
|
||||
|
||||
public void damageDagger (int i, boolean flag)
|
||||
public void damageItem (int i, boolean flag)
|
||||
{
|
||||
if (!flag)
|
||||
{
|
||||
@ -82,7 +94,7 @@ public class RotatingBase extends Entity
|
||||
worldObj.spawnParticle("snowballpoof", posX, posY, posZ, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
kill();
|
||||
//kill();
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,12 +176,12 @@ public class RotatingBase extends Entity
|
||||
{
|
||||
arrowShake--;
|
||||
}
|
||||
if (inGround)
|
||||
if (onGround)
|
||||
{
|
||||
int i = worldObj.getBlockId(xTile, yTile, zTile);
|
||||
if (i != inTile)
|
||||
{
|
||||
inGround = false;
|
||||
onGround = false;
|
||||
motionX *= rand.nextFloat() * 0.2F;
|
||||
motionY *= rand.nextFloat() * 0.2F;
|
||||
motionZ *= rand.nextFloat() * 0.2F;
|
||||
@ -178,7 +190,10 @@ public class RotatingBase extends Entity
|
||||
}
|
||||
else
|
||||
{
|
||||
ticksInGround++;
|
||||
/*this.motionX = 0;
|
||||
this.motionY = 0;
|
||||
this.motionZ = 0;*/
|
||||
/*ticksInGround++;
|
||||
if (ticksInGround == 1200)
|
||||
{
|
||||
setDead();
|
||||
@ -186,14 +201,15 @@ public class RotatingBase extends Entity
|
||||
if (ticksInGround == maxGroundTicks)
|
||||
{
|
||||
setDead();
|
||||
}
|
||||
}*/
|
||||
if (!hasHitGround)
|
||||
{
|
||||
hasHitGround = true;
|
||||
damageDagger(1, true);
|
||||
damageItem(1, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -278,7 +294,7 @@ public class RotatingBase extends Entity
|
||||
motionZ *= f2;
|
||||
motionY -= f4;
|
||||
setPosition(posX, posY, posZ);
|
||||
if (!inGround)
|
||||
if (!onGround)
|
||||
{
|
||||
prevBoomerangRotation = boomerangRotation;
|
||||
for (boomerangRotation += 36F; boomerangRotation > 360F; boomerangRotation -= 360F)
|
||||
@ -324,7 +340,7 @@ public class RotatingBase extends Entity
|
||||
tags.setShort("zTile", (short) zTile);
|
||||
tags.setByte("inTile", (byte) inTile);
|
||||
tags.setByte("shake", (byte) arrowShake);
|
||||
tags.setByte("inGround", (byte) (inGround ? 1 : 0));
|
||||
tags.setByte("onGround", (byte) (onGround ? 1 : 0));
|
||||
}
|
||||
|
||||
public void readEntityFromNBT (NBTTagCompound tags)
|
||||
@ -337,7 +353,7 @@ public class RotatingBase extends Entity
|
||||
zTile = tags.getShort("zTile");
|
||||
inTile = tags.getByte("inTile") & 0xff;
|
||||
arrowShake = tags.getByte("shake") & 0xff;
|
||||
inGround = tags.getByte("inGround") == 1;
|
||||
onGround = tags.getByte("onGround") == 1;
|
||||
}
|
||||
|
||||
public void onCollideWithPlayer (EntityPlayer entityplayer)
|
||||
@ -351,7 +367,7 @@ public class RotatingBase extends Entity
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!flag || inGround && arrowShake <= 0)
|
||||
if (!flag || onGround && arrowShake <= 0)
|
||||
{
|
||||
if (!flag || returnsTo != null && !returnsTo.isDead && returnsTo != entityplayer)
|
||||
{
|
||||
@ -393,9 +409,67 @@ public class RotatingBase extends Entity
|
||||
protected int yTile;
|
||||
protected int zTile;
|
||||
protected int inTile;
|
||||
public boolean inGround;
|
||||
public int arrowShake;
|
||||
public EntityLiving owner;
|
||||
public EntityPlayer owner;
|
||||
protected int ticksInGround;
|
||||
protected int ticksInAir;
|
||||
|
||||
@Override
|
||||
public void writeSpawnData (ByteArrayDataOutput data)
|
||||
{
|
||||
NBTTagCompound tags = returnStack.getTagCompound().getCompoundTag("InfiTool");
|
||||
data.writeShort(returnStack.itemID);
|
||||
data.writeFloat(rotationYaw);
|
||||
data.writeInt(tags.getInteger("RenderHandle"));
|
||||
data.writeInt(tags.getInteger("RenderHead"));
|
||||
data.writeInt(tags.getInteger("RenderAccessory"));
|
||||
|
||||
int effects = 0;
|
||||
if (tags.hasKey("Effect1"))
|
||||
effects++;
|
||||
if (tags.hasKey("Effect2"))
|
||||
effects++;
|
||||
if (tags.hasKey("Effect3"))
|
||||
effects++;
|
||||
if (tags.hasKey("Effect4"))
|
||||
effects++;
|
||||
if (tags.hasKey("Effect5"))
|
||||
effects++;
|
||||
if (tags.hasKey("Effect6"))
|
||||
effects++;
|
||||
data.writeInt(effects);
|
||||
|
||||
switch (effects)
|
||||
{
|
||||
case 6: data.writeInt(tags.getInteger("Effect6"));
|
||||
case 5: data.writeInt(tags.getInteger("Effect5"));
|
||||
case 4: data.writeInt(tags.getInteger("Effect4"));
|
||||
case 3: data.writeInt(tags.getInteger("Effect3"));
|
||||
case 2: data.writeInt(tags.getInteger("Effect2"));
|
||||
case 1: data.writeInt(tags.getInteger("Effect1"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readSpawnData (ByteArrayDataInput data)
|
||||
{
|
||||
returnStack = new ItemStack(data.readShort(), 1, 0);
|
||||
rotationYaw = data.readFloat();
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
NBTTagCompound toolTag = new NBTTagCompound();
|
||||
toolTag.setInteger("RenderHead", data.readInt());
|
||||
toolTag.setInteger("RenderHandle", data.readInt());
|
||||
toolTag.setInteger("RenderAccessory", data.readInt());
|
||||
switch (data.readInt())
|
||||
{
|
||||
case 6: toolTag.setInteger("Effect6", data.readInt());
|
||||
case 5: toolTag.setInteger("Effect5", data.readInt());
|
||||
case 4: toolTag.setInteger("Effect4", data.readInt());
|
||||
case 3: toolTag.setInteger("Effect3", data.readInt());
|
||||
case 2: toolTag.setInteger("Effect2", data.readInt());
|
||||
case 1: toolTag.setInteger("Effect1", data.readInt());
|
||||
}
|
||||
compound.setCompoundTag("InfiTool", toolTag);
|
||||
returnStack.setTagCompound(compound);
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class Pattern extends CraftingItem
|
||||
}
|
||||
|
||||
public static final String[] patternName = new String[] {
|
||||
"ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign" };
|
||||
"ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign", "knifeblade" };
|
||||
|
||||
/*@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister iconRegister)
|
||||
@ -97,7 +97,7 @@ public class Pattern extends CraftingItem
|
||||
case 9: return 1;
|
||||
case 10: return 2;
|
||||
case 11: return 2;
|
||||
case 12: return 10;
|
||||
case 12: return 1;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ public class AbilityHelper
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
damageTool(stack, dam, tags, entity, ignoreCharge, true);
|
||||
}
|
||||
|
||||
|
||||
public static void healTool (ItemStack stack, int dam, EntityLiving entity, boolean ignoreCharge, boolean updateDamageBar)
|
||||
{
|
||||
NBTTagCompound tags = stack.getTagCompound();
|
||||
@ -265,7 +265,7 @@ public class AbilityHelper
|
||||
{
|
||||
tags.getCompoundTag("InfiTool").setInteger("Damage", 0);
|
||||
if (updateDamageBar)
|
||||
stack.setItemDamage(0);
|
||||
stack.setItemDamage(0);
|
||||
}
|
||||
|
||||
else if (damageTrue > maxDamage)
|
||||
@ -282,7 +282,7 @@ public class AbilityHelper
|
||||
int stackDamage = stack.getItemDamage();
|
||||
if (updateDamageBar && toolDamage != stackDamage)
|
||||
{
|
||||
stack.setItemDamage((damage * 100 / maxDamage) + 1);
|
||||
stack.setItemDamage((damage * 100 / maxDamage) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -493,58 +493,61 @@ public class AbilityHelper
|
||||
entityitem.onCollideWithPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Ranged weapons */
|
||||
|
||||
public static void forceAddToInv(EntityPlayer entityplayer, ItemStack itemstack, int i, boolean flag)
|
||||
|
||||
public static void forceAddToInv (EntityPlayer entityplayer, ItemStack itemstack, int i, boolean flag)
|
||||
{
|
||||
ItemStack itemstack1 = entityplayer.inventory.getStackInSlot(i);
|
||||
entityplayer.inventory.setInventorySlotContents(i, itemstack);
|
||||
if(itemstack1 != null)
|
||||
if (itemstack1 != null)
|
||||
{
|
||||
addToInv(entityplayer, itemstack1, flag);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean addToInv(EntityPlayer entityplayer, ItemStack itemstack, boolean flag)
|
||||
|
||||
public static boolean addToInv (EntityPlayer entityplayer, ItemStack itemstack, boolean flag)
|
||||
{
|
||||
return addToInv(entityplayer, itemstack, entityplayer.inventory.currentItem, flag);
|
||||
}
|
||||
|
||||
public static boolean addToInv(EntityPlayer entityplayer, ItemStack itemstack, int i, boolean flag)
|
||||
|
||||
public static boolean addToInv (EntityPlayer entityplayer, ItemStack itemstack, int i, boolean flag)
|
||||
{
|
||||
ItemStack itemstack1 = entityplayer.inventory.getStackInSlot(i);
|
||||
boolean flag1;
|
||||
if(itemstack1 == null)
|
||||
if (itemstack1 == null)
|
||||
{
|
||||
entityplayer.inventory.setInventorySlotContents(i, itemstack);
|
||||
flag1 = true;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
flag1 = entityplayer.inventory.addItemStackToInventory(itemstack);
|
||||
}
|
||||
if(flag && !flag1)
|
||||
if (flag && !flag1)
|
||||
{
|
||||
addItemStackToWorld(entityplayer.worldObj, (float)Math.floor(entityplayer.posX), (float)Math.floor(entityplayer.posY), (float)Math.floor(entityplayer.posZ), itemstack);
|
||||
addItemStackToWorld(entityplayer.worldObj, (float) Math.floor(entityplayer.posX), (float) Math.floor(entityplayer.posY), (float) Math.floor(entityplayer.posZ), itemstack);
|
||||
return true;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
return flag1;
|
||||
}
|
||||
}
|
||||
|
||||
public static EntityItem addItemStackToWorld(World world, float f, float f1, float f2, ItemStack itemstack)
|
||||
|
||||
public static EntityItem addItemStackToWorld (World world, float f, float f1, float f2, ItemStack itemstack)
|
||||
{
|
||||
return addItemStackToWorld(world, f, f1, f2, itemstack, false);
|
||||
}
|
||||
|
||||
public static EntityItem addItemStackToWorld(World world, float f, float f1, float f2, ItemStack itemstack, boolean flag)
|
||||
|
||||
public static EntityItem addItemStackToWorld (World world, float f, float f1, float f2, ItemStack itemstack, boolean flag)
|
||||
{
|
||||
EntityItem entityitem;
|
||||
if(flag)
|
||||
if (flag)
|
||||
{
|
||||
entityitem = new EntityItem(world, f, f1, f2, itemstack);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
float f3 = 0.7F;
|
||||
float f4 = random.nextFloat() * f3 + (1.0F - f3) * 0.5F;
|
||||
|
@ -551,6 +551,11 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean rangedTool ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public float chargeAttack ()
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ public class MultiServantLogic extends TileEntity
|
||||
|
||||
public boolean verifyMaster(int x, int y, int z)
|
||||
{
|
||||
if (master.equals(x, y, z) && worldObj.getBlockId(x, y, z) == masterID && worldObj.getBlockMetadata(x, y, z) == masterMeat)
|
||||
if (master.equalCoords(x, y, z) && worldObj.getBlockId(x, y, z) == masterID && worldObj.getBlockMetadata(x, y, z) == masterMeat)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -47,7 +47,8 @@ public class ModAttack extends ToolMod
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
int amount = 24;
|
||||
if (((ToolCore) tool.getItem()).pierceArmor())
|
||||
ToolCore toolItem = (ToolCore) tool.getItem();
|
||||
if (toolItem.pierceArmor() || toolItem.rangedTool())
|
||||
amount = 36;
|
||||
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
|
@ -242,7 +242,7 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
Random rand = new Random();
|
||||
|
||||
/* Bows */
|
||||
@ForgeSubscribe
|
||||
/*@ForgeSubscribe
|
||||
public void arrowShoot (ArrowLooseEvent event)
|
||||
{
|
||||
event.setCanceled(true);
|
||||
@ -305,5 +305,5 @@ public class TPlayerHandler implements IPlayerTracker
|
||||
event.entityPlayer.worldObj.spawnEntityInWorld(entityarrow);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import mods.tinker.tconstruct.TContent;
|
||||
import mods.tinker.tconstruct.entity.projectile.DaggerEntity;
|
||||
import mods.tinker.tconstruct.library.Weapon;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@ -17,37 +18,37 @@ public class Dagger extends Weapon
|
||||
super(id, 1);
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick (ItemStack itemstack, World world, EntityPlayer entityplayer)
|
||||
public ItemStack onItemRightClick (ItemStack itemstack, World world, EntityPlayer player)
|
||||
{
|
||||
ItemStack is = itemstack.copy();
|
||||
is.stackSize--;
|
||||
player.setItemInUse(itemstack, this.getMaxItemUseDuration(itemstack));
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
public ItemStack onEaten (ItemStack itemstack, World world, EntityPlayer player)
|
||||
{
|
||||
ItemStack stack = itemstack.copy();
|
||||
if (!world.isRemote)
|
||||
{
|
||||
DaggerEntity dagger = new DaggerEntity(itemstack, world, entityplayer);
|
||||
DaggerEntity dagger = new DaggerEntity(stack, world, player);
|
||||
world.spawnEntityInWorld(dagger);
|
||||
}
|
||||
return is;
|
||||
itemstack.stackSize--;
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderPasses (int metadata)
|
||||
public EnumAction getItemUseAction(ItemStack par1ItemStack)
|
||||
{
|
||||
return 8;
|
||||
return EnumAction.bow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPartAmount()
|
||||
|
||||
public int getMaxItemUseDuration (ItemStack stack)
|
||||
{
|
||||
return 2;
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerPartPaths (int index, String[] location)
|
||||
|
||||
public boolean rangedTool ()
|
||||
{
|
||||
headStrings.put(index, location[0]);
|
||||
brokenHeadStrings.put(index, location[1]);
|
||||
handleStrings.put(index, location[2]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -61,6 +62,8 @@ public class Dagger extends Weapon
|
||||
return "_dagger_blade_broken";
|
||||
case 2:
|
||||
return "_dagger_handle";
|
||||
case 3:
|
||||
return "_dagger_accessory";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@ -81,12 +84,12 @@ public class Dagger extends Weapon
|
||||
@Override
|
||||
protected Item getHeadItem ()
|
||||
{
|
||||
return TContent.swordBlade;
|
||||
return TContent.knifeBlade;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Item getAccessoryItem ()
|
||||
{
|
||||
return null;
|
||||
return TContent.crossbar;
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import mods.tinker.tconstruct.PHConstruct;
|
||||
import mods.tinker.tconstruct.TContent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
@ -41,12 +42,15 @@ public class TBaseWorldGenerator implements IWorldGenerator
|
||||
public void generate (Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
if (world.provider.isHellWorld)
|
||||
{
|
||||
generateNether(random, chunkX * 16, chunkZ * 16, world);
|
||||
else
|
||||
}
|
||||
else if (world.provider.terrainType != WorldType.FLAT)
|
||||
{
|
||||
generateSurface(random, chunkX * 16, chunkZ * 16, world);
|
||||
|
||||
if (world.provider.dimensionId == 0)
|
||||
generateOreBushes(random, chunkX * 16, chunkZ * 16, world);
|
||||
if (world.provider.dimensionId == 0)
|
||||
generateOreBushes(random, chunkX * 16, chunkZ * 16, world);
|
||||
}
|
||||
}
|
||||
|
||||
void generateSurface (Random random, int xChunk, int zChunk, World world)
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 270 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 150 B |
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 230 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 294 B |
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 342 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 188 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 144 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 126 B After Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 173 B After Width: | Height: | Size: 365 B |
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 168 B |
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 169 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 114 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 275 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 274 B |
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 113 B After Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 147 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 192 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 102 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 143 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 177 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 162 B After Width: | Height: | Size: 336 B |
Before Width: | Height: | Size: 144 B After Width: | Height: | Size: 214 B |
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 353 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 292 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 142 B |
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 326 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 189 B After Width: | Height: | Size: 254 B |
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 112 B After Width: | Height: | Size: 259 B |
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 137 B |