File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
src/main/resources/forge-1.15.2/utils Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 3535<#function toBlockPos x y z >
3636 <#return "new BlockPos(" + opt.removeParentheses(x) + "," + opt.removeParentheses(y) + "," + opt.removeParentheses(z) +")" >
3737</#function >
38+
39+ <#function toPlacedFeature featureType featureConfig placement="" >
40+ <#local placementPattern = r'\$([^$ ]+)\$'>
41+ <#local placementMatches = placement?matches(placementPattern) >
42+ <#local hasHardcodedElements = (placementMatches?size > 0)>
43+ <#local nonHardcodedElements = placement >
44+
45+ <#if hasHardcodedElements >
46+ <#local nonHardcodedElements = placement?replace(placementPattern, "", "r") >
47+ </#if >
48+
49+ <#if featureType == "placed_feature_inline" >
50+ <#return featureConfig >
51+ <#else >
52+ <#if featureType == "configured_feature_reference" && placement == "" >
53+ <#return featureConfig >
54+ <#elseif featureType == "configured_feature_reference" >
55+ <#return featureConfig + nonHardcodedElements >
56+ <#elseif placement == "" >
57+ <#return generator.map(featureType, "features", 3) + '.withConfiguration(' + featureConfig + ')' >
58+ <#else >
59+ <#return generator.map(featureType, "features", 3) + '.withConfiguration(' + featureConfig + ')' + nonHardcodedElements >
60+ </#if >
61+ </#if >
62+ </#function >
Original file line number Diff line number Diff line change 370370 </#if >
371371</#function >
372372
373+ <#function toStateProvidertoFeatureState block >
374+ <#return toFeatureState(mappedBlockToBlockStateProvider(block)) >
375+ </#function >
376+
373377<#function toStatetoFeatureState block >
374378 <#return toFeatureState(mappedBlockToBlockStateCode(block)) >
375379</#function >
You can’t perform that action at this time.
0 commit comments