Class BlockLightLevelSensor
java.lang.Object
me.desht.pneumaticcraft.common.sensor.pollSensors.BlockLightLevelSensor
- All Implemented Interfaces:
IBaseSensor,IBlockAndCoordinatePollSensor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintgetRedstoneValue(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, int sensorRange, String textBoxText, Set<net.minecraft.core.BlockPos> positions) Similar toIPollSensorSetting.getRedstoneValue(Level, BlockPos, int, String), but this has the GPS tracked coordinates as extra parameters.Return the upgrades required by this sensor.Return the button path the player has to follow in which this setting is stored.booleanShould this sensor's GUI display a text box for extra information to be entered?Methods 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
getAdditionalInfo, getDescription, getHelpPromptText, getHelpText, getTextboxIntRange, getTextBoxOptions, strictComboBox
-
Constructor Details
-
BlockLightLevelSensor
public BlockLightLevelSensor()
-
-
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- Returns:
- a string path to the sensor
-
getRequiredUpgrades
Description copied from interface:IBaseSensorReturn the upgrades required by this sensor. This will automatically include a GPS Tool for sensors that require a location.- Specified by:
getRequiredUpgradesin interfaceIBaseSensor- Returns:
- a set of upgrades
-
getPollFrequency
public int getPollFrequency()Description copied from interface:IBlockAndCoordinatePollSensor- Specified by:
getPollFrequencyin interfaceIBlockAndCoordinatePollSensor- Returns:
- a poll frequency, in ticks
-
needsTextBox
public boolean needsTextBox()Description copied from interface:IBaseSensorShould this sensor's GUI display a text box for extra information to be entered?- Specified by:
needsTextBoxin interfaceIBaseSensor- Returns:
- true if this sensor needs a text box, false otherwise
-
getRedstoneValue
public int getRedstoneValue(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, int sensorRange, String textBoxText, Set<net.minecraft.core.BlockPos> positions) Description copied from interface:IBlockAndCoordinatePollSensorSimilar toIPollSensorSetting.getRedstoneValue(Level, BlockPos, int, String), but this has the GPS tracked coordinates as extra parameters. This method will only invoke with a valid GPS tool, and when all the coordinates are within range.- Specified by:
getRedstoneValuein interfaceIBlockAndCoordinatePollSensor- Parameters:
world- the sensor's worldpos- the sensor's positionsensorRange- the sensor's current range, based on installed range upgradestextBoxText- text in the sensor GUI's textbox (may be an empty string)positions- When only one GPS Tool is inserted this contains the position of just that tool. If two GPS Tools are inserted, These are both corners of a box, and every coordinate in this box is added to the positions argument.- Returns:
- the redstone signal level to be emitted
-