-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed siren ability not working. Fixed shock no control ticks.
- Loading branch information
1 parent
f53ec2b
commit ec19fe7
Showing
15 changed files
with
235 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/java/net/ltxprogrammer/changed/client/NullInput.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package net.ltxprogrammer.changed.client; | ||
|
||
import net.minecraft.client.player.Input; | ||
import net.minecraft.world.phys.Vec2; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class NullInput extends Input { | ||
@Override | ||
public void tick(boolean movingSlowly) { | ||
super.tick(movingSlowly); | ||
leftImpulse = 0.0f; | ||
forwardImpulse = 0.0f; | ||
up = false; | ||
down = false; | ||
left = false; | ||
right = false; | ||
jumping = false; | ||
shiftKeyDown = false; | ||
} | ||
|
||
@Override | ||
public @NotNull Vec2 getMoveVector() { | ||
return Vec2.ZERO; | ||
} | ||
|
||
@Override | ||
public boolean hasForwardImpulse() { | ||
return false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/net/ltxprogrammer/changed/mixin/client/MouseHandlerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.ltxprogrammer.changed.mixin.client; | ||
|
||
import net.ltxprogrammer.changed.entity.LivingEntityDataExtension; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.client.MouseHandler; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(MouseHandler.class) | ||
public abstract class MouseHandlerMixin { | ||
@Shadow @Final private Minecraft minecraft; | ||
|
||
@Inject(method = "turnPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;turn(DD)V"), cancellable = true) | ||
public void orDontTurnPlayer(CallbackInfo ci) { | ||
if (this.minecraft.player instanceof LivingEntityDataExtension ext && ext.getNoControlTicks() > 0) | ||
ci.cancel(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.