CraftTweaker

CraftTweaker

151M Downloads

[1.12.2] function as a object of a map cannot work properly

friendlyhj opened this issue · 3 comments

commented

Issue Description:

I use this script (see below) and run /ct test command, only to see ...
image

What you expected to happen:

Running /ct test command can show test, instead of hello, world!;

Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):

https://gist.github.com/friendlyhj/8e5e5125d17f6f9870c2e747d3fb8bb7

crafttweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

no ERROR


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2847
  • Crafttweaker: 4.1.20.581
  • Using a server: no
commented

If anyone encounters this problem, there is an alternative solution to this:
QQ图片20230125172117

commented

Let me start by saying that this kind of stuff isn't really supported as it's basically abusing an event for something that it isn't intended for.

However, your issue is probably something inside ZS, so if I can find enough time, I can take a look at it.
For that, I need your compiled classes.
For that, please use an instance with only the scripts in question and add the #debug to each of them.

Then, when you restart your game, a folder named classes or generated (I'm not sure which it was) will appear.
This folder will appear in your MC root directory, so in the same place where you can also find your mods, scripts and config folders.
Inside that folder you will find several .class files.
Please zip the folder and provide them as attachment here.
I usually ask for people to upload files to something like pastebin, but I'll need these files in more than one format so it's easier for you to just upload the zip.

commented