Jump to content

techdev

Members
  • Posts

    1
  • Joined

  • Last visited

techdev's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. ok so im trying to make a telescopic sight block, ive heard i need a entity to be used as the camera/renderer, i can get the entity spawning and UUID saving functional, but i cant seem to find a way to get the entity back with its UUID ive searched a lot but all the methods i found seems to use the World class, which doesnt seem to be in 1.20 saving (zombie is a placeholder) if (!level.isClientSide()){ BlockEntity BE = level.getBlockEntity(pos); if(BE instanceof ScopeEntity blockEntity){ Entity entity = new Zombie(EntityType.ZOMBIE, level); entity.moveTo(pos.getX() + 0.5f, pos.getY() + 1, pos.getZ() + 0.5f); level.addFreshEntity(entity); blockEntity.saveID(entity.getUUID()); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.