mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
might work
This commit is contained in:
parent
16f9886873
commit
2410a202a3
3 changed files with 7 additions and 3 deletions
|
|
@ -99,6 +99,9 @@ public class Entity {
|
||||||
metadata.putFlags(flags);
|
metadata.putFlags(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Entity(long entityId, long geyserId, Vector3f position) {
|
||||||
|
}
|
||||||
|
|
||||||
public void spawnEntity(GeyserSession session) {
|
public void spawnEntity(GeyserSession session) {
|
||||||
AddEntityPacket addEntityPacket = new AddEntityPacket();
|
AddEntityPacket addEntityPacket = new AddEntityPacket();
|
||||||
addEntityPacket.setIdentifier("minecraft:" + entityType.name().toLowerCase());
|
addEntityPacket.setIdentifier("minecraft:" + entityType.name().toLowerCase());
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import org.geysermc.connector.console.GeyserLogger;
|
||||||
|
|
||||||
public class ItemEntity extends Entity {
|
public class ItemEntity extends Entity {
|
||||||
|
|
||||||
public ItemEntity(int amount, long entityId, long geyserId, EntityType entityType, Vector3f position, Vector3f motion, Vector3f rotation) {
|
public ItemEntity(long entityId, long geyserId, Vector3f position) {
|
||||||
super(entityId, geyserId, EntityType.ITEM, position, motion, rotation);
|
super(entityId, geyserId, position);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ import com.nukkitx.protocol.bedrock.packet.PlayerActionPacket;
|
||||||
import org.geysermc.connector.entity.Entity;
|
import org.geysermc.connector.entity.Entity;
|
||||||
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.entity.ItemEntity;
|
||||||
|
|
||||||
public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket> {
|
public class BedrockActionTranslator extends PacketTranslator<PlayerActionPacket> {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue