Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Solved] Help with ASM


Arlyh
 Share

Recommended Posts

Hello, I'm attempting to rewrite a minecraftforge method in net.minecraft.block.Block,

boolean removeBlockByPlayer(World, EntityPlayer, Int, Int, Int)

 

I start by first removing the original method with a ClassVisitor and an overloaded visitMethod that returns null.  I then try to use a MethodVisitor to rewrite the bytecode.  Unfortunately, it seems to be rewriting the net.minecraft.block.Block constructor rather than the intended function, though I have determined that removeBlockByPlayer is indeed deleted by iterating through the ClassNode.methods list.

 

My code is as follows:

 

 

package servercommands.asm;

import static org.objectweb.asm.ClassWriter.*;
import static org.objectweb.asm.Opcodes.*;

import java.util.List;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TypeInsnNode;

import cpw.mods.fml.relauncher.IClassTransformer;

public class ServerCommandsAccessTransformer implements IClassTransformer {

public byte[] deleteMethod(byte[] bytes, int access, String name, String desc) {
	ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
	ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) {
		@Override
		public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
			return null;
		}
	};

	ClassReader cr = new ClassReader(bytes);
	cr.accept(cv,  0);
	cv.visitMethod(access, name, desc, null, null);
	return cw.toByteArray();
}

public byte[] transformer001(String name, byte[] bytes) {
	if(name.equals(ServerCommandsLoadingPlugin.debug ? "net.minecraft.block.Block" : "amj")) {
		bytes = deleteMethod(bytes, ACC_PUBLIC, "removeBlockByPlayer", ServerCommandsLoadingPlugin.debug ? "(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;III)Z" : "(Lxv;Lqx;III)Z");
		ClassNode node = new ClassNode();
		ClassReader reader = new ClassReader(bytes);
		reader.accept(node, 0);

		ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
		node.accept(cw);

		MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "removeBlockByPlayer", ServerCommandsLoadingPlugin.debug ? "(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;III)Z" : "(Lxv;Lqx;III)Z", null, null);

		mv.visitCode();
		mv.visitTypeInsn(NEW, "servercommands/PlayerBreakBlockEvent");
		mv.visitInsn(DUP);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitVarInsn(ALOAD, 0);
		mv.visitVarInsn(ALOAD, 2);
		mv.visitVarInsn(ILOAD, 3);
		mv.visitVarInsn(ILOAD, 4);
		mv.visitVarInsn(ILOAD, 5);
		mv.visitMethodInsn(INVOKESPECIAL, "servercommands/PlayerBreakBlockEvent", "<init>", ServerCommandsLoadingPlugin.debug ? "(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;III)Z" : "(Lxv;Lqx;III)Z");
		mv.visitVarInsn(ASTORE, 6);
		mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/MinecraftForge", "EVENT_BUS", "Lnet/minecraftforge/event/EventBus;");
		mv.visitVarInsn(ALOAD, 6);
		mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/event/EventBus", "post", "(Lnet/minecraftforge/event/Event;)Z");
		mv.visitInsn(POP);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitFieldInsn(GETFIELD, "servercommands/PlayerBreakBlockEvent", "result", "Lnet/minecraftforge/event/Event$Result;");
		mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/event/Event$Result", "DENY", "Lnet/minecraftforge/event/Event$Result;");
		Label l0 = new Label();
		mv.visitJumpInsn(IF_ACMPNE, l0);
		mv.visitInsn(ICONST_0);
		mv.visitInsn(IRETURN);
		mv.visitLabel(l0);
		mv.visitFrame(Opcodes.F_APPEND,1, new Object[] {"servercommands/PlayerBreakBlockEvent"}, 0, null);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitVarInsn(ILOAD, 3);
		mv.visitVarInsn(ILOAD, 4);
		mv.visitVarInsn(ILOAD, 5);
		mv.visitInsn(ICONST_0);
		if(ServerCommandsLoadingPlugin.debug) mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/world/World", "setBlockWithNotify", "(IIII)Z");
		else mv.visitMethodInsn(INVOKEVIRTUAL, "xv", "e", "(IIII)Z");
		mv.visitInsn(IRETURN);
		mv.visitMaxs(8, 7);
		mv.visitEnd();

		bytes = cw.toByteArray();

		System.out.println("Added PlayerBreakBlockEvent to Block.removeBlockByPlayer()");

	}
	return bytes;
}

@Override
public byte[] transform(String name, byte[] bytes) {
	try {
		if(name.contains(ServerCommandsLoadingPlugin.debug ? "net.minecraft.block.Block" : "amj")) System.out.println(name);
		bytes = transformer001(name, bytes);
	} catch(Exception e) {
		throw new RuntimeException(e);
	}
	return bytes;
}
}

 

 

FML output is as follows:

 

 

2012-12-20 17:09:33 [iNFO] [ForgeModLoader] Forge Mod Loader version 4.5.62.495 for Minecraft 1.4.5 loading
2012-12-20 17:09:33 [iNFO] [sTDOUT] Called
2012-12-20 17:09:33 [iNFO] [sTDOUT] net.minecraft.block.Block
2012-12-20 17:09:33 [iNFO] [sTDOUT] Added PlayerBreakBlockEvent to Block.removeBlockByPlayer()
2012-12-20 17:09:33 [iNFO] [sTDERR] java.lang.reflect.InvocationTargetException
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at java.lang.reflect.Method.invoke(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.relaunchServer(FMLRelauncher.java:138)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.FMLRelauncher.handleServerRelaunch(FMLRelauncher.java:33)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.main(MinecraftServer.java:1374)
2012-12-20 17:09:33 [iNFO] [sTDERR] Caused by: java.lang.NoClassDefFoundError: net/minecraft/block/Block
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at net.minecraft.stats.StatList.initMinableStats(StatList.java:185)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at net.minecraft.stats.StatList.<clinit>(StatList.java:96)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.fmlReentry(MinecraftServer.java:1381)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	... 7 more
2012-12-20 17:09:33 [iNFO] [sTDERR] Caused by: java.lang.ClassNotFoundException: net.minecraft.block.Block
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:141)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at java.lang.ClassLoader.loadClass(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at java.lang.ClassLoader.loadClass(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	... 10 more
2012-12-20 17:09:33 [iNFO] [sTDERR] Caused by: java.lang.ClassFormatError: Method "<init>" in class net/minecraft/block/Block has illegal signature "(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;III)Z"
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at java.lang.ClassLoader.defineClass1(Native Method)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at java.lang.ClassLoader.defineClass(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at java.lang.ClassLoader.defineClass(Unknown Source)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:134)
2012-12-20 17:09:33 [iNFO] [sTDERR] 	... 12 more

 

 

I apologize for any silly mistakes I may have made.  I primarily code in C/C++ and have only recently taken an interest in Minecraft modding.

Link to comment
Share on other sites

In the future, use spoiler, not hidden ;)

 

Also, judging from what you're trying to do, the best way to do it would be to add a function call, rather than rewriting the entire method. You might want to have a look at the source code for my mod, which does something similar, but uses ItemInWorldManager (so it's server-side only).

 

If you want more help, PM me (I think I've worked out how to do this ASM stuff)

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

I was able to come up with a solution to my issue, and I would like to make my solution visible to this community.  It is as follows:

 

 

public class ServerCommandsAccessTransformer implements IClassTransformer {

class SCClassVisitor extends ClassVisitor {
	private String methodName;

	public SCClassVisitor(int api, ClassVisitor cv, String methodName) {
		super(api, cv);
		this.methodName = methodName;
	}

	@Override
	public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
		if(name.equals(methodName)) {
			return null;
		}
		return super.visitMethod(access, name, desc, signature, exceptions);
	}		
}

public byte[] deleteMethod(byte[] bytes, int access, String name) {
	ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
	SCClassVisitor cv = new SCClassVisitor(ASM4, cw, name);
	ClassReader cr = new ClassReader(bytes);
	cr.accept(cv,  0);
	return cw.toByteArray();
}


public byte[] transformer001(String name, byte[] bytes) {
	bytes = deleteMethod(bytes, ACC_PUBLIC, "removeBlockByPlayer");

	ClassWriter cw = new ClassWriter(COMPUTE_FRAMES);
	ClassReader cr = new ClassReader(bytes);
	cr.accept(cw, 0);

	MethodVisitor mv = cw.visitMethod(ACC_PUBLIC, "removeBlockByPlayer", ServerCommandsLoadingPlugin.debug ? "(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;III)Z" : "(Lxv;Lqx;III)Z", null, null);

	mv.visitCode();
	mv.visitTypeInsn(NEW, "servercommands/PlayerBreakBlockEvent");
	mv.visitInsn(DUP);
	mv.visitVarInsn(ALOAD, 1);
	mv.visitVarInsn(ALOAD, 0);
	mv.visitVarInsn(ALOAD, 2);
	mv.visitVarInsn(ILOAD, 3);
	mv.visitVarInsn(ILOAD, 4);
	mv.visitVarInsn(ILOAD, 5);
	mv.visitMethodInsn(INVOKESPECIAL, "servercommands/PlayerBreakBlockEvent", "<init>", ServerCommandsLoadingPlugin.debug ? "(Lnet/minecraft/world/World;Lnet/minecraft/block/Block;Lnet/minecraft/entity/player/EntityPlayer;III)V" : "(Lxv;Lamj;Lqx;III)V");
	mv.visitVarInsn(ASTORE, 6);
	mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/common/MinecraftForge", "EVENT_BUS", "Lnet/minecraftforge/event/EventBus;");
	mv.visitVarInsn(ALOAD, 6);
	mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraftforge/event/EventBus", "post", "(Lnet/minecraftforge/event/Event;)Z");
	mv.visitInsn(POP);
	mv.visitVarInsn(ALOAD, 6);
	mv.visitFieldInsn(GETFIELD, "servercommands/PlayerBreakBlockEvent", "result", "Lnet/minecraftforge/event/Event$Result;");
	mv.visitFieldInsn(GETSTATIC, "net/minecraftforge/event/Event$Result", "DENY", "Lnet/minecraftforge/event/Event$Result;");
	Label l0 = new Label();
	mv.visitJumpInsn(IF_ACMPNE, l0);
	mv.visitInsn(ICONST_0);
	mv.visitInsn(IRETURN);
	mv.visitLabel(l0);
	mv.visitFrame(Opcodes.F_APPEND,1, new Object[] {"servercommands/PlayerBreakBlockEvent"}, 0, null);
	mv.visitVarInsn(ALOAD, 1);
	mv.visitVarInsn(ILOAD, 3);
	mv.visitVarInsn(ILOAD, 4);
	mv.visitVarInsn(ILOAD, 5);
	mv.visitInsn(ICONST_0);
	if(ServerCommandsLoadingPlugin.debug) mv.visitMethodInsn(INVOKEVIRTUAL, "net/minecraft/world/World", "setBlockWithNotify", "(IIII)Z"); 
	else mv.visitMethodInsn(INVOKEVIRTUAL, "xv", "e", "(IIII)Z");
	mv.visitInsn(IRETURN);
	mv.visitMaxs(8, 7);
	mv.visitEnd();

	return cw.toByteArray();
}

@Override
public byte[] transform(String name, byte[] bytes) {
	try {
		if(name.equals(ServerCommandsLoadingPlugin.debug ? "net.minecraft.block.Block" : "amj")) {
			System.out.println(name);
			bytes = transformer001(name, bytes);
		}
	} catch(Exception e) {
		throw new RuntimeException(e);
	}
	return bytes;
}
}

 

 

Keepcalm, I did end up going a different direction, but I do appreciate your advice and example code.  It is always helpful to see how other programmers are accomplishing similar problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • hi im having the same problem cant install forge the error text is :  "Failed to run processor: javax.net.ssl.SSLHandshakeException:PKIX path building failed: sun.security.provider.certpath SunCertPathBuilderException: unable to find valid cettfication path to requested target See log for more details." btw i installed optifine normally no errors
    • It was fine yesterday and then randomly last night stopped working.    Crash Report: ---- Minecraft Crash Report ---- // Ooh. Shiny. Time: 1/24/22 11:44 AM Description: Unexpected error java.lang.NullPointerException: Unexpected error     at blusunrize.immersiveengineering.common.blocks.IETileProviderBlock.func_220071_b(IETileProviderBlock.java:378) ~[?:?] {re:classloading}     at net.minecraft.block.AbstractBlock$AbstractBlockState.func_215685_b(AbstractBlock.java:543) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:A}     at net.minecraft.block.AbstractBlock$AbstractBlockState.func_196952_d(AbstractBlock.java:539) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:A}     at baritone.hl.h(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hl.c(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hl.b(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hl.b(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.el.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.el.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hd.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:1.8.0_74] {}     at baritone.hd.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at net.minecraft.client.Minecraft.handler$zbd000$runTick(Minecraft.java) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1448) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:953) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) ~[1.16.5-forge-36.0.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] {}     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.0.1.jar:36.0] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at blusunrize.immersiveengineering.common.blocks.IETileProviderBlock.func_220071_b(IETileProviderBlock.java:378) ~[?:?] {re:classloading}     at net.minecraft.block.AbstractBlock$AbstractBlockState.func_215685_b(AbstractBlock.java:543) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:A}     at net.minecraft.block.AbstractBlock$AbstractBlockState.func_196952_d(AbstractBlock.java:539) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:immersiveengineering.mixins.json:coremods.AbstractBlockStateMixin,pl:mixin:A}     at baritone.hl.h(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hl.c(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hl.b(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hl.b(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.el.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.el.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at baritone.hd.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890) ~[?:1.8.0_74] {}     at baritone.hd.a(Unknown Source) ~[?:1.6.2] {re:classloading}     at net.minecraft.client.Minecraft.handler$zbd000$runTick(Minecraft.java) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A} -- Affected level -- Details:     All players: 2 total; [ClientPlayerEntity['Ougghhha'/8061, l='ClientLevel', x=834.77, y=65.00, z=-1531.00], RemoteClientPlayerEntity['Mukashushki'/62, l='ClientLevel', x=834.15, y=64.58, z=-1530.13]]     Chunk stats: Client Chunk Cache: 2209, 1681     Level dimension: minecraft:overworld     Level spawn location: World: (-64,64,80), Chunk: (at 0,4,0 in -4,5; contains blocks -64,0,80 to -49,255,95), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)     Level time: 294753 game time, 469401 day time     Server brand: forge     Server type: Non-integrated multiplayer server Stacktrace:     at net.minecraft.client.world.ClientWorld.func_72914_a(ClientWorld.java:617) ~[?:?] {re:mixin,re:classloading,xf:OptiFine:default,xf:fml:xaerominimap:xaero_clientworldclass,xf:fml:xaeroworldmap:xaero_wm_clientworldclass}     at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2024) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:628) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:mixins.baritone.json:MixinMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:184) ~[1.16.5-forge-36.0.1.jar:?] {re:classloading,pl:runtimedistcleaner:A}     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] {}     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] {}     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] {}     at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] {}     at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) ~[forge-1.16.5-36.0.1.jar:36.0] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading} -- System Details -- Details:     Minecraft Version: 1.16.5     Minecraft Version ID: 1.16.5     Operating System: Mac OS X (x86_64) version 10.16     Java Version: 1.8.0_74, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 598046936 bytes (570 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)     CPUs: 4     JVM Flags: 8 total; -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     ModLauncher: 8.0.9+86+master.3cf110c     ModLauncher launch target: fmlclient     ModLauncher naming: srg     ModLauncher services:          /mixin-0.8.2.jar mixin PLUGINSERVICE          /eventbus-4.0.0.jar eventbus PLUGINSERVICE          /forge-1.16.5-36.0.1.jar object_holder_definalize PLUGINSERVICE          /forge-1.16.5-36.0.1.jar runtime_enum_extender PLUGINSERVICE          /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE          /forge-1.16.5-36.0.1.jar capability_inject_definalize PLUGINSERVICE          /forge-1.16.5-36.0.1.jar runtimedistcleaner PLUGINSERVICE          /mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE          /OptiFine_1.16.4_HD_U_G7_5.jar OptiFine TRANSFORMATIONSERVICE          /forge-1.16.5-36.0.1.jar fml TRANSFORMATIONSERVICE      FML: 36.0     Forge: net.minecraftforge:36.0.1     FML Language Providers:          javafml@36.0         minecraft@1     Mod List:          forge-1.16.5-36.0.1-client.jar                    |Minecraft                     |minecraft                     |1.16.5              |DONE      |NOSIGNATURE         Farmers-Delight-Mod-1.16.4.jar                    |Farmer's Delight              |farmersdelight                |1.16.3-0.2.4b       |DONE      |NOSIGNATURE         AmbientSounds_v3.1.4_mc1.16.4.jar                 |Ambient Sounds                |ambientsounds                 |3.0.3               |DONE      |NOSIGNATURE         ImmersiveEngineering-1.16.4-4.1.2-129.jar         |Immersive Engineering         |immersiveengineering          |1.16.4-4.1.2-129    |DONE      |44:39:94:cf:1d:8c:be:3c:7f:a9:ee:f4:1e:63:a5:ac:61:f9:c2:87:d5:5b:d9:d6:8c:b5:3e:96:5d:8e:3f:b7         pamhc2trees-1.16.3-1.0.1.jar                      |Pam's HarvestCraft 2 Fruit Tre|pamhc2trees                   |1.0.1               |DONE      |NOSIGNATURE         BiomesOPlenty-1.16.4-13.0.0.440-universal.jar     |Biomes O' Plenty              |biomesoplenty                 |1.16.4-13.0.0.439   |DONE      |NOSIGNATURE         pamhc2crops-1.16.3-1.0.2.jar                      |Pam's HarvestCraft 2 Crops    |pamhc2crops                   |version             |DONE      |NOSIGNATURE         SimpleCoreLib-1.16.4-2.0.4.3.jar                  |SimpleCoreLib                 |simplecorelib                 |1.16.4-2.0.4.3      |DONE      |NOSIGNATURE         CreativeCore_v2.0.10_mc1.16.4.jar                 |CreativeCore                  |creativecore                  |2.0.0               |DONE      |NOSIGNATURE         jei-1.16.4-7.6.1.74.jar                           |Just Enough Items             |jei                           |7.6.1.74            |DONE      |NOSIGNATURE         JustEnoughCalculation-1.16.5-3.8.1.jar            |Just Enough Calculation       |jecalculation                 |3.8.1               |DONE      |NOSIGNATURE         simplefarming-1.16.4-1.3.5.jar                    |Simple Farming                |simplefarming                 |1.16.4-1.3.5        |DONE      |NOSIGNATURE         ProjectE-1.16.5-PE1.0.1B.jar                      |ProjectE                      |projecte                      |PE1.0.1B            |DONE      |NOSIGNATURE         pamhc2foodextended-1.16.3-1.0.4.jar               |Pam's HarvestCraft 2 Food Exte|pamhc2foodextended            |version             |DONE      |NOSIGNATURE         Inventory-Tweaks-Renewed-Mod-1.16.4.jar           |Inventory Tweaks Renewed      |invtweaks                     |1.16.4-1.0.1        |DONE      |NOSIGNATURE         SpartanShields-1.16.4-2.1.1.jar                   |Spartan Shields               |spartanshields                |2.1.1               |DONE      |NOSIGNATURE         create-mc1.16.5_v0.3.1c.jar                       |Create                        |create                        |mc1.16.5_v0.3.1c+151|DONE      |NOSIGNATURE         Xaeros_Minimap_21.12.5_Forge_1.16.5.jar           |Xaero's Minimap               |xaerominimap                  |21.12.5             |DONE      |NOSIGNATURE         pamhc2foodcore-1.16.3-1.0.2.jar                   |Pam's HarvestCraft 2 Food Core|pamhc2foodcore                |version             |DONE      |NOSIGNATURE         XaerosWorldMap_1.20.0_Forge_1.16.5.jar            |Xaero's World Map             |xaeroworldmap                 |1.20.0              |DONE      |NOSIGNATURE         1.16.3SecurityCraftv1.8.20.1.jar                  |SecurityCraft                 |securitycraft                 |v1.8.20.1           |DONE      |NOSIGNATURE         TravelersBackpack-1.16.4-5.3.8.jar                |Traveler's Backpack           |travelersbackpack             |5.3.8               |DONE      |NOSIGNATURE         SereneSeasons-1.16.4-4.0.0.87-universal.jar       |Serene Seasons                |sereneseasons                 |1.16.4-4.0.0.87     |DONE      |NOSIGNATURE         obfuscate-0.6.2-1.16.3_1.jar                      |Obfuscate                     |obfuscate                     |0.6.2               |DONE      |e1:59:1a:56:ec:97:b3:d0:b3:4b:25:06:1f:83:b0:f4:fd:0c:24:e3:6d:ea:94:b1:9f:22:b0:38:13:60:88:ea         vehicle-mod-0.45.2-1.16.3.jar                     |MrCrayfish's Vehicle Mod      |vehicle                       |0.45.2              |DONE      |NOSIGNATURE         SpartanWeaponry-1.16.4-2.1.0-beta-4.jar           |Spartan Weaponry              |spartanweaponry               |2.1.0 beta 4        |DONE      |NOSIGNATURE         MrCrayfishs-Furniture-Mod-1.16.4.jar              |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre19         |DONE      |NOSIGNATURE         baritone-standalone-forge-1.6.2.jar               |Baritone                      |baritoe                       |1.6.2               |DONE      |NOSIGNATURE         ImmersivePetroleum-1.16.4-3.1.0-2.jar             |Immersive Petroleum           |immersivepetroleum            |3.1.0-2             |DONE      |NOSIGNATURE         forge-1.16.5-36.0.1-universal.jar                 |Forge                         |forge                         |36.0.1              |DONE      |22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90         Aquaculture-1.16.4-2.1.12.jar                     |Aquaculture 2                 |aquaculture                   |1.16.4-2.1.12       |DONE      |NOSIGNATURE         SimpleOres2-1.16.4-2.4.3.10.jar                   |Simple Ores                   |simpleores                    |1.16.4-2.4.3.10     |DONE      |NOSIGNATURE     Crash Report UUID: d7306cab-60a6-4cb9-95cb-031bd8f653d7     Launched Version: 1.16.5-forge-36.0.1     Backend library: LWJGL version 3.2.1 build 12     Backend API: Intel(R) Iris(TM) Plus Graphics 640 GL version 2.1 INTEL-16.5.7, Intel Inc.     GL Caps: Using framebuffer using ARB_framebuffer_object extension     Using VBOs: Yes     Is Modded: Definitely; Client brand changed to 'forge'     Type: Client (map_client.txt)     GPU Warnings: version: 2.1     Graphics mode: fast     Resource Packs: Bridge Scrims Overlay, ! Yusei Fudo 1k     Current Language: English (US)     CPU: 4x Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz     OptiFine Version: OptiFine_1.16.4_HD_U_G7     OptiFine Build: 20210221-012854     Render Distance Chunks: 5     Mipmaps: 4     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: null     OpenGlVersion: 2.1 INTEL-16.5.7     OpenGlRenderer: Intel(R) Iris(TM) Plus Graphics 640     OpenGlVendor: Intel Inc.     CpuCount: 4
    • I see. It says that enqueue is not necessary. I was wondering if I had to call the event again somewhere. I was able to call the existing health and see that the two rows of stats are displayed! Thank you Luis.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.