Skip to content

Commit

Permalink
Revert "Workaround packetevents User#getTotalWorldHeight being wrong"
Browse files Browse the repository at this point in the history
This reverts commit 1238555.
  • Loading branch information
SamB440 committed Aug 22, 2024
1 parent 24a51d9 commit a38e4bd
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.github.retrooper.packetevents.protocol.world.chunk.BaseChunk;
import com.github.retrooper.packetevents.protocol.world.chunk.impl.v_1_18.Chunk_v1_18;
import com.github.retrooper.packetevents.protocol.world.chunk.reader.impl.ChunkReader_v1_18;
import com.github.retrooper.packetevents.protocol.world.dimension.DimensionTypes;
import com.github.retrooper.packetevents.wrapper.PacketWrapper;

import java.io.ByteArrayInputStream;
Expand All @@ -23,9 +24,9 @@ public void handleMapChunk(GrimPlayer player, PacketSendEvent event) {
// Skip past heightmaps
wrapper.readNBT();

BaseChunk[] chunks = new ChunkReader_v1_18().read(player.dimensionType, null,
BaseChunk[] chunks = new ChunkReader_v1_18().read(DimensionTypes.OVERWORLD,null,
null, true, false, false,
player.dimensionType.getHeight() >> 4, null,
event.getUser().getTotalWorldHeight() >> 4, null,
new NetStreamInput(new ByteArrayInputStream(wrapper.readByteArray())));

// Remove biomes to save memory
Expand Down

0 comments on commit a38e4bd

Please sign in to comment.