BlockUtil replacement
This commit is contained in:
parent
c8cef8e055
commit
0b336febd8
114 changed files with 421 additions and 546 deletions
|
@ -21,10 +21,8 @@ import ru.betterend.recipe.InfusionRecipes;
|
||||||
import ru.betterend.recipe.SmithingRecipes;
|
import ru.betterend.recipe.SmithingRecipes;
|
||||||
import ru.betterend.registry.EndBiomes;
|
import ru.betterend.registry.EndBiomes;
|
||||||
import ru.betterend.registry.EndBlockEntities;
|
import ru.betterend.registry.EndBlockEntities;
|
||||||
import ru.betterend.registry.EndBlocks;
|
|
||||||
import ru.betterend.registry.EndEntities;
|
import ru.betterend.registry.EndEntities;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.registry.EndItems;
|
|
||||||
import ru.betterend.registry.EndPortals;
|
import ru.betterend.registry.EndPortals;
|
||||||
import ru.betterend.registry.EndSounds;
|
import ru.betterend.registry.EndSounds;
|
||||||
import ru.betterend.registry.EndStructures;
|
import ru.betterend.registry.EndStructures;
|
||||||
|
|
|
@ -15,11 +15,11 @@ import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.storage.loot.LootContext;
|
import net.minecraft.world.level.storage.loot.LootContext;
|
||||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndParticles;
|
import ru.betterend.registry.EndParticles;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class AncientEmeraldIceBlock extends BlockBase {
|
public class AncientEmeraldIceBlock extends BlockBase {
|
||||||
public AncientEmeraldIceBlock() {
|
public AncientEmeraldIceBlock() {
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class BlockProperties {
|
||||||
public static final BooleanProperty NATURAL = BooleanProperty.create("natural");
|
public static final BooleanProperty NATURAL = BooleanProperty.create("natural");
|
||||||
public static final BooleanProperty ACTIVE = BooleanProperty.create("active");
|
public static final BooleanProperty ACTIVE = BooleanProperty.create("active");
|
||||||
public static final BooleanProperty SMALL = BooleanProperty.create("small");
|
public static final BooleanProperty SMALL = BooleanProperty.create("small");
|
||||||
|
public static final BooleanProperty ROOTS = BooleanProperty.create("roots");
|
||||||
|
|
||||||
public static final IntegerProperty DESTRUCTION_LONG = IntegerProperty.create("destruction", 0, 8);
|
public static final IntegerProperty DESTRUCTION_LONG = IntegerProperty.create("destruction", 0, 8);
|
||||||
public static final IntegerProperty DESTRUCTION = IntegerProperty.create("destruction", 0, 2);
|
public static final IntegerProperty DESTRUCTION = IntegerProperty.create("destruction", 0, 2);
|
||||||
|
|
|
@ -7,12 +7,12 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.blocks.basis.FurBlock;
|
import ru.betterend.blocks.basis.FurBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,9 +20,9 @@ import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class BrimstoneBlock extends BlockBase {
|
public class BrimstoneBlock extends BlockBase {
|
||||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||||
|
|
|
@ -3,9 +3,9 @@ package ru.betterend.blocks;
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.color.block.BlockColor;
|
import net.minecraft.client.color.block.BlockColor;
|
||||||
import net.minecraft.client.color.item.ItemColor;
|
import net.minecraft.client.color.item.ItemColor;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.ColorUtil;
|
import ru.bclib.util.ColorUtil;
|
||||||
import ru.betterend.interfaces.IColorProvider;
|
import ru.betterend.interfaces.IColorProvider;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements IColorProvider {
|
public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements IColorProvider {
|
||||||
public BulbVineLanternColoredBlock(FabricBlockSettings settings) {
|
public BulbVineLanternColoredBlock(FabricBlockSettings settings) {
|
||||||
|
|
|
@ -8,10 +8,10 @@ import net.minecraft.world.level.LevelReader;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
|
public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -5,10 +5,10 @@ import java.util.Random;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,12 +20,12 @@ import net.minecraft.world.level.material.Material;
|
||||||
import net.minecraft.world.level.material.WaterFluid;
|
import net.minecraft.world.level.material.WaterFluid;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndLotusLeafBlock extends BlockBaseNotFull implements IRenderTypeable {
|
public class EndLotusLeafBlock extends BlockBaseNotFull implements IRenderTypeable {
|
||||||
public static final EnumProperty<Direction> HORIZONTAL_FACING = BlockStateProperties.HORIZONTAL_FACING;
|
public static final EnumProperty<Direction> HORIZONTAL_FACING = BlockStateProperties.HORIZONTAL_FACING;
|
||||||
|
|
|
@ -8,10 +8,10 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -25,11 +25,11 @@ import net.minecraft.world.level.material.FluidState;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndLotusStemBlock extends BlockBase implements SimpleWaterloggedBlock, IRenderTypeable {
|
public class EndLotusStemBlock extends BlockBase implements SimpleWaterloggedBlock, IRenderTypeable {
|
||||||
public static final EnumProperty<Direction> FACING = BlockStateProperties.FACING;
|
public static final EnumProperty<Direction> FACING = BlockStateProperties.FACING;
|
||||||
|
|
|
@ -13,11 +13,11 @@ import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class GlowingPillarSeedBlock extends EndPlantWithAgeBlock {
|
public class GlowingPillarSeedBlock extends EndPlantWithAgeBlock {
|
||||||
public GlowingPillarSeedBlock() {
|
public GlowingPillarSeedBlock() {
|
||||||
|
|
|
@ -11,9 +11,9 @@ import net.minecraft.client.renderer.block.model.BlockModel;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.client.models.ModelsHelper;
|
import ru.bclib.client.models.ModelsHelper;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.client.models.Patterns;
|
import ru.betterend.client.models.Patterns;
|
||||||
import ru.betterend.interfaces.IColorProvider;
|
import ru.betterend.interfaces.IColorProvider;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class HydraluxPetalColoredBlock extends HydraluxPetalBlock implements IColorProvider {
|
public class HydraluxPetalColoredBlock extends HydraluxPetalBlock implements IColorProvider {
|
||||||
public HydraluxPetalColoredBlock(FabricBlockSettings settings) {
|
public HydraluxPetalColoredBlock(FabricBlockSettings settings) {
|
||||||
|
|
|
@ -7,11 +7,11 @@ import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.HydraluxShape;
|
import ru.betterend.blocks.BlockProperties.HydraluxShape;
|
||||||
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock {
|
public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,11 +36,11 @@ import net.minecraft.world.level.material.Fluids;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||||
import ru.betterend.blocks.entities.BlockEntityHydrothermalVent;
|
import ru.betterend.blocks.entities.BlockEntityHydrothermalVent;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndParticles;
|
import ru.betterend.registry.EndParticles;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class HydrothermalVentBlock extends BlockBaseNotFull implements EntityBlock, LiquidBlockContainer, SimpleWaterloggedBlock {
|
public class HydrothermalVentBlock extends BlockBaseNotFull implements EntityBlock, LiquidBlockContainer, SimpleWaterloggedBlock {
|
||||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
package ru.betterend.blocks;
|
package ru.betterend.blocks;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.minecraft.client.color.block.BlockColor;
|
import net.minecraft.client.color.block.BlockColor;
|
||||||
import net.minecraft.client.color.item.ItemColor;
|
import net.minecraft.client.color.item.ItemColor;
|
||||||
|
@ -17,7 +23,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||||
import net.minecraft.world.level.storage.loot.LootContext;
|
import net.minecraft.world.level.storage.loot.LootContext;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
import ru.bclib.client.models.BlockModelProvider;
|
import ru.bclib.client.models.BlockModelProvider;
|
||||||
import ru.bclib.client.models.ModelsHelper;
|
import ru.bclib.client.models.ModelsHelper;
|
||||||
import ru.bclib.util.ColorUtil;
|
import ru.bclib.util.ColorUtil;
|
||||||
|
@ -28,9 +33,6 @@ import ru.betterend.interfaces.IColorProvider;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
public class JellyshroomCapBlock extends SlimeBlock implements IRenderTypeable, BlockModelProvider, IColorProvider {
|
public class JellyshroomCapBlock extends SlimeBlock implements IRenderTypeable, BlockModelProvider, IColorProvider {
|
||||||
public static final IntegerProperty COLOR = BlockProperties.COLOR;
|
public static final IntegerProperty COLOR = BlockProperties.COLOR;
|
||||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
||||||
|
|
|
@ -8,11 +8,11 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.PentaShape;
|
import ru.betterend.blocks.BlockProperties.PentaShape;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class LanceleafSeedBlock extends EndPlantWithAgeBlock {
|
public class LanceleafSeedBlock extends EndPlantWithAgeBlock {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -19,11 +19,11 @@ import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.material.FluidState;
|
import net.minecraft.world.level.material.FluidState;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class MengerSpongeWetBlock extends BlockBaseNotFull implements IRenderTypeable {
|
public class MengerSpongeWetBlock extends BlockBaseNotFull implements IRenderTypeable {
|
||||||
public MengerSpongeWetBlock() {
|
public MengerSpongeWetBlock() {
|
||||||
|
|
|
@ -38,6 +38,7 @@ import net.minecraft.world.level.pathfinder.PathComputationType;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.CactusBottom;
|
import ru.betterend.blocks.BlockProperties.CactusBottom;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
|
@ -45,7 +46,6 @@ import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class NeonCactusPlantBlock extends BlockBaseNotFull implements SimpleWaterloggedBlock, IRenderTypeable {
|
public class NeonCactusPlantBlock extends BlockBaseNotFull implements SimpleWaterloggedBlock, IRenderTypeable {
|
||||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||||
|
|
|
@ -35,6 +35,7 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
||||||
import net.minecraft.world.phys.BlockHitResult;
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.ColorUtil;
|
import ru.bclib.util.ColorUtil;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
|
@ -44,7 +45,6 @@ import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.particle.InfusionParticleType;
|
import ru.betterend.particle.InfusionParticleType;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class RespawnObeliskBlock extends BlockBase implements IColorProvider, IRenderTypeable {
|
public class RespawnObeliskBlock extends BlockBase implements IColorProvider, IRenderTypeable {
|
||||||
private static final VoxelShape VOXEL_SHAPE_BOTTOM = Block.box(1, 0, 1, 15, 16, 15);
|
private static final VoxelShape VOXEL_SHAPE_BOTTOM = Block.box(1, 0, 1, 15, 16, 15);
|
||||||
|
|
|
@ -29,12 +29,12 @@ import net.minecraft.world.level.material.Material;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraft.world.phys.BlockHitResult;
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.entity.SilkMothEntity;
|
import ru.betterend.entity.SilkMothEntity;
|
||||||
import ru.betterend.registry.EndEntities;
|
import ru.betterend.registry.EndEntities;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SilkMothHiveBlock extends BlockBase {
|
public class SilkMothHiveBlock extends BlockBase {
|
||||||
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
|
public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
|
||||||
|
|
|
@ -39,6 +39,7 @@ import net.minecraft.world.phys.BlockHitResult;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
|
@ -46,7 +47,6 @@ import ru.betterend.entity.SilkMothEntity;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.registry.EndEntities;
|
import ru.betterend.registry.EndEntities;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SilkMothNestBlock extends BlockBase implements IRenderTypeable {
|
public class SilkMothNestBlock extends BlockBase implements IRenderTypeable {
|
||||||
public static final BooleanProperty ACTIVE = BlockProperties.ACTIVE;
|
public static final BooleanProperty ACTIVE = BlockProperties.ACTIVE;
|
||||||
|
|
|
@ -12,10 +12,10 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SmallAmaranitaBlock extends EndPlantBlock {
|
public class SmallAmaranitaBlock extends EndPlantBlock {
|
||||||
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 10, 12);
|
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 10, 12);
|
||||||
|
|
|
@ -30,11 +30,11 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.AttachedBlock;
|
import ru.betterend.blocks.basis.AttachedBlock;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SmallJellyshroomBlock extends AttachedBlock implements IRenderTypeable, BonemealableBlock {
|
public class SmallJellyshroomBlock extends AttachedBlock implements IRenderTypeable, BonemealableBlock {
|
||||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||||
|
|
|
@ -9,10 +9,10 @@ import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class TwistedUmbrellaMossBlock extends EndPlantBlock {
|
public class TwistedUmbrellaMossBlock extends EndPlantBlock {
|
||||||
public TwistedUmbrellaMossBlock() {
|
public TwistedUmbrellaMossBlock() {
|
||||||
|
|
|
@ -9,10 +9,10 @@ import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class UmbrellaMossBlock extends EndPlantBlock {
|
public class UmbrellaMossBlock extends EndPlantBlock {
|
||||||
public UmbrellaMossBlock() {
|
public UmbrellaMossBlock() {
|
||||||
|
|
|
@ -17,10 +17,10 @@ import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
import net.minecraft.world.phys.BlockHitResult;
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class UmbrellaTreeClusterBlock extends BlockBase {
|
public class UmbrellaTreeClusterBlock extends BlockBase {
|
||||||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||||
|
|
|
@ -11,9 +11,9 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.BlockBase;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class UmbrellaTreeClusterEmptyBlock extends BlockBase {
|
public class UmbrellaTreeClusterEmptyBlock extends BlockBase {
|
||||||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||||
|
|
|
@ -29,8 +29,8 @@ import net.minecraft.world.level.material.Material;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class VentBubbleColumnBlock extends Block implements BucketPickup, LiquidBlockContainer {
|
public class VentBubbleColumnBlock extends Block implements BucketPickup, LiquidBlockContainer {
|
||||||
public VentBubbleColumnBlock() {
|
public VentBubbleColumnBlock() {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
|
||||||
public abstract class AttachedBlock extends BlockBaseNotFull {
|
public abstract class AttachedBlock extends BlockBaseNotFull {
|
||||||
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
public static final DirectionProperty FACING = BlockStateProperties.FACING;
|
||||||
|
|
|
@ -35,10 +35,10 @@ import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class DoublePlantBlock extends BlockBaseNotFull implements IRenderTypeable, BonemealableBlock {
|
public class DoublePlantBlock extends BlockBaseNotFull implements IRenderTypeable, BonemealableBlock {
|
||||||
private static final VoxelShape SHAPE = Block.box(4, 2, 4, 12, 16, 12);
|
private static final VoxelShape SHAPE = Block.box(4, 2, 4, 12, 16, 12);
|
||||||
|
|
|
@ -28,8 +28,8 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
||||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndCropBlock extends EndPlantBlock {
|
public class EndCropBlock extends EndPlantBlock {
|
||||||
private static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 14, 14);
|
private static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 14, 14);
|
||||||
|
|
|
@ -31,10 +31,10 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import ru.bclib.client.models.BlockModelProvider;
|
import ru.bclib.client.models.BlockModelProvider;
|
||||||
import ru.bclib.client.models.ModelsHelper;
|
import ru.bclib.client.models.ModelsHelper;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.client.models.Patterns;
|
import ru.betterend.client.models.Patterns;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndLadderBlock extends BlockBaseNotFull implements IRenderTypeable, BlockModelProvider {
|
public class EndLadderBlock extends BlockBaseNotFull implements IRenderTypeable, BlockModelProvider {
|
||||||
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ru.betterend.blocks.basis;
|
package ru.betterend.blocks.basis;
|
||||||
|
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
|
||||||
import ru.bclib.blocks.BasePathBlock;
|
import ru.bclib.blocks.BasePathBlock;
|
||||||
|
|
||||||
public class EndPathBlock extends BasePathBlock {
|
public class EndPathBlock extends BasePathBlock {
|
||||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
|
||||||
public class EndWallPlantBlock extends EndPlantBlock {
|
public class EndWallPlantBlock extends EndPlantBlock {
|
||||||
private static final EnumMap<Direction, VoxelShape> SHAPES = Maps.newEnumMap(ImmutableMap.of(
|
private static final EnumMap<Direction, VoxelShape> SHAPES = Maps.newEnumMap(ImmutableMap.of(
|
||||||
|
|
|
@ -32,11 +32,11 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.client.render.ERenderLayer;
|
import ru.betterend.client.render.ERenderLayer;
|
||||||
import ru.betterend.interfaces.IRenderTypeable;
|
import ru.betterend.interfaces.IRenderTypeable;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class VineBlock extends BlockBaseNotFull implements IRenderTypeable, BonemealableBlock {
|
public class VineBlock extends BlockBaseNotFull implements IRenderTypeable, BonemealableBlock {
|
||||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||||
|
|
|
@ -12,9 +12,9 @@ import net.minecraft.world.item.DyeItem;
|
||||||
import net.minecraft.world.level.ItemLike;
|
import net.minecraft.world.level.ItemLike;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.recipe.builders.GridRecipe;
|
import ru.betterend.recipe.builders.GridRecipe;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class ColoredMaterial {
|
public class ColoredMaterial {
|
||||||
private static final Map<Integer, ItemLike> DYES = Maps.newHashMap();
|
private static final Map<Integer, ItemLike> DYES = Maps.newHashMap();
|
||||||
|
|
|
@ -15,15 +15,31 @@ import net.minecraft.world.level.block.SoundType;
|
||||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
import ru.bclib.items.ModelProviderItem;
|
import ru.bclib.items.ModelProviderItem;
|
||||||
import ru.bclib.items.tool.*;
|
import ru.bclib.items.tool.BaseAxeItem;
|
||||||
|
import ru.bclib.items.tool.BaseHoeItem;
|
||||||
|
import ru.bclib.items.tool.BasePickaxeItem;
|
||||||
|
import ru.bclib.items.tool.BaseShovelItem;
|
||||||
|
import ru.bclib.items.tool.BaseSwordItem;
|
||||||
import ru.bclib.util.TagHelper;
|
import ru.bclib.util.TagHelper;
|
||||||
import ru.betterend.blocks.BulbVineLanternBlock;
|
import ru.betterend.blocks.BulbVineLanternBlock;
|
||||||
import ru.betterend.blocks.BulbVineLanternColoredBlock;
|
import ru.betterend.blocks.BulbVineLanternColoredBlock;
|
||||||
import ru.betterend.blocks.ChandelierBlock;
|
import ru.betterend.blocks.ChandelierBlock;
|
||||||
import ru.betterend.blocks.basis.*;
|
import ru.betterend.blocks.basis.BlockBase;
|
||||||
|
import ru.betterend.blocks.basis.EndAnvilBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndChainBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndDoorBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndMetalPaneBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndSlabBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndStairsBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndTrapdoorBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndWoodenPlateBlock;
|
||||||
import ru.betterend.item.EndArmorItem;
|
import ru.betterend.item.EndArmorItem;
|
||||||
import ru.betterend.item.tool.EndHammerItem;
|
import ru.betterend.item.tool.EndHammerItem;
|
||||||
import ru.betterend.recipe.builders.*;
|
import ru.betterend.recipe.builders.AlloyingRecipe;
|
||||||
|
import ru.betterend.recipe.builders.AnvilRecipe;
|
||||||
|
import ru.betterend.recipe.builders.FurnaceRecipe;
|
||||||
|
import ru.betterend.recipe.builders.GridRecipe;
|
||||||
|
import ru.betterend.recipe.builders.SmithingTableRecipe;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.registry.EndTags;
|
import ru.betterend.registry.EndTags;
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
package ru.betterend.blocks.entities;
|
package ru.betterend.blocks.entities;
|
||||||
|
|
||||||
import com.mojang.math.Vector3f;
|
import java.util.List;
|
||||||
import net.minecraft.core.BlockPos;
|
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.Vec3i;
|
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
import net.minecraft.world.entity.Entity;
|
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.entity.MoverType;
|
|
||||||
import net.minecraft.world.item.ElytraItem;
|
import net.minecraft.world.item.ElytraItem;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.ItemStack;
|
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.TickableBlockEntity;
|
import net.minecraft.world.level.block.entity.TickableBlockEntity;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
@ -24,9 +20,6 @@ import ru.betterend.registry.EndBlockEntities;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndParticles;
|
import ru.betterend.registry.EndParticles;
|
||||||
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class BlockEntityHydrothermalVent extends BlockEntity implements TickableBlockEntity {
|
public class BlockEntityHydrothermalVent extends BlockEntity implements TickableBlockEntity {
|
||||||
|
|
||||||
private final static Vec3 POSITIVE_Y = new Vec3(0.0f, 1.0f, 0.0f);
|
private final static Vec3 POSITIVE_Y = new Vec3(0.0f, 1.0f, 0.0f);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ru.betterend.client;
|
package ru.betterend.client;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
|
@ -10,7 +12,6 @@ import net.minecraft.network.chat.TextComponent;
|
||||||
import net.minecraft.network.chat.TranslatableComponent;
|
import net.minecraft.network.chat.TranslatableComponent;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.level.block.Block;
|
|
||||||
import ru.bclib.blocks.BaseChestBlock;
|
import ru.bclib.blocks.BaseChestBlock;
|
||||||
import ru.bclib.blocks.BaseSignBlock;
|
import ru.bclib.blocks.BaseSignBlock;
|
||||||
import ru.bclib.client.render.BaseChestBlockEntityRenderer;
|
import ru.bclib.client.render.BaseChestBlockEntityRenderer;
|
||||||
|
@ -29,8 +30,6 @@ import ru.betterend.registry.EndModelProviders;
|
||||||
import ru.betterend.registry.EndParticles;
|
import ru.betterend.registry.EndParticles;
|
||||||
import ru.betterend.registry.EndScreens;
|
import ru.betterend.registry.EndScreens;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class BetterEndClient implements ClientModInitializer {
|
public class BetterEndClient implements ClientModInitializer {
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
|
|
|
@ -20,9 +20,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.betterend.blocks.EternalPedestal;
|
import ru.betterend.blocks.EternalPedestal;
|
||||||
import ru.betterend.blocks.basis.PedestalBlock;
|
import ru.betterend.blocks.basis.PedestalBlock;
|
||||||
import ru.betterend.blocks.entities.PedestalBlockEntity;
|
import ru.betterend.blocks.entities.PedestalBlockEntity;
|
||||||
import ru.betterend.client.render.BeamRenderer;
|
|
||||||
import ru.betterend.client.render.EndCrystalRenderer;
|
|
||||||
import ru.betterend.client.render.EternalCrystalRenderer;
|
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,10 @@ import net.minecraft.world.level.levelgen.Heightmap.Types;
|
||||||
import net.minecraft.world.level.pathfinder.BlockPathTypes;
|
import net.minecraft.world.level.pathfinder.BlockPathTypes;
|
||||||
import net.minecraft.world.level.pathfinder.Path;
|
import net.minecraft.world.level.pathfinder.Path;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.registry.EndEntities;
|
import ru.betterend.registry.EndEntities;
|
||||||
import ru.betterend.registry.EndSounds;
|
import ru.betterend.registry.EndSounds;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class DragonflyEntity extends Animal implements FlyingAnimal {
|
public class DragonflyEntity extends Animal implements FlyingAnimal {
|
||||||
public DragonflyEntity(EntityType<DragonflyEntity> entityType, Level world) {
|
public DragonflyEntity(EntityType<DragonflyEntity> entityType, Level world) {
|
||||||
|
|
|
@ -38,10 +38,10 @@ import net.minecraft.world.level.ServerLevelAccessor;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.interfaces.ISlime;
|
import ru.betterend.interfaces.ISlime;
|
||||||
import ru.betterend.registry.EndBiomes;
|
import ru.betterend.registry.EndBiomes;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.biome.EndBiome;
|
import ru.betterend.world.biome.EndBiome;
|
||||||
|
|
||||||
public class EndSlimeEntity extends Slime {
|
public class EndSlimeEntity extends Slime {
|
||||||
|
|
|
@ -46,13 +46,13 @@ import net.minecraft.world.level.levelgen.Heightmap.Types;
|
||||||
import net.minecraft.world.level.pathfinder.BlockPathTypes;
|
import net.minecraft.world.level.pathfinder.BlockPathTypes;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndEntities;
|
import ru.betterend.registry.EndEntities;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SilkMothEntity extends Animal implements FlyingAnimal {
|
public class SilkMothEntity extends Animal implements FlyingAnimal {
|
||||||
private BlockPos hivePos;
|
private BlockPos hivePos;
|
||||||
|
|
|
@ -25,10 +25,10 @@ import ru.bclib.sdf.operator.SDFFlatWave;
|
||||||
import ru.bclib.sdf.operator.SDFSmoothUnion;
|
import ru.bclib.sdf.operator.SDFSmoothUnion;
|
||||||
import ru.bclib.sdf.primitive.SDFCappedCone;
|
import ru.bclib.sdf.primitive.SDFCappedCone;
|
||||||
import ru.bclib.sdf.primitive.SDFSphere;
|
import ru.bclib.sdf.primitive.SDFSphere;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.bclib.util.SplineHelper;
|
import ru.bclib.util.SplineHelper;
|
||||||
import ru.betterend.integration.Integrations;
|
import ru.betterend.integration.Integrations;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class GreatNightshadeTreeFeature extends DefaultFeature {
|
public class GreatNightshadeTreeFeature extends DefaultFeature {
|
||||||
|
|
|
@ -25,10 +25,10 @@ import ru.bclib.sdf.operator.SDFFlatWave;
|
||||||
import ru.bclib.sdf.operator.SDFSmoothUnion;
|
import ru.bclib.sdf.operator.SDFSmoothUnion;
|
||||||
import ru.bclib.sdf.primitive.SDFCappedCone;
|
import ru.bclib.sdf.primitive.SDFCappedCone;
|
||||||
import ru.bclib.sdf.primitive.SDFSphere;
|
import ru.bclib.sdf.primitive.SDFSphere;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.bclib.util.SplineHelper;
|
import ru.bclib.util.SplineHelper;
|
||||||
import ru.betterend.integration.Integrations;
|
import ru.betterend.integration.Integrations;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class NightshadeRedwoodTreeFeature extends DefaultFeature {
|
public class NightshadeRedwoodTreeFeature extends DefaultFeature {
|
||||||
|
|
|
@ -14,10 +14,10 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.BlockAndTintGetter;
|
import net.minecraft.world.level.BlockAndTintGetter;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.ColorUtil;
|
import ru.bclib.util.ColorUtil;
|
||||||
import ru.betterend.client.ClientOptions;
|
import ru.betterend.client.ClientOptions;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
@Mixin(BiomeColors.class)
|
@Mixin(BiomeColors.class)
|
||||||
public class BiomeColorsMixin {
|
public class BiomeColorsMixin {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package ru.betterend.mixin.client;
|
package ru.betterend.mixin.client;
|
||||||
|
|
||||||
import net.minecraft.client.resources.model.ModelBakery;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
|
|
||||||
|
import net.minecraft.client.resources.model.ModelBakery;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import ru.betterend.world.generator.GeneratorOptions;
|
import ru.betterend.world.generator.GeneratorOptions;
|
||||||
|
|
||||||
@Mixin(ModelBakery.class)
|
@Mixin(ModelBakery.class)
|
||||||
|
|
|
@ -27,8 +27,9 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.generator.GeneratorOptions;
|
import ru.betterend.world.generator.GeneratorOptions;
|
||||||
|
|
||||||
@Mixin(value = ChorusFlowerBlock.class, priority = 100)
|
@Mixin(value = ChorusFlowerBlock.class, priority = 100)
|
||||||
|
@ -61,7 +62,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
|
||||||
if (i < 5) {
|
if (i < 5) {
|
||||||
this.placeGrownFlower(world, up, i + 1);
|
this.placeGrownFlower(world, up, i + 1);
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true).setValue(BlocksHelper.ROOTS, true));
|
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true).setValue(BlockProperties.ROOTS, true));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true));
|
BlocksHelper.setWithoutUpdate(world, pos, plant.defaultBlockState().setValue(ChorusPlantBlock.UP, true).setValue(ChorusPlantBlock.DOWN, true));
|
||||||
|
@ -76,7 +77,7 @@ public abstract class ChorusFlowerBlockMixin extends Block {
|
||||||
private static void be_generatePlant(LevelAccessor world, BlockPos pos, Random random, int size, CallbackInfo info) {
|
private static void be_generatePlant(LevelAccessor world, BlockPos pos, Random random, int size, CallbackInfo info) {
|
||||||
BlockState state = world.getBlockState(pos);
|
BlockState state = world.getBlockState(pos);
|
||||||
if (GeneratorOptions.changeChorusPlant() && state.is(Blocks.CHORUS_PLANT)) {
|
if (GeneratorOptions.changeChorusPlant() && state.is(Blocks.CHORUS_PLANT)) {
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, state.setValue(BlocksHelper.ROOTS, true));
|
BlocksHelper.setWithoutUpdate(world, pos, state.setValue(BlockProperties.ROOTS, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.generator.GeneratorOptions;
|
import ru.betterend.world.generator.GeneratorOptions;
|
||||||
|
|
||||||
@Mixin(value = ChorusPlantBlock.class, priority = 100)
|
@Mixin(value = ChorusPlantBlock.class, priority = 100)
|
||||||
|
@ -34,7 +34,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
@Inject(method = "<init>*", at = @At("TAIL"))
|
@Inject(method = "<init>*", at = @At("TAIL"))
|
||||||
private void beOnInit(BlockBehaviour.Properties settings, CallbackInfo info) {
|
private void beOnInit(BlockBehaviour.Properties settings, CallbackInfo info) {
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
this.registerDefaultState(this.defaultBlockState().setValue(BlocksHelper.ROOTS, false));
|
this.registerDefaultState(this.defaultBlockState().setValue(BlockProperties.ROOTS, false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
private void be_createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder, CallbackInfo info) {
|
private void be_createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder, CallbackInfo info) {
|
||||||
GeneratorOptions.init();
|
GeneratorOptions.init();
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
builder.add(BlocksHelper.ROOTS);
|
builder.add(BlockProperties.ROOTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
BlockState plant = info.getReturnValue();
|
BlockState plant = info.getReturnValue();
|
||||||
if (ctx.canPlace() && plant.is(Blocks.CHORUS_PLANT) && world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
if (ctx.canPlace() && plant.is(Blocks.CHORUS_PLANT) && world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
info.setReturnValue(plant.setValue(BlocksHelper.ROOTS, true).setValue(BlockStateProperties.DOWN, true));
|
info.setReturnValue(plant.setValue(BlockProperties.ROOTS, true).setValue(BlockStateProperties.DOWN, true));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true));
|
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true));
|
||||||
|
@ -71,7 +71,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
if (plant.is(Blocks.CHORUS_PLANT)) {
|
if (plant.is(Blocks.CHORUS_PLANT)) {
|
||||||
if (blockGetter.getBlockState(blockPos.below()).is(TagAPI.END_GROUND)) {
|
if (blockGetter.getBlockState(blockPos.below()).is(TagAPI.END_GROUND)) {
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true).setValue(BlocksHelper.ROOTS, true));
|
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true).setValue(BlockProperties.ROOTS, true));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true));
|
info.setReturnValue(plant.setValue(BlockStateProperties.DOWN, true));
|
||||||
|
@ -80,7 +80,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
info.setReturnValue(plant.setValue(BlocksHelper.ROOTS, false));
|
info.setReturnValue(plant.setValue(BlockProperties.ROOTS, false));
|
||||||
}
|
}
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
if (plant.is(Blocks.CHORUS_PLANT)) {
|
if (plant.is(Blocks.CHORUS_PLANT)) {
|
||||||
if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
if (world.getBlockState(pos.below()).is(TagAPI.END_GROUND)) {
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
plant = plant.setValue(BlockStateProperties.DOWN, true).setValue(BlocksHelper.ROOTS, true);
|
plant = plant.setValue(BlockStateProperties.DOWN, true).setValue(BlockProperties.ROOTS, true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
plant = plant.setValue(BlockStateProperties.DOWN, true);
|
plant = plant.setValue(BlockStateProperties.DOWN, true);
|
||||||
|
@ -111,7 +111,7 @@ public abstract class ChorusPlantBlockMixin extends Block {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (GeneratorOptions.changeChorusPlant()) {
|
if (GeneratorOptions.changeChorusPlant()) {
|
||||||
plant = plant.setValue(BlocksHelper.ROOTS, false);
|
plant = plant.setValue(BlockProperties.ROOTS, false);
|
||||||
}
|
}
|
||||||
info.cancel();
|
info.cancel();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,10 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.ChorusPlantFeature;
|
import net.minecraft.world.level.levelgen.feature.ChorusPlantFeature;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.generator.GeneratorOptions;
|
import ru.betterend.world.generator.GeneratorOptions;
|
||||||
|
|
||||||
@Mixin(ChorusPlantFeature.class)
|
@Mixin(ChorusPlantFeature.class)
|
||||||
|
@ -30,7 +31,7 @@ public class ChorusPlantFeatureMixin {
|
||||||
BlockState bottom = structureWorldAccess.getBlockState(blockPos);
|
BlockState bottom = structureWorldAccess.getBlockState(blockPos);
|
||||||
if (bottom.is(Blocks.CHORUS_PLANT)) {
|
if (bottom.is(Blocks.CHORUS_PLANT)) {
|
||||||
if ((GeneratorOptions.changeChorusPlant())) {
|
if ((GeneratorOptions.changeChorusPlant())) {
|
||||||
BlocksHelper.setWithoutUpdate(structureWorldAccess, blockPos, bottom.setValue(BlocksHelper.ROOTS, true).setValue(PipeBlock.DOWN, true));
|
BlocksHelper.setWithoutUpdate(structureWorldAccess, blockPos, bottom.setValue(BlockProperties.ROOTS, true).setValue(PipeBlock.DOWN, true));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BlocksHelper.setWithoutUpdate(structureWorldAccess, blockPos, bottom.setValue(PipeBlock.DOWN, true));
|
BlocksHelper.setWithoutUpdate(structureWorldAccess, blockPos, bottom.setValue(PipeBlock.DOWN, true));
|
||||||
|
|
|
@ -21,7 +21,7 @@ import net.minecraft.world.level.block.state.pattern.BlockPattern;
|
||||||
import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
|
import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
|
||||||
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.world.generator.GeneratorOptions;
|
import ru.betterend.world.generator.GeneratorOptions;
|
||||||
|
|
||||||
@Mixin(EndDragonFight.class)
|
@Mixin(EndDragonFight.class)
|
||||||
|
|
|
@ -20,12 +20,12 @@ import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.item.ArmoredElytra;
|
import ru.betterend.item.ArmoredElytra;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
@Mixin(Player.class)
|
@Mixin(Player.class)
|
||||||
public abstract class PlayerMixin extends LivingEntity {
|
public abstract class PlayerMixin extends LivingEntity {
|
||||||
|
|
|
@ -25,9 +25,9 @@ import net.minecraft.world.level.levelgen.feature.SpikeFeature;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.SpikeConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.SpikeConfiguration;
|
||||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
|
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
|
||||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.StructureHelper;
|
import ru.bclib.util.StructureHelper;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.util.WorldDataUtil;
|
import ru.betterend.util.WorldDataUtil;
|
||||||
import ru.betterend.world.generator.GeneratorOptions;
|
import ru.betterend.world.generator.GeneratorOptions;
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
package ru.betterend.registry;
|
package ru.betterend.registry;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.world.item.BlockItem;
|
import net.minecraft.world.item.BlockItem;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||||
import ru.bclib.blocks.BaseChestBlock;
|
|
||||||
import ru.bclib.registry.BaseRegistry;
|
import ru.bclib.registry.BaseRegistry;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.blocks.EndStoneSmelter;
|
import ru.betterend.blocks.EndStoneSmelter;
|
||||||
import ru.betterend.blocks.EternalPedestal;
|
import ru.betterend.blocks.EternalPedestal;
|
||||||
import ru.betterend.blocks.InfusionPedestal;
|
import ru.betterend.blocks.InfusionPedestal;
|
||||||
import ru.betterend.blocks.basis.PedestalBlock;
|
import ru.betterend.blocks.basis.PedestalBlock;
|
||||||
import ru.betterend.blocks.entities.*;
|
import ru.betterend.blocks.entities.BlockEntityHydrothermalVent;
|
||||||
|
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||||
import java.util.List;
|
import ru.betterend.blocks.entities.EternalPedestalEntity;
|
||||||
|
import ru.betterend.blocks.entities.InfusionPedestalEntity;
|
||||||
|
import ru.betterend.blocks.entities.PedestalBlockEntity;
|
||||||
|
|
||||||
public class EndBlockEntities {
|
public class EndBlockEntities {
|
||||||
public final static BlockEntityType<EndStoneSmelterBlockEntity> END_STONE_SMELTER = registerBlockEntity(EndStoneSmelter.ID,
|
public final static BlockEntityType<EndStoneSmelterBlockEntity> END_STONE_SMELTER = registerBlockEntity(EndStoneSmelter.ID,
|
||||||
|
|
|
@ -1,20 +1,36 @@
|
||||||
package ru.betterend.registry;
|
package ru.betterend.registry;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.item.CreativeModeTab;
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import ru.bclib.blocks.BaseBarrelBlock;
|
||||||
import ru.bclib.blocks.*;
|
import ru.bclib.blocks.BaseChestBlock;
|
||||||
|
import ru.bclib.blocks.BaseFurnaceBlock;
|
||||||
|
import ru.bclib.blocks.BaseSignBlock;
|
||||||
import ru.bclib.registry.BaseBlockEntities;
|
import ru.bclib.registry.BaseBlockEntities;
|
||||||
import ru.bclib.registry.BlocksRegistry;
|
import ru.bclib.registry.BlocksRegistry;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.blocks.*;
|
import ru.betterend.blocks.*;
|
||||||
import ru.betterend.blocks.basis.*;
|
import ru.betterend.blocks.basis.EndCropBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndFurnaceBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndLeavesBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndOreBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndPathBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndPillarBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndSlabBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndStairsBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndTerrainBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndUnderwaterWallPlantBlock;
|
||||||
|
import ru.betterend.blocks.basis.EndWallPlantBlock;
|
||||||
|
import ru.betterend.blocks.basis.FurBlock;
|
||||||
import ru.betterend.blocks.basis.SimpleLeavesBlock;
|
import ru.betterend.blocks.basis.SimpleLeavesBlock;
|
||||||
import ru.betterend.blocks.basis.StalactiteBlock;
|
import ru.betterend.blocks.basis.StalactiteBlock;
|
||||||
|
import ru.betterend.blocks.basis.StoneLanternBlock;
|
||||||
import ru.betterend.blocks.basis.TripleTerrainBlock;
|
import ru.betterend.blocks.basis.TripleTerrainBlock;
|
||||||
import ru.betterend.blocks.basis.VineBlock;
|
import ru.betterend.blocks.basis.VineBlock;
|
||||||
import ru.betterend.blocks.basis.WallMushroomBlock;
|
import ru.betterend.blocks.basis.WallMushroomBlock;
|
||||||
|
@ -28,8 +44,6 @@ import ru.betterend.item.material.EndArmorMaterial;
|
||||||
import ru.betterend.item.material.EndToolMaterial;
|
import ru.betterend.item.material.EndToolMaterial;
|
||||||
import ru.betterend.tab.CreativeTabs;
|
import ru.betterend.tab.CreativeTabs;
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
public class EndBlocks extends BlocksRegistry {
|
public class EndBlocks extends BlocksRegistry {
|
||||||
// Terrain //
|
// Terrain //
|
||||||
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ru.betterend.registry;
|
package ru.betterend.registry;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
|
@ -9,14 +11,29 @@ import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.EquipmentSlot;
|
import net.minecraft.world.entity.EquipmentSlot;
|
||||||
import net.minecraft.world.food.FoodProperties;
|
import net.minecraft.world.food.FoodProperties;
|
||||||
import net.minecraft.world.food.Foods;
|
import net.minecraft.world.food.Foods;
|
||||||
import net.minecraft.world.item.*;
|
import net.minecraft.world.item.ArmorItem;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.Items;
|
||||||
|
import net.minecraft.world.item.TieredItem;
|
||||||
|
import net.minecraft.world.item.Tiers;
|
||||||
import ru.bclib.items.BaseArmorItem;
|
import ru.bclib.items.BaseArmorItem;
|
||||||
import ru.bclib.items.tool.*;
|
import ru.bclib.items.tool.BaseAxeItem;
|
||||||
|
import ru.bclib.items.tool.BaseHoeItem;
|
||||||
|
import ru.bclib.items.tool.BasePickaxeItem;
|
||||||
|
import ru.bclib.items.tool.BaseShovelItem;
|
||||||
|
import ru.bclib.items.tool.BaseSwordItem;
|
||||||
import ru.bclib.registry.ItemsRegistry;
|
import ru.bclib.registry.ItemsRegistry;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.config.Configs;
|
import ru.betterend.config.Configs;
|
||||||
import ru.betterend.item.*;
|
import ru.betterend.item.ArmoredElytra;
|
||||||
|
import ru.betterend.item.CrystaliteBoots;
|
||||||
|
import ru.betterend.item.CrystaliteChestplate;
|
||||||
|
import ru.betterend.item.CrystaliteHelmet;
|
||||||
|
import ru.betterend.item.CrystaliteLeggings;
|
||||||
|
import ru.betterend.item.EnchantedPetalItem;
|
||||||
|
import ru.betterend.item.EndBucketItem;
|
||||||
|
import ru.betterend.item.EternalCrystalItem;
|
||||||
import ru.betterend.item.material.EndArmorMaterial;
|
import ru.betterend.item.material.EndArmorMaterial;
|
||||||
import ru.betterend.item.material.EndToolMaterial;
|
import ru.betterend.item.material.EndToolMaterial;
|
||||||
import ru.betterend.item.tool.EndHammerItem;
|
import ru.betterend.item.tool.EndHammerItem;
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
package ru.betterend.tab;
|
package ru.betterend.tab;
|
||||||
|
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
||||||
import net.minecraft.core.Registry;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
import net.minecraft.world.item.BlockItem;
|
|
||||||
import net.minecraft.world.item.CreativeModeTab;
|
import net.minecraft.world.item.CreativeModeTab;
|
||||||
import net.minecraft.world.item.Item;
|
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndItems;
|
import ru.betterend.registry.EndItems;
|
||||||
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class CreativeTabs {
|
public class CreativeTabs {
|
||||||
public static final CreativeModeTab TAB_BLOCKS;
|
public static final CreativeModeTab TAB_BLOCKS;
|
||||||
public static final CreativeModeTab TAB_ITEMS;
|
public static final CreativeModeTab TAB_ITEMS;
|
||||||
|
|
206
src/main/java/ru/betterend/util/BlockFixer.java
Normal file
206
src/main/java/ru/betterend/util/BlockFixer.java
Normal file
|
@ -0,0 +1,206 @@
|
||||||
|
package ru.betterend.util;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
import net.minecraft.world.level.block.FallingBlock;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
import ru.betterend.blocks.BlueVineBlock;
|
||||||
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
|
import ru.betterend.blocks.basis.FurBlock;
|
||||||
|
import ru.betterend.blocks.basis.StalactiteBlock;
|
||||||
|
import ru.betterend.blocks.basis.VineBlock;
|
||||||
|
import ru.betterend.registry.EndBlocks;
|
||||||
|
|
||||||
|
public class BlockFixer {
|
||||||
|
private static final MutableBlockPos POS = new MutableBlockPos();
|
||||||
|
private static final BlockState AIR = Blocks.AIR.defaultBlockState();
|
||||||
|
private static final BlockState WATER = Blocks.WATER.defaultBlockState();
|
||||||
|
|
||||||
|
public static void fixBlocks(LevelAccessor world, BlockPos start, BlockPos end) {
|
||||||
|
BlockState state;
|
||||||
|
Set<BlockPos> doubleCheck = Sets.newHashSet();
|
||||||
|
for (int x = start.getX(); x <= end.getX(); x++) {
|
||||||
|
POS.setX(x);
|
||||||
|
for (int z = start.getZ(); z <= end.getZ(); z++) {
|
||||||
|
POS.setZ(z);
|
||||||
|
for (int y = start.getY(); y <= end.getY(); y++) {
|
||||||
|
POS.setY(y);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
|
||||||
|
if (state.getBlock() instanceof FurBlock) {
|
||||||
|
doubleCheck.add(POS.immutable());
|
||||||
|
}
|
||||||
|
// Liquids
|
||||||
|
else if (!state.getFluidState().isEmpty()) {
|
||||||
|
if (!state.canSurvive(world, POS)) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, WATER);
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
while (!state.canSurvive(world, POS)) {
|
||||||
|
state = state.getFluidState().isEmpty() ? AIR : WATER;
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, state);
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
POS.setY(y - 1);
|
||||||
|
if (world.isEmptyBlock(POS)) {
|
||||||
|
POS.setY(y);
|
||||||
|
while (!world.getFluidState(POS).isEmpty()) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() + 1);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||||
|
if (world.isEmptyBlock(POS.relative(dir))) {
|
||||||
|
world.getLiquidTicks().scheduleTick(POS, state.getFluidState().getType(), 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (state.is(EndBlocks.SMARAGDANT_CRYSTAL)) {
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
if (world.isEmptyBlock(POS)) {
|
||||||
|
POS.setY(POS.getY() + 1);
|
||||||
|
while (state.is(EndBlocks.SMARAGDANT_CRYSTAL)) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() + 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (state.getBlock() instanceof StalactiteBlock) {
|
||||||
|
if (!state.canSurvive(world, POS)) {
|
||||||
|
if (world.getBlockState(POS.above()).getBlock() instanceof StalactiteBlock) {
|
||||||
|
while (state.getBlock() instanceof StalactiteBlock) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() + 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
while (state.getBlock() instanceof StalactiteBlock) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (state.is(EndBlocks.CAVE_PUMPKIN)) {
|
||||||
|
if (!world.getBlockState(POS.above()).is(EndBlocks.CAVE_PUMPKIN_SEED)) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!state.canSurvive(world, POS)) {
|
||||||
|
// Chorus
|
||||||
|
if (state.is(Blocks.CHORUS_PLANT)) {
|
||||||
|
Set<BlockPos> ends = Sets.newHashSet();
|
||||||
|
Set<BlockPos> add = Sets.newHashSet();
|
||||||
|
ends.add(POS.immutable());
|
||||||
|
|
||||||
|
for (int i = 0; i < 64 && !ends.isEmpty(); i++) {
|
||||||
|
ends.forEach((pos) -> {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, pos, AIR);
|
||||||
|
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||||
|
BlockPos p = pos.relative(dir);
|
||||||
|
BlockState st = world.getBlockState(p);
|
||||||
|
if ((st.is(Blocks.CHORUS_PLANT) || st.is(Blocks.CHORUS_FLOWER)) && !st.canSurvive(world, p)) {
|
||||||
|
add.add(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BlockPos p = pos.above();
|
||||||
|
BlockState st = world.getBlockState(p);
|
||||||
|
if ((st.is(Blocks.CHORUS_PLANT) || st.is(Blocks.CHORUS_FLOWER)) && !st.canSurvive(world, p)) {
|
||||||
|
add.add(p);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ends.clear();
|
||||||
|
ends.addAll(add);
|
||||||
|
add.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Vines
|
||||||
|
else if (state.getBlock() instanceof VineBlock) {
|
||||||
|
while (world.getBlockState(POS).getBlock() instanceof VineBlock) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Falling blocks
|
||||||
|
else if (state.getBlock() instanceof FallingBlock) {
|
||||||
|
BlockState falling = state;
|
||||||
|
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
|
||||||
|
int ray = BlocksHelper.downRayRep(world, POS.immutable(), 64);
|
||||||
|
if (ray > 32) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.defaultBlockState());
|
||||||
|
if (world.getRandom().nextBoolean()) {
|
||||||
|
POS.setY(POS.getY() - 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.defaultBlockState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
POS.setY(y);
|
||||||
|
BlockState replacement = AIR;
|
||||||
|
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||||
|
state = world.getBlockState(POS.relative(dir));
|
||||||
|
if (!state.getFluidState().isEmpty()) {
|
||||||
|
replacement = state;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, replacement);
|
||||||
|
POS.setY(y - ray);
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, falling);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Blocks without support
|
||||||
|
else {
|
||||||
|
// Blue Vine
|
||||||
|
if (state.getBlock() instanceof BlueVineBlock) {
|
||||||
|
while (state.is(EndBlocks.BLUE_VINE) || state.is(EndBlocks.BLUE_VINE_LANTERN) || state.is(EndBlocks.BLUE_VINE_FUR)) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() + 1);
|
||||||
|
state = world.getBlockState(POS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Double plants
|
||||||
|
if (state.getBlock() instanceof DoublePlantBlock) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
POS.setY(POS.getY() + 1);
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
||||||
|
}
|
||||||
|
// Other blocks
|
||||||
|
else {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, POS, getAirOrFluid(state));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
doubleCheck.forEach((pos) -> {
|
||||||
|
if (!world.getBlockState(pos).canSurvive(world, pos)) {
|
||||||
|
BlocksHelper.setWithoutUpdate(world, pos, AIR);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static BlockState getAirOrFluid(BlockState state) {
|
||||||
|
return state.getFluidState().isEmpty() ? AIR : state.getFluidState().createLegacyBlock();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,371 +0,0 @@
|
||||||
package ru.betterend.util;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import com.google.common.collect.Maps;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
|
||||||
import net.minecraft.core.Direction;
|
|
||||||
import net.minecraft.core.Vec3i;
|
|
||||||
import net.minecraft.tags.BlockTags;
|
|
||||||
import net.minecraft.world.level.LevelAccessor;
|
|
||||||
import net.minecraft.world.level.block.Block;
|
|
||||||
import net.minecraft.world.level.block.Blocks;
|
|
||||||
import net.minecraft.world.level.block.FallingBlock;
|
|
||||||
import net.minecraft.world.level.block.Mirror;
|
|
||||||
import net.minecraft.world.level.block.Rotation;
|
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
|
||||||
import net.minecraft.world.level.block.state.properties.Property;
|
|
||||||
import ru.bclib.api.TagAPI;
|
|
||||||
import ru.betterend.blocks.BlueVineBlock;
|
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
|
||||||
import ru.betterend.blocks.basis.FurBlock;
|
|
||||||
import ru.betterend.blocks.basis.StalactiteBlock;
|
|
||||||
import ru.betterend.blocks.basis.VineBlock;
|
|
||||||
import ru.betterend.registry.EndBlocks;
|
|
||||||
|
|
||||||
public class BlocksHelper {
|
|
||||||
public static final BooleanProperty ROOTS = BooleanProperty.create("roots");
|
|
||||||
private static final Map<Block, Integer> COLOR_BY_BLOCK = Maps.newHashMap();
|
|
||||||
|
|
||||||
public static final int FLAG_UPDATE_BLOCK = 1;
|
|
||||||
public static final int FLAG_SEND_CLIENT_CHANGES = 2;
|
|
||||||
public static final int FLAG_NO_RERENDER = 4;
|
|
||||||
public static final int FORSE_RERENDER = 8;
|
|
||||||
public static final int FLAG_IGNORE_OBSERVERS = 16;
|
|
||||||
|
|
||||||
public static final int SET_SILENT = FLAG_UPDATE_BLOCK | FLAG_IGNORE_OBSERVERS | FLAG_SEND_CLIENT_CHANGES;
|
|
||||||
public static final int SET_OBSERV = FLAG_UPDATE_BLOCK | FLAG_SEND_CLIENT_CHANGES;
|
|
||||||
public static final Direction[] HORIZONTAL = makeHorizontal();
|
|
||||||
public static final Direction[] DIRECTIONS = Direction.values();
|
|
||||||
|
|
||||||
private static final MutableBlockPos POS = new MutableBlockPos();
|
|
||||||
protected static final BlockState AIR = Blocks.AIR.defaultBlockState();
|
|
||||||
protected static final BlockState WATER = Blocks.WATER.defaultBlockState();
|
|
||||||
|
|
||||||
private static final Vec3i[] OFFSETS = new Vec3i[] {
|
|
||||||
new Vec3i(-1, -1, -1), new Vec3i(-1, -1, 0), new Vec3i(-1, -1, 1),
|
|
||||||
new Vec3i(-1, 0, -1), new Vec3i(-1, 0, 0), new Vec3i(-1, 0, 1),
|
|
||||||
new Vec3i(-1, 1, -1), new Vec3i(-1, 1, 0), new Vec3i(-1, 1, 1),
|
|
||||||
|
|
||||||
new Vec3i(0, -1, -1), new Vec3i(0, -1, 0), new Vec3i(0, -1, 1),
|
|
||||||
new Vec3i(0, 0, -1), new Vec3i(0, 0, 0), new Vec3i(0, 0, 1),
|
|
||||||
new Vec3i(0, 1, -1), new Vec3i(0, 1, 0), new Vec3i(0, 1, 1),
|
|
||||||
|
|
||||||
new Vec3i(1, -1, -1), new Vec3i(1, -1, 0), new Vec3i(1, -1, 1),
|
|
||||||
new Vec3i(1, 0, -1), new Vec3i(1, 0, 0), new Vec3i(1, 0, 1),
|
|
||||||
new Vec3i(1, 1, -1), new Vec3i(1, 1, 0), new Vec3i(1, 1, 1)
|
|
||||||
};
|
|
||||||
|
|
||||||
public static void addBlockColor(Block block, int color) {
|
|
||||||
COLOR_BY_BLOCK.put(block, color);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getBlockColor(Block block) {
|
|
||||||
return COLOR_BY_BLOCK.getOrDefault(block, 0xFF000000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setWithoutUpdate(LevelAccessor world, BlockPos pos, BlockState state) {
|
|
||||||
world.setBlock(pos, state, SET_SILENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setWithoutUpdate(LevelAccessor world, BlockPos pos, Block block) {
|
|
||||||
world.setBlock(pos, block.defaultBlockState(), SET_SILENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setWithUpdate(LevelAccessor world, BlockPos pos, BlockState state) {
|
|
||||||
world.setBlock(pos, state, SET_OBSERV);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setWithUpdate(LevelAccessor world, BlockPos pos, Block block) {
|
|
||||||
world.setBlock(pos, block.defaultBlockState(), SET_OBSERV);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int upRay(LevelAccessor world, BlockPos pos, int maxDist) {
|
|
||||||
int length = 0;
|
|
||||||
for (int j = 1; j < maxDist && (world.isEmptyBlock(pos.above(j))); j++)
|
|
||||||
length++;
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int downRay(LevelAccessor world, BlockPos pos, int maxDist) {
|
|
||||||
int length = 0;
|
|
||||||
for (int j = 1; j < maxDist && (world.isEmptyBlock(pos.below(j))); j++)
|
|
||||||
length++;
|
|
||||||
return length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int downRayRep(LevelAccessor world, BlockPos pos, int maxDist) {
|
|
||||||
POS.set(pos);
|
|
||||||
for (int j = 1; j < maxDist && (world.getBlockState(POS)).getMaterial().isReplaceable(); j++)
|
|
||||||
{
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
}
|
|
||||||
return pos.getY() - POS.getY();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int raycastSqr(LevelAccessor world, BlockPos pos, int dx, int dy, int dz, int maxDist) {
|
|
||||||
POS.set(pos);
|
|
||||||
for (int j = 1; j < maxDist && (world.getBlockState(POS)).getMaterial().isReplaceable(); j++)
|
|
||||||
{
|
|
||||||
POS.move(dx, dy, dz);
|
|
||||||
}
|
|
||||||
return (int) pos.distSqr(POS);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static BlockState rotateHorizontal(BlockState state, Rotation rotation, Property<Direction> facing) {
|
|
||||||
return state.setValue(facing, rotation.rotate(state.getValue(facing)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static BlockState mirrorHorizontal(BlockState state, Mirror mirror, Property<Direction> facing) {
|
|
||||||
return state.rotate(mirror.getRotation(state.getValue(facing)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getLengthDown(LevelAccessor world, BlockPos pos, Block block) {
|
|
||||||
int count = 1;
|
|
||||||
while (world.getBlockState(pos.below(count)).getBlock() == block)
|
|
||||||
count++;
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void cover(LevelAccessor world, BlockPos center, Block ground, BlockState cover, int radius, Random random) {
|
|
||||||
HashSet<BlockPos> points = new HashSet<BlockPos>();
|
|
||||||
HashSet<BlockPos> points2 = new HashSet<BlockPos>();
|
|
||||||
if (world.getBlockState(center).getBlock() == ground) {
|
|
||||||
points.add(center);
|
|
||||||
points2.add(center);
|
|
||||||
for (int i = 0; i < radius; i++) {
|
|
||||||
Iterator<BlockPos> iterator = points.iterator();
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
BlockPos pos = iterator.next();
|
|
||||||
for (Vec3i offset : OFFSETS) {
|
|
||||||
if (random.nextBoolean()) {
|
|
||||||
BlockPos pos2 = pos.offset(offset);
|
|
||||||
if (random.nextBoolean() && world.getBlockState(pos2).getBlock() == ground
|
|
||||||
&& !points.contains(pos2))
|
|
||||||
points2.add(pos2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
points.addAll(points2);
|
|
||||||
points2.clear();
|
|
||||||
}
|
|
||||||
Iterator<BlockPos> iterator = points.iterator();
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
BlockPos pos = iterator.next();
|
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, cover);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void fixBlocks(LevelAccessor world, BlockPos start, BlockPos end) {
|
|
||||||
BlockState state;
|
|
||||||
Set<BlockPos> doubleCheck = Sets.newHashSet();
|
|
||||||
for (int x = start.getX(); x <= end.getX(); x++) {
|
|
||||||
POS.setX(x);
|
|
||||||
for (int z = start.getZ(); z <= end.getZ(); z++) {
|
|
||||||
POS.setZ(z);
|
|
||||||
for (int y = start.getY(); y <= end.getY(); y++) {
|
|
||||||
POS.setY(y);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
|
|
||||||
if (state.getBlock() instanceof FurBlock) {
|
|
||||||
doubleCheck.add(POS.immutable());
|
|
||||||
}
|
|
||||||
// Liquids
|
|
||||||
else if (!state.getFluidState().isEmpty()) {
|
|
||||||
if (!state.canSurvive(world, POS)) {
|
|
||||||
setWithoutUpdate(world, POS, WATER);
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
while (!state.canSurvive(world, POS)) {
|
|
||||||
state = state.getFluidState().isEmpty() ? AIR : WATER;
|
|
||||||
setWithoutUpdate(world, POS, state);
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
POS.setY(y - 1);
|
|
||||||
if (world.isEmptyBlock(POS)) {
|
|
||||||
POS.setY(y);
|
|
||||||
while (!world.getFluidState(POS).isEmpty()) {
|
|
||||||
setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() + 1);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
for (Direction dir : HORIZONTAL) {
|
|
||||||
if (world.isEmptyBlock(POS.relative(dir))) {
|
|
||||||
world.getLiquidTicks().scheduleTick(POS, state.getFluidState().getType(), 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (state.is(EndBlocks.SMARAGDANT_CRYSTAL)) {
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
if (world.isEmptyBlock(POS)) {
|
|
||||||
POS.setY(POS.getY() + 1);
|
|
||||||
while (state.is(EndBlocks.SMARAGDANT_CRYSTAL)) {
|
|
||||||
setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() + 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (state.getBlock() instanceof StalactiteBlock) {
|
|
||||||
if (!state.canSurvive(world, POS)) {
|
|
||||||
if (world.getBlockState(POS.above()).getBlock() instanceof StalactiteBlock) {
|
|
||||||
while (state.getBlock() instanceof StalactiteBlock) {
|
|
||||||
setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() + 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
while (state.getBlock() instanceof StalactiteBlock) {
|
|
||||||
setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (state.is(EndBlocks.CAVE_PUMPKIN)) {
|
|
||||||
if (!world.getBlockState(POS.above()).is(EndBlocks.CAVE_PUMPKIN_SEED)) {
|
|
||||||
setWithoutUpdate(world, POS, AIR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!state.canSurvive(world, POS)) {
|
|
||||||
// Chorus
|
|
||||||
if (state.is(Blocks.CHORUS_PLANT)) {
|
|
||||||
Set<BlockPos> ends = Sets.newHashSet();
|
|
||||||
Set<BlockPos> add = Sets.newHashSet();
|
|
||||||
ends.add(POS.immutable());
|
|
||||||
|
|
||||||
for (int i = 0; i < 64 && !ends.isEmpty(); i++) {
|
|
||||||
ends.forEach((pos) -> {
|
|
||||||
setWithoutUpdate(world, pos, AIR);
|
|
||||||
for (Direction dir : HORIZONTAL) {
|
|
||||||
BlockPos p = pos.relative(dir);
|
|
||||||
BlockState st = world.getBlockState(p);
|
|
||||||
if ((st.is(Blocks.CHORUS_PLANT) || st.is(Blocks.CHORUS_FLOWER)) && !st.canSurvive(world, p)) {
|
|
||||||
add.add(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlockPos p = pos.above();
|
|
||||||
BlockState st = world.getBlockState(p);
|
|
||||||
if ((st.is(Blocks.CHORUS_PLANT) || st.is(Blocks.CHORUS_FLOWER)) && !st.canSurvive(world, p)) {
|
|
||||||
add.add(p);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
ends.clear();
|
|
||||||
ends.addAll(add);
|
|
||||||
add.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Vines
|
|
||||||
else if (state.getBlock() instanceof VineBlock) {
|
|
||||||
while (world.getBlockState(POS).getBlock() instanceof VineBlock) {
|
|
||||||
setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Falling blocks
|
|
||||||
else if (state.getBlock() instanceof FallingBlock) {
|
|
||||||
BlockState falling = state;
|
|
||||||
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
|
|
||||||
int ray = downRayRep(world, POS.immutable(), 64);
|
|
||||||
if (ray > 32) {
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.defaultBlockState());
|
|
||||||
if (world.getRandom().nextBoolean()) {
|
|
||||||
POS.setY(POS.getY() - 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, Blocks.END_STONE.defaultBlockState());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
POS.setY(y);
|
|
||||||
BlockState replacement = AIR;
|
|
||||||
for (Direction dir : HORIZONTAL) {
|
|
||||||
state = world.getBlockState(POS.relative(dir));
|
|
||||||
if (!state.getFluidState().isEmpty()) {
|
|
||||||
replacement = state;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, replacement);
|
|
||||||
POS.setY(y - ray);
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, falling);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Blocks without support
|
|
||||||
else {
|
|
||||||
// Blue Vine
|
|
||||||
if (state.getBlock() instanceof BlueVineBlock) {
|
|
||||||
while (state.is(EndBlocks.BLUE_VINE) || state.is(EndBlocks.BLUE_VINE_LANTERN) || state.is(EndBlocks.BLUE_VINE_FUR)) {
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() + 1);
|
|
||||||
state = world.getBlockState(POS);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Double plants
|
|
||||||
if (state.getBlock() instanceof DoublePlantBlock) {
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
|
||||||
POS.setY(POS.getY() + 1);
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, AIR);
|
|
||||||
}
|
|
||||||
// Other blocks
|
|
||||||
else {
|
|
||||||
BlocksHelper.setWithoutUpdate(world, POS, getAirOrFluid(state));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
doubleCheck.forEach((pos) -> {
|
|
||||||
if (!world.getBlockState(pos).canSurvive(world, pos)) {
|
|
||||||
BlocksHelper.setWithoutUpdate(world, pos, AIR);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private static BlockState getAirOrFluid(BlockState state) {
|
|
||||||
return state.getFluidState().isEmpty() ? AIR : state.getFluidState().createLegacyBlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isEndNylium(Block block) {
|
|
||||||
return block.is(BlockTags.NYLIUM) && block.is(TagAPI.END_GROUND);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isEndNylium(BlockState state) {
|
|
||||||
return isEndNylium(state.getBlock());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Direction[] makeHorizontal() {
|
|
||||||
return new Direction[] { Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST };
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Direction randomHorizontal(Random random) {
|
|
||||||
return HORIZONTAL[random.nextInt(4)];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Direction randomDirection(Random random) {
|
|
||||||
return DIRECTIONS[random.nextInt(6)];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isFluid(BlockState blockState) {
|
|
||||||
return !blockState.getFluidState().isEmpty();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,8 +16,8 @@ import ru.bclib.sdf.SDF;
|
||||||
import ru.bclib.sdf.operator.SDFDisplacement;
|
import ru.bclib.sdf.operator.SDFDisplacement;
|
||||||
import ru.bclib.sdf.operator.SDFTranslate;
|
import ru.bclib.sdf.operator.SDFTranslate;
|
||||||
import ru.bclib.sdf.primitive.SDFCappedCone;
|
import ru.bclib.sdf.primitive.SDFCappedCone;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class BiomeIslandFeature extends DefaultFeature {
|
public class BiomeIslandFeature extends DefaultFeature {
|
||||||
private static final MutableBlockPos CENTER = new MutableBlockPos();
|
private static final MutableBlockPos CENTER = new MutableBlockPos();
|
||||||
|
|
|
@ -4,10 +4,10 @@ import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class BlueVineFeature extends ScatterFeature {
|
public class BlueVineFeature extends ScatterFeature {
|
||||||
private boolean small;
|
private boolean small;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import java.util.Random;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
|
||||||
public class CavePlantFeature extends FullHeightScatterFeature {
|
public class CavePlantFeature extends FullHeightScatterFeature {
|
||||||
private final Block plant;
|
private final Block plant;
|
||||||
|
|
|
@ -7,9 +7,9 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class CavePumpkinFeature extends DefaultFeature {
|
public class CavePumpkinFeature extends DefaultFeature {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.world.level.material.Material;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.bclib.util.StructureHelper;
|
import ru.bclib.util.StructureHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
|
|
||||||
public class CrashedShipFeature extends NBTStructureFeature {
|
public class CrashedShipFeature extends NBTStructureFeature {
|
||||||
private static final StructureProcessor REPLACER;
|
private static final StructureProcessor REPLACER;
|
||||||
|
@ -99,8 +99,7 @@ public class CrashedShipFeature extends NBTStructureFeature {
|
||||||
structure.placeInWorldChunk(world, center, placementData.setBoundingBox(bounds), random);
|
structure.placeInWorldChunk(world, center, placementData.setBoundingBox(bounds), random);
|
||||||
|
|
||||||
StructureHelper.erodeIntense(world, bounds, random);
|
StructureHelper.erodeIntense(world, bounds, random);
|
||||||
BlocksHelper.fixBlocks(world, new BlockPos(bounds.x0, bounds.y0, bounds.z0),
|
BlockFixer.fixBlocks(world, new BlockPos(bounds.x0, bounds.y0, bounds.z0), new BlockPos(bounds.x1, bounds.y1, bounds.z1));
|
||||||
new BlockPos(bounds.x1, bounds.y1, bounds.z1));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.levelgen.Heightmap.Types;
|
import net.minecraft.world.level.levelgen.Heightmap.Types;
|
||||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
|
||||||
public abstract class DefaultFeature extends Feature<NoneFeatureConfiguration> {
|
public abstract class DefaultFeature extends Feature<NoneFeatureConfiguration> {
|
||||||
protected static final BlockState AIR = Blocks.AIR.defaultBlockState();
|
protected static final BlockState AIR = Blocks.AIR.defaultBlockState();
|
||||||
|
|
|
@ -6,9 +6,9 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class DoublePlantFeature extends ScatterFeature {
|
public class DoublePlantFeature extends ScatterFeature {
|
||||||
private final Block smallPlant;
|
private final Block smallPlant;
|
||||||
|
|
|
@ -8,10 +8,10 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.EndLotusLeafBlock;
|
import ru.betterend.blocks.EndLotusLeafBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class EndLotusLeafFeature extends ScatterFeature {
|
public class EndLotusLeafFeature extends ScatterFeature {
|
||||||
public EndLotusLeafFeature(int radius) {
|
public EndLotusLeafFeature(int radius) {
|
||||||
|
|
|
@ -7,11 +7,11 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class FilaluxFeature extends SkyScatterFeature {
|
public class FilaluxFeature extends SkyScatterFeature {
|
||||||
public FilaluxFeature() {
|
public FilaluxFeature() {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.Heightmap;
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public abstract class FullHeightScatterFeature extends DefaultFeature {
|
public abstract class FullHeightScatterFeature extends DefaultFeature {
|
||||||
private static final MutableBlockPos POS = new MutableBlockPos();
|
private static final MutableBlockPos POS = new MutableBlockPos();
|
||||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.Heightmap;
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public abstract class InvertedScatterFeature extends DefaultFeature {
|
public abstract class InvertedScatterFeature extends DefaultFeature {
|
||||||
private static final MutableBlockPos POS = new MutableBlockPos();
|
private static final MutableBlockPos POS = new MutableBlockPos();
|
||||||
|
|
|
@ -7,8 +7,8 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class MengerSpongeFeature extends UnderwaterPlantScatter {
|
public class MengerSpongeFeature extends UnderwaterPlantScatter {
|
||||||
private static final Function<BlockState, Boolean> REPLACE;
|
private static final Function<BlockState, Boolean> REPLACE;
|
||||||
|
|
|
@ -23,8 +23,9 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlac
|
||||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
|
||||||
import net.minecraft.world.level.levelgen.surfacebuilders.SurfaceBuilderConfiguration;
|
import net.minecraft.world.level.levelgen.surfacebuilders.SurfaceBuilderConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.registry.EndBiomes;
|
import ru.betterend.registry.EndBiomes;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.processors.DestructionStructureProcessor;
|
import ru.betterend.world.processors.DestructionStructureProcessor;
|
||||||
|
|
||||||
public abstract class NBTStructureFeature extends DefaultFeature {
|
public abstract class NBTStructureFeature extends DefaultFeature {
|
||||||
|
@ -131,21 +132,22 @@ public abstract class NBTStructureFeature extends DefaultFeature {
|
||||||
BlockState stateSt = world.getBlockState(mut);
|
BlockState stateSt = world.getBlockState(mut);
|
||||||
if (!stateSt.is(TagAPI.GEN_TERRAIN)) {
|
if (!stateSt.is(TagAPI.GEN_TERRAIN)) {
|
||||||
if (merge == TerrainMerge.SURFACE) {
|
if (merge == TerrainMerge.SURFACE) {
|
||||||
SurfaceBuilderConfiguration config = world.getBiome(mut).getGenerationSettings()
|
SurfaceBuilderConfiguration config = world.getBiome(mut).getGenerationSettings().getSurfaceBuilderConfig();
|
||||||
.getSurfaceBuilderConfig();
|
|
||||||
boolean isTop = mut.getY() == surfMax && state.getMaterial().isSolidBlocking();
|
boolean isTop = mut.getY() == surfMax && state.getMaterial().isSolidBlocking();
|
||||||
BlockState top = isTop ? config.getTopMaterial() : config.getUnderMaterial();
|
BlockState top = isTop ? config.getTopMaterial() : config.getUnderMaterial();
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, top);
|
BlocksHelper.setWithoutUpdate(world, mut, top);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, state);
|
BlocksHelper.setWithoutUpdate(world, mut, state);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (stateSt.is(TagAPI.END_GROUND) && state.getMaterial().isSolidBlocking()) {
|
if (stateSt.is(TagAPI.END_GROUND) && state.getMaterial().isSolidBlocking()) {
|
||||||
if (merge == TerrainMerge.SURFACE) {
|
if (merge == TerrainMerge.SURFACE) {
|
||||||
SurfaceBuilderConfiguration config = world.getBiome(mut).getGenerationSettings()
|
SurfaceBuilderConfiguration config = world.getBiome(mut).getGenerationSettings().getSurfaceBuilderConfig();
|
||||||
.getSurfaceBuilderConfig();
|
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, config.getUnderMaterial());
|
BlocksHelper.setWithoutUpdate(world, mut, config.getUnderMaterial());
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
BlocksHelper.setWithoutUpdate(world, mut, state);
|
BlocksHelper.setWithoutUpdate(world, mut, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,8 +158,7 @@ public abstract class NBTStructureFeature extends DefaultFeature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BlocksHelper.fixBlocks(world, new BlockPos(x1, center.getY(), z1),
|
BlockFixer.fixBlocks(world, new BlockPos(x1, center.getY(), z1), new BlockPos(x2, center.getY() + offset.getY(), z2));
|
||||||
new BlockPos(x2, center.getY() + offset.getY(), z2));
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -175,8 +176,7 @@ public abstract class NBTStructureFeature extends DefaultFeature {
|
||||||
String nm = resource.getPath();
|
String nm = resource.getPath();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
InputStream inputstream = MinecraftServer.class
|
InputStream inputstream = MinecraftServer.class.getResourceAsStream("/data/" + ns + "/structures/" + nm + ".nbt");
|
||||||
.getResourceAsStream("/data/" + ns + "/structures/" + nm + ".nbt");
|
|
||||||
return readStructureFromStream(inputstream);
|
return readStructureFromStream(inputstream);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public abstract class ScatterFeature extends DefaultFeature {
|
public abstract class ScatterFeature extends DefaultFeature {
|
||||||
private static final MutableBlockPos POS = new MutableBlockPos();
|
private static final MutableBlockPos POS = new MutableBlockPos();
|
||||||
|
|
|
@ -12,9 +12,9 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.Heightmap;
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SilkMothNestFeature extends DefaultFeature {
|
public class SilkMothNestFeature extends DefaultFeature {
|
||||||
private static final MutableBlockPos POS = new MutableBlockPos();
|
private static final MutableBlockPos POS = new MutableBlockPos();
|
||||||
|
|
|
@ -8,8 +8,8 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.AttachedBlock;
|
import ru.betterend.blocks.basis.AttachedBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SingleInvertedScatterFeature extends InvertedScatterFeature {
|
public class SingleInvertedScatterFeature extends InvertedScatterFeature {
|
||||||
private final Block block;
|
private final Block block;
|
||||||
|
|
|
@ -6,10 +6,10 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
import ru.betterend.blocks.basis.EndCropBlock;
|
import ru.betterend.blocks.basis.EndCropBlock;
|
||||||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class SinglePlantFeature extends ScatterFeature {
|
public class SinglePlantFeature extends ScatterFeature {
|
||||||
private final Block plant;
|
private final Block plant;
|
||||||
|
|
|
@ -6,8 +6,8 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public abstract class SkyScatterFeature extends ScatterFeature {
|
public abstract class SkyScatterFeature extends ScatterFeature {
|
||||||
public SkyScatterFeature(int radius) {
|
public SkyScatterFeature(int radius) {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
public class UnderwaterPlantFeature extends UnderwaterPlantScatter {
|
||||||
private final Block plant;
|
private final Block plant;
|
||||||
|
|
|
@ -6,10 +6,10 @@ import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.VineBlock;
|
import ru.betterend.blocks.basis.VineBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class VineFeature extends InvertedScatterFeature {
|
public class VineFeature extends InvertedScatterFeature {
|
||||||
private final Block vineBlock;
|
private final Block vineBlock;
|
||||||
|
|
|
@ -8,9 +8,9 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.AttachedBlock;
|
import ru.betterend.blocks.basis.AttachedBlock;
|
||||||
import ru.betterend.blocks.basis.EndWallPlantBlock;
|
import ru.betterend.blocks.basis.EndWallPlantBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public class WallPlantFeature extends WallScatterFeature {
|
public class WallPlantFeature extends WallScatterFeature {
|
||||||
private final Block block;
|
private final Block block;
|
||||||
|
|
|
@ -9,8 +9,8 @@ import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.Heightmap;
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
|
|
||||||
public abstract class WallScatterFeature extends DefaultFeature {
|
public abstract class WallScatterFeature extends DefaultFeature {
|
||||||
private static final Direction[] DIR = BlocksHelper.makeHorizontal();
|
private static final Direction[] DIR = BlocksHelper.makeHorizontal();
|
||||||
|
|
|
@ -19,9 +19,9 @@ import ru.bclib.sdf.operator.SDFScale3D;
|
||||||
import ru.bclib.sdf.operator.SDFSubtraction;
|
import ru.bclib.sdf.operator.SDFSubtraction;
|
||||||
import ru.bclib.sdf.operator.SDFTranslate;
|
import ru.bclib.sdf.operator.SDFTranslate;
|
||||||
import ru.bclib.sdf.primitive.SDFSphere;
|
import ru.bclib.sdf.primitive.SDFSphere;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class BushFeature extends DefaultFeature {
|
public class BushFeature extends DefaultFeature {
|
||||||
|
|
|
@ -20,9 +20,9 @@ import ru.bclib.sdf.operator.SDFScale3D;
|
||||||
import ru.bclib.sdf.operator.SDFSubtraction;
|
import ru.bclib.sdf.operator.SDFSubtraction;
|
||||||
import ru.bclib.sdf.operator.SDFTranslate;
|
import ru.bclib.sdf.operator.SDFTranslate;
|
||||||
import ru.bclib.sdf.primitive.SDFSphere;
|
import ru.bclib.sdf.primitive.SDFSphere;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class BushWithOuterFeature extends DefaultFeature {
|
public class BushWithOuterFeature extends DefaultFeature {
|
||||||
|
|
|
@ -10,11 +10,11 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class LargeAmaranitaFeature extends DefaultFeature {
|
public class LargeAmaranitaFeature extends DefaultFeature {
|
||||||
|
|
|
@ -10,11 +10,11 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties.LumecornShape;
|
import ru.betterend.blocks.BlockProperties.LumecornShape;
|
||||||
import ru.betterend.blocks.LumecornBlock;
|
import ru.betterend.blocks.LumecornBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class Lumecorn extends DefaultFeature {
|
public class Lumecorn extends DefaultFeature {
|
||||||
|
|
|
@ -22,13 +22,13 @@ import ru.bclib.sdf.operator.SDFScale3D;
|
||||||
import ru.bclib.sdf.operator.SDFSubtraction;
|
import ru.bclib.sdf.operator.SDFSubtraction;
|
||||||
import ru.bclib.sdf.operator.SDFTranslate;
|
import ru.bclib.sdf.operator.SDFTranslate;
|
||||||
import ru.bclib.sdf.primitive.SDFSphere;
|
import ru.bclib.sdf.primitive.SDFSphere;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||||
import ru.betterend.blocks.basis.FurBlock;
|
import ru.betterend.blocks.basis.FurBlock;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class TenaneaBushFeature extends DefaultFeature {
|
public class TenaneaBushFeature extends DefaultFeature {
|
||||||
|
|
|
@ -13,9 +13,9 @@ import ru.bclib.api.TagAPI;
|
||||||
import ru.bclib.sdf.SDF;
|
import ru.bclib.sdf.SDF;
|
||||||
import ru.bclib.sdf.operator.SDFRotation;
|
import ru.bclib.sdf.operator.SDFRotation;
|
||||||
import ru.bclib.sdf.primitive.SDFHexPrism;
|
import ru.bclib.sdf.primitive.SDFHexPrism;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class BigAuroraCrystalFeature extends DefaultFeature {
|
public class BigAuroraCrystalFeature extends DefaultFeature {
|
||||||
|
|
|
@ -12,10 +12,11 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
||||||
import net.minecraft.world.level.material.FluidState;
|
import net.minecraft.world.level.material.FluidState;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class DesertLakeFeature extends DefaultFeature {
|
public class DesertLakeFeature extends DefaultFeature {
|
||||||
|
@ -194,7 +195,7 @@ public class DesertLakeFeature extends DefaultFeature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BlocksHelper.fixBlocks(world, new BlockPos(minX - 2, waterLevel - 2, minZ - 2), new BlockPos(maxX + 2, blockPos.getY() + 20, maxZ + 2));
|
BlockFixer.fixBlocks(world, new BlockPos(minX - 2, waterLevel - 2, minZ - 2), new BlockPos(maxX + 2, blockPos.getY() + 20, maxZ + 2));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,11 @@ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConf
|
||||||
import net.minecraft.world.level.material.FluidState;
|
import net.minecraft.world.level.material.FluidState;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class EndLakeFeature extends DefaultFeature {
|
public class EndLakeFeature extends DefaultFeature {
|
||||||
|
@ -188,7 +189,7 @@ public class EndLakeFeature extends DefaultFeature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BlocksHelper.fixBlocks(world, new BlockPos(minX - 2, waterLevel - 2, minZ - 2), new BlockPos(maxX + 2, blockPos.getY() + 20, maxZ + 2));
|
BlockFixer.fixBlocks(world, new BlockPos(minX - 2, waterLevel - 2, minZ - 2), new BlockPos(maxX + 2, blockPos.getY() + 20, maxZ + 2));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,13 @@ import ru.bclib.sdf.primitive.SDFCappedCone;
|
||||||
import ru.bclib.sdf.primitive.SDFFlatland;
|
import ru.bclib.sdf.primitive.SDFFlatland;
|
||||||
import ru.bclib.sdf.primitive.SDFPrimitive;
|
import ru.bclib.sdf.primitive.SDFPrimitive;
|
||||||
import ru.bclib.sdf.primitive.SDFSphere;
|
import ru.bclib.sdf.primitive.SDFSphere;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.HydrothermalVentBlock;
|
import ru.betterend.blocks.HydrothermalVentBlock;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class GeyserFeature extends DefaultFeature {
|
public class GeyserFeature extends DefaultFeature {
|
||||||
|
@ -245,7 +246,7 @@ public class GeyserFeature extends DefaultFeature {
|
||||||
double distance = radius1 * 1.7;
|
double distance = radius1 * 1.7;
|
||||||
BlockPos start = pos.offset(-distance, -halfHeight - 15 - distance, -distance);
|
BlockPos start = pos.offset(-distance, -halfHeight - 15 - distance, -distance);
|
||||||
BlockPos end = pos.offset(distance, -halfHeight - 5 + distance, distance);
|
BlockPos end = pos.offset(distance, -halfHeight - 5 + distance, distance);
|
||||||
BlocksHelper.fixBlocks(world, start, end);
|
BlockFixer.fixBlocks(world, start, end);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class SingleBlockFeature extends DefaultFeature {
|
public class SingleBlockFeature extends DefaultFeature {
|
||||||
|
|
|
@ -10,9 +10,9 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class SmaragdantCrystalFeature extends DefaultFeature {
|
public class SmaragdantCrystalFeature extends DefaultFeature {
|
||||||
|
|
|
@ -12,8 +12,8 @@ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.betterend.blocks.basis.StalactiteBlock;
|
import ru.betterend.blocks.basis.StalactiteBlock;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class StalactiteFeature extends DefaultFeature {
|
public class StalactiteFeature extends DefaultFeature {
|
||||||
|
|
|
@ -10,11 +10,11 @@ import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class SulphurHillFeature extends DefaultFeature {
|
public class SulphurHillFeature extends DefaultFeature {
|
||||||
|
|
|
@ -17,12 +17,13 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import net.minecraft.world.level.material.Material;
|
import net.minecraft.world.level.material.Material;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.SulphurCrystalBlock;
|
import ru.betterend.blocks.SulphurCrystalBlock;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class SulphuricCaveFeature extends DefaultFeature {
|
public class SulphuricCaveFeature extends DefaultFeature {
|
||||||
|
@ -161,7 +162,7 @@ public class SulphuricCaveFeature extends DefaultFeature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BlocksHelper.fixBlocks(world, new BlockPos(x1, y1, z1), new BlockPos(x2, y2, z2));
|
BlockFixer.fixBlocks(world, new BlockPos(x1, y1, z1), new BlockPos(x2, y2, z2));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,12 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.BlockProperties;
|
import ru.betterend.blocks.BlockProperties;
|
||||||
import ru.betterend.blocks.SulphurCrystalBlock;
|
import ru.betterend.blocks.SulphurCrystalBlock;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class SulphuricLakeFeature extends DefaultFeature {
|
public class SulphuricLakeFeature extends DefaultFeature {
|
||||||
|
|
|
@ -9,10 +9,10 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.blocks.HydrothermalVentBlock;
|
import ru.betterend.blocks.HydrothermalVentBlock;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.util.BlocksHelper;
|
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
public class SurfaceVentFeature extends DefaultFeature {
|
public class SurfaceVentFeature extends DefaultFeature {
|
||||||
|
|
|
@ -16,7 +16,8 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.bclib.util.BlocksHelper;
|
||||||
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.biome.cave.EndCaveBiome;
|
import ru.betterend.world.biome.cave.EndCaveBiome;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
|
||||||
|
@ -40,7 +41,7 @@ public class CaveChunkPopulatorFeature extends DefaultFeature {
|
||||||
BlockState surfaceBlock = biome.getBiome().getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
BlockState surfaceBlock = biome.getBiome().getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||||
placeFloor(world, biome, floorPositions, random, surfaceBlock);
|
placeFloor(world, biome, floorPositions, random, surfaceBlock);
|
||||||
placeCeil(world, biome, ceilPositions, random);
|
placeCeil(world, biome, ceilPositions, random);
|
||||||
BlocksHelper.fixBlocks(world, min, max);
|
BlockFixer.fixBlocks(world, min, max);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,11 @@ import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
import ru.bclib.api.TagAPI;
|
import ru.bclib.api.TagAPI;
|
||||||
|
import ru.bclib.util.BlocksHelper;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.interfaces.IBiomeArray;
|
import ru.betterend.interfaces.IBiomeArray;
|
||||||
import ru.betterend.registry.EndBiomes;
|
import ru.betterend.registry.EndBiomes;
|
||||||
import ru.betterend.util.BlocksHelper;
|
import ru.betterend.util.BlockFixer;
|
||||||
import ru.betterend.world.biome.EndBiome;
|
import ru.betterend.world.biome.EndBiome;
|
||||||
import ru.betterend.world.biome.cave.EndCaveBiome;
|
import ru.betterend.world.biome.cave.EndCaveBiome;
|
||||||
import ru.betterend.world.features.DefaultFeature;
|
import ru.betterend.world.features.DefaultFeature;
|
||||||
|
@ -212,7 +213,7 @@ public abstract class EndCaveFeature extends DefaultFeature {
|
||||||
end.setZ(bpos.getZ());
|
end.setZ(bpos.getZ());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
BlocksHelper.fixBlocks(world, start.offset(-2, -2, -2), end.offset(2, 2, 2));
|
BlockFixer.fixBlocks(world, start.offset(-2, -2, -2), end.offset(2, 2, 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isWaterNear(WorldGenLevel world, BlockPos pos) {
|
protected boolean isWaterNear(WorldGenLevel world, BlockPos pos) {
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue