Class AbstractPresenceSensorPeripheral
java.lang.Object
me.alexdevs.classicPeripherals.peripherals.presenceSensor.AbstractPresenceSensorPeripheral
- All Implemented Interfaces:
dan200.computercraft.api.peripheral.IPeripheral
- Direct Known Subclasses:
PresenceSensorPeripheral
public abstract class AbstractPresenceSensorPeripheral
extends Object
implements dan200.computercraft.api.peripheral.IPeripheral
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final dan200.computercraft.api.peripheral.AttachedComputerSetprotected booleanprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattach(@NonNull dan200.computercraft.api.peripheral.IComputerAccess computer) voiddetach(@NonNull dan200.computercraft.api.peripheral.IComputerAccess computer) protected voidemitScanEvent(List<AbstractPresenceSensorPeripheral.EntityPresenceData> entities, boolean ignoreEmpty) abstract net.minecraft.world.level.LevelgetLevel()protected List<net.minecraft.world.phys.Vec3> getPlayerCastPoints(net.minecraft.world.entity.LivingEntity entity) abstract net.minecraft.world.phys.Vec3@NonNull StringgetType()final dan200.computercraft.api.lua.MethodResultsense()voidtick(net.minecraft.world.level.Level level) protected voidupdateState(boolean active) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dan200.computercraft.api.peripheral.IPeripheral
equals, getAdditionalTypes, getTarget
-
Field Details
-
computers
protected final dan200.computercraft.api.peripheral.AttachedComputerSet computers -
scanIn
protected long scanIn -
manualScan
protected boolean manualScan
-
-
Constructor Details
-
AbstractPresenceSensorPeripheral
public AbstractPresenceSensorPeripheral()
-
-
Method Details
-
getType
- Specified by:
getTypein interfacedan200.computercraft.api.peripheral.IPeripheral
-
attach
public void attach(@NonNull dan200.computercraft.api.peripheral.IComputerAccess computer) - Specified by:
attachin interfacedan200.computercraft.api.peripheral.IPeripheral
-
detach
public void detach(@NonNull dan200.computercraft.api.peripheral.IComputerAccess computer) - Specified by:
detachin interfacedan200.computercraft.api.peripheral.IPeripheral
-
getPosition
public abstract net.minecraft.world.phys.Vec3 getPosition() -
getLevel
public abstract net.minecraft.world.level.Level getLevel() -
scanEntities
-
updateState
protected void updateState(boolean active) -
tick
public void tick(net.minecraft.world.level.Level level) -
emitScanEvent
protected void emitScanEvent(List<AbstractPresenceSensorPeripheral.EntityPresenceData> entities, boolean ignoreEmpty) -
getPlayerCastPoints
protected List<net.minecraft.world.phys.Vec3> getPlayerCastPoints(net.minecraft.world.entity.LivingEntity entity) -
sense
@LuaFunction public final dan200.computercraft.api.lua.MethodResult sense()
-