Class SpeedSignDemand

java.lang.Object
purplecreate.tramways.content.signs.demands.SignDemand
purplecreate.tramways.content.signs.demands.SpeedSignDemand
Direct Known Subclasses:
TemporarySpeedSignDemand

public class SpeedSignDemand extends SignDemand
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(net.minecraft.nbt.CompoundTag tag, com.simibubi.create.content.trains.entity.Train train, double distance)
    This function is ran every tick on the run-up to and whilst the train runs over the track point
    net.minecraft.world.item.ItemStack
     
    void
    initSettingsGUI(com.simibubi.create.foundation.gui.ModularGuiLineBuilder builder)
    Set up the settings menu for your demand
    void
    render(TramSignBlock.SignType signType, net.minecraft.nbt.CompoundTag tag, com.mojang.blaze3d.vertex.PoseStack ms, net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay)
    Use this to render text or symbols on the sign
    void
    setDefaultSettings(net.minecraft.nbt.CompoundTag tag)
    Set up the default settings for your demand
    void
    validateSettings(net.minecraft.nbt.CompoundTag received, net.minecraft.nbt.CompoundTag disk)
    Validate settings sent over the network

    Methods inherited from class purplecreate.tramways.content.signs.demands.SignDemand

    getSignFace, isAuxiliary, isManual, register, renderTextInCenter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpeedSignDemand

      public SpeedSignDemand()
  • Method Details

    • getIcon

      @Environment(CLIENT) public net.minecraft.world.item.ItemStack getIcon()
      Specified by:
      getIcon in class SignDemand
      Returns:
      an icon to be shown in the settings menu
    • initSettingsGUI

      @Environment(CLIENT) public void initSettingsGUI(com.simibubi.create.foundation.gui.ModularGuiLineBuilder builder)
      Description copied from class: SignDemand
      Set up the settings menu for your demand
      Overrides:
      initSettingsGUI in class SignDemand
      Parameters:
      builder - Add elements using the builder
    • setDefaultSettings

      public void setDefaultSettings(net.minecraft.nbt.CompoundTag tag)
      Description copied from class: SignDemand
      Set up the default settings for your demand
      Overrides:
      setDefaultSettings in class SignDemand
      Parameters:
      tag - Write the defaults to tag
    • validateSettings

      public void validateSettings(net.minecraft.nbt.CompoundTag received, net.minecraft.nbt.CompoundTag disk)
      Description copied from class: SignDemand
      Validate settings sent over the network
      Overrides:
      validateSettings in class SignDemand
      Parameters:
      received - For reading settings from network
      disk - For writing validated settings
    • execute

      public void execute(net.minecraft.nbt.CompoundTag tag, com.simibubi.create.content.trains.entity.Train train, double distance)
      Description copied from class: SignDemand
      This function is ran every tick on the run-up to and whilst the train runs over the track point
      Overrides:
      execute in class SignDemand
      Parameters:
      tag - The settings for your demand
      train - The train running past the sign
    • render

      @Environment(CLIENT) public void render(TramSignBlock.SignType signType, net.minecraft.nbt.CompoundTag tag, com.mojang.blaze3d.vertex.PoseStack ms, net.minecraft.client.renderer.MultiBufferSource buffer, int light, int overlay)
      Description copied from class: SignDemand

      Use this to render text or symbols on the sign

      Tip: You can use SignDemand.renderTextInCenter if you just need something simple

      Overrides:
      render in class SignDemand
      tag - The settings for your demand