Skip to content

Commit

Permalink
Fix #456
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldorion committed Aug 22, 2023
1 parent 073bb38 commit 1211c78
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -2,6 +2,7 @@

## 1.9.7
* [Bugfix #454] World dependency caused a build error in custom commands
* [Bugfix #456] Fix several registries calls causing build errors

## 1.9.6
* [Bugfix #431] Get enchantment level caused a build error
Expand Down
2 changes: 1 addition & 1 deletion src/fabric-1.20.1/procedures/block_is_tagged_in.java.ftl
@@ -1,3 +1,3 @@
<#include "mcelements.ftl">
<#include "mcitems.ftl">
(${mappedBlockToBlockStateCode(input$a)}.is(TagKey.create(Registry.BLOCK_REGISTRY, ${toResourceLocation(input$b)})))
(${mappedBlockToBlockStateCode(input$a)}.is(TagKey.create(Registries.BLOCK, ${toResourceLocation(input$b)})))
@@ -1,6 +1,6 @@
(new Object() {
public double getSubmergedHeight(Entity _entity) {
for (TagKey<Fluid> _fldtag : Registry.FLUID.getTagNames().toList()) {
for (TagKey<Fluid> _fldtag : Registries.FLUID.getTagNames().toList()) {
if (_entity.level().getFluidState(_entity.blockPosition()).is(_fldtag))
return _entity.getFluidHeight(_fldtag);
}
Expand Down
4 changes: 2 additions & 2 deletions src/fabric-1.20.1/templates/feature/feature.java.ftl
Expand Up @@ -48,7 +48,7 @@ public class ${name}Feature extends ${generator.map(featuretype, "features")} {
<#if data.restrictionBiomes?has_content>
includeByKey(
<#list data.restrictionBiomes as restrictionBiome>
ResourceKey.create( Registries.BIOME, new ResourceLocation("${restrictionBiome}"))<#if restrictionBiome?has_next>,</#if>
ResourceKey.create(Registries.BIOME, new ResourceLocation("${restrictionBiome}"))<#if restrictionBiome?has_next>,</#if>
</#list>
)
<#else>
Expand All @@ -65,7 +65,7 @@ public class ${name}Feature extends ${generator.map(featuretype, "features")} {
<#elseif dimension == "End">
Level.END
<#else>
ResourceKey.create(Registry.DIMENSION_REGISTRY,
ResourceKey.create(Registries.DIMENSION,
new ResourceLocation("${generator.getResourceLocationForModElement(dimension.toString().replace("CUSTOM:", ""))}"))
</#if><#sep>,
</#list>
Expand Down
4 changes: 2 additions & 2 deletions src/fabric-1.20.1/templates/plant/plantgen.java.ftl
Expand Up @@ -42,7 +42,7 @@ public class ${name}Feature extends RandomPatchFeature {
<#if data.restrictionBiomes?has_content>
includeByKey(
<#list data.restrictionBiomes as restrictionBiome>
ResourceKey.create( Registries.BIOME, new ResourceLocation("${restrictionBiome}"))<#if restrictionBiome?has_next>,</#if>
ResourceKey.create(Registries.BIOME, new ResourceLocation("${restrictionBiome}"))<#if restrictionBiome?has_next>,</#if>
</#list>
)
<#else>
Expand All @@ -58,7 +58,7 @@ public class ${name}Feature extends RandomPatchFeature {
<#elseif worldType == "End">
Level.END
<#else>
ResourceKey.create(Registry.DIMENSION_REGISTRY,
ResourceKey.create(Registries.DIMENSION,
new ResourceLocation("${generator.getResourceLocationForModElement(worldType.toString().replace("CUSTOM:", ""))}"))
</#if><#sep>,
</#list>
Expand Down
4 changes: 2 additions & 2 deletions src/fabric-1.20.1/templates/structure.java.ftl
Expand Up @@ -43,7 +43,7 @@ public class ${name}Feature extends Feature<NoneFeatureConfiguration> {
<#if data.restrictionBiomes?has_content>
includeByKey(
<#list data.restrictionBiomes as restrictionBiome>
ResourceKey.create( Registries.BIOME, new ResourceLocation("${restrictionBiome}"))<#if restrictionBiome?has_next>,</#if>
ResourceKey.create(Registries.BIOME, new ResourceLocation("${restrictionBiome}"))<#if restrictionBiome?has_next>,</#if>
</#list>
)
<#else>
Expand All @@ -59,7 +59,7 @@ public class ${name}Feature extends Feature<NoneFeatureConfiguration> {
<#elseif worldType == "End">
Level.END
<#else>
ResourceKey.create(Registry.DIMENSION_REGISTRY,
ResourceKey.create(Registries.DIMENSION,
new ResourceLocation("${generator.getResourceLocationForModElement(worldType.toString().replace("CUSTOM:", ""))}"))
</#if><#sep>,
</#list>
Expand Down

0 comments on commit 1211c78

Please sign in to comment.