Skip to content

Commit

Permalink
finish 2.4.9 ig
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Aug 6, 2024
1 parent 29a9f51 commit a3fb207
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 18 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ Put the changelog BELOW the dashes. ANYTHING ABOVE IS IGNORED
- Removed modified water rendering, fixing an issue with Sodium.
- Tumbleweeds no longer render their items at the player's position.
- Fixed issues with certain sounds like Goat Horn Calls in multiplayer.
- Added missing Mossy Mud Bricks recipes to the Crafting Table.
- Added the Stone Chest to Fabric's chests tag.
- Added a config option to toggle Mossy and Cracked Mud Bricks generating in Trail Ruins.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import net.minecraft.data.recipes.ShapelessRecipeBuilder;
import net.minecraft.data.recipes.SimpleCookingRecipeBuilder;
import net.minecraft.data.recipes.SingleItemRecipeBuilder;
import net.minecraft.data.recipes.packs.VanillaRecipeProvider;
import net.minecraft.world.item.Items;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
Expand Down Expand Up @@ -205,6 +204,15 @@ public void buildRecipes(RecipeOutput exporter) {
.unlockedBy("has_moss_block", has(Blocks.MOSS_BLOCK))
.save(exporter, getConversionRecipeName(RegisterBlocks.MOSSY_MUD_BRICKS, Blocks.MOSS_BLOCK));

stairBuilder(
RegisterBlocks.MOSSY_MUD_BRICK_STAIRS,
Ingredient.of(RegisterBlocks.MOSSY_MUD_BRICKS)
).unlockedBy(getHasName(RegisterBlocks.MOSSY_MUD_BRICKS), has(RegisterBlocks.MOSSY_MUD_BRICKS)).save(exporter);

slab(exporter, RecipeCategory.BUILDING_BLOCKS, RegisterBlocks.MOSSY_MUD_BRICK_SLAB, RegisterBlocks.MOSSY_MUD_BRICKS);

wall(exporter, RecipeCategory.MISC, RegisterBlocks.MOSSY_MUD_BRICK_WALL, RegisterBlocks.MOSSY_MUD_BRICKS);

stonecutterResultFromBase(exporter, RecipeCategory.BUILDING_BLOCKS, RegisterBlocks.MOSSY_MUD_BRICK_SLAB, RegisterBlocks.MOSSY_MUD_BRICKS, 2);
stonecutterResultFromBase(exporter, RecipeCategory.BUILDING_BLOCKS, RegisterBlocks.MOSSY_MUD_BRICK_STAIRS, RegisterBlocks.MOSSY_MUD_BRICKS);
stonecutterResultFromBase(exporter, RecipeCategory.DECORATIONS, RegisterBlocks.MOSSY_MUD_BRICK_WALL, RegisterBlocks.MOSSY_MUD_BRICKS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.util.concurrent.CompletableFuture;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.fabricmc.fabric.api.tag.convention.v2.ConventionalBlockTags;
import net.frozenblock.lib.tag.api.FrozenBlockTags;
import net.frozenblock.wilderwild.registry.RegisterBlocks;
import net.frozenblock.wilderwild.tag.WilderBlockTags;
Expand Down Expand Up @@ -56,6 +57,9 @@ private TagKey<Block> getTag(String id) {
}

private void generateCompat() {
this.getOrCreateTagBuilder(ConventionalBlockTags.CHESTS)
.add(RegisterBlocks.STONE_CHEST);

this.getOrCreateTagBuilder(getTag("c:stripped_logs"))
.add(RegisterBlocks.STRIPPED_BAOBAB_LOG)
.add(RegisterBlocks.STRIPPED_CYPRESS_LOG)
Expand Down
5 changes: 5 additions & 0 deletions src/main/generated/data/c/tags/block/chests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"values": [
"wilderwild:stone_chest"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_mossy_mud_bricks": {
"conditions": {
"items": [
{
"items": "wilderwild:mossy_mud_bricks"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "wilderwild:mossy_mud_brick_slab"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_mossy_mud_bricks"
]
],
"rewards": {
"recipes": [
"wilderwild:mossy_mud_brick_slab"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_mossy_mud_bricks": {
"conditions": {
"items": [
{
"items": "wilderwild:mossy_mud_bricks"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "wilderwild:mossy_mud_brick_stairs"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_mossy_mud_bricks"
]
],
"rewards": {
"recipes": [
"wilderwild:mossy_mud_brick_stairs"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_mossy_mud_bricks": {
"conditions": {
"items": [
{
"items": "wilderwild:mossy_mud_bricks"
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "wilderwild:mossy_mud_brick_wall"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_the_recipe",
"has_mossy_mud_bricks"
]
],
"rewards": {
"recipes": [
"wilderwild:mossy_mud_brick_wall"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "wilderwild:mossy_mud_bricks"
}
},
"pattern": [
"###"
],
"result": {
"count": 6,
"id": "wilderwild:mossy_mud_brick_slab"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "minecraft:crafting_shaped",
"category": "building",
"key": {
"#": {
"item": "wilderwild:mossy_mud_bricks"
}
},
"pattern": [
"# ",
"## ",
"###"
],
"result": {
"count": 4,
"id": "wilderwild:mossy_mud_brick_stairs"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"#": {
"item": "wilderwild:mossy_mud_bricks"
}
},
"pattern": [
"###",
"###"
],
"result": {
"count": 6,
"id": "wilderwild:mossy_mud_brick_wall"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public void onSync(WorldgenConfig sync) {
@EntrySyncData("newWitchHuts")
public boolean newWitchHuts = true;

@EntrySyncData("decayTrailRuins")
public boolean decayTrailRuins = true;

public static WorldgenConfig get() {
return get(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,19 @@ public static void setupEntries(@NotNull ConfigCategory category, @NotNull Confi
configInstance
)
);
var decayTrailRuins = category.addEntry(
FrozenClothConfig.syncedEntry(
entryBuilder.startBooleanToggle(text("decay_trail_ruins"), modifiedConfig.decayTrailRuins)
.setDefaultValue(defaultConfig.decayTrailRuins)
.setSaveConsumer(newValue -> config.decayTrailRuins = newValue)
.setTooltip(tooltip("decay_trail_ruins"))
.requireRestart()
.build(),
clazz,
"decayTrailRuins",
configInstance
)
);
var newWitchHuts = category.addEntry(
FrozenClothConfig.syncedEntry(
entryBuilder.startBooleanToggle(text("new_witch_huts"), modifiedConfig.newWitchHuts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import net.frozenblock.wilderwild.config.AmbienceAndMiscConfig;
import net.frozenblock.wilderwild.config.BlockConfig;
import net.frozenblock.wilderwild.config.EntityConfig;
import net.frozenblock.wilderwild.config.WorldgenConfig;
import net.frozenblock.wilderwild.entity.Firefly;
import net.frozenblock.wilderwild.registry.RegisterBlockEntities;
import net.frozenblock.wilderwild.registry.RegisterBlockSoundTypes;
Expand Down Expand Up @@ -309,25 +310,27 @@ public void init() {

BlockEntityWithoutLevelRendererRegistry.register(RegisterBlocks.STONE_CHEST, RegisterBlockEntities.STONE_CHEST);

StructureProcessorApi.addProcessor(
BuiltinStructures.TRAIL_RUINS.location(),
new RuleProcessor(
ImmutableList.of(
new ProcessorRule(new RandomBlockMatchTest(MUD_BRICKS, 0.2F), AlwaysTrueTest.INSTANCE, CRACKED_MUD_BRICKS.defaultBlockState()),
new ProcessorRule(new RandomBlockMatchTest(MUD_BRICKS, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICKS.defaultBlockState())
if (WorldgenConfig.get().decayTrailRuins) {
StructureProcessorApi.addProcessor(
BuiltinStructures.TRAIL_RUINS.location(),
new RuleProcessor(
ImmutableList.of(
new ProcessorRule(new RandomBlockMatchTest(MUD_BRICKS, 0.2F), AlwaysTrueTest.INSTANCE, CRACKED_MUD_BRICKS.defaultBlockState()),
new ProcessorRule(new RandomBlockMatchTest(MUD_BRICKS, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICKS.defaultBlockState())
)
)
)
);
StructureProcessorApi.addProcessor(
BuiltinStructures.TRAIL_RUINS.location(),
new BlockStateRespectingRuleProcessor(
ImmutableList.of(
new BlockStateRespectingProcessorRule(new RandomBlockMatchTest(MUD_BRICK_STAIRS, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICK_STAIRS),
new BlockStateRespectingProcessorRule(new RandomBlockMatchTest(MUD_BRICK_SLAB, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICK_SLAB),
new BlockStateRespectingProcessorRule(new RandomBlockMatchTest(MUD_BRICK_SLAB, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICK_WALL)
);
StructureProcessorApi.addProcessor(
BuiltinStructures.TRAIL_RUINS.location(),
new BlockStateRespectingRuleProcessor(
ImmutableList.of(
new BlockStateRespectingProcessorRule(new RandomBlockMatchTest(MUD_BRICK_STAIRS, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICK_STAIRS),
new BlockStateRespectingProcessorRule(new RandomBlockMatchTest(MUD_BRICK_SLAB, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICK_SLAB),
new BlockStateRespectingProcessorRule(new RandomBlockMatchTest(MUD_BRICK_SLAB, 0.05F), AlwaysTrueTest.INSTANCE, MOSSY_MUD_BRICK_WALL)
)
)
)
);
);
}

if (EntityConfig.get().scorched.scorchedInTrialChambers) {
RandomPoolAliasApi.addTarget(
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/assets/wilderwild/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@
"tooltip.wilderwild.mushroom_generation": "Whether worldgen should use Wilder Wild's or Vanilla's Mushroom generation.",
"option.wilderwild.nether_geyser_generation": "Nether Geyser Generation",
"tooltip.wilderwild.nether_geyser_generation": "Whether Geysers should naturally generate in the Nether.",
"option.wilderwild.decay_trail_ruins": "Decay Trail Ruins",
"tooltip.wilderwild.decay_trail_ruins": "Whether Trail Ruins can generate with Mossy and Cracked Mud Bricks.",
"option.wilderwild.new_witch_huts": "New Witch Huts",
"tooltip.wilderwild.new_witch_huts": "Whether Witch Huts should use a Cypress and Mangrove wood set.",
"option.wilderwild.snapped_trees": "Snapped Trees",
Expand Down

0 comments on commit a3fb207

Please sign in to comment.