Json:block:worldvariantgroups: Difference between revisions
m (Add the modding navbox) |
(Document loadFromPropertiesCombine) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
The world properties are stored in the <code>assets/survival/worldproperties</code> folder. They are used to help | The world properties are stored in the <code>assets/survival/worldproperties</code> folder. They are used to help fill in the [[Modding:Registry_Object_JSON_Parsing#Enumerating_variants|variantgroups]] field. Instead of directly specifying every state in the variant group, the states can be loaded from a world property through the <code>loadFromProperties</code> key. The states from multiple world properties can be added with the <code>loadFromPropertiesCombine</code> key, which takes an array of strings. The <code>states</code> key can still be optionally added to the variant group to specify additional states. | ||
For example, the following creates a variant group named orientation. It contains 5 states. <code>north</code>, <code>east</code>, <code>south</code>, and <code>west</code> are loaded from the <code>abstract/horizontalorientation</code> world property. <code>up</code> is added to the list of states. | For example, the following creates a variant group named orientation. It contains 5 states. <code>north</code>, <code>east</code>, <code>south</code>, and <code>west</code> are loaded from the <code>abstract/horizontalorientation</code> world property. <code>up</code> is added to the list of states. | ||
Line 8: | Line 8: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Unwanted variant states can be filtered out with the <code>skipVariants</code> | Unwanted variant states can be [[Modding:Registry_Object_JSON_Parsing#Filtering_out_variants|filtered]] out with the <code>skipVariants</code> property. Or all states that do not match an expression can be filtered out with the <code>allowedVariants</code> property. | ||
<table class="wikitable"> | <table class="wikitable"> | ||
Line 21: | Line 21: | ||
<tr> | <tr> | ||
<td>abstract/coating</td> | <td>abstract/coating</td> | ||
<td style="font-style: italic;">n, e, s, w, u, d, ud, ns, ew, nd, ed, sd, wd, su, wu, nu, eu, es, sw, nw, ne, nwd, ned, esd, swd, nwu, neu, esu, swu, nsd, ewd, sud, wud, nud, eud, nsu, ewu, nes, esw, nsw, new, newd, nesd, eswd, nswd, eswu, nswu, newu, nesu, nesw, ewud, nsud, neud, esud, swud, nwud, neswd, neswu, newud, nesud, eswud, nswud, neswud</td> | <td style="font-style: italic;">n, e, s, w, u, d, ud, ns, ew, nd, ed, sd, wd, su, wu, nu, eu, es, sw, nw, ne, nwd, ned, esd, swd, nwu, neu, esu, swu, nsd, ewd, sud, wud, nud, eud, nsu, ewu, nes, esw, nsw, new, newd, nesd, eswd, nswd, eswu, nswu, newu, nesu, nesw, ewud, nsud, neud, esud, swud, nwud, neswd, neswu, newud, nesud, eswud, nswud, neswud</td> | ||
</tr> | </tr> | ||
<tr> | <tr> |
Revision as of 07:06, 24 November 2023
The world properties are stored in the assets/survival/worldproperties
folder. They are used to help fill in the variantgroups field. Instead of directly specifying every state in the variant group, the states can be loaded from a world property through the loadFromProperties
key. The states from multiple world properties can be added with the loadFromPropertiesCombine
key, which takes an array of strings. The states
key can still be optionally added to the variant group to specify additional states.
For example, the following creates a variant group named orientation. It contains 5 states. north
, east
, south
, and west
are loaded from the abstract/horizontalorientation
world property. up
is added to the list of states.
variantgroups: [
{ code: "orientation", states: ["up"], loadFromProperties: "abstract/horizontalorientation" }
],
Unwanted variant states can be filtered out with the skipVariants
property. Or all states that do not match an expression can be filtered out with the allowedVariants
property.
Name | States |
---|---|
abstract/alloy | - |
abstract/coating | n, e, s, w, u, d, ud, ns, ew, nd, ed, sd, wd, su, wu, nu, eu, es, sw, nw, ne, nwd, ned, esd, swd, nwu, neu, esu, swu, nsd, ewd, sud, wud, nud, eud, nsu, ewu, nes, esw, nsw, new, newd, nesd, eswd, nswd, eswu, nswu, newu, nesu, nesw, ewud, nsud, neud, esud, swud, nwud, neswd, neswu, newud, nesud, eswud, nswud, neswud |
abstract/fertility | verylow, low, medium, compost, high |
abstract/grasscoverage | none, verysparse, sparse, normal |
abstract/horizontalorientation | north, east, south, west |
abstract/rockgroup | - |
abstract/verticalorientation | up, down |
block/flower | catmint, cornflower, forgetmenot, edelweiss, heather, horsetail, orangemallow, wilddaisy, westerngorse, cowparsley, goldenpoppy, lilyofthevalley, woad, redtopgrass |
block/fruit | blueberry, cranberry, redcurrant, whitecurrant, blackcurrant, saguaro, pineapple, redapple, pinkapple, yellowapple, cherry, peach, pear, orange, mango, breadfruit, lychee, pomegranate |
block/grass | - |
block/herb | basil, chamomile, cilantro, lavender, marjoram, mint, saffron, sage, thyme |
block/metal | bismuth, bismuthbronze, blackbronze, brass, chromium, copper, cupronickel, electrum, gold, iron, meteoriciron, lead, molybdochalkos, platinum, nickel, silver, stainlesssteel, steel, tin, tinbronze, titanium, uranium, zinc |
block/mushroom | flyagaric, fieldmushroom, almondmushroom, bitterbolete, blacktrumpet, chanterelle, commonmorel, deathcap, devilstooth, devilbolete, earthball, elfinsaddle, golddropmilkcap, greencrackedrussula, indigomilkcap, jackolantern, kingbolete, lobster, orangeoakbolete, paddystraw, puffball, redwinecap, saffronmilkcap, violetwebcap, witchhat, beardedtooth, chickenofthewoods, dryadsaddle, pinkoyster, tinderhoof, whiteoyster, reishi, funeralbell, deerear, livermushroom, pinkbonnet, shiitake |
block/ore-gem-cut | diamond, emerald, peridot |
block/ore-gem-rough | diamond,emerald,olivine_peridot |
block/ore-graded | nativecopper,limonite,quartz_nativegold,galena,cassiterite,chromite,ilmenite,sphalerite,quartz_nativesilver,galena_nativesilver,bismuthinite,magnetite,hematite,malachite,pentlandite,uranium,wolframite,rhodochrosite |
block/ore-nugget | nativecopper,limonite,nativegold,galena,cassiterite,chromite,ilmenite,sphalerite,nativesilver,bismuthinite,magnetite,hematite,malachite,pentlandite,uranium,wolframite,rhodochrosite |
block/ore-ungraded | alum,lapislazuli,corundum,anthracite,borax,cinnabar,lignite,bituminouscoal,sylvite,quartz,olivine,sulfur,fluorite,graphite,kernite,phosphorite |
block/painting | howl,elk,underwater,prey,forestdawn,fishandtherain,bogfort,castleruin,cow,hunterintheforest,seraph,sleepingwolf,sunkenruin,traveler,oldvillage,lastday,sodhouse |
block/rock | andesite,chalk,chert,conglomerate,limestone,claystone,granite,sandstone,shale,basalt,peridotite,phyllite,slate,bauxite |
block/rockwithdeposit | andesite,chalk,chert,conglomerate,limestone,claystone,granite,sandstone,shale,basalt,peridotite,phyllite,slate,obsidian,kimberlite,scoria,tuff,bauxite,halite,suevite,whitemarble,redmarble,greenmarble |
block/tallgrass | veryshort,short,mediumshort,medium,tall,verytall,eaten |
block/toolmetal | bismuth,bismuthbronze,blackbronze,brass,copper,gold,iron,meteoriciron,lead,molybdochalkos,silver,steel,tinbronze |
block/wood | birch,oak,maple,pine,acacia,kapok,baldcypress,larch,redwood,ebony,walnut,purpleheart |
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |