mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-27 23:29:58 -04:00
1.14.4-pre4
This commit is contained in:
parent
592d1d229f
commit
ea100f613b
10 changed files with 17 additions and 16 deletions
build.gradle
fabric-events-interaction-v0/src/main/java/net/fabricmc/fabric/mixin/eventsinteraction
fabric-networking-v0/src/main/java/net/fabricmc/fabric/impl/network
fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry
fabric-renderer-api-v1/src/main/java/net/fabricmc/fabric/api/renderer/v1/mesh
fabric-renderer-indigo/src/main/java/net/fabricmc/indigo/renderer
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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!");
|
||||
|
|
|
@ -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())
|
||||
);
|
||||
});
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue