Contents
Class WrappedInfoProvider
java.lang.Object
com.hypixel.hytale.server.npc.sensorinfo.WrappedInfoProvider
- All Implemented Interfaces:
InfoProvider
A wrapped info provider for use in Sensors that need to delegate info fetching to child sensors. Matching sensors
should be stored as a list in this wrapper during iteration so that they can be searched by getInfo.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of the class where the list of matching sensors can change (i.e.WrappedInfoProvider(Sensor[] sensors) Creates an instance of the class where the list of matching sensors will never change if the provider is going to be called on (i.e. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoid<E extends ExtraInfoProvider>
EgetExtraInfo(Class<E> clazz) getParameterProvider(int parameter) <E extends ExtraInfoProvider>
EgetPassedExtraInfo(Class<E> clazz) We provide direct access to the position provider as it's the most frequently used provider and is used in a very large number of actions and motions.boolean<E extends ExtraInfoProvider>
voidpassExtraInfo(E provider) voidsetPositionMatch(IPositionProvider provider)
-
Constructor Details
-
WrappedInfoProvider
public WrappedInfoProvider()Creates an instance of the class where the list of matching sensors can change (i.e. SensorOr) -
WrappedInfoProvider
Creates an instance of the class where the list of matching sensors will never change if the provider is going to be called on (i.e. SensorAnd)- Parameters:
sensors- the full list of sensors
-
-
Method Details
-
getExtraInfo
- Specified by:
getExtraInfoin interfaceInfoProvider
-
passExtraInfo
- Specified by:
passExtraInfoin interfaceInfoProvider
-
getPassedExtraInfo
- Specified by:
getPassedExtraInfoin interfaceInfoProvider
-
hasPosition
public boolean hasPosition()- Specified by:
hasPositionin interfaceInfoProvider
-
getPositionProvider
Description copied from interface:InfoProviderWe provide direct access to the position provider as it's the most frequently used provider and is used in a very large number of actions and motions.- Specified by:
getPositionProviderin interfaceInfoProvider- Returns:
- the position provider.
-
getParameterProvider
- Specified by:
getParameterProviderin interfaceInfoProvider
-
clearMatches
public void clearMatches() -
addMatch
-
clearPositionMatch
public void clearPositionMatch() -
setPositionMatch
-