Fixes Nuker bugs, Fixes Freecam bugs, Changes some default values in HotbarRefill and renames some variables as well.
This commit is contained in:
parent
9dbaacd108
commit
dac9179703
|
@ -255,8 +255,12 @@ public final class ModuleListComponent extends ResizableHudComponent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void mouseClickMove(int mouseX, int mouseY, int button) {
|
||||
super.mouseClickMove(mouseX, mouseY, button);
|
||||
public void mouseClick(int mouseX, int mouseY, int button) {
|
||||
super.mouseClick(mouseX, mouseY, button);
|
||||
|
||||
if (this.currentSettings != null) {
|
||||
this.currentSettings.mouseClick(mouseX, mouseY, button);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -511,6 +515,15 @@ public final class ModuleListComponent extends ResizableHudComponent {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClick(int mouseX, int mouseY, int button) {
|
||||
super.mouseClick(mouseX, mouseY, button);
|
||||
for (HudComponent component : this.components) {
|
||||
component.mouseClick(mouseX, mouseY, button);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseRelease(int mouseX, int mouseY, int button) {
|
||||
super.mouseRelease(mouseX, mouseY, button);
|
||||
|
|
|
@ -14,21 +14,21 @@ import net.minecraft.item.ItemStack;
|
|||
import team.stiff.pomelo.impl.annotated.handler.annotation.Listener;
|
||||
|
||||
/**
|
||||
* Automatically refills the players hotbar.
|
||||
* Automatically refills the players hot-bar.
|
||||
*
|
||||
* @author Old Chum
|
||||
* @since 12/7/19
|
||||
*/
|
||||
public class HotBarRefillModule extends Module {
|
||||
public final Value<Float> delay = new Value<>("Delay", new String[]{"Del"}, "The amount of delay in milliseconds.", 50.0f);
|
||||
public final Value<Float> delay = new Value<>("Delay", new String[]{"Del"}, "The delay(ms) per item transfer to hot-bar.", 500.0f, 0.0f, 2000.0f, 1.0f);
|
||||
public final Value<Integer> percentage = new Value<>("RefillPercentage", new String[]{"percent", "p", "percent"}, "The percentage a slot should be filled to get refilled.", 50, 0, 100, 1);
|
||||
public final Value<Boolean> offHand = new Value<>("OffHand", new String[]{"oh", "off", "hand"}, "If the off hand should be refilled.", true);
|
||||
|
||||
private Timer timer = new Timer();
|
||||
private final Timer timer = new Timer();
|
||||
|
||||
public HotBarRefillModule() {
|
||||
super("HotBarRefill", new String[]{"Replenish", "Refill", "AutoHotBar", "hbr", "Restock", "HBRestock", "HBRefill", "Hotbar"}, "NONE", -1, ModuleType.MISC);
|
||||
this.setDesc("Automatically refills the players hotbar.");
|
||||
super("HotBarRefill", new String[]{"Replenish", "Refill", "AutoHotBar", "hbr", "Restock", "HBRestock", "HBRefill", "Hotbar", "Hot-bar"}, "NONE", -1, ModuleType.MISC);
|
||||
this.setDesc("Automatically refills the players hot-bar.");
|
||||
}
|
||||
|
||||
@Listener
|
||||
|
|
|
@ -54,6 +54,8 @@ public final class FreeCamModule extends Module {
|
|||
this.riding = mc.player.getRidingEntity();
|
||||
mc.player.dismountRidingEntity();
|
||||
this.entity.startRiding(this.riding);
|
||||
} else {
|
||||
this.riding = null;
|
||||
}
|
||||
this.entity.rotationYaw = mc.player.rotationYaw;
|
||||
this.entity.rotationYawHead = mc.player.rotationYawHead;
|
||||
|
|
|
@ -30,9 +30,9 @@ public final class NukerModule extends Module {
|
|||
}
|
||||
|
||||
public final Value<Float> distance = new Value<Float>("Distance", new String[]{"Dist", "D"}, "Maximum distance in blocks the nuker will reach.", 4.5f, 0.0f, 5.0f, 0.1f);
|
||||
public final Value<Boolean> fixed = new Value<Boolean>("Fixed distances", new String[]{"F", "fixed"}, "Use vertical and horizontal distances in blocks instead of distances relative to the camera.", false);
|
||||
public final Value<Float> Vdistance = new Value<Float>("Vertical Distance", new String[]{"VDist", "VD"}, "Maximum vertical distance in blocks the nuker will reach.", 4.5f, 0.0f, 5.0f, 0.1f);
|
||||
public final Value<Float> Hdistance = new Value<Float>("Horizontal Distance", new String[]{"HDist", "HD"}, "Maximum horizontal distance in blocks the nuker will reach.", 3f, 0.0f, 5.0f, 0.1f);
|
||||
public final Value<Boolean> fixed = new Value<Boolean>("FixedDistance", new String[]{"Fixed", "fdist", "F"}, "Use vertical and horizontal distances in blocks instead of distances relative to the camera.", false);
|
||||
public final Value<Float> vDistance = new Value<Float>("VerticalDistance", new String[]{"Vertical", "vdist", "VD"}, "Maximum vertical distance in blocks the nuker will reach.", 4.5f, 0.0f, 5.0f, 0.1f);
|
||||
public final Value<Float> hDistance = new Value<Float>("HorizontalDistance", new String[]{"Horizontal", "hist","HD"}, "Maximum horizontal distance in blocks the nuker will reach.", 3f, 0.0f, 5.0f, 0.1f);
|
||||
|
||||
private Block selected;
|
||||
|
||||
|
@ -83,7 +83,7 @@ public final class NukerModule extends Module {
|
|||
public void clickBlock(EventRightClickBlock event) {
|
||||
if (this.mode.getValue() == Mode.SELECTION) {
|
||||
final Block block = Minecraft.getMinecraft().world.getBlockState(event.getPos()).getBlock();
|
||||
if (block != null && block != this.selected) {
|
||||
if (block != this.selected) {
|
||||
this.selected = block;
|
||||
Seppuku.INSTANCE.logChat("Nuker block set to " + block.getLocalizedName());
|
||||
event.setCanceled(true);
|
||||
|
@ -104,21 +104,22 @@ public final class NukerModule extends Module {
|
|||
BlockPos ret = null;
|
||||
|
||||
if (this.fixed.getValue()) {
|
||||
float maxVDist = this.Vdistance.getValue();
|
||||
float maxHDist = this.Hdistance.getValue();
|
||||
float maxVDist = this.vDistance.getValue();
|
||||
float maxHDist = this.hDistance.getValue();
|
||||
for (float x = 0; x <= maxHDist; x++) {
|
||||
for (float y = 0; y <= maxVDist; y++) {
|
||||
for (float z = 0; z <= maxHDist; z++) {
|
||||
for (int revX = 0; revX <= 1; revX++, x = -x) {
|
||||
for (int revZ = 0; revZ <= 1; revZ++, z = -z) {
|
||||
final BlockPos pos = new BlockPos(mc.player.posX + x, mc.player.posY + y, mc.player.posZ + z);
|
||||
if (
|
||||
(mc.world.getBlockState(pos).getBlock() != Blocks.AIR &&
|
||||
!(mc.world.getBlockState(pos).getBlock() instanceof BlockLiquid)) &&
|
||||
canBreak(pos) &&
|
||||
((selection && mc.world.getBlockState(pos).getBlock() == this.selected) || true)
|
||||
) {
|
||||
ret = pos;
|
||||
if ((mc.world.getBlockState(pos).getBlock() != Blocks.AIR &&
|
||||
!(mc.world.getBlockState(pos).getBlock() instanceof BlockLiquid)) &&
|
||||
this.canBreak(pos)) {
|
||||
if (selection && (this.selected != null)) {
|
||||
if (mc.world.getBlockState(pos).getBlock().equals(this.selected)) {
|
||||
ret = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,10 +133,12 @@ public final class NukerModule extends Module {
|
|||
for (float z = maxDist; z >= -maxDist; z--) {
|
||||
final BlockPos pos = new BlockPos(mc.player.posX + x, mc.player.posY + y, mc.player.posZ + z);
|
||||
final double dist = mc.player.getDistance(pos.getX(), pos.getY(), pos.getZ());
|
||||
if (dist <= maxDist && (mc.world.getBlockState(pos).getBlock() != Blocks.AIR && !(mc.world.getBlockState(pos).getBlock() instanceof BlockLiquid)) && canBreak(pos) && ((selection && mc.world.getBlockState(pos).getBlock() == this.selected) || true)) {
|
||||
if (pos.getY() >= mc.player.posY) {
|
||||
maxDist = (float) dist;
|
||||
ret = pos;
|
||||
if (dist <= maxDist && (mc.world.getBlockState(pos).getBlock() != Blocks.AIR && !(mc.world.getBlockState(pos).getBlock() instanceof BlockLiquid)) && canBreak(pos)) {
|
||||
if (selection && (this.selected != null)) {
|
||||
if (pos.getY() >= mc.player.posY && mc.world.getBlockState(pos).getBlock().equals(this.selected)) {
|
||||
maxDist = (float) dist;
|
||||
ret = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue