Package guideme.compiler.tags
Class MdxAttrs
java.lang.Object
guideme.compiler.tags.MdxAttrs
utilities for dealing with attributes of
MdxJsxElementFields
.-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.level.block.state.BlockState
applyBlockStateProperties
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, net.minecraft.world.level.block.state.BlockState state) static boolean
getBoolean
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, boolean defaultValue) static ColorValue
getColor
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, ColorValue defaultColor) static net.minecraft.nbt.CompoundTag
getCompoundTag
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute, net.minecraft.nbt.CompoundTag defaultValue) static <T extends Enum<T> & net.minecraft.util.StringRepresentable>
TgetEnum
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, T defaultValue) static float
getFloat
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, float defaultValue) static void
getFloatPos
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, org.joml.Vector3f out) static int
getInt
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, int defaultValue) static net.minecraft.core.BlockPos
getPos
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el) static @Nullable org.apache.commons.lang3.tuple.Pair
<net.minecraft.resources.ResourceLocation, net.minecraft.world.level.block.Block> getRequiredBlockAndId
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) static @Nullable org.apache.commons.lang3.tuple.Pair
<net.minecraft.resources.ResourceLocation, net.minecraft.world.entity.EntityType<?>> getRequiredEntityTypeAndId
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) static @Nullable net.minecraft.resources.ResourceLocation
getRequiredId
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) static net.minecraft.world.item.Item
getRequiredItem
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) static @Nullable org.apache.commons.lang3.tuple.Pair
<net.minecraft.resources.ResourceLocation, net.minecraft.world.item.Item> getRequiredItemAndId
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) static String
getString
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute, String defaultValue) static @Nullable org.joml.Vector2f
getVector2
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, @Nullable org.joml.Vector2fc defaultValue) static @Nullable org.joml.Vector3f
getVector3
(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, @Nullable org.joml.Vector3fc defaultValue)
-
Method Details
-
getString
@Contract("_, _, _, _, !null -> !null") public static String getString(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute, String defaultValue) -
getCompoundTag
@Contract("_, _, _, _, !null -> !null") public static net.minecraft.nbt.CompoundTag getCompoundTag(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute, net.minecraft.nbt.CompoundTag defaultValue) -
getRequiredId
@Nullable public static @Nullable net.minecraft.resources.ResourceLocation getRequiredId(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) -
getRequiredBlockAndId
@Nullable public static @Nullable org.apache.commons.lang3.tuple.Pair<net.minecraft.resources.ResourceLocation,net.minecraft.world.level.block.Block> getRequiredBlockAndId(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) -
getRequiredItemAndId
@Nullable public static @Nullable org.apache.commons.lang3.tuple.Pair<net.minecraft.resources.ResourceLocation,net.minecraft.world.item.Item> getRequiredItemAndId(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) -
getRequiredEntityTypeAndId
@Nullable public static @Nullable org.apache.commons.lang3.tuple.Pair<net.minecraft.resources.ResourceLocation,net.minecraft.world.entity.EntityType<?>> getRequiredEntityTypeAndId(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) -
getRequiredItem
public static net.minecraft.world.item.Item getRequiredItem(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String attribute) -
getFloat
public static float getFloat(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, float defaultValue) -
getVector3
@Contract("_, _, _, _, !null -> !null") @Nullable public static @Nullable org.joml.Vector3f getVector3(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, @Nullable @Nullable org.joml.Vector3fc defaultValue) -
getVector2
@Contract("_, _, _, _, !null -> !null") @Nullable public static @Nullable org.joml.Vector2f getVector2(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, @Nullable @Nullable org.joml.Vector2fc defaultValue) -
getInt
public static int getInt(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, int defaultValue) -
getEnum
@Nullable public static <T extends Enum<T> & net.minecraft.util.StringRepresentable> T getEnum(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, T defaultValue) -
applyBlockStateProperties
public static net.minecraft.world.level.block.state.BlockState applyBlockStateProperties(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, net.minecraft.world.level.block.state.BlockState state) -
getPos
public static net.minecraft.core.BlockPos getPos(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el) -
getFloatPos
public static void getFloatPos(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, org.joml.Vector3f out) -
getColor
public static ColorValue getColor(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, ColorValue defaultColor) -
getBoolean
public static boolean getBoolean(PageCompiler compiler, LytErrorSink errorSink, guideme.libs.mdast.mdx.model.MdxJsxElementFields el, String name, boolean defaultValue)
-