Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ public void setDisplayEntity(Entity displayEntity) {

public static void tick(Level world, BlockPos blockPos, BlockState state, EntityDisplayBlockEntity blockEntity) {
if (blockEntity.displayEntity == null && blockEntity.entityType != null) {
blockEntity.setDisplayEntity(blockEntity.entityType.create(world, EntitySpawnReason.EVENT));
Entity displayEntity = blockEntity.entityType.create(world, EntitySpawnReason.EVENT);
displayEntity.snapTo(blockPos.getX(),blockPos.getY(),blockPos.getZ());
blockEntity.setDisplayEntity(displayEntity);
}
// if (blockEntity.getDisplayEntity() != null && blockEntity.getDisplayEntity().getType().is(TICK)) {
if (blockEntity.getDisplayEntity() != null && blockEntity.getDisplayEntity().getType().builtInRegistryHolder().is(TICK)) {
Expand Down
Loading