Class CustomRespawnTest.CustomRespawnBlock

    • Method Detail

      • getRespawnPosition

        public java.util.Optional<Vector3d> getRespawnPosition​(BlockState state,
                                                               EntityType<?> type,
                                                               IWorldReader world,
                                                               BlockPos pos,
                                                               float orientation,
                                                               @Nullable
                                                               LivingEntity entity)
        Description copied from interface: IForgeBlock
        Returns the position that the entity is moved to upon respawning at this block.
        Parameters:
        state - The current state
        world - The current world
        pos - Block position in world
        orientation - The angle the entity had when setting the respawn point
        entity - The entity respawning, often null
        Returns:
        The spawn position or the empty optional if respawning here is not possible