Block class rename

This commit is contained in:
paulevsGitch 2021-01-05 04:02:08 +03:00
parent 4b55bf30a8
commit 5f3547de8e
157 changed files with 748 additions and 756 deletions

View file

@ -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));
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -1,45 +0,0 @@
package ru.betterend.blocks.basis;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Material;
import net.minecraft.block.MaterialColor;
import net.minecraft.block.ShapeContext;
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.client.render.ERenderLayer;
import ru.betterend.interfaces.IRenderTypeable;
public class BlockBulbVineLantern extends BlockLantern 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() {
this(FabricBlockSettings.of(Material.METAL)
.sounds(BlockSoundGroup.LANTERN)
.hardness(1)
.resistance(1)
.breakByTool(FabricToolTags.PICKAXES)
.materialColor(MaterialColor.LIGHT_GRAY)
.requiresTool()
.luminance(15));
}
public BlockBulbVineLantern(FabricBlockSettings settings) {
super(settings);
}
@Override
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext ePos) {
return state.get(IS_FLOOR) ? SHAPE_FLOOR : SHAPE_CEIL;
}
@Override
public ERenderLayer getRenderLayer() {
return ERenderLayer.CUTOUT;
}
}

View file

@ -1,53 +0,0 @@
package ru.betterend.blocks.basis;
import java.io.Reader;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.minecraft.client.color.block.BlockColorProvider;
import net.minecraft.client.color.item.ItemColorProvider;
import net.minecraft.util.Identifier;
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) {
super(settings);
}
@Override
public BlockColorProvider getProvider() {
return (state, world, pos, tintIndex) -> {
return this.getDefaultMaterialColor().color;
};
}
@Override
public ItemColorProvider getItemProvider() {
return (stack, tintIndex) -> {
return this.getDefaultMaterialColor().color;
};
}
@Override
public String getStatesPattern(Reader data) {
String path = "betterend:block/bulb_lantern_colored";
return Patterns.createJson(data, path, path);
}
@Override
public String getModelPattern(String block) {
String path = "betterend:block/bulb_lantern_colored";
if (block.contains("item") || block.contains("ceil")) {
return Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_COLORED_CEIL, path, path);
}
else {
return Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_COLORED_FLOOR, path, path);
}
}
@Override
public Identifier statePatternId() {
return Patterns.STATE_BULB_LANTERN;
}
}

View file

@ -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)

View file

@ -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());
}

View file

@ -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;
}

View file

@ -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));
}

View file

@ -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;
});

View file

@ -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));
}

View file

@ -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));
}

View file

@ -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());
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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());
}

View file

@ -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());
}

View file

@ -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; })

View file

@ -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)

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;
}

View file

@ -15,11 +15,11 @@ import net.minecraft.util.registry.Registry;
import ru.betterend.patterns.BlockPatterned;
import ru.betterend.patterns.Patterns;
public class BlockStairs extends StairsBlock implements BlockPatterned {
public class EndStairsBlock extends StairsBlock implements BlockPatterned {
private final Block parent;
public BlockStairs(Block source) {
public EndStairsBlock(Block source) {
super(source.getDefaultState(), FabricBlockSettings.copyOf(source));
this.parent = source;
}

View file

@ -15,11 +15,10 @@ import net.minecraft.util.registry.Registry;
import ru.betterend.patterns.BlockPatterned;
import ru.betterend.patterns.Patterns;
public class BlockStoneButton extends StoneButtonBlock implements BlockPatterned {
public class EndStoneButtonBlock extends StoneButtonBlock implements BlockPatterned {
private final Block parent;
public BlockStoneButton(Block source) {
public EndStoneButtonBlock(Block source) {
super(FabricBlockSettings.copyOf(source).nonOpaque());
this.parent = source;
}

View file

@ -15,11 +15,10 @@ import net.minecraft.util.registry.Registry;
import ru.betterend.patterns.BlockPatterned;
import ru.betterend.patterns.Patterns;
public class BlockStonePressurePlate extends PressurePlateBlock implements BlockPatterned {
public class EndStonelateBlock extends PressurePlateBlock implements BlockPatterned {
private final Block parent;
public BlockStonePressurePlate(Block source) {
public EndStonelateBlock(Block source) {
super(ActivationRule.MOBS, FabricBlockSettings.copyOf(source).nonOpaque());
this.parent = source;
}

View file

@ -18,8 +18,8 @@ import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.patterns.BlockPatterned;
import ru.betterend.patterns.Patterns;
public class BlockTrapdoor extends TrapdoorBlock implements IRenderTypeable, BlockPatterned {
public BlockTrapdoor(Block source) {
public class EndTrapdoorBlock extends TrapdoorBlock implements IRenderTypeable, BlockPatterned {
public EndTrapdoorBlock(Block source) {
super(FabricBlockSettings.copyOf(source).nonOpaque());
}

View file

@ -14,9 +14,9 @@ import net.minecraft.world.BlockView;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
public class BlockUnderwaterWallPlant extends BlockWallPlant implements FluidFillable {
public class EndUnderwaterWallPlantBlock extends EndWallPlantBlock implements FluidFillable {
public BlockUnderwaterWallPlant() {
public EndUnderwaterWallPlantBlock() {
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)
@ -24,7 +24,7 @@ public class BlockUnderwaterWallPlant extends BlockWallPlant implements FluidFil
.noCollision());
}
public BlockUnderwaterWallPlant(int light) {
public EndUnderwaterWallPlantBlock(int light) {
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)
@ -33,7 +33,7 @@ public class BlockUnderwaterWallPlant extends BlockWallPlant implements FluidFil
.noCollision());
}
public BlockUnderwaterWallPlant(Settings settings) {
public EndUnderwaterWallPlantBlock(Settings settings) {
super(settings);
}

View file

@ -15,11 +15,11 @@ import net.minecraft.util.registry.Registry;
import ru.betterend.patterns.BlockPatterned;
import ru.betterend.patterns.Patterns;
public class BlockWall extends WallBlock implements BlockPatterned {
public class EndWallBlock extends WallBlock implements BlockPatterned {
private final Block parent;
public BlockWall(Block source) {
public EndWallBlock(Block source) {
super(FabricBlockSettings.copyOf(source).nonOpaque());
this.parent = source;
}

View file

@ -28,7 +28,7 @@ import net.minecraft.world.WorldAccess;
import net.minecraft.world.WorldView;
import ru.betterend.util.BlocksHelper;
public class BlockWallPlant extends BlockPlant {
public class EndWallPlantBlock extends EndPlantBlock {
private static final EnumMap<Direction, VoxelShape> SHAPES = Maps.newEnumMap(ImmutableMap.of(
Direction.NORTH, Block.createCuboidShape(1, 1, 8, 15, 15, 16),
Direction.SOUTH, Block.createCuboidShape(1, 1, 0, 15, 15, 8),
@ -36,7 +36,7 @@ public class BlockWallPlant extends BlockPlant {
Direction.EAST, Block.createCuboidShape(0, 1, 1, 8, 15, 15)));
public static final DirectionProperty FACING = HorizontalFacingBlock.FACING;
public BlockWallPlant() {
public EndWallPlantBlock() {
this(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)
@ -44,7 +44,7 @@ public class BlockWallPlant extends BlockPlant {
.noCollision());
}
public BlockWallPlant(int light) {
public EndWallPlantBlock(int light) {
this(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)
@ -53,7 +53,7 @@ public class BlockWallPlant extends BlockPlant {
.noCollision());
}
public BlockWallPlant(Settings settings) {
public EndWallPlantBlock(Settings settings) {
super(settings);
}

View file

@ -15,11 +15,11 @@ import net.minecraft.util.registry.Registry;
import ru.betterend.patterns.BlockPatterned;
import ru.betterend.patterns.Patterns;
public class BlockWoodenButton extends WoodenButtonBlock implements BlockPatterned {
public class EndWoodenButtonBlock extends WoodenButtonBlock implements BlockPatterned {
private final Block parent;
public BlockWoodenButton(Block source) {
public EndWoodenButtonBlock(Block source) {
super(FabricBlockSettings.copyOf(source).nonOpaque());
this.parent = source;
}

View file

@ -27,10 +27,10 @@ import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.patterns.Patterns;
import ru.betterend.registry.EndTags;
public abstract class BlockFeatureSapling extends BlockBaseNotFull implements Fertilizable, IRenderTypeable {
public abstract class FeatureSaplingBlock extends BaseBlockNotFull implements Fertilizable, IRenderTypeable {
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 0, 4, 12, 14, 12);
public BlockFeatureSapling() {
public FeatureSaplingBlock() {
super(FabricBlockSettings.of(Material.PLANT)
.breakByHand(true)
.collidable(false)
@ -39,7 +39,7 @@ public abstract class BlockFeatureSapling extends BlockBaseNotFull implements Fe
.ticksRandomly());
}
public BlockFeatureSapling(int light) {
public FeatureSaplingBlock(int light) {
super(FabricBlockSettings.of(Material.PLANT)
.breakByHand(true)
.collidable(false)

View file

@ -27,12 +27,12 @@ import ru.betterend.client.render.ERenderLayer;
import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.util.MHelper;
public class BlockFur extends BlockAttached implements IRenderTypeable {
public class FurBlock extends AttachedBlock implements IRenderTypeable {
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
private final ItemConvertible drop;
private final int dropChance;
public BlockFur(ItemConvertible drop, int light, int dropChance) {
public FurBlock(ItemConvertible drop, int light, int dropChance) {
super(FabricBlockSettings.of(Material.REPLACEABLE_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)
@ -43,7 +43,7 @@ public class BlockFur extends BlockAttached implements IRenderTypeable {
this.dropChance = dropChance;
}
public BlockFur(ItemConvertible drop, int dropChance) {
public FurBlock(ItemConvertible drop, int dropChance) {
super(FabricBlockSettings.of(Material.REPLACEABLE_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)

View file

@ -43,7 +43,7 @@ import ru.betterend.patterns.Patterns;
import ru.betterend.registry.EndBlocks;
import ru.betterend.util.BlocksHelper;
public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvider {
public class PedestalBlock extends BaseBlockNotFull implements BlockEntityProvider {
public final static EnumProperty<PedestalState> STATE = BlockProperties.PEDESTAL_STATE;
public static final BooleanProperty HAS_ITEM = BlockProperties.HAS_ITEM;
public static final BooleanProperty HAS_LIGHT = BlockProperties.HAS_LIGHT;
@ -64,7 +64,7 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
* @return new Pedestal block with Better End id.
*/
public static Block registerPedestal(String name, Block source) {
return EndBlocks.registerBlock(name, new BlockPedestal(source));
return EndBlocks.registerBlock(name, new PedestalBlock(source));
}
/**
@ -76,13 +76,13 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
* @return new Pedestal block with specified id.
*/
public static Block registerPedestal(Identifier id, Block source) {
return EndBlocks.registerBlock(id, new BlockPedestal(source));
return EndBlocks.registerBlock(id, new PedestalBlock(source));
}
protected final Block parent;
protected float height = 1.0F;
public BlockPedestal(Block parent) {
public PedestalBlock(Block parent) {
super(FabricBlockSettings.copyOf(parent).luminance(state -> {
return state.get(HAS_LIGHT) ? 12 : 0;
}));
@ -91,7 +91,7 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
}
public float getHeight(BlockState state) {
if (state.getBlock() instanceof BlockPedestal && state.get(STATE) == PedestalState.PEDESTAL_TOP) {
if (state.getBlock() instanceof PedestalBlock && state.get(STATE) == PedestalState.PEDESTAL_TOP) {
return this.height - 0.2F;
}
return this.height;
@ -131,8 +131,8 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
BlockState upState = world.getBlockState(pos.up());
BlockState downState = world.getBlockState(pos.down());
boolean upSideSolid = upState.isSideSolidFullSquare(world, pos.up(), Direction.DOWN) || upState.isIn(BlockTags.WALLS);
boolean hasPedestalOver = upState.getBlock() instanceof BlockPedestal;
boolean hasPedestalUnder = downState.getBlock() instanceof BlockPedestal;
boolean hasPedestalOver = upState.getBlock() instanceof PedestalBlock;
boolean hasPedestalUnder = downState.getBlock() instanceof PedestalBlock;
if (!hasPedestalOver && hasPedestalUnder && upSideSolid) {
return this.getDefaultState().with(STATE, PedestalState.COLUMN_TOP);
} else if (!hasPedestalOver && !hasPedestalUnder && upSideSolid) {
@ -163,13 +163,13 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
BlockState upState = world.getBlockState(pos.up());
BlockState downState = world.getBlockState(pos.down());
boolean upSideSolid = upState.isSideSolidFullSquare(world, pos.up(), Direction.DOWN) || upState.isIn(BlockTags.WALLS);
boolean hasPedestalOver = upState.getBlock() instanceof BlockPedestal;
boolean hasPedestalUnder = downState.getBlock() instanceof BlockPedestal;
boolean hasPedestalOver = upState.getBlock() instanceof PedestalBlock;
boolean hasPedestalUnder = downState.getBlock() instanceof PedestalBlock;
if (direction == Direction.UP) {
upSideSolid = newState.isSideSolidFullSquare(world, posFrom, Direction.DOWN) || newState.isIn(BlockTags.WALLS);
hasPedestalOver = newState.getBlock() instanceof BlockPedestal;
hasPedestalOver = newState.getBlock() instanceof PedestalBlock;
} else if (direction == Direction.DOWN) {
hasPedestalUnder = newState.getBlock() instanceof BlockPedestal;
hasPedestalUnder = newState.getBlock() instanceof PedestalBlock;
}
if (!hasPedestalOver && hasPedestalUnder && upSideSolid) {
return state.with(STATE, PedestalState.COLUMN_TOP);
@ -309,7 +309,7 @@ public class BlockPedestal extends BlockBaseNotFull implements BlockEntityProvid
@Override
public boolean hasComparatorOutput(BlockState state) {
return state.getBlock() instanceof BlockPedestal;
return state.getBlock() instanceof PedestalBlock;
}
@Override

View file

@ -14,10 +14,10 @@ import net.minecraft.state.property.IntProperty;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
public abstract class BlockPlantWithAge extends BlockPlant {
public abstract class PlantWithAgeBlock extends EndPlantBlock {
public static final IntProperty AGE = IntProperty.of("age", 0, 3);
public BlockPlantWithAge() {
public PlantWithAgeBlock() {
this(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)
@ -26,7 +26,7 @@ public abstract class BlockPlantWithAge extends BlockPlant {
.noCollision());
}
public BlockPlantWithAge(FabricBlockSettings settings) {
public PlantWithAgeBlock(FabricBlockSettings settings) {
super(settings);
}

View file

@ -12,8 +12,8 @@ import ru.betterend.client.render.ERenderLayer;
import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.patterns.Patterns;
public class BlockSimpleLeaves extends BlockBaseNotFull implements IRenderTypeable {
public BlockSimpleLeaves(MaterialColor color) {
public class SimpleLeavesBlock extends BaseBlockNotFull implements IRenderTypeable {
public SimpleLeavesBlock(MaterialColor color) {
super(FabricBlockSettings.of(Material.LEAVES)
.strength(0.2F)
.sounds(BlockSoundGroup.GRASS)
@ -24,7 +24,7 @@ public class BlockSimpleLeaves extends BlockBaseNotFull implements IRenderTypeab
.materialColor(color));
}
public BlockSimpleLeaves(MaterialColor color, int light) {
public SimpleLeavesBlock(MaterialColor color, int light) {
super(FabricBlockSettings.of(Material.LEAVES)
.strength(0.2F)
.sounds(BlockSoundGroup.GRASS)

View file

@ -20,12 +20,12 @@ import ru.betterend.interfaces.IColorProvider;
import ru.betterend.patterns.Patterns;
import ru.betterend.util.MHelper;
public class BlockStoneLantern extends BlockLantern implements IColorProvider {
public class StoneLanternBlock extends EndLanternBlock implements IColorProvider {
private static final VoxelShape SHAPE_CEIL = Block.createCuboidShape(3, 1, 3, 13, 16, 13);
private static final VoxelShape SHAPE_FLOOR = Block.createCuboidShape(3, 0, 3, 13, 15, 13);
private static final Vec3i[] COLORS = AuroraCrystalBlock.COLORS;
public BlockStoneLantern(Block source) {
public StoneLanternBlock(Block source) {
super(FabricBlockSettings.copyOf(source).luminance(15));
}

View file

@ -16,10 +16,10 @@ import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class BlockLogStripable extends BlockPillar {
public class StrippableBarkBlock extends BarkBlock {
private final Block striped;
public BlockLogStripable(MaterialColor color, Block striped) {
public StrippableBarkBlock(MaterialColor color, Block striped) {
super(FabricBlockSettings.copyOf(striped).materialColor(color));
this.striped = striped;
}

View file

@ -39,10 +39,10 @@ import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndTags;
public class BlockUnderwaterPlant extends BlockBaseNotFull implements IRenderTypeable, Fertilizable, FluidFillable {
public class UnderwaterPlantBlock extends BaseBlockNotFull implements IRenderTypeable, Fertilizable, FluidFillable {
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 0, 4, 12, 14, 12);
public BlockUnderwaterPlant() {
public UnderwaterPlantBlock() {
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)
@ -50,7 +50,7 @@ public class BlockUnderwaterPlant extends BlockBaseNotFull implements IRenderTyp
.noCollision());
}
public BlockUnderwaterPlant(int light) {
public UnderwaterPlantBlock(int light) {
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)
@ -59,7 +59,7 @@ public class BlockUnderwaterPlant extends BlockBaseNotFull implements IRenderTyp
.noCollision());
}
public BlockUnderwaterPlant(Settings settings) {
public UnderwaterPlantBlock(Settings settings) {
super(settings);
}

View file

@ -14,10 +14,10 @@ import net.minecraft.state.property.IntProperty;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.StructureWorldAccess;
public abstract class BlockUnderwaterPlantWithAge extends BlockUnderwaterPlant {
public abstract class UnderwaterPlantWithAgeBlock extends UnderwaterPlantBlock {
public static final IntProperty AGE = IntProperty.of("age", 0, 3);
public BlockUnderwaterPlantWithAge() {
public UnderwaterPlantWithAgeBlock() {
super(FabricBlockSettings.of(Material.UNDERWATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.WET_GRASS)

View file

@ -30,10 +30,10 @@ import ru.betterend.client.render.ERenderLayer;
import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.registry.EndTags;
public class BlockUpDownPlant extends BlockBaseNotFull implements IRenderTypeable {
public class UpDownPlantBlock extends BaseBlockNotFull implements IRenderTypeable {
private static final VoxelShape SHAPE = Block.createCuboidShape(4, 0, 4, 12, 16, 12);
public BlockUpDownPlant() {
public UpDownPlantBlock() {
super(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)

View file

@ -38,19 +38,19 @@ import ru.betterend.client.render.ERenderLayer;
import ru.betterend.interfaces.IRenderTypeable;
import ru.betterend.util.BlocksHelper;
public class BlockVine extends BlockBaseNotFull implements IRenderTypeable, Fertilizable {
public class VineBlock extends BaseBlockNotFull implements IRenderTypeable, Fertilizable {
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
private static final VoxelShape VOXEL_SHAPE = Block.createCuboidShape(2, 0, 2, 14, 16, 14);
public BlockVine() {
public VineBlock() {
this(0, false);
}
public BlockVine(int light) {
public VineBlock(int light) {
this(light, false);
}
public BlockVine(int light, boolean bottomOnly) {
public VineBlock(int light, boolean bottomOnly) {
super(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.sounds(BlockSoundGroup.GRASS)

View file

@ -15,8 +15,8 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.world.WorldView;
public class BlockWallMushroom extends BlockWallPlant {
public BlockWallMushroom(int light) {
public class WallMushroomBlock extends EndWallPlantBlock {
public WallMushroomBlock(int light) {
super(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.AXES)
.sounds(BlockSoundGroup.GRASS)