Script Regen
-
Can anyone make this class a liquidbounce script?http://www.mediafire.com/file/m8yr873ud67schz/Regen.class/file
-
no
-
@vapetest stop using links to other websites
Here is a decompiled version that you can easily turn into a script
package me.aristhena.crest.module.modules.combat; import me.aristhena.crest.module.*; import me.aristhena.crest.option.*; import me.aristhena.event.events.*; import me.aristhena.utils.*; import net.minecraft.potion.*; import net.minecraft.network.play.client.*; import net.minecraft.network.*; import me.aristhena.event.*; import net.minecraft.world.*; import net.minecraft.util.*; import net.minecraft.block.*; @Module.Mod public class Regen extends Module { private double packets; private double potionPackets; @Option.Op(name = "§bHealth", min = 0.0, max = 32.0, increment = 0.32) private double health; private boolean potion; public Regen() { this.packets = 32.0; this.potionPackets = 32.0; this.health = 32.0; this.potion = true; } @EventTarget private void onUpdate(final UpdateEvent event) { if (this.potion) { if (ClientUtils.player().getActivePotionEffect(Potion.regeneration) != null && ClientUtils.player().getActivePotionEffect(Potion.regeneration).getDuration() > 0 && ClientUtils.player().getHealth() <= this.health * 0.0 && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals((Object)Event.State.POST)) { for (int i = 0; i < this.potionPackets; ++i) { ClientUtils.player().getActivePotionEffect(Potion.regeneration).deincrementDuration(); ClientUtils.packet((Packet)new C03PacketPlayer(true)); } } } else if (ClientUtils.player().getHealth() <= this.health * 0.0 && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals((Object)Event.State.POST)) { for (int i = 0; i < this.packets; ++i) { ClientUtils.packet((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) { final Block block = ClientUtils.world().getBlockState(new BlockPos(x, y, z)).getBlock(); if (block != null && !(block instanceof BlockAir)) { AxisAlignedBB boundingBox = block.getCollisionBoundingBox((World)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; } }
-
@oreoezi said in Script Regen:
package me.aristhena.crest.module.modules.combat;
import me.aristhena.crest.module.;
import me.aristhena.crest.option.;
import me.aristhena.event.events.;
import me.aristhena.utils.;
import net.minecraft.potion.;
import net.minecraft.network.play.client.;
import net.minecraft.network.;
import me.aristhena.event.;
import net.minecraft.world.;
import net.minecraft.util.;
import net.minecraft.block.*;@Module.Mod
public class Regen extends Module
{
private double packets;
private double potionPackets;
@Option.Op(name = "§bHealth", min = 0.0, max = 32.0, increment = 0.32)
private double health;
private boolean potion;public Regen() { this.packets = 32.0; this.potionPackets = 32.0; this.health = 32.0; this.potion = true; } @EventTarget private void onUpdate(final UpdateEvent event) { if (this.potion) { if (ClientUtils.player().getActivePotionEffect(Potion.regeneration) != null && ClientUtils.player().getActivePotionEffect(Potion.regeneration).getDuration() > 0 && ClientUtils.player().getHealth() <= this.health * 0.0 && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals((Object)Event.State.POST)) { for (int i = 0; i < this.potionPackets; ++i) { ClientUtils.player().getActivePotionEffect(Potion.regeneration).deincrementDuration(); ClientUtils.packet((Packet)new C03PacketPlayer(true)); } } } else if (ClientUtils.player().getHealth() <= this.health * 0.0 && (ClientUtils.player().isCollidedVertically || this.isInsideBlock()) && event.getState().equals((Object)Event.State.POST)) { for (int i = 0; i < this.packets; ++i) { ClientUtils.packet((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) { final Block block = ClientUtils.world().getBlockState(new BlockPos(x, y, z)).getBlock(); if (block != null && !(block instanceof BlockAir)) { AxisAlignedBB boundingBox = block.getCollisionBoundingBox((World)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; }
}
so is it just me playing in the notepad that the script is finished?
-
This post is deleted!
-
This post is deleted!
-
This post is deleted!
-
@vapetest untitled.js
There you go my good sir! -
-
@vapetest could you speak basic english
-
-
@vapetest I would like a regen based liquidbounce script
-
@vapetest
mc.thePlayer.health += 1
-
This post is deleted!
-
@vapetest I do not understand
-
@vapetest you know why I wanted a script of this class because the normal liquid regen makes me stick in the block and I need a high health that doesn't stick in the block
-
bruh people don't want to learn scriptapi nowadays and beg other people to make it for them instead