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. 1) The two ints are the search range. From which slot to which slot. 2) What do you mean? 3) 0 to 35. By the way, if you're looking at the Forge wiki, I recently updated the mergeStack function there to not rely so heavily on Magic Numbers.
  2. NBT can store NBTList and arrays An NBT containing a list of lists of arrays may as well be a 3D array. Everything can be serialized, you just have to figure out how.
  3. Well they could. Bud you'd have to pay them. I get paid about $25 an hour for my workjob, but freelance I'd charge $250/hr.
  4. Is kind of like the stay of a race and the end. There really isn't much difference at all. But I'm pretty sure the medals are only given our once, at the end.
  5. And where is this code? What function is it sitting in? What class?
  6. Whatever works, provided you are doing it for a reason.
  7. Then your descriptive packet for the entity is bad.
  8. NBTTagCompount tag = new NBTTagCompound(); tag.setString("somekey","somevalue"); cmp.setTag("thething",tag); ?
  9. int l1 = 1 + Random.nextInt(Random.nextInt(1) + 1); l1 (which is a bad variable name) will always be 1. A random number from 0 (inclusive) to 1 (exclusive) will always be 0. 0 + 1 = 1, rand(1) again will always be 0. 0 + 1 = 1, l1 is 1. And I don't know what the problem is. You didn't say. That said, BlockX, BlockY, and BlockZ are not block locations, they're chunk locations. You need to multiply them by 16 before you do anything with them.
  10. You can save NBTTags into StackTagCompound. Just don't save an NBTTag into itself.
  11. Nice! Do you call this every time the item is rendered, or does it need to be done just once? Actually your code would only need to run once, you're just trying to get an average color (that doesn't change). But if I were to alter the pixel data, would it have to be done repeatedly?
  12. I'd just like to point out: The game doesn't give a damn, stacks are limited to 64, no ifs ands or buts. You used to be able to get up to around 110 or so (at 111 the stack became infinite in size) but no more.
  13. In theory you could render a thing that looks exactly like a cape, as long as you didn't call it a cape. But really at that point, you may as well "add another decorative item instead of capes."
  14. ...use a string...? I mean seriously, if you put the wrong thing, the game flipping tells you what it was trying to find. Because I'm pretty sure you didn't name your png "[email protected]" I mean "[email protected]", er. "[email protected]" Crap. It changes every time I run the game.
  15. Have a gui texture I did recently. And the GUI code (client side): https://github.com/Draco18s/HarderStuff/blob/master/main/java/com/draco18s/ores/client/GuiContainerSifter.java#L37-47
  16. setTextureName(Main.MODID + ":" + gemGarnet) Uh. Are you sure you want to pass an object there?
  17. Draco18s replied to Stroam's topic in Modder Support
    Easy way: There isn't one. Clean way: Make your own block, which extends BlockFalling, and recreate every vanilla block you want to fall. Hard way: ASM into the Block class's updateTick function to add a static function call to your code. Your code then replicates the effects of BlockFalling. Best way: Don't. You would need to think long and hard about how you'd go about making a ceiling so the entire world doesn't collapse out of hand as soon as you load it. Which blocks should fall, which ones shouldn't, what classes are they, and so on. I've looked at this myself and went, "ok, if I modify [this block] that means I'd have to modify [block, block, and block]. If I do that, then [another list] needs to be modified." It was a cascade failure on how many alterations I'd have to make and determined it wasn't worth it and kept it at just stone (which I did via "clean" then ASM'd BlockFalling to have a little extra tidbit so it doesn't make towers, but instead pyramids).
  18. Thanks for the digging, as always, diesieben07. I've only managed to glean so much from the SRG'd vanilla source on my own. Most of what I've figured out has been from observing the behavior of a single chunk as I interact with the system and with suggestions as I run into stumbling blocks. There's a number of headaches going on with this code, and this is only one part of it. It seems that even with a 3-chunk-deferred-radius for the generation of the data, it still doesn't find all of the trees, especially in a jungle. Neither Keybounce nor I can figure out why. But that's a problem for another thread.
  19. Can't. The save/load and tick operations happen on separate threads (that is, strait up using a HashMap causes concurrent modification exceptions) and there is no "ConcurrentWeakHashMap." Not to mention that I tick the data, so its kind of important to know if the chunk the data is associated with is active.
  20. So, in other words, I need two events to happen for me to safely say "this data is no longer relevant." First a chunkUnload, then a chunkSave (but watch out, saves can happen any time!) Yeah. While I'm sure that that makes sense, its a complete hassle from a "I want this to work" perspective. E.g. "chunkUnload" should be the last thing that happens to a chunk before it's loaded again. The event should be telling mods "this chunk is leaving, whatever cleanup you need to do, do it." loaded V gen -> (active) <-> save V unloaded Instead, the flow chart actually looks like this: loaded V gen -> (active) <-> save V unloaded -> save Note the two instances of "save." They are not identical, but it is impossible to tell the difference between them without storing extra data as the events trigger.
  21. alt-shift-r does wonders.
  22. For the love of god. Now I have chunks that generate and never get a save call before they're unloaded. This is just as bad as getting a save call after I purged the data from memory. http://static.fjcdn.com/pictures/Rage_562aea_329374.jpg[/img] Do none of these events make god damn sense? I should not have to build a data structure to track what chunks are in what state so that I don't inadvertently trash data I still need or overwrite good data with bad. The game already freaking does this, but it can't be arsed to inform me! I'm about ready to store the data in an indestructible bedrock-level tileentity.
  23. I could, but there are a lot of things that work in tandem. Aside from things that are truly configurable (e.g. length of a year), my configs don't have much in them. You can't just turn one thing of and expect everything else to work.

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.