
InspectorCaracal
Members-
Posts
63 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
InspectorCaracal's Achievements

Stone Miner (3/8)
3
Reputation
-
[1.18.2] Modifying PoiType sets
InspectorCaracal replied to InspectorCaracal's topic in Modder Support
*redacted* Never mind what I had here, the nice tag-based solution was implemented in 1.19 -
My mod adds several new beehives, but the mechanism I used in 1.16.5 to make bees actually use them doesn't seem to be working any more in 1.18.2 This is where I patch the POI set in 1.16.5 And this is the version updated for 1.18.2: private void setup(final FMLCommonSetupEvent event) { Runnable patch_hives = () -> { try { LOGGER.debug("Modifying POI register for beehives"); final Set<BlockState> HIVES = ImmutableList.of(Blocks.BEEHIVE, ModBlocks.OAK_BEEHIVE.get(), ModBlocks.DARK_OAK_BEEHIVE.get(), ModBlocks.SPRUCE_BEEHIVE.get(), ModBlocks.ACACIA_BEEHIVE.get(), ModBlocks.BIRCH_BEEHIVE.get(), ModBlocks.JUNGLE_BEEHIVE.get()).stream().flatMap((block) -> { return block.getStateDefinition().getPossibleStates().stream(); }).collect(ImmutableSet.toImmutableSet()); ObfuscationReflectionHelper.setPrivateValue(PoiType.class, PoiType.BEEHIVE, HIVES, "f_27325_"); } catch (Exception e) { LOGGER.error(e); } }; event.enqueueWork(patch_hives); } However, this updated function is resulting in bees ignoring my new hives and only using vanilla hives and nests. Did I update something incorrectly? Or is there a new/better way to do this?
-
I did see that thread - but the thing is, I don't have this problem *unless* I'm running my own mod. If I run 1.18.2 forge normally, it's fine. If I run 1.18.2 with my mod .jar in the mods folder, it crashes. I don't want to release an upgraded mod that might cause people's game to crash when their game otherwise works fine... I feel like it must be caused something in my build environment or settings, but minecraft modding is the only thing I work with gradle or java for so I don't have the faintest idea what kind of things to look at changing. Would changing my drivers affect the output jar somehow?
-
Long story short: I'm updating my mod from 1.16.5 to 1.18.2 I've gone through and, to the best I could find, updated the code itself `gradlew build` completes successfully When I try to either run `gradlew runClient` or use my built mod .jar in a 1.18.2 forge install, it crashes when it starts trying to render the client window (the AMD driver access violation error reporting from atio6axx.dll ) When I run ANY other forge version with ANY other mods, everything works fine, so I'm completely confident it's not my computer and is something I've done wrong with my mod or the build environment I don't do any custom models or rendering, so I have no idea where or what might still be broken. Where should I start looking? (The 1.16.5 mod code is on github here if that's helpful; it's the same base code, just without all of the mappings and library changes I've applied while working on updating.)
-
Original post saved for posterity, but it's obviously been too long since I did MC modding, haha... After banging my head on this for two days and finally posting here, I was digging through the docs again aaaand was reminded that you can't build it in the IDE; `gradlew build` is working as expected, so this is a non-issue. I'm trying to update my mod to 1.18.2 and I'm being completely stalled by the set-up process apparently generating incorrect files. After doing `gradlew genEclipseRuns` and opening the project (fresh or otherwise) in Eclipse, I get these errors: Archive for required library: '.gradle/caches/forge_gradle/mcp_repo/de/oceanlabs/mcp/mcp_config/1.18.2-20220404.173914/joined/mergeMappings/output.jar' in project 'betterbeekeeping' cannot be read or is not a valid ZIP file Archive for required library: '.gradle/caches/forge_gradle/minecraft_user_repo/mcp/1.18.2-20220404.173914/joined/mergeMappings/output.jar' in project 'betterbeekeeping' cannot be read or is not a valid ZIP file Inspecting the file itself confirmed that it is just a text file that's been renamed to a .jar suffix. Is this expected? How do I fix this so that Eclipse can build the project? Everything I've tried so far has given the exact same result.
-
Did you at least try it...?
-
I'm pretty sure they have to be in the "mods" folder, not in another folder inside the mods folder. Try taking them out of the 1.16.5 folder and putting the files straight into the mods folder.
-
Tags & conflicting forge docs
InspectorCaracal replied to InspectorCaracal's topic in Modder Support
Oof, good to know. And thanks for the link! I can figure the rest out from there if it doesn't translate straight over. -
The using tags in code section of the forge docs describes using one set of functions but the example is completely different. Which should I be following?
-
Magma error mod please help
InspectorCaracal replied to Miguelito223's topic in Support & Bug Reports
This is a huge mess but I'd start with the top line there Especially since later on it says -
(I don't have a Forge solution so general debugging advice here) Did you manage to track down where exactly it's not working, or is the "not setting it" just a description of the effects? If you aren't sure where exactly it's not working the way it's supposed to, what I like to do to narrow down the issue is put in debug log lines that echo the status of the variables or code at all the steps of the process that's not working. Echoing your input/output for your set and get methods to console, for example, or checking the status of your items list at each step to see where it changes, or doesn't change, and so on. Then you can track down exactly which function call(s) aren't working right and try alternatives for them.
-
Ahhhh, got it. That's what I get for going and doing my own thing haha edit: Made that change and it all works perfectly now, thanks!
-
Hmm. Can you make the other mod a dependency and then call the methods from the other mod directly? I'm not experienced at all in mods let alone inter-mod functionality, but if that's possible, it'd be the right way to do it, I think.
-
Hmm, that all looks fine, I'm not sure why it's not showing up for you. Are you getting any loading errors for the advancement in your debug log or console output? Also, FYI, the "requirements" item is optional; if all your criteria are required, you can just leave it off.