21w11a mappings

This commit is contained in:
gnembon committed 2021-03-31 19:20:44 -03:00
1 parent 502c4e270e
commit b49b99aea6
6 files changed
+13 -13

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx1G
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
# or better: https://modmuss50.me/fabric.html # or better: https://modmuss50.me/fabric.html
minecraft_version=21w11a minecraft_version=21w11a
yarn_mappings=21w11a+build.20 yarn_mappings=21w11a+build.46
loader_version=0.11.3 loader_version=0.11.3
fabric_version=0.32.5+1.17 fabric_version=0.32.5+1.17
@@ -24,7 +24,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
{ {
private static final int SHULKERBOX_MAX_STACK_AMOUNT = 64; private static final int SHULKERBOX_MAX_STACK_AMOUNT = 64;
@Shadow private int age; @Shadow private int itemAge;
@Shadow private int pickupDelay; @Shadow private int pickupDelay;
public ItemEntityMixin(EntityType<?> entityType_1, World world_1) { public ItemEntityMixin(EntityType<?> entityType_1, World world_1) {
@@ -34,7 +34,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
@Override @Override
public void onStruckByLightning(ServerWorld world, LightningEntity lightning) { public void onStruckByLightning(ServerWorld world, LightningEntity lightning) {
if (CarpetSettings.lightningKillsDropsFix) { if (CarpetSettings.lightningKillsDropsFix) {
if (this.age > 8) { //Only kill item if its older then 8 ticks if (this.itemAge > 8) { //Only kill item if its older then 8 ticks
super.onStruckByLightning(world, lightning); super.onStruckByLightning(world, lightning);
} }
} else { } else {
@@ -44,7 +44,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
@Override @Override
public int getAgeCM() { public int getAgeCM() {
return this.age; return this.itemAge;
} }
@Override @Override
@@ -105,7 +105,7 @@ public abstract class ItemEntityMixin extends Entity implements ItemEntityInterf
self.setStack(selfStack); self.setStack(selfStack);
this.pickupDelay = Math.max(((ItemEntityInterface)other).getPickupDelayCM(), this.pickupDelay); this.pickupDelay = Math.max(((ItemEntityInterface)other).getPickupDelayCM(), this.pickupDelay);
this.age = Math.min(((ItemEntityInterface)other).getAgeCM(), this.age); this.itemAge = Math.min(((ItemEntityInterface)other).getAgeCM(), this.itemAge);
otherStack.decrement(amount); otherStack.decrement(amount);
if (otherStack.isEmpty()) if (otherStack.isEmpty())
@@ -36,7 +36,7 @@ public abstract class PlayerEntity_creativeNoClipMixin extends LivingEntity
return playerEntity.isSpectator() || (CarpetSettings.creativeNoClip && playerEntity.isCreative() && playerEntity.getAbilities().flying); return playerEntity.isSpectator() || (CarpetSettings.creativeNoClip && playerEntity.isCreative() && playerEntity.getAbilities().flying);
} }
@Redirect(method = "updateSize", at = @At( @Redirect(method = "updatePose", at = @At(
value = "INVOKE", value = "INVOKE",
target = "Lnet/minecraft/entity/player/PlayerEntity;isSpectator()Z") target = "Lnet/minecraft/entity/player/PlayerEntity;isSpectator()Z")
) )
@@ -129,7 +129,7 @@ public class ClientNetworkHandler
private static void onSyncData(PacketByteBuf data, ClientPlayerEntity player) private static void onSyncData(PacketByteBuf data, ClientPlayerEntity player)
{ {
NbtCompound compound = data.readCompoundTag(); NbtCompound compound = data.readCompound();
if (compound == null) return; if (compound == null) return;
for (String key: compound.getKeys()) for (String key: compound.getKeys())
{ {
@@ -149,7 +149,7 @@ public class ClientNetworkHandler
outer.put("clientCommand", tag); outer.put("clientCommand", tag);
CarpetClient.getPlayer().networkHandler.sendPacket(new CustomPayloadC2SPacket( CarpetClient.getPlayer().networkHandler.sendPacket(new CustomPayloadC2SPacket(
CarpetClient.CARPET_CHANNEL, CarpetClient.CARPET_CHANNEL,
(new PacketByteBuf(Unpooled.buffer())).writeVarInt(CarpetClient.DATA).writeCompoundTag(outer) (new PacketByteBuf(Unpooled.buffer())).writeVarInt(CarpetClient.DATA).writeCompound(outer)
)); ));
} }
} }
@@ -138,7 +138,7 @@ public class ServerNetworkHandler
private static void onClientData(ServerPlayerEntity player, PacketByteBuf data) private static void onClientData(ServerPlayerEntity player, PacketByteBuf data)
{ {
NbtCompound compound = data.readCompoundTag(); NbtCompound compound = data.readCompound();
if (compound == null) return; if (compound == null) return;
for (String key: compound.getKeys()) for (String key: compound.getKeys())
{ {
@@ -323,7 +323,7 @@ public class ServerNetworkHandler
{ {
PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer()); PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
packetBuf.writeVarInt(CarpetClient.DATA); packetBuf.writeVarInt(CarpetClient.DATA);
packetBuf.writeCompoundTag(tag); packetBuf.writeCompound(tag);
return packetBuf; return packetBuf;
} }
@@ -52,7 +52,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
instance.interactionManager.changeGameMode(gamemode); instance.interactionManager.changeGameMode(gamemode);
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(instance, (byte) (instance.headYaw * 256 / 360)), dimensionId);//instance.dimension); server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(instance, (byte) (instance.headYaw * 256 / 360)), dimensionId);//instance.dimension);
server.getPlayerManager().sendToDimension(new EntityPositionS2CPacket(instance), dimensionId);//instance.dimension); server.getPlayerManager().sendToDimension(new EntityPositionS2CPacket(instance), dimensionId);//instance.dimension);
instance.getServerWorld().getChunkManager().updateCameraPosition(instance); instance.getServerWorld().getChunkManager().updatePosition(instance);
instance.dataTracker.set(PLAYER_MODEL_PARTS, (byte) 0x7f); // show all model layers (incl. capes) instance.dataTracker.set(PLAYER_MODEL_PARTS, (byte) 0x7f); // show all model layers (incl. capes)
return instance; return instance;
} }
@@ -76,7 +76,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(playerShadow, (byte) (player.headYaw * 256 / 360)), playerShadow.world.getRegistryKey()); server.getPlayerManager().sendToDimension(new EntitySetHeadYawS2CPacket(playerShadow, (byte) (player.headYaw * 256 / 360)), playerShadow.world.getRegistryKey());
server.getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.Action.ADD_PLAYER, playerShadow)); server.getPlayerManager().sendToAll(new PlayerListS2CPacket(PlayerListS2CPacket.Action.ADD_PLAYER, playerShadow));
player.getServerWorld().getChunkManager().updateCameraPosition(playerShadow); player.getServerWorld().getChunkManager().updatePosition(playerShadow);
return playerShadow; return playerShadow;
} }
@@ -111,7 +111,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
if (this.getServer().getTicks() % 10 == 0) if (this.getServer().getTicks() % 10 == 0)
{ {
this.networkHandler.syncWithPlayerPosition(); this.networkHandler.syncWithPlayerPosition();
this.getServerWorld().getChunkManager().updateCameraPosition(this); this.getServerWorld().getChunkManager().updatePosition(this);
onTeleportationDone(); //<- causes hard crash but would need to be done to enable portals // not as of 1.17 onTeleportationDone(); //<- causes hard crash but would need to be done to enable portals // not as of 1.17
} }
super.tick(); super.tick();