BuilderSupport class

Пакет: com.hypixel.hytale.server.npc.asset.builder

Файл: com/hypixel/hytale/server/npc/asset/builder/BuilderSupport.java

Поля (24)

МодификаторыТипИмя
break
final BuilderManager builderManager
int var1
List var1
Instruction[] var1
var1
IntArrayList var1
int var1
AlarmStore var2
var2
int var2
var2
StatePair var2
var2
Map var2
IntSet var2
IntSet var2
Vector3d[] var2
Instruction var3
IntSet var3
IntSet var3
Entry var4
IntOpenHashSet var4
IntOpenHashSet var4

Методы (90)

МодификаторыВозвратСигнатура
abstract throw new IllegalArgumentExceptionthrow new IllegalArgumentException("Slot for putting instruction must be >= 0 and < the size of the list")
public void addComponentLocalStateMachinevoid addComponentLocalStateMachine(int var1)
public boolean[] allocateFlagsboolean[] allocateFlags()
abstract return allocatePositionSlotsreturn allocatePositionSlots(this.positionSlotMapper)
abstract return allocatePositionSlotsreturn allocatePositionSlots(this.searchRaySlotMapper)
for for(int var2 = 0; var2 < var1.length; var2++)
for for(int var3 = 0; var3 < var2.length; var3++)
public Alarm getAlarmAlarm getAlarm(String var1)
public int getBeaconMessageSlotint getBeaconMessageSlot(String var1)
public int getBlockEventSlotint getBlockEventSlot(BlockEventType var1, int var2, double var3, boolean var5)
public BuilderManager getBuilderManagerBuilderManager getBuilderManager()
public int getComponentIndexint getComponentIndex()
public Int2IntMap getComponentLocalStateMachinesInt2IntMap getComponentLocalStateMachines()
public ComponentContext getCurrentComponentContextComponentContext getCurrentComponentContext()
public InstructionType getCurrentInstructionContextInstructionType getCurrentInstructionContext()
public int getEntityEventSlotint getEntityEventSlot(EntityEventType var1, int var2, double var3, boolean var5)
public ExecutionContext getExecutionContextExecutionContext getExecutionContext()
public int getFlagSlotint getFlagSlot(String var1)
public Scope getGlobalScopeScope getGlobalScope()
public Holder<EntityStore> getHolderHolder<EntityStore> getHolder()
public int getInstructionSlotint getInstructionSlot(@Nullable String var1)
public BitSet getLocalStateMachineAutoResetStatesBitSet getLocalStateMachineAutoResetStates()
public EventSlotMapper<BlockEventType> getNPCBlockEventSlotMapperEventSlotMapper<BlockEventType> getNPCBlockEventSlotMapper()
public EventSlotMapper<EntityEventType> getNPCEntityEventSlotMapperEventSlotMapper<EntityEventType> getNPCEntityEventSlotMapper()
public int getNextAttackIndexint getNextAttackIndex()
public int getParameterSlotint getParameterSlot(String var1)
public EventSlotMapper<BlockEventType> getPlayerBlockEventSlotMapperEventSlotMapper<BlockEventType> getPlayerBlockEventSlotMapper()
public EventSlotMapper<EntityEventType> getPlayerEntityEventSlotMapperEventSlotMapper<EntityEventType> getPlayerEntityEventSlotMapper()
public int getPositionSlotint getPositionSlot(String var1)
public int getSearchRaySlotint getSearchRaySlot(String var1)
public StateEvaluator getStateEvaluatorStateEvaluator getStateEvaluator()
public StateMappingHelper getStateHelperStateMappingHelper getStateHelper()
public int getTargetSlotint getTargetSlot(String var1)
public Timer getTimerByNameTimer getTimerByName(String var1)
public ValueStore.Builder getValueStoreBuilderValueStore.Builder getValueStoreBuilder()
public int getValueStoreDoubleSlotint getValueStoreDoubleSlot(String var1)
public int getValueStoreIntSlotint getValueStoreIntSlot(String var1)
public int getValueStoreStringSlotint getValueStoreStringSlot(String var1)
public boolean hasBlockEventSupportboolean hasBlockEventSupport()
public boolean hasComponentLocalStateMachinesboolean hasComponentLocalStateMachines()
public boolean hasEntityEventSupportboolean hasEntityEventSupport()
if if(var2 == null)
if if(this.componentIndexStack == null)
if if(this.componentLocalStateMachines == null)
if if(this.localStateMachineAutoResetStates == null)
if if(var2 == Integer.MIN_VALUE)
if if(var3 == null)
if if(this.modifiedStateMap == null)
if if(var1 < 0)
if if(this.blackboardBlockSets == null)
if if(this.blockSensorResetBlockSets == null)
if if(this.blockSensorResetBlockSets != null)
if if(var5)
if if(this.playerBlockEventSlotMapper == null)
if if(this.npcBlockEventSlotMapper == null)
if if(var2 == null && var3 == null)
if if(var2 != null)
if if(var3 != null)
if if(var5)
if if(this.playerEntityEventSlotMapper == null)
if if(this.npcEntityEventSlotMapper == null)
if if(var2 == null && var3 == null)
if if(var2 != null)
if if(var3 != null)
if if(this.valueStoreBuilder == null)
if if(this.valueStoreBuilder == null)
if if(this.valueStoreBuilder == null)
if if(var1 == 0)
public boolean isTrackInteractionsboolean isTrackInteractions()
public void popComponentvoid popComponent()
public void popCurrentStateNamevoid popCurrentStateName()
public void popModifiedStateMapvoid popModifiedStateMap()
public void pushCurrentStateNamevoid pushCurrentStateName(@Nonnull String var1)
public void putInstructionvoid putInstruction(int var1, Instruction var2)
public void registerBlockSensorResetActionvoid registerBlockSensorResetAction(int var1)
public void requireAttitudeOverrideMemoryvoid requireAttitudeOverrideMemory()
public void requireBlockTypeBlackboardvoid requireBlockTypeBlackboard(int var1)
public boolean requiresAttitudeOverrideMemoryboolean requiresAttitudeOverrideMemory()
public boolean requiresBlockTypeBlackboardboolean requiresBlockTypeBlackboard()
public boolean requiresLeashPositionboolean requiresLeashPosition()
public void setCurrentComponentContextvoid setCurrentComponentContext(ComponentContext var1)
public void setCurrentInstructionContextvoid setCurrentInstructionContext(InstructionType var1)
public void setGlobalScopevoid setGlobalScope(Scope var1)
public void setLocalStateMachineAutoResetvoid setLocalStateMachineAutoReset()
public void setModifiedStateMapvoid setModifiedStateMap(@Nonnull StateMappingHelper var1, @Nonnull StatePair[] var2)
public void setRequireLeashPositionvoid setRequireLeashPosition()
public void setScopevoid setScope(Scope var1)
public void setStateEvaluatorvoid setStateEvaluator(StateEvaluator var1)
public void setToNewComponentvoid setToNewComponent()
public void trackInteractionsvoid trackInteractions()

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.server.npc.asset.builder;

class="kw">import com.hypixel.hytale.common.thread.ticking.Tickable;
class="kw">import com.hypixel.hytale.component.Holder;
class="kw">import com.hypixel.hytale.server.core.asset.type.blockset.config.BlockSet;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import com.hypixel.hytale.server.npc.blackboard.view.event.block.BlockEventType;
class="kw">import com.hypixel.hytale.server.npc.blackboard.view.event.entity.EntityEventType;
class="kw">import com.hypixel.hytale.server.npc.decisionmaker.stateevaluator.StateEvaluator;
class="kw">import com.hypixel.hytale.server.npc.entities.NPCEntity;
class="kw">import com.hypixel.hytale.server.npc.instructions.Instruction;
class="kw">import com.hypixel.hytale.server.npc.role.support.EntitySupport;
class="kw">import com.hypixel.hytale.server.npc.role.support.RoleStats;
class="kw">import com.hypixel.hytale.server.npc.storage.AlarmStore;
class="kw">import com.hypixel.hytale.server.npc.util.Alarm;
class="kw">import com.hypixel.hytale.server.npc.util.Timer;
class="kw">import com.hypixel.hytale.server.npc.util.expression.ExecutionContext;
class="kw">import com.hypixel.hytale.server.npc.util.expression.ForwardedModifier;
class="kw">import com.hypixel.hytale.server.npc.util.expression.Scope;
class="kw">import com.hypixel.hytale.server.npc.util.expression.StdScope;
class="kw">import com.hypixel.hytale.server.npc.valuestore.ValueStore;
class="kw">import it.unimi.dsi.fastutil.ints.Int2IntMap;
class="kw">import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
class="kw">import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
class="kw">import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
class="kw">import it.unimi.dsi.fastutil.ints.IntArrayList;
class="kw">import it.unimi.dsi.fastutil.ints.IntList;
class="kw">import it.unimi.dsi.fastutil.ints.IntLists;
class="kw">import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
class="kw">import it.unimi.dsi.fastutil.ints.IntSet;
class="kw">import it.unimi.dsi.fastutil.ints.IntSets;
class="kw">import it.unimi.dsi.fastutil.ints.IntStack;
class="kw">import it.unimi.dsi.fastutil.objects.Object2IntMap;
class="kw">import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
class="kw">import it.unimi.dsi.fastutil.objects.ObjectArrayList;
class="kw">import java.util.ArrayDeque;
class="kw">import java.util.BitSet;
class="kw">import java.util.List;
class="kw">import java.util.Map;
class="kw">import java.util.Objects;
class="kw">import java.util.Map.Entry;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;
class="kw">import org.joml.Vector3d;

class="kw">public class BuilderSupport {
   class="kw">private class="kw">final BuilderManager builderManager;
   class="kw">private class="kw">final Holder<EntityStore> holder;
   class="kw">private class="kw">final ExecutionContext executionContext;
   class="kw">private boolean requireLeashPosition;
   class="kw">private class="kw">final SlotMapper flagSlotMapper = new SlotMapper();
   class="kw">private class="kw">final SlotMapper beaconSlotMapper = new SlotMapper();
   class="kw">private class="kw">final SlotMapper targetSlotMapper = new SlotMapper(true);
   class="kw">private class="kw">final SlotMapper positionSlotMapper = new SlotMapper();
   class="kw">private class="kw">final ReferenceSlotMapper<Timer> timerSlotMapper = new ReferenceSlotMapper<>(Timer::new);
   class="kw">private class="kw">final SlotMapper searchRaySlotMapper = new SlotMapper();
   class="kw">private class="kw">final SlotMapper parameterSlotMapper = new SlotMapper();
   @Nonnull
   class="kw">private class="kw">final Object2IntMap<String> instructionSlotMappings;
   class="kw">private class="kw">final Int2ObjectMap<String> instructionNameMappings = new Int2ObjectOpenHashMap();
   class="kw">private class="kw">final List<Instruction> instructions = new ObjectArrayList();
   class="kw">private EventSlotMapper<BlockEventType> playerBlockEventSlotMapper;
   class="kw">private EventSlotMapper<BlockEventType> npcBlockEventSlotMapper;
   class="kw">private EventSlotMapper<EntityEventType> playerEntityEventSlotMapper;
   class="kw">private EventSlotMapper<EntityEventType> npcEntityEventSlotMapper;
   class="kw">private Scope globalScope;
   class="kw">private int currentComponentIndex;
   class="kw">private IntStack componentIndexStack;
   class="kw">private int componentIndexSource;
   class="kw">private int currentAttackIndex;
   class="kw">private Int2IntMap componentLocalStateMachines;
   class="kw">private BitSet localStateMachineAutoResetStates;
   class="kw">private class="kw">final StateMappingHelper stateHelper;
   class="kw">private List<Entry<StateMappingHelper, StatePair[]>> modifiedStateMap;
   class="kw">private IntSet blackboardBlockSets;
   class="kw">private IntSet blockSensorResetBlockSets;
   class="kw">private boolean requiresAttitudeOverrideMemory;
   class="kw">private boolean trackInteractions;
   class="kw">private InstructionType currentInstructionContext = InstructionType.Component;
   class="kw">private ComponentContext currentComponentContext;
   @Nonnull
   class="kw">private class="kw">final StdScope sensorScope;
   @Nonnull
   class="kw">private class="kw">final Builder<?> builder;
   @Nullable
   class="kw">private class="kw">final RoleStats roleStats;
   class="kw">private StateEvaluator stateEvaluator;
   class="kw">private ValueStore.Builder valueStoreBuilder;
   class="kw">private class="kw">final ArrayDeque<String> stateStack = new ArrayDeque<>();

   class="kw">public BuilderSupport(
      @Nonnull BuilderManager var1,
      @Nonnull NPCEntity var2,
      @Nullable Holder<EntityStore> var3,
      @Nonnull ExecutionContext var4,
      @Nonnull Builder<?> var5,
      @Nullable RoleStats var6
   ) {
      this(var1, var3, var4, var5, var5.getStateMappingHelper(), var6, EntitySupport.createScope(var2));
   }

   class="kw">public BuilderSupport(
      @Nonnull BuilderManager var1, @Nullable Holder<EntityStore> var2, @Nonnull ExecutionContext var3, @Nonnull Builder<?> var4, @Nullable RoleStats var5
   ) {
      this(var1, var2, var3, var4, var4.getStateMappingHelper(), var5, EntitySupport.createScope());
   }

   class="kw">private BuilderSupport(
      @Nonnull BuilderManager var1,
      @Nullable Holder<EntityStore> var2,
      @Nonnull ExecutionContext var3,
      @Nonnull Builder<?> var4,
      @Nonnull StateMappingHelper var5,
      @Nullable RoleStats var6,
      @Nonnull StdScope var7
   ) {
      this.builderManager = var1;
      this.holder = var2;
      this.executionContext = var3;
      this.builder = var4;
      this.stateHelper = var5;
      this.roleStats = var6;
      this.sensorScope = var7;
      this.instructionSlotMappings = new Object2IntOpenHashMap();
      this.instructionSlotMappings.defaultReturnValue(Integer.MIN_VALUE);
   }

   class="kw">public BuilderManager getBuilderManager() {
      class="kw">return this.builderManager;
   }

   class="kw">public Holder<EntityStore> getHolder() {
      class="kw">return this.holder;
   }

   class="kw">public ExecutionContext getExecutionContext() {
      class="kw">return this.executionContext;
   }

   @Nonnull
   class="kw">public Builder<?> getRootBuilder() {
      class="kw">return this.builder;
   }

   class="kw">public void setScope(Scope var1) {
      this.executionContext.setScope(var1);
   }

   class="kw">public void setGlobalScope(Scope var1) {
      this.globalScope = var1;
   }

   class="kw">public Scope getGlobalScope() {
      class="kw">return this.globalScope;
   }

   class="kw">public void setRequireLeashPosition() {
      this.requireLeashPosition = true;
   }

   class="kw">public int getFlagSlot(String var1) {
      class="kw">return this.flagSlotMapper.getSlot(var1);
   }

   class="kw">public Timer getTimerByName(String var1) {
      class="kw">return this.timerSlotMapper.getReference(var1);
   }

   class="kw">public int getBeaconMessageSlot(String var1) {
      class="kw">return this.beaconSlotMapper.getSlot(var1);
   }

   class="kw">public int getTargetSlot(String var1) {
      class="kw">return this.targetSlotMapper.getSlot(var1);
   }

   class="kw">public Alarm getAlarm(String var1) {
      AlarmStore var2 = this.holder.getComponent(AlarmStore.getComponentType());
      if (var2 == null) {
         var2 = new AlarmStore();
         this.holder.putComponent(AlarmStore.getComponentType(), var2);
      }

      class="kw">return var2.get(var1);
   }

   @Nullable
   class="kw">public Object2IntMap<String> getTargetSlotMappings() {
      class="kw">return this.targetSlotMapper.getSlotMappings();
   }

   @Nullable
   class="kw">public Int2ObjectMap<String> getTargetSlotToNameMap() {
      class="kw">return this.targetSlotMapper.getNameMap();
   }

   class="kw">public int getPositionSlot(String var1) {
      class="kw">return this.positionSlotMapper.getSlot(var1);
   }

   class="kw">public int getParameterSlot(String var1) {
      class="kw">return this.parameterSlotMapper.getSlot(var1);
   }

   class="kw">public int getSearchRaySlot(String var1) {
      class="kw">return this.searchRaySlotMapper.getSlot(var1);
   }

   @Nullable
   class="kw">public Vector3d[] allocatePositionSlots() {
      class="kw">return allocatePositionSlots(this.positionSlotMapper);
   }

   class="kw">public boolean requiresLeashPosition() {
      class="kw">return this.requireLeashPosition;
   }

   class="kw">public StateEvaluator getStateEvaluator() {
      class="kw">return this.stateEvaluator;
   }

   class="kw">public void setStateEvaluator(StateEvaluator var1) {
      this.stateEvaluator = var1;
   }

   class="kw">public boolean[] allocateFlags() {
      int var1 = this.flagSlotMapper.slotCount();
      class="kw">return var1 == 0 ? null : new boolean[var1];
   }

   @Nullable
   class="kw">public Tickable[] allocateTimers() {
      List var1 = this.timerSlotMapper.getReferenceList();
      class="kw">return var1.isEmpty() ? null : var1.toArray(Tickable[]::new);
   }

   @Nullable
   class="kw">public Vector3d[] allocateSearchRayPositionSlots() {
      class="kw">return allocatePositionSlots(this.searchRaySlotMapper);
   }

   @Nonnull
   class="kw">public StdScope getSensorScope() {
      class="kw">return this.sensorScope;
   }

   class="kw">public void setToNewComponent() {
      if (this.componentIndexStack == null) {
         this.componentIndexStack = new IntArrayList();
      }

      this.componentIndexStack.push(this.currentComponentIndex);
      this.currentComponentIndex = this.componentIndexSource++;
   }

   class="kw">public void addComponentLocalStateMachine(int var1) {
      if (this.componentLocalStateMachines == null) {
         this.componentLocalStateMachines = new Int2IntOpenHashMap();
         this.componentLocalStateMachines.defaultReturnValue(Integer.MIN_VALUE);
      }

      this.componentLocalStateMachines.put(this.getComponentIndex(), var1);
   }

   class="kw">public int getComponentIndex() {
      class="kw">return this.currentComponentIndex;
   }

   class="kw">public void popComponent() {
      this.currentComponentIndex = this.componentIndexStack.popInt();
   }

   class="kw">public boolean hasComponentLocalStateMachines() {
      class="kw">return this.componentLocalStateMachines != null;
   }

   class="kw">public Int2IntMap getComponentLocalStateMachines() {
      class="kw">return this.componentLocalStateMachines;
   }

   class="kw">public void setLocalStateMachineAutoReset() {
      if (this.localStateMachineAutoResetStates == null) {
         this.localStateMachineAutoResetStates = new BitSet();
      }

      this.localStateMachineAutoResetStates.set(this.getComponentIndex());
   }

   class="kw">public BitSet getLocalStateMachineAutoResetStates() {
      class="kw">return this.localStateMachineAutoResetStates;
   }

   class="kw">public StateMappingHelper getStateHelper() {
      class="kw">return this.stateHelper;
   }

   @Nullable
   class="kw">public Object2IntMap<String> getBeaconSlotMappings() {
      class="kw">return this.beaconSlotMapper.getSlotMappings();
   }

   class="kw">public boolean hasBlockEventSupport() {
      class="kw">return this.playerBlockEventSlotMapper != null || this.npcBlockEventSlotMapper != null;
   }

   class="kw">public EventSlotMapper<BlockEventType> getPlayerBlockEventSlotMapper() {
      class="kw">return this.playerBlockEventSlotMapper;
   }

   class="kw">public EventSlotMapper<BlockEventType> getNPCBlockEventSlotMapper() {
      class="kw">return this.npcBlockEventSlotMapper;
   }

   class="kw">public boolean hasEntityEventSupport() {
      class="kw">return this.playerEntityEventSlotMapper != null || this.npcEntityEventSlotMapper != null;
   }

   class="kw">public EventSlotMapper<EntityEventType> getPlayerEntityEventSlotMapper() {
      class="kw">return this.playerEntityEventSlotMapper;
   }

   class="kw">public EventSlotMapper<EntityEventType> getNPCEntityEventSlotMapper() {
      class="kw">return this.npcEntityEventSlotMapper;
   }

   class="kw">public int getInstructionSlot(@Nullable String var1) {
      int var2 = this.instructionSlotMappings.getInt(var1);
      if (var2 == Integer.MIN_VALUE) {
         var2 = this.instructions.size();
         if (var1 != null && !var1.isEmpty()) {
            this.instructionSlotMappings.put(var1, var2);
            this.instructionNameMappings.put(var2, var1);
         }

         this.instructions.add(null);
      }

      class="kw">return var2;
   }

   class="kw">public void putInstruction(int var1, Instruction var2) {
      Objects.requireNonNull(var2, "Instruction cannot be null when putting instruction");
      if (var1 < 0 || var1 >= this.instructions.size()) {
         throw new IllegalArgumentException("Slot for putting instruction must be >= 0 and < the size of the list");
      }

      if (this.instructions.get(var1) != null) {
         throw new IllegalStateException(String.format("Duplicate instruction with name: %s", this.instructionNameMappings.get(var1)));
      }

      this.instructions.set(var1, var2);
   }

   @Nonnull
   class="kw">public Instruction[] getInstructionSlotMappings() {
      Instruction[] var1 = this.instructions.toArray(Instruction[]::new);

      for (int var2 = 0; var2 < var1.length; var2++) {
         Instruction var3 = var1[var2];
         if (var3 == null) {
            throw new IllegalStateException("Instruction: " + (String)this.instructionNameMappings.get(var2) + " doesn't exist");
         }
      }

      class="kw">return var1;
   }

   class="kw">public void setModifiedStateMap(@Nonnull StateMappingHelper var1, @Nonnull StatePair[] var2) {
      if (this.modifiedStateMap == null) {
         this.modifiedStateMap = new ObjectArrayList();
      }

      this.modifiedStateMap.add(Map.entry(var1, var2));
   }

   @Nonnull
   class="kw">public StatePair getMappedStatePair(int var1) {
      StatePair var2 = null;

      for (int var3 = this.modifiedStateMap.size() - 1; var3 >= 0; var3--) {
         Entry var4 = this.modifiedStateMap.get(var3);
         var2 = var4.getValue()[var1];
         var1 = var4.getKey().getComponentImportStateIndex(var2.getFullStateName());
         if (var1 < 0) {
            break;
         }
      }

      Objects.requireNonNull(var2, "Result should not be null after iterating mapped state pairs");
      class="kw">return var2;
   }

   class="kw">public void popModifiedStateMap() {
      this.modifiedStateMap.removeLast();
   }

   @Nullable
   class="kw">public Map<String, ? class="kw">extends ForwardedModifier> setForwardedModifiers(@Nullable Map<String, ? class="kw">extends ForwardedModifier> var1) {
      class="kw">return this.getExecutionContext().setForwardedModifiers(var1);
   }

   @Nullable
   class="kw">public BuilderModifier getForwardedModifier(@Nonnull String var1) {
      Map var2 = this.getExecutionContext().getForwardedModifiers();
      class="kw">return var2 == null ? null : (BuilderModifier)var2.get(var1);
   }

   class="kw">public void requireBlockTypeBlackboard(int var1) {
      if (this.blackboardBlockSets == null) {
         this.blackboardBlockSets = new IntOpenHashSet();
      }

      this.blackboardBlockSets.add(var1);
   }

   class="kw">public void registerBlockSensorResetAction(int var1) {
      if (this.blockSensorResetBlockSets == null) {
         this.blockSensorResetBlockSets = new IntOpenHashSet();
      }

      this.blockSensorResetBlockSets.add(var1);
   }

   class="kw">public boolean requiresBlockTypeBlackboard() {
      class="kw">return this.blackboardBlockSets != null;
   }

   @Nonnull
   class="kw">public IntList getBlockTypeBlackboardBlockSets() {
      if (this.blockSensorResetBlockSets != null) {
         this.blockSensorResetBlockSets
            .forEach(
               var1x -> {
                  if (!this.blackboardBlockSets.contains(var1x)) {
                     throw new IllegalStateException(
                        String.format("No block sensors match BlockSet %s in ResetBlockSensors action", BlockSet.getAssetMap().getAsset(var1x).getId())
                     );
                  }
               }
            );
      }

      IntArrayList var1 = new IntArrayList();
      var1.addAll(this.blackboardBlockSets);
      var1.trim();
      class="kw">return IntLists.unmodifiable(var1);
   }

   class="kw">public int getBlockEventSlot(BlockEventType var1, int var2, double var3, boolean var5) {
      if (var5) {
         if (this.playerBlockEventSlotMapper == null) {
            this.playerBlockEventSlotMapper = new EventSlotMapper<>(BlockEventType.class, BlockEventType.VALUES);
         }

         class="kw">return this.playerBlockEventSlotMapper.getEventSlot(var1, var2, var3);
      } else {
         if (this.npcBlockEventSlotMapper == null) {
            this.npcBlockEventSlotMapper = new EventSlotMapper<>(BlockEventType.class, BlockEventType.VALUES);
         }

         class="kw">return this.npcBlockEventSlotMapper.getEventSlot(var1, var2, var3);
      }
   }

   @Nullable
   class="kw">public IntSet getBlockChangeSets(BlockEventType var1) {
      IntSet var2 = this.playerBlockEventSlotMapper != null ? this.playerBlockEventSlotMapper.getEventSets().get(var1) : null;
      IntSet var3 = this.npcBlockEventSlotMapper != null ? this.npcBlockEventSlotMapper.getEventSets().get(var1) : null;
      if (var2 == null && var3 == null) {
         class="kw">return null;
      }

      IntOpenHashSet var4 = new IntOpenHashSet();
      if (var2 != null) {
         var4.addAll(var2);
      }

      if (var3 != null) {
         var4.addAll(var3);
      }

      var4.trim();
      class="kw">return IntSets.unmodifiable(var4);
   }

   class="kw">public int getEntityEventSlot(EntityEventType var1, int var2, double var3, boolean var5) {
      if (var5) {
         if (this.playerEntityEventSlotMapper == null) {
            this.playerEntityEventSlotMapper = new EventSlotMapper<>(EntityEventType.class, EntityEventType.VALUES);
         }

         class="kw">return this.playerEntityEventSlotMapper.getEventSlot(var1, var2, var3);
      } else {
         if (this.npcEntityEventSlotMapper == null) {
            this.npcEntityEventSlotMapper = new EventSlotMapper<>(EntityEventType.class, EntityEventType.VALUES);
         }

         class="kw">return this.npcEntityEventSlotMapper.getEventSlot(var1, var2, var3);
      }
   }

   @Nullable
   class="kw">public IntSet getEventNPCGroups(EntityEventType var1) {
      IntSet var2 = this.playerEntityEventSlotMapper != null ? this.playerEntityEventSlotMapper.getEventSets().get(var1) : null;
      IntSet var3 = this.npcEntityEventSlotMapper != null ? this.npcEntityEventSlotMapper.getEventSets().get(var1) : null;
      if (var2 == null && var3 == null) {
         class="kw">return null;
      }

      IntOpenHashSet var4 = new IntOpenHashSet();
      if (var2 != null) {
         var4.addAll(var2);
      }

      if (var3 != null) {
         var4.addAll(var3);
      }

      var4.trim();
      class="kw">return IntSets.unmodifiable(var4);
   }

   class="kw">public void requireAttitudeOverrideMemory() {
      this.requiresAttitudeOverrideMemory = true;
   }

   class="kw">public void trackInteractions() {
      this.trackInteractions = true;
   }

   class="kw">public boolean isTrackInteractions() {
      class="kw">return this.trackInteractions;
   }

   class="kw">public boolean requiresAttitudeOverrideMemory() {
      class="kw">return this.requiresAttitudeOverrideMemory;
   }

   class="kw">public void setCurrentInstructionContext(InstructionType var1) {
      this.currentInstructionContext = var1;
   }

   class="kw">public InstructionType getCurrentInstructionContext() {
      class="kw">return this.currentInstructionContext;
   }

   class="kw">public ComponentContext getCurrentComponentContext() {
      class="kw">return this.currentComponentContext;
   }

   class="kw">public void setCurrentComponentContext(ComponentContext var1) {
      this.currentComponentContext = var1;
   }

   @Nullable
   class="kw">public RoleStats getRoleStats() {
      class="kw">return this.roleStats;
   }

   class="kw">public int getNextAttackIndex() {
      class="kw">return this.currentAttackIndex++;
   }

   class="kw">public int getValueStoreStringSlot(String var1) {
      if (this.valueStoreBuilder == null) {
         this.valueStoreBuilder = new ValueStore.Builder();
      }

      class="kw">return this.valueStoreBuilder.getStringSlot(var1);
   }

   class="kw">public int getValueStoreIntSlot(String var1) {
      if (this.valueStoreBuilder == null) {
         this.valueStoreBuilder = new ValueStore.Builder();
      }

      class="kw">return this.valueStoreBuilder.getIntSlot(var1);
   }

   class="kw">public int getValueStoreDoubleSlot(String var1) {
      if (this.valueStoreBuilder == null) {
         this.valueStoreBuilder = new ValueStore.Builder();
      }

      class="kw">return this.valueStoreBuilder.getDoubleSlot(var1);
   }

   class="kw">public ValueStore.Builder getValueStoreBuilder() {
      class="kw">return this.valueStoreBuilder;
   }

   @Nullable
   class="kw">public String getCurrentStateName() {
      class="kw">return this.stateStack.peek();
   }

   class="kw">public void pushCurrentStateName(@Nonnull String var1) {
      this.stateStack.push(var1);
   }

   class="kw">public void popCurrentStateName() {
      this.stateStack.pop();
   }

   @Nullable
   class="kw">private class="kw">static Vector3d[] allocatePositionSlots(@Nonnull SlotMapper var0) {
      int var1 = var0.slotCount();
      if (var1 == 0) {
         class="kw">return null;
      }

      Vector3d[] var2 = new Vector3d[var1];

      for (int var3 = 0; var3 < var2.length; var3++) {
         var2[var3] = new Vector3d();
      }

      class="kw">return var2;
   }
}