diff --git a/build.gradle b/build.gradle index ec2ddd4e9..c327f0ee2 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ plugins { def ENV = System.getenv() def baseVersion = "0.3.0" -def mcVersion = "1.14.4-pre1" +def mcVersion = "1.14.4-pre4" def yarnVersion = "+build.1" def getSubprojectVersion(project, version) { diff --git a/fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/mixin/eventsinteraction/MixinServerPlayerInteractionManager.java b/fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/mixin/eventsinteraction/MixinServerPlayerInteractionManager.java index 67615ebcd..bd82961c9 100644 --- a/fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/mixin/eventsinteraction/MixinServerPlayerInteractionManager.java +++ b/fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/mixin/eventsinteraction/MixinServerPlayerInteractionManager.java @@ -24,6 +24,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerInteractionManager; +import net.minecraft.server.network.packet.PlayerActionC2SPacket; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; @@ -46,7 +47,7 @@ public class MixinServerPlayerInteractionManager { public ServerPlayerEntity player; @Inject(at = @At("HEAD"), method = "method_14263", cancellable = true) - public void startBlockBreak(BlockPos pos, Direction direction, CallbackInfo info) { + public void startBlockBreak(BlockPos pos, PlayerActionC2SPacket.Action playerAction, Direction direction, int i, CallbackInfo info) { ActionResult result = AttackBlockCallback.EVENT.invoker().interact(player, world, Hand.MAIN_HAND, pos, direction); if (result != ActionResult.PASS) { // The client might have broken the block on its side, so make sure to let it know. diff --git a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java index 7c15d389b..ce9685de7 100644 --- a/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java +++ b/fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network/ClientSidePacketRegistryImpl.java @@ -53,7 +53,7 @@ public class ClientSidePacketRegistryImpl extends PacketRegistryImpl implements // stay closer to the vanilla codepath handler.sendPacket(packet); } else { - handler.getClientConnection().send(packet, completionListener); + handler.getConnection().send(packet, completionListener); } } else { LOGGER.warn("Sending packet " + packet + " to server failed, not connected!"); diff --git a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/FabricRegistryClientInit.java b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/FabricRegistryClientInit.java index 2f76b2cc9..c76d6c220 100644 --- a/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/FabricRegistryClientInit.java +++ b/fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/FabricRegistryClientInit.java @@ -34,7 +34,7 @@ public class FabricRegistryClientInit implements ClientModInitializer { RegistrySyncManager.receivePacket(ctx, buf, RegistrySyncManager.DEBUG || !MinecraftClient.getInstance().isInSingleplayer(), (e) -> { LOGGER.error("Registry remapping failed!", e); MinecraftClient.getInstance().execute(() -> { - ((ClientPlayerEntity) ctx.getPlayer()).networkHandler.getClientConnection().disconnect( + ((ClientPlayerEntity) ctx.getPlayer()).networkHandler.getConnection().disconnect( new LiteralText("Registry remapping failed: " + e.getMessage()) ); }); diff --git a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java index 4447fe18e..e17229ca5 100644 --- a/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java +++ b/fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh/MutableQuadView.java @@ -165,7 +165,7 @@ public interface MutableQuadView extends QuadView { * Same as {@link #pos(float, float, float)} but accepts vector type. */ default MutableQuadView pos(int vertexIndex, Vector3f vec) { - return pos(vertexIndex, vec.x(), vec.y(), vec.z()); + return pos(vertexIndex, vec.getX(), vec.getY(), vec.getZ()); } /** @@ -183,7 +183,7 @@ public interface MutableQuadView extends QuadView { * Same as {@link #normal(float, float, float, extra)} but accepts vector type. */ default MutableQuadView normal(int vertexIndex, Vector3f vec) { - return normal(vertexIndex, vec.x(), vec.y(), vec.z()); + return normal(vertexIndex, vec.getX(), vec.getY(), vec.getZ()); } /** diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/aocalc/AoCalculator.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/aocalc/AoCalculator.java index cd5dba3d9..ca80ea78b 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/aocalc/AoCalculator.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/aocalc/AoCalculator.java @@ -277,7 +277,7 @@ public class AoCalculator { float ao = 0, sky = 0, block = 0, maxAo = 0; int maxSky = 0, maxBlock = 0; - final float x = normal.x(); + final float x = normal.getX(); if(!MathHelper.equalsApproximate(0f, x)) { final Direction face = x > 0 ? Direction.EAST : Direction.WEST; final AoFaceData fd = gatherInsetFace(quad, i, face); @@ -291,7 +291,7 @@ public class AoCalculator { maxBlock = fd.maxBlockLight(maxBlock); } - final float y = normal.y(); + final float y = normal.getY(); if(!MathHelper.equalsApproximate(0f, y)) { final Direction face = y > 0 ? Direction.UP: Direction.DOWN; final AoFaceData fd = gatherInsetFace(quad, i, face); @@ -305,7 +305,7 @@ public class AoCalculator { maxBlock = fd.maxBlockLight(maxBlock); } - final float z = normal.z(); + final float z = normal.getZ(); if(!MathHelper.equalsApproximate(0f, z)) { final Direction face = z > 0 ? Direction.SOUTH: Direction.NORTH; final AoFaceData fd = gatherInsetFace(quad, i, face); diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java index 5024a1b1d..ccab53309 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/ColorHelper.java @@ -97,7 +97,7 @@ public abstract class ColorHelper { } public static float normalShade(Vector3f normal) { - return normalShade(normal.x(), normal.y(), normal.z()); + return normalShade(normal.getX(), normal.getY(), normal.getZ()); } /** diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/GeometryHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/GeometryHelper.java index b10536d0e..e51543e70 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/GeometryHelper.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/GeometryHelper.java @@ -186,13 +186,13 @@ public abstract class GeometryHelper { final Vector3f normal = quad.faceNormal(); switch(GeometryHelper.longestAxis(normal)) { case X: - return normal.x() > 0 ? Direction.EAST : Direction.WEST; + return normal.getX() > 0 ? Direction.EAST : Direction.WEST; case Y: - return normal.y() > 0 ? Direction.UP : Direction.DOWN; + return normal.getY() > 0 ? Direction.UP : Direction.DOWN; case Z: - return normal.z() > 0 ? Direction.SOUTH : Direction.NORTH; + return normal.getZ() > 0 ? Direction.SOUTH : Direction.NORTH; default: // handle WTF case @@ -222,7 +222,7 @@ public abstract class GeometryHelper { * See {@link #longestAxis(float, float, float)} */ public static Axis longestAxis(Vector3f vec) { - return longestAxis(vec.x(), vec.y(), vec.z()); + return longestAxis(vec.getX(), vec.getY(), vec.getZ()); } /** diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/NormalHelper.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/NormalHelper.java index 81148de1a..b347a775b 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/NormalHelper.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/helper/NormalHelper.java @@ -51,7 +51,7 @@ public abstract class NormalHelper { * Version of {@link #packNormal(float, float, float, float)} that accepts a vector type. */ public static int packNormal(Vector3f normal, float w) { - return packNormal(normal.x(), normal.y(), normal.z(), w); + return packNormal(normal.getX(), normal.getY(), normal.getZ(), w); } /** diff --git a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/QuadViewImpl.java b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/QuadViewImpl.java index 0b3eef2ee..ccf9990c1 100644 --- a/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/QuadViewImpl.java +++ b/fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer/mesh/QuadViewImpl.java @@ -248,7 +248,7 @@ public class QuadViewImpl implements QuadView { System.arraycopy(data, baseIndex + 1, quad.data, quad.baseIndex + 1, len - 1); quad.isFaceNormalInvalid = this.isFaceNormalInvalid; if(!this.isFaceNormalInvalid) { - quad.faceNormal.set(this.faceNormal.x(), this.faceNormal.y(), this.faceNormal.z()); + quad.faceNormal.set(this.faceNormal.getX(), this.faceNormal.getY(), this.faceNormal.getZ()); } quad.lightFace = this.lightFace; quad.colorIndex = this.colorIndex;