forked from GeyserMC/Geyser
Comment out unneeded collision code
This may be handy in the future, but right now it serves no purpose.
This commit is contained in:
parent
eabbacaaad
commit
20dda985bc
2 changed files with 3 additions and 4 deletions
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
package org.geysermc.connector.network.translators.bedrock;
|
package org.geysermc.connector.network.translators.bedrock;
|
||||||
|
|
||||||
import com.github.steveice10.mc.protocol.data.game.entity.metadata.Position;
|
|
||||||
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
import com.github.steveice10.mc.protocol.packet.ingame.client.player.ClientPlayerPositionRotationPacket;
|
||||||
import com.nukkitx.math.vector.Vector3f;
|
import com.nukkitx.math.vector.Vector3f;
|
||||||
import com.nukkitx.protocol.bedrock.packet.MoveEntityAbsolutePacket;
|
import com.nukkitx.protocol.bedrock.packet.MoveEntityAbsolutePacket;
|
||||||
|
@ -37,7 +36,6 @@ import org.geysermc.connector.entity.PlayerEntity;
|
||||||
import org.geysermc.connector.entity.type.EntityType;
|
import org.geysermc.connector.entity.type.EntityType;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
import org.geysermc.connector.network.translators.PacketTranslator;
|
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||||
import org.geysermc.connector.network.translators.block.BlockEntry;
|
|
||||||
|
|
||||||
public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPacket> {
|
public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPacket> {
|
||||||
|
|
||||||
|
@ -75,6 +73,7 @@ public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPack
|
||||||
|
|
||||||
entity.moveAbsolute(packet.getPosition().sub(0, EntityType.PLAYER.getOffset(), 0), rotation);
|
entity.moveAbsolute(packet.getPosition().sub(0, EntityType.PLAYER.getOffset(), 0), rotation);
|
||||||
|
|
||||||
|
/*
|
||||||
boolean colliding = false;
|
boolean colliding = false;
|
||||||
Position position = new Position((int) packet.getPosition().getX(),
|
Position position = new Position((int) packet.getPosition().getX(),
|
||||||
(int) Math.ceil(javaY * 2) / 2, (int) packet.getPosition().getZ());
|
(int) Math.ceil(javaY * 2) / 2, (int) packet.getPosition().getZ());
|
||||||
|
@ -84,7 +83,8 @@ public class BedrockMovePlayerTranslator extends PacketTranslator<MovePlayerPack
|
||||||
colliding = true;
|
colliding = true;
|
||||||
|
|
||||||
if (!colliding)
|
if (!colliding)
|
||||||
session.getDownstream().getSession().send(playerPositionRotationPacket);
|
*/
|
||||||
|
session.getDownstream().getSession().send(playerPositionRotationPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValidMove(GeyserSession session, MovePlayerPacket.Mode mode, Vector3f currentPosition, Vector3f newPosition) {
|
public boolean isValidMove(GeyserSession session, MovePlayerPacket.Mode mode, Vector3f currentPosition, Vector3f newPosition) {
|
||||||
|
|
|
@ -63,7 +63,6 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
|
||||||
levelChunkPacket.setChunkZ(packet.getColumn().getZ());
|
levelChunkPacket.setChunkZ(packet.getColumn().getZ());
|
||||||
levelChunkPacket.setData(payload);
|
levelChunkPacket.setData(payload);
|
||||||
session.getUpstream().sendPacket(levelChunkPacket);
|
session.getUpstream().sendPacket(levelChunkPacket);
|
||||||
session.getChunkCache().addToCache(packet.getColumn());
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue