Skip to content

Commit

Permalink
Minor updates for 1.18.2.
Browse files Browse the repository at this point in the history
* Update dependencies
* Only provide one panorama after all
- Update the Vistas panorama for Traverse
* Revamped recipe gen now I know how
- Add some more biome tags for mod compatibility
  • Loading branch information
gniftygnome committed Sep 1, 2022
1 parent 1070da2 commit f490289
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 115 deletions.
26 changes: 0 additions & 26 deletions client/src/main/resources/assets/traverse/panoramas.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
{
"autumnal_woods_woodlands_and_rolling_hills": {
"musicSound": {
"sound": "minecraft:music.menu"
},
"cubemaps": [
{
"cubemapId": "traverse:textures/gui/panorama/autumnal_woodlands",
"visualControl": {
"addedY": 0.0
}
}
]
},
"coniferous": {
"musicSound": {
"sound": "minecraft:music.menu"
},
"cubemaps": [
{
"cubemapId": "traverse:textures/gui/panorama/coniferous",
"visualControl": {
"addedY": 0.0
}
}
]
},
"swamplands": {
"musicSound": {
"sound": "minecraft:music.menu"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public TraverseBiomeTagProvider(FabricDataGenerator dataGenerator) {

@Override
protected void generateTags() {
// biome categories
/*
* Vanilla biome categories
*/
this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), BiomeTags.IS_FOREST.id()))
.add(TraverseBiomes.AUTUMNAL_WOODS)
.add(TraverseBiomes.CONIFEROUS_FOREST)
Expand All @@ -25,16 +27,50 @@ protected void generateTags() {
this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), BiomeTags.IS_TAIGA.id()))
.add(TraverseBiomes.SNOWY_CONIFEROUS_FOREST);


/*
* Conventional biome categories
*/
this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.CLIMATE_TEMPERATE.id()))
.add(TraverseBiomes.AUTUMNAL_WOODS)
.add(TraverseBiomes.CONIFEROUS_FOREST)
.add(TraverseBiomes.FLATLANDS)
.add(TraverseBiomes.LUSH_SWAMP)
.add(TraverseBiomes.WOODLANDS);

this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.DESERT.id()))
.add(TraverseBiomes.DESERT_SHRUBLAND);

this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.PLAINS.id()))
.add(TraverseBiomes.FLATLANDS);

this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.IN_OVERWORLD.id()))
.add(TraverseBiomes.AUTUMNAL_WOODS)
.add(TraverseBiomes.CONIFEROUS_FOREST)
.add(TraverseBiomes.DESERT_SHRUBLAND)
.add(TraverseBiomes.FLATLANDS)
.add(TraverseBiomes.LUSH_SWAMP)
.add(TraverseBiomes.SNOWY_CONIFEROUS_FOREST)
.add(TraverseBiomes.WOODLANDS);

this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.SWAMP.id()))
.add(TraverseBiomes.LUSH_SWAMP);

// biome structure generation tags
this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.TREE_CONIFEROUS.id()))
.add(TraverseBiomes.CONIFEROUS_FOREST);

this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), ConventionalBiomeTags.TREE_DECIDUOUS.id()))
.add(TraverseBiomes.AUTUMNAL_WOODS)
.add(TraverseBiomes.LUSH_SWAMP)
.add(TraverseBiomes.WOODLANDS);


/*
* Biome structure generation tags
*/
this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), BiomeTags.IGLOO_HAS_STRUCTURE.id()))
.add(TraverseBiomes.SNOWY_CONIFEROUS_FOREST);

this.getOrCreateTagBuilder(TagKey.of(this.registry.getKey(), BiomeTags.MINESHAFT_HAS_STRUCTURE.id()))
.add(TraverseBiomes.DESERT_SHRUBLAND)
.add(TraverseBiomes.FLATLANDS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@
import com.terraformersmc.traverse.tag.TraverseItemTags;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricRecipeProvider;
import net.minecraft.advancement.criterion.EnterBlockCriterion;
import net.minecraft.advancement.criterion.InventoryChangedCriterion;
import net.minecraft.block.Blocks;
import net.minecraft.data.server.recipe.RecipeJsonProvider;
import net.minecraft.data.server.recipe.ShapedRecipeJsonBuilder;
import net.minecraft.data.server.recipe.ShapelessRecipeJsonBuilder;
import net.minecraft.item.Items;
import net.minecraft.predicate.item.ItemPredicate;
import net.minecraft.recipe.Ingredient;
import net.minecraft.util.Identifier;

import java.util.function.Consumer;
Expand All @@ -25,93 +21,39 @@ public TraverseRecipeProvider(FabricDataGenerator dataGenerator) {

@Override
protected void generateRecipes(Consumer<RecipeJsonProvider> exporter) {
new ShapedRecipeJsonBuilder(TraverseBoatTypes.fir.getItem(), 1)
.group("boat")
.pattern("P P")
.pattern("PPP")
.input('P', TraverseBlocks.FIR_PLANKS)
.criterion("in_water", EnterBlockCriterion.Conditions.block(Blocks.WATER))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_boat"));

new ShapelessRecipeJsonBuilder(TraverseBlocks.FIR_BUTTON, 1)
.group("wooden_button")
.input(TraverseBlocks.FIR_PLANKS)
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_button"));

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_DOOR, 3)
.group("wooden_door")
.pattern("PP")
.pattern("PP")
.pattern("PP")
.input('P', TraverseBlocks.FIR_PLANKS)
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_door"));

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_FENCE, 3)
.group("wooden_fence")
.pattern("PSP")
.pattern("PSP")
.input('P', TraverseBlocks.FIR_PLANKS)
.input('S', Items.STICK)
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_fence"));

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_FENCE_GATE, 1)
.group("wooden_fence_gate")
.pattern("SPS")
.pattern("SPS")
.input('P', TraverseBlocks.FIR_PLANKS)
.input('S', Items.STICK)
offerBoatRecipe(exporter, TraverseBoatTypes.fir.getItem(), TraverseBlocks.FIR_PLANKS);

offerSingleOutputShapelessRecipe(exporter, TraverseBlocks.FIR_BUTTON, TraverseBlocks.FIR_PLANKS, "wooden_button");

createDoorRecipe(TraverseBlocks.FIR_DOOR, Ingredient.ofItems(TraverseBlocks.FIR_PLANKS))
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_fence_gate"));

new ShapelessRecipeJsonBuilder(TraverseBlocks.FIR_PLANKS, 4)
.group("planks")
.input(TraverseItemTags.FIR_LOGS)
.criterion("has_logs", InventoryChangedCriterion.Conditions.items(ItemPredicate.Builder.create().tag(TraverseItemTags.FIR_LOGS).build()))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_planks"));

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_PRESSURE_PLATE, 1)
.group("wooden_pressure_plate")
.pattern("PP")
.input('P', TraverseBlocks.FIR_PLANKS)
.offerTo(exporter);

createFenceRecipe(TraverseBlocks.FIR_FENCE, Ingredient.ofItems(TraverseBlocks.FIR_PLANKS))
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_pressure_plate"));

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_SIGN_ITEM, 3)
.group("wooden_signs")
.pattern("PPP")
.pattern("PPP")
.pattern(" S ")
.input('P', TraverseBlocks.FIR_PLANKS)
.input('S', Items.STICK)
.offerTo(exporter);

createFenceGateRecipe(TraverseBlocks.FIR_FENCE_GATE, Ingredient.ofItems(TraverseBlocks.FIR_PLANKS))
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_sign"));
.offerTo(exporter);

offerPlanksRecipe(exporter, TraverseBlocks.FIR_PLANKS, TraverseItemTags.FIR_LOGS);

createPressurePlateRecipe(exporter, TraverseBlocks.FIR_PRESSURE_PLATE, TraverseBlocks.FIR_PLANKS);

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_SLAB, 6)
.group("wooden_slab")
.pattern("PPP")
.input('P', TraverseBlocks.FIR_PLANKS)
createSignRecipe(TraverseBlocks.FIR_SIGN, Ingredient.ofItems(TraverseBlocks.FIR_PLANKS))
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_slab"));

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_STAIRS, 4)
.group("wooden_stairs")
.pattern("P ")
.pattern("PP ")
.pattern("PPP")
.input('P', TraverseBlocks.FIR_PLANKS)
.offerTo(exporter);

offerSlabRecipe(exporter, TraverseBlocks.FIR_SLAB, TraverseBlocks.FIR_PLANKS);

createStairsRecipe(TraverseBlocks.FIR_STAIRS, Ingredient.ofItems(TraverseBlocks.FIR_PLANKS))
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_stairs"));
.offerTo(exporter);

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_TRAPDOOR, 2)
.group("wooden_trapdoor")
.pattern("PPP")
.pattern("PPP")
.input('P', TraverseBlocks.FIR_PLANKS)
createTrapdoorRecipe(TraverseBlocks.FIR_TRAPDOOR, Ingredient.ofItems(TraverseBlocks.FIR_PLANKS))
.criterion("has_planks", InventoryChangedCriterion.Conditions.items(TraverseBlocks.FIR_PLANKS))
.offerTo(exporter, new Identifier(Traverse.MOD_ID, "fir_trapdoor"));
.offerTo(exporter);

new ShapedRecipeJsonBuilder(TraverseBlocks.FIR_WOOD, 3)
.group("bark")
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ maven_group=com.terraformersmc
archive_name=traverse

minecraft_version=1.18.2
yarn_mappings=1.18.2+build.3
loader_version=0.14.8
yarn_mappings=1.18.2+build.4
loader_version=0.14.9
terraform_biome_remapper_api_version=3.1.0
terraform_config_api_version=3.1.0
terraform_surfaces_api_version=3.1.0
terraform_tree_api_version=3.1.0
terraform_wood_api_version=3.1.0
fabric_version=0.57.0+1.18.2
fabric_version=0.58.0+1.18.2

# TerraBlender for worldgen module and testing
terrablender_version=1.18.2-1.1.0.102
Expand Down

0 comments on commit f490289

Please sign in to comment.