Class AttributeDataCompound
- 
                    
                    
- All Implemented Interfaces:
 - 
                            
                            
com.skillw.pouvoir.api.plugin.map.RegContainer,java.io.Serializable,java.util.concurrent.ConcurrentMap,kotlin.collections.Map,kotlin.collections.MutableMap 
public final class AttributeDataCompound extends LowerMap<AttributeData>
Attribute data compound
 
- 
                
                    
                    
- 
                                
                            
                                
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAttributeDataCompound.Companion 
- 
                                
                            
                                
Field Summary
Fields Modifier and Type Field Description private LivingEntityentityprivate final Set<Entry.Map<String, AttributeData>>entriesprivate final ConcurrentHashMap.KeySetView<String, AttributeData>keysprivate final Integersizeprivate final Collection<AttributeData>valuespublic final static AttributeDataCompound.CompanionCompanion 
- 
                                
                            
                                
Constructor Summary
Constructors Constructor Description AttributeDataCompound()AttributeDataCompound(LivingEntity entity)AttributeDataCompound(AttributeDataCompound compound) 
- 
                                
                            
                                
Method Summary
Modifier and Type Method Description final LivingEntitygetEntity()Entity final UnitsetEntity(LivingEntity entity)Entity final Unitrelease()AttributeDataCompoundclone()Clone 复制 StringtoString()final BooleanhasAttribute(String key)Has attribute final BooleanhasAttribute(Attribute attribute)Has the data of this attribute final Unitregister(UUID uuid)Register final Status<?>getAttributeStatus(Attribute attribute)Get attribute status final Status<?>getAttributeStatus(String attributeKey)Get attribute status final Status<?>getStatus(Attribute attribute)Get status final Status<?>getStatus(String attributeKey)Get status final AttributeDatatoAttributeData()To attribute data转化为属性数据 final AttributeDataCompoundoperation(AttributeDataCompound other)NumberOperation运算操作 final AttributeDataCompoundcombine(AttributeDataCompound other)final Unitcombine(String source, AttributeData attributeData)final Status<?>get(String key, String attribute)Get获取某个键的属性数据中某个属性的状态 final Status<?>get(String key, Attribute attribute)获取某个键的属性数据中某个属性的状态 final Map<String, Object>serialize()To mutable map转化为可变的map final UnitsaveTo(ItemStack itemStack)Save以"ATTRIBUTE_DATA"为键保存到物品nbt final <T extends Any> TgetAttrValue(Attribute attribute, LivingEntity entity, String placeholder)Get attr value final <T extends Any> TgetAttrValue(String attribute, LivingEntity entity, String placeholder)Get attr value final <T extends Any> TgetAttrValue(Attribute attribute, String placeholder)Get attr value final <T extends Any> TgetAttrValue(String attribute, String placeholder)Get attr value final Unitinit()final AttributeDataCompoundallToRelease()final UnitremoveDeep(String path)- 
                                            
                                        
                                            
Methods inherited from class java.util.concurrent.ConcurrentHashMap
clear, computeIfPresent, contains, containsValue, elements, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, getEntries, getKeys, getOrDefault, getSize, getValues, isEmpty, keySet, keys, mappingCount, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues - 
                                            
                                        
                                            
Methods inherited from class com.skillw.pouvoir.api.plugin.map.BaseMap
equals, hashCode, register, remove - 
                                            
                                        
                                            
Methods inherited from class com.skillw.pouvoir.api.plugin.map.LowerMap
compute, computeIfAbsent, containsKey, get, merge, put, putAll, putIfAbsent, remove - 
                                        
                                    
                                        
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
                    
                    
                    
- 
                                
                            
                                
Constructor Detail
- 
                                        
AttributeDataCompound
AttributeDataCompound()
 
- 
                                        
AttributeDataCompound
AttributeDataCompound(LivingEntity entity)
 
- 
                                        
AttributeDataCompound
AttributeDataCompound(AttributeDataCompound compound)
 
 - 
                                        
 
- 
                                
                            
                                
Method Detail
- 
                                        
getEntity
final LivingEntity getEntity()
Entity
 
- 
                                        
setEntity
final Unit setEntity(LivingEntity entity)
Entity
 
- 
                                        
clone
AttributeDataCompound clone()
Clone 复制
- Returns:
 属性数据集
 
- 
                                        
hasAttribute
final Boolean hasAttribute(String key)
Has attribute
- Parameters:
 key- 属性键- Returns:
 是否存在该属性
 
- 
                                        
hasAttribute
final Boolean hasAttribute(Attribute attribute)
Has the data of this attribute
- Parameters:
 attribute- 属性- Returns:
 是否存在该属性的数据
 
- 
                                        
getAttributeStatus
final Status<?> getAttributeStatus(Attribute attribute)
Get attribute status
- Parameters:
 attribute- 属性- Returns:
 属性状态
 
- 
                                        
getAttributeStatus
final Status<?> getAttributeStatus(String attributeKey)
Get attribute status
- Parameters:
 attributeKey- 属性键- Returns:
 属性状态
 
- 
                                        
getStatus
final Status<?> getStatus(Attribute attribute)
Get status
- Parameters:
 attribute- 属性- Returns:
 状态
 
- 
                                        
getStatus
final Status<?> getStatus(String attributeKey)
Get status
- Parameters:
 attributeKey- 属性键- Returns:
 属性状态
 
- 
                                        
toAttributeData
final AttributeData toAttributeData()
To attribute data
转化为属性数据
- Returns:
 属性数据
 
- 
                                        
operation
@Deprecated(message = "use combine", replaceWith = @ReplaceWith(imports = {}, expression = "combine(other)")) final AttributeDataCompound operation(AttributeDataCompound other)
NumberOperation
运算操作
- Parameters:
 other- 属性数据集- Returns:
 属性数据集(操作后的)
 
- 
                                        
combine
final AttributeDataCompound combine(AttributeDataCompound other)
 
- 
                                        
combine
final Unit combine(String source, AttributeData attributeData)
 
- 
                                        
get
final Status<?> get(String key, String attribute)
Get
获取某个键的属性数据中某个属性的状态
- Parameters:
 key- 键attribute- 属性- Returns:
 属性数据
 
- 
                                        
get
final Status<?> get(String key, Attribute attribute)
获取某个键的属性数据中某个属性的状态
- Parameters:
 key- 键attribute- 属性- Returns:
 属性数据
 
- 
                                        
saveTo
final Unit saveTo(ItemStack itemStack)
Save
以"ATTRIBUTE_DATA"为键保存到物品nbt
- Parameters:
 itemStack- 物品- Returns:
 物品
 
- 
                                        
getAttrValue
final <T extends Any> T getAttrValue(Attribute attribute, LivingEntity entity, String placeholder)
Get attr value
- Parameters:
 attribute- 属性entity- 实体placeholder- 占位符key (读取格式中的) 默认是total- Returns:
 返回值
 
- 
                                        
getAttrValue
final <T extends Any> T getAttrValue(String attribute, LivingEntity entity, String placeholder)
Get attr value
- Parameters:
 attribute- 属性entity- 实体placeholder- 占位符key (读取格式中的) 默认是total- Returns:
 返回值
 
- 
                                        
getAttrValue
final <T extends Any> T getAttrValue(Attribute attribute, String placeholder)
Get attr value
- Parameters:
 attribute- 属性placeholder- 占位符key (读取格式中的) 默认是total- Returns:
 返回值
 
- 
                                        
getAttrValue
final <T extends Any> T getAttrValue(String attribute, String placeholder)
Get attr value
- Parameters:
 attribute- 属性placeholder- 占位符key (读取格式中的) 默认是total- Returns:
 返回值
 
- 
                                        
allToRelease
final AttributeDataCompound allToRelease()
 
- 
                                        
removeDeep
final Unit removeDeep(String path)
 
 - 
                                        
 
 - 
                                
                            
                                
 
 - 
                                            
                                        
                                            
 
 -