Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. Check if any of the Items in the players inventory as you iterate to see if they have the enchantment on them.
  2. If you want it to be forced to stay equipped you would have to use the PlayerTickEvent and iterate through there inventory and upon finding one move it to the armor slot, but only if there already isn't one. And watch out for concurrent modification exceptions.
  3. Are they your own Items override addInformation in your Item or Block class. If they are not subscribe to the ItemToolTipEvent, you can read more about events on the forge docs.
  4. You need to determine the unlocalized name based on the metadata of the ItemStack
  5. Are you sending the data to the client or to the server? If changing the IItemHandlers stack on the client doesnt update the container/gui have your packet also update the container.
  6. Send a packet to the player there are multiple ways to do this, but show your code and I can tell you which on to use. Return true in onBlockActivated
  7. If you want to decrease this you could increase the vein size, and decrease the chances to spawn in a chunk.
  8. The chance variable means how many possible chances the vein has to spawn in a chunk, not a percent chance.
  9. Ok, did you solve all of the problems we told you about? Attempting to call client only code here and here. Why are you not using the events to register models, Items, and Blocks? Read the forge docs on them you should not be doing ForgeRegistries.REGISTRYNAME.register(obj);
  10. This would still be too much. This would be 15 veins of approximately 3 blocks between y values 60-64. This would still be too much. This would be 12 veins of approximately 3 blocks between y values 56-60. All per chunk.
  11. I'm not sure why this isn't working for you, and you may want to change. To have your modid I have this which should be similar to your code and it works
  12. This has nothing to do with the random function from java.
  13. This line of code will run the code inside of the {} until i >= to chance. And i++ while add one to i every time it is ran. So this will call chance amount of times. For loop
  14. I dont know, maybe if I just had the thing that tells me what's wrong with the code, what was that called again. Oh. Yeah the crash report.
  15. @GeoffrySkio Your problem is you are reading where you should be writing and writing where you should be reading in your IMessage instance.
  16. Did you write the code for runGenerator? Did you read it? Because if you did you need to learn java or read it again. Your actually telling it to generate a batch of 3 or 100 times per chunk. Between y 69 and 64.
  17. Well considering you have not posted your updated code how was I supposed to know that or help you anymore than that.
  18. Use an IItemHandler that has one slot and access to the TEs amount field and override insertItem and extractItem as well as getStack or getStacks(whatever that method is called in IItemHandler) and return the appropriate values and update the stack inside the IItemHandler based on the amount filed. No need for a fancy slot.
×
×
  • Create New...

Important Information

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