Merge pull request #3876 from wagyourtail/1.19/1.19.4

1.19.4
This commit is contained in:
leijurv 2023-03-14 18:19:57 -07:00 committed by GitHub
commit 6db376c02e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 10 deletions

View File

@ -26,6 +26,6 @@
"depends": {
"fabricloader": ">=0.11.0",
"minecraft": "1.19.3"
"minecraft": "1.19.4-rc.3"
}
}

View File

@ -4,6 +4,6 @@ mod_version=1.9.1
maven_group=baritone
archives_base_name=baritone
minecraft_version=1.19.3
minecraft_version=1.19.4-rc3
forge_version=1.19.3-44.0.1
fabric_version=0.14.11

View File

@ -43,8 +43,8 @@ rootProject.name = 'baritone'
include("tweaker")
if (System.getProperty("Baritone.enabled_platforms") == null) {
System.setProperty("Baritone.enabled_platforms", "fabric,forge")
// System.setProperty("Baritone.enabled_platforms", "fabric")
// System.setProperty("Baritone.enabled_platforms", "fabric,forge")
System.setProperty("Baritone.enabled_platforms", "fabric")
}
for (platform in System.getProperty("Baritone.enabled_platforms").split(",")) {
include(platform)

View File

@ -24,6 +24,7 @@ import baritone.api.pathing.goals.GoalComposite;
import baritone.api.process.IFarmProcess;
import baritone.api.process.PathingCommand;
import baritone.api.process.PathingCommandType;
import baritone.api.utils.BetterBlockPos;
import baritone.api.utils.RayTraceUtils;
import baritone.api.utils.Rotation;
import baritone.api.utils.RotationUtils;
@ -306,7 +307,7 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
ItemEntity ei = (ItemEntity) entity;
if (PICKUP_DROPPED.contains(ei.getItem().getItem())) {
// +0.1 because of farmland's 0.9375 dummy height lol
goalz.add(new GoalBlock(new BlockPos(entity.position().x, entity.position().y + 0.1, entity.position().z)));
goalz.add(new GoalBlock(new BetterBlockPos(entity.position().x, entity.position().y + 0.1, entity.position().z)));
}
}
}

View File

@ -25,6 +25,7 @@ import baritone.api.pathing.goals.GoalXZ;
import baritone.api.process.IFollowProcess;
import baritone.api.process.PathingCommand;
import baritone.api.process.PathingCommandType;
import baritone.api.utils.BetterBlockPos;
import baritone.utils.BaritoneProcessHelper;
import java.util.List;
import java.util.function.Predicate;
@ -59,7 +60,7 @@ public final class FollowProcess extends BaritoneProcessHelper implements IFollo
pos = following.blockPosition();
} else {
GoalXZ g = GoalXZ.fromDirection(following.position(), Baritone.settings().followOffsetDirection.value, Baritone.settings().followOffsetDistance.value);
pos = new BlockPos(g.getX(), following.position().y, g.getZ());
pos = new BetterBlockPos(g.getX(), following.position().y, g.getZ());
}
return new GoalNear(pos, Baritone.settings().followRadius.value);
}

View File

@ -27,6 +27,7 @@ import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.ChatFormatting;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
@ -133,7 +134,7 @@ public class GuiClick extends Screen implements Helper {
//TODO: check
IRenderer.glColor(Color.RED, 0.4F);
RenderSystem.lineWidth(Baritone.settings().pathRenderLineWidthPixels.value);
RenderSystem.disableTexture();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
RenderSystem.depthMask(false);
RenderSystem.disableDepthTest();
BetterBlockPos a = new BetterBlockPos(currentMouseOver);
@ -142,7 +143,6 @@ public class GuiClick extends Screen implements Helper {
RenderSystem.enableDepthTest();
RenderSystem.depthMask(true);
RenderSystem.enableTexture();
RenderSystem.disableBlend();
}
}

View File

@ -24,6 +24,8 @@ import baritone.utils.accessor.IEntityRenderManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.*;
import java.awt.*;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.world.phys.AABB;
import org.joml.Matrix4f;
@ -48,10 +50,10 @@ public interface IRenderer {
static void startLines(Color color, float alpha, float lineWidth, boolean ignoreDepth) {
RenderSystem.enableBlend();
RenderSystem.setShader(GameRenderer::getPositionColorShader);
RenderSystem.blendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);
glColor(color, alpha);
RenderSystem.lineWidth(lineWidth);
RenderSystem.disableTexture();
RenderSystem.depthMask(false);
if (ignoreDepth) {
@ -69,7 +71,6 @@ public interface IRenderer {
}
RenderSystem.depthMask(true);
RenderSystem.enableTexture();
RenderSystem.disableBlend();
}