GoalXZ beacon render setting
This commit is contained in:
parent
e25bf9f077
commit
b0066a93ca
@ -353,6 +353,12 @@ public class Settings {
|
||||
*/
|
||||
public Setting<Boolean> renderGoalIgnoreDepth = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Renders X/Z type Goals with the vanilla beacon beam effect. Combining this with
|
||||
* {@link #renderGoalIgnoreDepth} will cause strange render clipping.
|
||||
*/
|
||||
public Setting<Boolean> renderGoalXZBeacon = new Setting<>(false);
|
||||
|
||||
/**
|
||||
* Ignore depth when rendering the selection boxes (to break, to place, to walk into)
|
||||
*/
|
||||
|
@ -33,6 +33,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityBeaconRenderer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
@ -297,6 +298,31 @@ public final class PathRenderer implements Helper {
|
||||
} else if (goal instanceof GoalXZ) {
|
||||
GoalXZ goalPos = (GoalXZ) goal;
|
||||
|
||||
if (Baritone.settings().renderGoalXZBeacon.get()) {
|
||||
mc.getTextureManager().bindTexture(TileEntityBeaconRenderer.TEXTURE_BEACON_BEAM);
|
||||
|
||||
if (Baritone.settings().renderGoalIgnoreDepth.get()) {
|
||||
GlStateManager.disableDepth();
|
||||
}
|
||||
|
||||
TileEntityBeaconRenderer.renderBeamSegment(
|
||||
goalPos.getX() - renderPosX,
|
||||
-renderPosY,
|
||||
goalPos.getZ() - renderPosZ,
|
||||
partialTicks,
|
||||
1.0,
|
||||
player.world.getTotalWorldTime(),
|
||||
0,
|
||||
256,
|
||||
color.getColorComponents(null)
|
||||
);
|
||||
|
||||
if (Baritone.settings().renderGoalIgnoreDepth.get()) {
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
minX = goalPos.getX() + 0.002 - renderPosX;
|
||||
maxX = goalPos.getX() + 1 - 0.002 - renderPosX;
|
||||
minZ = goalPos.getZ() + 0.002 - renderPosZ;
|
||||
|
Loading…
Reference in New Issue
Block a user