Начинающий
Начинающий
- Статус
- Оффлайн
- Регистрация
- 7 Фев 2024
- Сообщения
- 68
- Реакции
- 0
- Выберите загрузчик игры
- Vanilla
Перед прочтением основного контента ниже, пожалуйста, обратите внимание на обновление внутри секции Майна на нашем форуме. У нас появились:
- бесплатные читы для Майнкрафт — любое использование на свой страх и риск;
- маркетплейс Майнкрафт — абсолютно любая коммерция, связанная с игрой, за исключением продажи читов (аккаунты, предоставления услуг, поиск кодеров читов и так далее);
- приватные читы для Minecraft — в этом разделе только платные хаки для игры, покупайте группу "Продавец" и выставляйте на продажу свой софт;
- обсуждения и гайды — всё тот же раздел с вопросами, но теперь модернизированный: поиск нужных хаков, пати с игроками-читерами и другая полезная информация.
Спасибо!
На югейме вроде не было такого :) если хотите свой цвет, то добавьте колорпикер, есть такая тема уже
Функция:
package Fever.Visual.functions.impl.render;
import Fever.Visual.functions.api.Category;
import Fever.Visual.functions.api.Function;
import Fever.Visual.functions.api.FunctionRegister;
import Fever.Visual.functions.settings.impl.ColorSetting;
import Fever.Visual.functions.settings.impl.ModeSetting;
@FunctionRegister(name = "CustomHitBox", type = Category.Render)
public class CustomHitBox extends Function {
public static final ModeSetting mode = new ModeSetting("Мод","Клиент","Клиент","Свой");
public static final ColorSetting colorSetting = new ColorSetting("Color", 0x000000);
public CustomHitBox() {
addSettings(mode,colorSetting);
}
}
EntityRendererManager:
private void renderDebugBoundingBox(MatrixStack matrixStackIn, IVertexBuilder bufferIn, Entity entityIn, float partialTicks) {
if (!Shaders.isShadowPass) {
float f = entityIn.getWidth() / 2.0F;
this.renderBoundingBox(matrixStackIn, bufferIn, entityIn, 1.0F, 1.0F, 1.0F);
boolean flag = entityIn instanceof EnderDragonEntity;
if (Reflector.IForgeEntity_isMultipartEntity.exists() && Reflector.IForgeEntity_getParts.exists()) {
flag = Reflector.callBoolean(entityIn, Reflector.IForgeEntity_isMultipartEntity);
}
if (flag) {
double d0 = -MathHelper.lerp((double) partialTicks, entityIn.lastTickPosX, entityIn.getPosX());
double d1 = -MathHelper.lerp((double) partialTicks, entityIn.lastTickPosY, entityIn.getPosY());
double d2 = -MathHelper.lerp((double) partialTicks, entityIn.lastTickPosZ, entityIn.getPosZ());
Entity[] aentity = (Entity[]) (Reflector.IForgeEntity_getParts.exists() ? (Entity[]) Reflector.call(entityIn, Reflector.IForgeEntity_getParts) : ((EnderDragonEntity) entityIn).getDragonParts());
for (Entity entity : aentity) {
matrixStackIn.push();
double d3 = d0 + MathHelper.lerp((double) partialTicks, entity.lastTickPosX, entity.getPosX());
double d4 = d1 + MathHelper.lerp((double) partialTicks, entity.lastTickPosY, entity.getPosY());
double d5 = d2 + MathHelper.lerp((double) partialTicks, entity.lastTickPosZ, entity.getPosZ());
matrixStackIn.translate(d3, d4, d5);
this.renderBoundingBox(matrixStackIn, bufferIn, entity, 0.25F, 1.0F, 0.0F);
matrixStackIn.pop();
}
}
if (!FeverVisual.getInstance().getFunctionRegistry().getCustomHitBox().isState()) {
if (entityIn instanceof LivingEntity) {
float f1 = 0.01F;
WorldRenderer.drawBoundingBox(matrixStackIn, bufferIn,
(double) (-f), (double) (entityIn.getEyeHeight() - 0.01F), (double) (-f),
(double) f, (double) (entityIn.getEyeHeight() + 0.01F), (double) f,
1.0F, 0.0F, 0.0F, 1.0F);
}
Vector3d vector3d = entityIn.getLook(partialTicks);
Matrix4f matrix4f = matrixStackIn.getLast().getMatrix();
float lookLineMultiplier = 1.0F;
bufferIn.pos(matrix4f, 0.0F, entityIn.getEyeHeight(), 0.0F).color(0, 0, 255, 255).endVertex();
bufferIn.pos(matrix4f,
(float) (vector3d.x * lookLineMultiplier),
(float) ((double) entityIn.getEyeHeight() + vector3d.y * lookLineMultiplier),
(float) (vector3d.z * lookLineMultiplier))
.color(0, 0, 255, 255).endVertex();
}
}
}
private void renderBoundingBox(MatrixStack matrixStackIn, IVertexBuilder bufferIn, Entity entityIn, float red, float green, float blue) {
if (FeverVisual.getInstance().getFunctionRegistry().getCustomHitBox().isState()) {
if ("Клиент".equals(CustomHitBox.mode.get())) {
final float[] colors = DisplayUtils.IntColor.rgb(ColorUtils.setAlpha(HUD.getColor(0, 10), 255));
red = colors[0];
green = colors[1];
blue = colors[2];
} else if ("Свой".equals(CustomHitBox.mode.get())){
final float[] colors = DisplayUtils.IntColor.rgb(CustomHitBox.colorSetting.get());
red = colors[0];
green = colors[1];
blue = colors[2];
}}
AxisAlignedBB axisalignedbb = entityIn.getBoundingBox().offset(-entityIn.getPosX(), -entityIn.getPosY(), -entityIn.getPosZ());
WorldRenderer.drawBoundingBox(matrixStackIn, bufferIn, axisalignedbb, red, green, blue, 1.0F);
}