Update js coremods signatures

This commit is contained in:
DBotThePony 2024-08-28 18:10:43 +07:00
parent 60429c35b2
commit 0446e5adb3
Signed by: DBot
GPG Key ID: DCC23B5715498507
3 changed files with 13 additions and 16 deletions

View File

@ -23,13 +23,10 @@ var isOwnPatches = [
function patchMethod(node) {
if (node.desc.endsWith('AbstractContainerMenu;')) {
var threeRows = ASMAPI.mapMethod('m_39237_')
var sixRows = ASMAPI.mapMethod('m_39246_')
for (var i = 0; i < node.instructions.size(); i++) {
var instr = node.instructions.get(i)
if (instr.getOpcode() == Opcodes.INVOKESTATIC && instr.name == threeRows && instr.owner == 'net/minecraft/world/inventory/ChestMenu') {
if (instr.getOpcode() == Opcodes.INVOKESTATIC && instr.name == 'threeRows' && instr.owner == 'net/minecraft/world/inventory/ChestMenu') {
node.instructions.set(instr, new MethodInsnNode(
Opcodes.INVOKESTATIC,
'ru/dbotthepony/mc/otm/compat/vanilla/MatteryChestMenu',
@ -38,7 +35,7 @@ function patchMethod(node) {
))
break
} else if (instr.getOpcode() == Opcodes.INVOKESTATIC && instr.name == sixRows && instr.owner == 'net/minecraft/world/inventory/ChestMenu') {
} else if (instr.getOpcode() == Opcodes.INVOKESTATIC && instr.name == 'sixRows' && instr.owner == 'net/minecraft/world/inventory/ChestMenu') {
node.instructions.set(instr, new MethodInsnNode(
Opcodes.INVOKESTATIC,
'ru/dbotthepony/mc/otm/compat/vanilla/MatteryChestMenu',
@ -80,7 +77,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': clazz,
'methodName': ASMAPI.mapMethod('m_142718_'),
'methodName': 'isOwnContainer',
'methodDesc': '(Lnet/minecraft/world/entity/player/Player;)Z'
},
'transformer': function(node) {
@ -89,7 +86,7 @@ function initializeCoreMod() {
if ((instr.getOpcode() == Opcodes.INSTANCEOF || instr.getOpcode() == Opcodes.CHECKCAST) && instr.desc == 'net/minecraft/world/inventory/ChestMenu') {
instr.desc = 'ru/dbotthepony/mc/otm/compat/vanilla/MatteryChestMenu'
} else if (instr.getOpcode() == Opcodes.INVOKEVIRTUAL && instr.owner == 'net/minecraft/world/inventory/ChestMenu' && instr.name == ASMAPI.mapMethod('m_39261_')) {
} else if (instr.getOpcode() == Opcodes.INVOKEVIRTUAL && instr.owner == 'net/minecraft/world/inventory/ChestMenu' && instr.name == 'getContainer') {
instr.owner = 'ru/dbotthepony/mc/otm/compat/vanilla/MatteryChestMenu'
instr.name = 'getContainer'
}

View File

@ -626,7 +626,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': 'com.mojang.blaze3d.systems.RenderSystem',
'methodName': ASMAPI.mapMethod('m_69478_'), // enableBlend
'methodName': 'enableBlend',
'methodDesc': '()V'
},
'transformer': patchBlendFunc
@ -636,7 +636,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': 'com.mojang.blaze3d.systems.RenderSystem',
'methodName': ASMAPI.mapMethod('m_69461_'), // disableBlend
'methodName': 'disableBlend',
'methodDesc': '()V'
},
'transformer': patchBlendFunc
@ -646,7 +646,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': 'com.mojang.blaze3d.systems.RenderSystem',
'methodName': ASMAPI.mapMethod('m_69405_'), // blendFunc
'methodName': 'blendFunc',
'methodDesc': '(II)V'
},
'transformer': patchBlendFunc
@ -656,7 +656,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': 'com.mojang.blaze3d.systems.RenderSystem',
'methodName': ASMAPI.mapMethod('m_69411_'), // blendFuncSeparate
'methodName': 'blendFuncSeparate',
'methodDesc': '(IIII)V'
},
'transformer': patchBlendFunc
@ -666,7 +666,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': 'com.mojang.blaze3d.systems.RenderSystem',
'methodName': ASMAPI.mapMethod('m_69416_'), // blendFuncSeparate
'methodName': 'blendFuncSeparate',
'methodDesc': '(Lcom/mojang/blaze3d/platform/GlStateManager$SourceFactor;Lcom/mojang/blaze3d/platform/GlStateManager$DestFactor;Lcom/mojang/blaze3d/platform/GlStateManager$SourceFactor;Lcom/mojang/blaze3d/platform/GlStateManager$DestFactor;)V'
},
'transformer': patchBlendFunc
@ -676,7 +676,7 @@ function initializeCoreMod() {
'target': {
'type': 'METHOD',
'class': 'com.mojang.blaze3d.systems.RenderSystem',
'methodName': ASMAPI.mapMethod('m_69408_'), // blendFunc
'methodName': 'blendFunc',
'methodDesc': '(Lcom/mojang/blaze3d/platform/GlStateManager$SourceFactor;Lcom/mojang/blaze3d/platform/GlStateManager$DestFactor;)V'
},
'transformer': patchBlendFunc

View File

@ -8,7 +8,7 @@ function initializeCoreMod() {
'target': {
"type":"METHOD",
"class":"net.minecraft.world.item.BrushItem",
"methodName":"m_5929_",
"methodName":"onUseTick",
"methodDesc":"(Lnet/minecraft/world/level/Level;Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/world/item/ItemStack;I)V"
},
'transformer': function(node) {
@ -49,7 +49,7 @@ function initializeCoreMod() {
'target': {
"type":"METHOD",
"class":"net.minecraft.world.level.block.entity.BrushableBlockEntity",
"methodName":"m_276923_",
"methodName":"brush",
"methodDesc":"(JLnet/minecraft/world/entity/player/Player;Lnet/minecraft/core/Direction;)Z"
},
'transformer': function(node) {
@ -73,4 +73,4 @@ function initializeCoreMod() {
}
},
}
}
}