CraftTweaker

CraftTweaker

151M Downloads

Issue using hasGamestage in zenscript with events

Saereth opened this issue ยท 6 comments

commented

Intro:

Please note, you will be treated exactly like any other person who submits a bug report, saying this, if you decide to delete this template entirely, your issue will be closed. If you do not provide relevant information when reporting an issue (for example having a script issue and not providing the scripts or the crafttweaker.log file) this issue will be closed. you may now delete this section and continue on with the report.

Issue Description:

Note: If this bug occurs in a modpack, please report this to the modpack author. Otherwise, delete this line and add your description here. If you are using an unnofficial version of Minetweaker or Crafttweaker please report it to the person who gave you the version. Also please look at the other issues to make sure that you are not creating a duplicate.

attempting to check a player stage during a change dimension zenscript event throws errors in the crafttweaker log

What happens:

I'm try to run this zenscript with gamestages installed

import crafttweaker.player.IPlayer;
import crafttweaker.events.IEventManager;
import crafttweaker.event.PlayerChangedDimensionEvent;


events.onPlayerChangedDimension(function(event as crafttweaker.event.PlayerChangedDimensionEvent){

	if (!event.player.hasGameStage("one")){
	//do something
	}
	return;
});

`

crafttweaker reports correct syntax but when the game loads it errors out in the logs and does not work and crafttweaker throws this error:
https://hastebin.com/mevabicihu.pl

What you expected to happen:

I'm wasnt sure if this was a CT issue or gamestage issue (or plain old user error) so Im submitting to both gits. (Darkhax-Minecraft/Game-Stages#37) I would expect it to not error and pass/fail the if check

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

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

https://hastebin.com/mevabicihu.pl


Affected Versions (Do not use "latest"):

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2782
  • Crafttweaker: 4.1.13
  • Using a server: No
  • If yes, does the client have the exact same scripts?

Your most recent log file where the issue was present:

[pastebin/gist/etc link here]

commented

Your hastebin link leads to an empty paste.

commented

ok I'll load up with a fresh script very minimalist and join the discord with the log after, thanks

commented

sorted, thanks!

commented

weird, working on my end, here's a copy of it on gist though
https://gist.github.com/Saereth/3bd9dabf77e0c7c9887b56a42b3fea44

commented

A) The script you sent up there does not match the log given, please send the full script.
B) The full log, please

C) Also, feel free to join the BlameJared discord and ping me there, then you will have a shorter response time ๐Ÿ˜›