Jump to content

Ronaldi2001

Members
  • Posts

    91
  • Joined

  • Last visited

Everything posted by Ronaldi2001

  1. I already have a multi tool that works as shovel, axe, pickaxe, and sword. The pickaxe and axe works perfectly fine. When using the axe feature of it it only breaks planks and logs and no modded wooden items. When using the sword part of it it kills perfectly fine but it doesnt give any mob drops, it only gives mob drops from modded mobs. package ronaldi2001.MoreItems.tools; import java.util.List; import java.util.Set; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Sets; import net.minecraft.block.Block; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraft.item.ItemAxe; import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemSpade; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; import net.minecraftforge.client.event.sound.PlaySoundEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import ronaldi2001.MoreItems.ColorfulText; import ronaldi2001.MoreItems.init.MoreItemsTools; import ronaldi2001.MoreItems.main.MoreItems; public class UltimateDemolisher extends ItemPickaxe { public UltimateDemolisher() { super(MoreItemsTools.ULTIMATETOOLS); this.setUnlocalizedName("ultimate_demolisher"); this.setCreativeTab(MoreItems.tabMoreItems); this.setRegistryName("ultimate_demolisher"); GameRegistry.register(this); damageVsEntity = 99.0F; attackSpeed = 6.0F; } @Override public Set<String> getToolClasses(ItemStack stack) { return ImmutableSet.of("pickaxe", "axe", "shovel", "sword"); } @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemstack, EntityPlayer player, List datalist, boolean bool){ datalist.add(TextFormatting.YELLOW + "Pickaxe, Shovel, Axe, and Sword"); datalist.add(TextFormatting.YELLOW + ColorfulText.ultimate("No Durability")+TextFormatting.RESET+""); } @Override public boolean hasEffect(ItemStack par1ItemStack) { return true; } }
  2. I am adding Ore Dict to my mod and I have an item that when used in crafting the durability goes down but when you use the ore Dict recipe you can only use the item once and the when it has durability the ore Dict goes away. I added the WILDCARD_VALUE to it but .registerOre is underlined in red. OreDictionary.registerOre("hammer", MoreItemsItems.hammer); How can I make this so that when the hammer has durability it still has the ore Dict name.
  3. I have a creative tab but I want the blocks in that creative tab switch every 5 seconds to another block from that creative tab. The creative tab that I want to edit it mine and the blocks are mine too. Help is apriciated
  4. This question makes no sense, you cannot override a class. All you need to do is extend ItemSword and override getAttributeModifiers(EntityEquipmentSlot, ItemStack) to provide whatever modifiers you want. When I said override I meant extend but I got It now thank you so much!!!
  5. I don't know?? Should I override ItemTool instead?
  6. I did it the same way I did and you said that should work but its not.
  7. What I said was wrong not every tool allows me to set the damageVsEntity and attackSpeed. The two tools that I am having trouble with is the Sword and Hoe.
  8. I got it to work and my original question works now. Thank you for all your help!!
  9. I did and what should be there I have know idea? That is my own handwriting and I turned it into a font.
  10. https://www.dropbox.com/s/iktpqkfbb8dau80/GameRegistry.PNG?dl=0 How about now?
  11. https://www.dropbox.com/home?preview=GameRegistry.PNG
  12. When I switch registerItem() to just register() it says I need to change it to either registerItem() or registerBlock().
  13. Do you know how to do set the two floats with other tools. I already have a topic open if you know the answer. That will be greatly appreciated!! http://www.minecraftforge.net/forum/index.php/topic,39890.0.html
  14. Thank you so much!! Thanks for the advice about when there is a crash!
  15. I am making an axe and I want it to have a custom tool material along with the other tools but when I put my custom tool material the launcher crashes when I try to load the game. I have this for my tool material. super(MoreItemsTools.ULTIMATETOOLS); For my tool material in the Tool class: public static ToolMaterial ULTIMATETOOLS = EnumHelper.addToolMaterial("ultimate_tools", 1000, -1, 100.0F, 22.0F, 50); All help will be appreciated!!
  16. What I have is the first thing I tried but it didn't work so idk. but this is the line in my class where I register the sword: GameRegistry.registerItem(ultimate_sword = new UltimateSword(ULTIMATETOOLS), "ultimate_sword"); With the .registerItem striked out.
  17. I put all this in. I would assume that it would work with this but it doesn't. package ronaldi2001.MoreItems.tools; import java.util.List; import com.google.common.collect.Multimap; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import ronaldi2001.MoreItems.ColorfulText; import ronaldi2001.MoreItems.init.MoreItemsTools; import ronaldi2001.MoreItems.main.MoreItems; public class UltimateSword extends ItemSword { private final float attackDamage; private final Item.ToolMaterial material; public UltimateSword(Item.ToolMaterial material) { super(MoreItemsTools.ULTIMATETOOLS); this.material = material; this.setUnlocalizedName("ultimate_sword"); this.setCreativeTab(MoreItems.tabMoreItems); this.attackDamage = 99.0F + material.getDamageVsEntity(); } public float getDamageVsEntity() { return this.material.getDamageVsEntity(); } @Override public boolean hasEffect(ItemStack par1ItemStack) { return true; } @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemstack, EntityPlayer player, List datalist, boolean bool){ datalist.add(TextFormatting.YELLOW + ColorfulText.ultimate("No Durability")+TextFormatting.RESET+""); } public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) { Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot); if (equipmentSlot == EntityEquipmentSlot.MAINHAND) { multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double)this.attackDamage, 0)); multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -2.4000000953674316D, 0)); } return multimap; } }
  18. Code In the sword class: package ronaldi2001.MoreItems.tools; import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import ronaldi2001.MoreItems.ColorfulText; import ronaldi2001.MoreItems.main.MoreItems; public class UltimateSword extends ItemSword { private final float attackDamage; public UltimateSword(String unlocalizedName, ToolMaterial material) { super(material); this.setUnlocalizedName(unlocalizedName); this.setCreativeTab(MoreItems.tabMoreItems); this.attackDamage = 99.0F; } @Override public boolean hasEffect(ItemStack par1ItemStack) { return true; } @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemstack, EntityPlayer player, List datalist, boolean bool){ datalist.add(TextFormatting.YELLOW + ColorfulText.ultimate("No Durability")+TextFormatting.RESET+""); } } The outcome in Minecraft: https://www.dropbox.com/s/zj1kl3q2pu77x6b/Ultimate%20Sword%20In%20Inventory.png?dl=0
  19. I'm not using ItemTool. I'm using ItemPickaxe or like ItemSword.
  20. It doesn't let me do this unless the toll is an axe.
  21. How exactly would I put it in my tool class that I want the damage be 100 and attack speed to be +10. I looked in the ItemTool call but I don't see what i'm supposed to do.
  22. I don't see it being overrided I just see where it is being implemented in ItemTool.
  23. He/She does the same thing to me. Jeez their personal text is right.
×
×
  • Create New...

Important Information

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