Class Satellite

java.lang.Object
com.hbm_m.satellite.Satellite
Direct Known Subclasses:
SatelliteHorizons

public abstract class Satellite extends Object
Port of legacy com.hbm.saveddata.satellites.Satellite: a satellite "type" that gets tracked in orbit by SatelliteManager once its payload item reaches altitude via the Soyuz Launcher. Only SatelliteHorizons (Gerald) is registered for now - the other legacy satellite types (Mapper/Scanner/Radar/Laser/Resonator/Relay/Miner/LunarMiner) can be added later via registerSatellite(Class, Item).
  • Field Details

    • SATELLITES

      public static final List<Class<? extends Satellite>> SATELLITES
    • ITEM_TO_CLASS

      public static final Map<net.minecraft.world.item.Item,Class<? extends Satellite>> ITEM_TO_CLASS
  • Constructor Details

    • Satellite

      public Satellite()
  • Method Details

    • register

      public static void register()
    • registerSatellite

      public static void registerSatellite(Class<? extends Satellite> sat, net.minecraft.world.item.Item item)
    • create

      public static Satellite create(int id)
    • getIDFromItem

      public static int getIDFromItem(net.minecraft.world.item.Item item)
    • getID

      public int getID()
    • writeToNBT

      public void writeToNBT(net.minecraft.nbt.CompoundTag nbt)
    • readFromNBT

      public void readFromNBT(net.minecraft.nbt.CompoundTag nbt)
    • onOrbit

      public void onOrbit(net.minecraft.server.level.ServerLevel level, double x, double y, double z)
      Called once when the satellite reaches orbit (rocket deploys its payload).
    • onCoordAction

      public void onCoordAction(net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.player.Player player, int x, int y, int z)
      Called by a matching-frequency ItemSatDesignator raytrace target.