aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java
diff options
context:
space:
mode:
authorRoseGoldIsntGay <yoavkau@gmail.com>2022-07-27 21:47:43 +0300
committerRoseGoldIsntGay <yoavkau@gmail.com>2022-07-27 21:47:43 +0300
commit170ccfa42e36f04306820fbc3ef8a8ce3cf75010 (patch)
tree6728741f9a9befcb71ce1f27262073c984affe9a /src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java
parent854c131bf7965cef66d37e80640999242c9e0d65 (diff)
downloadRGA-170ccfa42e36f04306820fbc3ef8a8ce3cf75010.tar.gz
RGA-170ccfa42e36f04306820fbc3ef8a8ce3cf75010.tar.bz2
RGA-170ccfa42e36f04306820fbc3ef8a8ce3cf75010.zip
last update for a whileHEADmaster
imma be real with y'all this is really old changes i never pushed to git so forgive me if the changelog is partial added an autoclicker that probably gets u banned added auto leave limbo added three weirdos auto solver added block size modifiers for dungeons i changed a log of stuff probably bug fixes have fun
Diffstat (limited to 'src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java')
-rw-r--r--src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java b/src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java
new file mode 100644
index 0000000..95507be
--- /dev/null
+++ b/src/main/java/rosegoldaddons/mixins/MixinEntityPlayerSP.java
@@ -0,0 +1,30 @@
+package rosegoldaddons.mixins;
+
+import net.minecraft.client.entity.EntityPlayerSP;
+import net.minecraftforge.common.MinecraftForge;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+import rosegoldaddons.events.PlayerMoveEvent;
+import rosegoldaddons.events.ScreenClosedEvent;
+import rosegoldaddons.features.SexAura;
+
+@Mixin(EntityPlayerSP.class)
+public class MixinEntityPlayerSP {
+ @Inject(method = "closeScreen", at = @At("HEAD"), cancellable = true)
+ public void closeScreen(CallbackInfo ci) {
+ if(SexAura.blocked) ci.cancel();
+ MinecraftForge.EVENT_BUS.post(new ScreenClosedEvent());
+ }
+
+ @Inject(method = "onUpdateWalkingPlayer", at = @At("HEAD"), cancellable = true)
+ public void onUpdateWalking(CallbackInfo cir) {
+ if (MinecraftForge.EVENT_BUS.post(new PlayerMoveEvent.Pre())) cir.cancel();
+ }
+
+ @Inject(method = "onUpdateWalkingPlayer", at = @At("RETURN"), cancellable = true)
+ public void onWalking(CallbackInfo cir) {
+ if (MinecraftForge.EVENT_BUS.post(new PlayerMoveEvent.Post())) cir.cancel();
+ }
+}