Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/04/17 in all areas

  1. I'd just put it in the code right before it checks if you're wearing the armour.. That way it sets it to 0 each time and then increases it afterwards.
    1 point
  2. EntityHumanFighter#initEntityAI calls super.applyEntityAttributes, which registers the entity's attributes. This method has already been called by the EntityLivingBase constructor, so the attribute registration fails with an exception because the attributes it's trying to register have already been registered. EntityHumanCivilian doesn't do this, so it can be summoned without issue.
    1 point
  3. Don't download mods from sites like Minecraftexe, these often host outdated and potentially malicious versions of mods. Only download mods from their official source, usually a Minecraft Forum thread or Curse project. You can read more about this here. You can find ATG's official Minecraft Forum thread here and Curse project here. Probably not. ATG adds several of its own biomes, these would revert to vanilla plains biomes without the mod installed. In addition, any new terrain generated would use the vanilla generator rather than the ATG one.
    1 point
  4. Either set "Use classpath of module" to "EnviromineRevived_main" for each run configuration or re-import the Gradle project and uncheck "Create separate module per source set". cpw explains how to do the latter in this video.
    1 point
  5. LivingEntityUseItemEvent.Finish is fired when an entity finishes using an item (i.e. uses it for its full duration), directly after Item#onItemUseFinish is called. This is probably the event you want. If the entity was using a potion, the stack size will have already been reduced by 1 when the event is fired. If the stack was empty after this (i.e. stack size was reduced to 0), it will have been replaced by an ItemStack of Items.GLASS_BOTTLE. If you want access to the original ItemStack, you'd need to subscribe to LivingEntityUseItemEvent.Tick and store a copy of it (not the original) in a capability attached to the entity (if it's a potion). The PotionUtils class has several methods that read PotionEffects from potion item NBT.
    1 point
  6. I'm like brand new to modding so take my info with a grain of salt. I believe the storage class should only be used to read and write the nbt and as long as it's registered and attached, the provider will automatically call the read/write nbt methods of the storage class from the serializeNBT and deseralizeNBT methods . The client won't actually save and load the nbt data though, so it will probably just be default values. So in PlayerLoggedInEvent you just send a packet from the server to the client to sync the data. From here I don't know whether you handle the increase/decrease of mana only server side or both client and server side. For me I only handle the mana server side and I use PlayerTickEvent to send a packet to the client to sync the mana. Here is an older tutorial, but it still works: http://www.planetminecraft.com/blog/forge-tutorial-capability-system/ Other useful links: https://mcforge.readthedocs.io/en/latest/datastorage/capabilities/ http://jabelarminecraft.blogspot.com/p/minecraft-17x.html
    1 point
  7. Because Windows 7 is still better than literally any other version of Windows?
    1 point
×
×
  • Create New...

Important Information

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