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. You seem to be wanting to affect the horse, but you look for cow. That item doesn't exist in that loot table, so I'm not sure why you're doing that. Hopefully you pulled in my LootUtils class, yes?
  2. That event does not exist on 1.14. Well, the class does, but it isn't fired. https://github.com/MinecraftForge/MinecraftForge/pull/5871
  3. And now you know why I use my EasyRegistry class The only time I have that kind of problem is when there's a new type of thing I need to register.
  4. You need to tell Minecraft that your model exists in the ModelRegistryEvent, like so: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java#L198
  5. Having messed with it recently (could weeks ago), have my results: https://github.com/Draco18s/MinecraftForge/blob/Global-Loot-Funcs/src/main/java/net/minecraftforge/common/loot/LootModifierManager.java#L36 Note that the MinecraftServer instance needs to know about your JsonReloadListener. https://github.com/Draco18s/MinecraftForge/blob/Global-Loot-Funcs/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch#L24
  6. Use player.getAdvancements() as your PlayerAdvancements object. The way trigger works is that trigger is passed a player and calls getAdvancements on it in order to get all the listeners. You'll have to do that for every player that joins the server (and call remove when they leave).
  7. You'd have to see how Advancements uses them, I'm pretty sure you can utilize the existing systems for your own use.
  8. What is your use-case here?
  9. Oh. 1.12 Use this: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/util/LootUtils.java Take that whole thing, put it in your project in (use your own package) and invoke its methods during the LootTableLoadEvent. (Yes, you can use it, its a utility class, I really don't care. I did a lot of futzing around figuring out how the stuff works so you don't have to) Example usage https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/FarmingEventHandler.java#L425
  10. This is unused. You create a SetCount object and then immediately discard it. Also, you should definitely do this json-ly. https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderfarming/EventHandlers.java#L49-L57 https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/resources/data/harderfarming/loot_tables/entities/leather.json
  11. That's mostly just creating a list or other Set that contains unique blockpos locations for each tree.
  12. Oh yeah, a lot of it isn't relevant, I just meant the one-or-two functions (down to line 395) for propagating upwards from the "root" and making sure to catch every log. That's also old 1.10 code, but basically all it does is look at blocks above and blocks adjacent (as well as 1-above the 8 adjacent positions). That code absolutely catches every log in all the vanilla tree types. This function did the chunk scanning for generated trees (the task you've stated as still needing). https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/util/TreeCountGenerator.java#L55 But it's not perfect. There's all kinds of weird edge cases that are hard to detect correctly (like the aforementioned floating trees).
  13. That horizontal propagation will also work for dark oak (but you'd probably still want all four base blocks "tree" root blocks). Here's how I handled it: https://github.com/Draco18s/HarderStuff/blob/master/src/main/java/com/draco18s/wildlife/util/TreeDataHooks.java#L338
  14. Oof, good luck. I did work that tried to detect "living" trees and there are so many edge-cases its insane. Does a tree that has the ground under it replaced by a lake count as "living"? Does a tree growing on gravel count as "living"? Do those 1-tall "bushes" in jungles count as "trees"? Are dark oak trees 1 tree or 4?
  15. It effectively doesn't exist. See this comment: https://github.com/MinecraftForge/MinecraftForge/pull/5871/#issuecomment-542697064
  16. getOpposite doesn't care about horizontal or not.
  17. No, that would be wrong. context.getFace() is the face you're placing against (so the North face). Getting the opposite of that would give you South, facing the block into the block you clicked on, not facing the player. To use the player's facing you use (gasp) context.getPlacementHorizontalFacing() (Its almost like you looked at your own code and went "this is what I use to do the thing you want, so don't do that, do this other thing")
  18. 1) Use a spoiler tag 2) "Exit Code 1" is not an error. It is simply the last thing printed before the executable closed (in this case the 1 means "there was an error") This appears to be the actual error: [21:46:18] [main/INFO] [STDERR/]: [java.lang.Throwable:printStackTrace:643]: Caused by: joptsimple.MultipleArgumentsForOptionException: Found multiple arguments for option output, but you asked for only one
  19. Dug into it, found all the right bits, wired it up and...nothing. Turns out: Allow mods actually to have their own usable config gui (#6208) JoJoDeveloping authored and LexManos committed 4 hours ago The bit that allows it to show up was literally just added.
  20. Gotcha. I'll look into it.
  21. Ok, my config toml file is getting populated with values, but the config button on the main menu's mods list is still grayed out. (And yes, the description there is wrong, I put the wrong one in the toml file)
  22. I've seen Cadiboo's code regarding configs (see his post, here), but in implementing it myself I'm not seeing it in-game nor am I getting a config file generated on disk (ok, the file is generated, but it is blank). I'm not sure what I haven't set up, as far as I can tell, its exactly like Cadiboo's example (just with different config fields). https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/flowers/OreFlowers.java#L44-L55 https://github.com/Draco18s/ReasonableRealism/tree/1.14.4/src/main/java/com/draco18s/flowers/config
  23. Draco18s replied to a post in a topic in Modder Support
    *Shrug* From my point of view, you created a bunch of stuff all at once (maybe copy-pasted from an old version?) without checking any of it to make sure it worked before going for more. Always work on one block or item or system at a time, make sure its working 100%* before moving on to another. *Sure, there are things that interleave sometimes, such as a crop and its seed, those can be worked on as a single operational group. And sometimes you need to break a thing down into smaller pieces and work on them and they won't be 100% until the larger structure is done, but you can handle that with placeholders and TODOs, but there you know what part isn't complete when you test it (for example, my ore system relies heavily on Custom Ore Gen and several ore generation events that don't exist, but that doesn't mean I can't make the blocks, items, loot tables, recipes, and enchantments, I just know I can't test the ore gen and prospecting systems until those events exist).
  24. The simple answer is "any and all." The only time you wouldn't need to would be if you were going to send a new packet somewhere and did not need to interact with anything outside the handler's current scope. These situations will be so rare and edge-case as to be practically nonexistent.

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.