Weapon Test 2

This commit is contained in:
mDiyo 2013-04-12 22:53:31 -07:00
parent bdfb8d5c21
commit d54db4d18a
10 changed files with 207 additions and 126 deletions

View File

@ -16,13 +16,14 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/** TConstruct, the tool mod.
* Craft your tools with style, then modify until the original is gone!
* @author: mDiyo
*/
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.2.29.1_weapontest")
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.2.28.7")
@NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class)
public class TConstruct
{
@ -61,8 +62,8 @@ public class TConstruct
GameRegistry.registerCraftingHandler(new TCraftingHandler());
NetworkRegistry.instance().registerGuiHandler(instance, new TGuiHandler());
DimensionManager.unregisterProviderType(0);
DimensionManager.registerProviderType(0, OverworldProvider.class, true);
//DimensionManager.unregisterProviderType(0);
//DimensionManager.registerProviderType(0, OverworldProvider.class, true);
}
@PostInit

View File

@ -1,20 +1,80 @@
package mods.tinker.tconstruct;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
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.crafting.*;
import mods.tinker.tconstruct.entity.*;
import mods.tinker.tconstruct.items.*;
import mods.tinker.tconstruct.library.*;
import mods.tinker.tconstruct.logic.*;
import mods.tinker.tconstruct.modifiers.*;
import mods.tinker.tconstruct.tools.*;
import mods.tinker.tconstruct.blocks.EquipBlock;
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.SearedBlock;
import mods.tinker.tconstruct.blocks.SmelteryBlock;
import mods.tinker.tconstruct.blocks.StoneTorch;
import mods.tinker.tconstruct.blocks.TConstructBlock;
import mods.tinker.tconstruct.blocks.ToolStationBlock;
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.Crystal;
import mods.tinker.tconstruct.entity.LaunchedPotion;
import mods.tinker.tconstruct.entity.UnstableCreeper;
import mods.tinker.tconstruct.items.CraftedSoilItemBlock;
import mods.tinker.tconstruct.items.CraftingItem;
import mods.tinker.tconstruct.items.FilledBucket;
import mods.tinker.tconstruct.items.LavaTankItemBlock;
import mods.tinker.tconstruct.items.LiquidItemBlock;
import mods.tinker.tconstruct.items.MetalItemBlock;
import mods.tinker.tconstruct.items.MetalOreItemBlock;
import mods.tinker.tconstruct.items.MetalPattern;
import mods.tinker.tconstruct.items.Pattern;
import mods.tinker.tconstruct.items.PatternManual;
import mods.tinker.tconstruct.items.SearedTableItemBlock;
import mods.tinker.tconstruct.items.SmelteryItemBlock;
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.ToolStationItemBlock;
import mods.tinker.tconstruct.library.TConstructRegistry;
import mods.tinker.tconstruct.library.ToolCore;
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.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;
@ -32,6 +92,7 @@ import net.minecraftforge.liquids.LiquidDictionary;
import net.minecraftforge.liquids.LiquidStack;
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.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
@ -548,7 +609,7 @@ public class TContent implements IFuelHandler
}
}
WeakReference<ToolCore> tool = new WeakReference<ToolCore>(null);
//WeakReference<ToolCore> tool = new WeakReference<ToolCore>(null);
void addSmelteryRecipes ()
{
@ -569,7 +630,7 @@ public class TContent implements IFuelHandler
//Alloys
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 2, 7), new LiquidStack(liquidMetalStill.blockID, 3, 2), new LiquidStack(liquidMetalStill.blockID, 1, 3)); //Bronze
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 2, 8), new LiquidStack(liquidMetalStill.blockID, 3, 4), new LiquidStack(liquidMetalStill.blockID, 1, 2)); //Aluminum Brass
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 2, 9), new LiquidStack(liquidMetalStill.blockID, 1, 5), new LiquidStack(liquidMetalStill.blockID, 1, 6)); //Manyullyn
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 1, 9), new LiquidStack(liquidMetalStill.blockID, 2, 5), new LiquidStack(liquidMetalStill.blockID, 2, 6)); //Manyullyn
Smeltery.addAlloyMixing(new LiquidStack(liquidMetalStill.blockID, 3, 10), new LiquidStack(liquidMetalStill.blockID, 5, 4), new LiquidStack(liquidMetalStill.blockID, 2, 0), new LiquidStack(
liquidMetalStill.blockID, 2, 11)); //Alumite
}
@ -681,6 +742,14 @@ public class TContent implements IFuelHandler
LiquidDictionary.getOrCreateLiquid("Molten " + liquidNames[iter], liquidstack);
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquidstack, new ItemStack(buckets, 1, iter), new ItemStack(Item.bucketEmpty)));
}
//Vanilla stuff
OreDictionary.registerOre("slimeball", new ItemStack(Item.slimeBall));
OreDictionary.registerOre("slimeball", new ItemStack(strangeFood, 1, 0));
RecipeRemover.removeShapedRecipe(new ItemStack(Block.pistonStickyBase));
RecipeRemover.removeShapedRecipe(new ItemStack(Item.magmaCream));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.pistonStickyBase), "slimeball", Block.pistonBase));
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.magmaCream), "slimeball", Item.blazePowder));
}
public void modIntegration ()

View File

@ -2,6 +2,8 @@ package mods.tinker.tconstruct;
import java.io.File;
import cpw.mods.fml.common.registry.LanguageRegistry;
/**
* Common proxy class for InfiTools
*/
@ -10,9 +12,81 @@ public class TProxyCommon
{
/* Registers any rendering code. Does nothing server-side */
public void registerRenderer() {}
/* Ties an internal name to a visible one. Does nothing server-side */
public void addNames() {}
/* Ties an internal name to a visible one. */
public void addNames ()
{
String langDir = "/mods/tinker/resources/lang/";
String[] langFiles = { "en_US.xml" };
for (String langFile : langFiles)
{
try
{
LanguageRegistry.instance().loadLocalization(langDir + langFile, langFile.substring(langFile.lastIndexOf('/') + 1, langFile.lastIndexOf('.')), true);
}
catch (Exception e)
{
e.printStackTrace();
}
}
for (int mat = 0; mat < materialTypes.length; mat++)
{
for (int type = 0; type < toolMaterialNames.length; type++)
{
String internalName = new StringBuilder().append("item.tconstruct.").append(materialTypes[mat]).append(".").append(toolMaterialNames[type]).append(".name").toString();
String visibleName = new StringBuilder().append(toolMaterialNames[type]).append(materialNames[mat]).toString();
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
}
for (int i = 0; i < shardNames.length; i++)
{
String internalName = "item.tconstruct.ToolShard." + toolMaterialNames[i] + ".name";
String visibleName = shardNames[i];
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
for (int i = 0; i < materialItemNames.length; i++)
{
String internalName = "item.tconstruct.Materials." + materialItemInternalNames[i] + ".name";
String visibleName = materialItemNames[i];
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
for (int i = 0; i < patterns.length; i++)
{
String internalName = "item.tconstruct.Pattern." + patterns[i] + ".name";
String visibleName = patternNames[i] + " Pattern";
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
internalName = "item.tconstruct.MetalPattern." + patterns[i] + ".name";
visibleName = patternNames[i] + " Cast";
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
//LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
//LanguageRegistry.instance().addStringLocalization("entity.TConstruct.UnstableCreeper.name", "en_US", "Nitro Creeper");
//LanguageRegistry.instance().addStringLocalization("entity.TConstruct.EdibleSlime.name", "en_US", "Blue Slime");
//LanguageRegistry.instance().addStringLocalization("entity.TConstruct.MetalSlime.name", "en_US", "Metal Slime");
//LanguageRegistry.instance().addStringLocalization("item.tconstruct.diary.diary.name", "en_US", "Tinker's Log");
LanguageRegistry.instance().addStringLocalization("item.tconstruct.Pattern.blank_pattern.name", "en_US", "Blank Pattern");
LanguageRegistry.instance().addStringLocalization("item.tconstruct.Pattern.blank_cast.name", "en_US", "Blank Cast");
//LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern");
LanguageRegistry.addName(TContent.pickaxe, "Pickaxe");
LanguageRegistry.addName(TContent.shovel, "Shovel");
LanguageRegistry.addName(TContent.axe, "Axe");
LanguageRegistry.addName(TContent.broadsword, "Broadsword");
LanguageRegistry.addName(TContent.longsword, "Longsword");
LanguageRegistry.addName(TContent.rapier, "Rapier");
LanguageRegistry.addName(TContent.frypan, "Frying Pan");
LanguageRegistry.addName(TContent.battlesign, "Battlesign");
LanguageRegistry.addName(TContent.mattock, "Mattock");
LanguageRegistry.addName(TContent.potionLauncher, "Potion Launcher");
//LanguageRegistry.addName(TContent.lumberaxe, "Lumber Axe");
}
public void readManuals() {}
@ -24,4 +98,29 @@ public class TProxyCommon
}
public void spawnParticle (String slimeParticle, double xPos, double yPos, double zPos, double velX, double velY, double velZ) {}
public static final String[] shardNames = new String[] { "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard",
"Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk", "Alumite Chunk", "Steel Chunk", "Slime Crystal Fragment" };
public static final String[] materialItemInternalNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal",
"NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot" };
public static final String[] materialItemNames = new String[] { "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal",
"Necrotic Bone", "Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum", "Bronze Ingot", "Aluminum Brass Ingot", "Alumite Ingot", "Steel Ingot", "Slime Crystal", "Obsidian Ingot" };
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn",
"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" };
public static final String[] materialNames = new String[] { " Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan",
" Board", " Broad Axe Head" };
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign" };
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" };
}

View File

@ -126,108 +126,9 @@ public class TProxyClient extends TProxyCommon
//RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo!
addRenderMappings();
}
/* Ties an internal name to a visible one. */
public void addNames ()
{
String langDir = "/mods/tinker/resources/lang/";
String[] langFiles = { "en_US.xml" };
for (String langFile : langFiles)
{
try
{
LanguageRegistry.instance().loadLocalization(langDir + langFile, langFile.substring(langFile.lastIndexOf('/') + 1, langFile.lastIndexOf('.')), true);
}
catch (Exception e)
{
e.printStackTrace();
}
}
for (int mat = 0; mat < materialTypes.length; mat++)
{
for (int type = 0; type < toolMaterialNames.length; type++)
{
String internalName = new StringBuilder().append("item.tconstruct.").append(materialTypes[mat]).append(".").append(toolMaterialNames[type]).append(".name").toString();
String visibleName = new StringBuilder().append(toolMaterialNames[type]).append(materialNames[mat]).toString();
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
}
for (int i = 0; i < shardNames.length; i++)
{
String internalName = "item.tconstruct.ToolShard." + toolMaterialNames[i] + ".name";
String visibleName = shardNames[i];
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
for (int i = 0; i < materialItemNames.length; i++)
{
String internalName = "item.tconstruct.Materials." + materialItemInternalNames[i] + ".name";
String visibleName = materialItemNames[i];
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
for (int i = 0; i < patterns.length; i++)
{
String internalName = "item.tconstruct.Pattern." + patterns[i] + ".name";
String visibleName = patternNames[i] + " Pattern";
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
internalName = "item.tconstruct.MetalPattern." + patterns[i] + ".name";
visibleName = patternNames[i] + " Cast";
LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName);
}
//LanguageRegistry.addName(TContent.manualBook, "Tinker's Log");
//LanguageRegistry.instance().addStringLocalization("entity.TConstruct.UnstableCreeper.name", "en_US", "Nitro Creeper");
//LanguageRegistry.instance().addStringLocalization("entity.TConstruct.EdibleSlime.name", "en_US", "Blue Slime");
//LanguageRegistry.instance().addStringLocalization("entity.TConstruct.MetalSlime.name", "en_US", "Metal Slime");
//LanguageRegistry.instance().addStringLocalization("item.tconstruct.diary.diary.name", "en_US", "Tinker's Log");
LanguageRegistry.instance().addStringLocalization("item.tconstruct.Pattern.blank_pattern.name", "en_US", "Blank Pattern");
LanguageRegistry.instance().addStringLocalization("item.tconstruct.Pattern.blank_cast.name", "en_US", "Blank Cast");
//LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern");
LanguageRegistry.addName(TContent.pickaxe, "Pickaxe");
LanguageRegistry.addName(TContent.shovel, "Shovel");
LanguageRegistry.addName(TContent.axe, "Axe");
LanguageRegistry.addName(TContent.broadsword, "Broadsword");
LanguageRegistry.addName(TContent.longsword, "Longsword");
LanguageRegistry.addName(TContent.rapier, "Rapier");
LanguageRegistry.addName(TContent.frypan, "Frying Pan");
LanguageRegistry.addName(TContent.battlesign, "Battlesign");
LanguageRegistry.addName(TContent.mattock, "Mattock");
LanguageRegistry.addName(TContent.potionLauncher, "Potion Launcher");
//LanguageRegistry.addName(TContent.lumberaxe, "Lumber Axe");
addToolButtons();
}
public static final String[] shardNames = new String[] { "Wood", "Stone Shard", "Iron Chunk", "Flint Shard", "Cactus Shard", "Bone", "Obsidian Shard", "Netherrack Shard",
"Slime Crystal Fragment", "Paper", "Cobalt Chunk", "Ardite Chunk", "Manyullyn Chunk", "Copper Chunk", "Bronze Chunk", "Alumite Chunk", "Steel Chunk", "Slime Crystal Fragment" };
public static final String[] materialItemInternalNames = new String[] { "PaperStack", "SlimeCrystal", "SearedBrick", "CobaltIngot", "ArditeIngot", "ManyullynIngot", "Mossball", "LavaCrystal",
"NecroticBone", "CopperIngot", "TinIngot", "AluminumIngot", "RawAluminum", "BronzeIngot", "AlBrassIngot", "AlumiteIngot", "SteelIngot", "BlueSlimeCrystal", "ObsidianIngot" };
public static final String[] materialItemNames = new String[] { "Paper Stack", "Slime Crystal", "Seared Brick", "Cobalt Ingot", "Ardite Ingot", "Manyullyn Ingot", "Ball of Moss", "Lava Crystal",
"Necrotic Bone", "Copper Ingot", "Tin Ingot", "Aluminum Ingot", "Raw Aluminum", "Bronze Ingot", "Aluminum Brass Ingot", "Alumite Ingot", "Steel Ingot", "Slime Crystal", "Obsidian Ingot" };
public static final String[] toolMaterialNames = new String[] { "Wood", "Stone", "Iron", "Flint", "Cactus", "Bone", "Obsidian", "Netherrack", "Slime", "Paper", "Cobalt", "Ardite", "Manyullyn",
"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" };
public static final String[] materialNames = new String[] { " Rod", " Pickaxe Head", " Shovel Head", " Axe Head", " Sword Blade", " Wide Guard", " Hand Guard", " Crossbar", " Binding", " Pan",
" Board", " Broad Axe Head" };
public static final String[] patterns = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign" };
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" };
public static Document diary;
public static Document volume1;
public static Document volume2;

View File

@ -450,7 +450,7 @@ public abstract class ToolCore extends Item implements ICustomElectricItem, IBox
if (tags.hasKey("Moss"))
{
int chance = tags.getInteger("Moss");
if (random.nextInt(2000) < chance)
if (random.nextInt(700) < chance)
{
AbilityHelper.damageTool(stack, -1, (EntityLiving) entity, true);
}

View File

@ -616,7 +616,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
public LiquidStack drain (int maxDrain, boolean doDrain)
{
System.out.println("Liquid: "+currentLiquid);
//System.out.println("Liquid: "+currentLiquid);
if (moltenMetal.size() == 0)
return null;

View File

@ -40,16 +40,24 @@ public class Longsword extends Weapon
return 1.5f;
}
public void onPlayerStoppedUsing (ItemStack stack, World world, EntityPlayer player, int time)
public void onPlayerStoppedUsing (ItemStack stack, World world, EntityPlayer player, int useCount)
{
if (time > 10)
int time = this.getMaxItemUseDuration(stack) - useCount;
if (time > 5)
{
player.addExhaustion(0.2F);
player.setSprinting(true);
player.motionY += 0.62;
float increase = (float) (0.02 * time + 0.2);
if (increase > 0.56f)
increase = 0.56f;
player.motionY += increase;
float f = 1.0F;
player.motionX = (double) (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * f);
player.motionZ = (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * f);
float speed = 0.05F * time;
if (speed > 0.925f)
speed = 0.925f;
player.motionX = (double) (-MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * speed);
player.motionZ = (double) (MathHelper.cos(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * speed);
}
}

View File

@ -29,6 +29,7 @@ public class Rapier extends Weapon
{
if (player.onGround)
{
player.addExhaustion(0.2f);
player.motionY += 0.32;
float f = 0.5F;
player.motionX = (double) (MathHelper.sin(player.rotationYaw / 180.0F * (float) Math.PI) * MathHelper.cos(player.rotationPitch / 180.0F * (float) Math.PI) * f);

View File

@ -0,0 +1,2 @@
Original creeper texture by John Smith
http://www.minecraftforum.net/topic/26727-johnsmith-texture-pack-v97-32x-142/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB