Class SpeedSignDemand
java.lang.Object
purplecreate.tramways.content.signs.demands.SignDemand
purplecreate.tramways.content.signs.demands.SpeedSignDemand
- Direct Known Subclasses:
TemporarySpeedSignDemand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 pointnet.minecraft.world.item.ItemStack
getIcon()
void
initSettingsGUI
(com.simibubi.create.foundation.gui.ModularGuiLineBuilder builder) Set up the settings menu for your demandvoid
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 signvoid
setDefaultSettings
(net.minecraft.nbt.CompoundTag tag) Set up the default settings for your demandvoid
validateSettings
(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:
getIcon
in 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:SignDemand
Set up the settings menu for your demand- Overrides:
initSettingsGUI
in classSignDemand
- 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 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:SignDemand
Validate settings sent over the network- Overrides:
validateSettings
in classSignDemand
- Parameters:
received
- For reading settings from networkdisk
- 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 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: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 classSignDemand
tag
- The settings for your demand
-