Skip to content

Commit

Permalink
Merge branch '1.21.4' into 1.21.5
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Feb 18, 2025
2 parents 3577992 + 41b63f6 commit 8ed7044
Show file tree
Hide file tree
Showing 21 changed files with 317 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"values": [
"minecraft:snowy_beach",
"minecraft:frozen_ocean",
"minecraft:deep_frozen_ocean"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"values": [
"minecraft:snowy_plains",
"minecraft:ice_spikes",
"minecraft:grove",
{
"id": "wilderwild:frozen_caves",
"required": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"values": [
"minecraft:snowy_plains",
"minecraft:ice_spikes",
{
"id": "wilderwild:frozen_caves",
"required": false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"values": [
"minecraft:snowy_plains",
"minecraft:snowy_taiga",
"minecraft:ice_spikes",
{
"id": "wilderwild:snowy_old_growth_pine_taiga",
"required": false
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"type": "minecraft:flower",
"config": {
"feature": {
"feature": {
"type": "minecraft:simple_block",
"config": {
"to_place": {
"type": "minecraft:noise_provider",
"noise": {
"amplitudes": [
1.0
],
"firstOctave": 0
},
"scale": 0.048833333,
"seed": 5050,
"states": [
{
"Name": "wilderwild:seeding_dandelion"
},
{
"Name": "wilderwild:seeding_dandelion"
},
{
"Name": "wilderwild:seeding_dandelion"
},
{
"Name": "wilderwild:seeding_dandelion"
},
{
"Name": "minecraft:poppy"
},
{
"Name": "minecraft:poppy"
},
{
"Name": "minecraft:poppy"
},
{
"Name": "wilderwild:seeding_dandelion"
}
]
}
}
},
"placement": [
{
"type": "minecraft:block_predicate_filter",
"predicate": {
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
}
}
]
},
"tries": 32,
"xz_spread": 7,
"y_spread": 3
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"half": "lower"
}
},
"weight": 2
"weight": 1
},
{
"data": {
"Name": "wilderwild:frozen_fern"
},
"weight": 3
"weight": 2
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"half": "lower"
}
},
"weight": 2
"weight": 1
},
{
"data": {
"Name": "wilderwild:frozen_short_grass"
},
"weight": 3
"weight": 2
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"feature": "wilderwild:flower_snowy_plains",
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 8
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
},
{
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,6 @@ private void generateUtilityTags() {
.add(Biomes.WINDSWEPT_SAVANNA);

this.getOrCreateTagBuilder(WWBiomeTags.HAS_PENGUIN)
.add(Biomes.SNOWY_BEACH)
.add(Biomes.FROZEN_OCEAN)
.add(Biomes.DEEP_FROZEN_OCEAN);

Expand Down Expand Up @@ -1243,7 +1242,13 @@ private void generateFeatureTags() {
.addOptional(WWBiomes.OLD_GROWTH_DARK_FOREST)
.addOptional(WWBiomes.CYPRESS_WETLANDS);

this.getOrCreateTagBuilder(WWBiomeTags.CHERRY_FLOWERS)
this.getOrCreateTagBuilder(WWBiomeTags.HAS_SNOWY_PLAINS_FLOWERS)
.add(Biomes.SNOWY_PLAINS)
.add(Biomes.SNOWY_TAIGA)
.add(Biomes.ICE_SPIKES)
.addOptional(WWBiomes.SNOWY_OLD_GROWTH_PINE_TAIGA);

this.getOrCreateTagBuilder(WWBiomeTags.HAS_CHERRY_FLOWERS)
.add(Biomes.CHERRY_GROVE);

this.getOrCreateTagBuilder(WWBiomeTags.HAS_TUMBLEWEED_PLANT)
Expand Down Expand Up @@ -2102,6 +2107,8 @@ private void generateFeatureTags() {

this.getOrCreateTagBuilder(WWBiomeTags.HAS_FROZEN_PLAIN_GRASS)
.add(Biomes.SNOWY_PLAINS)
.add(Biomes.ICE_SPIKES)
.add(Biomes.GROVE)
.addOptional(WWBiomes.FROZEN_CAVES);

this.getOrCreateTagBuilder(WWBiomeTags.HAS_FROZEN_TAIGA_GRASS)
Expand All @@ -2121,6 +2128,7 @@ private void generateFeatureTags() {

this.getOrCreateTagBuilder(WWBiomeTags.HAS_FROZEN_PLAIN_TALL_GRASS)
.add(Biomes.SNOWY_PLAINS)
.add(Biomes.ICE_SPIKES)
.addOptional(WWBiomes.FROZEN_CAVES);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected boolean checkExtraStartConditions(ServerLevel serverLevel, @NotNull E

@Override
protected boolean canStillUse(@NotNull ServerLevel level, @NotNull E penguin, long gameTime) {
return true;
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ protected boolean checkExtraStartConditions(ServerLevel serverLevel, @NotNull E

@Override
protected boolean canStillUse(@NotNull ServerLevel level, @NotNull E penguin, long gameTime) {
Brain<Penguin> brain = penguin.getBrain();
return brain.checkMemory(MemoryModuleType.BREED_TARGET, MemoryStatus.VALUE_ABSENT)
&& brain.checkMemory(MemoryModuleType.IS_PANICKING, MemoryStatus.VALUE_ABSENT)
&& !penguin.isTouchingWaterOrSwimming();
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2025 FrozenBlock
* This file is part of Wilder Wild.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/

package net.frozenblock.wilderwild.mixin.entity.penguin;

import net.frozenblock.wilderwild.registry.WWEntityTypes;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(Blocks.class)
public class BlocksMixin {

@Inject(method = "method_26128", at = @At("HEAD"), cancellable = true)
private static void wilderWild$allowPenguinSpawnA(
BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, EntityType entityType, CallbackInfoReturnable<Boolean> info
) {
if (entityType == WWEntityTypes.PENGUIN) {
info.setReturnValue(true);
}
}

@Inject(method = "method_26132", at = @At("HEAD"), cancellable = true)
private static void wilderWild$allowPenguinSpawnB(
BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, EntityType entityType, CallbackInfoReturnable<Boolean> info
) {
if (entityType == WWEntityTypes.PENGUIN) {
info.setReturnValue(true);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ public final class WWBiomeTags {
public static final TagKey<Biome> HAS_CLOVERS = bind("feature/has_clovers");
public static final TagKey<Biome> HAS_CLOVERS_SPARSE = bind("feature/has_clovers_sparse");
public static final TagKey<Biome> HAS_MILKWEED = bind("feature/has_milkweed");
public static final TagKey<Biome> CHERRY_FLOWERS = bind("feature/cherry_flowers");
public static final TagKey<Biome> HAS_SNOWY_PLAINS_FLOWERS = bind("feature/has_snowy_plains_flowers");
public static final TagKey<Biome> HAS_CHERRY_FLOWERS = bind("feature/has_cherry_flowers");
public static final TagKey<Biome> HAS_SUNFLOWER_PLAINS_FLOWERS = bind("feature/has_sunflower_plains_flowers");
public static final TagKey<Biome> HAS_PALMS = bind("feature/has_palms");
public static final TagKey<Biome> HAS_WARM_BEACH_PALMS = bind("feature/has_warm_beach_palms");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import org.jetbrains.annotations.Nullable;

public final class MapleForest extends FrozenBiome {
public static final Climate.Parameter TEMPERATURE = Climate.Parameter.span(-0.45F, -0.255F);
public static final Climate.Parameter TEMPERATURE = Climate.Parameter.span(-0.495F, -0.255F);
public static final Climate.Parameter HUMIDITY = Climate.Parameter.span(-1F, -0.2F);
public static final Climate.Parameter WEIRDNESS_A = Climate.Parameter.span(Weirdness.LOW_SLICE_VARIANT_ASCENDING, Weirdness.HIGH_SLICE_VARIANT_ASCENDING);
public static final Climate.Parameter WEIRDNESS_B = Climate.Parameter.span(Weirdness.HIGH_SLICE_VARIANT_DESCENDING, Weirdness.MID_SLICE_VARIANT_DESCENDING);
Expand Down
Loading

0 comments on commit 8ed7044

Please sign in to comment.