Revert storing chunks in chunk cache

This commit is contained in:
AJ Ferguson 2019-10-21 16:07:07 -08:00
parent 12c049709a
commit 38fd5376e7
4 changed files with 0 additions and 5 deletions

View file

@ -40,7 +40,6 @@ public class JavaPlayerActionAckTranslator extends PacketTranslator<ServerPlayer
public void translate(ServerPlayerActionAckPacket packet, GeyserSession session) { public void translate(ServerPlayerActionAckPacket packet, GeyserSession session) {
switch (packet.getAction()) { switch (packet.getAction()) {
case FINISH_DIGGING: case FINISH_DIGGING:
session.getChunkCache().updateBlock(packet.getPosition(), packet.getNewState());
UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket();
updateBlockPacket.setDataLayer(0); updateBlockPacket.setDataLayer(0);
updateBlockPacket.setBlockPosition(Vector3i.from( updateBlockPacket.setBlockPosition(Vector3i.from(

View file

@ -1,6 +1,5 @@
package org.geysermc.connector.network.translators.java.world; package org.geysermc.connector.network.translators.java.world;
import com.github.steveice10.mc.protocol.data.game.entity.metadata.Position;
import com.github.steveice10.mc.protocol.data.game.world.block.BlockChangeRecord; import com.github.steveice10.mc.protocol.data.game.world.block.BlockChangeRecord;
import com.github.steveice10.mc.protocol.packet.ingame.server.world.ServerBlockChangePacket; import com.github.steveice10.mc.protocol.packet.ingame.server.world.ServerBlockChangePacket;
import com.nukkitx.math.vector.Vector3i; import com.nukkitx.math.vector.Vector3i;
@ -15,7 +14,6 @@ public class JavaBlockChangeTranslator extends PacketTranslator<ServerBlockChang
@Override @Override
public void translate(ServerBlockChangePacket packet, GeyserSession session) { public void translate(ServerBlockChangePacket packet, GeyserSession session) {
BlockChangeRecord record = packet.getRecord(); BlockChangeRecord record = packet.getRecord();
session.getChunkCache().updateBlock(record.getPosition(), record.getBlock());
UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket();
updateBlockPacket.setDataLayer(0); updateBlockPacket.setDataLayer(0);
updateBlockPacket.setBlockPosition(Vector3i.from( updateBlockPacket.setBlockPosition(Vector3i.from(

View file

@ -18,7 +18,6 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
@Override @Override
public void translate(ServerChunkDataPacket packet, GeyserSession session) { public void translate(ServerChunkDataPacket packet, GeyserSession session) {
session.getChunkCache().addToCache(packet.getColumn());
// Not sure if this is safe or not, however without this the client usually times out // Not sure if this is safe or not, however without this the client usually times out
Geyser.getConnector().getGeneralThreadPool().execute(() -> { Geyser.getConnector().getGeneralThreadPool().execute(() -> {
Vector2i chunkPos = session.getLastChunkPosition(); Vector2i chunkPos = session.getLastChunkPosition();

View file

@ -40,7 +40,6 @@ public class JavaMultiBlockChangeTranslator extends PacketTranslator<ServerMulti
@Override @Override
public void translate(ServerMultiBlockChangePacket packet, GeyserSession session) { public void translate(ServerMultiBlockChangePacket packet, GeyserSession session) {
for (BlockChangeRecord record : packet.getRecords()) { for (BlockChangeRecord record : packet.getRecords()) {
session.getChunkCache().updateBlock(record.getPosition(), record.getBlock());
UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket(); UpdateBlockPacket updateBlockPacket = new UpdateBlockPacket();
updateBlockPacket.setDataLayer(0); updateBlockPacket.setDataLayer(0);
updateBlockPacket.setBlockPosition(Vector3i.from( updateBlockPacket.setBlockPosition(Vector3i.from(