Class WorldGlobalVariableAnalogSensor
java.lang.Object
me.desht.pneumaticcraft.common.sensor.pollSensors.WorldGlobalVariableSensor
me.desht.pneumaticcraft.common.sensor.pollSensors.WorldGlobalVariableAnalogSensor
- All Implemented Interfaces:
IBaseSensor,IPollSensorSetting,ISensorSetting
-
Field Summary
Fields inherited from class me.desht.pneumaticcraft.common.sensor.pollSensors.WorldGlobalVariableSensor
playerID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetRedstoneValue(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int sensorRange, String textBoxText) Called regularly by the Universal Sensor block entity to calculate the output redstone value 0-15 of this sensor.Return the button path the player has to follow in which this setting is stored.Methods inherited from class me.desht.pneumaticcraft.common.sensor.pollSensors.WorldGlobalVariableSensor
getAdditionalInfo, getPollFrequency, getRequiredUpgrades, getTextBoxOptions, needsTextBox, setPlayerContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.universal_sensor.IBaseSensor
getDescription, getHelpPromptText, getHelpText, getTextboxIntRange, isEntityFilter, strictComboBoxMethods inherited from interface me.desht.pneumaticcraft.api.universal_sensor.ISensorSetting
getAirUsage, needsGPSTool, notifyTextChange
-
Constructor Details
-
WorldGlobalVariableAnalogSensor
public WorldGlobalVariableAnalogSensor()
-
-
Method Details
-
getSensorPath
Description copied from interface:IBaseSensorReturn the button path the player has to follow in which this setting is stored. For instance, when the sensor should be located in player and is called speed, you should return "player/speed".- Specified by:
getSensorPathin interfaceIBaseSensor- Overrides:
getSensorPathin classWorldGlobalVariableSensor- Returns:
- a string path to the sensor
-
getRedstoneValue
public int getRedstoneValue(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int sensorRange, String textBoxText) Description copied from interface:IPollSensorSettingCalled regularly by the Universal Sensor block entity to calculate the output redstone value 0-15 of this sensor. When this sensor is digital, just return 0 or 15.- Specified by:
getRedstoneValuein interfaceIPollSensorSetting- Overrides:
getRedstoneValuein classWorldGlobalVariableSensor- Parameters:
level- the worldpos- the blockpos to testsensorRange- range of the sensor, based on the number of Range Upgrades inserted in the Universal Sensor.textBoxText- any text typed in the textfield of the Universal Sensor GUI.- Returns:
- level of the redstone signal that the Universal Sensor block should emit
-