Fixed small armour stands not respecting invisibility (#533)

This commit is contained in:
rtm516 2020-05-11 20:56:50 +01:00 committed by GitHub
parent f9ee569cd5
commit 324bc67c97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View file

@ -209,8 +209,6 @@ public class Entity {
metadata.getFlags().setFlag(EntityFlag.SWIMMING, (xd & 0x10) == 0x10); metadata.getFlags().setFlag(EntityFlag.SWIMMING, (xd & 0x10) == 0x10);
metadata.getFlags().setFlag(EntityFlag.GLIDING, (xd & 0x80) == 0x80); metadata.getFlags().setFlag(EntityFlag.GLIDING, (xd & 0x80) == 0x80);
metadata.put(EntityData.SCALE, scale);
if ((xd & 0x20) == 0x20) { if ((xd & 0x20) == 0x20) {
if (this.is(ArmorStandEntity.class)) { if (this.is(ArmorStandEntity.class)) {
metadata.put(EntityData.SCALE, 0.0f); metadata.put(EntityData.SCALE, 0.0f);

View file

@ -29,7 +29,6 @@ import com.github.steveice10.mc.protocol.data.game.entity.metadata.EntityMetadat
import com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType; import com.github.steveice10.mc.protocol.data.game.entity.metadata.MetadataType;
import com.nukkitx.math.vector.Vector3f; import com.nukkitx.math.vector.Vector3f;
import com.nukkitx.protocol.bedrock.data.EntityData; import com.nukkitx.protocol.bedrock.data.EntityData;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.entity.LivingEntity; import org.geysermc.connector.entity.LivingEntity;
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;
@ -47,9 +46,7 @@ public class ArmorStandEntity extends LivingEntity {
// isSmall // isSmall
if ((xd & 0x01) == 0x01) { if ((xd & 0x01) == 0x01) {
GeyserConnector.getInstance().getLogger().debug("S: " + metadata.get(EntityData.SCALE)); if (metadata.getFloat(EntityData.SCALE) != 0.55f && metadata.getFloat(EntityData.SCALE) != 0.0f) {
if (metadata.get(EntityData.SCALE) == null || (metadata.get(EntityData.SCALE) != null && !metadata.get(EntityData.SCALE).equals(0.55f))) {
metadata.put(EntityData.SCALE, 0.55f); metadata.put(EntityData.SCALE, 0.55f);
} }