diff --git a/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java b/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java index 2e0c70a35..8c1f6bb25 100644 --- a/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java +++ b/src/main/java/net/id/paradiselost/blocks/BlockRegistration.java @@ -1,13 +1,11 @@ package net.id.paradiselost.blocks; import net.fabricmc.fabric.mixin.lookup.BlockEntityTypeAccessor; -import net.id.incubus_core.util.RegistryQueue; import net.id.paradiselost.blocks.natural.ParadiseLostSaplingBlock; import net.id.paradiselost.blocks.natural.tree.FruitingLeavesBlock; import net.id.paradiselost.blocks.natural.tree.ParadiseLostLeavesBlock; import net.id.paradiselost.items.ParadiseLostItems; import net.id.paradiselost.mixin.util.SignTypeAccessor; -import net.id.paradiselost.registry.ParadiseLostRegistryQueues; import net.id.paradiselost.util.ParadiseLostSignType; import net.id.paradiselost.world.feature.tree.generator.MotherAurelSaplingGenerator; import net.id.paradiselost.world.feature.tree.generator.OrangeSaplingGenerator; @@ -15,7 +13,6 @@ import net.minecraft.block.entity.BlockEntityType; import net.minecraft.block.sapling.SaplingGenerator; import net.minecraft.sound.BlockSoundGroup; -import net.minecraft.util.SignType; import org.jetbrains.annotations.NotNull; import java.util.Arrays; diff --git a/src/main/java/net/id/paradiselost/blocks/FloatingBlock.java b/src/main/java/net/id/paradiselost/blocks/FloatingBlock.java index 43723eee3..eb80138c8 100644 --- a/src/main/java/net/id/paradiselost/blocks/FloatingBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/FloatingBlock.java @@ -3,8 +3,6 @@ import net.id.paradiselost.api.FloatingBlockHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.block.OreBlock; -import net.minecraft.block.RedstoneOreBlock; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; @@ -14,11 +12,11 @@ import net.minecraft.world.WorldAccess; @SuppressWarnings("deprecation") -public class FloatingBlock extends RedstoneOreBlock { +public class FloatingBlock extends Block { private final boolean powered; public FloatingBlock(boolean powered, Settings properties, UniformIntProvider experienceDropped) { - super(properties, experienceDropped); + super(properties); this.powered = powered; } @@ -28,12 +26,12 @@ public FloatingBlock(boolean powered, Settings properties) { @Override public void onBlockAdded(BlockState state, World worldIn, BlockPos posIn, BlockState oldState, boolean notify) { - worldIn.createAndScheduleBlockTick(posIn, this, this.getFallDelay()); + worldIn.scheduleBlockTick(posIn, this, this.getFallDelay()); } @Override public BlockState getStateForNeighborUpdate(BlockState stateIn, Direction facingIn, BlockState facingState, WorldAccess worldIn, BlockPos posIn, BlockPos facingPosIn) { - worldIn.createAndScheduleBlockTick(posIn, this, this.getFallDelay()); + worldIn.scheduleBlockTick(posIn, this, this.getFallDelay()); return super.getStateForNeighborUpdate(stateIn, facingIn, facingState, worldIn, posIn, facingPosIn); } diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java index 6b1c3c16d..a0c260a03 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlockActions.java @@ -9,9 +9,6 @@ import net.minecraft.block.Block; import net.minecraft.item.HoeItem; -import static net.id.incubus_core.util.RegistryQueue.Action; -import static net.id.incubus_core.util.RegistryQueue.onClient; - class ParadiseLostBlockActions { protected static final AbstractBlock.ContextPredicate never = (state, view, pos) -> false; protected static final AbstractBlock.ContextPredicate always = (state, view, pos) -> true; diff --git a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java index c6295fcb3..06900709b 100644 --- a/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java +++ b/src/main/java/net/id/paradiselost/blocks/ParadiseLostBlocks.java @@ -10,7 +10,6 @@ import net.id.paradiselost.blocks.natural.plant.*; import net.id.paradiselost.blocks.natural.tree.*; import net.id.paradiselost.fluids.ParadiseLostFluids; -import net.id.paradiselost.registry.ParadiseLostRegistryQueues; import net.id.paradiselost.tag.ParadiseLostBlockTags; import net.id.paradiselost.world.feature.tree.generator.*; import net.minecraft.block.*; diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java b/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java index 73c416c8c..ceea4c556 100644 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/ParadiseLostBlockEntityTypes.java @@ -3,7 +3,8 @@ import net.id.paradiselost.blocks.ParadiseLostBlocks; import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.util.registry.Registry; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; import static net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder.create; import static net.id.paradiselost.ParadiseLost.locate; @@ -24,6 +25,6 @@ public static void init() { } private static void register(String name, BlockEntityType type) { - Registry.register(Registry.BLOCK_ENTITY_TYPE, locate(name), type); + Registry.register(Registries.BLOCK_ENTITY_TYPE, locate(name), type); } } diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java b/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java index 3b4476d29..4dd535a17 100644 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java +++ b/src/main/java/net/id/paradiselost/blocks/blockentity/TreeTapBlockEntity.java @@ -17,8 +17,8 @@ import net.minecraft.inventory.SidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NbtCompound; -import net.minecraft.network.Packet; import net.minecraft.network.listener.ClientPlayPacketListener; +import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket; import net.minecraft.screen.ScreenHandler; import net.minecraft.server.world.ServerWorld; diff --git a/src/main/java/net/id/paradiselost/blocks/blockentity/dungeon/DungeonSwitchBlockEntity.java b/src/main/java/net/id/paradiselost/blocks/blockentity/dungeon/DungeonSwitchBlockEntity.java deleted file mode 100644 index 67c46d532..000000000 --- a/src/main/java/net/id/paradiselost/blocks/blockentity/dungeon/DungeonSwitchBlockEntity.java +++ /dev/null @@ -1,88 +0,0 @@ -package net.id.paradiselost.blocks.blockentity.dungeon; - -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; -import net.id.paradiselost.blocks.blockentity.ParadiseLostBlockEntityTypes; -import net.id.paradiselost.blocks.dungeon.DungeonSwitchBlock; -import net.minecraft.block.BlockState; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.nbt.NbtCompound; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.event.BlockPositionSource; -import net.minecraft.world.event.GameEvent; -import net.minecraft.world.event.PositionSource; -import net.minecraft.world.event.listener.GameEventListener; - -public class DungeonSwitchBlockEntity extends BlockEntity implements GameEventListener { - private BlockPos linkedPos; - private int animationDelta; - - public DungeonSwitchBlockEntity(BlockPos pos, BlockState state) { -// this(ParadiseLostBlockEntityTypes.DUNGEON_SWITCH, pos, state); - this(ParadiseLostBlockEntityTypes.FOOD_BOWL, pos, state); // temp - } - - public DungeonSwitchBlockEntity(BlockEntityType type, BlockPos pos, BlockState state) { - super(type, pos, state); - //todo tweak range - } - - public void setLinkedPos(BlockPos linkedPos) { - this.linkedPos = linkedPos; - } - - public BlockPos getLinkedPos() { - return linkedPos; - } - - @Override - public void writeNbt(NbtCompound nbt) { - super.writeNbt(nbt); - if (linkedPos != null) { - nbt.putLong("linkedpos", linkedPos.asLong()); - } - } - - @Override - public void readNbt(NbtCompound nbt) { - super.readNbt(nbt); - if (nbt.contains("linkedpos")) { - linkedPos = BlockPos.fromLong(nbt.getLong("linkedpos")); - } - } - - @Override - public PositionSource getPositionSource() { - return new BlockPositionSource(pos); - } - - @Override - public int getRange() { - //todo tweak range - return 10; - } - - @Override - public boolean listen(ServerWorld world, GameEvent.Message event) { - if (event.getEvent() == GameEvent.EXPLODE) { - if (world != null && world.getBlockState(getPos()).getBlock() instanceof DungeonSwitchBlock dungeonSwitchBlock) { - dungeonSwitchBlock.onExplosionEvent(world, getPos()); - } - } - return false; - } - - @Environment(EnvType.CLIENT) - public void clientTick() { - animationDelta++; - if (animationDelta > 360) { - animationDelta = 1; - } - } - - public int getAnimationDelta() { - return animationDelta; - } -} diff --git a/src/main/java/net/id/paradiselost/blocks/decorative/FlaxweaveCushionBlock.java b/src/main/java/net/id/paradiselost/blocks/decorative/FlaxweaveCushionBlock.java index 34c589dce..9016204b1 100644 --- a/src/main/java/net/id/paradiselost/blocks/decorative/FlaxweaveCushionBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/decorative/FlaxweaveCushionBlock.java @@ -2,6 +2,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.HayBlock; import net.minecraft.entity.Entity; import net.minecraft.entity.damage.DamageSource; import net.minecraft.sound.SoundCategory; @@ -16,7 +17,7 @@ public FlaxweaveCushionBlock(Settings settings) { @Override public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { - entity.handleFallDamage(fallDistance, 0.1F, DamageSource.FALL); // cancel most fall damage + entity.handleFallDamage(fallDistance, 0.1F, world.getDamageSources().fall()); // cancel most fall damage if (fallDistance > 3F && !world.isClient) { this.spawnBreakParticles(world, null, pos, state); // spawn particles world.playSound(null, pos, soundGroup.getHitSound(), SoundCategory.BLOCKS, 0.7F, 1.0F); // and play cushion sound diff --git a/src/main/java/net/id/paradiselost/blocks/mechanical/FoodBowlBlock.java b/src/main/java/net/id/paradiselost/blocks/mechanical/FoodBowlBlock.java index 6627c9800..c03a74ebc 100644 --- a/src/main/java/net/id/paradiselost/blocks/mechanical/FoodBowlBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/mechanical/FoodBowlBlock.java @@ -43,7 +43,7 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt @Override public @Nullable BlockState getPlacementState(ItemPlacementContext ctx) { - return getDefaultState().with(AXIS, ctx.getPlayerFacing().getAxis()); + return getDefaultState().with(AXIS, ctx.getPlayerLookDirection().getAxis()); } @Override diff --git a/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java b/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java index d0f3d4733..aefa62320 100644 --- a/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/mechanical/NitraBlock.java @@ -37,7 +37,7 @@ public NitraBlock(Settings settings) { public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) { if (!oldState.isOf(state.getBlock())) { if (world.isReceivingRedstonePower(pos)) { - world.createAndScheduleBlockTick(pos, this, 1); + world.scheduleBlockTick(pos, this, 1); } } @@ -45,7 +45,7 @@ public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (world.isReceivingRedstonePower(pos)) { - world.createAndScheduleBlockTick(pos, this, 1); + world.scheduleBlockTick(pos, this, 1); } } @@ -69,7 +69,7 @@ public static void ignite(World world, BlockPos pos, float power) { } private static void ignite(World world, BlockPos pos, float power, @Nullable LivingEntity igniter) { - Explosion explosion = new Explosion(world, igniter, null, null, pos.getX(), pos.getY() + 0.5D, pos.getZ(), power, false, Explosion.DestructionType.BREAK); + Explosion explosion = new Explosion(world, igniter, null, null, pos.getX(), pos.getY() + 0.5D, pos.getZ(), power, false, Explosion.DestructionType.DESTROY); System.out.println(world.isClient); if (!world.isClient) { explosion.collectBlocksAndDamageEntities(); diff --git a/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java index ee1f9f8ca..02b955573 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java @@ -5,11 +5,10 @@ import net.id.paradiselost.world.feature.placed_features.ParadiseLostVegetationPlacedFeatures; import net.minecraft.block.BlockState; import net.minecraft.block.Fertilizable; +import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.random.Random; -import net.minecraft.util.registry.RegistryEntry; -import net.minecraft.world.BlockView; import net.minecraft.world.World; import net.minecraft.world.WorldView; import net.minecraft.world.gen.feature.ConfiguredFeature; diff --git a/src/main/java/net/id/paradiselost/blocks/natural/cloud/ParadiseLostCloudBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/cloud/ParadiseLostCloudBlock.java index 0e790b7a9..becbf7ce2 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/cloud/ParadiseLostCloudBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/cloud/ParadiseLostCloudBlock.java @@ -37,7 +37,7 @@ public float getAmbientOcclusionLightLevel(BlockState state, BlockView worldIn, } @Override - public boolean isTranslucent(BlockState state, BlockView reader, BlockPos pos) { + public boolean isTransparent(BlockState state, BlockView reader, BlockPos pos) { return true; } diff --git a/src/main/java/net/id/paradiselost/blocks/natural/crop/BlackcurrantBushBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/crop/BlackcurrantBushBlock.java index d1178ea1b..d2676031c 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/crop/BlackcurrantBushBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/crop/BlackcurrantBushBlock.java @@ -28,7 +28,7 @@ public BlackcurrantBushBlock(Settings settings) { } @Override - public boolean isTranslucent(BlockState state, BlockView world, BlockPos pos) { + public boolean isTransparent(BlockState state, BlockView world, BlockPos pos) { return true; } diff --git a/src/main/java/net/id/paradiselost/blocks/natural/crop/SwedrootCropBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/crop/SwedrootCropBlock.java index c7e4a77f8..0e2d0c317 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/crop/SwedrootCropBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/crop/SwedrootCropBlock.java @@ -24,7 +24,7 @@ public class SwedrootCropBlock extends CropBlock { }; public SwedrootCropBlock(Settings settings) { - super(settings.offsetType(OffsetType.XZ)); + super(settings.offset(OffsetType.XZ)); } @Override diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/GiantLilypadBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/GiantLilypadBlock.java deleted file mode 100644 index 59865623e..000000000 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/GiantLilypadBlock.java +++ /dev/null @@ -1,66 +0,0 @@ -package net.id.paradiselost.blocks.natural.plant; - -import net.minecraft.block.*; -import net.minecraft.fluid.Fluids; -import net.minecraft.item.ItemStack; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.state.StateManager; -import net.minecraft.state.property.BooleanProperty; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.random.Random; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.world.BlockView; -import net.minecraft.world.World; - -public class GiantLilypadBlock extends LilyPadBlock implements Fertilizable { - - public static final BooleanProperty FLOWERING = BooleanProperty.of("flowering"); - - // TODO: this collision shape doesn't work. see github issues page. Change to something else - private static final VoxelShape SHAPE = Block.createCuboidShape(-8.0D, 0.0D, -8.0D, 24.0D, 1.5D, 24.0D); - - public GiantLilypadBlock(Settings settings) { - super(settings); - setDefaultState(getDefaultState().with(FLOWERING, false)); - } - - @Override - public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { - return SHAPE; - } - - @Override - protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) { - return BlockPos.stream(pos.add(-1, 0, -1), pos.add(1, 0, 1)).allMatch(floorPos -> { - var upFluid = world.getFluidState(floorPos.up()); - var fluid = world.getFluidState(floorPos); - return (fluid.getFluid() == Fluids.WATER || world.getBlockState(floorPos).getMaterial() == Material.ICE) && upFluid.isEmpty(); - }); - } - - @Override - protected void appendProperties(StateManager.Builder builder) { - super.appendProperties(builder); - builder.add(FLOWERING); - } - - @Override - public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) { - return true; - } - - @Override - public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) { - return true; - } - - @Override - public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { - if (!state.get(FLOWERING)) { - world.setBlockState(pos, state.with(FLOWERING, true)); - } - else { - dropStack(world, pos, new ItemStack(this)); - } - } -} diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/GroundcoverBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/GroundcoverBlock.java index 20a3305e3..ed2f77970 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/GroundcoverBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/plant/GroundcoverBlock.java @@ -36,11 +36,6 @@ public void onEntityCollision(BlockState state, World world, BlockPos pos, Entit } } - @Override - public void onLandedUpon(World world, BlockState state, BlockPos pos, Entity entity, float fallDistance) { - entity.handleFallDamage(fallDistance, 0.5F, DamageSource.FALL); - } - @Override public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { return SHAPE; diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/MossBallBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/MossBallBlock.java deleted file mode 100644 index 7120103a1..000000000 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/MossBallBlock.java +++ /dev/null @@ -1,103 +0,0 @@ -package net.id.paradiselost.blocks.natural.plant; - -import net.minecraft.block.*; -import net.minecraft.fluid.FluidState; -import net.minecraft.fluid.Fluids; -import net.minecraft.item.ItemPlacementContext; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.state.StateManager; -import net.minecraft.state.property.Properties; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.random.Random; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.world.BlockView; -import net.minecraft.world.World; -import net.minecraft.world.WorldView; -import org.jetbrains.annotations.Nullable; - -public class MossBallBlock extends PlantBlock implements Waterloggable, Fertilizable { - - public static final VoxelShape SHAPE = Block.createCuboidShape(2, 0, 2, 14, 12, 14); - - public MossBallBlock(Settings settings) { - super(settings.offsetType(OffsetType.XYZ)); - } - - @Nullable - @Override - public BlockState getPlacementState(ItemPlacementContext ctx) { - return getDefaultState().with(Properties.WATERLOGGED, ctx.getWorld().isWater(ctx.getBlockPos())); - } - - @Override - public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { - return SHAPE; - } - - @Override - protected void appendProperties(StateManager.Builder builder) { - super.appendProperties(builder); - builder.add(Properties.WATERLOGGED); - } - - @Override - public float getMaxHorizontalModelOffset() { - return 0.09F; - } - - @Override - public FluidState getFluidState(BlockState state) { - return state.get(Properties.WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(state); - } - - @Override - public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) { - return true; - } - - @Override - protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) { - return true; - } - - @Override - public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) { - return state.get(Properties.WATERLOGGED); - } - - @Override - public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) { - return true; - } - - @Override - public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { - int j = 1; - int l = 0; - int m = pos.getX() - 2; - int n = 0; - - for (int o = 0; o < 5; ++o) { - for (int p = 0; p < j; ++p) { - int q = 2 + pos.getY() - 1; - - for (int r = q - 2; r < q; ++r) { - BlockPos blockPos = new BlockPos(m + o, r, pos.getZ() - n + p); - if (blockPos != pos && random.nextInt(6) == 0 && world.getBlockState(blockPos).isOf(Blocks.WATER)) { - world.setBlockState(blockPos, getDefaultState(), Block.NOTIFY_ALL); - } - } - } - - if (l < 2) { - j += 2; - ++n; - } else { - j -= 2; - --n; - } - - ++l; - } - } -} diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/MossStarBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/MossStarBlock.java deleted file mode 100644 index 5cc7a1d44..000000000 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/MossStarBlock.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.id.paradiselost.blocks.natural.plant; - -import net.minecraft.block.*; -import net.minecraft.fluid.FluidState; -import net.minecraft.fluid.Fluids; -import net.minecraft.item.ItemPlacementContext; -import net.minecraft.item.ItemStack; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.state.StateManager; -import net.minecraft.state.property.Properties; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.random.Random; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.world.BlockView; -import net.minecraft.world.World; -import org.jetbrains.annotations.Nullable; - -public class MossStarBlock extends PlantBlock implements Waterloggable, Fertilizable { - - public static final VoxelShape SHAPE = Block.createCuboidShape(5, 0, 5, 11, 5, 11); - - public MossStarBlock(Settings settings) { - super(settings.offsetType(OffsetType.XZ)); - } - - @Nullable - @Override - public BlockState getPlacementState(ItemPlacementContext ctx) { - return getDefaultState().with(Properties.WATERLOGGED, ctx.getWorld().isWater(ctx.getBlockPos())); - } - - @Override - public float getMaxHorizontalModelOffset() { - return 0.2F; - } - - @Override - public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { - return SHAPE; - } - - @Override - public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) { - return state.get(Properties.WATERLOGGED); - } - - @Override - public FluidState getFluidState(BlockState state) { - return state.get(Properties.WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(state); - } - - @Override - protected boolean canPlantOnTop(BlockState floor, BlockView world, BlockPos pos) { - return !floor.isAir(); - } - - @Override - public boolean canGrow(World world, Random random, BlockPos pos, BlockState state) { - return true; - } - - @Override - public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { - dropStack(world, pos, new ItemStack(this)); - } - - @Override - protected void appendProperties(StateManager.Builder builder) { - super.appendProperties(builder); - builder.add(Properties.WATERLOGGED); - } -} diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/ParadiseLostSeagrassBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/ParadiseLostSeagrassBlock.java deleted file mode 100644 index 7a8945117..000000000 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/ParadiseLostSeagrassBlock.java +++ /dev/null @@ -1,15 +0,0 @@ -package net.id.paradiselost.blocks.natural.plant; - -import net.minecraft.block.SeagrassBlock; - -public class ParadiseLostSeagrassBlock extends SeagrassBlock { - - public ParadiseLostSeagrassBlock(Settings settings) { - super(settings.offsetType(OffsetType.XZ)); - } - - @Override - public float getMaxHorizontalModelOffset() { - return 0.125F; - } -} diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/TallWaterPlantBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/TallWaterPlantBlock.java index 7996a0657..3d6b0d5af 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/TallWaterPlantBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/plant/TallWaterPlantBlock.java @@ -15,7 +15,7 @@ public class TallWaterPlantBlock extends TallPlantBlock implements Waterloggable { public TallWaterPlantBlock(Settings settings) { - super(settings.offsetType(OffsetType.XYZ)); + super(settings.offset(OffsetType.XYZ)); } @Override diff --git a/src/main/java/net/id/paradiselost/blocks/natural/plant/WeepingCloudburstBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/plant/WeepingCloudburstBlock.java index acbbf9558..6cd39ed10 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/plant/WeepingCloudburstBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/plant/WeepingCloudburstBlock.java @@ -26,7 +26,7 @@ public class WeepingCloudburstBlock extends PlantBlock implements Waterloggable public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED; public WeepingCloudburstBlock(Settings settings) { - super(settings.offsetType(OffsetType.XZ)); + super(settings.offset(OffsetType.XZ)); setDefaultState(getDefaultState().with(SECTION, Section.BOTTOM).with(NOGROW, false).with(WATERLOGGED, false)); } diff --git a/src/main/java/net/id/paradiselost/blocks/natural/tree/FruitingLeavesBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/tree/FruitingLeavesBlock.java index e009ddfe9..b4c6f666a 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/tree/FruitingLeavesBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/tree/FruitingLeavesBlock.java @@ -117,7 +117,7 @@ public void randomDisplayTick(BlockState state, World world, BlockPos pos, Rando Direction direction = Direction.DOWN; BlockPos blockPos = pos.offset(direction); BlockState blockState = world.getBlockState(blockPos); - if (!(!blockState.isSideSolidFullSquare(world, blockPos, direction.getOpposite()) && !blockState.isTranslucent(world, blockPos))) { + if (!(!blockState.isSideSolidFullSquare(world, blockPos, direction.getOpposite()) && !blockState.isTransparent(world, blockPos))) { if (speed == 0 || world.getTime() % 3000 == 0) { speed = world.getRandom().nextInt(4); diff --git a/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostHangerBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostHangerBlock.java index e7b407a8f..5273b81fe 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostHangerBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostHangerBlock.java @@ -27,7 +27,7 @@ public class ParadiseLostHangerBlock extends PlantBlock implements Fertilizable } public ParadiseLostHangerBlock(Settings settings) { - super(settings.offsetType(OffsetType.XZ)); + super(settings.offset(OffsetType.XZ)); this.setDefaultState((this.stateManager.getDefaultState()).with(TIP, true)); } @@ -75,7 +75,7 @@ public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos po } @Override - public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) { + public boolean isFertilizable(WorldView world, BlockPos pos, BlockState state, boolean isClient) { return world.getBlockState(pos.down()).isAir(); } diff --git a/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostLeavesBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostLeavesBlock.java index 786f44722..03fe1e964 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostLeavesBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/tree/ParadiseLostLeavesBlock.java @@ -14,6 +14,7 @@ import net.minecraft.util.shape.VoxelShapes; import net.minecraft.world.BlockView; import net.minecraft.world.World; +import net.minecraft.world.WorldView; public class ParadiseLostLeavesBlock extends LeavesBlock implements Fertilizable { @@ -51,7 +52,7 @@ public void randomDisplayTick(BlockState state, World world, BlockPos pos, Rando Direction direction = Direction.DOWN; BlockPos blockPos = pos.offset(direction); BlockState blockState = world.getBlockState(blockPos); - if (!(!blockState.isSideSolidFullSquare(world, blockPos, direction.getOpposite()) && !blockState.isTranslucent(world, blockPos))) { + if (!(!blockState.isSideSolidFullSquare(world, blockPos, direction.getOpposite()) && !blockState.isTransparent(world, blockPos))) { if (speed == 0 || world.getTime() % 3000 == 0) { speed = world.getRandom().nextInt(4); @@ -75,7 +76,7 @@ public void randomDisplayTick(BlockState state, World world, BlockPos pos, Rando } @Override - public boolean isTranslucent(BlockState state, BlockView world, BlockPos pos) { + public boolean isTransparent(BlockState state, BlockView world, BlockPos pos) { return false; } @@ -103,7 +104,7 @@ public VoxelShape getCameraCollisionShape(BlockState state, BlockView world, Blo } @Override - public boolean isFertilizable(BlockView world, BlockPos pos, BlockState state, boolean isClient) { + public boolean isFertilizable(WorldView world, BlockPos pos, BlockState state, boolean isClient) { return !getHanger(state).isAir() && world.getBlockState(pos.down()).isAir(); } diff --git a/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java b/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java index a1262a517..fd55ec035 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java +++ b/src/main/java/net/id/paradiselost/client/rendering/armor/PhoenixArmorRenderer.java @@ -24,7 +24,7 @@ public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, if (phoenixArmorModel == null) { phoenixArmorModel = new PhoenixArmorModel(MinecraftClient.getInstance().getEntityModelLoader().getModelPart(ParadiseLostModelLayers.PHOENIX_ARMOR)); } - contextModel.setAttributes(phoenixArmorModel); + contextModel.copyBipedStateTo(phoenixArmorModel); phoenixArmorModel.setVisible(false); phoenixArmorModel.head.visible = slot == EquipmentSlot.HEAD; ArmorRenderer.renderPart(matrices, vertexConsumers, light, stack, phoenixArmorModel, TEXTURE); diff --git a/src/main/java/net/id/paradiselost/client/rendering/block/IncubatorBlockEntityRenderer.java b/src/main/java/net/id/paradiselost/client/rendering/block/IncubatorBlockEntityRenderer.java index 4ef3b90d5..893979c33 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/block/IncubatorBlockEntityRenderer.java +++ b/src/main/java/net/id/paradiselost/client/rendering/block/IncubatorBlockEntityRenderer.java @@ -8,6 +8,7 @@ import net.minecraft.client.render.block.entity.BlockEntityRenderer; import net.minecraft.client.render.block.entity.BlockEntityRendererFactory; import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; @Environment(EnvType.CLIENT) @@ -22,7 +23,7 @@ public void render(IncubatorBlockEntity entity, float tickDelta, MatrixStack mat matrices.push(); matrices.translate(0.5, 0.55, 0.5); matrices.scale(0.9F, 0.9F, 0.9F); - MinecraftClient.getInstance().getItemRenderer().renderItem(entity.getItem(), ModelTransformation.Mode.FIXED, light, overlay, matrices, vertexConsumers, 0); + MinecraftClient.getInstance().getItemRenderer().renderItem(entity.getItem(), ModelTransformationMode.FIXED, light, overlay, matrices, vertexConsumers, null, 0); matrices.pop(); } } diff --git a/src/main/java/net/id/paradiselost/client/rendering/block/TreeTapBlockEntityRenderer.java b/src/main/java/net/id/paradiselost/client/rendering/block/TreeTapBlockEntityRenderer.java index 65d4fc178..a9e33262b 100644 --- a/src/main/java/net/id/paradiselost/client/rendering/block/TreeTapBlockEntityRenderer.java +++ b/src/main/java/net/id/paradiselost/client/rendering/block/TreeTapBlockEntityRenderer.java @@ -21,7 +21,7 @@ public void render(TreeTapBlockEntity entity, float tickDelta, MatrixStack matri // todo: rotate along facing axis matrices.translate(0.5, 0.4, 0.5); matrices.scale(0.75F, 0.75F, 0.75F); - MinecraftClient.getInstance().getItemRenderer().renderItem(entity.getStack(0), ModelTransformation.Mode.FIXED, light, overlay, matrices, vertexConsumers, 0); + MinecraftClient.getInstance().getItemRenderer().renderItem(entity.getStack(0), ModelTransformationMode.FIXED, light, overlay, matrices, vertexConsumers, null, 0); matrices.pop(); } } diff --git a/src/main/java/net/id/paradiselost/devel/ParadiseLostDevTools.java b/src/main/java/net/id/paradiselost/devel/ParadiseLostDevTools.java deleted file mode 100644 index 4cfcfb1f2..000000000 --- a/src/main/java/net/id/paradiselost/devel/ParadiseLostDevTools.java +++ /dev/null @@ -1,49 +0,0 @@ -package net.id.paradiselost.devel; - -import net.id.paradiselost.ParadiseLost; -import net.id.paradiselost.entities.block.SliderEntity; -import net.id.paradiselost.items.ParadiseLostItemGroups; -import net.minecraft.item.Item; -import net.minecraft.item.ItemUsageContext; -import net.minecraft.util.ActionResult; -import net.minecraft.util.registry.Registry; - -/** - * Tools for paradise lost development, such as blocks and items - */ -// Package-private to avoid being called in production -class ParadiseLostDevTools { - /** - * Spawns a slider - */ - private static final Item SLIDER_TEST_ITEM = new Item(new Item.Settings().group(ParadiseLostItemGroups.PARADISE_LOST_MISC)) { - @Override - public ActionResult useOnBlock(ItemUsageContext context) { - boolean sneaking = false; - if (context.getPlayer() != null) { - sneaking = context.getPlayer().isSneaking(); - } - SliderEntity slider; - if (!sneaking) { - slider = new SliderEntity(context.getWorld(), context.getBlockPos().getX() + 0.5D, context.getBlockPos().getY(), context.getBlockPos().getZ() + 0.5D, context.getPlayerFacing().getOpposite()); - slider.setBlockState(context.getWorld().getBlockState(context.getBlockPos())); - } else { - slider = new SliderEntity(context.getWorld(), context.getHitPos().getX(), context.getHitPos().getY(), context.getHitPos().getZ(), context.getPlayerFacing().getOpposite()); - slider.moveTime = 1; - } - context.getWorld().spawnEntity(slider); - return ActionResult.SUCCESS; - } - }; - - static void init() { - Registry.register(Registry.ITEM, ParadiseLost.locate("slider_test_item"), SLIDER_TEST_ITEM); - } - -// static { // TODO: Do we need this to be reimplemented? -// if (!Devel.isDevel()) { -// ParadiseLost.LOG.error(LogUtils.FATAL_MARKER, "!!\n!!\n!!\n!!ParadiseLostDevItems called in production environment! Please report this to Paradise Lost developers!"); -// new RuntimeException("").printStackTrace(); -// } -// } -} diff --git a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java index 5af8684ea..75f91569d 100644 --- a/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java +++ b/src/main/java/net/id/paradiselost/entities/ParadiseLostEntityTypes.java @@ -15,7 +15,6 @@ import net.id.paradiselost.mixin.brain.ActivityInvoker; import net.id.paradiselost.mixin.brain.MemoryModuleTypeInvoker; import net.id.paradiselost.mixin.brain.SensorTypeInvoker; -import net.id.paradiselost.registry.ParadiseLostRegistryQueues; import net.id.incubus_core.util.RegistryQueue.Action; import net.minecraft.entity.*; import net.minecraft.entity.ai.brain.Activity; diff --git a/src/main/java/net/id/paradiselost/entities/util/FloatingBlockHelperImpls.java b/src/main/java/net/id/paradiselost/entities/util/FloatingBlockHelperImpls.java index fa4d2376b..f23ddb6da 100644 --- a/src/main/java/net/id/paradiselost/entities/util/FloatingBlockHelperImpls.java +++ b/src/main/java/net/id/paradiselost/entities/util/FloatingBlockHelperImpls.java @@ -94,7 +94,7 @@ public boolean tryCreate(World world, BlockPos pos, boolean force) { if (impact >= 0.8) { BlockPos landingPos = entity.getBlockPos(); world.breakBlock(landingPos, false); - world.createExplosion(entity, landingPos.getX(), landingPos.getY(), landingPos.getZ(), (float) MathHelper.clamp(impact * 5.5, 0, 10), Explosion.DestructionType.BREAK); + world.createExplosion(entity, landingPos.getX(), landingPos.getY(), landingPos.getZ(), (float) MathHelper.clamp(impact * 5.5, 0, 10), World.ExplosionSourceType.BLOCK); } }); } diff --git a/src/main/java/net/id/paradiselost/fluids/ParadiseLostFluids.java b/src/main/java/net/id/paradiselost/fluids/ParadiseLostFluids.java index 80ea69392..2fc99f3b8 100644 --- a/src/main/java/net/id/paradiselost/fluids/ParadiseLostFluids.java +++ b/src/main/java/net/id/paradiselost/fluids/ParadiseLostFluids.java @@ -1,7 +1,6 @@ package net.id.paradiselost.fluids; import net.id.paradiselost.client.rendering.block.FluidRenderSetup; -import net.id.paradiselost.registry.ParadiseLostRegistryQueues; import net.id.paradiselost.util.RenderUtils; import net.id.incubus_core.util.RegistryQueue; import net.minecraft.client.color.world.BiomeColors; diff --git a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java index e27b49f56..2c2ecdd66 100644 --- a/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java +++ b/src/main/java/net/id/paradiselost/items/ParadiseLostItems.java @@ -17,7 +17,6 @@ import net.id.paradiselost.items.tools.bloodstone.CherineBloodstoneItem; import net.id.paradiselost.items.tools.bloodstone.SurtrumBloodstoneItem; import net.id.paradiselost.items.tools.bloodstone.OlviteBloodstoneItem; -import net.id.paradiselost.registry.ParadiseLostRegistryQueues; import net.id.incubus_core.util.RegistryQueue.Action; import net.id.paradiselost.util.EnumExtender; import net.minecraft.block.Block; diff --git a/src/main/java/net/id/paradiselost/registry/ParadiseLostRegistryQueues.java b/src/main/java/net/id/paradiselost/registry/ParadiseLostRegistryQueues.java deleted file mode 100644 index 47e727471..000000000 --- a/src/main/java/net/id/paradiselost/registry/ParadiseLostRegistryQueues.java +++ /dev/null @@ -1,17 +0,0 @@ -package net.id.paradiselost.registry; - -import net.id.incubus_core.util.RegistryQueue; -import net.minecraft.block.Block; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.effect.StatusEffect; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.Item; -import net.minecraft.util.registry.Registry; - -public final class ParadiseLostRegistryQueues { - public static final RegistryQueue BLOCK = new RegistryQueue<>(Registry.BLOCK, 256); - public static final RegistryQueue> ENTITY_TYPE = new RegistryQueue<>(Registry.ENTITY_TYPE, 32); - public static final RegistryQueue ITEM = new RegistryQueue<>(Registry.ITEM, 384); - public static final RegistryQueue FLUID = new RegistryQueue<>(Registry.FLUID, 1); - public static final RegistryQueue STATUS_EFFECT = new RegistryQueue<>(Registry.STATUS_EFFECT, 4); -} diff --git a/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java b/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java index 9d60c8172..ac4070120 100644 --- a/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java +++ b/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java @@ -4,10 +4,9 @@ import net.id.paradiselost.world.gen.carver.ParadiseLostCarvers; import net.minecraft.entity.EntityType; import net.minecraft.entity.SpawnGroup; -import net.minecraft.util.registry.BuiltinRegistries; -import net.minecraft.util.registry.Registry; -import net.minecraft.util.registry.RegistryEntry; -import net.minecraft.util.registry.RegistryKey; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.BiomeEffects; import net.minecraft.world.biome.GenerationSettings; @@ -38,15 +37,15 @@ * @author Gudenau */ public final class ParadiseLostBiomes { - public static final RegistryKey AUTUMNAL_TUNDRA_KEY = register("autumnal_tundra"); - public static final RegistryKey CONTINENTAL_PLATEAU_KEY = register("continental_plateau"); - public static final RegistryKey HIGHLANDS_PLAINS_KEY = register("highlands"); - public static final RegistryKey HIGHLANDS_FOREST_KEY = register("highlands_forest"); - public static final RegistryKey HIGHLANDS_GRAND_GLADE_KEY = register("highlands_grand_glade"); - public static final RegistryKey HIGHLANDS_SHIELD_KEY = register("highlands_shield"); - public static final RegistryKey HIGHLANDS_THICKET_KEY = register("highlands_thicket"); - public static final RegistryKey TRADEWINDS_KEY = register("tradewinds"); - public static final RegistryKey WISTERIA_WOODS_KEY = register("wisteria_woods"); + public static final RegistryKey> AUTUMNAL_TUNDRA_KEY = register("autumnal_tundra"); + public static final RegistryKey> CONTINENTAL_PLATEAU_KEY = register("continental_plateau"); + public static final RegistryKey> HIGHLANDS_PLAINS_KEY = register("highlands"); + public static final RegistryKey> HIGHLANDS_FOREST_KEY = register("highlands_forest"); + public static final RegistryKey> HIGHLANDS_GRAND_GLADE_KEY = register("highlands_grand_glade"); + public static final RegistryKey> HIGHLANDS_SHIELD_KEY = register("highlands_shield"); + public static final RegistryKey> HIGHLANDS_THICKET_KEY = register("highlands_thicket"); + public static final RegistryKey> TRADEWINDS_KEY = register("tradewinds"); + public static final RegistryKey> WISTERIA_WOODS_KEY = register("wisteria_woods"); public static final RegistryEntry AUTUMNAL_TUNDRA; public static final RegistryEntry CONTINENTAL_PLATEAU; @@ -69,15 +68,15 @@ public final class ParadiseLostBiomes { TRADEWINDS = register(TRADEWINDS_KEY, createTradewinds()); WISTERIA_WOODS = register(WISTERIA_WOODS_KEY, createWisteriaWoods()); } - + public static void init() { } - - private static RegistryKey register(String name) { + + private static RegistryKey> register(String name) { return RegistryKey.of(Registry.BIOME_KEY, locate(name)); } - - private static RegistryEntry register(RegistryKey key, Biome biome) { + + private static RegistryEntry register(RegistryKey> key, Biome biome) { return BuiltinRegistries.add(BuiltinRegistries.BIOME, key, biome); } @@ -319,7 +318,7 @@ private static Biome createHighlandsForest() { ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) ) )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.5F).downfall(1) + .precipitation(true).temperature(0.5F).downfall(1) // .category(Biome.Category.FOREST) .build(); } @@ -363,7 +362,7 @@ private static Biome createTradewinds() { ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) ) )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.5F).downfall(1) + .precipitation(true).temperature(0.5F).downfall(1) // .category(Biome.Category.FOREST) .build(); } @@ -503,7 +502,7 @@ private static Biome createWisteriaWoods() { ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) ) )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.5F).downfall(1) + .precipitation(true).temperature(0.5F).downfall(1) // .category(Biome.Category.FOREST) .build(); } diff --git a/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostVegetationPlacedFeatures.java b/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostVegetationPlacedFeatures.java index cf3ed923f..1f61d15e3 100644 --- a/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostVegetationPlacedFeatures.java +++ b/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostVegetationPlacedFeatures.java @@ -2,10 +2,10 @@ import net.id.paradiselost.world.feature.configured_features.ParadiseLostVegetationConfiguredFeatures; import net.id.paradiselost.world.feature.placement_modifiers.ChancePlacementModifier; +import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.math.Direction; import net.minecraft.util.math.intprovider.ConstantIntProvider; import net.minecraft.util.math.intprovider.UniformIntProvider; -import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.Heightmap; import net.minecraft.world.gen.YOffset; import net.minecraft.world.gen.blockpredicate.BlockPredicate;