Class AttributeBuilder

java.lang.Object
dev.latvian.mods.kubejs.registry.BuilderBase<net.minecraft.world.entity.ai.attributes.Attribute>
dev.latvian.mods.kubejs.entity.AttributeBuilder
All Implemented Interfaces:
Supplier<net.minecraft.world.entity.ai.attributes.Attribute>

@ReturnsSelf public class AttributeBuilder extends BuilderBase<net.minecraft.world.entity.ai.attributes.Attribute>
  • Field Details

    • predicateList

      public final List<Predicate<net.minecraft.world.entity.EntityType<?>>> predicateList
    • defaultValue

      public com.mojang.datafixers.util.Either<AttributeBuilder.Range,Boolean> defaultValue
    • syncable

      public boolean syncable
    • sentiment

      public net.minecraft.world.entity.ai.attributes.Attribute.Sentiment sentiment
  • Constructor Details

    • AttributeBuilder

      public AttributeBuilder(net.minecraft.resources.ResourceLocation id)
  • Method Details

    • bool

      public AttributeBuilder bool(boolean defaultValue)
    • range

      public AttributeBuilder range(double defaultValue, double min, double max)
    • syncable

      public AttributeBuilder syncable(boolean watch)
    • sentiment

      public AttributeBuilder sentiment(net.minecraft.world.entity.ai.attributes.Attribute.Sentiment sentiment)
    • negativeSentiment

      public AttributeBuilder negativeSentiment()
    • neutralSentiment

      public AttributeBuilder neutralSentiment()
    • attachTo

      public AttributeBuilder attachTo(Predicate<net.minecraft.world.entity.EntityType<?>> entityType)
    • attachToPlayers

      public AttributeBuilder attachToPlayers()
    • attachToMonsters

      public AttributeBuilder attachToMonsters()
    • attachToCategory

      public AttributeBuilder attachToCategory(net.minecraft.world.entity.MobCategory category)
    • getPredicateList

      @HideFromJS public List<Predicate<net.minecraft.world.entity.EntityType<?>>> getPredicateList()
    • createObject

      public net.minecraft.world.entity.ai.attributes.Attribute createObject()
      Specified by:
      createObject in class BuilderBase<net.minecraft.world.entity.ai.attributes.Attribute>
    • transformObject

      public net.minecraft.world.entity.ai.attributes.Attribute transformObject(net.minecraft.world.entity.ai.attributes.Attribute attribute)
      Overrides:
      transformObject in class BuilderBase<net.minecraft.world.entity.ai.attributes.Attribute>