mirror of
https://github.com/Jacobwasbeast/LegacyWeaveLoader.git
synced 2026-06-09 14:31:53 +00:00
feat(blockstates): rotation profiles and placement tracking
This commit is contained in:
@@ -52,6 +52,19 @@ public enum SoundType
|
||||
Snow = 9
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Rotation/profile mapping used when resolving blockstate variants.
|
||||
/// </summary>
|
||||
public enum BlockRotationProfile
|
||||
{
|
||||
None = 0,
|
||||
Facing = 1,
|
||||
WallSign = 2,
|
||||
StandingSign = 3,
|
||||
Trapdoor = 4,
|
||||
Door = 5
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fluent builder for defining block properties.
|
||||
/// </summary>
|
||||
@@ -73,7 +86,10 @@ public class BlockProperties
|
||||
internal ToolType RequiredToolValue = ToolType.None;
|
||||
internal bool AcceptsRedstonePowerValue;
|
||||
internal List<Assets.ModelBox>? ModelBoxes;
|
||||
internal Dictionary<string, List<Assets.ModelBox>>? ModelVariants;
|
||||
internal bool ModelIsFullCube;
|
||||
internal BlockRotationProfile RotationProfileValue = BlockRotationProfile.None;
|
||||
internal string? BlockStateValue;
|
||||
|
||||
public BlockProperties Material(MaterialType material) { MaterialValue = material; return this; }
|
||||
public BlockProperties Hardness(float hardness) { HardnessValue = hardness; return this; }
|
||||
@@ -106,4 +122,8 @@ public class BlockProperties
|
||||
public BlockProperties RequiredTool(ToolType tool) { RequiredToolValue = tool; return this; }
|
||||
/// <summary>Marks the block as one that can receive redstone power. Stored for future block callbacks.</summary>
|
||||
public BlockProperties AcceptsRedstonePower(bool accepts = true) { AcceptsRedstonePowerValue = accepts; return this; }
|
||||
/// <summary>Optional blockstate JSON name (e.g. "examplemod:ruby_chair").</summary>
|
||||
public BlockProperties BlockState(string blockStateName) { BlockStateValue = blockStateName; return this; }
|
||||
/// <summary>Rotation/profile mapping for blockstate variants.</summary>
|
||||
public BlockProperties RotationProfile(BlockRotationProfile profile) { RotationProfileValue = profile; return this; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user