From 82de60369ac2b2af017aa1cf10d97b07510fb775 Mon Sep 17 00:00:00 2001 From: olebeck <31539311+olebeck@users.noreply.github.com> Date: Sun, 19 Mar 2023 01:45:27 +0100 Subject: [PATCH] remove has Gravity again --- subcommands/world/entity.go | 3 ++- utils/behaviourpack/entity.go | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/subcommands/world/entity.go b/subcommands/world/entity.go index a980148..a6fb800 100644 --- a/subcommands/world/entity.go +++ b/subcommands/world/entity.go @@ -23,7 +23,6 @@ type entityState struct { } type serverEntityType struct { - world.SaveableEntityType Encoded string NBT map[string]any } @@ -49,6 +48,8 @@ type serverEntity struct { EntityType serverEntityType } +var _ world.SaveableEntityType = &serverEntityType{} + func (e serverEntity) Type() world.EntityType { return e.EntityType } diff --git a/utils/behaviourpack/entity.go b/utils/behaviourpack/entity.go index 55490c4..f7b0fa4 100644 --- a/utils/behaviourpack/entity.go +++ b/utils/behaviourpack/entity.go @@ -73,12 +73,5 @@ func (bp *BehaviourPack) AddEntity(entity EntityIn) { } } - hasCollision := entity.Meta.Flag(protocol.EntityDataKeyFlags, protocol.EntityDataFlagHasCollision) - hasGravity := entity.Meta.Flag(protocol.EntityDataKeyFlags, protocol.EntityDataFlagHasGravity) - entry.MinecraftEntity.Components["minecraft:physics"] = map[string]any{ - "has_collision": hasCollision, - "has_gravity": hasGravity, - } - bp.entities[entity.Identifier] = entry }