Open lexi-the-cute opened 1 month ago
Oh, I see what's going on. I'm changing the value each time the variable is accessed. This also means that it will be changed when the player is not sleeping.
Minecraft's code:
My code:
@ModifyExpressionValue(method = "tick", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/PlayerEntity;sleepTimer:I", opcode = Opcodes.GETFIELD))
private int tickTT20(int original) {
if (!TT20.config.enabled() || !TT20.config.sleepingAcceleration()) return original;
if (((Entity)(Object)this).getWorld().isClient()) return original;
return original + TT20.TPS_CALCULATOR.applicableMissedTicks();
}
I'm unsure about how I can fix this so I'll leave this issue be for now. Will fix whenever I find a fix, I'm sorry :(
tt20-0.6.0+mc1.20.1.jar
This causes problems with my datapacks for custom dimensions as I check the SleepTimer to determine when I need to reset the daylight cycle and weather cycle in custom dimensions