might work

This commit is contained in:
LegacyGamerHD 2019-11-10 11:10:26 +01:00
parent 16f9886873
commit 2410a202a3
3 changed files with 7 additions and 3 deletions

View file

@ -99,6 +99,9 @@ public class Entity {
metadata.putFlags(flags);
}
public Entity(long entityId, long geyserId, Vector3f position) {
}
public void spawnEntity(GeyserSession session) {
AddEntityPacket addEntityPacket = new AddEntityPacket();
addEntityPacket.setIdentifier("minecraft:" + entityType.name().toLowerCase());

View file

@ -9,8 +9,8 @@ import org.geysermc.connector.console.GeyserLogger;
public class ItemEntity extends Entity {
public ItemEntity(int amount, long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation) {
super(entityId, geyserId, EntityType.ITEM, position, motion, rotation);
public ItemEntity(long entityId, long geyserId, Vector3f position) {
super(entityId, geyserId, position);
}
@Override

View file

@ -38,6 +38,7 @@ import com.nukkitx.protocol.bedrock.packet.PlayerActionPacket;
import org.geysermc.connector.entity.Entity;
import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator;
import org.geysermc.connector.entity.ItemEntity;
public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket> {