Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventTarget
- public void onPreMotion(EventPreMotion e) {
- String mode = manager.getSettingByName("Tower-Modes").getValString();
- BlockPos pos = new BlockPos(mc.thePlayer.posX, mc.thePlayer.posY - 1.0D, mc.thePlayer.posZ);
- if (mc.thePlayer.getCurrentEquippedItem().getItem() instanceof ItemBlock && mc.theWorld.getBlockState(pos) != null) {
- e.setPitch(90);
- this.towerHelper = getBlock(pos);
- if (mode.equalsIgnoreCase("Legit")) {
- if(mc.thePlayer.onGround) {
- mc.thePlayer.jump();
- }
- }
- if (mode.equalsIgnoreCase("Cubecraft")) {
- if(mc.thePlayer.onGround) {
- mc.thePlayer.setPosition(mc.thePlayer.posX, mc.thePlayer.posY + 1.5, mc.thePlayer.posZ);
- }
- }
- if(time.hasReached((long) manager.getSettingByName("Tower-Delay").getValDouble())) {
- if(mc.theWorld.getBlockState(pos) != null && mc.theWorld.getBlockState(pos).getBlock() == Blocks.air) {
- mc.playerController.func_178890_a(mc.thePlayer, mc.theWorld, mc.thePlayer.getCurrentEquippedItem(), this.towerHelper.blockPos, this.towerHelper.enumFacing, new Vec3(pos));
- mc.thePlayer.swingItem();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement