-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/coltonk9043/Aoba-MC-Hacke…
- Loading branch information
Showing
6 changed files
with
114 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package net.aoba.interfaces; | ||
|
||
public interface IHorseBaseEntity { | ||
void setSaddled(boolean saddled); | ||
} |
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,17 @@ | ||
package net.aoba.mixin; | ||
|
||
import net.aoba.interfaces.IHorseBaseEntity; | ||
import net.minecraft.entity.passive.AbstractHorseEntity; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
|
||
@Mixin(AbstractHorseEntity.class) | ||
public abstract class HorseBaseEntityMixin implements IHorseBaseEntity { | ||
@Shadow | ||
protected abstract void setHorseFlag(int bitmask, boolean flag); | ||
|
||
@Override | ||
public void setSaddled(boolean saddled) { | ||
setHorseFlag(4, saddled); | ||
} | ||
} |
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
44 changes: 44 additions & 0 deletions
44
src/main/java/net/aoba/module/modules/movement/EntityControl.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,44 @@ | ||
package net.aoba.module.modules.movement; | ||
|
||
import net.aoba.Aoba; | ||
import net.aoba.event.events.TickEvent; | ||
import net.aoba.event.listeners.TickListener; | ||
import net.aoba.interfaces.IHorseBaseEntity; | ||
import net.aoba.module.Category; | ||
import net.aoba.module.Module; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.entity.passive.AbstractHorseEntity; | ||
|
||
public class EntityControl extends Module implements TickListener { | ||
public EntityControl() { | ||
this.setName("EntityControl"); | ||
this.setDescription("Allows you to control entities without needing a saddle."); | ||
this.setCategory(Category.of("Movement")); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
Aoba.getInstance().eventManager.RemoveListener(TickListener.class, this); | ||
|
||
for (Entity entity : MC.world.getEntities()) { | ||
if (entity instanceof AbstractHorseEntity) ((IHorseBaseEntity) entity).setSaddled(false); | ||
} | ||
} | ||
|
||
@Override | ||
public void onEnable() { | ||
Aoba.getInstance().eventManager.AddListener(TickListener.class, this); | ||
} | ||
|
||
@Override | ||
public void onToggle() { | ||
|
||
} | ||
|
||
@Override | ||
public void OnUpdate(TickEvent event) { | ||
for (Entity entity : MC.world.getEntities()) { | ||
if (entity instanceof AbstractHorseEntity) ((IHorseBaseEntity) entity).setSaddled(true); | ||
} | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/net/aoba/module/modules/movement/ReverseStep.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,42 @@ | ||
package net.aoba.module.modules.movement; | ||
|
||
import net.aoba.Aoba; | ||
import net.aoba.event.events.TickEvent; | ||
import net.aoba.event.listeners.TickListener; | ||
import net.aoba.module.Category; | ||
import net.aoba.module.Module; | ||
import net.aoba.settings.types.KeybindSetting; | ||
import net.minecraft.client.util.InputUtil; | ||
import org.lwjgl.glfw.GLFW; | ||
|
||
public class ReverseStep extends Module implements TickListener { | ||
public ReverseStep() { | ||
super(new KeybindSetting("key.reversestep", "ReverseStep Key", InputUtil.fromKeyCode(GLFW.GLFW_KEY_UNKNOWN, 0))); | ||
|
||
this.setName("ReverseStep"); | ||
this.setCategory(Category.of("Movement")); | ||
this.setDescription("Steps. But in reverse..."); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
Aoba.getInstance().eventManager.RemoveListener(TickListener.class, this); | ||
} | ||
|
||
@Override | ||
public void onEnable() { | ||
Aoba.getInstance().eventManager.AddListener(TickListener.class, this); | ||
} | ||
|
||
@Override | ||
public void onToggle() { | ||
|
||
} | ||
|
||
@Override | ||
public void OnUpdate(TickEvent event) { | ||
if (MC.player.isOnGround()) { | ||
MC.player.setVelocity(MC.player.getVelocity().x, MC.player.getVelocity().y - 1.0, MC.player.getVelocity().z); | ||
} | ||
} | ||
} |
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