Skip 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. Surprise, that's what a tick handler is for.
  2. Don't ever store references to entities like that. If a chunk gets unloaded and then reloaded, the entity you see is not the same as the one you've saved a reference to. This is why world.getEntitiesInAABB exists.
  3. You supply a different capability depending on the side parameter. https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/ores/entities/TileEntityMillstone.java#L166-L193
  4. That entirely depends on a race condition and exactly what you're doing. But yes, it would, eventually. With a ConcurrentModificationException.
  5. Just FYI, making a rails block that goes on the sides and bottoms of blocks won't automagically make minecarts use them properly.
  6. I did not know that. You can't, for example, interact with a TileEntity from a separate thread? TileEntities exist in the world, so no. It's called "two separate functions."
  7. I'll look around for that option in Eclipse, but the last time I did it, it definitely didn't pause the client thread. Mildly annoying, but workable.
  8. FYI you know there's both a client thread and a server thread and that this method is only called on the server and therefore the client thread isn't paused, right?
  9. https://en.wikipedia.org/wiki/Modulo_operation
  10. Gosh, I wonder what this part does. if (this == MobEffects.POISON) { int j = 25 >> amplifier; return j > 0 ? duration % j == 0 : true; }
  11. ModelLoader.setCustomModelResourceLocation(...)
  12. ModelLoader in preinit. Don't use ModelMesher, there are problems with that method.
  13. Oh, so you're adding a potion effect to the player every tick. THERES YOUR PROBLEM. Potion duration actually means something: it's a timer. Every time the potion duration is durationRemainting % 20 == 0 the effect (healing, damage) activates and is applied. If you constantly reset the potion duration then those effects never trigger.
  14. There was a mod for 1.7 that did this, but I can't remember the name.
  15. You have a 1, 2 at the end of your new Object[] array. You cannot have those there, what are you trying to do with those? Also, you do not need new Object[] due to the magic of varargs.
  16. The line above the "at" is the super important very special, extremely crucial line that tells you in English what the problem is.
  17. If you absolutely need to reference another mod's files, you need to put that code into a separate class, put the relevant calls into a function, and then call that function inside an Loader#isModLoaded(id) check. Ah la https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/ores/OresBase.java#L754-L769
  18. "Harvestable" requires a tool to be involved. Tools can only be used by players. Ergo a player object is needed. Q.E.D.
  19. 1) https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/models/block/hardore.json 2) add "shade":"false" to the elements block for the overlay textures.
  20. 1) Create a class that extends Achievement. 2) Register an event handler to wait for the appropriate event and check to see if the conditions are met, and if so, award the achievement.
  21. If your blockstate depends on the world around it, that's handled by getActualState(). It shouldn't be encoded in metadata. See: Fences.
  22. Yeah, there's really only two proxy classes needed: The common, which does everything needed by both (SSP still uses a server!) and the client, which does things the server cannot do.

Important Information

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

Account

Navigation

Search

Search

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.