Set mc.timer to public?

ti
6

WIe already in the title, I would like in the "Minecraft.class" "private timer timer = new timer (20.0F);" Set to "public…", in Eclipse you can edit the class but not.

Does anyone know a way?

P. S.: Use a client base.

Lo

Which client base? Liquid Base?

Lo

I can only help you if you answer…

Dr

If you can't edit it will be fine. But usually people often work with getter and settern. Maybe there's something like getTimer?

Wi

Hi, it's best to write a helper class for your client. Most modules will be included in an update function, where a normal timer will not work.

ti

Sorry, no, I work with the clientBase from superblaubeere27

Lo

She also works with Mixins.

https://github.com/...ered/Mixin" class="text-primary">https://github.com/...ered/Mixin" class="text-primary">https://github.com/...ered/Mixin

https://github.com/SpongePowered/Mixin / wiki / Introduction-to-Mixins --- Understanding-mixin Architecture # 5-to-light-a-candle-is-to-cast-a-shadow

So you have to put the following code in this class (https://github.com/superblaubeere27/ClientBase/blob/master/src/main/java/net/superblaubeere27/clientbase/injection/mixins/MixinMinecraft.java)

@Shadow
public GuiScreen currentScreen;

cramming:

@Shadow
public timer timer;

then you just always access this variable, which would be the same as in the minecraft class. It's best to read the entire wiki:

https://github.com/SpongePowered/Mixin / wiki