Jump to content

pirulo259

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by pirulo259

  1. another 1.9.4 tutorial: Shadowfacts
  2. Sorry for bad english: 1. Initialize your blocks (create, register, set names, models, etc) 2. Initialize your items (create, register, set names, models, etc) Your Crop (do not pass seed and fruit/crop in constructor): The "crop manager" (my simple way to map a plant => seed, crop/fruit): And then (after you initialize your items and blocks): 3. Add your block, your item seed and your item fruit/crop (blocks and items will exists): Now you can create many crops-like plants using only 1 class (MyCrop class)
  3. (sorry bad english, i'm from venezuela) Nice mod to start. but 2 things: 1. You need to update your mod to a newer version of forge because some methods (in Item) have been deofuscated. 2. There is no recipe for Ender Pearl -> Ender Shards, we are unable to craft ender pearl tool set in survival.
  4. He don't want to add a new tool material because that will change the damage of the entire tool set. And obviously, the sword must extends ItemSword, i only was showing the field "field_150934_a". You only need add this to your custom sword constructor: public YourCustomSword(Item.ToolMaterial material) { ... this.field_150934_a = mySwordDamage + material.getDamageVsEntity(); } where "field_150934_a" is the damageVsEntity of the Item itself, and "mySwordDamage"(float) will be your custom damage only for your sword. you can assign your sword damage directly in your class or passing it as parameter. hope this helps!
  5. There is a tutorial for custom armor model in minecraft forum: http://www.minecraftforum.net/topic/2001807-172how-to-code-custom-3d-armor-models-3d-weapons-or-items-tutorial-by-senpaisubaraki/
  6. (sorry for bad english, i'm from venezuela) Override this methods on your crop @Override public Item getItemDropped(int meta, Random random, int fortune) //get drop item based on meta { return meta == 7 ? this.getCropItem() : this.getSeedItem(); } @SideOnly(Side.CLIENT) public Item getItem(World world, int x, int y, int z) //get item with mouse wheel { return this.getSeedItem(); } @Override public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) //get drops array { ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); int count = quantityDropped(metadata, fortune, world.rand); for(int i = 0; i < count; i++) { Item item = getItemDropped(metadata, world.rand, fortune); if (item != null) { drops.add(new ItemStack(item, 1, damageDropped(metadata))); } } if (metadata >= 7) { for (int i = 0; i < 3 + fortune; ++i) { if (world.rand.nextInt(15) <= metadata) { drops.add(new ItemStack(this.getSeedItem(), 1, 0)); //<-- here } } } return drops; }
  7. (sorry for bad english, i'm from venezuela) public class ItemSword extends Item { private float field_150934_a; private final Item.ToolMaterial field_150933_b; public ItemSword(Item.ToolMaterial p_i45356_1_) { this.field_150933_b = p_i45356_1_; this.maxStackSize = 1; this.setMaxDamage(p_i45356_1_.getMaxUses()); this.setCreativeTab(CreativeTabs.tabCombat); this.field_150934_a = 4.0F + p_i45356_1_.getDamageVsEntity(); } ... /** * Gets a map of item attribute modifiers, used by ItemSword to increase hit damage. */ public Multimap getItemAttributeModifiers() { Multimap multimap = super.getItemAttributeModifiers(); multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.field_150934_a, 0)); return multimap; } } where 4.0F is the damage of the sword plus the tool material damage change 4.0F to whatever you want
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.