Welcome on MasterOf13FPS! MasterOf13FPS

Register today or sign up if you are already a member and never miss any cool content again :)

Bedfucker w/ Legit Rotations&abbau

MasterOf13FPS

Administrator
Staff member
Administrator
MasterOf13FPS
Joined
Jul 11, 2020
Messages
0
Reaction score
25
Points
0
jap er baut genau wie legit ab nur durch blöcke und das auch mit rotations ihr könnt ja noch nen Boolean machen und in eure killaura packen zmb boolean looking; wenn die rots starten dann auf true setzen (den boolean müsst ihr dann auf static machen) und dann halt in killaura abfragen !fucker.looking == true -- den rest könnt ihr selber machen ^^ Und btw der ist hoffend lich gut ^^ -- code erst seit 4-5 wochen im sorry :^)

Utils sind auch drin ^^

--CLIENT: AntiLeg1t

[hide]
public class Fucker extends Module {

public Fucker(String name, String category) {
super(name, category);
}

@Override
protected void config() throws CategoryNotFoundException, DefaultSettingTypeNotSupportedException,
InvalidSettingTypeException, ModeNotFoundException, ValueOutOfBoundsException, NoSuchSettingExcpetion {
Setting range = new Setting(SettingType.SLIDER, this).setDisplayName("Range").setSettingName("FuckerRange")
.setMinSliderValue(2).setMaxSliderValue(8).setCurrentValue(4);
addToSettings(range);
}

private Clock timer = new Clock();

protected static EnumFacing getFacingDirection(BlockPos pos) {

for (int axis = 0; axis < 3; axis++) {
for (int add = -1; add < 2; add++) {
if (add == -1 || add == 1) {
BlockPos bpm = add(pos, Axis.get(axis), add);
if (mc.theWorld.getBlockState(bpm).getBlock().isSolidFullCube()
|| (mc.theWorld.getBlockState(bpm).getBlock().isTranslucent()
&& !mc.theWorld.getBlockState(bpm).getBlock().equals(Blocks.air))) {
if (bpm.equals(pos.add(0, -1, 0))) {
return EnumFacing.UP;
}
if (bpm.equals(pos.add(-1, 0, 0))) {
return EnumFacing.EAST;
}
if (bpm.equals(pos.add(1, 0, 0))) {
return EnumFacing.WEST;
}
if (bpm.equals(pos.add(0, 0, -1))) {
return EnumFacing.SOUTH;
}
if (bpm.equals(pos.add(0, 0, 1))) {
return EnumFacing.NORTH;
}
}
}
add++;
}
axis++;
}
return null;
}

private static BlockPos add(BlockPos pos, Axis axis, int add) {
switch (axis) {
case X:
return pos.add(add, 0, 0);
case Y:
return pos.add(0, add, 0);
case Z:
return pos.add(0, 0, add);
}
return null;
}

private enum Axis {
X, Y, Z;

private static Axis get(int i) {
if (i == 0) {
return X;
}
if (i == 1) {
return Y;
}
if (i == 2) {
return Z;
}
return null;
}
}

public int id = 26;

@Override
public void onDisable() {
super.onDisable();
mc.playerController.isHittingBlock = false;
mc.playerController.curBlockDamageMP = 0.0F;
mc.playerController.stepSoundTickCounter = 0.0F;
mc.playerController.blockHitDelay = 5;
mc.theWorld.sendBlockBreakProgress(mc.thePlayer.getEntityId(), mc.playerController.field_178895_c,
(int) (mc.playerController.curBlockDamageMP * 10.0F) - 1);
}

@Override
public void onEnable() {
super.onEnable();
}

private BlockPos focus = null;
private BlockPos afterFocus = null;
private HashMap<BlockPos, Integer> failures = new HashMap<>();

@EventTarget
public void onUpdate(EventUpdate e) throws NoSuchSettingExcpetion {

try {

BlockPos pos = getClosestBlock((int) getParentSettings().getSettingByName("FuckerRange").getCurrentValue(),
id);

if (pos != null) {
focus = pos;
mc.playerController.func_180512_c(pos, mc.thePlayer.func_174811_aO());
mc.effectRenderer.func_180532_a(pos, mc.thePlayer.func_174811_aO());
mc.thePlayer.swingItem();
} else {
if (focus != null) {
afterFocus = focus;
focus = null;
timer.start();
mc.playerController.isHittingBlock = false;
mc.playerController.curBlockDamageMP = 0.0F;
mc.playerController.stepSoundTickCounter = 0.0F;
mc.playerController.blockHitDelay = 5;
mc.theWorld.sendBlockBreakProgress(mc.thePlayer.getEntityId(), mc.playerController.field_178895_c,
(int) (mc.playerController.curBlockDamageMP * 10.0F) - 1);
}
}

if (afterFocus != null) {
if (timer.timePassed() >= 100) {
if (!mc.theWorld.getBlockState(afterFocus).getBlock().equals(Blocks.air)) {
NotificationBuilder builder = new NotificationBuilder().builder()
.setContent("Block didn't break.", "Fucker failed to destroy block").setDuration(3600)
.setPreset(NotificationPreset.FLAT_BLUE).setSize(new Size(30, 100)).build(); //auch removen wenn ihr keinen notification system habt
builder.show();
timer.start();
afterFocus = null;
} else {
NotificationBuilder builder = new NotificationBuilder().builder()
.setContent("Block broken.", "Fucker destroyed block").setDuration(3600)
.setPreset(NotificationPreset.FLAT_BLUE).setSize(new Size(30, 80)).build(); //auch removen wenn ihr keinen notification system habt
builder.show();
timer.start();
afterFocus = null;
}
}
}

} catch (Exception ex) {
ex.printStackTrace();
}
}

private String numberPrefix(int integer) {
if (integer == 1) {
return "st";
}
if (integer == 2) {
return "nd";
}
if (integer == 3) {
return "rd";
}
return "th";
}

private float getBreakingTime(Block block) {
return 1220;
}

private BlockPos getClosestBlock(int reach, int id) {
BlockPos pre = null;
for (int x = reach - (reach * 2); x < reach; x++) {
for (int y = reach - (reach * 2); y < reach; y++) {
for (int z = reach - (reach * 2); z < reach; z++) {

double xPos = (mc.thePlayer.posX + x);
double yPos = (mc.thePlayer.posY + y);
double zPos = (mc.thePlayer.posZ + z);

BlockPos bp = new BlockPos(xPos, yPos, zPos);

if (Block.getIdFromBlock(mc.theWorld.getBlockState(bp).getBlock()) == id) {
double curDistance = mc.thePlayer.getDistance(bp.getX(), bp.getY(), bp.getZ());
if (curDistance <= reach) {
reach = (int) curDistance;
pre = bp;
}
}
}

}
}
return pre;
}




private class BlockUtils {

private static class Rotation {

private float yaw;
private float pitch;

public float getPitch() {
return pitch;
}

public float getYaw() {
return yaw;
}

public Rotation(float yaw, float pitch) {
this.yaw = yaw;
this.pitch = pitch;
}

public Rotation(Vec3 bp) {
Rotation rotation = BlockUtils.calculateRotation(bp);
setInstance(rotation);
}

public Rotation(BlockPos bp) {
Rotation rotation = BlockUtils.calculateRotation(new Vec3(bp));
setInstance(rotation);
}

private void setInstance(Rotation rotation) {
this.yaw = rotation.getYaw();
this.pitch = rotation.getPitch();
}
}

public static Rotation calculateRotation(Vec3 bp) {
return new Rotation(calculateYaw(bp), calculatePitch(bp));
}

private static float calculateYaw(Vec3 bp) {

Minecraft mc = Minecraft.getMinecraft();
double xD = bp.xCoord + 0.5 - mc.thePlayer.posX;
double zD = bp.zCoord + 0.5 - mc.thePlayer.posZ;
return (float) ((float) Math.atan2(zD, xD) / Math.PI * 180) - 90;

}

private static float calculatePitch(Vec3 bp) {
Minecraft mc = Minecraft.getMinecraft();
double yD = (bp.yCoord) - (mc.thePlayer.posY + mc.thePlayer.getEyeHeight());
return (float) -((float) Math.atan2(yD, mc.thePlayer.getDistance(bp.xCoord, bp.yCoord, bp.zCoord)) / Math.PI
* 180);

}

@EventTarget
public void onPlayerPackets(EventPlayerPacket e) {
if (this.focus != null) {
Rotation rotation = BlockUtils.calculateRotation(new Vec3(focus));
e.setYaw(rotation.getYaw());
e.setPitch(rotation.getPitch());
mc.thePlayer.rotationYawHead = rotation.getYaw();
mc.thePlayer.rotationPitchHead = rotation.getPitch(); // Error? Removed diese Zeile
}
}
[/hide]
 
Du solltest nicht zu viel mit static arbeiten, am besten eine einzige Instance verwenden. Und außerdem in einem Module, braucht man kein einziges mal static.
 
Du solltest nicht zu viel mit static arbeiten, am besten eine einzige Instance verwenden. Und außerdem in einem Module, braucht man kein einziges mal static.
Ich hatte die BlockUtils class da rein gemacht, die ist bei mir in eine extra class ^^
 
Ich hatte die BlockUtils class da rein gemacht, die ist bei mir in eine extra class ^^
Was hat das jetzt mit meiner Aussage, dass du weniger static benutzen solltest zu tun?
 
shape1
shape2
shape3
shape4
shape5
shape6
Back
Top