20w10a
- broken scarpet shapes
This commit is contained in:
1 parent
170fd9d762
commit
42f78a596a
16 files changed
+78
-48
No files matched your search
@@ -468,7 +468,7 @@ public class ScriptCommand
|
||||
{
|
||||
ServerCommandSource source = context.getSource();
|
||||
CarpetScriptHost host = getHost(context);
|
||||
BlockBox area = new BlockBox(a, b);
|
||||
BlockBox area = BlockBox.method_34390(a, b);
|
||||
CarpetExpression cexpr = new CarpetExpression(host.main, expr, source, origin);
|
||||
int int_1 = area.getBlockCountX() * area.getBlockCountY() * area.getBlockCountZ();
|
||||
if (int_1 > CarpetSettings.fillLimit)
|
||||
@@ -517,7 +517,7 @@ public class ScriptCommand
|
||||
{
|
||||
ServerCommandSource source = context.getSource();
|
||||
CarpetScriptHost host = getHost(context);
|
||||
BlockBox area = new BlockBox(a, b);
|
||||
BlockBox area = BlockBox.method_34390(a, b); // create
|
||||
CarpetExpression cexpr = new CarpetExpression(host.main, expr, source, origin);
|
||||
int int_1 = area.getBlockCountX() * area.getBlockCountY() * area.getBlockCountZ();
|
||||
if (int_1 > CarpetSettings.fillLimit)
|
||||
|
||||
@@ -113,7 +113,7 @@ public class FeatureGenerator
|
||||
|
||||
private static Thing simpleTree(TreeFeatureConfig config)
|
||||
{
|
||||
config.ignoreFluidCheck();
|
||||
//config.ignoreFluidCheck();
|
||||
return simplePlop(Feature.TREE.configure(config));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import java.util.List;
|
||||
@@ -21,16 +22,20 @@ import java.util.List;
|
||||
public abstract class ContainerMixin
|
||||
{
|
||||
|
||||
@Shadow public abstract ItemStack onSlotClick(int int_1, int int_2, SlotActionType slotActionType_1, PlayerEntity playerEntity_1);
|
||||
@Shadow public abstract void onSlotClick(int int_1, int int_2, SlotActionType slotActionType_1, PlayerEntity playerEntity_1);
|
||||
|
||||
@Shadow public abstract void sendContentUpdates();
|
||||
|
||||
@Shadow @Final public DefaultedList<Slot> slots;
|
||||
|
||||
@Shadow protected abstract void endQuickCraft();
|
||||
|
||||
@Shadow public abstract ItemStack method_34255();
|
||||
|
||||
@Inject( method = "internalOnSlotClick", at = @At(value = "HEAD"), cancellable = true)
|
||||
private void onThrowClick( int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfoReturnable<ItemStack> cir)
|
||||
private void onThrowClick(int slotId, int clickData, SlotActionType actionType, PlayerEntity playerEntity, CallbackInfo ci)
|
||||
{
|
||||
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && playerEntity.getInventory().getCursorStack().isEmpty() && slotId >= 0)
|
||||
if (actionType == SlotActionType.THROW && CarpetSettings.ctrlQCraftingFix && this.method_34255().isEmpty() /* playerEntity.getInventory().getCursorStack().isEmpty()*/ && slotId >= 0)
|
||||
{
|
||||
ItemStack itemStack_1 = ItemStack.EMPTY;
|
||||
Slot slot_4 = slots.get(slotId);
|
||||
@@ -44,8 +49,8 @@ public abstract class ContainerMixin
|
||||
this.onSlotClick(slotId, 0, SlotActionType.THROW, playerEntity);
|
||||
}
|
||||
this.sendContentUpdates();
|
||||
cir.setReturnValue(itemStack_1);
|
||||
cir.cancel();
|
||||
this.endQuickCraft();
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,11 @@ public class PlayerManager_scarpetEventsMixin
|
||||
PLAYER_RESPAWNS.onPlayerEvent(player);
|
||||
}
|
||||
|
||||
@Inject(method = "respawnPlayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;onSpawn()V"))
|
||||
@Inject(method = "respawnPlayer", at = @At(
|
||||
value = "INVOKE",
|
||||
//target = "Lnet/minecraft/server/network/ServerPlayerEntity;onSpawn()V"
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;method_34225()V"
|
||||
))
|
||||
private void invalidatePreviousInstance(ServerPlayerEntity player, boolean alive, CallbackInfoReturnable<ServerPlayerEntity> cir)
|
||||
{
|
||||
((ServerPlayerEntityInterface)player).invalidateEntityObjectReference();
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ServerPlayNetworkHandler_scarpetEventsMixin
|
||||
{
|
||||
@Shadow public ServerPlayerEntity player;
|
||||
|
||||
@Inject(method = "onPlayerInput", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;method_14218(FFZZ)V"))
|
||||
@Inject(method = "onPlayerInput", at = @At(value = "INVOKE", target = "Lnet/minecraft/server/network/ServerPlayerEntity;updateInput(FFZZ)V"))
|
||||
private void checkMoves(PlayerInputC2SPacket p, CallbackInfo ci)
|
||||
{
|
||||
if (PLAYER_RIDES.isNeeded() && (p.getSideways() != 0.0F || p.getForward() != 0.0F || p.isJumping() || p.isSneaking()))
|
||||
|
||||
@@ -80,7 +80,7 @@ public abstract class ServerPlayerEntity_scarpetEventMixin extends PlayerEntity
|
||||
}
|
||||
}
|
||||
|
||||
@Redirect(method = "method_14218", at = @At(
|
||||
@Redirect(method = "updateInput", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/server/network/ServerPlayerEntity;setSneaking(Z)V"
|
||||
))
|
||||
|
||||
@@ -34,7 +34,7 @@ public abstract class StructureBlockBlockEntity_limitsMixin
|
||||
method = "saveStructure(Z)Z",
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/structure/Structure;saveFromWorld(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;ZLnet/minecraft/block/Block;)V"
|
||||
target = "Lnet/minecraft/structure/Structure;saveFromWorld(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Vec3i;ZLnet/minecraft/block/Block;)V"
|
||||
),
|
||||
index = 4
|
||||
)
|
||||
|
||||
@@ -11,6 +11,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
||||
|
||||
@@ -25,7 +26,7 @@ public abstract class TradeOutputSlot_scarpetEventMixin {
|
||||
@Inject(method = "onTakeItem", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/village/Merchant;trade(Lnet/minecraft/village/TradeOffer;)V")
|
||||
)
|
||||
private void onTrade(PlayerEntity player, ItemStack stack, CallbackInfoReturnable<ItemStack> cir) {
|
||||
private void onTrade(PlayerEntity player, ItemStack stack, CallbackInfo ci) {
|
||||
if(PLAYER_TRADES.isNeeded() && !this.merchant.getMerchantWorld().isClient())
|
||||
{
|
||||
PLAYER_TRADES.onTrade((ServerPlayerEntity) player, merchant, merchantInventory.getTradeOffer());
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.network.PacketByteBuf;
|
||||
import net.minecraft.network.packet.c2s.play.UpdateStructureBlockC2SPacket;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -18,7 +19,7 @@ public class UpdateStructureBlockC2SPacketMixin {
|
||||
@Shadow
|
||||
private BlockPos offset;
|
||||
@Shadow
|
||||
private BlockPos size;
|
||||
private Vec3i size;
|
||||
|
||||
@Inject(
|
||||
method = "<init>(Lnet/minecraft/network/PacketByteBuf;)V",
|
||||
@@ -28,7 +29,7 @@ public class UpdateStructureBlockC2SPacketMixin {
|
||||
if (buf.readableBytes() == 6*4) {
|
||||
// This will throw an exception if carpet is not installed on client
|
||||
offset = new BlockPos(MathHelper.clamp(buf.readInt(), -CarpetSettings.structureBlockLimit, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), -CarpetSettings.structureBlockLimit, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), -CarpetSettings.structureBlockLimit, CarpetSettings.structureBlockLimit));
|
||||
size = new BlockPos(MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit));
|
||||
size = new Vec3i(MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit), MathHelper.clamp(buf.readInt(), 0, CarpetSettings.structureBlockLimit));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,11 @@ public class WorldRenderer_scarpetRenderMixin
|
||||
// in normal circumstances we want to render shapes at the very end so it appears correctly behind stuff.
|
||||
if (!FabricAPIHooks.WORLD_RENDER_EVENTS && CarpetClient.shapes != null && transparencyShader == null)
|
||||
{
|
||||
RenderSystem.pushMatrix();
|
||||
CarpetClient.shapes.render(camera, tickDelta);
|
||||
RenderSystem.popMatrix();
|
||||
matrices.push();
|
||||
//RenderSystem.pushMatrix(); ??
|
||||
CarpetClient.shapes.render(matrices, camera, tickDelta);
|
||||
//RenderSystem.popMatrix(); ??
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +58,11 @@ public class WorldRenderer_scarpetRenderMixin
|
||||
// with fabulous graphics - stuff doesn't work this way for some reason - need to render with chunk lines.
|
||||
if (!FabricAPIHooks.WORLD_RENDER_EVENTS && CarpetClient.shapes != null && transparencyShader != null)
|
||||
{
|
||||
RenderSystem.pushMatrix();
|
||||
CarpetClient.shapes.render(camera, tickDelta);
|
||||
RenderSystem.popMatrix();
|
||||
matrices.push();
|
||||
//RenderSystem.pushMatrix();
|
||||
CarpetClient.shapes.render(matrices, camera, tickDelta);
|
||||
//RenderSystem.popMatrix();
|
||||
matrices.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
|
||||
|
||||
|
||||
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(playerShadow, (byte) (player.headYaw * 256 / 360)), playerShadow.world.getRegistryKey());
|
||||
server.getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.class_5893.ADD_PLAYER, playerShadow));
|
||||
server.getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.Action.ADD_PLAYER, playerShadow));
|
||||
player.getServerWorld().getChunkManager().updateCameraPosition(playerShadow);
|
||||
return playerShadow;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package carpet.script.bundled;
|
||||
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtIo;
|
||||
import net.minecraft.nbt.PositionTracker;
|
||||
import net.minecraft.nbt.NbtTagSizeTracker;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.nbt.TagReaders;
|
||||
|
||||
@@ -97,7 +97,7 @@ public class FileModule extends Module
|
||||
else
|
||||
{
|
||||
dataInput_1.readUTF();
|
||||
return TagReaders.of(byte_1).read(dataInput_1, 0, PositionTracker.DEFAULT);
|
||||
return TagReaders.of(byte_1).read(dataInput_1, 0, NbtTagSizeTracker.EMPTY);
|
||||
}
|
||||
}
|
||||
catch (IOException ignored)
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.client.render.Camera;
|
||||
import net.minecraft.client.render.Tessellator;
|
||||
import net.minecraft.client.render.VertexConsumerProvider;
|
||||
import net.minecraft.client.render.VertexFormat;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.AffineTransformation;
|
||||
import net.minecraft.client.world.ClientWorld;
|
||||
import net.minecraft.client.render.VertexFormats;
|
||||
@@ -48,7 +49,7 @@ public class ShapesRenderer
|
||||
shapes = new HashMap<>();
|
||||
}
|
||||
|
||||
public void render(Camera camera, float partialTick)
|
||||
public void render(MatrixStack matrices, Camera camera, float partialTick)
|
||||
{
|
||||
//Camera camera = this.client.gameRenderer.getCamera();
|
||||
ClientWorld iWorld = this.client.world;
|
||||
@@ -62,11 +63,11 @@ public class ShapesRenderer
|
||||
RenderSystem.defaultBlendFunc();
|
||||
//RenderSystem.blendFuncSeparate(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE, GlStateManager.SrcFactor.ONE, GlStateManager.DstFactor.ZERO);
|
||||
//RenderSystem.shadeModel(7425);
|
||||
RenderSystem.shadeModel(GL11.GL_FLAT);
|
||||
RenderSystem.enableAlphaTest();
|
||||
RenderSystem.alphaFunc(GL11.GL_GREATER, 0.003f);
|
||||
//////////RenderSystem.shadeModel(GL11.GL_FLAT);
|
||||
//////////RenderSystem.enableAlphaTest();
|
||||
//////////RenderSystem.alphaFunc(GL11.GL_GREATER, 0.003f);
|
||||
RenderSystem.disableCull();
|
||||
RenderSystem.disableLighting();
|
||||
//////////RenderSystem.disableLighting();
|
||||
RenderSystem.depthMask(false);
|
||||
// causes water to vanish
|
||||
//RenderSystem.depthMask(true);
|
||||
@@ -100,7 +101,7 @@ public class ShapesRenderer
|
||||
|
||||
s -> {
|
||||
if ( !s.lastCall() && s.shouldRender(dimensionType))
|
||||
s.renderLines(tessellator, bufferBuilder, cameraX, cameraY, cameraZ, partialTick);
|
||||
s.renderLines(matrices, tessellator, bufferBuilder, cameraX, cameraY, cameraZ, partialTick);
|
||||
}
|
||||
);
|
||||
//texts
|
||||
@@ -109,7 +110,7 @@ public class ShapesRenderer
|
||||
s ->
|
||||
{
|
||||
if ( s.lastCall() && s.shouldRender(dimensionType))
|
||||
s.renderLines(tessellator, bufferBuilder, cameraX, cameraY, cameraZ, partialTick);
|
||||
s.renderLines(matrices, tessellator, bufferBuilder, cameraX, cameraY, cameraZ, partialTick);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -120,7 +121,7 @@ public class ShapesRenderer
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
RenderSystem.enableTexture();
|
||||
RenderSystem.shadeModel(7424);
|
||||
//////////////RenderSystem.shadeModel(7424);
|
||||
}
|
||||
|
||||
public void addShapes(ListTag tag)
|
||||
@@ -184,7 +185,7 @@ public class ShapesRenderer
|
||||
protected MinecraftClient client;
|
||||
long expiryTick;
|
||||
double renderEpsilon = 0;
|
||||
public abstract void renderLines(Tessellator tessellator, BufferBuilder builder, double cx, double cy, double cz, float partialTick );
|
||||
public abstract void renderLines(MatrixStack matrices, Tessellator tessellator, BufferBuilder builder, double cx, double cy, double cz, float partialTick );
|
||||
public void renderFaces(Tessellator tessellator, BufferBuilder builder, double cx, double cy, double cz, float partialTick ) {}
|
||||
protected RenderedShape(MinecraftClient client, T shape)
|
||||
{
|
||||
@@ -230,8 +231,9 @@ public class ShapesRenderer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderLines(Tessellator tessellator, BufferBuilder builder, double cx, double cy, double cz, float partialTick)
|
||||
public void renderLines(MatrixStack matrices, Tessellator tessellator, BufferBuilder builder, double cx, double cy, double cz, float partialTick)
|
||||
{
|
||||
/*
|
||||
if (shape.a == 0.0) return;
|
||||
Vec3d v1 = shape.relativiseRender(client.world, shape.pos, partialTick);
|
||||
Camera camera1 = client.gameRenderer.getCamera();
|
||||
@@ -243,13 +245,17 @@ public class ShapesRenderer
|
||||
RenderSystem.disableCull();
|
||||
else
|
||||
RenderSystem.enableCull();
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.translatef((float)(v1.x - d), (float)(v1.y - e), (float)(v1.z - f));
|
||||
RenderSystem.normal3f(0.0F, 1.0F, 0.0F);
|
||||
//RenderSystem.pushMatrix();
|
||||
matrices.push();
|
||||
//RenderSystem.translatef((float)(v1.x - d), (float)(v1.y - e), (float)(v1.z - f));
|
||||
matrices.translate(v1.x - d,v1.y - e,v1.z - f);
|
||||
//RenderSystem.normal3f(0.0F, 1.0F, 0.0F);
|
||||
//matrices.
|
||||
|
||||
if (shape.facing == null)
|
||||
{
|
||||
RenderSystem.multMatrix(new Matrix4f(camera1.getRotation()));
|
||||
matrices.multiply(camera1.getRotation());
|
||||
//RenderSystem.multMatrix(new Matrix4f(camera1.getRotation()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -258,6 +264,7 @@ public class ShapesRenderer
|
||||
case NORTH:
|
||||
break;
|
||||
case SOUTH:
|
||||
matrices.
|
||||
RenderSystem.rotatef(180.0f, 0.0f, 1.0f, 0.0f);
|
||||
break;
|
||||
case EAST:
|
||||
@@ -301,6 +308,8 @@ public class ShapesRenderer
|
||||
//RenderSystem.depthFunc(515);
|
||||
//RenderSystem.enableAlphaTest();
|
||||
//RenderSystem.alphaFunc(GL11.GL_GREATER, 0.003f);
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -333,7 +342,7 @@ public class ShapesRenderer
|
||||
|
||||
}
|
||||
@Override
|
||||
public void renderLines(Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
public void renderLines(MatrixStack matrices, Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
{
|
||||
if (shape.a == 0.0) return;
|
||||
Vec3d v1 = shape.relativiseRender(client.world, shape.from, partialTick);
|
||||
@@ -370,7 +379,7 @@ public class ShapesRenderer
|
||||
super(client, (ShapeDispatcher.Line)shape);
|
||||
}
|
||||
@Override
|
||||
public void renderLines(Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
public void renderLines(MatrixStack matrices, Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
{
|
||||
Vec3d v1 = shape.relativiseRender(client.world, shape.from, partialTick);
|
||||
Vec3d v2 = shape.relativiseRender(client.world, shape.to, partialTick);
|
||||
@@ -390,7 +399,7 @@ public class ShapesRenderer
|
||||
super(client, (ShapeDispatcher.Sphere)shape);
|
||||
}
|
||||
@Override
|
||||
public void renderLines(Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
public void renderLines(MatrixStack matrices, Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
{
|
||||
if (shape.a == 0.0) return;
|
||||
Vec3d vc = shape.relativiseRender(client.world, shape.center, partialTick);
|
||||
@@ -420,7 +429,7 @@ public class ShapesRenderer
|
||||
super(client, (ShapeDispatcher.Cylinder)shape);
|
||||
}
|
||||
@Override
|
||||
public void renderLines(Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
public void renderLines(MatrixStack matrices, Tessellator tessellator, BufferBuilder bufferBuilder, double cx, double cy, double cz, float partialTick)
|
||||
{
|
||||
if (shape.a == 0.0) return;
|
||||
Vec3d vc = shape.relativiseRender(client.world, shape.center, partialTick);
|
||||
|
||||
@@ -2,6 +2,8 @@ package carpet.script.utils;
|
||||
|
||||
import carpet.fakes.MinecraftServerInterface;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.network.packet.s2c.play.ChunkDataS2CPacket;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.WorldGenerationProgressListener;
|
||||
@@ -154,6 +156,8 @@ public class WorldTools
|
||||
{
|
||||
@Override public void start(ChunkPos spawnPos) { }
|
||||
@Override public void setChunkStatus(ChunkPos pos, ChunkStatus status) { }
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Override public void start() { }
|
||||
@Override public void stop() { }
|
||||
}
|
||||
|
||||
|
||||
@@ -19,9 +19,11 @@ public class FabricAPIHooks {
|
||||
if (WORLD_RENDER_EVENTS) {
|
||||
WorldRenderEvents.BEFORE_DEBUG_RENDER.register(context -> {
|
||||
if (CarpetClient.shapes != null) {
|
||||
RenderSystem.pushMatrix();
|
||||
CarpetClient.shapes.render(context.camera(), context.tickDelta());
|
||||
RenderSystem.popMatrix();
|
||||
context.matrixStack().push();
|
||||
//RenderSystem.pushMatrix();
|
||||
CarpetClient.shapes.render(context.matrixStack(), context.camera(), context.tickDelta());
|
||||
//RenderSystem.popMatrix();
|
||||
context.matrixStack().pop();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user