spear_finished
This commit is contained in:
@@ -281,6 +281,7 @@ item.fireBow.name=Fire Bow
|
||||
item.longbow.name=Longbow
|
||||
item.gladius.name=Gladius
|
||||
item.battleAxe.name=Battle Axe
|
||||
item.itemITSpear.name=Iron Tipped Spear
|
||||
item.itemIronTippedModelArrow.name=Iron Tipped Longbow Arrow
|
||||
item.itemModelArrow.name=Longbow Arrow
|
||||
item.workBlade.name=Crafting Blade
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
"modid": "kitsumedievalcraft",
|
||||
"name": "ForgeCraft",
|
||||
"description": "ForgeCraft",
|
||||
"version": "{2.2.5}",
|
||||
"version": "{2.2.6}",
|
||||
"mcversion": "{1.7.10}",
|
||||
"url": "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2296334-wip-kitsus-forgecraft-blacksmith-style-forging",
|
||||
"updateUrl": "https://bitbucket.org/kitsushadow/kitsus-forgecraft/downloads",
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Main {
|
||||
|
||||
public static final String MODID = "kitsumedievalcraft";
|
||||
public static final String MODNAME = "ForgeCraft";
|
||||
public static final String VERSION = "2.2.5";
|
||||
public static final String VERSION = "2.2.6";
|
||||
|
||||
public static SimpleNetworkWrapper sNet;
|
||||
|
||||
|
||||
@@ -260,6 +260,7 @@ public final class ModCrafting {
|
||||
gladius0.stackTagCompound = new NBTTagCompound();
|
||||
gladius0.stackTagCompound.setInteger("GLADIUSTEXTURE", 0);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(gladius0, new Object[]{"x", "y", Character.valueOf('y'), "strapLeather", 'x', ModItems.ironshortswordBlade}));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe((ModItems.itemITSpear), new Object[]{"a", "c", "b", 'a', ModItems.ironspearTip, 'b', ModItems.woodentoolHandle, Character.valueOf('c'), "strapLeather"}));
|
||||
|
||||
//-----------------------PICKAXE COMBOS-----------------------//
|
||||
//BASE PICK
|
||||
|
||||
@@ -30,6 +30,7 @@ public class ItemITSpear extends ItemSword {
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
setTextureName(Main.MODID + ":" + name);
|
||||
setMaxDamage(100);
|
||||
GameRegistry.registerItem(this, name);
|
||||
|
||||
}
|
||||
@@ -44,22 +45,27 @@ public class ItemITSpear extends ItemSword {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack p_77659_1_, World p_77659_2_, EntityPlayer p_77659_3_)
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
ArrowNockEvent event = new ArrowNockEvent(p_77659_3_, p_77659_1_);
|
||||
ArrowNockEvent event = new ArrowNockEvent(player, stack);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
if (event.isCanceled())
|
||||
{
|
||||
return event.result;
|
||||
}
|
||||
if (p_77659_3_.capabilities.isCreativeMode || p_77659_3_.inventory.hasItem(ModItems.itemITSpear))
|
||||
if (player.capabilities.isCreativeMode || player.inventory.hasItem(ModItems.itemITSpear))
|
||||
{
|
||||
p_77659_3_.setItemInUse(p_77659_1_, this.getMaxItemUseDuration(p_77659_1_));
|
||||
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
|
||||
}
|
||||
return p_77659_1_;
|
||||
if(!world.isRemote){
|
||||
this.setMaxDamage(500);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
public void onPlayerStoppedUsing(ItemStack p_77615_1_, World p_77615_2_, EntityPlayer p_77615_3_, int p_77615_4_)
|
||||
{
|
||||
if (!p_77615_2_.isRemote)
|
||||
{
|
||||
int j = this.getMaxItemUseDuration(p_77615_1_) - p_77615_4_;
|
||||
ArrowLooseEvent event = new ArrowLooseEvent(p_77615_3_, p_77615_1_, j);
|
||||
@@ -69,8 +75,8 @@ public class ItemITSpear extends ItemSword {
|
||||
return;
|
||||
}
|
||||
j = event.charge;
|
||||
boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
|
||||
if (flag || p_77615_3_.inventory.hasItem(ModItems.itemITSpear))
|
||||
//boolean flag = p_77615_3_.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, p_77615_1_) > 0;
|
||||
if (p_77615_3_.inventory.hasItem(ModItems.itemITSpear))
|
||||
{
|
||||
float f = (float)j / 20.0F;
|
||||
f = (f * f + f * 2.0F) / 3.0F;
|
||||
@@ -87,7 +93,7 @@ public class ItemITSpear extends ItemSword {
|
||||
{
|
||||
entityspear.setIsCritical(true);
|
||||
}
|
||||
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_);
|
||||
/*int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, p_77615_1_);
|
||||
if (k > 0)
|
||||
{
|
||||
entityspear.setDamage(entityspear.getDamage() + (double)k * 0.5D + 0.5D);
|
||||
@@ -100,20 +106,16 @@ public class ItemITSpear extends ItemSword {
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, p_77615_1_) > 0)
|
||||
{
|
||||
entityspear.setFire(100);
|
||||
}
|
||||
p_77615_1_.damageItem(1, p_77615_3_);
|
||||
}*/
|
||||
//p_77615_1_.damageItem(1, p_77615_3_);
|
||||
p_77615_2_.playSoundAtEntity(p_77615_3_, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
|
||||
if (flag)
|
||||
{
|
||||
entityspear.canBePickedUp = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
p_77615_3_.inventory.consumeInventoryItem(ModItems.itemITSpear);
|
||||
}
|
||||
if (!p_77615_2_.isRemote)
|
||||
{
|
||||
|
||||
|
||||
this.setMaxDamage(100);
|
||||
p_77615_2_.spawnEntityInWorld(entityspear);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class RendererRegistry {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.heavyMace, new ItemRenderHeavymace());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.battleAxe, new IRBattleAxe());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gladius, new IRGladius());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.workBlade, new IRCraftingBlade());
|
||||
//MinecraftForgeClient.registerItemRenderer(ModItems.workBlade, new IRCraftingBlade());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.slottedTongs, new IRSlottedTongs());
|
||||
|
||||
|
||||
@@ -66,26 +66,21 @@ public class IRITSpear implements IItemRenderer{
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
if(item.getMaxDamage()==500){
|
||||
GL11.glTranslatef(0.5F, 0.6F, -0.125F);
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
}
|
||||
if(item.getMaxDamage()==100){
|
||||
GL11.glTranslatef(0.5F, 0.4F, -0.0F);
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(140F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(-20F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(40F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
|
||||
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
@@ -93,21 +88,16 @@ public class IRITSpear implements IItemRenderer{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glTranslatef(0.0F, 2.0F, 0.0F);
|
||||
//GL11.glRotatef(45F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45F, 0.0F, -1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
//GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
||||
|
||||
if(item.getMaxDamage()==500){
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, 0.8F, -0.2F);
|
||||
}
|
||||
if(item.getMaxDamage()==100){
|
||||
GL11.glRotatef(110F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(0.0F, -0.5F, -0.2F);
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
@@ -116,10 +106,11 @@ public class IRITSpear implements IItemRenderer{
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float iscale = 9F;
|
||||
float iscale = 5F;
|
||||
GL11.glScalef(iscale, iscale, iscale);
|
||||
//GL11.glRotatef(-45, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(1.5F, 1.5F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glTranslatef(0.2F, 1.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
@@ -132,7 +123,7 @@ public class IRITSpear implements IItemRenderer{
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
GL11.glScalef(5.0F, 5.0F, 5.0F);
|
||||
GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
//GL11.glTranslatef(5.0F, 5.0F, 5.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
@@ -281,6 +281,7 @@ item.fireBow.name=Fire Bow
|
||||
item.longbow.name=Longbow
|
||||
item.gladius.name=Gladius
|
||||
item.battleAxe.name=Battle Axe
|
||||
item.itemITSpear.name=Iron Tipped Spear
|
||||
item.itemIronTippedModelArrow.name=Iron Tipped Longbow Arrow
|
||||
item.itemModelArrow.name=Longbow Arrow
|
||||
item.workBlade.name=Crafting Blade
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"modid": "kitsumedievalcraft",
|
||||
"name": "ForgeCraft",
|
||||
"description": "ForgeCraft",
|
||||
"version": "{2.2.5}",
|
||||
"version": "{2.2.6}",
|
||||
"mcversion": "{1.7.10}",
|
||||
"url": "http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/2296334-wip-kitsus-forgecraft-blacksmith-style-forging",
|
||||
"updateUrl": "https://bitbucket.org/kitsushadow/kitsus-forgecraft/downloads",
|
||||
|
||||
Reference in New Issue
Block a user