RuleExceptionResolver class

Пакет: com.hypixel.hytale.builtin.triggervolumes.effect.builtin.rules

Файл: com/hypixel/hytale/builtin/triggervolumes/effect/builtin/rules/RuleExceptionResolver.java

Поля (5)

МодификаторыТипИмя
int var10
AssetStore var3
BlockTypeAssetMap var3
BlockTypeAssetMap var4
int var8

Методы (10)

МодификаторыВозвратСигнатура
static void collectBlockIdsvoid collectBlockIds(@Nonnull String[] var0, @Nonnull AssetTagMatcher var1, @Nonnull IntSet var2)
static void collectItemKeysvoid collectItemKeys(@Nonnull String[] var0, @Nonnull AssetTagMatcher var1, @Nonnull Set<String> var2)
for for(String var13 : var0)
for for(String var8 : var0)
for for(String var7 : var0)
if if(var2 == null)
if if(var3 == null)
if if(var0.length > 0)
if if(var8 != Integer.MIN_VALUE)
static boolean isBlockExceptedboolean isBlockExcepted(@Nonnull String[] var0, @Nonnull AssetTagMatcher var1, @Nullable String var2)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.triggervolumes.effect.builtin.rules;

class="kw">import com.hypixel.hytale.assetstore.AssetStore;
class="kw">import com.hypixel.hytale.assetstore.map.BlockTypeAssetMap;
class="kw">import com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType;
class="kw">import com.hypixel.hytale.server.core.asset.type.item.config.Item;
class="kw">import com.hypixel.hytale.server.core.prefab.selection.mask.BlockFilter;
class="kw">import it.unimi.dsi.fastutil.ints.IntSet;
class="kw">import java.util.Collections;
class="kw">import java.util.Set;
class="kw">import javax.annotation.Nonnull;
class="kw">import javax.annotation.Nullable;

class="kw">final class RuleExceptionResolver {
   class="kw">private RuleExceptionResolver() {
   }

   class="kw">static boolean isBlockExcepted(@Nonnull String[] var0, @Nonnull AssetTagMatcher var1, @Nullable String var2) {
      if (var2 == null) {
         class="kw">return false;
      }

      AssetStore var3 = BlockType.getAssetStore();
      if (var3 == null) {
         for (String var13 : var0) {
            if (var13.equals(var2)) {
               class="kw">return true;
            }
         }

         class="kw">return false;
      } else {
         BlockTypeAssetMap var4 = (BlockTypeAssetMap<String, BlockType>)var3.getAssetMap();
         if (var0.length > 0) {
            for (String var8 : var0) {
               if (var4.getSubKeys(var8).contains(var2)) {
                  class="kw">return true;
               }
            }

            int var10 = var4.getIndexOrDefault(var2, Integer.MIN_VALUE);
            if (var10 != Integer.MIN_VALUE && BlockFilter.parseBlocks(var0).contains(var10)) {
               class="kw">return true;
            }
         }

         class="kw">return !var1.isEmpty() && var1.matches(var2, var4);
      }
   }

   class="kw">static void collectBlockIds(@Nonnull String[] var0, @Nonnull AssetTagMatcher var1, @Nonnull IntSet var2) {
      BlockTypeAssetMap var3 = BlockType.getAssetMap();

      for (String var7 : var0) {
         int var8 = var3.getIndexOrDefault(var7, Integer.MIN_VALUE);
         if (var8 != Integer.MIN_VALUE) {
            var2.add(var8);
         }
      }

      var1.collectIndexes(var3, var2);
   }

   class="kw">static void collectItemKeys(@Nonnull String[] var0, @Nonnull AssetTagMatcher var1, @Nonnull Set<String> var2) {
      Collections.addAll(var2, var0);
      var1.collectKeys(Item.getAssetMap(), var2);
   }
}