Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Opengbil

Members
  • Joined

  • Last visited

Everything posted by Opengbil

  1. I would like to see how vanilla minecraft code is structured. How can I access the vanilla code with eclipse?
  2. I am trying to get the horse armor item that is currently on the horse entity. @EventBusSubscriber(modid = Reference.MODID) public class DamageHorseArmor { @SubscribeEvent public static void DamageWoodArmor(LivingAttackEvent event){ World world = event.getEntity().getEntityWorld(); Entity victim = event.getEntity(); if(!world.isRemote){ if(victim instanceof EntityHorse){ if(((EntityHorse)victim).getHorseArmorType() == MaterialReference.WOOD){ } } } } } The line of code: ((EntityHorse)victim).getHorseArmorType() Only returns the material type, but not the item itself which I need.
  3. I couldn't find any methods or variables with words like durability in ItemTool nor in ItemSword sadly. What Method can help me to deal damage to an item?
  4. I would like to add a durability bar to a custom item that is not a type of tool (like ItemSword) but a regular Item. How should I go about it?
  5. Finally Worked! The texture is all screwed up tho xd. Thank you so much!
  6. "Minecraft identifies resources using ResourceLocations. A ResourceLocation contains two parts: a namespace and a path. It generally points to the resource at assets/<namespace>/<ctx>/<path>, where ctx is a context-specific path fragment that depends on how the ResourceLocation is being used." public class MaterialReference { public static final HorseArmorType WOOD = EnumHelper.addHorseArmor(Reference.MODID + ":" + "wood", Reference.MODID + ":" + "horse_armor_wood", 2); } public class WoodHorseArmor extends Item{ public WoodHorseArmor(){ setCreativeTab(CreativeTabs.COMBAT); setUnlocalizedName(Reference.MODID + ":" + "wood_horse_armor"); setRegistryName("wood_horse_armor"); } @Override public HorseArmorType getHorseArmorType(ItemStack stack){ return MaterialReference.WOOD; } }
  7. I tried to put a specific file path. I even tried to put the png directly to the modid folder but it didn't work . Are you sure there is no ctx associated with this type of textures?
  8. I am trying to add a new type of horse armor. I have managed to register the item and it shows up. But whenever I put it on a horse is turns white. public class MaterialReference { public static final HorseArmorType WOOD = EnumHelper.addHorseArmor(Reference.MODID + ":" + "wood", Reference.MODID + ":" + "horse_armor_wood", 500); } public class WoodHorseArmor extends Item{ public WoodHorseArmor(){ setCreativeTab(CreativeTabs.COMBAT); setUnlocalizedName(Reference.MODID + "." + "woodhorsearmor"); setRegistryName("woodhorsearmor"); } @Override public HorseArmorType getHorseArmorType(ItemStack stack){ return MaterialReference.WOOD; } } Where should I put the texture file for the model it self (the change of horse texture when I put the armor)?
  9. I would like to edit the texture of Horse. Is there a source where can I download the vanilla textures?
  10. public class WoodHorseArmor extends Item{ public static final HorseArmorType HORSECRAFT_HORSEARMOR = EnumHelper.addHorseArmor("WOOD", Reference.MODID + ":" + "items/woodhorsearmor", 500); public WoodHorseArmor(){ setCreativeTab(CreativeTabs.COMBAT); setUnlocalizedName(Reference.MODID + "." + "woodhorsearmor"); setRegistryName("woodhorsearmor"); } @Override public HorseArmorType getHorseArmorType(ItemStack stack){ return HorseArmorType.WOOD; } }
  11. I override but when I am unable to add my custon armor to the HorseArmorType enum. This is the line that should add to the enum: public static final HorseArmorType HORSECRAFT_HORSEARMOR = EnumHelper.addHorseArmor(Reference.MODID + ":" + "horsecraft_horsearmor", Reference.MODID + ":" + "horsecraft", 500); What am I missing here?
  12. At your json model file for the item change the word "generated" to "handheld".
  13. I am trying to create a new type of horse armor and can't find which class should I extend. What is the proper class for this?
  14. Thank you I have tried for ages to figure this out!
  15. I am trying to spawn a horse at explosion event. What command there is to spawn entities in specific location?
  16. Thank you Mysterious I will try them out!
  17. I am new to modding and would like to get a recommendation. What is the best editing software for designing textures and models?
  18. I'll post the code on Github. How should I know wich part of the code is relevent to my crash. Where can I find information about how to read the crash file?
  19. Should I just zip it all and upload to here?
  20. I am new to modding I can't figure out why is my Mod failing to run. It's now the third time I try to add a simple block unsuccessfully. I am attaching the crash file. crash-2019-05-12_14.40.19-client.txt
  21. The MinecraftForge Documentation is very overwhelming and difficult to understand. Can somebody recommend a good learning source to begin with?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.