Bassebombecraft

Bassebombecraft

18.5k Downloads

Support for entity attributes in 1.16.5

athrane opened this issue ยท 1 comments

commented

Support for entity attributes work different in 1.16.5.
See these issues for attribute related bugs:

Attributes are also used in these items:

  • RespawnIdolInventoryItem (via the V1 operator AddAttribute)
  • SpawnAngryParrots ( via EntityUtils.setAttribute(..))
  • SpawnWarPig2 operator ( via EntityUtils.setAttribute(..))
  • Respawn2 operator ( via EntityUtils.setAttribute(..))
  • SpawnDecoy2 operator ( via EntityUtils.setAttribute(..))
  • RespawnEventHandler ( via the operator IsEntityAttributeDefined2)
  • ReceiveAggroEffectHandler ( via the operator IsEntityAttributeDefined2)
  • the V1 operator AddAttribute ( via EntityUtils.setAttribute(..))

Solution:

  • Addition of the custom attributes to all entity types.
  • Custom attributes are registered using deferred registrtion (#1192).
  • The custom attributes has be used as boolean flags, i.e. the attribute is either defined or not, in order to indicate the desired state.
  • Instead of using the presence of the attribute to defined the state, the attributes are not defined at all time for all entity types. The state is represented by the value of the attribute, i.e. 1 = false, 0 = true.
  • The operator IsEntityAttributeDefined2 must be replace since the attributes are always defined (see #1193). The new operator should test on the value of the attribute (==1) instead.
  • Delete unregistered attributes in ModConstants.
  • Delete the v1 Operator AddAttribute (#1197)
commented

Close due to the mentioned commits.