mirror of
https://github.com/ViaVersion/ViaAprilFools.git
synced 2025-01-08 19:17:40 +01:00
Updated Via API usage again
This commit is contained in:
parent
0b6ebf7c77
commit
462e68a0af
@ -24,10 +24,10 @@ import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.Chunk;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_14;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14to1_13_2.ClientboundPackets1_14;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14to1_13_2.ServerboundPackets1_14;
|
||||
import com.viaversion.viaversion.protocols.protocol1_14to1_13_2.types.Chunk1_14Type;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_14to3D_Shareware.packets.BlockItemPackets3D_Shareware;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_14to3D_Shareware.packets.EntityPackets3D_Shareware;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_14to3D_Shareware.storage.ChunkCenterTracker3D_Shareware;
|
||||
@ -59,7 +59,7 @@ public class Protocol1_14to3D_Shareware extends BackwardsProtocol<ClientboundPac
|
||||
this.registerClientbound(ClientboundPackets3D_Shareware.CHUNK_DATA, wrapper -> {
|
||||
final ChunkCenterTracker3D_Shareware entityTracker = wrapper.user().get(ChunkCenterTracker3D_Shareware.class);
|
||||
|
||||
final Chunk chunk = wrapper.passthrough(new Chunk1_14Type());
|
||||
final Chunk chunk = wrapper.passthrough(new ChunkType1_14());
|
||||
final int diffX = Math.abs(entityTracker.getChunkCenterX() - chunk.getX());
|
||||
final int diffZ = Math.abs(entityTracker.getChunkCenterZ() - chunk.getZ());
|
||||
|
||||
|
@ -24,12 +24,12 @@ import com.viaversion.viaversion.api.minecraft.chunks.DataPalette;
|
||||
import com.viaversion.viaversion.api.minecraft.chunks.PaletteType;
|
||||
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_15;
|
||||
import com.viaversion.viaversion.api.type.types.chunk.ChunkType1_16;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.LongArrayTag;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.Tag;
|
||||
import com.viaversion.viaversion.protocols.protocol1_15to1_14_4.types.Chunk1_15Type;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.ServerboundPackets1_16;
|
||||
import com.viaversion.viaversion.protocols.protocol1_16to1_15_2.types.Chunk1_16Type;
|
||||
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
||||
import com.viaversion.viaversion.util.CompactArrayUtil;
|
||||
import net.raphimc.viaaprilfools.protocols.protocol1_16to20w14infinite.ClientboundPackets20w14infinite;
|
||||
@ -73,8 +73,8 @@ public class BlockItemPackets20w14infinite extends ItemRewriter<ClientboundPacke
|
||||
@Override
|
||||
public void register() {
|
||||
handler(wrapper -> {
|
||||
Chunk chunk = wrapper.read(new Chunk1_15Type());
|
||||
wrapper.write(new Chunk1_16Type(), chunk);
|
||||
Chunk chunk = wrapper.read(new ChunkType1_15());
|
||||
wrapper.write(new ChunkType1_16(), chunk);
|
||||
|
||||
chunk.setIgnoreOldLightData(chunk.isFullChunk());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user