com.google.common.eventbus.Subscribe Java Examples
The following examples show how to use
com.google.common.eventbus.Subscribe.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Criticals.java From bleachhack-1.14 with GNU General Public License v3.0 | 7 votes |
@Subscribe public void sendPacket(EventSendPacket event) { if (event.getPacket() instanceof PlayerInteractEntityC2SPacket) { PlayerInteractEntityC2SPacket packet = (PlayerInteractEntityC2SPacket) event.getPacket(); if (packet.getType() == PlayerInteractEntityC2SPacket.InteractionType.ATTACK) { this.doCritical(); /* Lets fake some extra paricles to make the player feel good */ Entity e = packet.getEntity(mc.world); Random r = new Random(); for (int i = 0; i < 10; i++) { mc.particleManager.addParticle(ParticleTypes.CRIT, e.getX(), e.getY() + e.getHeight() / 2, e.getZ(), r.nextDouble() - 0.5, r.nextDouble() - 0.5, r.nextDouble() - 0.5); } } } }
Example #2
Source File: ApmBootListener.java From servicecomb-samples with Apache License 2.0 | 6 votes |
/** * in real APM implementation: create span and so on for stages * @param event */ @AllowConcurrentEvents @Subscribe public void onInvocationFinish(InvocationFinishEvent event) { StringBuilder sb = new StringBuilder(); headerOutputGenerator.generate(sb, event); if (event.getInvocation().isConsumer()) { if (event.getInvocation().isEdge()) { edgeOutputGenerator.generate(sb, event); } else { consumerOutputGenerator.generate(sb, event); } } else { producerOutputGenerator.generate(sb, event); } System.out.println(sb.toString()); }
Example #3
Source File: Peek.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void drawScreen(EventDrawContainer event) { Slot slot = null; try { slot = (Slot) FabricReflect.getFieldValue(event.getScreen(), "field_2787", "focusedSlot"); } catch (Exception e) {} if (slot == null) return; if (!Arrays.equals(new int[] {slot.xPosition, slot.yPosition}, slotPos)) { pageCount = 0; pages = null; } slotPos = new int[] {slot.xPosition, slot.yPosition}; if (getSettings().get(0).toToggle().state) drawShulkerToolTip(slot, event.mouseX, event.mouseY); if (getSettings().get(1).toToggle().state) drawBookToolTip(slot, event.mouseX, event.mouseY); if (getSettings().get(2).toToggle().state) drawMapToolTip(slot, event.mouseX, event.mouseY); }
Example #4
Source File: Freecam.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onMovement(EventMovementTick event) { mc.player.setVelocity(0, 0, 0); camera.setVelocity(0, 0, 0); mc.player.setPos(playerPos[0], playerPos[1], playerPos[2]); camera.yaw = mc.player.yaw; camera.headYaw = mc.player.headYaw; camera.pitch = mc.player.pitch; double speed = getSettings().get(0).toSlider().getValue(); Vec3d forward = new Vec3d(0, 0, speed * 2.5).rotateY(-(float) Math.toRadians(camera.headYaw)); Vec3d strafe = forward.rotateY((float) Math.toRadians(90)); Vec3d motion = camera.getVelocity(); if (mc.options.keyJump.isPressed()) motion = motion.add(0, speed * 1.5, 0); if (mc.options.keySneak.isPressed()) motion = motion.add(0, -speed * 1.5, 0); if (mc.options.keyForward.isPressed()) motion = motion.add(forward.x, 0, forward.z); if (mc.options.keyBack.isPressed()) motion = motion.add(-forward.x, 0, -forward.z); if (mc.options.keyLeft.isPressed()) motion = motion.add(strafe.x, 0, strafe.z); if (mc.options.keyRight.isPressed()) motion = motion.add(-strafe.x, 0, -strafe.z); mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY)); camera.setPos(camera.getX() + motion.x, camera.getY() + motion.y, camera.getZ() + motion.z); event.setCancelled(true); }
Example #5
Source File: AutoSign.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onOpenScreen(EventOpenScreen event) { if (text.length < 3) return; if (event.getScreen() instanceof SignEditScreen) { event.setCancelled(true); if (getSettings().get(0).toToggle().state) { text = new String[] {}; while(text.length < 4) { IntStream chars = new Random().ints(0, 0x10FFFF); text = chars.limit(1000).mapToObj(i -> String.valueOf((char) i)).collect(Collectors.joining()).split("(?<=\\G.{250})"); } } SignEditScreen screen = (SignEditScreen) event.getScreen(); SignBlockEntity sign = (SignBlockEntity) FabricReflect.getFieldValue(screen, "field_3031", "sign"); mc.player.networkHandler.sendPacket(new UpdateSignC2SPacket(sign.getPos(), new LiteralText(text[0]), new LiteralText(text[1]), new LiteralText(text[2]), new LiteralText(text[3]))); } }
Example #6
Source File: AutoSign.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onOpenScreen(EventOpenScreen event) { if (text.length < 3) return; if (event.getScreen() instanceof SignEditScreen) { event.setCancelled(true); if (getSettings().get(0).toToggle().state) { text = new String[] {}; while(text.length < 4) { IntStream chars = new Random().ints(0, 0x10FFFF); text = chars.limit(1000).mapToObj(i -> String.valueOf((char) i)).collect(Collectors.joining()).split("(?<=\\G.{250})"); } } SignEditScreen screen = (SignEditScreen) event.getScreen(); SignBlockEntity sign = (SignBlockEntity) FabricReflect.getFieldValue(screen, "field_3031", "sign"); mc.player.networkHandler.sendPacket(new UpdateSignC2SPacket(sign.getPos(), text[0], text[1], text[2], text[3])); } }
Example #7
Source File: Jesus.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onTick(EventTick event) { Entity e = mc.player.getVehicle() != null ? mc.player.getVehicle() : mc.player; if (e.isSneaking() || e.fallDistance > 3f) return; if (WorldUtils.isFluid(new BlockPos(e.getPos().add(0,0.3,0)))) { e.setVelocity(e.getVelocity().x, 0.08, e.getVelocity().z); } else if (WorldUtils.isFluid(new BlockPos(e.getPos().add(0,0.1,0)))) { e.setVelocity(e.getVelocity().x, 0.05, e.getVelocity().z); } else if (WorldUtils.isFluid(new BlockPos(e.getPos().add(0,0.05,0)))) { e.setVelocity(e.getVelocity().x, 0.01, e.getVelocity().z); } else if (WorldUtils.isFluid(new BlockPos(e.getPos()))) { e.setVelocity(e.getVelocity().x, -0.005, e.getVelocity().z); e.setOnGround(true); } }
Example #8
Source File: ScreenshotOnFailureMonitor.java From vividus with Apache License 2.0 | 6 votes |
@Subscribe public void onAssertionFailure(AssertionFailedEvent event) { if (takeScreenshotOnFailureEnabled.get() && webDriverProvider.isWebDriverInitialized()) { SearchContext searchContext = webUiContext.getSearchContext(); List<WebElement> webElements = searchContext instanceof WebElement ? List.of((WebElement) searchContext) : webUiContext.getAssertingWebElements(); try { screenshotTaker.takeScreenshot("Assertion_Failure", webElements).ifPresent(screenshot -> { Attachment attachment = new Attachment(screenshot.getData(), screenshot.getFileName()); eventBus.post(new AttachmentPublishEvent(attachment)); }); } // CHECKSTYLE:OFF catch (RuntimeException e) { LOGGER.error("Unable to take a screenshot", e); } // CHECKSTYLE:ON } }
Example #9
Source File: Freecam.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onMovement(EventMovementTick event) { mc.player.setVelocity(0, 0, 0); camera.setVelocity(0, 0, 0); mc.player.setPosition(playerPos[0], playerPos[1], playerPos[2]); camera.yaw = mc.player.yaw; camera.headYaw = mc.player.headYaw; camera.pitch = mc.player.pitch; double speed = getSettings().get(0).toSlider().getValue(); Vec3d forward = new Vec3d(0, 0, speed * 2.5).rotateY(-(float) Math.toRadians(camera.headYaw)); Vec3d strafe = forward.rotateY((float) Math.toRadians(90)); Vec3d motion = camera.getVelocity(); if (mc.options.keyJump.isPressed()) motion = motion.add(0, speed * 1.5, 0); if (mc.options.keySneak.isPressed()) motion = motion.add(0, -speed * 1.5, 0); if (mc.options.keyForward.isPressed()) motion = motion.add(forward.x, 0, forward.z); if (mc.options.keyBack.isPressed()) motion = motion.add(-forward.x, 0, -forward.z); if (mc.options.keyLeft.isPressed()) motion = motion.add(strafe.x, 0, strafe.z); if (mc.options.keyRight.isPressed()) motion = motion.add(-strafe.x, 0, -strafe.z); mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.STOP_SNEAKING)); camera.setPosition(camera.x + motion.x, camera.y + motion.y, camera.z + motion.z); event.setCancelled(true); }
Example #10
Source File: AutoTotem.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onTick(EventTick event) { if (mc.player.getOffHandStack().getItem() == Items.TOTEM_OF_UNDYING) return; /* Inventory */ for (int i = 9; i < 44; i++) { if (mc.player.inventory.getStack(i).getItem() == Items.TOTEM_OF_UNDYING) { mc.interactionManager.clickSlot(0, 0, i, SlotActionType.PICKUP, mc.player); mc.interactionManager.clickSlot(1, 0, 45, SlotActionType.PICKUP, mc.player); return; } } /* Hotbar */ for (int i = 0; i < 8; i++) { if (mc.player.inventory.getStack(i).getItem() == Items.TOTEM_OF_UNDYING) { //int oldSlot = mc.player.inventory.currentItem; mc.player.inventory.selectedSlot = i; mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket( Action.SWAP_ITEM_WITH_OFFHAND, BlockPos.ORIGIN, Direction.DOWN)); //mc.player.inventory.currentItem = oldSlot; return; } } }
Example #11
Source File: Freecam.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onMovement(EventMovementTick event) { mc.player.setVelocity(0, 0, 0); camera.setVelocity(0, 0, 0); mc.player.setPos(playerPos[0], playerPos[1], playerPos[2]); camera.yaw = mc.player.yaw; camera.headYaw = mc.player.headYaw; camera.pitch = mc.player.pitch; double speed = getSettings().get(0).toSlider().getValue(); Vec3d forward = new Vec3d(0, 0, speed * 2.5).rotateY(-(float) Math.toRadians(camera.headYaw)); Vec3d strafe = forward.rotateY((float) Math.toRadians(90)); Vec3d motion = camera.getVelocity(); if (mc.options.keyJump.isPressed()) motion = motion.add(0, speed * 1.5, 0); if (mc.options.keySneak.isPressed()) motion = motion.add(0, -speed * 1.5, 0); if (mc.options.keyForward.isPressed()) motion = motion.add(forward.x, 0, forward.z); if (mc.options.keyBack.isPressed()) motion = motion.add(-forward.x, 0, -forward.z); if (mc.options.keyLeft.isPressed()) motion = motion.add(strafe.x, 0, strafe.z); if (mc.options.keyRight.isPressed()) motion = motion.add(-strafe.x, 0, -strafe.z); mc.player.networkHandler.sendPacket(new ClientCommandC2SPacket(mc.player, ClientCommandC2SPacket.Mode.RELEASE_SHIFT_KEY)); camera.setPos(camera.getX() + motion.x, camera.getY() + motion.y, camera.getZ() + motion.z); event.setCancelled(true); }
Example #12
Source File: AutoTotem.java From bleachhack-1.14 with GNU General Public License v3.0 | 6 votes |
@Subscribe public void onTick(EventTick event) { if (mc.player.getOffHandStack().getItem() == Items.TOTEM_OF_UNDYING) return; /* Inventory */ for (int i = 9; i < 44; i++) { if (mc.player.inventory.getInvStack(i).getItem() == Items.TOTEM_OF_UNDYING) { mc.interactionManager.clickSlot(0, 0, i, SlotActionType.PICKUP, mc.player); mc.interactionManager.clickSlot(1, 0, 45, SlotActionType.PICKUP, mc.player); return; } } /* Hotbar */ for (int i = 0; i < 8; i++) { if (mc.player.inventory.getInvStack(i).getItem() == Items.TOTEM_OF_UNDYING) { //int oldSlot = mc.player.inventory.currentItem; mc.player.inventory.selectedSlot = i; mc.player.networkHandler.sendPacket(new PlayerActionC2SPacket( Action.SWAP_HELD_ITEMS, BlockPos.ORIGIN, Direction.DOWN)); //mc.player.inventory.currentItem = oldSlot; return; } } }
Example #13
Source File: AutoReconnect.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onOpenScreen(EventOpenScreen event) { if (event.getScreen() instanceof DisconnectedScreen && !(event.getScreen() instanceof newDisconnectScreen)) { mc.openScreen(new newDisconnectScreen((DisconnectedScreen) event.getScreen())); event.setCancelled(true); } }
Example #14
Source File: Freecam.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void sendPacket(EventSendPacket event) { if (event.getPacket() instanceof ClientCommandC2SPacket) { ClientCommandC2SPacket packet = (ClientCommandC2SPacket) event.getPacket(); if (packet.getMode() == Mode.START_SNEAKING || packet.getMode() == Mode.STOP_SNEAKING) { event.setCancelled(true); } } }
Example #15
Source File: NoSlow.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { if (!isToggled()) return; /* Slowness */ if (getSettings().get(0).toToggle().state && (mc.player.getStatusEffect(StatusEffects.SLOWNESS) != null || mc.player.getStatusEffect(StatusEffects.BLINDNESS) != null)) { if (mc.options.keyForward.isPressed() && mc.player.getVelocity().x > -0.15 && mc.player.getVelocity().x < 0.15 && mc.player.getVelocity().z > -0.15 && mc.player.getVelocity().z < 0.15) { mc.player.setVelocity(mc.player.getVelocity().add(addVelocity)); addVelocity = addVelocity.add(new Vec3d(0, 0, 0.05).rotateY(-(float)Math.toRadians(mc.player.yaw))); } else addVelocity = addVelocity.multiply(0.75, 0.75, 0.75); } /* Soul Sand */ if (getSettings().get(1).toToggle().state && WorldUtils.doesBoxTouchBlock(mc.player.getBoundingBox(), Blocks.SOUL_SAND)) { Vec3d m = new Vec3d(0, 0, 0.125).rotateY(-(float) Math.toRadians(mc.player.yaw)); if (!mc.player.abilities.flying && mc.options.keyForward.isPressed()) { mc.player.setVelocity(mc.player.getVelocity().add(m)); } } /* Slime Block */ if (getSettings().get(2).toToggle().state && WorldUtils.doesBoxTouchBlock(mc.player.getBoundingBox().offset(0,-0.02,0), Blocks.SLIME_BLOCK)) { Vec3d m1 = new Vec3d(0, 0, 0.1).rotateY(-(float) Math.toRadians(mc.player.yaw)); if (!mc.player.abilities.flying && mc.options.keyForward.isPressed()) { mc.player.setVelocity(mc.player.getVelocity().add(m1)); } } /* Web */ if (getSettings().get(3).toToggle().state && WorldUtils.doesBoxTouchBlock(mc.player.getBoundingBox(), Blocks.COBWEB)) { Vec3d m2 = new Vec3d(0, -1, 0.9).rotateY(-(float) Math.toRadians(mc.player.yaw)); if (!mc.player.abilities.flying && mc.options.keyForward.isPressed()) { mc.player.setVelocity(mc.player.getVelocity().add(m2)); } } }
Example #16
Source File: UI.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void readPacket(EventReadPacket event) { lastPacket = System.currentTimeMillis(); if (event.getPacket() instanceof WorldTimeUpdateS2CPacket) { long time = System.currentTimeMillis(); if (time < 500) return; long timeOffset = Math.abs(1000 - (time - prevTime)) + 1000; tps = Math.round(MathHelper.clamp(20 / ((double) timeOffset / 1000), 0, 20) * 100d) / 100d; prevTime = time; } }
Example #17
Source File: Module.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void onDisable() { try{ for (Method method : getClass().getMethods()) { if (method.isAnnotationPresent(Subscribe.class)) { BleachHack.eventBus.unregister(this); break; } } } catch (Exception this_didnt_get_registered_hmm_weird) { this_didnt_get_registered_hmm_weird.printStackTrace(); } }
Example #18
Source File: Fullbright.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { if (getSettings().get(0).toMode().mode == 0) { if (mc.options.gamma < 16) mc.options.gamma += 1.2; } else if (getSettings().get(0).toMode().mode == 1) { mc.player.addStatusEffect(new StatusEffectInstance(StatusEffects.NIGHT_VISION, 1, 5)); }/* else if (getSettings().get(0).toMode().mode == 2) { for (int i = 0; i < 16; i++) { if (mc.world.dimension.getLightLevelToBrightness()[i] != 1) { mc.world.dimension.getLightLevelToBrightness()[i] = 1; } } }*/ }
Example #19
Source File: Module.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
public void onDisable() { try{ for (Method method : getClass().getMethods()) { if (method.isAnnotationPresent(Subscribe.class)) { BleachHack.eventBus.unregister(this); break; } } } catch (Exception this_didnt_get_registered_hmm_weird) { this_didnt_get_registered_hmm_weird.printStackTrace(); } }
Example #20
Source File: FastUse.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { /* set rightClickDelay to 0 */ FabricReflect.writeField(mc, 0, "field_1752", "itemUseCooldown"); /* call rightClickMouse */ if (getSettings().get(0).toMode().mode == 1 && mc.options.keyUse.isPressed()) { for (int i = 0; i < (int) getSettings().get(1).toSlider().getValue(); i++) { FabricReflect.invokeMethod(mc, "method_1583", "doItemUse"); } } }
Example #21
Source File: Ambience.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onPreTick(EventMovementTick event) { if (getSettings().get(0).toToggle().state) { if (getSettings().get(2).toMode().mode == 0) mc.world.setRainGradient(0f); else mc.world.setRainGradient((float) getSettings().get(3).toSlider().getValue()); } if (getSettings().get(1).toToggle().state) { mc.world.setTime((long) getSettings().get(4).toSlider().getValue()); mc.world.setTimeOfDay((long) getSettings().get(4).toSlider().getValue()); } }
Example #22
Source File: Notebot.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onRender(Event3DRender event) { for (Entry<BlockPos, Integer> e: blockTunes.entrySet()) { if (getNote(e.getKey()) != e.getValue()) { RenderUtils.drawFilledBox(e.getKey(), 1F, 0F, 0F, 0.8F); } else { RenderUtils.drawFilledBox(e.getKey(), 0F, 1F, 0F, 0.4F); } } }
Example #23
Source File: Notebot.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onRender(Event3DRender event) { for (Entry<BlockPos, Integer> e: blockTunes.entrySet()) { if (getNote(e.getKey()) != e.getValue()) { RenderUtils.drawFilledBox(e.getKey(), 1F, 0F, 0F, 0.8F); } else { RenderUtils.drawFilledBox(e.getKey(), 0F, 1F, 0F, 0.4F); } } }
Example #24
Source File: Trail.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { if (!getSettings().get(0).toToggle().state) return; if (trails.isEmpty()) trails.add(Arrays.asList(mc.player.getPos().add(0, 0.1, 0), mc.player.getPos())); else if (mc.player.getPos().add(0, 0.1, 0).distanceTo(Iterables.getLast(trails).get(1)) > 0.15) { trails.add(Arrays.asList(Iterables.getLast(trails).get(1), mc.player.getPos().add(0, 0.1, 0))); } }
Example #25
Source File: Spammer.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { if (lines.isEmpty()) return; if (mc.player.age % (int) (getSettings().get(1).toSlider().getValue() * 20) == 0) { if (getSettings().get(0).toMode().mode == 0) { mc.player.sendChatMessage(lines.get(rand.nextInt(lines.size()))); } else if (getSettings().get(0).toMode().mode == 1) { mc.player.sendChatMessage(lines.get(lineCount)); } if (lineCount >= lines.size() -1) lineCount = 0; else lineCount++; } }
Example #26
Source File: Notebot.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onRender(Event3DRender event) { for (Entry<BlockPos, Integer> e: blockTunes.entrySet()) { if (getNote(e.getKey()) != e.getValue()) { RenderUtils.drawFilledBox(e.getKey(), 1F, 0F, 0F, 0.8F); } else { RenderUtils.drawFilledBox(e.getKey(), 0F, 1F, 0F, 0.4F); } } }
Example #27
Source File: PlayerCrash.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { for (int i = 0; i < getSettings().get(0).toSlider().getValue(); i++) { mc.player.networkHandler.sendPacket(new PlayerMoveC2SPacket(Math.random() >= 0.5)); mc.player.networkHandler.sendPacket(new KeepAliveC2SPacket((int) (Math.random() * 8))); } }
Example #28
Source File: Trail.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { if (!getSettings().get(0).toToggle().state) return; if (trails.isEmpty()) trails.add(Arrays.asList(mc.player.getPos().add(0, 0.1, 0), mc.player.getPos())); else if (mc.player.getPos().add(0, 0.1, 0).distanceTo(Iterables.getLast(trails).get(1)) > 0.15) { trails.add(Arrays.asList(Iterables.getLast(trails).get(1), mc.player.getPos().add(0, 0.1, 0))); } }
Example #29
Source File: Tdm.java From tds with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Subscribe public void processEvent(CollectionUpdateEvent event) { Listener fc = fcMap.get(event.getCollectionName()); if (fc == null) { tdmLogger.error("Unknown collection name from event bus " + event); return; } fc.processEvent(event.getType()); }
Example #30
Source File: NoSlow.java From bleachhack-1.14 with GNU General Public License v3.0 | 5 votes |
@Subscribe public void onTick(EventTick event) { if (!isToggled()) return; /* Slowness */ if (getSettings().get(0).toToggle().state && (mc.player.getStatusEffect(StatusEffects.SLOWNESS) != null || mc.player.getStatusEffect(StatusEffects.BLINDNESS) != null)) { if (mc.options.keyForward.isPressed() && mc.player.getVelocity().x > -0.15 && mc.player.getVelocity().x < 0.15 && mc.player.getVelocity().z > -0.15 && mc.player.getVelocity().z < 0.15) { mc.player.setVelocity(mc.player.getVelocity().add(addVelocity)); addVelocity = addVelocity.add(new Vec3d(0, 0, 0.05).rotateY(-(float)Math.toRadians(mc.player.yaw))); } else addVelocity = addVelocity.multiply(0.75, 0.75, 0.75); } /* Soul Sand */ if (getSettings().get(1).toToggle().state && WorldUtils.doesBoxTouchBlock(mc.player.getBoundingBox(), Blocks.SOUL_SAND)) { Vec3d m = new Vec3d(0, 0, 0.125).rotateY(-(float) Math.toRadians(mc.player.yaw)); if (!mc.player.abilities.flying && mc.options.keyForward.isPressed()) { mc.player.setVelocity(mc.player.getVelocity().add(m)); } } /* Slime Block */ if (getSettings().get(2).toToggle().state && WorldUtils.doesBoxTouchBlock(mc.player.getBoundingBox().offset(0,-0.02,0), Blocks.SLIME_BLOCK)) { Vec3d m1 = new Vec3d(0, 0, 0.1).rotateY(-(float) Math.toRadians(mc.player.yaw)); if (!mc.player.abilities.flying && mc.options.keyForward.isPressed()) { mc.player.setVelocity(mc.player.getVelocity().add(m1)); } } /* Web */ if (getSettings().get(3).toToggle().state && WorldUtils.doesBoxTouchBlock(mc.player.getBoundingBox(), Blocks.COBWEB)) { Vec3d m2 = new Vec3d(0, -1, 0.9).rotateY(-(float) Math.toRadians(mc.player.yaw)); if (!mc.player.abilities.flying && mc.options.keyForward.isPressed()) { mc.player.setVelocity(mc.player.getVelocity().add(m2)); } } }