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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. Draco18s replied to ter0's topic in Modder Support
    You need to create your own IRecipe implementation.
  2. HardLib is a "main mod class." I could have done "this" as well. And because I need to get is class loader. From which I then call getResourceAsStream() The byte array holds data between the buffer reader and the buffet writer. Lines 62 and 64. The buyer writer in this case being to a normal File object.
  3. You can't do it like this. Even if you did get it working, it wound fall the moment you compiled your mod into a jar because then your assets don't exist as files on the drive, but contents of a zipped file. This code may help: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/hardlib/CogHelper.java#L56
  4. This is nonsense. You need to return an instance of IMana
  5. @diesieben07 : do we have a common issue for this yet?
  6. What are you using this information for?
  7. Please do not scatter bold text like that, it actually harms the readability of your post.
  8. ItemStack#isEmpty does not work on null stacks. It will crash.
  9. For reference, you can scan an entire chunk and replace blocks in about 400,000 nanos (0.4 ms). You don't really need to worry about time slicing.
  10. I think he means the baked item model. Which wound be the IBakedModel instance.
  11. Items have models, and models have one or more textures.
  12. Just to check: How are you storing these additional properties?
  13. someUuid == otherUuid
  14. Entities swimming in water is handled by the entity class(es) and checks specifically for Material.WATER
  15. Again, you check to see if your data contains the player before adding the modifier (and if they're not in it, you don't add the modifier). You also don't do a damn thing with hasHealthBoost
  16. That had nothing to do with what I said, at all. Imagine a player equips your armor set for the full time. They will not exist in your playersWithSet collection.
  17. Note: IStateMapper / StateMapperBase are client side only.
  18. I just want to look at this section for a bit: Boolean hasMithrilSet = ArmorMithril.isFullSet(player); if(playersWithSet.contains(key)) { //do stuff } else if(hasMithrilSet) { playersWithSet.add(key); } Equipment changed! Player has a full set! We have no idea who this player is! Store player in list! Done! Wot.
  19. You really should dig through the Item class at some point. public int getMaxDamage(ItemStack stack) { return getMaxDamage(); } ItemStacks can store data beyond just what Item it represents, but also capabilities and NBT data, all of which is accessible in the above Item method.
  20. Blocks are singletons, there exists exactly 1 instance of your block class. All of your blocks would share a reference to the singular TE. You cannot do this. @diesieben07 candidate for common problem.
  21. This: https://gist.github.com/Terrails/60cb566ea175bef4ca92ff5bd246bdb5#file-gistfile1-java-L1 Will never work. You want to get the material for the block based on its state, then you need to provide that state information via getActualState
  22. I take it this was too hard to arrive at: player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(new AttributeModifier(uuid, name, 2, 2)); UUID is a unique UUID (you can create one at random, then save it as a hardcoded value). name is just whatever you want to call it.

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.