Skip to content

Commit

Permalink
even better changelog & refactoring & fix FrozenBlock#316
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Nov 7, 2023
1 parent 4c045d9 commit 02e9ff6
Show file tree
Hide file tree
Showing 29 changed files with 189 additions and 138 deletions.
41 changes: 24 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Hello
Put changelog in plain text please
Make sure to clear this after each release

What's new:
Please clear changelog after each release.
Thank you!

-----------------
- ## Added the Crab!
# Wilder Wild 2.2
## What's new?

---

- ### Added the Crab!
- Crabs are neutral mobs that spawn in Mangrove Swamps, Warm Oceans, Lukewarm Oceans, Deep Lukewarm Oceans, Oceans, Deep Oceans, Warm Beaches, Beaches, and Cypress Wetlands.
- If no players are close to a Crab and it's not been disturbed for a while, the Crab will hide in the ground.
- If a player comes nearby or a loud vibration occurs, the Crab will come back out of hiding.
Expand All @@ -18,18 +20,23 @@ What's new:
- The Crab's Claw can also be brewed with an Awkward potion to create a Potion of Reaching.
- ### Added the Reach Boost effect!
- Extends the player's reach by 1 block per level.
- Does not affect attacking, only impacts interactions with Items and Blocks, including both placing and breaking.
- Does not affect attacking, only impacts interactions with Items and Blocks including both placing and breaking.
- There is, however, a config option to let this impact the attack reach.

## Bug Fixes & Other Changes

---

- Fixed Jellyfish no longer spawning in Jellyfish Caves.
- Slightly optimized Rainbow Jellyfish rendering.
- Added a translation string for Coconut projectiles.
- Removed the Fabric Loader version requirement in hopes it will fix issues with Quilt.
- Changed the grammar of Wilder Wild's advancements to align with Vanilla.
- Refactored `BaobabLeaves` and `TermiteMound` classes to be `BaobabLeavesBlock` and `TermiteMoundBlock` respectively.
- Fixed Fireflies with the Nectar easter egg not properly rendering their glowing overlay.
- Fixed Firefly Bottles with the Nectar easter egg not using the Nectar texture.
- Fixed Jellyfish no longer spawning in Jellyfish Caves
- Slightly optimized Jellyfish rendering with the rainbow easter egg
- Added a translation string for Coconut projectiles
- Removed the Fabric Loader version requirement in hopes it will fix issues with Quilt
- Changed the grammar of Wilder Wild's advancements to align with Vanilla's
- Fixed Fireflies with the Nectar easter egg not properly rendering their glowing overlay
- Fixed Firefly Bottles with the Nectar easter egg not using the Nectar texture
- Increased the chances of a flickering Firefly spawning (smooth pulsing vs. flickering)
- Changed how flickering Fireflies calculate their colors ([#316](https://github.com/FrozenBlock/WilderWild/issues/316))
- Fixed Display Lantern silk touch loot table
- Fixed compatibility with Roughly Enough Resources
- Added Palm Crowns into tags it was missing from.
- Fixed compatibility with Roughly Enough Resources ([#315](https://github.com/FrozenBlock/WilderWild/issues/315))
- Added Palm Crowns into tags it was missing from
- Refactored multiple classes to improve internal organization
73 changes: 2 additions & 71 deletions src/main/java/net/frozenblock/wilderwild/WilderWild.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package net.frozenblock.wilderwild;

import com.mojang.datafixers.schemas.Schema;
import java.util.ArrayList;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
Expand All @@ -29,15 +28,12 @@
import net.frozenblock.lib.mobcategory.impl.FrozenMobCategory;
import net.frozenblock.wilderwild.block.entity.PalmCrownBlockEntity;
import net.frozenblock.wilderwild.config.EntityConfig;
import net.frozenblock.wilderwild.datafix.WilderDataFixer;
import net.frozenblock.wilderwild.entity.Crab;
import net.frozenblock.wilderwild.entity.Jellyfish;
import net.frozenblock.wilderwild.entity.ai.TermiteManager;
import net.frozenblock.wilderwild.misc.WilderSharedConstants;
import net.frozenblock.wilderwild.misc.command.SpreadSculkCommand;
import net.frozenblock.wilderwild.misc.datafixer.DrySandStateFix;
import net.frozenblock.wilderwild.misc.datafixer.NematocystStateFix;
import net.frozenblock.wilderwild.misc.datafixer.OsseousSculkStateFix;
import net.frozenblock.wilderwild.misc.datafixer.ScorchedSandStateFix2;
import net.frozenblock.wilderwild.misc.mod_compat.WilderModIntegrations;
import net.frozenblock.wilderwild.registry.RegisterBlockEntities;
import net.frozenblock.wilderwild.registry.RegisterBlockSoundTypes;
Expand All @@ -59,15 +55,8 @@
import net.frozenblock.wilderwild.registry.RegisterWorldgen;
import net.frozenblock.wilderwild.registry.WilderRegistry;
import net.frozenblock.wilderwild.world.additions.gen.WilderWorldGen;
import net.frozenblock.wilderwild.world.generation.conditionsource.BetaBeachConditionSource;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.datafix.schemas.NamespacedSchema;
import org.jetbrains.annotations.NotNull;
import org.quiltmc.qsl.frozenblock.misc.datafixerupper.api.QuiltDataFixerBuilder;
import org.quiltmc.qsl.frozenblock.misc.datafixerupper.api.QuiltDataFixes;
import org.quiltmc.qsl.frozenblock.misc.datafixerupper.api.SimpleFixes;

public final class WilderWild extends FrozenModInitializer implements FrozenMobCategoryEntrypoint {

Expand All @@ -83,66 +72,10 @@ public WilderWild() {
super(WilderSharedConstants.MOD_ID);
}

private static void applyDataFixes(final @NotNull ModContainer mod) {
WilderSharedConstants.log("Applying DataFixes for Wilder Wild with Data Version " + WilderSharedConstants.DATA_VERSION, true);
var builder = new QuiltDataFixerBuilder(WilderSharedConstants.DATA_VERSION);
builder.addSchema(0, QuiltDataFixes.BASE_SCHEMA);
Schema schemaV1 = builder.addSchema(1, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename white_dandelion to blooming_dandelion", WilderSharedConstants.id("white_dandelion"), WilderSharedConstants.id("blooming_dandelion"), schemaV1);
SimpleFixes.addBlockRenameFix(builder, "Rename potted_white_dandelion to potted_blooming_dandelion", WilderSharedConstants.id("potted_white_dandelion"), WilderSharedConstants.id("potted_blooming_dandelion"), schemaV1);
Schema schemaV2 = builder.addSchema(2, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename blooming_dandelion to seeding_dandelion", WilderSharedConstants.id("blooming_dandelion"), WilderSharedConstants.id("seeding_dandelion"), schemaV2);
SimpleFixes.addBlockRenameFix(builder, "Rename potted_blooming_dandelion to potted_seeding_dandelion", WilderSharedConstants.id("potted_blooming_dandelion"), WilderSharedConstants.id("potted_seeding_dandelion"), schemaV2);
Schema schemaV3 = builder.addSchema(3, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename floating_moss to algae", WilderSharedConstants.id("floating_moss"), WilderSharedConstants.id("algae"), schemaV3);
SimpleFixes.addItemRenameFix(builder, "Rename floating_moss to algae", WilderSharedConstants.id("floating_moss"), WilderSharedConstants.id("algae"), schemaV3);
Schema schemaV4 = builder.addSchema(4, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename test_1 to null_block", WilderSharedConstants.id("test_1"), WilderSharedConstants.id("null_block"), schemaV4);
Schema schemaV5 = builder.addSchema(5, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename sculk_echoer to null_block", WilderSharedConstants.id("sculk_echoer"), WilderSharedConstants.id("null_block"), schemaV5);
SimpleFixes.addBlockRenameFix(builder, "Rename sculk_jaw to null_block", WilderSharedConstants.id("sculk_jaw"), WilderSharedConstants.id("null_block"), schemaV5);
Schema schemaV6 = builder.addSchema(6, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename baobab_sapling to baobab_nut", WilderSharedConstants.id("baobab_sapling"), WilderSharedConstants.id("baobab_nut"), schemaV6);
SimpleFixes.addBlockRenameFix(builder, "Rename baobab_nut_sapling to baobab_nut", WilderSharedConstants.id("baobab_nut_sapling"), WilderSharedConstants.id("baobab_nut"), schemaV6);
SimpleFixes.addBlockRenameFix(builder, "Rename potted_baobab_sapling to potted_baobab_nut", WilderSharedConstants.id("potted_baobab_sapling"), WilderSharedConstants.id("potted_baobab_nut"), schemaV6);
Schema schemaV7 = builder.addSchema(7, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename firefly_lantern to display_lantern", WilderSharedConstants.id("firefly_lantern"), WilderSharedConstants.id("display_lantern"), schemaV7);
SimpleFixes.addBlockRenameFix(builder, "Rename mesoglea to blue_pearlescent_mesoglea", WilderSharedConstants.id("mesoglea"), WilderSharedConstants.id("blue_pearlescent_mesoglea"), schemaV7);
SimpleFixes.addItemRenameFix(builder, "Rename mesoglea to blue_pearlescent_mesoglea", WilderSharedConstants.id("mesoglea"), WilderSharedConstants.id("blue_pearlescent_mesoglea"), schemaV7);
Schema schemaV8 = builder.addSchema(8, NamespacedSchema::new);
SimpleFixes.addBlockStateRenameFix(builder, "display_lantern_rename_fix", WilderSharedConstants.id("display_lantern"), "light", "0", "display_light", schemaV8);
Schema schemaV9 = builder.addSchema(9, NamespacedSchema::new);
builder.addFixer(new NematocystStateFix(schemaV9, "blue_nematocyst_fix", WilderSharedConstants.id("blue_nematocyst")));
builder.addFixer(new NematocystStateFix(schemaV9, "blue_pearlescent_nematocyst_fix", WilderSharedConstants.id("blue_pearlescent_nematocyst")));
builder.addFixer(new NematocystStateFix(schemaV9, "lime_nematocyst_fix", WilderSharedConstants.id("lime_nematocyst")));
builder.addFixer(new NematocystStateFix(schemaV9, "pink_nematocyst_fix", WilderSharedConstants.id("pink_nematocyst")));
builder.addFixer(new NematocystStateFix(schemaV9, "purple_pearlescent_nematocyst_fix", WilderSharedConstants.id("purple_pearlescent_nematocyst")));
builder.addFixer(new NematocystStateFix(schemaV9, "red_nematocyst_fix", WilderSharedConstants.id("red_nematocyst")));
builder.addFixer(new NematocystStateFix(schemaV9, "yellow_nematocyst_fix", WilderSharedConstants.id("yellow_nematocyst")));
Schema schemaV10 = builder.addSchema(10, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename palm_sapling to coconut", WilderSharedConstants.id("palm_sapling"), WilderSharedConstants.id("coconut"), schemaV10);
Schema schemaV11 = builder.addSchema(11, NamespacedSchema::new);
builder.addFixer(new DrySandStateFix(schemaV11, "dry_sand_crackness_to_crackedness", WilderSharedConstants.id("dry_sand")));
SimpleFixes.addBlockRenameFix(builder, "Rename dry_sand to scorched_sand", WilderSharedConstants.id("dry_sand"), WilderSharedConstants.id("scorched_sand"), schemaV11);
SimpleFixes.addItemRenameFix(builder, "Rename dry_sand to scorched_sand", WilderSharedConstants.id("dry_sand"), WilderSharedConstants.id("scorched_sand"), schemaV11);
builder.addFixer(new DrySandStateFix(schemaV11, "scorched_sand_crackness_to_crackedness", WilderSharedConstants.id("scorched_sand")));
Schema schemaV13 = builder.addSchema(13, NamespacedSchema::new);
SimpleFixes.addBlockRenameFix(builder, "Rename palm_leaves to palm_fronds", WilderSharedConstants.id("palm_leaves"), WilderSharedConstants.id("palm_fronds"), schemaV13);
SimpleFixes.addItemRenameFix(builder, "Rename palm_leaves to palm_fronds", WilderSharedConstants.id("palm_leaves"), WilderSharedConstants.id("palm_fronds"), schemaV13);
Schema schemaV14 = builder.addSchema(14, NamespacedSchema::new);
builder.addFixer(new ScorchedSandStateFix2(schemaV14, "scorched_sand_integer_to_boolean", WilderSharedConstants.id("scorched_sand")));
builder.addFixer(new ScorchedSandStateFix2(schemaV14, "scorched_red_sand_integer_to_boolean", WilderSharedConstants.id("scorched_red_sand")));
Schema schemaV15 = builder.addSchema(15, NamespacedSchema::new);
builder.addFixer(new OsseousSculkStateFix(schemaV15, "osseous_sculk_axis_to_direction", WilderSharedConstants.id("osseous_sculk")));

QuiltDataFixes.buildAndRegisterFixer(mod, builder);
WilderSharedConstants.log("DataFixes for Wilder Wild have been applied", true);
}

@Override //Alan Wilder Wild
public void onInitialize(String modId, ModContainer container) {
WilderSharedConstants.startMeasuring(this);
applyDataFixes(container);
WilderDataFixer.applyDataFixes(container);

WilderRegistry.initRegistry();
RegisterBlocks.registerBlocks();
Expand All @@ -169,8 +102,6 @@ public void onInitialize(String modId, ModContainer container) {
RegisterWorldgen.init();
WilderWorldGen.generateWildWorldGen();

Registry.register(BuiltInRegistries.MATERIAL_CONDITION, WilderSharedConstants.id("beta_beach_condition_source"), BetaBeachConditionSource.CODEC.codec());

TermiteManager.Termite.addDegradableBlocks();
TermiteManager.Termite.addNaturalDegradableBlocks();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import java.util.List;
import net.frozenblock.lib.math.api.AdvancedMath;
import net.frozenblock.wilderwild.misc.FlowerColor;
import net.frozenblock.wilderwild.block.property.FlowerColor;
import net.frozenblock.wilderwild.registry.RegisterBlocks;
import net.frozenblock.wilderwild.registry.RegisterProperties;
import net.minecraft.core.BlockPos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.Optional;
import net.frozenblock.lib.block.api.shape.FrozenShapes;
import net.frozenblock.wilderwild.config.BlockConfig;
import net.frozenblock.wilderwild.misc.BubbleDirection;
import net.frozenblock.wilderwild.block.property.BubbleDirection;
import net.frozenblock.wilderwild.registry.RegisterProperties;
import net.frozenblock.wilderwild.tag.WilderEntityTags;
import net.minecraft.core.BlockPos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import it.unimi.dsi.fastutil.ints.IntArrayList;
import net.fabricmc.fabric.api.networking.v1.PlayerLookup;
import net.frozenblock.wilderwild.entity.ai.TermiteManager;
import net.frozenblock.wilderwild.misc.client.ClientMethodInteractionHandler;
import net.frozenblock.wilderwild.misc.client.sound.ClientMethodInteractionHandler;
import net.frozenblock.wilderwild.registry.RegisterBlockEntities;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/

package net.frozenblock.wilderwild.misc;
package net.frozenblock.wilderwild.block.property;

import java.util.Optional;
import net.minecraft.core.Direction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/

package net.frozenblock.wilderwild.misc;
package net.frozenblock.wilderwild.block.property;

import net.minecraft.util.StringRepresentable;
import org.jetbrains.annotations.NotNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/

package net.frozenblock.wilderwild.misc;
package net.frozenblock.wilderwild.block.sculk_behavior;

import java.util.Collection;
import net.frozenblock.wilderwild.registry.RegisterBlocks;
Expand Down
Loading

0 comments on commit 02e9ff6

Please sign in to comment.