Help Help
-
Script
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package me.aristhena.crest.module.modules.combat; import me.aristhena.crest.module.Module; import me.aristhena.crest.module.Module.Mod; import me.aristhena.crest.option.Option.Op; import me.aristhena.event.EventTarget; import me.aristhena.event.Event.State; import me.aristhena.event.events.UpdateEvent; import me.aristhena.utils.ClientUtils; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.block.BlockHopper; import net.minecraft.network.play.client.C03PacketPlayer; import net.minecraft.potion.Potion; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.MathHelper; @Mod public class Regen extends Module { private double packets = 5.0D; private double potionPackets = 8.5D; @Op( name = "§bHealth", min = 0.0D, max = 20.0D, increment = 0.5D ) private double health = 9.9D; private boolean potion = true; public Regen() { } @EventTarget private void onUpdate(UpdateEvent event) { int i; if (this.potion) { if (ClientUtils.player().getActivePotionEffect(Potion.regeneration) != null && ClientUtils.player().getActivePotionEffect(Potion.regeneration).getDuration() > 0 && (double)ClientUtils.player().getHealth() <= this.health * 2.0D && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) { for(i = 0; (double)i < this.potionPackets; ++i) { ClientUtils.player().getActivePotionEffect(Potion.regeneration).deincrementDuration(); ClientUtils.packet(new C03PacketPlayer(true)); } } } else if ((double)ClientUtils.player().getHealth() <= this.health * 2.0D && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals(State.POST)) { for(i = 0; (double)i < this.packets; ++i) { ClientUtils.packet(new C03PacketPlayer(true)); } } } private boolean isInsideBlock() { for(int x = MathHelper.floor_double(ClientUtils.player().boundingBox.minX); x < MathHelper.floor_double(ClientUtils.player().boundingBox.maxX) + 1; ++x) { for(int y = MathHelper.floor_double(ClientUtils.player().boundingBox.minY); y < MathHelper.floor_double(ClientUtils.player().boundingBox.maxY) + 1; ++y) { for(int z = MathHelper.floor_double(ClientUtils.player().boundingBox.minZ); z < MathHelper.floor_double(ClientUtils.player().boundingBox.maxZ) + 1; ++z) { Block block = ClientUtils.world().getBlockState(new BlockPos(x, y, z)).getBlock(); if (block != null && !(block instanceof BlockAir)) { AxisAlignedBB boundingBox = block.getCollisionBoundingBox(ClientUtils.world(), new BlockPos(x, y, z), ClientUtils.world().getBlockState(new BlockPos(x, y, z))); if (block instanceof BlockHopper) { boundingBox = new AxisAlignedBB((double)x, (double)y, (double)z, (double)(x + 1), (double)(y + 1), (double)(z + 1)); } if (boundingBox != null && ClientUtils.player().boundingBox.intersectsWith(boundingBox)) { return true; } } } } } return false; } }
-
@skidma Thanks, skidma is on liquid base ready to play at scriptmanager?
-
@skidma I still don't understand what you mean
-
@skidma Thank you so much for trying to help me
-
@skidma skidma the script didn't work
-
it's java codes dude
-
@allah-gaming has how to transform into liquid script?