Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Closed Water

Status
Not open for further replies.

OVRBCK

New member
Joined
Apr 30, 2022
Messages
9
Reaction score
1
Points
3
How could I set my player in Water when he isn't? For example I'm just standing there but the game thinks I'm in Water :)
 
First of all you could set the protected field "inWater" to public in Entity.java and after that you have to set inWater to true in your update method. Now Minecraft thinks you are in water.

From
Code:
protected boolean inWater;
to
Code:
public boolean inWater;

Your onUpdateMethod
Code:
Minecraft.getMinecraft().thePlayer.inWater = true;

If you want to move like your in water you have to "hook" the boolean function "isInWater()" which is also located in Entity.java and return true, if your module or value is enabled, every time the function gets called.

Code:
public boolean isInWater() {
     if(isModuleEnabled("WaterSpoof")) {
        return true;
     }
     return this.inWater;
}

Obviously you have to replace the fictive function "isModuleEnabled("WaterSpoof")" with your own check if module or value is enabled.
 
Last edited:
First of all you could set the protected field "inWater" to public in Entity.java and after that you have to set inWater to true in your update method. Now Minecraft thinks you are in water.

From
Code:
protected boolean inWater;
to
Code:
public boolean inWater;

Your onUpdateMethod
Code:
Minecraft.getMinecraft().thePlayer.inWater = true;

If you want to move like your in water you have to "hook" the boolean function "isInWater()" which is also located in Entity.java and return true, if your module or value is enabled, every time the function gets called.

Code:
public boolean isInWater() {
     if(isModuleEnabled("WaterSpoof")) {
        return true;
     }
     return this.inWater;
}

Obviously you have to replace the fictive function "isModuleEnabled("WaterSpoof")" with your own check if module or value is enabled.
Thanks brotha. Can be closed dear mods on MasterInSkidding
 
Status
Not open for further replies.
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top