Package emu.grasscutter.game.entity
Class EntityItem
java.lang.Object
emu.grasscutter.game.entity.GameEntity
emu.grasscutter.game.entity.EntityBaseGadget
emu.grasscutter.game.entity.EntityItem
-
Field Summary
Fields inherited from class emu.grasscutter.game.entity.EntityBaseGadget
position, rotationFields inherited from class emu.grasscutter.game.entity.GameEntity
id -
Constructor Summary
ConstructorsConstructorDescriptionEntityItem(Scene scene, Player player, ItemData itemData, Position pos, int count) EntityItem(Scene scene, Player player, ItemData itemData, Position pos, int count, boolean share) -
Method Summary
Modifier and TypeMethodDescriptionintgetCount()it.unimi.dsi.fastutil.ints.Int2FloatMapintlonggetGuid()getItem()booleanisShare()voidonInteract(Player player, GadgetInteractReqOuterClass.GadgetInteractReq interactReq) Called when a player interacts with this entitytoProto()Methods inherited from class emu.grasscutter.game.entity.EntityBaseGadget
fillFightProps, getPosition, getRotation, onDeathMethods inherited from class emu.grasscutter.game.entity.GameEntity
addAllFightPropsToEntityInfo, addFightProperty, damage, damage, getBlockId, getConfigId, getEntityType, getFightProperty, getGroupId, getId, getLastMoveReliableSeq, getLastMoveSceneTimeMs, getLifeState, getMetaModifiers, getMetaOverrideMap, getMotionInfo, getMotionState, getScene, getSpawnEntry, getWorld, hasFightProperty, heal, isAlive, isLockHP, move, onCreate, onRemoved, setBlockId, setConfigId, setFightProperty, setFightProperty, setGroupId, setLastMoveReliableSeq, setLastMoveSceneTimeMs, setLockHP, setMotionState, setSpawnEntry
-
Constructor Details
-
EntityItem
-
EntityItem
-
-
Method Details
-
getItemData
-
getCount
public int getCount() -
getGadgetId
public int getGadgetId()- Specified by:
getGadgetIdin classEntityBaseGadget
-
getFightProperties
public it.unimi.dsi.fastutil.ints.Int2FloatMap getFightProperties()- Specified by:
getFightPropertiesin classGameEntity
-
onInteract
Description copied from class:GameEntityCalled when a player interacts with this entity- Overrides:
onInteractin classGameEntity- Parameters:
player- Player that is interacting with this entityinteractReq- Interact request protobuf data
-
toProto
- Specified by:
toProtoin classGameEntity
-
getItem
-
getGuid
public long getGuid()
-