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.

All Activity

This stream auto-updates

  1. Past hour
  2. Oh yeah, and one more thing I forgot to mention. My server runs on Java SE 8 from Graal VM Enterprise Edition. Not exactly sure if this will come in handy.
  3. Hey fellas! So I've been working on a mod for my Minecraft server that adds "admin tools" ( that's code for "trolling commands" ( : ) It's been pretty smooth so far: I've heard them scream as they were chased by every enemy in the entire world, I've watched as they mysteriously turned into potatoes, and I've even gotten to hear them say strange things like "Why th are my pants on my head?" However, I've lately started running into an issue that I can't quite seem to get through... Like at all! It started when I thought it would be a really cool idea to implement a command that makes EVERYTHING invisible for a selected player. You know, the usual everyday kinda' tool needed for proper server administration. But I can't just set all the entities to be invisible with the setInvisible(boolean value) kind of deal, because that would mean that if you had either a hacked client or the entity had some kind of equipment, then you could still see it. I wanted it so that the client that I chose didn't even know the entity existed. So, I initially started by just trying to intercept packets. However, this only worked for vanilla entities, like zombies and basic items. The reason? Because forge is really annoying and decides that it's not going to spawn mod entities through the default channel and is instead going to use an entirely different channel, one that I can't conveniently connect a player entity to through a CustomPacketHandler because this channel remains static throughout the server's lifespan. So I though, jeez, well why don't I just add another CustomPacketHandler to this channel and see how it goes. So I did my first test and tried to prevent an entity spawn packet from being written to the channel. And can you guess what happened? Probably not, because it wasn't a NoClassDefFound exception. Instead, it was a NullReferenceException that lead to an error that said something like, "Don't know how to spawn in this entity." As it turns out, when the packet for spawning an entity is being created, it relies on trying to write the packet to this fml channel and then for some reason it just reads the packet from the fml channel before trying to send it again. So that means if you prevent it from being written then there's nothing that can be read from the channel, so the spawn packet ends up being null. So I though, damn, this is really stupid. So I searched around a bit and found a function called isVisibleTo, which is basically just called to check whether a player can or can't see an entity before it decides to make the packet to send to the player. Then I got an idea: what if I just hijack this function and add some code at the start to make it return false if the player has had this "invisible enemy" command ran on them. So I looked around a little more, and finally, I found out that if you make your mod a plugin, then you can access the transform method of the IClassTransformer interface. Basically, it's like the harmony transpiler patch, but with java! So I got to work. Now, understand that everything before this point it basically just pretext to give you fellas some good context. From this point on, this is where my struggles are going to start to begin. I started off with writing my hijacking function. It was a static public function with one argument of the type EntityPlayerMP that returned a boolean value. I named this function "canPlayerSee". Now, on the AsmTranspiler end, I had gotten the class/method descriptors and function names from the obfuscated mappings and pulled apart the isVisibleTo function's disassembly. From here, I put together some quick code that injected at the start of the isVisibleTo function the following java assembly codes: aload_1 //This loads the first, and only argument (excluding the this argument) of the isVisibleTo function invokestatic //canPlayerSee ifne //label_0 iconst_0 //This should load the 0 integer ireturn //This should return the number at the top of the stack, zero in this case label_0 So I loaded up the server, and nothing bad happened. I run the command on myself to make everything invisible and it works perfectly! So at this point, I'm thinking that this would be a pretty powerful tool if I could load an instance of the Entity that the isVisibleTo function concerns onto the stack and pass is as an argument to the canPlayerSee function for better use. This would let me implement a propper vanish command and a command that would let me turn players of my choice into a creeper that the player in question cannot see. So, I modified the assembly code again. I changed it to this instead: (Note, I did update the canPlayerSee function to accept the new Entity arg at the end) aload_1 //This loads the first, and only argument (excluding the this argument) of the isVisibleTo function aload_0 //Loads the this arg to the stack getfield //EntityTrackerEntry.trackedEntity invokestatic //canPlayerSee ifne //label_0 iconst_0 //This should load the 0 integer ireturn //This should return the number at the top of the stack, zero in this case label_0 So I launched up the server again... And it crashes: NoClassDefFoundException. This is the error, I am currently getting, and I have tried almost everything I could think of to fix it. Hell, I even tried praying, which almost always works! None of those things I tried are of particular note here, but what is of particular note is the fact that it seems that the crashing will happen only when I make the canPlayerSee function two arguments and change the code to reflect loading the proper arguments. Now, I'm going to send some source code, so just be ready: my chunking skills are horrible and my coding "elegancy" might make you really want to puke. For that, I am sorry. Also, since it's like 3:00 AM rn, I'm just going to try and send images instead of providing text. I know this will make it a bit harder to help, so I am sorry for that too, but I'm really tired. Nvm, I guess I'm sending text: This is my entire class for modifying the asm code: public class AsmTransformer implements IClassTransformer { @SuppressWarnings("deprecation") private static Logger logger = FMLLog.getLogger(); public byte[] transform(String name, String transformedName, byte[] bytes) { if (transformedName.startsWith("net.minecraft.entity.EntityTrackerEntry")) { ClassReader reader = new ClassReader(bytes); ClassNode node = new ClassNode(); reader.accept((ClassVisitor)node, 0); if (analyzeClass(node)) { ClassWriter writer = new ClassWriter(3); node.accept(writer); bytes = writer.toByteArray(); } } return bytes; } private boolean analyzeClass(ClassNode node) { boolean rval = false; for (MethodNode method : node.methods) { logger.info(method.name); logger.info(method.desc); if (method.name.equals("isVisibleTo") || (method.name.equals("c") && method.desc.equals("(Loq;)Z"))) { try { rval = hijackCanSeeFunc(method); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (SecurityException e) { e.printStackTrace(); } } } if(!rval) logger.info("COULD NOT FIND METHOD!"); return rval; } private boolean hijackCanSeeFunc(MethodNode node) throws NoSuchMethodException, SecurityException { InsnList insnList = node.instructions; logger.info("Hackin' it..."); Method meth = CustomHandler.class.getMethod("canPlayerSee", Entity.class, EntityPlayerMP.class); String methDesc = Type.getMethodDescriptor(meth); logger.info(methDesc); InsnList patch = new InsnList(); LabelNode ln = new LabelNode(new Label()); patch.add((AbstractInsnNode) new VarInsnNode(Opcodes.ALOAD, 0)); patch.add((AbstractInsnNode) new FieldInsnNode(Opcodes.GETFIELD, Type.getInternalName(EntityTrackerEntry.class), "d", "Lvg;")); patch.add((AbstractInsnNode) new VarInsnNode(Opcodes.ALOAD, 1)); patch.add((AbstractInsnNode) new MethodInsnNode(Opcodes.INVOKESTATIC, Type.getInternalName(CustomHandler.class), "canPlayerSee", methDesc, false)); patch.add((AbstractInsnNode) new JumpInsnNode(Opcodes.IFNE, ln)); patch.add((AbstractInsnNode) new InsnNode(Opcodes.ICONST_0)); patch.add((AbstractInsnNode) new InsnNode(Opcodes.IRETURN)); patch.add((AbstractInsnNode) ln); insnList.insertBefore(insnList.getFirst(), patch); return true; } }Of particular note here is that last hijack function. The second to last chunk contains the code that inserts my own instructions. This is the custom function I am injecting at the start of the isVisibleTo function: public static boolean canPlayerSee(Entity instance, EntityPlayerMP target) { if (playerInvisTrollList.contains(target.getName())) { return false; } else if (instance instanceof EntityPlayerMP && playerVanishList.get(((EntityPlayerMP) instance).getName()) != null) { return false; } else if (findListElem(Common.creepers, index -> index.creep != null && index.creep.getEntityId() == instance.getEntityId()) != null && findListElem(Common.creepers, index -> index.name.contentEquals(target.getName())) != null) { return false; } return true; }I know, it's not chunked like at all. My bad. Also, the findListElem function is basically just the removeIf function for lists, except for instead of removing the element when it matches the predicate, it will just return it instead. It's weird how lists don't already have this function (as far as I know). Here is the stacktrace: java.lang.NoClassDefFoundError: net/minecraft/entity/EntityTrackerEntry at net.minecraft.entity.EntityTracker.func_72785_a(EntityTracker.java:252) ~[ol.class:?] at net.minecraft.entity.EntityTracker.func_72786_a(EntityTracker.java:157) ~[ol.class:?] at net.minecraft.world.ServerWorldEventHandler.func_72703_a(ServerWorldEventHandler.java:37) ~[op.class:?] at net.minecraft.world.World.func_72923_a(World.java:1222) ~[amu.class:?] at net.minecraft.world.WorldServer.func_72923_a(WorldServer.java:1112) ~[oo.class:?] at net.minecraft.world.WorldServer.func_175650_b(WorldServer.java:1068) ~[oo.class:?] at net.minecraft.world.chunk.Chunk.func_76631_c(Chunk.java:860) ~[axw.class:?] at net.minecraftforge.common.chunkio.ChunkIOProvider.syncCallback(ChunkIOProvider.java:109) ~[ChunkIOProvider.class:?] at net.minecraftforge.common.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:94) ~[ChunkIOExecutor.class:?] at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:118) ~[on.class:?] at net.minecraft.world.gen.ChunkProviderServer.func_186028_c(ChunkProviderServer.java:89) ~[on.class:?] at net.minecraft.world.gen.ChunkProviderServer.func_186025_d(ChunkProviderServer.java:135) ~[on.class:?] at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:344) ~[MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:314) ~[MinecraftServer.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:270) ~[nz.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?] at java.lang.Thread.run(Thread.java:750) [?:1.8.0_451]Not much I gotta' say about this. Here, I even got the disassembled code for the isVisibleTo function in case it helps: public boolean isVisibleTo(net.minecraft.entity.player.EntityPlayerMP); descriptor: (Lnet/minecraft/entity/player/EntityPlayerMP;)Z flags: ACC_PUBLIC Code: stack=6, locals=7, args_size=2 0: aload_1 1: getfield #148 // Field net/minecraft/entity/player/EntityPlayerMP.posX:D 4: aload_0 5: getfield #13 // Field encodedPosX:J 8: l2d 9: ldc2_w #149 // double 4096.0d 12: ddiv 13: dsub 14: dstore_2 15: aload_1 16: getfield #151 // Field net/minecraft/entity/player/EntityPlayerMP.posZ:D 19: aload_0 20: getfield #17 // Field encodedPosZ:J 23: l2d 24: ldc2_w #149 // double 4096.0d 27: ddiv 28: dsub 29: dstore 4 31: aload_0 32: getfield #7 // Field range:I 35: aload_0 36: getfield #8 // Field maxRange:I 39: invokestatic #152 // Method java/lang/Math.min:(II)I 42: istore 6 44: dload_2 45: iload 6 47: ineg 48: i2d 49: dcmpl 50: iflt 95 53: dload_2 54: iload 6 56: i2d 57: dcmpg 58: ifgt 95 61: dload 4 63: iload 6 65: ineg 66: i2d 67: dcmpl 68: iflt 95 71: dload 4 73: iload 6 75: i2d 76: dcmpg 77: ifgt 95 80: aload_0 81: getfield #6 // Field trackedEntity:Lnet/minecraft/entity/Entity; 84: aload_1 85: invokevirtual #153 // Method net/minecraft/entity/Entity.isSpectatedByPlayer:(Lnet/minecraft/entity/player/EntityPlayerMP;)Z 88: ifeq 95 91: iconst_1 92: goto 96 95: iconst_0 96: ireturn LineNumberTable: line 475: 0 line 476: 15 line 477: 31 line 478: 44 LocalVariableTable: Start Length Slot Name Signature 0 97 0 this Lnet/minecraft/entity/EntityTrackerEntry; 0 97 1 playerMP Lnet/minecraft/entity/player/EntityPlayerMP; 15 82 2 d0 D 31 66 4 d1 D 44 53 6 i I StackMapTable: number_of_entries = 2 frame_type = 254 /* append */ offset_delta = 95 locals = [ double, double, int ] frame_type = 64 /* same_locals_1_stack_item */ stack = [ int ] This is pretty much everything I can think to provide. I'm not sure what else I can do for you fellas rn, but I hope this can get somebody somewhere. Even if you aren't confident you know exactly what's going on, if you think you have some kind of idea, please don't be shy about replyin'. I would appreciate ANY amount of help here with this, no matter how menial or small it is. Thank you.
  4. Today
  5. Jackson Perr joined the community
  6. retro1234 joined the community
  7. Hey, sorry about this. There was an oversight with my fix so I've made a pull request to have it resolved. When LexManos or Paint_Ninja are available, it'll be merged. For now, please continue to use 60.0.5. Thanks for letting me know of the issue again. 🙏
  8. OK, got a similar warning as above with .5 but FallingTree is working fine. I'm not sure if it's a FallingTree or Forge issue.
  9. Thanks. May still be issues. [19:51:42] [main/WARN] [ne.mi.co.ForgeHooks/WP]: The following mods have version differences that were not resolved: forge (version 59.0.1 -> 1.21.10-60.0.7) Things may not work well. Also had trouble running FallingTree mod but currently verifying that's not a me thing. Yep, not a me thing. [19:54:52] [main/ERROR] [ne.mi.fm.lo.ModSorter/LOADING]: Missing or unsupported mandatory dependencies: Mod ID: 'forge', Requested by: 'fallingtree', Expected range: '[60,)', A ctual version: '1.21.10-60.0.7' Going to see how .5 does.
  10. Yesterday
  11. I've fixed this in Forge 60.0.7. Please update. Thank you!
  12. evan.117 joined the community
  13. Was upgrading from 1.21.9. Failed with an error. Reinstalled 1.21.9, good. Installed 1.21.10-60.0.5, also good. Error is [17:35:50] [main/ERROR] [ne.mi.fm.lo.mo.ModDiscoverer/SCAN]: Locator net.minecra ftforge.fml.loading.moddiscovery.ClasspathLocator@7dc51783 found an invalid mod file net.minecraftforge.fml.loading.moddiscovery.ModFileInfo@4b61d0c6 net.minecraftforge.fml.loading.moddiscovery.InvalidModFileException: Illegal version number specified ${forge_version} (forge-1.21.10-60.0.6-universal.jar) I can add more info if needed but I'm guessing this was just a whoops.
  14. Richy_T joined the community
  15. Locdraper joined the community
  16. nccck joined the community
  17. tedso6767 joined the community
  18. ChyungMyung joined the community
  19. me1ona joined the community
  20. Margaret White joined the community
  21. aroapalan changed their profile photo
  22. Last week
  23. Most likely, this is no longer relevant for you, but I will still leave my answer, because I had the same problem, and I did not find a clear answer anywhere. To ensure your server players have the quests you created, all you need to do is transfer the necessary files to the server. Players don't need to install anything on their end, except for mod. You need to find .minecraft>config>ftbquests>quests. In quests should be folder and two files. So all you need to do is use existing ones or create folders config>ftbquests>quests, and copy the contents of the quests folder.
  24. https://pastebin.com/4gPVnQAF - ocean chunk crash, no betterrandomsourceconcurrencycrash
  25. Currently stuck on making a custom effect for forge 1.20.1 Im trying to add a certain number of hearts to a player once they consume a potion/custom item, i tried doing it with the vanilla effects and it didn't work the way i wanted it to work, so now im trying to make a custom effect that adds this configurable amount of hearts So far Ive been following KaupanJoes tutorial for both 1.21 and 1.20 and the effect doesn't seem to give any errors nor does its registration, however i cant seem to get it to work with applying it to the item itself ```package com.curseofaros.item; import com.curseofaros.effect.ModEffects; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; import net.minecraft.world.food.FoodProperties; public class ModFoods { public static final FoodProperties FLASK_OF_LIFE = new FoodProperties.Builder() .fast() .alwaysEat() .nutrition(0) .saturationMod(0) .effect(() -> new MobEffectInstance(MobEffects.HEAL, 1, 2), 1.0f) .build(); public static final FoodProperties MEDIUM_POTION = new FoodProperties.Builder() .fast() .alwaysEat() .nutrition(0) .saturationMod(0) .effect(() -> new MobEffectInstance(ModEffects.MEDIUM_POTION_EFFECT.get())) .build(); public static final FoodProperties SMALL_POTION = new FoodProperties.Builder() .fast() .alwaysEat() .nutrition(0) .saturationMod(0) .effect(() -> new MobEffectInstance(MobEffects.HEAL, 1, 3), 1.0f) .build(); } (Sorry for the real shi formatting, don't really know how to do it smh, note im also fairly new to Java so i don't know a lot, please be patient and let me know if the error is simply a lack of understand of Java principles)
  26. Add the crash-report without the mod better_randomsource_concurrency_crash
  27. crashlog: https://pastebin.com/mW43VxdU (was ran through mclo.gs beforehand but realized i need to make it a pastebin, may have artifacts from mclo.gs) Context: had same crash from loading ocean chunks, just had it again from tp'ing to a Yung's Better Nether Fortress. I have BetterRandomSourceConcurrencyCrash enabled.
  28. Try older builds of Create The latest Modern Industrialization build for 1.20.1 was released in 2024 So this mod may only compatible with Create 5
  29. It does work but upon further testing it appears that Create and Modern Industrialization don't work together> Before it worked with just Synitra and after I added Create it crashed with the error I mentioned. It stinks because I like MI much better then GregTech
  30. I appear to be having some kind of error running my modpack. It crashes with the above error and I have no idea what it means Crashlog: https://pastebin.com/eeaTLwaP Latest: https://pastebin.com/TtK5L4Ww
  31. Read the FAQ (orange banner at top of page) and post full logs as described there to an external site, and provide the link here.
  32. These are the forge forums, you would need to ask wherever neoforged support is given.
  33. Hello, i'm trying to launch a server with additional mods i've added myself, and it isn't launching - but scrolling through the debug.log i came across [main/TRACE] [net.neoforged.fml.loading.moddiscovery.locators.JarInJarDependencyLocator/]: Failed to load resource META-INF/jarjar/metadata.json from MixinSquared-0.2.0-beta.6.jar, it does not contain dependency information. which came up a lot - im just wondering if this could be why my server won't launch
  34. Also did you quit making this?
  35. [main/ERROR]:Failed reading REFMAP JSON from : java.lang.NullPointerException Cannot invoke "org.spongepowered.asm.mixin.refmap.ReferenceMapper.setResourceName(String)" because "mapper" is null this is the error message i keep getting when trying to launch minecraft from the launcher with my mods but i just can't figure out what this error message means. i'm new to making mod packs but i have tried making 3 separate mod packs with different mods but i still run into this issue and i am starting to think there might be a conflict between 2 different mods but again i have no idea since this is the only error message i get. any idea's?
  36. Earlier
  37. Add the crash-report or latest.log (logs-folder) with sites like https://mclo.gs/ and paste the link to it here
  38. i have downloaded a mod called All in One (Modded One Block) and downloaded it through essentials mod to play with my friends, it starts to load up and start loading into the game but then i get the crash report and get sent back to the launcher with the error code "The game crashed: rendering overlay Error: com.electronwill.nightconfig.core.io.WritingException: An I/O error occured".
  39. There typically isnt a place to commission mods. Mods are made by hobbyist programmers in their spair time. You could try some general minecraft modding discords, but I dont have any to recommend.

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.