-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from KatatsumuriPan/develop
Update to v1.5.1
- Loading branch information
Showing
6 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
...java/kpan/uti_alsofluids/asm/tf/integration/gregtech/TF_MetaTileEntityReservoirHatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package kpan.uti_alsofluids.asm.tf.integration.gregtech; | ||
|
||
import kpan.uti_alsofluids.asm.core.AsmTypes; | ||
import kpan.uti_alsofluids.asm.core.adapters.Instructions; | ||
import kpan.uti_alsofluids.asm.core.adapters.Instructions.OpcodeInt; | ||
import kpan.uti_alsofluids.asm.core.adapters.MyClassVisitor; | ||
import kpan.uti_alsofluids.asm.core.adapters.ReplaceInstructionsAdapter; | ||
import org.objectweb.asm.ClassVisitor; | ||
import org.objectweb.asm.MethodVisitor; | ||
import org.objectweb.asm.Opcodes; | ||
|
||
public class TF_MetaTileEntityReservoirHatch { | ||
|
||
private static final String TARGET = "gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityReservoirHatch"; | ||
private static final String FLUID_NAME_TEXT_WIDGET = AsmTypes.HOOK + "integration/gregtech/" + "FluidNameTextWidget"; | ||
|
||
public static ClassVisitor appendVisitor(ClassVisitor cv, String className) { | ||
if (TARGET.equals(className)) { | ||
ClassVisitor newcv = new MyClassVisitor(cv, className) { | ||
@Override | ||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { | ||
MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); | ||
if (name.equals("createTankUI")) { | ||
mv = new ReplaceInstructionsAdapter(mv, name, | ||
Instructions.create() | ||
.typeInsn(Opcodes.NEW, "gregtech/api/gui/widgets/AdvancedTextWidget") | ||
.insn(Opcodes.DUP) | ||
.intInsn(OpcodeInt.BIPUSH, 11) | ||
.intInsn(OpcodeInt.BIPUSH, 40) | ||
.aload(0) | ||
.aload(5) | ||
.label(10) | ||
.invokespecial(TARGET, "getFluidNameText", "(Lgregtech/api/gui/widgets/TankWidget;)Ljava/util/function/Consumer;") | ||
.ldcInsn(0xFFFFFF) | ||
.invokespecial("gregtech/api/gui/widgets/AdvancedTextWidget", "<init>", "(IILjava/util/function/Consumer;I)V") | ||
, | ||
Instructions.create() | ||
.typeInsn(Opcodes.NEW, FLUID_NAME_TEXT_WIDGET) | ||
.insn(Opcodes.DUP) | ||
.intInsn(OpcodeInt.BIPUSH, 11) | ||
.intInsn(OpcodeInt.BIPUSH, 40) | ||
.aload(0) | ||
.aload(5) | ||
.label(10) | ||
.invokespecial(TARGET, "getFluidNameText", "(Lgregtech/api/gui/widgets/TankWidget;)Ljava/util/function/Consumer;") | ||
.ldcInsn(0xFFFFFF) | ||
.invokespecial(FLUID_NAME_TEXT_WIDGET, "<init>", "(IILjava/util/function/Consumer;I)V") | ||
); | ||
success(); | ||
} | ||
return mv; | ||
} | ||
}; | ||
return newcv; | ||
} | ||
return cv; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
item.forge.bucketFilled.name=%s入りバケツ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
majorVersion=1 | ||
minorVersion=5 | ||
patchVersion=0 | ||
patchVersion=1 |