diff --git a/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java b/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java index 2bb58a2..b505e73 100644 --- a/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java +++ b/src/main/java/me/rigamortis/seppuku/impl/management/ModuleManager.java @@ -169,6 +169,7 @@ public final class ModuleManager { add(new BurrowModule()); add(new AutoTorchModule()); add(new AutoClickerModule()); + add(new FakePlayerModule()); // p2w experience if (Seppuku.INSTANCE.getCapeManager().hasCape()) diff --git a/src/main/java/me/rigamortis/seppuku/impl/module/misc/FakePlayerModule.java b/src/main/java/me/rigamortis/seppuku/impl/module/misc/FakePlayerModule.java new file mode 100644 index 0000000..f652391 --- /dev/null +++ b/src/main/java/me/rigamortis/seppuku/impl/module/misc/FakePlayerModule.java @@ -0,0 +1,45 @@ +package me.rigamortis.seppuku.impl.module.misc; + +import com.mojang.authlib.GameProfile; +import me.rigamortis.seppuku.api.module.Module; +import me.rigamortis.seppuku.api.value.Value; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityOtherPlayerMP; + +/** + * @author Seth + * @author noil + */ +public final class FakePlayerModule extends Module { + + public final Value username = new Value("Username", new String[]{"name", "uname", "u"}, "The username of the fake player.", "Notch"); + + private EntityOtherPlayerMP entity; + private final Minecraft mc = Minecraft.getMinecraft(); + + public FakePlayerModule() { + super("FakePlayer", new String[]{"FakeP", "FPlayer"}, "Adds a fake player to your game.", "NONE", -1, Module.ModuleType.MISC); + } + + @Override + public void onEnable() { + super.onEnable(); + if (mc.world != null) { + entity = new EntityOtherPlayerMP(mc.world, new GameProfile(mc.player.getUniqueID(), username.getValue())); + entity.copyLocationAndAnglesFrom(mc.player); + entity.inventory.copyInventory(mc.player.inventory); + mc.world.addEntityToWorld(6942069, entity); + } + } + + @Override + public void onDisable() { + super.onDisable(); + + if (mc.world != null) { + if (entity != null) { + mc.world.removeEntity(entity); + } + } + } +}