Skip to content
This repository has been archived by the owner on Aug 21, 2021. It is now read-only.

Commit

Permalink
godmode y (only recolored) new gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Mapeadoh committed Jun 28, 2021
1 parent 1f0be18 commit b00979f
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 7 deletions.
22 changes: 22 additions & 0 deletions src/main/java/cf/warriorcrystal/other/phobos/EventStage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package cf.warriorcrystal.other.phobos;

import net.minecraftforge.fml.common.eventhandler.Event;

public class EventStage extends Event {
private int stage;

public EventStage() {
}

public EventStage(int stage) {
this.stage = stage;
}

public int getStage() {
return this.stage;
}

public void setStage(int stage) {
this.stage = stage;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package cf.warriorcrystal.other.phobos;

import cf.warriorcrystal.other.phobos.EventStage;
import net.minecraftforge.fml.common.eventhandler.Cancelable;

@Cancelable
public class UpdateWalkingPlayerEvent
extends EventStage {
public UpdateWalkingPlayerEvent(int stage) {
super(stage);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
package me.travis.wurstplus.wurstplustwo.hacks.dev;

import me.travis.wurstplus.wurstplustwo.hacks.WurstplusCategory;
import me.travis.wurstplus.wurstplustwo.hacks.WurstplusHack;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
import net.minecraft.network.Packet;
import net.minecraft.network.play.client.CPacketEntityAction;
import net.minecraft.network.play.client.CPacketInput;
import net.minecraft.network.play.client.CPacketPlayer;
import net.minecraft.network.play.client.CPacketVehicleMove;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import me.travis.wurstplus.Wurstplus;
import me.travis.wurstplus.wurstplustwo.event.events.WurstplusEventPacket.SendPacket;
import cf.warriorcrystal.other.phobos.UpdateWalkingPlayerEvent;
import me.travis.wurstplus.wurstplustwo.guiscreen.settings.WurstplusSetting;
// in collab with ! Beat#7777
public class GodMode extends WurstplusHack {
public GodMode(){
super(WurstplusCategory.WURSTPLUS_BETA);
this.name = "GodMode";// from phobos LOL A PHOBOS MODULE
this.tag = "GodMode";
this.description = "modo dios activado Bv";
}
public Minecraft mc = Minecraft.getMinecraft();
Entity entity;
WurstplusSetting remount = create("Remount", "Remount", false);

@Override
public void enable() {
super.enable();
if (mc.world != null && mc.player.getRidingEntity() != null) {
entity = mc.player.getRidingEntity();
mc.renderGlobal.loadRenderers();
hideEntity();
mc.player.setPosition((double)mc.player.getPosition().getX(), (double)(mc.player.getPosition().getY() - 1), (double)mc.player.getPosition().getZ());
}
if (mc.world != null && remount.get_value(true)) {
remount.set_value(false);
}
}

@Override
public void disable() {
super.disable();
if (remount.get_value(true)) {
remount.set_value(false);
}
mc.player.dismountRidingEntity();
mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.START_SNEAKING));
mc.getConnection().sendPacket((Packet)new CPacketEntityAction((Entity)mc.player, CPacketEntityAction.Action.STOP_SNEAKING));
}

@SubscribeEvent
public void onPacketSend(SendPacket event) {
if (event.get_packet() instanceof CPacketPlayer.Position || event.get_packet() instanceof CPacketPlayer.PositionRotation) {
event.cancel();
}
}

private void hideEntity() {
if (mc.player.getRidingEntity() != null) {
mc.player.dismountRidingEntity();
mc.world.removeEntity(entity);
}
}

private void showEntity(Entity entity2) {
entity2.isDead = false;
mc.world.loadedEntityList.add(entity2);
mc.player.startRiding(entity2, true);
}

@SubscribeEvent
public void onPlayerWalkingUpdate(UpdateWalkingPlayerEvent event) {
if (entity == null) {
return;
}
if (event.getStage() == 0) {// idk, the original include this
if (remount.get_value(true) && Wurstplus.get_module_manager().get_module_with_tag("GodMode").is_active()) {
showEntity(entity);
}
entity.setPositionAndRotation(Minecraft.getMinecraft().player.posX, Minecraft.getMinecraft().player.posY, Minecraft.getMinecraft().player.posZ, Minecraft.getMinecraft().player.rotationYaw, Minecraft.getMinecraft().player.rotationPitch);
mc.player.connection.sendPacket((Packet)new CPacketPlayer.Rotation(mc.player.rotationYaw, mc.player.rotationPitch, true));
mc.player.connection.sendPacket((Packet)new CPacketInput(mc.player.movementInput.moveForward, mc.player.movementInput.moveStrafe, false, false));
mc.player.connection.sendPacket((Packet)new CPacketVehicleMove(entity));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public WurstplusClickGUI() {

set_bind(Wurstplus.WURSTPLUS_KEY_GUI);
}

// poosy config
WurstplusSetting label_frame = create("info", "ClickGUIInfoFrame", "Frames");

WurstplusSetting name_frame_r = create("Name R", "ClickGUINameFrameR", 110, 0, 255);
WurstplusSetting name_frame_g = create("Name G", "ClickGUINameFrameG", 0, 0, 255);
WurstplusSetting name_frame_b = create("Name B", "ClickGUINameFrameB", 0, 0, 255);
WurstplusSetting name_frame_r = create("Name R", "ClickGUINameFrameR", 101, 0, 255);
WurstplusSetting name_frame_g = create("Name G", "ClickGUINameFrameG", 27, 0, 255);
WurstplusSetting name_frame_b = create("Name B", "ClickGUINameFrameB", 255, 0, 255);

WurstplusSetting background_frame_r = create("Background R", "ClickGUIBackgroundFrameR", 0, 0, 255);
WurstplusSetting background_frame_g = create("Background G", "ClickGUIBackgroundFrameG", 0, 0, 255);
WurstplusSetting background_frame_b = create("Background B", "ClickGUIBackgroundFrameB", 0, 0, 255);
WurstplusSetting background_frame_a = create("Background A", "ClickGUIBackgroundFrameA", 50, 0, 255);
WurstplusSetting background_frame_a = create("Background A", "ClickGUIBackgroundFrameA", 255, 0, 255);

WurstplusSetting border_frame_r = create("Border R", "ClickGUIBorderFrameR", 0, 0, 255);
WurstplusSetting border_frame_g = create("Border G", "ClickGUIBorderFrameG", 0, 0, 255);
Expand All @@ -38,8 +38,8 @@ public WurstplusClickGUI() {
WurstplusSetting name_widget_g = create("Name G", "ClickGUINameWidgetG", 255, 0, 255);
WurstplusSetting name_widget_b = create("Name B", "ClickGUINameWidgetB", 255, 0, 255);

WurstplusSetting background_widget_r = create("Background R", "ClickGUIBackgroundWidgetR", 255, 0, 255);
WurstplusSetting background_widget_g = create("Background G", "ClickGUIBackgroundWidgetG", 255, 0, 255);
WurstplusSetting background_widget_r = create("Background R", "ClickGUIBackgroundWidgetR", 101, 0, 255);
WurstplusSetting background_widget_g = create("Background G", "ClickGUIBackgroundWidgetG", 27, 0, 255);
WurstplusSetting background_widget_b = create("Background B", "ClickGUIBackgroundWidgetB", 255, 0, 255);
WurstplusSetting background_widget_a = create("Background A", "ClickGUIBackgroundWidgetA", 100, 0, 255);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public AntiWeb() {
this.name = "Anti Web";
this.tag = "AntiWeb";
this.description = "no te bajan la velocidad las cobwebs";
// spoiler, si te bajan si te chocas con mas de 1 consecutiva
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import me.travis.wurstplus.wurstplustwo.hacks.*;
import me.travis.wurstplus.wurstplustwo.hacks.chat.*;
import me.travis.wurstplus.wurstplustwo.hacks.combat.*;
import me.travis.wurstplus.wurstplustwo.hacks.dev.*;
import me.travis.wurstplus.wurstplustwo.hacks.exploit.*;
import me.travis.wurstplus.wurstplustwo.hacks.gui.*;
import me.travis.wurstplus.wurstplustwo.hacks.misc.*;
Expand Down Expand Up @@ -154,6 +155,7 @@ public WurstplusModuleManager() {

// Dev
add_hack(new WurstplusFakePlayer());
add_hack(new GodMode());

array_hacks.sort(Comparator.comparing(WurstplusHack::get_name));
}
Expand Down

0 comments on commit b00979f

Please sign in to comment.