mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Registry Ops 7
This commit is contained in:
parent
2c503525a6
commit
5358b30c16
1 changed files with 2 additions and 1 deletions
|
@ -12,12 +12,13 @@ import net.minecraft.client.Minecraft;
|
|||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf;
|
||||
import net.minecraft.network.codec.ByteBufCodecs;
|
||||
import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
public record MountedStorageSyncPacket(int contraptionId, Map<BlockPos, MountedItemStorage> items, Map<BlockPos, MountedFluidStorage> fluids) implements ClientboundPacketPayload {
|
||||
public static StreamCodec<FriendlyByteBuf, MountedStorageSyncPacket> STREAM_CODEC = StreamCodec.composite(
|
||||
public static StreamCodec<RegistryFriendlyByteBuf, MountedStorageSyncPacket> STREAM_CODEC = StreamCodec.composite(
|
||||
ByteBufCodecs.INT, MountedStorageSyncPacket::contraptionId,
|
||||
ByteBufCodecs.map(HashMap::new, BlockPos.STREAM_CODEC, MountedItemStorage.STREAM_CODEC), MountedStorageSyncPacket::items,
|
||||
ByteBufCodecs.map(HashMap::new, BlockPos.STREAM_CODEC, MountedFluidStorage.STREAM_CODEC), MountedStorageSyncPacket::fluids,
|
||||
|
|
Loading…
Add table
Reference in a new issue