Class SpeedSignDemand
java.lang.Object
purplecreate.tramways.content.signs.demands.SignDemand
purplecreate.tramways.content.signs.demands.SpeedSignDemand
- Direct Known Subclasses:
TemporarySpeedSignDemand
-
Nested Class Summary
Nested classes/interfaces inherited from class purplecreate.tramways.content.signs.demands.SignDemand
SignDemand.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(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 pointnet.minecraft.world.item.ItemStackgetIcon()voidinitSettingsGUI(com.simibubi.create.foundation.gui.ModularGuiLineBuilder builder) Set up the settings menu for your demandvoidrender(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 signvoidsetDefaultSettings(net.minecraft.nbt.CompoundTag tag) Set up the default settings for your demandvoidvalidateSettings(net.minecraft.nbt.CompoundTag received, net.minecraft.nbt.CompoundTag disk) Validate settings sent over the networkMethods inherited from class purplecreate.tramways.content.signs.demands.SignDemand
getSignFace, isAuxiliary, isManual, register, renderTextInCenter
-
Constructor Details
-
SpeedSignDemand
public SpeedSignDemand()
-
-
Method Details
-
getIcon
@Environment(CLIENT) public net.minecraft.world.item.ItemStack getIcon()- Specified by:
getIconin classSignDemand- 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:SignDemandSet up the settings menu for your demand- Overrides:
initSettingsGUIin classSignDemand- Parameters:
builder- Add elements using the builder
-
setDefaultSettings
public void setDefaultSettings(net.minecraft.nbt.CompoundTag tag) Description copied from class:SignDemandSet up the default settings for your demand- Overrides:
setDefaultSettingsin classSignDemand- 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:SignDemandValidate settings sent over the network- Overrides:
validateSettingsin classSignDemand- Parameters:
received- For reading settings from networkdisk- For writing validated settings
-
execute
public SignDemand.Result execute(net.minecraft.nbt.CompoundTag tag, com.simibubi.create.content.trains.entity.Train train, double distance) Description copied from class:SignDemandThis function is ran every tick on the run-up to and whilst the train runs over the track point- Overrides:
executein classSignDemand- Parameters:
tag- The settings for your demandtrain- 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:SignDemandUse this to render text or symbols on the sign
Tip: You can use
SignDemand.renderTextInCenterif you just need something simple- Overrides:
renderin classSignDemandtag- The settings for your demand
-