public FuzzyBlockState getFuzzyMatcher() { return updateField(emptyFuzzy, () -> new FuzzyBlockState(this)); }
/** * Gets the default state of this block type. * * @return The default state */ public BlockState getDefaultState() { return updateField(defaultState, () -> { BlockState defaultState = new ArrayList<>(getBlockStatesMap().values()).get(0); if (values != null) { defaultState = values.apply(defaultState); } return defaultState; }); }
private Map<Map<Property<?>, Object>, BlockState> getBlockStatesMap() { return updateField(blockStatesMap, () -> BlockState.generateStateMap(this)); }
/** * Gets the properties of this BlockType in a {@code key->property} mapping. * * @return The properties map */ public Map<String, ? extends Property<?>> getPropertyMap() { return updateField(properties, () -> ImmutableMap.copyOf(WorldEdit.getInstance().getPlatformManager() .queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getProperties(this))); }
/** * Get the material for this BlockType. * * @return The material */ public BlockMaterial getMaterial() { return updateField(blockMaterial, () -> WorldEdit.getInstance().getPlatformManager() .queryCapability(Capability.GAME_HOOKS).getRegistries().getBlockRegistry().getMaterial(this)); }