Block class rename
This commit is contained in:
parent
4b55bf30a8
commit
5f3547de8e
157 changed files with 748 additions and 756 deletions
|
@ -9,9 +9,9 @@ import net.minecraft.block.MaterialColor;
|
|||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class AeterniumBlock extends BlockBase {
|
||||
public class AeterniumBlock extends BaseBlock {
|
||||
|
||||
public AeterniumBlock() {
|
||||
super(FabricBlockSettings.of(Material.METAL, MaterialColor.GRAY)
|
||||
|
|
|
@ -3,10 +3,10 @@ package ru.betterend.blocks;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class BlockAmber extends BlockBase {
|
||||
public BlockAmber() {
|
||||
public class AmberBlock extends BaseBlock {
|
||||
public AmberBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).materialColor(MaterialColor.YELLOW));
|
||||
}
|
||||
}
|
|
@ -8,14 +8,14 @@ import net.minecraft.block.Blocks;
|
|||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockAncientEmeraldIce extends BlockBase {
|
||||
public BlockAncientEmeraldIce() {
|
||||
public class AncientEmeraldIceBlock extends BaseBlock {
|
||||
public AncientEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.BLUE_ICE).ticksRandomly());
|
||||
}
|
||||
|
|
@ -5,10 +5,10 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockUpDownPlant;
|
||||
import ru.betterend.blocks.basis.UpDownPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockBlueVine extends BlockUpDownPlant {
|
||||
public class BlueVineBlock extends UpDownPlantBlock {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
|
||||
@Override
|
|
@ -13,13 +13,13 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockBlueVineLantern extends BlockBase {
|
||||
public class BlueVineLanternBlock extends BaseBlock {
|
||||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||
|
||||
public BlockBlueVineLantern() {
|
||||
public BlueVineLanternBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).sounds(BlockSoundGroup.WART_BLOCK).luminance(15));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(NATURAL, false));
|
||||
}
|
|
@ -7,13 +7,13 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockFur;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.blocks.basis.FurBlock;
|
||||
import ru.betterend.blocks.basis.PlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockBlueVineSeed extends BlockPlantWithAge {
|
||||
public class BlueVineSeedBlock extends PlantWithAgeBlock {
|
||||
@Override
|
||||
public void growAdult(StructureWorldAccess world, Random random, BlockPos pos) {
|
||||
int height = MHelper.randRange(2, 5, random);
|
||||
|
@ -30,15 +30,15 @@ public class BlockBlueVineSeed extends BlockPlantWithAge {
|
|||
}
|
||||
|
||||
private void placeLantern(StructureWorldAccess world, BlockPos pos) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BLUE_VINE_LANTERN.getDefaultState().with(BlockBlueVineLantern.NATURAL, true));
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BLUE_VINE_LANTERN.getDefaultState().with(BlueVineLanternBlock.NATURAL, true));
|
||||
for (Direction dir: BlocksHelper.HORIZONTAL) {
|
||||
BlockPos p = pos.offset(dir);
|
||||
if (world.isAir(p)) {
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.BLUE_VINE_FUR.getDefaultState().with(BlockFur.FACING, dir));
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.BLUE_VINE_FUR.getDefaultState().with(FurBlock.FACING, dir));
|
||||
}
|
||||
}
|
||||
if (world.isAir(pos.up())) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos.up(), EndBlocks.BLUE_VINE_FUR.getDefaultState().with(BlockFur.FACING, Direction.UP));
|
||||
BlocksHelper.setWithoutUpdate(world, pos.up(), EndBlocks.BLUE_VINE_FUR.getDefaultState().with(FurBlock.FACING, Direction.UP));
|
||||
}
|
||||
}
|
||||
|
|
@ -13,14 +13,14 @@ import net.minecraft.state.StateManager;
|
|||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockBrimstone extends BlockBase {
|
||||
public class BrimstoneBlock extends BaseBlock {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public BlockBrimstone() {
|
||||
public BrimstoneBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE).materialColor(MaterialColor.BROWN).ticksRandomly());
|
||||
setDefaultState(stateManager.getDefaultState().with(ACTIVATED, false));
|
||||
}
|
||||
|
@ -47,17 +47,17 @@ public class BlockBrimstone extends BlockBase {
|
|||
Direction dir = BlocksHelper.randomDirection(random);
|
||||
BlockPos side = pos.offset(dir);
|
||||
BlockState sideState = world.getBlockState(side);
|
||||
if (sideState.getBlock() instanceof BlockSulphurCrystal) {
|
||||
if (sideState.get(BlockSulphurCrystal.AGE) < 2 && sideState.get(BlockSulphurCrystal.WATERLOGGED)) {
|
||||
int age = sideState.get(BlockSulphurCrystal.AGE) + 1;
|
||||
world.setBlockState(side, sideState.with(BlockSulphurCrystal.AGE, age));
|
||||
if (sideState.getBlock() instanceof SulphurCrystalBlock) {
|
||||
if (sideState.get(SulphurCrystalBlock.AGE) < 2 && sideState.get(SulphurCrystalBlock.WATERLOGGED)) {
|
||||
int age = sideState.get(SulphurCrystalBlock.AGE) + 1;
|
||||
world.setBlockState(side, sideState.with(SulphurCrystalBlock.AGE, age));
|
||||
}
|
||||
}
|
||||
else if (sideState.getFluidState().getFluid() == Fluids.WATER) {
|
||||
BlockState crystal = EndBlocks.SULPHUR_CRYSTAL.getDefaultState()
|
||||
.with(BlockSulphurCrystal.FACING, dir)
|
||||
.with(BlockSulphurCrystal.WATERLOGGED, true)
|
||||
.with(BlockSulphurCrystal.AGE, 0);
|
||||
.with(SulphurCrystalBlock.FACING, dir)
|
||||
.with(SulphurCrystalBlock.WATERLOGGED, true)
|
||||
.with(SulphurCrystalBlock.AGE, 0);
|
||||
world.setBlockState(side, crystal);
|
||||
}
|
||||
}
|
|
@ -17,12 +17,12 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlant;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
|
||||
|
||||
public class BlockBubbleCoral extends BlockUnderwaterPlant {
|
||||
public class BubbleCoralBlock extends UnderwaterPlantBlock {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(0, 0, 0, 16, 14, 16);
|
||||
|
||||
public BlockBubbleCoral() {
|
||||
public BubbleCoralBlock() {
|
||||
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.CORAL)
|
|
@ -11,13 +11,13 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockVine;
|
||||
import ru.betterend.blocks.basis.VineBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockBulbVine extends BlockVine {
|
||||
public BlockBulbVine() {
|
||||
public class BulbVineBlock extends VineBlock {
|
||||
public BulbVineBlock() {
|
||||
super(15, true);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
package ru.betterend.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
|
@ -11,14 +11,15 @@ import net.minecraft.sound.BlockSoundGroup;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.EndLanternBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
|
||||
public class BlockBulbVineLantern extends BlockLantern implements IRenderTypeable {
|
||||
public class BulbVineLanternBlock extends EndLanternBlock implements IRenderTypeable {
|
||||
private static final VoxelShape SHAPE_CEIL = Block.createCuboidShape(4, 4, 4, 12, 16, 12);
|
||||
private static final VoxelShape SHAPE_FLOOR = Block.createCuboidShape(4, 0, 4, 12, 12, 12);
|
||||
|
||||
public BlockBulbVineLantern() {
|
||||
public BulbVineLanternBlock() {
|
||||
this(FabricBlockSettings.of(Material.METAL)
|
||||
.sounds(BlockSoundGroup.LANTERN)
|
||||
.hardness(1)
|
||||
|
@ -29,7 +30,7 @@ public class BlockBulbVineLantern extends BlockLantern implements IRenderTypeabl
|
|||
.luminance(15));
|
||||
}
|
||||
|
||||
public BlockBulbVineLantern(FabricBlockSettings settings) {
|
||||
public BulbVineLanternBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ru.betterend.blocks.basis;
|
||||
package ru.betterend.blocks;
|
||||
|
||||
import java.io.Reader;
|
||||
|
||||
|
@ -10,8 +10,8 @@ import ru.betterend.interfaces.IColorProvider;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockBulbVineLanternColored extends BlockBulbVineLantern implements IColorProvider, BlockPatterned {
|
||||
public BlockBulbVineLanternColored(FabricBlockSettings settings) {
|
||||
public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements IColorProvider, BlockPatterned {
|
||||
public BulbVineLanternColoredBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -8,12 +8,12 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.blocks.basis.PlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockBulbVineSeed extends BlockPlantWithAge {
|
||||
public class BulbVineSeedBlock extends PlantWithAgeBlock {
|
||||
@Override
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
BlockState up = world.getBlockState(pos.up());
|
|
@ -5,9 +5,9 @@ import net.minecraft.fluid.Fluids;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlant;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
|
||||
|
||||
public class BlockCharnia extends BlockUnderwaterPlant {
|
||||
public class CharniaBlock extends UnderwaterPlantBlock {
|
||||
@Override
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
return sideCoversSmallSquare(world, pos.down(), Direction.UP) && world.getFluidState(pos).getFluid() == Fluids.WATER;
|
|
@ -1,11 +1,11 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockChorusGrass extends BlockPlant {
|
||||
public BlockChorusGrass() {
|
||||
public class ChorusGrassBlock extends EndPlantBlock {
|
||||
public ChorusGrassBlock() {
|
||||
super(true);
|
||||
}
|
||||
|
|
@ -2,12 +2,12 @@ package ru.betterend.blocks;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Blocks;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
|
||||
public class BlockDenseEmeraldIce extends BlockBase implements IRenderTypeable {
|
||||
public BlockDenseEmeraldIce() {
|
||||
public class DenseEmeraldIceBlock extends BaseBlock implements IRenderTypeable {
|
||||
public DenseEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.PACKED_ICE));
|
||||
}
|
||||
|
|
@ -3,10 +3,10 @@ package ru.betterend.blocks;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class BlockDenseSnow extends BlockBase {
|
||||
public BlockDenseSnow() {
|
||||
public class DenseSnowBlock extends BaseBlock {
|
||||
public DenseSnowBlock() {
|
||||
super(FabricBlockSettings.of(Material.SNOW_BLOCK).strength(0.2F).sounds(BlockSoundGroup.SNOW));
|
||||
}
|
||||
}
|
|
@ -4,12 +4,12 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockDragonTreeSapling extends BlockFeatureSapling {
|
||||
public BlockDragonTreeSapling() {
|
||||
public class DragonTreeSaplingBlock extends FeatureSaplingBlock {
|
||||
public DragonTreeSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -29,8 +29,8 @@ import ru.betterend.interfaces.IRenderTypeable;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockEmeraldIce extends TransparentBlock implements IRenderTypeable, BlockPatterned {
|
||||
public BlockEmeraldIce() {
|
||||
public class EmeraldIceBlock extends TransparentBlock implements IRenderTypeable, BlockPatterned {
|
||||
public EmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.ICE));
|
||||
}
|
||||
|
|
@ -31,17 +31,17 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlant;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockEndLily extends BlockUnderwaterPlant {
|
||||
public class EndLilyBlock extends UnderwaterPlantBlock {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final VoxelShape SHAPE_BOTTOM = Block.createCuboidShape(4, 0, 4, 12, 16, 12);
|
||||
private static final VoxelShape SHAPE_TOP = Block.createCuboidShape(2, 0, 2, 14, 6, 14);
|
||||
|
||||
public BlockEndLily() {
|
||||
public EndLilyBlock() {
|
||||
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.WET_GRASS)
|
|
@ -6,21 +6,21 @@ import net.minecraft.fluid.Fluids;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlantWithAge;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockEndLilySeed extends BlockUnderwaterPlantWithAge {
|
||||
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(StructureWorldAccess world, Random random, BlockPos pos) {
|
||||
if (canGrow(world, pos)) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.END_LILY.getDefaultState().with(BlockEndLily.SHAPE, TripleShape.BOTTOM));
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.END_LILY.getDefaultState().with(EndLilyBlock.SHAPE, TripleShape.BOTTOM));
|
||||
BlockPos up = pos.up();
|
||||
while (world.getFluidState(up).isStill()) {
|
||||
BlocksHelper.setWithoutUpdate(world, up, EndBlocks.END_LILY.getDefaultState().with(BlockEndLily.SHAPE, TripleShape.MIDDLE));
|
||||
BlocksHelper.setWithoutUpdate(world, up, EndBlocks.END_LILY.getDefaultState().with(EndLilyBlock.SHAPE, TripleShape.MIDDLE));
|
||||
up = up.up();
|
||||
}
|
||||
BlocksHelper.setWithoutUpdate(world, up, EndBlocks.END_LILY.getDefaultState().with(BlockEndLily.SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(world, up, EndBlocks.END_LILY.getDefaultState().with(EndLilyBlock.SHAPE, TripleShape.TOP));
|
||||
}
|
||||
}
|
||||
|
|
@ -17,15 +17,15 @@ import net.minecraft.loot.context.LootContext;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockEndLotusFlower extends BlockPlant {
|
||||
public class EndLotusFlowerBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE_OUTLINE = Block.createCuboidShape(2, 0, 2, 14, 14, 14);
|
||||
private static final VoxelShape SHAPE_COLLISION = Block.createCuboidShape(0, 0, 0, 16, 2, 16);
|
||||
|
||||
public BlockEndLotusFlower() {
|
||||
public EndLotusFlowerBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).nonOpaque().luminance(15));
|
||||
}
|
||||
|
|
@ -21,18 +21,18 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||
import ru.betterend.blocks.basis.BaseBlockNotFull;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockEndLotusLeaf extends BlockBaseNotFull implements IRenderTypeable {
|
||||
public class EndLotusLeafBlock extends BaseBlockNotFull implements IRenderTypeable {
|
||||
public static final EnumProperty<Direction> HORIZONTAL_FACING = Properties.HORIZONTAL_FACING;
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final VoxelShape VSHAPE = Block.createCuboidShape(0, 0, 0, 16, 1, 16);
|
||||
|
||||
public BlockEndLotusLeaf() {
|
||||
public EndLotusLeafBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).nonOpaque().sounds(BlockSoundGroup.WET_GRASS));
|
||||
}
|
||||
|
|
@ -9,16 +9,16 @@ import net.minecraft.util.math.BlockPos.Mutable;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlantWithAge;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
||||
public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(StructureWorldAccess world, Random random, BlockPos pos) {
|
||||
if (canGrow(world, pos)) {
|
||||
BlockState startLeaf = EndBlocks.END_LOTUS_STEM.getDefaultState().with(BlockEndLotusStem.LEAF, true);
|
||||
BlockState roots = EndBlocks.END_LOTUS_STEM.getDefaultState().with(BlockEndLotusStem.SHAPE, TripleShape.BOTTOM).with(BlockEndLotusStem.WATERLOGGED, true);
|
||||
BlockState startLeaf = EndBlocks.END_LOTUS_STEM.getDefaultState().with(EndLotusStemBlock.LEAF, true);
|
||||
BlockState roots = EndBlocks.END_LOTUS_STEM.getDefaultState().with(EndLotusStemBlock.SHAPE, TripleShape.BOTTOM).with(EndLotusStemBlock.WATERLOGGED, true);
|
||||
BlockState stem = EndBlocks.END_LOTUS_STEM.getDefaultState();
|
||||
BlockState flower = EndBlocks.END_LOTUS_FLOWER.getDefaultState();
|
||||
|
||||
|
@ -26,7 +26,7 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
|||
Mutable bpos = new Mutable().set(pos);
|
||||
bpos.setY(bpos.getY() + 1);
|
||||
while (world.getFluidState(bpos).isStill()) {
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.WATERLOGGED, true));
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.WATERLOGGED, true));
|
||||
bpos.setY(bpos.getY() + 1);
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,10 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
|||
BlockPos leafCenter = bpos.toImmutable().offset(dir);
|
||||
if (hasLeaf(world, leafCenter)) {
|
||||
generateLeaf(world, leafCenter);
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.with(BlockEndLotusStem.SHAPE, shape).with(BlockEndLotusStem.FACING, dir));
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.with(EndLotusStemBlock.SHAPE, shape).with(EndLotusStemBlock.FACING, dir));
|
||||
}
|
||||
else {
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, shape));
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.SHAPE, shape));
|
||||
}
|
||||
|
||||
bpos.setY(bpos.getY() + 1);
|
||||
|
@ -49,7 +49,7 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
|||
BlocksHelper.setWithoutUpdate(world, bpos, flower);
|
||||
bpos.setY(bpos.getY() - 1);
|
||||
stem = world.getBlockState(bpos);
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.SHAPE, TripleShape.TOP));
|
||||
return;
|
||||
}
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem);
|
||||
|
@ -66,15 +66,15 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
|||
if (!stem.isOf(EndBlocks.END_LOTUS_STEM)) {
|
||||
stem = EndBlocks.END_LOTUS_STEM.getDefaultState();
|
||||
if (!world.getBlockState(bpos.north()).getFluidState().isEmpty()) {
|
||||
stem = stem.with(BlockEndLotusStem.WATERLOGGED, true);
|
||||
stem = stem.with(EndLotusStemBlock.WATERLOGGED, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (world.getBlockState(bpos.offset(dir)).isOf(EndBlocks.END_LOTUS_LEAF)) {
|
||||
stem = stem.with(BlockEndLotusStem.LEAF, true).with(BlockEndLotusStem.FACING, dir);
|
||||
stem = stem.with(EndLotusStemBlock.LEAF, true).with(EndLotusStemBlock.FACING, dir);
|
||||
}
|
||||
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(BlockEndLotusStem.SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.SHAPE, TripleShape.TOP));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -90,14 +90,14 @@ public class BlockEndLotusSeed extends BlockUnderwaterPlantWithAge {
|
|||
private void generateLeaf(StructureWorldAccess world, BlockPos pos) {
|
||||
Mutable p = new Mutable();
|
||||
BlockState leaf = EndBlocks.END_LOTUS_LEAF.getDefaultState();
|
||||
BlocksHelper.setWithoutUpdate(world, pos, leaf.with(BlockEndLotusLeaf.SHAPE, TripleShape.BOTTOM));
|
||||
BlocksHelper.setWithoutUpdate(world, pos, leaf.with(EndLotusLeafBlock.SHAPE, TripleShape.BOTTOM));
|
||||
for (Direction move: BlocksHelper.HORIZONTAL) {
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, move).with(BlockEndLotusLeaf.SHAPE, TripleShape.MIDDLE));
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.with(EndLotusLeafBlock.HORIZONTAL_FACING, move).with(EndLotusLeafBlock.SHAPE, TripleShape.MIDDLE));
|
||||
}
|
||||
for (int i = 0; i < 4; i ++) {
|
||||
Direction d1 = BlocksHelper.HORIZONTAL[i];
|
||||
Direction d2 = BlocksHelper.HORIZONTAL[(i + 1) & 3];
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.with(BlockEndLotusLeaf.HORIZONTAL_FACING, d1).with(BlockEndLotusLeaf.SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.with(EndLotusLeafBlock.HORIZONTAL_FACING, d1).with(EndLotusLeafBlock.SHAPE, TripleShape.TOP));
|
||||
}
|
||||
}
|
||||
|
|
@ -26,19 +26,19 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockEndLotusStem extends BlockBase implements Waterloggable, IRenderTypeable {
|
||||
public class EndLotusStemBlock extends BaseBlock implements Waterloggable, IRenderTypeable {
|
||||
public static final EnumProperty<Direction> FACING = Properties.FACING;
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
public static final BooleanProperty LEAF = BooleanProperty.of("leaf");
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final Map<Axis, VoxelShape> SHAPES = Maps.newEnumMap(Axis.class);
|
||||
|
||||
public BlockEndLotusStem() {
|
||||
public EndLotusStemBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS));
|
||||
this.setDefaultState(getDefaultState().with(WATERLOGGED, false).with(SHAPE, TripleShape.MIDDLE).with(LEAF, false).with(FACING, Direction.UP));
|
||||
}
|
|
@ -16,15 +16,15 @@ import net.minecraft.loot.context.LootContextParameters;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||
import ru.betterend.blocks.basis.BaseBlockNotFull;
|
||||
|
||||
public class BlockPath extends BlockBaseNotFull {
|
||||
public class EndPathBlock extends BaseBlockNotFull {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(0, 0, 0, 16, 15, 16);
|
||||
|
||||
public BlockPath(Block source) {
|
||||
public EndPathBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).allowsSpawning((state, world, pos, type) -> { return false; }));
|
||||
if (source instanceof BlockTerrain) {
|
||||
BlockTerrain terrain = (BlockTerrain) source;
|
||||
if (source instanceof EndTerrainBlock) {
|
||||
EndTerrainBlock terrain = (EndTerrainBlock) source;
|
||||
terrain.setPathBlock(this);
|
||||
}
|
||||
}
|
|
@ -7,10 +7,10 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.basis.BlockPedestal;
|
||||
import ru.betterend.blocks.basis.PedestalBlock;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class EndPedestal extends BlockPedestal {
|
||||
public class EndPedestal extends PedestalBlock {
|
||||
|
||||
public EndPedestal(Block parent) {
|
||||
super(parent);
|
||||
|
|
|
@ -4,11 +4,10 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class BlockStone extends BlockBase {
|
||||
|
||||
public BlockStone(MaterialColor color) {
|
||||
public class EndStoneBlock extends BaseBlock {
|
||||
public EndStoneBlock(MaterialColor color) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE).materialColor(color).sounds(BlockSoundGroup.STONE));
|
||||
}
|
||||
}
|
|
@ -29,12 +29,12 @@ import net.minecraft.util.math.Direction;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.chunk.light.ChunkLightProvider;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class BlockTerrain extends BlockBase {
|
||||
public class EndTerrainBlock extends BaseBlock {
|
||||
private Block pathBlock;
|
||||
|
||||
public BlockTerrain(MaterialColor color) {
|
||||
public EndTerrainBlock(MaterialColor color) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE).materialColor(color).sounds(BlockSounds.TERRAIN_SOUND).ticksRandomly());
|
||||
}
|
||||
|
|
@ -9,9 +9,9 @@ import net.minecraft.block.MaterialColor;
|
|||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class EnderBlock extends BlockBase {
|
||||
public class EnderBlock extends BaseBlock {
|
||||
|
||||
public EnderBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.field_25708)
|
||||
|
|
|
@ -15,11 +15,11 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockEndstoneDust extends FallingBlock {
|
||||
public class EndstoneDustBlock extends FallingBlock {
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static final int COLOR = MHelper.color(226, 239, 168);
|
||||
|
||||
public BlockEndstoneDust() {
|
||||
public EndstoneDustBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.SAND).materialColor(Blocks.END_STONE.getDefaultMaterialColor()));
|
||||
}
|
||||
|
|
@ -23,13 +23,13 @@ import net.minecraft.world.BlockView;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.explosion.Explosion;
|
||||
import ru.betterend.blocks.basis.BlockPedestal;
|
||||
import ru.betterend.blocks.basis.PedestalBlock;
|
||||
import ru.betterend.blocks.entities.EternalPedestalEntity;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.rituals.EternalRitual;
|
||||
|
||||
public class EternalPedestal extends BlockPedestal {
|
||||
public class EternalPedestal extends PedestalBlock {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public EternalPedestal() {
|
||||
|
|
|
@ -5,11 +5,11 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockGlowingMoss extends BlockPlant {
|
||||
public BlockGlowingMoss(int light) {
|
||||
public class GlowingMossBlock extends EndPlantBlock {
|
||||
public GlowingMossBlock(int light) {
|
||||
super(light);
|
||||
}
|
||||
|
|
@ -14,13 +14,13 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockGlowingPillarLuminophor extends BlockBase {
|
||||
public class GlowingPillarLuminophorBlock extends BaseBlock {
|
||||
public static final BooleanProperty NATURAL = BooleanProperty.of("natural");
|
||||
|
||||
public BlockGlowingPillarLuminophor() {
|
||||
public GlowingPillarLuminophorBlock() {
|
||||
super(FabricBlockSettings.of(Material.LEAVES)
|
||||
.materialColor(MaterialColor.ORANGE)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
|
@ -5,10 +5,10 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockUpDownPlant;
|
||||
import ru.betterend.blocks.basis.UpDownPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockGlowingPillarRoots extends BlockUpDownPlant {
|
||||
public class GlowingPillarRootsBlock extends UpDownPlantBlock {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
|
||||
@Override
|
|
@ -13,13 +13,13 @@ import net.minecraft.util.math.BlockPos.Mutable;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.blocks.basis.PlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockGlowingPillarSeed extends BlockPlantWithAge {
|
||||
public BlockGlowingPillarSeed() {
|
||||
public class GlowingPillarSeedBlock extends PlantWithAgeBlock {
|
||||
public GlowingPillarSeedBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.luminance((state) -> { return state.get(AGE) * 3 + 3; })
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
|
@ -49,7 +49,7 @@ public class BlockGlowingPillarSeed extends BlockPlantWithAge {
|
|||
BlocksHelper.setWithUpdate(world, mut, roots.with(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP));
|
||||
mut.move(Direction.UP);
|
||||
}
|
||||
BlocksHelper.setWithUpdate(world, mut, EndBlocks.GLOWING_PILLAR_LUMINOPHOR.getDefaultState().with(BlockBlueVineLantern.NATURAL, true));
|
||||
BlocksHelper.setWithUpdate(world, mut, EndBlocks.GLOWING_PILLAR_LUMINOPHOR.getDefaultState().with(BlueVineLanternBlock.NATURAL, true));
|
||||
for (Direction dir: BlocksHelper.DIRECTIONS) {
|
||||
pos = mut.offset(dir);
|
||||
if (world.isAir(pos)) {
|
|
@ -23,17 +23,17 @@ import net.minecraft.sound.BlockSoundGroup;
|
|||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.IntProperty;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.interfaces.IColorProvider;
|
||||
import ru.betterend.noise.OpenSimplexNoise;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockHelixTreeLeaves extends BlockBase implements IColorProvider {
|
||||
public class HelixTreeLeavesBlock extends BaseBlock implements IColorProvider {
|
||||
public static final IntProperty COLOR = IntProperty.of("color", 0, 7);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
||||
|
||||
public BlockHelixTreeLeaves() {
|
||||
public HelixTreeLeavesBlock() {
|
||||
super(FabricBlockSettings.of(Material.LEAVES)
|
||||
.materialColor(MaterialColor.ORANGE)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
|
@ -1,10 +1,10 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockHelixTreeSapling extends BlockFeatureSapling {
|
||||
public class HelixTreeSaplingBlock extends FeatureSaplingBlock {
|
||||
@Override
|
||||
protected Feature<?> getFeature() {
|
||||
return EndFeatures.HELIX_TREE.getFeature();
|
|
@ -23,15 +23,15 @@ import net.minecraft.world.BlockView;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.HydraluxShape;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlant;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockHydralux extends BlockUnderwaterPlant {
|
||||
public class HydraluxBlock extends UnderwaterPlantBlock {
|
||||
public static final EnumProperty<HydraluxShape> SHAPE = BlockProperties.HYDRALUX_SHAPE;
|
||||
|
||||
public BlockHydralux() {
|
||||
public HydraluxBlock() {
|
||||
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.WET_GRASS)
|
|
@ -8,10 +8,10 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class BlockHydraluxPetal extends BlockBase {
|
||||
public BlockHydraluxPetal() {
|
||||
public class HydraluxPetalBlock extends BaseBlock {
|
||||
public HydraluxPetalBlock() {
|
||||
this(FabricBlockSettings.of(Material.PLANT)
|
||||
.materialColor(MaterialColor.SPRUCE)
|
||||
.sounds(BlockSoundGroup.WART_BLOCK)
|
||||
|
@ -21,7 +21,7 @@ public class BlockHydraluxPetal extends BlockBase {
|
|||
.breakByHand(true));
|
||||
}
|
||||
|
||||
public BlockHydraluxPetal(FabricBlockSettings settings) {
|
||||
public HydraluxPetalBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -9,8 +9,8 @@ import net.minecraft.util.Identifier;
|
|||
import ru.betterend.interfaces.IColorProvider;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockHydraluxPetalColored extends BlockHydraluxPetal implements IColorProvider {
|
||||
public BlockHydraluxPetalColored(FabricBlockSettings settings) {
|
||||
public class HydraluxPetalColoredBlock extends HydraluxPetalBlock implements IColorProvider {
|
||||
public HydraluxPetalColoredBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -8,12 +8,12 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.BlockPos.Mutable;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.HydraluxShape;
|
||||
import ru.betterend.blocks.basis.BlockUnderwaterPlantWithAge;
|
||||
import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockHydraluxSapling extends BlockUnderwaterPlantWithAge {
|
||||
public class HydraluxSaplingBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(StructureWorldAccess world, Random random, BlockPos pos) {
|
||||
int h = MHelper.randRange(4, 8, random);
|
|
@ -36,18 +36,18 @@ import net.minecraft.world.BlockView;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||
import ru.betterend.blocks.basis.BaseBlockNotFull;
|
||||
import ru.betterend.blocks.entities.BlockEntityHydrothermalVent;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockHydrothermalVent extends BlockBaseNotFull implements BlockEntityProvider, FluidFillable, Waterloggable {
|
||||
public class HydrothermalVentBlock extends BaseBlockNotFull implements BlockEntityProvider, FluidFillable, Waterloggable {
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(1, 1, 1, 15, 16, 15);
|
||||
|
||||
public BlockHydrothermalVent() {
|
||||
public HydrothermalVentBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.sounds(BlockSoundGroup.STONE)
|
|
@ -14,11 +14,11 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockPedestal;
|
||||
import ru.betterend.blocks.basis.PedestalBlock;
|
||||
import ru.betterend.blocks.entities.InfusionPedestalEntity;
|
||||
import ru.betterend.rituals.InfusionRitual;
|
||||
|
||||
public class InfusionPedestal extends BlockPedestal {
|
||||
public class InfusionPedestal extends PedestalBlock {
|
||||
private static final VoxelShape SHAPE_DEFAULT;
|
||||
private static final VoxelShape SHAPE_PEDESTAL_TOP;
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ import ru.betterend.patterns.BlockPatterned;
|
|||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockJellyshroomCap extends SlimeBlock implements IRenderTypeable, BlockPatterned, IColorProvider {
|
||||
public class JellyshroomCapBlock extends SlimeBlock implements IRenderTypeable, BlockPatterned, IColorProvider {
|
||||
public static final IntProperty COLOR = IntProperty.of("color", 0, 7);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
||||
private final Vec3i colorStart;
|
||||
private final Vec3i colorEnd;
|
||||
private final int coloritem;
|
||||
|
||||
public BlockJellyshroomCap(int r1, int g1, int b1, int r2, int g2, int b2) {
|
||||
public JellyshroomCapBlock(int r1, int g1, int b1, int r2, int g2, int b2) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.SLIME_BLOCK));
|
||||
colorStart = new Vec3i(r1, g1, b1);
|
||||
colorEnd = new Vec3i(r2, g2, b2);
|
|
@ -4,12 +4,12 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockLacugroveSapling extends BlockFeatureSapling {
|
||||
public BlockLacugroveSapling() {
|
||||
public class LacugroveSaplingBlock extends FeatureSaplingBlock {
|
||||
public LacugroveSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -11,14 +11,14 @@ import net.minecraft.util.math.Direction;
|
|||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.PentaShape;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockLanceleaf extends BlockPlant {
|
||||
public class LanceleafBlock extends EndPlantBlock {
|
||||
public static final EnumProperty<PentaShape> SHAPE = BlockProperties.PENTA_SHAPE;
|
||||
public static final IntProperty ROTATION = BlockProperties.ROTATION;
|
||||
|
||||
public BlockLanceleaf() {
|
||||
public LanceleafBlock() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -8,12 +8,12 @@ import net.minecraft.util.math.BlockPos.Mutable;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import ru.betterend.blocks.BlockProperties.PentaShape;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.blocks.basis.PlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockLanceleafSeed extends BlockPlantWithAge {
|
||||
public class LanceleafSeedBlock extends PlantWithAgeBlock {
|
||||
@Override
|
||||
public void growAdult(StructureWorldAccess world, Random random, BlockPos pos) {
|
||||
int height = MHelper.randRange(4, 6, random);
|
|
@ -19,13 +19,13 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||
import ru.betterend.blocks.basis.BaseBlockNotFull;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockMengerSponge extends BlockBaseNotFull implements IRenderTypeable {
|
||||
public BlockMengerSponge() {
|
||||
public class MengerSpongeBlock extends BaseBlockNotFull implements IRenderTypeable {
|
||||
public MengerSpongeBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.SPONGE).nonOpaque());
|
||||
}
|
||||
|
|
@ -16,14 +16,14 @@ import net.minecraft.sound.SoundEvents;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockBaseNotFull;
|
||||
import ru.betterend.blocks.basis.BaseBlockNotFull;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockMengerSpongeWet extends BlockBaseNotFull implements IRenderTypeable {
|
||||
public BlockMengerSpongeWet() {
|
||||
public class MengerSpongeWetBlock extends BaseBlockNotFull implements IRenderTypeable {
|
||||
public MengerSpongeWetBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.WET_SPONGE).nonOpaque());
|
||||
}
|
||||
|
|
@ -9,13 +9,13 @@ import net.minecraft.item.ItemPlacementContext;
|
|||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockMossyGlowshroomCap extends BlockBase {
|
||||
public class MossyGlowshroomCapBlock extends BaseBlock {
|
||||
public static final BooleanProperty TRANSITION = BooleanProperty.of("transition");
|
||||
|
||||
public BlockMossyGlowshroomCap() {
|
||||
public MossyGlowshroomCapBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).sounds(BlockSoundGroup.WOOD));
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(TRANSITION, false));
|
||||
}
|
|
@ -4,10 +4,10 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class BlockMossyGlowshroomHymenophore extends BlockBase {
|
||||
public BlockMossyGlowshroomHymenophore() {
|
||||
public class MossyGlowshroomHymenophoreBlock extends BaseBlock {
|
||||
public MossyGlowshroomHymenophoreBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).sounds(BlockSoundGroup.WART_BLOCK).luminance(15));
|
||||
}
|
||||
}
|
|
@ -4,12 +4,12 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockMossyGlowshroomSapling extends BlockFeatureSapling {
|
||||
public BlockMossyGlowshroomSapling() {
|
||||
public class MossyGlowshroomSaplingBlock extends FeatureSaplingBlock {
|
||||
public MossyGlowshroomSaplingBlock() {
|
||||
super(7);
|
||||
}
|
||||
|
|
@ -12,10 +12,10 @@ import net.minecraft.entity.effect.StatusEffects;
|
|||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockMurkweed extends BlockPlant {
|
||||
public class MurkweedBlock extends EndPlantBlock {
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
|
@ -17,11 +17,11 @@ import net.minecraft.loot.context.LootContext;
|
|||
import net.minecraft.loot.context.LootContextParameters;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockNeedlegrass extends BlockPlant {
|
||||
public class NeedlegrassBlock extends EndPlantBlock {
|
||||
@Override
|
||||
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
|
||||
if (entity instanceof LivingEntity) {
|
|
@ -6,10 +6,10 @@ import java.util.Map;
|
|||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.blocks.basis.BlockPedestal;
|
||||
import ru.betterend.blocks.basis.PedestalBlock;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class PedestalVanilla extends BlockPedestal {
|
||||
public class PedestalVanilla extends PedestalBlock {
|
||||
|
||||
public PedestalVanilla(Block parent) {
|
||||
super(parent);
|
||||
|
|
|
@ -4,12 +4,12 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockPythadendronSapling extends BlockFeatureSapling {
|
||||
public BlockPythadendronSapling() {
|
||||
public class PythadendronSaplingBlock extends FeatureSaplingBlock {
|
||||
public PythadendronSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ import net.minecraft.world.World;
|
|||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.BlockProperties.TripleShape;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IColorProvider;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
|
@ -46,13 +46,13 @@ import ru.betterend.registry.EndItems;
|
|||
import ru.betterend.util.BlocksHelper;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockRespawnObelisk extends BlockBase implements IColorProvider, IRenderTypeable {
|
||||
public class RespawnObeliskBlock extends BaseBlock implements IColorProvider, IRenderTypeable {
|
||||
private static final VoxelShape VOXEL_SHAPE_BOTTOM = Block.createCuboidShape(1, 0, 1, 15, 16, 15);
|
||||
private static final VoxelShape VOXEL_SHAPE_MIDDLE_TOP = Block.createCuboidShape(2, 0, 2, 14, 16, 14);
|
||||
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
|
||||
public BlockRespawnObelisk() {
|
||||
public RespawnObeliskBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE).luminance((state) -> {
|
||||
return (state.get(SHAPE) == TripleShape.BOTTOM) ? 0 : 15;
|
||||
}));
|
|
@ -6,10 +6,10 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class RunedFlavolite extends BlockBase {
|
||||
public class RunedFlavolite extends BaseBlock {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public RunedFlavolite() {
|
||||
|
|
|
@ -16,12 +16,12 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.StructureWorldAccess;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockPlantWithAge;
|
||||
import ru.betterend.blocks.basis.PlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockShadowBerry extends BlockPlantWithAge {
|
||||
public class ShadowBerryBlock extends PlantWithAgeBlock {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(1, 0, 1, 15, 8, 15);
|
||||
|
||||
@Override
|
|
@ -10,8 +10,8 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
|
||||
public class BlockShadowGrass extends BlockTerrain {
|
||||
public BlockShadowGrass() {
|
||||
public class ShadowGrassBlock extends EndTerrainBlock {
|
||||
public ShadowGrassBlock() {
|
||||
super(MaterialColor.BLACK);
|
||||
}
|
||||
|
|
@ -27,18 +27,18 @@ import net.minecraft.util.shape.VoxelShape;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockSilkMothNest extends BlockBase implements IRenderTypeable {
|
||||
public class SilkMothNestBlock extends BaseBlock implements IRenderTypeable {
|
||||
public static final BooleanProperty ACTIVE = BlockProperties.ACTIVE;
|
||||
public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING;
|
||||
private static final VoxelShape TOP = createCuboidShape(6, 0, 6, 10, 16, 10);
|
||||
private static final VoxelShape BOTTOM = createCuboidShape(0, 0, 0, 16, 16, 16);
|
||||
|
||||
public BlockSilkMothNest() {
|
||||
public SilkMothNestBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOL).hardness(0.5F).resistance(0.1F).sounds(BlockSoundGroup.WOOL).nonOpaque());
|
||||
this.setDefaultState(getDefaultState().with(ACTIVE, true));
|
||||
}
|
|
@ -29,17 +29,17 @@ import net.minecraft.util.shape.VoxelShapes;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.basis.BlockAttached;
|
||||
import ru.betterend.blocks.basis.AttachedBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockSmallJellyshroom extends BlockAttached implements IRenderTypeable, Fertilizable {
|
||||
public class SmallJellyshroomBlock extends AttachedBlock implements IRenderTypeable, Fertilizable {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
|
||||
public BlockSmallJellyshroom() {
|
||||
public SmallJellyshroomBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.NETHER_WART)
|
|
@ -34,19 +34,19 @@ import net.minecraft.util.shape.VoxelShapes;
|
|||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.blocks.basis.BlockAttached;
|
||||
import ru.betterend.blocks.basis.AttachedBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockSulphurCrystal extends BlockAttached implements IRenderTypeable, Waterloggable, FluidFillable {
|
||||
public class SulphurCrystalBlock extends AttachedBlock implements IRenderTypeable, Waterloggable, FluidFillable {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
public static final IntProperty AGE = IntProperty.of("age", 0, 2);
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
public BlockSulphurCrystal() {
|
||||
public SulphurCrystalBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE)
|
||||
.materialColor(MaterialColor.YELLOW)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
|
@ -12,15 +12,15 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.util.math.Vec3i;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockVine;
|
||||
import ru.betterend.blocks.basis.VineBlock;
|
||||
import ru.betterend.interfaces.IColorProvider;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockTenaneaFlowers extends BlockVine implements IColorProvider {
|
||||
public class TenaneaFlowersBlock extends VineBlock implements IColorProvider {
|
||||
public static final Vec3i[] COLORS;
|
||||
|
||||
public BlockTenaneaFlowers() {
|
||||
public TenaneaFlowersBlock() {
|
||||
super(15);
|
||||
}
|
||||
|
|
@ -4,12 +4,12 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockTenaneaSapling extends BlockFeatureSapling {
|
||||
public BlockTenaneaSapling() {
|
||||
public class TenaneaSaplingBlock extends FeatureSaplingBlock {
|
||||
public TenaneaSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -4,9 +4,9 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import net.minecraft.block.Material;
|
||||
import net.minecraft.block.MaterialColor;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
|
||||
public class TerminiteBlock extends BlockBase {
|
||||
public class TerminiteBlock extends BaseBlock {
|
||||
public TerminiteBlock() {
|
||||
super(FabricBlockSettings.of(Material.METAL, MaterialColor.field_25708)
|
||||
.hardness(7F)
|
||||
|
|
|
@ -2,12 +2,12 @@ package ru.betterend.blocks;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
public class BlockTerrainPlant extends BlockPlant {
|
||||
public class TerrainPlantBlock extends EndPlantBlock {
|
||||
private final Block ground;
|
||||
|
||||
public BlockTerrainPlant(Block ground) {
|
||||
public TerrainPlantBlock(Block ground) {
|
||||
super(true);
|
||||
this.ground = ground;
|
||||
}
|
|
@ -9,13 +9,13 @@ import net.minecraft.server.world.ServerWorld;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockTwistedUmbrellaMoss extends BlockPlant {
|
||||
public BlockTwistedUmbrellaMoss() {
|
||||
public class TwistedUmbrellaMossBlock extends EndPlantBlock {
|
||||
public TwistedUmbrellaMossBlock() {
|
||||
super(11);
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,8 @@ public class BlockTwistedUmbrellaMoss extends BlockPlant {
|
|||
@Override
|
||||
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
|
||||
int rot = world.random.nextInt(4);
|
||||
BlockState bs = EndBlocks.TWISTED_UMBRELLA_MOSS_TALL.getDefaultState().with(BlockDoublePlant.ROTATION, rot);
|
||||
BlockState bs = EndBlocks.TWISTED_UMBRELLA_MOSS_TALL.getDefaultState().with(DoublePlantBlock.ROTATION, rot);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, bs);
|
||||
BlocksHelper.setWithoutUpdate(world, pos.up(), bs.with(BlockDoublePlant.TOP, true));
|
||||
BlocksHelper.setWithoutUpdate(world, pos.up(), bs.with(DoublePlantBlock.TOP, true));
|
||||
}
|
||||
}
|
|
@ -7,11 +7,11 @@ import net.minecraft.entity.ItemEntity;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockTwistedUmbrellaMossTall extends BlockDoublePlant {
|
||||
public BlockTwistedUmbrellaMossTall() {
|
||||
public class TwistedUmbrellaMossTallBlock extends DoublePlantBlock {
|
||||
public TwistedUmbrellaMossTallBlock() {
|
||||
super(12);
|
||||
}
|
||||
|
|
@ -9,13 +9,13 @@ import net.minecraft.server.world.ServerWorld;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.BlockPlant;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockUmbrellaMoss extends BlockPlant {
|
||||
public BlockUmbrellaMoss() {
|
||||
public class UmbrellaMossBlock extends EndPlantBlock {
|
||||
public UmbrellaMossBlock() {
|
||||
super(11);
|
||||
}
|
||||
|
||||
|
@ -42,8 +42,8 @@ public class BlockUmbrellaMoss extends BlockPlant {
|
|||
@Override
|
||||
public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) {
|
||||
int rot = world.random.nextInt(4);
|
||||
BlockState bs = EndBlocks.UMBRELLA_MOSS_TALL.getDefaultState().with(BlockDoublePlant.ROTATION, rot);
|
||||
BlockState bs = EndBlocks.UMBRELLA_MOSS_TALL.getDefaultState().with(DoublePlantBlock.ROTATION, rot);
|
||||
BlocksHelper.setWithoutUpdate(world, pos, bs);
|
||||
BlocksHelper.setWithoutUpdate(world, pos.up(), bs.with(BlockDoublePlant.TOP, true));
|
||||
BlocksHelper.setWithoutUpdate(world, pos.up(), bs.with(DoublePlantBlock.TOP, true));
|
||||
}
|
||||
}
|
|
@ -7,11 +7,11 @@ import net.minecraft.entity.ItemEntity;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.DoublePlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BlockUmbrellaMossTall extends BlockDoublePlant {
|
||||
public BlockUmbrellaMossTall() {
|
||||
public class UmbrellaMossTallBlock extends DoublePlantBlock {
|
||||
public UmbrellaMossTallBlock() {
|
||||
super(12);
|
||||
}
|
||||
|
|
@ -17,15 +17,15 @@ import net.minecraft.util.Hand;
|
|||
import net.minecraft.util.hit.BlockHitResult;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockUmbrellaTreeCluster extends BlockBase {
|
||||
public class UmbrellaTreeClusterBlock extends BaseBlock {
|
||||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||
|
||||
public BlockUmbrellaTreeCluster() {
|
||||
public UmbrellaTreeClusterBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK)
|
||||
.materialColor(MaterialColor.PURPLE)
|
||||
.luminance(15));
|
|
@ -11,14 +11,14 @@ import net.minecraft.server.world.ServerWorld;
|
|||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import ru.betterend.blocks.basis.BlockBase;
|
||||
import ru.betterend.blocks.basis.BaseBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockUmbrellaTreeClusterEmpty extends BlockBase {
|
||||
public class UmbrellaTreeClusterEmptyBlock extends BaseBlock {
|
||||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||
|
||||
public BlockUmbrellaTreeClusterEmpty() {
|
||||
public UmbrellaTreeClusterEmptyBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK)
|
||||
.materialColor(MaterialColor.PURPLE)
|
||||
.ticksRandomly());
|
||||
|
@ -33,7 +33,7 @@ public class BlockUmbrellaTreeClusterEmpty extends BlockBase {
|
|||
@Override
|
||||
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||
if (state.get(NATURAL) && random.nextInt(16) == 0) {
|
||||
BlocksHelper.setWithUpdate(world, pos, EndBlocks.UMBRELLA_TREE_CLUSTER.getDefaultState().with(BlockUmbrellaTreeCluster.NATURAL, true));
|
||||
BlocksHelper.setWithUpdate(world, pos, EndBlocks.UMBRELLA_TREE_CLUSTER.getDefaultState().with(UmbrellaTreeClusterBlock.NATURAL, true));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,11 +31,11 @@ import ru.betterend.patterns.Patterns;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockUmbrellaTreeMembrane extends SlimeBlock implements IRenderTypeable, BlockPatterned {
|
||||
public class UmbrellaTreeMembraneBlock extends SlimeBlock implements IRenderTypeable, BlockPatterned {
|
||||
public static final IntProperty COLOR = IntProperty.of("color", 0, 7);
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
||||
|
||||
public BlockUmbrellaTreeMembrane() {
|
||||
public UmbrellaTreeMembraneBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.SLIME_BLOCK));
|
||||
}
|
||||
|
|
@ -4,13 +4,13 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldView;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import ru.betterend.blocks.basis.BlockFeatureSapling;
|
||||
import ru.betterend.blocks.basis.FeatureSaplingBlock;
|
||||
import ru.betterend.client.render.ERenderLayer;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class BlockUmbrellaTreeSapling extends BlockFeatureSapling {
|
||||
public BlockUmbrellaTreeSapling() {
|
||||
public class UmbrellaTreeSaplingBlock extends FeatureSaplingBlock {
|
||||
public UmbrellaTreeSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -32,8 +32,8 @@ import net.minecraft.world.WorldView;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockVentBubbleColumn extends Block implements FluidDrainable, FluidFillable {
|
||||
public BlockVentBubbleColumn() {
|
||||
public class VentBubbleColumnBlock extends Block implements FluidDrainable, FluidFillable {
|
||||
public VentBubbleColumnBlock() {
|
||||
super(FabricBlockSettings.of(Material.BUBBLE_COLUMN).nonOpaque().noCollision().dropsNothing());
|
||||
}
|
||||
|
|
@ -16,10 +16,10 @@ import net.minecraft.world.WorldAccess;
|
|||
import net.minecraft.world.WorldView;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public abstract class BlockAttached extends BlockBaseNotFull {
|
||||
public abstract class AttachedBlock extends BaseBlockNotFull {
|
||||
public static final DirectionProperty FACING = Properties.FACING;
|
||||
|
||||
public BlockAttached(Settings settings) {
|
||||
public AttachedBlock(Settings settings) {
|
||||
super(settings);
|
||||
this.setDefaultState(this.getDefaultState().with(FACING, Direction.UP));
|
||||
}
|
|
@ -6,8 +6,8 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockBark extends BlockPillar {
|
||||
public BlockBark(Settings settings) {
|
||||
public class BarkBlock extends EndPillarBlock {
|
||||
public BarkBlock(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -13,8 +13,8 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockBase extends Block implements BlockPatterned {
|
||||
public BlockBase(Settings settings) {
|
||||
public class BaseBlock extends Block implements BlockPatterned {
|
||||
public BaseBlock(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -5,9 +5,9 @@ import net.minecraft.entity.EntityType;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
public class BlockBaseNotFull extends BlockBase {
|
||||
public class BaseBlockNotFull extends BaseBlock {
|
||||
|
||||
public BlockBaseNotFull(Settings settings) {
|
||||
public BaseBlockNotFull(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -11,7 +11,6 @@ import net.minecraft.loot.context.LootContext;
|
|||
import net.minecraft.world.BlockView;
|
||||
|
||||
public class BaseBlockWithEntity extends BlockWithEntity {
|
||||
|
||||
public BaseBlockWithEntity(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
|
@ -40,12 +40,12 @@ import ru.betterend.interfaces.IRenderTypeable;
|
|||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockDoublePlant extends BlockBaseNotFull implements IRenderTypeable, Fertilizable {
|
||||
public class DoublePlantBlock extends BaseBlockNotFull implements IRenderTypeable, Fertilizable {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 2, 4, 12, 16, 12);
|
||||
public static final IntProperty ROTATION = BlockProperties.ROTATION;
|
||||
public static final BooleanProperty TOP = BooleanProperty.of("top");
|
||||
|
||||
public BlockDoublePlant() {
|
||||
public DoublePlantBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.WET_GRASS)
|
||||
|
@ -54,7 +54,7 @@ public class BlockDoublePlant extends BlockBaseNotFull implements IRenderTypeabl
|
|||
this.setDefaultState(this.stateManager.getDefaultState().with(TOP, false));
|
||||
}
|
||||
|
||||
public BlockDoublePlant(int light) {
|
||||
public DoublePlantBlock(int light) {
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.WET_GRASS)
|
|
@ -30,8 +30,8 @@ import ru.betterend.patterns.BlockPatterned;
|
|||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.registry.EndBlockEntities;
|
||||
|
||||
public class BlockBarrel extends BarrelBlock implements BlockPatterned {
|
||||
public BlockBarrel(Block source) {
|
||||
public class EndBarrelBlock extends BarrelBlock implements BlockPatterned {
|
||||
public EndBarrelBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
}
|
||||
|
|
@ -16,10 +16,10 @@ import net.minecraft.util.hit.BlockHitResult;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBarkStripable extends BlockBark {
|
||||
public class EndBlockStripableLogLog extends EndPillarBlock {
|
||||
private final Block striped;
|
||||
|
||||
public BlockBarkStripable(MaterialColor color, Block striped) {
|
||||
public EndBlockStripableLogLog(MaterialColor color, Block striped) {
|
||||
super(FabricBlockSettings.copyOf(striped).materialColor(color));
|
||||
this.striped = striped;
|
||||
}
|
|
@ -17,8 +17,8 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.util.registry.Registry;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockBookshelf extends BlockBase {
|
||||
public BlockBookshelf(Block source) {
|
||||
public class EndBookshelfBlock extends BaseBlock {
|
||||
public EndBookshelfBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source));
|
||||
}
|
||||
|
|
@ -17,11 +17,10 @@ import ru.betterend.patterns.BlockPatterned;
|
|||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.registry.EndBlockEntities;
|
||||
|
||||
public class BlockChest extends ChestBlock implements BlockPatterned {
|
||||
|
||||
public class EndChestBlock extends ChestBlock implements BlockPatterned {
|
||||
private final Block parent;
|
||||
|
||||
public BlockChest(Block source) {
|
||||
public EndChestBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque(), () -> {
|
||||
return EndBlockEntities.CHEST;
|
||||
});
|
|
@ -15,8 +15,8 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockComposter extends ComposterBlock implements BlockPatterned {
|
||||
public BlockComposter(Block source) {
|
||||
public class EndComposterBlock extends ComposterBlock implements BlockPatterned {
|
||||
public EndComposterBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source));
|
||||
}
|
||||
|
|
@ -16,8 +16,8 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockCraftingTable extends CraftingTableBlock implements BlockPatterned {
|
||||
public BlockCraftingTable(Block source) {
|
||||
public class EndCraftingTableBlock extends CraftingTableBlock implements BlockPatterned {
|
||||
public EndCraftingTableBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source));
|
||||
}
|
||||
|
|
@ -18,8 +18,8 @@ import ru.betterend.interfaces.IRenderTypeable;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockDoor extends DoorBlock implements IRenderTypeable, BlockPatterned {
|
||||
public BlockDoor(Block block) {
|
||||
public class EndDoorBlock extends DoorBlock implements IRenderTypeable, BlockPatterned {
|
||||
public EndDoorBlock(Block block) {
|
||||
super(FabricBlockSettings.copy(block).nonOpaque());
|
||||
}
|
||||
|
|
@ -15,11 +15,10 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockFence extends FenceBlock implements BlockPatterned {
|
||||
|
||||
public class EndFenceBlock extends FenceBlock implements BlockPatterned {
|
||||
private final Block parent;
|
||||
|
||||
public BlockFence(Block source) {
|
||||
public EndFenceBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
|
@ -15,11 +15,10 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockGate extends FenceGateBlock implements BlockPatterned {
|
||||
|
||||
public class EndGateBlock extends FenceGateBlock implements BlockPatterned {
|
||||
private final Block parent;
|
||||
|
||||
public BlockGate(Block source) {
|
||||
public EndGateBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
|
@ -31,7 +31,7 @@ import ru.betterend.patterns.BlockPatterned;
|
|||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.util.BlocksHelper;
|
||||
|
||||
public class BlockLadder extends BlockBaseNotFull implements IRenderTypeable, BlockPatterned {
|
||||
public class EndLadderBlock extends BaseBlockNotFull implements IRenderTypeable, BlockPatterned {
|
||||
public static final DirectionProperty FACING = HorizontalFacingBlock.FACING;
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
protected static final VoxelShape EAST_SHAPE = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 3.0D, 16.0D, 16.0D);
|
||||
|
@ -39,7 +39,7 @@ public class BlockLadder extends BlockBaseNotFull implements IRenderTypeable, Bl
|
|||
protected static final VoxelShape SOUTH_SHAPE = Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 16.0D, 3.0D);
|
||||
protected static final VoxelShape NORTH_SHAPE = Block.createCuboidShape(0.0D, 0.0D, 13.0D, 16.0D, 16.0D, 16.0D);
|
||||
|
||||
public BlockLadder(Block block) {
|
||||
public EndLadderBlock(Block block) {
|
||||
super(FabricBlockSettings.copyOf(block).nonOpaque());
|
||||
}
|
||||
|
|
@ -19,15 +19,15 @@ import net.minecraft.world.BlockView;
|
|||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class BlockLantern extends BlockBaseNotFull implements Waterloggable, FluidFillable {
|
||||
public class EndLanternBlock extends BaseBlockNotFull implements Waterloggable, FluidFillable {
|
||||
public static final BooleanProperty IS_FLOOR = BooleanProperty.of("is_floor");
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
public BlockLantern(Block source) {
|
||||
public EndLanternBlock(Block source) {
|
||||
this(FabricBlockSettings.copyOf(source).luminance(15).nonOpaque());
|
||||
}
|
||||
|
||||
public BlockLantern(FabricBlockSettings settings) {
|
||||
public EndLanternBlock(FabricBlockSettings settings) {
|
||||
super(settings.nonOpaque());
|
||||
}
|
||||
|
|
@ -26,10 +26,10 @@ import ru.betterend.patterns.BlockPatterned;
|
|||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockLeaves extends LeavesBlock implements BlockPatterned, IRenderTypeable {
|
||||
public class EndLeavesBlock extends LeavesBlock implements BlockPatterned, IRenderTypeable {
|
||||
private final Block sapling;
|
||||
|
||||
public BlockLeaves(Block sapling, MaterialColor color) {
|
||||
public EndLeavesBlock(Block sapling, MaterialColor color) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES)
|
||||
.allowsSpawning((state, world, pos, type) -> { return false; })
|
||||
.suffocates((state, world, pos) -> { return false; })
|
||||
|
@ -39,7 +39,7 @@ public class BlockLeaves extends LeavesBlock implements BlockPatterned, IRenderT
|
|||
this.sapling = sapling;
|
||||
}
|
||||
|
||||
public BlockLeaves(Block sapling, MaterialColor color, int light) {
|
||||
public EndLeavesBlock(Block sapling, MaterialColor color, int light) {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_LEAVES)
|
||||
.allowsSpawning((state, world, pos, type) -> { return false; })
|
||||
.suffocates((state, world, pos) -> { return false; })
|
|
@ -24,13 +24,13 @@ import ru.betterend.patterns.BlockPatterned;
|
|||
import ru.betterend.patterns.Patterns;
|
||||
import ru.betterend.util.MHelper;
|
||||
|
||||
public class BlockOre extends OreBlock implements BlockPatterned {
|
||||
public class EndOreBlock extends OreBlock implements BlockPatterned {
|
||||
private final Item dropItem;
|
||||
private final int minCount;
|
||||
private final int maxCount;
|
||||
private final int expirience;
|
||||
|
||||
public BlockOre(Item drop, int minCount, int maxCount, int expirience) {
|
||||
public EndOreBlock(Item drop, int minCount, int maxCount, int expirience) {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.SAND)
|
||||
.hardness(3F)
|
||||
.resistance(9F)
|
|
@ -13,8 +13,8 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockPillar extends PillarBlock implements BlockPatterned {
|
||||
public BlockPillar(Settings settings) {
|
||||
public class EndPillarBlock extends PillarBlock implements BlockPatterned {
|
||||
public EndPillarBlock(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -34,18 +34,18 @@ import ru.betterend.client.render.ERenderLayer;
|
|||
import ru.betterend.interfaces.IRenderTypeable;
|
||||
import ru.betterend.registry.EndTags;
|
||||
|
||||
public class BlockPlant extends BlockBaseNotFull implements IRenderTypeable, Fertilizable {
|
||||
public class EndPlantBlock extends BaseBlockNotFull implements IRenderTypeable, Fertilizable {
|
||||
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 0, 4, 12, 14, 12);
|
||||
|
||||
public BlockPlant() {
|
||||
public EndPlantBlock() {
|
||||
this(false);
|
||||
}
|
||||
|
||||
public BlockPlant(int light) {
|
||||
public EndPlantBlock(int light) {
|
||||
this(false, light);
|
||||
}
|
||||
|
||||
public BlockPlant(boolean replaceable) {
|
||||
public EndPlantBlock(boolean replaceable) {
|
||||
super(FabricBlockSettings.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.GRASS)
|
||||
|
@ -53,7 +53,7 @@ public class BlockPlant extends BlockBaseNotFull implements IRenderTypeable, Fer
|
|||
.noCollision());
|
||||
}
|
||||
|
||||
public BlockPlant(boolean replaceable, int light) {
|
||||
public EndPlantBlock(boolean replaceable, int light) {
|
||||
super(FabricBlockSettings.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sounds(BlockSoundGroup.GRASS)
|
||||
|
@ -62,7 +62,7 @@ public class BlockPlant extends BlockBaseNotFull implements IRenderTypeable, Fer
|
|||
.noCollision());
|
||||
}
|
||||
|
||||
public BlockPlant(Settings settings) {
|
||||
public EndPlantBlock(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
|
@ -15,11 +15,10 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockPressurePlate extends PressurePlateBlock implements BlockPatterned {
|
||||
|
||||
public class EndPlateBlock extends PressurePlateBlock implements BlockPatterned {
|
||||
private final Block parent;
|
||||
|
||||
public BlockPressurePlate(Block source) {
|
||||
public EndPlateBlock(Block source) {
|
||||
super(ActivationRule.EVERYTHING, FabricBlockSettings.copyOf(source).nonOpaque());
|
||||
this.parent = source;
|
||||
}
|
|
@ -41,7 +41,7 @@ import ru.betterend.blocks.entities.ESignBlockEntity;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockSign extends AbstractSignBlock implements BlockPatterned {
|
||||
public class EndSignBlock extends AbstractSignBlock implements BlockPatterned {
|
||||
public static final IntProperty ROTATION = Properties.ROTATION;
|
||||
public static final BooleanProperty FLOOR = BooleanProperty.of("floor");
|
||||
private static final VoxelShape[] WALL_SHAPES = new VoxelShape[] {
|
||||
|
@ -52,7 +52,7 @@ public class BlockSign extends AbstractSignBlock implements BlockPatterned {
|
|||
|
||||
private final Block parent;
|
||||
|
||||
public BlockSign(Block source) {
|
||||
public EndSignBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).noCollision().nonOpaque(), SignType.OAK);
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(ROTATION, 0).with(FLOOR, true).with(WATERLOGGED, false));
|
||||
this.parent = source;
|
|
@ -15,11 +15,10 @@ import net.minecraft.util.registry.Registry;
|
|||
import ru.betterend.patterns.BlockPatterned;
|
||||
import ru.betterend.patterns.Patterns;
|
||||
|
||||
public class BlockSlab extends SlabBlock implements BlockPatterned {
|
||||
|
||||
public class EndSlabBlock extends SlabBlock implements BlockPatterned {
|
||||
private final Block parent;
|
||||
|
||||
public BlockSlab(Block source) {
|
||||
public EndSlabBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source));
|
||||
this.parent = source;
|
||||
}
|
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