Skip to content

Commit

Permalink
Patch CustomNPCs Unofficial
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa-maintainer committed Mar 1, 2025
1 parent 1bc6563 commit b76e285
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ If you are still using 0.1.0 Cleanroom, use 0.5.4. But that's not recommended.
* Mcjty Core
* LoliASM
* Howling Moon
* Custom NPCs
* Custom NPCs (Unofficial)
* XNet
* ZeroCore (ExtremeReactor)
* Smooth Font
Expand Down
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ dependencies {
//BetterPortals
compileOnly(fg.deobf("curse.maven:betterportals-322948:2883633"))

//CustomNPCs Unofficial
compileOnly(fg.deobf("curse.maven:customnpcs-1086839:6166874"))

implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.1.0'

// Mixin and it's common libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class ModPatchConfig {
@Config.Name("Enable Howling Moon Patch")
public boolean enableHowlingMoon = true;
@Config.Name("Enable Custom NPCs Patch")
@Config.Comment("Also patches Custom NPCs Unofficial, will log harmless errors")
public boolean enableCustomNPC = true;
@Config.Name("Enabel Survivial Inc. Patch")
public boolean enableSurvivialInc = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

import com.google.common.reflect.ClassPath;
import net.minecraft.launchwrapper.Launch;
import noppes.npcs.PlayerEventHandler;
import noppes.npcs.ScriptPlayerEventHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(value = ScriptPlayerEventHandler.class, remap = false)
@Mixin(value = {ScriptPlayerEventHandler.class, PlayerEventHandler.class}, remap = false)
public class ScriptPlayerEventHandlerMixin {
@Redirect(method = "registerForgeEvents", at = @At(value = "INVOKE", target = "Lcom/google/common/reflect/ClassPath$ClassInfo;load()Ljava/lang/Class;"))
private Class<?> hackClassinfoLoad(ClassPath.ClassInfo instance) throws ClassNotFoundException {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
package com.cleanroommc.fugue.transformer.universal;

import com.cleanroommc.fugue.common.Fugue;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.Modifier;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.*;
import top.outlands.foundation.IExplicitTransformer;

import java.io.ByteArrayInputStream;
import java.lang.reflect.AccessFlag;
import java.util.*;

public class FinalStripperTransformer implements IExplicitTransformer {
Expand Down

0 comments on commit b76e285

Please sign in to comment.