Posted November 29, 20222 yr I want to access a certain data value (EndDragonFight.previouslyKilled), but I can only find tutorials for saving and loading data from your mod. I have seen similar mechanics that I don't know the code behind but I'm pretty sure this is possible. I'm not good at modding, but at least I can read a crash report (well enough). That's something, right?
November 30, 20222 yr The parameter can be obtained from EndDragonFight#hasPreviouslyKilledDragon which can be obtained from the ServerLevel#dragonFight assuming the ServerLevel is the END which can be obtained from MinecraftServer#getLevel.
November 30, 20222 yr Author The thing is, what if I want to access this value from the overworld or the nether (or some other dimension added by some other mod), how could I do that? I'm not good at modding, but at least I can read a crash report (well enough). That's something, right?
December 1, 20222 yr That's the point of MinecraftServer#getLevel. You can get the server from any current ServerLevel instance via #getServer.
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.