Jump to content

Syric

Members
  • Posts

    108
  • Joined

  • Last visited

Everything posted by Syric

  1. I'd advise posting a crash log. There's not much we can do without one, other than suggest that you remove mods until it starts working again.
  2. Looks like I was registering incorrectly! (Your advice does make it render all the time, but I fixed that by using OverlayRegistry.enableOverlay() in the RenderFogEvent.) My overlays are now working perfectly, thanks so much! Do you know how I can resolve the fog issue? I'm trying to modify a RenderFogEvent's near and far planes, but it isn't working. The documentation says I need to cancel the event for those modifications to take effect. How can I cancel that event without just deleting the fog entirely?
  3. Thanks! That still doesn't solve my static-context problem for registering it, though.
  4. I can make a new class that implements IIngameOverlay and override #render just fine. However, I can't register it unless my render method is static, in which case it can't override IIngameOverlay anymore. Also, where would I put the code that dictates when the overlay is rendered? The class: public class VitaSlimeOverlay implements IIngameOverlay { protected static final ResourceLocation VITA_SLIME_LOCATION = new ResourceLocation("alchemine:textures/misc/vita_slime_outline.png"); protected static final Float opacity = 0.9F; public void render(ForgeIngameGui gui, PoseStack poseStack, float partialTick, int width, int height) { RenderSystem.disableDepthTest(); RenderSystem.depthMask(false); RenderSystem.defaultBlendFunc(); RenderSystem.setShader(GameRenderer::getPositionTexShader); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, opacity); RenderSystem.setShaderTexture(0, VITA_SLIME_LOCATION); Tesselator tesselator = Tesselator.getInstance(); BufferBuilder bufferbuilder = tesselator.getBuilder(); bufferbuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); bufferbuilder.vertex(0.0D, (double) height, -90.0D).uv(0.0F, 1.0F).endVertex(); bufferbuilder.vertex((double) width, (double) height, -90.0D).uv(1.0F, 1.0F).endVertex(); bufferbuilder.vertex((double) width, 0.0D, -90.0D).uv(1.0F, 0.0F).endVertex(); bufferbuilder.vertex(0.0D, 0.0D, -90.0D).uv(0.0F, 0.0F).endVertex(); tesselator.end(); RenderSystem.depthMask(true); RenderSystem.enableDepthTest(); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); } } The registration: // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public static class ClientModEvents { @SubscribeEvent public static void onClientSetup(FMLClientSetupEvent event) { // Some client setup code LOGGER.info("HELLO FROM CLIENT SETUP"); LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName()); ... OverlayRegistry.registerOverlayTop("vita_slime_overlay", (gui, poseStack, partialTick, screenWidth, screenHeight) -> { gui.setupOverlayRenderState(true, false); VitaSlimeOverlay.render(gui, poseStack, partialTick, screenWidth, screenHeight); }); } } The issue is that with this setup, the non-static method VitaSlimeOverlay.render can't be called in the registration code's static context.
  5. Thank you for this! I can successfully set the fog's color. However, it's rendering as normal fog in the distance, rather than very close by like in powder snow. I believe this is because my attempts to change the fog's distance aren't working: the comments on EntityViewRenderEvent say that the event needs to be cancelled for changes to take effect, and I'm not sure how to handle that. My current method is to cancel the event, change the distance while it's cancelled, and then uncancel it. This isn't working, even though the print statement says the distance has been updated. public static void renderFog(final EntityViewRenderEvent.RenderFogEvent event) { if (event.getCamera().getBlockAtCamera().getBlock().equals(alchemineBlocks.VITA_SLIME.get())) { if (event.isCancelable()) { event.setCanceled(true); event.setFarPlaneDistance(2.0F); event.setNearPlaneDistance(0.0F); event.setCanceled(false); // System.out.println("Fog Far Plane Distance: " + event.getFarPlaneDistance()); } // System.out.println("Fog Type: " + event.getMode().toString()); } } Do I instead have to cancel the event, copy it into a new event, and then post that to the bus somehow? How would I do that?
  6. Thank you!
  7. Yes, thank you, I did in fact read your post. I would not be asking follow-up questions if that alone was sufficient for me to understand. Would you mind elaborating, please? Can I just make my own renderer that runs parallel to ForgeIngameGui? Do I have to insert my process into IngameGui somehow?
  8. As I said above, I have found this but I'm not sure how to use it. Once I've registered my overlay, how do I render it? I don't know how to insert something into ForgeIngameGui's process like that.
  9. From what I've seen in other forum threads, one of your mods is doing this and there's no way to tell which one from the crash report. You have to remove them until this crash goes away and use that to identify the problematic one. I could be mistaken; someone please correct me if so. I got a similar crash when I set up some blockstates incorrectly in my mod, but I can't say for certain that the crash is identical.
  10. So if I'm understanding hooking and events correctly, I set up listeners for RenderFogEvent and FogColors, and on those events I check if the camera is inside my block and if so set fog up with setupFog and setupColor. I think I can do that. Do you have advice for rendering the overlay? Thanks for the help!
  11. Powder snow does almost exactly what I want with the single and easily-remedied exception that it's opaque. Using its model (and borrowing skipRendering() from its block class) makes everything work. Is easier but does not actually provide full functionality. It cleanly and easily renders from outside and inside, but this method does not duplicate powder snow's ability to render on top of adjacent blocks. I don't know how it does that.
  12. I'd like to add a custom overlay and fog while the player is inside a particular block, just like powder snow. I have found ForgeIngameGui but do not know how to use it. How should I do so? As for the fog, I have located FogType and FogRenderer, but I'm not sure what the safest way to hijack their processes would be. In general I'm much less confident interfering in existing systems than making my own, so more basic-level advice would be appreciated. I'd also be happy with links to tutorials elsewhere if necessary.
  13. As it happens, turning off the inner faces' culling in order to display them over adjacent blocks causes z-fighting. Further, doing this for any possible combination of adjacent non-identical blocks would require six boolean blockstates, for a total of sixty-four independent states and models, which is a pain. I'm going to leave off with this for now and suggest that anyone attempting this use the model file above and, if necessary, augment with a visual overlay. I'll figure out how to do that later.
  14. I have successfully created a translucent block model visible from the inside. It works in groups. The only thing I think I might change is that when placed on a solid block of a different type, that block is visible clearly - if I fix that, it'll be by adding a blockstate that doesn't cull the bottom texture and trying to get that to only activate when the block is placed on a solid block that isn't another one of itself. Posting the block model .json here for if anyone ever has the same issue. If you deleted all the "cullface", it would also be suitable for use as a nontranslucent block visible from inside itself. { "credit": "Made with Blockbench", "parent": "block/block", "textures": { "0": "alchemine:block/vita_slime", "particle": "alchemine:block/vita_slime" }, "elements": [ { "from": [0, 0, 0], "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "north"}, "east": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "east"}, "south": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "south"}, "west": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "west"}, "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"}, "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} } }, { "name": "northinner", "from": [0, 0, 0], "to": [16, 16, 0], "faces": { "east": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "south": {"uv": [16, 0, 0, 16], "texture": "#0", "cullface": "north"}, "west": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "up": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "down": {"uv": [0, 0, 16, 0], "texture": "#missing"} } }, { "name": "southinner", "from": [0, 0, 16], "to": [16, 16, 16], "faces": { "north": {"uv": [16, 0, 0, 16], "texture": "#0", "cullface": "south"}, "east": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "west": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "up": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "down": {"uv": [0, 0, 16, 0], "texture": "#missing"} } }, { "name": "westinner", "from": [0, 0, 0], "to": [0, 16, 16], "faces": { "north": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "east": {"uv": [16, 0, 0, 16], "texture": "#0", "cullface": "west"}, "south": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "up": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "down": {"uv": [0, 0, 0, 16], "texture": "#missing"} } }, { "name": "eastinner", "from": [16, 0, 0], "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "south": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "west": {"uv": [16, 0, 0, 16], "texture": "#0", "cullface": "east"}, "up": {"uv": [0, 0, 0, 16], "texture": "#missing"}, "down": {"uv": [0, 0, 0, 16], "texture": "#missing"} } }, { "name": "bottominner", "from": [0, 0, 0], "to": [16, 0, 16], "faces": { "north": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "east": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "south": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "west": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "up": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "down"} } }, { "name": "topinner", "from": [0, 16, 0], "to": [16, 16, 16], "faces": { "north": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "east": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "south": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "west": {"uv": [0, 0, 16, 0], "texture": "#missing"}, "down": {"uv": [0, 0, 16, 16], "texture": "#0", "cullface": "up"} } } ], "display": {}, "groups": [ { "name": "vita_slime_new", "origin": [8, 8, 8], "color": 0, "children": [0, 1, 2, 3, 4, 5, 6] } ] }
  15. Hmmm. I think you're right; that might not be what I want - I want these particles to be inside a specific block and visible from the outside of that block alone, but not through other block types. The block I'm doing is a jelly-like block that the player immerses themself in. I want it to be placed in groups, hence the translucency (don't want the jelly pile to have a nice grid pattern visible inside it). I want it to be visible from the inside, hence the culling issue (don't want it to disappear as soon as you sink in). Finally, I wanted there to be floating particles in it, which is possibly the hardest issue of them all. I think I might be close to a solution on the culling feature, but I'm not sure if there's gonna be a reasonable option for the particles thing.
  16. I can successfully get faces to render while inside the block... but those new faces also render from outside the block, which really negates the whole HalfTransparentBlock business. I'm also not having any luck with particles. Does anyone know if there's a way to make a particle render after blocks do? Current avenue of investigation is rendering it like water, which is translucent, visible from inside itself, and not visible through other water blocks, while also displaying particles inside it. Water rendering is tricky to imitate, though. Edit: water doesn't display particles while you're outside it. Nor do any other translucent blocks I can find.
  17. Relatedly, is it possible for particles to be rendered while inside such a HalfTransparentBlock?
  18. I have a block which extends HalfTransparentBlock so that it is not visible through other copies of itself. (I intend it to be placed in groups, and I don't want the interior faces to be visible.) However, it also does not have collision - players are intended to enter it. When they do so, the block becomes invisible. Can I prevent this somehow? I would like to preserve the block's texture when looking out from inside it. An acceptable alternative would be a screen overlay, but I'm not sure how to do that.
  19. Understood, thank you!
  20. Some of the blocks I wish to add don't fit any of the available block materials. For example, I want a block that is like Web but is not destroyed on push: i.e. I want .noCollider().notSolidBlocking() but not .destroyOnPush(). I tried to define my own materials, but some of the necessary functions in Material are not public, preventing me from using them. (notSolidBlocking(), flammable(), destroyOnPush(), and notPushable() are either protected, or - in SolidBlocking's case - have no keyword at all.) Is there a way to get around this? I am modding 1.19 with the 41.0.17 version of the Forge mdk. (Also, is there a resource anywhere that explains and differentiates the various material and block properties? I'm curious about things like the difference between a material being 'solid', 'solidBlocking', and/or 'blocksMotion', while a block's Properties also include 'hasCollision'.)
  21. I've solved the problem. For anyone else using IntelliJ, I had to go into File > Project Structure > SDKs and add Java 18, then Edit Run Configurations so that my runs used that SDK instead of the old one.
  22. Oh. That'd do it. I'll go see if I can fix that. Thank you!
  23. ...specifically? I have Java 18. I assumed 'Requires Java 17' meant '17 and up'.
  24. EDIT: Running 'gradlew runClient' directly in the terminal does not produce this issue, but using IntelliJ's normal Run button does. When I try to use runClient or runServer, I get an error like this. Updating from Java 16 to 18 and restarting intelliJ seemed to fix the issue for runClient, but today I tried runServer again and now neither works anymore. I'm modding on 1.19 with the latest mdk. [15:22:27] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.19, --assetsDir, C:\Users\Caspian\.gradle\caches\forge_gradle\assets, --gameDir, ., --fml.forgeVersion, 41.0.17, --fml.mcVersion, 1.19, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220607.102129] Forge[15:22:27] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 9.1.6+9.1.6+main.14b0cc03 starting: java version 16.0.2 by Oracle Corporation; OS Windows 10 arch amd64 version 10.0 ForgeException in thread "main" java.util.ServiceConfigurationError: cpw.mods.modlauncher.api.ILaunchHandlerService: Unable to load net.minecraftforge.fml.loading.targets.FMLClientLaunchHandler at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:582) at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854) at java.base/java.util.ServiceLoader$LayerLookupIterator.hasNext(ServiceLoader.java:951) at java.base/java.util.ServiceLoader$ProviderSpliterator.tryAdvance(ServiceLoader.java:1481) at java.base/java.util.Spliterator.forEachRemaining(Spliterator.java:326) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.<init>(LaunchServiceHandler.java:40) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.<init>(Launcher.java:53) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) Caused by: java.lang.UnsupportedClassVersionError: net/minecraftforge/fml/loading/targets/FMLClientLaunchHandler has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0 at java.base/java.lang.ClassLoader.defineClass1(Native Method) at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010) at [email protected]/cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:116) at [email protected]/cpw.mods.cl.ModuleClassLoader.lambda$findClass$16(ModuleClassLoader.java:216) at [email protected]/cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:226) at [email protected]/cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:216) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:631) at java.base/java.lang.Class.forName(Class.java:543) at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:852) ... 14 more Process finished with exit code 1
  25. I'm attempting to add a config file to one of my mods. Currently, the code appears to be referencing the configured variables just fine, but the problem is the file itself: it's not printing all the variables and comments, and what it is printing is out of order. My config is broken into three sections. Each has several 'groups', with each group governing one variable, and containing four copies of it: one for each of the four configurable items (basic, epic, legendary, and godly/mythic). For instance, in the "ping chance stats" section, there's a group for the "minPingChance" variable, with entries for basic_minPingChance, epic_minPingChance, and so on. Here's my config file: package syric.dragonseeker; import net.minecraftforge.common.ForgeConfigSpec; import org.apache.commons.lang3.tuple.Pair; public class DragonseekerConfig { public static class Common { //Basic Dragonseeker public final ForgeConfigSpec.ConfigValue<Integer> basic_optimalDistance; public final ForgeConfigSpec.ConfigValue<Integer> basic_maxDistance; public final ForgeConfigSpec.ConfigValue<Double> basic_minPingChance; public final ForgeConfigSpec.ConfigValue<Double> basic_maxPingChance; public final ForgeConfigSpec.ConfigValue<Integer> basic_pingCapRadius; public final ForgeConfigSpec.ConfigValue<Double> basic_sigPower; public final ForgeConfigSpec.ConfigValue<Double> basic_minVol; public final ForgeConfigSpec.ConfigValue<Double> basic_maxVol; public final ForgeConfigSpec.ConfigValue<Double> basic_minPitch; public final ForgeConfigSpec.ConfigValue<Double> basic_maxPitch; public final ForgeConfigSpec.ConfigValue<Boolean> basic_detectsCorpses; public final ForgeConfigSpec.ConfigValue<Boolean> basic_detectsTame; public final ForgeConfigSpec.ConfigValue<Integer> basic_durability; //Epic Dragonseeker public final ForgeConfigSpec.ConfigValue<Integer> epic_optimalDistance; public final ForgeConfigSpec.ConfigValue<Integer> epic_maxDistance; public final ForgeConfigSpec.ConfigValue<Double> epic_minPingChance; public final ForgeConfigSpec.ConfigValue<Double> epic_maxPingChance; public final ForgeConfigSpec.ConfigValue<Integer> epic_pingCapRadius; public final ForgeConfigSpec.ConfigValue<Double> epic_sigPower; public final ForgeConfigSpec.ConfigValue<Double> epic_minVol; public final ForgeConfigSpec.ConfigValue<Double> epic_maxVol; public final ForgeConfigSpec.ConfigValue<Double> epic_minPitch; public final ForgeConfigSpec.ConfigValue<Double> epic_maxPitch; public final ForgeConfigSpec.ConfigValue<Boolean> epic_detectsCorpses; public final ForgeConfigSpec.ConfigValue<Boolean> epic_detectsTame; public final ForgeConfigSpec.ConfigValue<Integer> epic_durability; //Legendary Dragonseeker public final ForgeConfigSpec.ConfigValue<Integer> legendary_optimalDistance; public final ForgeConfigSpec.ConfigValue<Integer> legendary_maxDistance; public final ForgeConfigSpec.ConfigValue<Double> legendary_minPingChance; public final ForgeConfigSpec.ConfigValue<Double> legendary_maxPingChance; public final ForgeConfigSpec.ConfigValue<Integer> legendary_pingCapRadius; public final ForgeConfigSpec.ConfigValue<Double> legendary_sigPower; public final ForgeConfigSpec.ConfigValue<Double> legendary_minVol; public final ForgeConfigSpec.ConfigValue<Double> legendary_maxVol; public final ForgeConfigSpec.ConfigValue<Double> legendary_minPitch; public final ForgeConfigSpec.ConfigValue<Double> legendary_maxPitch; public final ForgeConfigSpec.ConfigValue<Boolean> legendary_detectsCorpses; public final ForgeConfigSpec.ConfigValue<Boolean> legendary_detectsTame; public final ForgeConfigSpec.ConfigValue<Integer> legendary_durability; //Mythic Dragonseeker public final ForgeConfigSpec.ConfigValue<Integer> mythic_optimalDistance; public final ForgeConfigSpec.ConfigValue<Integer> mythic_maxDistance; public final ForgeConfigSpec.ConfigValue<Double> mythic_minPingChance; public final ForgeConfigSpec.ConfigValue<Double> mythic_maxPingChance; public final ForgeConfigSpec.ConfigValue<Integer> mythic_pingCapRadius; public final ForgeConfigSpec.ConfigValue<Double> mythic_sigPower; public final ForgeConfigSpec.ConfigValue<Double> mythic_minVol; public final ForgeConfigSpec.ConfigValue<Double> mythic_maxVol; public final ForgeConfigSpec.ConfigValue<Double> mythic_minPitch; public final ForgeConfigSpec.ConfigValue<Double> mythic_maxPitch; public final ForgeConfigSpec.ConfigValue<Boolean> mythic_detectsCorpses; public final ForgeConfigSpec.ConfigValue<Boolean> mythic_detectsTame; public final ForgeConfigSpec.ConfigValue<Integer> mythic_durability; public Common(ForgeConfigSpec.Builder builder){ builder.comment("Ping Chance Stats").push("ping_chance_stats"); builder.comment("Inside this distance, getting closer to the dragon will not increase the ping chance."); builder.comment("Defaults: 100, 150, 200, 500"); basic_optimalDistance = builder.defineInRange("basic", 100, 1, 500); epic_optimalDistance = builder.defineInRange("epic", 150, 1, 500); legendary_optimalDistance = builder.defineInRange("legendary", 200, 1, 500); mythic_optimalDistance = builder.defineInRange("godly", 500, 1, 500); builder.comment("Maximum distance at which a dragon will be detected. Should be larger than the optimalDistance, but not larger than your render distance."); builder.comment("Defaults: 200, 225, 250, 500"); basic_maxDistance = builder.defineInRange("basic", 200, 1, 500); epic_maxDistance = builder.defineInRange("epic", 225, 1, 500); legendary_maxDistance = builder.defineInRange("legendary", 250, 1, 500); mythic_maxDistance = builder.defineInRange("godly", 500, 1, 500); builder.comment("Minimum chance of a ping. This is the chance of a positive ping when no dragons are detected, i.e. the false positive rate."); builder.comment("Defaults: 0.12, 0.08, 0.04, 0"); basic_minPingChance = builder.defineInRange("basic", 0.12, 0, 1); epic_minPingChance = builder.defineInRange("epic", 0.08, 0, 1); legendary_minPingChance = builder.defineInRange("legendary", 0.04, 0, 1); mythic_minPingChance = builder.defineInRange("godly", 0D, 0, 1); builder.comment("Maximum chance of a ping. This is the chance of a positive ping when there is a dragon within the optimalDistance."); builder.comment("Defaults: 0.8, 0.9, 0.95, 1"); basic_maxPingChance =builder.defineInRange("basic", 0.8, 0, 1); epic_maxPingChance = builder.defineInRange("epic", 0.9, 0, 1); legendary_maxPingChance = builder.defineInRange("legendary", 0.95, 0, 1); mythic_maxPingChance = builder.defineInRange("godly", 1D, 0, 1); builder.pop(); builder.comment("Ping Property Stats").push("ping_property_stats"); builder.comment("Inside this radius, ping properties will not change. The smaller it is, the easier it will be to narrow down a dragon's location."); builder.comment("Defaults: 125, 125, 100, 0"); basic_pingCapRadius = builder.defineInRange("basic", 125, 1, 500); epic_pingCapRadius = builder.defineInRange("epic", 125, 1, 500); legendary_pingCapRadius = builder.defineInRange("legendary", 100, 1, 500); mythic_pingCapRadius = builder.defineInRange("godly", 0, 1, 500); builder.comment("Mathematical property governing the relationship between distance and ping properties. The higher this is, the easier it will be to narrow down a dragon's location."); builder.comment("Defaults: 1.5, 1.5, 2.5, 3.5"); basic_sigPower = builder.defineInRange("basic", 1.5, 1, 5); epic_sigPower = builder.defineInRange("epic", 1.5, 1, 5); legendary_sigPower = builder.defineInRange("legendary", 2.5, 1, 5); mythic_sigPower = builder.defineInRange("godly", 3.5, 1, 5); builder.comment("Minimum volume of a ping, for when there are no dragons in range."); builder.comment("Defaults: 0.05"); basic_minVol = builder.defineInRange("basic", 0.05, 0, 1); epic_minVol = builder.defineInRange("epic", 0.05, 0, 1); legendary_minVol = builder.defineInRange("legendary", 0.05, 0, 1); mythic_minVol = builder.defineInRange("godly", 0.05, 0, 1); builder.comment("Maximum volume of a ping, for when you're inside the ping cap radius."); builder.comment("Defaults: 0.05, 0.4, 0.7, 1"); basic_maxVol = builder.defineInRange("basic", 0.05, 0, 1); epic_maxVol = builder.defineInRange("epic", 0.4, 0, 1); legendary_maxVol = builder.defineInRange("legendary", 0.7, 0, 1); mythic_maxVol = builder.defineInRange("godly", 1D, 0, 1); builder.comment("Pitch of a negative result, i.e. no dragon detected."); builder.comment("Defaults: 0.5"); basic_minPitch = builder.defineInRange("basic", 0.5, 0, 1); epic_minPitch = builder.defineInRange("epic", 0.5, 0, 1); legendary_minPitch = builder.defineInRange("legendary", 0.5, 0, 1); mythic_minPitch = builder.defineInRange("godly", 0.5, 0, 1); builder.comment("Pitch of a positive result, i.e. there is a dragon detected."); builder.comment("Defaults: 0.8, 0.8, 0.8, 1"); basic_maxPitch = builder.defineInRange("basic", 0.8, 0, 1); epic_maxPitch = builder.defineInRange("epic", 0.8, 0, 1); legendary_maxPitch = builder.defineInRange("legendary", 0.8, 0, 1); mythic_maxPitch = builder.defineInRange("godly", 1D, 0, 1); builder.pop(); builder.comment("Other Stats").push("other_stats"); builder.comment("Whether or not the dragonseeker detects dead dragons."); builder.comment("Defaults: true, false, false, false"); basic_detectsCorpses = builder.define("basic", true); epic_detectsCorpses = builder.define("epic", false); legendary_detectsCorpses = builder.define("legendary", false); mythic_detectsCorpses = builder.define("godly", false); builder.comment("Whether or not the dragonseeker detects tame dragons."); builder.comment("Defaults: true, true, false, false"); basic_detectsTame = builder.define("basic", true); epic_detectsTame = builder.define("epic", true); legendary_detectsTame = builder.define("legendary", false); mythic_detectsTame = builder.define("godly", false); builder.comment("Durability of the item. Set to -1 to make it unbreakable."); builder.comment("Defaults: 128, 256, 512, -1"); basic_durability = builder.defineInRange("basic", 128, -1, 2048); epic_durability = builder.defineInRange("epic", 256, -1, 2048); legendary_durability = builder.defineInRange("legendary", 512, -1, 2048); mythic_durability = builder.defineInRange("godly", -1, -1, 2048); builder.pop(); } } public static final ForgeConfigSpec COMMON_SPEC; public static final Common COMMON; static { final Pair<Common, ForgeConfigSpec> commonSpecPair = new ForgeConfigSpec.Builder().configure(Common::new); COMMON_SPEC = commonSpecPair.getRight(); COMMON = commonSpecPair.getLeft(); } } And here's what currently happens in the .txt file: As you can see, only the last 'group' of variables in each of the three sections is printing, and they're doing it out of order. (It should be basic, epic, legendary, godly.) The Defaults comment prints in the middle of the group instead of before it, and the explanatory comment doesn't print at all. What am I doing wrong? Thanks for the help!
×
×
  • Create New...

Important Information

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