Placed End Crystal

Registry name

etfuturum.placedEndCrystal

Basic info

  • Health: Inherited from EntityEnderCrystal (standard 5 HP)
  • Armor: None
  • Size: Inherited from EntityEnderCrystal
  • Spawn conditions: Player-placed on End portal blocks or on bedrock in the End dimension
  • Drops: Ender crystal item (via EntityEnderCrystal default)
  • Behaviour: End crystal with dragon respawn logic. When 4 such crystals are placed around the End portal and all are valid (not broken, on valid blocks), the End Dragon respawns and these crystals are destroyed.

Respawn trigger

Every timer ticks (20–40 random):

  1. Checks if dimension == 1 (End), block below is bedrock
  2. Counts end portal blocks within 6-block radius of the crystal’s stored position
  3. If exactly 20 end portal blocks found → all 4 crystals valid → all destroyed + EntityRespawnedDragon spawns at position (posX, posY + 30, posZ)

Validity conditions

  • Crystal must be in End dimension (dimensionId == 1)
  • Block below crystal must be Blocks.bedrock
  • Within a 6-block square radius: exactly 20 end portal blocks must exist
  • All 4 crystals within mutual 6-block range must simultaneously be valid

Timer logic

  • timer = 20 + rand(20) (20–40 ticks between checks)
  • Only checked server-side when worldObj.getWorldTime() % timer == 0

Crystal state

  • Stores block position of the obsidian/bedrock it sits on (separate from entity position)
  • innerRotation increments each tick (spinning beam)
  • health synced to data watcher object 8
  • Destroyed when: attacked, explosion, or when respawn triggered

Notes

  • Extends EntityEnderCrystal (vanilla)
  • Used for End_gateway portal generation + dragon respawn in 1.9+ End
  • Does not explode on death (unlike vanilla that has explicit explosion on nearby bedrock)