diff options
author | Walker Selby <git@walkerselby.com> | 2023-01-22 18:34:31 -0800 |
---|---|---|
committer | Walker Selby <git@walkerselby.com> | 2023-01-22 18:34:31 -0800 |
commit | a84b7b2585c409f1f9e5ad499c7275b64df26c34 (patch) | |
tree | 3c1b8f27f6e9d226212210e4533904c7aaaadb59 /loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events | |
parent | d9dd42d9a3045d9ad54577afad35f37bdd15c2b2 (diff) | |
download | Skyblock-Dungeons-Guide-a84b7b2585c409f1f9e5ad499c7275b64df26c34.tar.gz Skyblock-Dungeons-Guide-a84b7b2585c409f1f9e5ad499c7275b64df26c34.tar.bz2 Skyblock-Dungeons-Guide-a84b7b2585c409f1f9e5ad499c7275b64df26c34.zip |
Fix typos / grammar / phrasing
Diffstat (limited to 'loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events')
2 files changed, 10 insertions, 8 deletions
diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/DGAwareEventSubscriptionTransformer.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/DGAwareEventSubscriptionTransformer.java index 4cf6bbc9..07eaa1d9 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/DGAwareEventSubscriptionTransformer.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/DGAwareEventSubscriptionTransformer.java @@ -74,8 +74,10 @@ public class DGAwareEventSubscriptionTransformer implements IClassTransformer private boolean buildEvents(ClassNode classNode) throws Exception { - // Yes, this recursively loads classes until we get this base class. THIS IS NOT A ISSUE. Coremods should handle re-entry just fine. - // If they do not this a COREMOD issue NOT a Forge/LaunchWrapper issue. + // Yes, this recursively loads classes until we get this base class. + // THIS IS NOT AN ISSUE. + // Coremods should handle re-entry just fine. + // If they do not, this is a COREMOD issue, NOT a Forge/LaunchWrapper issue. Class<?> parent = classLoader.loadClass(classNode.superName.replace('/', '.')); if (!Event.class.isAssignableFrom(parent)) { @@ -186,10 +188,10 @@ public class DGAwareEventSubscriptionTransformer implements IClassTransformer method.instructions.add(new VarInsnNode(ALOAD, 0)); method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "setup", voidDesc, false)); method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", listDesc)); - LabelNode initLisitener = new LabelNode(); - method.instructions.add(new JumpInsnNode(IFNULL, initLisitener)); + LabelNode initListener = new LabelNode(); + method.instructions.add(new JumpInsnNode(IFNULL, initListener)); method.instructions.add(new InsnNode(RETURN)); - method.instructions.add(initLisitener); + method.instructions.add(initListener); method.instructions.add(new FrameNode(F_SAME, 0, null, 0, null)); method.instructions.add(new TypeInsnNode(NEW, tList.getInternalName())); method.instructions.add(new InsnNode(DUP)); diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/OwnerAwareASMEventHandler.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/OwnerAwareASMEventHandler.java index 124a6bc7..41e17c1a 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/OwnerAwareASMEventHandler.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/events/OwnerAwareASMEventHandler.java @@ -38,7 +38,7 @@ public class OwnerAwareASMEventHandler implements IEventListener private static int IDs = 0; private static final String HANDLER_DESC = Type.getInternalName(IEventListener.class); private static final String HANDLER_FUNC_DESC = Type.getMethodDescriptor(IEventListener.class.getDeclaredMethods()[0]); - private static final boolean GETCONTEXT = Boolean.parseBoolean(System.getProperty("fml.LogContext", "false")); + private static final boolean GET_CONTEXT = Boolean.parseBoolean(System.getProperty("fml.LogContext", "false")); private final IEventListener handler; private final SubscribeEvent subInfo; @@ -56,7 +56,7 @@ public class OwnerAwareASMEventHandler implements IEventListener @Override public void invoke(Event event) { - if (GETCONTEXT) + if (GET_CONTEXT) ThreadContext.put("mod", owner == null ? "" : owner.getName()); if (handler != null) { @@ -65,7 +65,7 @@ public class OwnerAwareASMEventHandler implements IEventListener handler.invoke(event); } } - if (GETCONTEXT) + if (GET_CONTEXT) ThreadContext.remove("mod"); } |