Fix bossbar causing players to be unable to break blocks or interact in small areas (Closes #537)

This commit is contained in:
RednedEpic 2020-05-17 01:06:07 -05:00
parent 57717795a3
commit b0d0c168d2
2 changed files with 5 additions and 4 deletions

View file

@ -104,10 +104,13 @@ public class BossBar {
addEntityPacket.setRuntimeEntityId(entityId);
addEntityPacket.setIdentifier("minecraft:creeper");
addEntityPacket.setEntityType(33);
addEntityPacket.setPosition(session.getPlayerEntity().getPosition());
addEntityPacket.setPosition(session.getPlayerEntity().getPosition().sub(0D, -10D, 0D));
addEntityPacket.setRotation(Vector3f.ZERO);
addEntityPacket.setMotion(Vector3f.ZERO);
addEntityPacket.getMetadata().put(EntityData.SCALE, 0.01F); // scale = 0 doesn't work?
addEntityPacket.getMetadata()
.putFloat(EntityData.SCALE, 0F)
.putFloat(EntityData.BOUNDING_BOX_WIDTH, 0F)
.putFloat(EntityData.BOUNDING_BOX_HEIGHT, 0F);
session.sendUpstreamPacket(addEntityPacket);
}

View file

@ -32,8 +32,6 @@ import org.geysermc.connector.network.translators.Translator;
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerBossBarPacket;
import java.awt.*;
@Translator(packet = ServerBossBarPacket.class)
public class JavaBossBarTranslator extends PacketTranslator<ServerBossBarPacket> {
@Override