Package com.hbm_m.satellite
Class Satellite
java.lang.Object
com.hbm_m.satellite.Satellite
- Direct Known Subclasses:
SatelliteHorizons
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 Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Satellitecreate(int id) intgetID()static intgetIDFromItem(net.minecraft.world.item.Item item) voidonCoordAction(net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.player.Player player, int x, int y, int z) Called by a matching-frequencyItemSatDesignatorraytrace target.voidonOrbit(net.minecraft.server.level.ServerLevel level, double x, double y, double z) Called once when the satellite reaches orbit (rocket deploys its payload).voidreadFromNBT(net.minecraft.nbt.CompoundTag nbt) static voidregister()static voidregisterSatellite(Class<? extends Satellite> sat, net.minecraft.world.item.Item item) voidwriteToNBT(net.minecraft.nbt.CompoundTag nbt)
-
Field Details
-
SATELLITES
-
ITEM_TO_CLASS
-
-
Constructor Details
-
Satellite
public Satellite()
-
-
Method Details
-
register
public static void register() -
registerSatellite
-
create
-
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-frequencyItemSatDesignatorraytrace target.
-