Skip to content

Commit

Permalink
Sponge Buds Naturally Grow
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Nov 28, 2024
1 parent f2045d9 commit c0358f4
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ hi
-----------------
- Dark Oak Forests no longer use the warm water color.
- All entities in the `minecraft:aquatic` tag can now swim through Algae without being slowed down.
- Sponge Buds can now grow on their own.
- Mesoglea, Nematocyst, Shelf Fungi, Glory of the Snow, Pollen, and Firefly Bottle models are now data-generated.
- Removed unused Nematocyst textures.
- Removed unused Sculk Shrieker and Stripped Cypress Log models.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class AlgaeBlock extends Block implements BonemealableBlock {
public static final MapCodec<AlgaeBlock> CODEC = simpleCodec(AlgaeBlock::new);
public static final double ENTITY_SLOWDOWN = 0.8D;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings({"DuplicatedCode", "deprecation"})
public class BaobabNutBlock extends SaplingBlock {
public static final IntegerProperty AGE = BlockStateProperties.AGE_2;
public static final int MAX_AGE = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class CoconutBlock extends FallingBlock implements BonemealableBlock {
public static final double GROWTH_CHANCE_HANGING = 0.4D;
public static final int VALID_FROND_DISTANCE = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class DisplayLanternBlock extends BaseEntityBlock implements SimpleWaterloggedBlock {
public static final int MAX_FIREFLIES = 4;
public static final int LIGHT_PER_FIREFLY = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class EchoGlassBlock extends TransparentBlock {
public static final int MIN_CRACK_PARTICLES = 18;
public static final int MAX_DAMAGE_PARTICLES = 25;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class HangingTendrilBlock extends BaseEntityBlock implements SimpleWaterloggedBlock, SculkBehaviour {
public static final int ACTIVE_TICKS = 60;
public static final int TWITCH_MIN_TICKS = 5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;

@SuppressWarnings("deprecation")
public class HollowedLogBlock extends RotatedPillarBlock implements SimpleWaterloggedBlock {
public static final double HOLLOW_PARTICLE_DIRECTION_OFFSET = 0.3375D;
public static final int HOLLOW_PARTICLES_MIN = 12;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class MesogleaBlock extends HalfTransparentBlock implements SimpleWaterloggedBlock {
public static final float JELLYFISH_COLLISION_FROM_SIDE = 0.25F;
public static final float COLLISION_FROM_SIDE = 0.05F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class PricklyPearCactusBlock extends BushBlock implements BonemealableBlock {
public static final MapCodec<PricklyPearCactusBlock> CODEC = simpleCodec(PricklyPearCactusBlock::new);
public static final int GROWTH_CHANCE = 16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class ShelfFungiBlock extends FaceAttachedHorizontalDirectionalBlock implements SimpleWaterloggedBlock, BonemealableBlock {
public static final int GROWTH_BRIGHTNESS_OFFSET = 2;
public static final int MAX_STAGE = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package net.frozenblock.wilderwild.block;

import com.mojang.serialization.MapCodec;
import net.frozenblock.wilderwild.block.impl.SnowloggingUtils;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.server.level.ServerLevel;
Expand Down Expand Up @@ -56,7 +57,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class SpongeBudBlock extends FaceAttachedHorizontalDirectionalBlock implements SimpleWaterloggedBlock, BonemealableBlock {
public static final float BONEMEAL_SUCCESS_CHANCE = 0.65F;
public static final int MAX_AGE = 2;
Expand Down Expand Up @@ -199,4 +199,17 @@ public boolean isBonemealSuccess(@NotNull Level level, @NotNull RandomSource ran
public void performBonemeal(@NotNull ServerLevel level, @NotNull RandomSource random, @NotNull BlockPos pos, @NotNull BlockState state) {
level.setBlock(pos, state.cycle(AGE), UPDATE_CLIENTS);
}

@Override
protected boolean isRandomlyTicking(BlockState state) {
return super.isRandomlyTicking(state) || SnowloggingUtils.isSnowlogged(state);
}

@Override
public void randomTick(@NotNull BlockState state, @NotNull ServerLevel level, @NotNull BlockPos pos, @NotNull RandomSource random) {
if (random.nextInt(20) == 0 && state.getValue(AGE) < MAX_AGE && state.getValue(WATERLOGGED)) {
level.setBlock(pos, state.cycle(AGE), UPDATE_CLIENTS);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class TumbleweedBlock extends BushBlock implements SimpleWaterloggedBlock {
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
public static final MapCodec<TumbleweedBlock> CODEC = simpleCodec(TumbleweedBlock::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@SuppressWarnings("deprecation")
public class WilderBushBlock extends BushBlock implements BonemealableBlock {
public static final int GROWTH_CHANCE = 7;
public static final float ALMOST_FULLY_GROWN_GROWTH_CHANCE = 0.75F;
Expand Down

0 comments on commit c0358f4

Please sign in to comment.