[Fix] Mining Behaviour is missing (#224)
This commit is contained in:
parent
55e4af0f9c
commit
10732633b1
25 changed files with 106 additions and 47 deletions
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
@ -7,7 +8,7 @@ import net.minecraft.world.level.material.MapColor;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class AmberBlock extends BaseBlock {
|
||||
public class AmberBlock extends BaseBlock implements BehaviourStone {
|
||||
public AmberBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).mapColor(MapColor.COLOR_YELLOW));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourIce;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.util.BlocksHelper;
|
||||
import org.betterx.bclib.util.MHelper;
|
||||
|
@ -25,7 +26,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class AncientEmeraldIceBlock extends BaseBlock {
|
||||
public class AncientEmeraldIceBlock extends BaseBlock implements BehaviourIce {
|
||||
public AncientEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.BLUE_ICE).randomTicks());
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class BrimstoneBlock extends BaseBlock {
|
||||
public class BrimstoneBlock extends BaseBlock.Stone {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public BrimstoneBlock() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.interfaces.Fuel;
|
||||
|
||||
|
@ -7,7 +8,7 @@ import net.minecraft.world.level.block.Blocks;
|
|||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class CharcoalBlock extends BaseBlock implements Fuel {
|
||||
public class CharcoalBlock extends BaseBlock implements Fuel, BehaviourStone {
|
||||
public CharcoalBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.COAL_BLOCK));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourIce;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
@ -17,7 +18,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class DenseEmeraldIceBlock extends BaseBlock implements RenderLayerProvider {
|
||||
public class DenseEmeraldIceBlock extends BaseBlock implements RenderLayerProvider, BehaviourIce {
|
||||
public DenseEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.PACKED_ICE));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourIce;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
@ -30,7 +31,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class EmeraldIceBlock extends HalfTransparentBlock implements RenderLayerProvider, BlockModelProvider {
|
||||
public class EmeraldIceBlock extends HalfTransparentBlock implements RenderLayerProvider, BlockModelProvider, BehaviourIce {
|
||||
public EmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.ICE));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourWood;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
import org.betterx.bclib.blocks.BlockProperties;
|
||||
import org.betterx.bclib.blocks.BlockProperties.TripleShape;
|
||||
|
@ -30,7 +31,7 @@ import com.google.common.collect.Maps;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlock, RenderLayerProvider {
|
||||
public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlock, RenderLayerProvider, BehaviourWood {
|
||||
public static final EnumProperty<Direction> FACING = BlockStateProperties.FACING;
|
||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||
public static final BooleanProperty LEAF = BooleanProperty.create("leaf");
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourMetal;
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourWood;
|
||||
import org.betterx.betterend.BetterEnd;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
|
@ -11,9 +14,9 @@ import com.google.common.collect.Maps;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
public class EndPedestal extends PedestalBlock {
|
||||
public abstract class EndPedestal extends PedestalBlock {
|
||||
|
||||
public EndPedestal(Block parent) {
|
||||
protected EndPedestal(Block parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
|
@ -29,4 +32,25 @@ public class EndPedestal extends PedestalBlock {
|
|||
textures.put("%bottom%", name + "_polished");
|
||||
return textures;
|
||||
}
|
||||
|
||||
public static class Stone extends EndPedestal implements BehaviourStone {
|
||||
public Stone(Block parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Wood extends EndPedestal implements BehaviourWood {
|
||||
public Wood(Block parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Metal extends EndPedestal implements BehaviourMetal {
|
||||
public Metal(Block parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourSand;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.bclib.interfaces.tools.AddMineableShovel;
|
||||
import org.betterx.ui.ColorUtil;
|
||||
import org.betterx.worlds.together.tag.v3.CommonBlockTags;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class EndstoneDustBlock extends FallingBlock implements TagProvider, AddMineableShovel {
|
||||
public class EndstoneDustBlock extends FallingBlock implements TagProvider, BehaviourSand {
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static final int COLOR = ColorUtil.color(226, 239, 168);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.blocks.entities.EternalPedestalEntity;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
@ -29,7 +30,7 @@ import com.google.common.collect.Lists;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class EternalPedestal extends PedestalBlock {
|
||||
public class EternalPedestal extends PedestalBlock implements BehaviourStone {
|
||||
public static final BooleanProperty ACTIVATED = EndBlockProperties.ACTIVE;
|
||||
|
||||
public EternalPedestal() {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.BaseBlockNotFull;
|
||||
import org.betterx.bclib.client.models.BasePatterns;
|
||||
import org.betterx.bclib.client.models.ModelsHelper;
|
||||
|
@ -453,6 +454,12 @@ public class FlowerPotBlock extends BaseBlockNotFull implements RenderLayerProvi
|
|||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
public static class Stone extends FlowerPotBlock implements BehaviourStone {
|
||||
public Stone(Block source) {
|
||||
super(source);
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
SHAPE_EMPTY = Shapes.or(Block.box(4, 1, 4, 12, 8, 12), Block.box(5, 0, 5, 11, 1, 11));
|
||||
SHAPE_FULL = Shapes.or(SHAPE_EMPTY, Block.box(3, 8, 3, 13, 16, 13));
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
import org.betterx.betterend.blocks.entities.InfusionPedestalEntity;
|
||||
import org.betterx.betterend.rituals.InfusionRitual;
|
||||
|
@ -21,7 +22,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class InfusionPedestal extends PedestalBlock {
|
||||
public class InfusionPedestal extends PedestalBlock implements BehaviourStone {
|
||||
private static final VoxelShape SHAPE_DEFAULT;
|
||||
private static final VoxelShape SHAPE_PEDESTAL_TOP;
|
||||
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
||||
public class MissingTileBlock extends BaseBlock {
|
||||
public class MissingTileBlock extends BaseBlock implements BehaviourStone {
|
||||
public MissingTileBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.BaseRotatedPillarBlock;
|
||||
import org.betterx.betterend.registry.EndBlocks;
|
||||
|
||||
|
@ -24,7 +25,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class MossyDragonBoneBlock extends BaseRotatedPillarBlock {
|
||||
public class MossyDragonBoneBlock extends BaseRotatedPillarBlock implements BehaviourStone {
|
||||
public MossyDragonBoneBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.BONE_BLOCK).hardness(0.5F).randomTicks());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourObsidian;
|
||||
import org.betterx.bclib.blocks.BaseBlock;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -22,7 +23,7 @@ import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class MossyObsidian extends BaseBlock {
|
||||
public class MossyObsidian extends BaseBlock implements BehaviourObsidian {
|
||||
public MossyObsidian() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OBSIDIAN).hardness(3).randomTicks());
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
|
@ -9,7 +10,7 @@ import net.minecraft.world.level.block.Block;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class PedestalVanilla extends PedestalBlock {
|
||||
public class PedestalVanilla extends PedestalBlock implements BehaviourStone {
|
||||
|
||||
public PedestalVanilla(Block parent) {
|
||||
super(parent);
|
||||
|
|
|
@ -20,7 +20,7 @@ import com.google.common.collect.Lists;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class RunedFlavolite extends BaseBlock {
|
||||
public class RunedFlavolite extends BaseBlock.Stone {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public RunedFlavolite(boolean unbreakable) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourLeaves;
|
||||
import org.betterx.bclib.client.render.BCLRenderLayer;
|
||||
import org.betterx.bclib.interfaces.BlockModelProvider;
|
||||
import org.betterx.bclib.interfaces.RenderLayerProvider;
|
||||
|
@ -31,7 +32,7 @@ import com.google.common.collect.Lists;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class UmbrellaTreeMembraneBlock extends SlimeBlock implements RenderLayerProvider, BlockModelProvider {
|
||||
public class UmbrellaTreeMembraneBlock extends SlimeBlock implements RenderLayerProvider, BlockModelProvider, BehaviourLeaves {
|
||||
public static final IntegerProperty COLOR = EndBlockProperties.COLOR;
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package org.betterx.betterend.blocks.basis;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourMetal;
|
||||
import org.betterx.bclib.blocks.LeveledAnvilBlock;
|
||||
import org.betterx.betterend.complexmaterials.MetalMaterial;
|
||||
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
public class EndAnvilBlock extends LeveledAnvilBlock {
|
||||
public class EndAnvilBlock extends LeveledAnvilBlock implements BehaviourMetal {
|
||||
protected MetalMaterial metalMaterial;
|
||||
|
||||
public EndAnvilBlock(MapColor color, int level) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package org.betterx.betterend.blocks.basis;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.BaseTerrainBlock;
|
||||
import org.betterx.bclib.interfaces.TagProvider;
|
||||
import org.betterx.betterend.interfaces.PottableTerrain;
|
||||
|
@ -13,7 +14,7 @@ import net.minecraft.world.level.material.MapColor;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class EndTerrainBlock extends BaseTerrainBlock implements PottableTerrain, TagProvider {
|
||||
public class EndTerrainBlock extends BaseTerrainBlock implements PottableTerrain, TagProvider, BehaviourStone {
|
||||
public EndTerrainBlock(MapColor color) {
|
||||
super(Blocks.END_STONE, color);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package org.betterx.betterend.blocks.basis;
|
||||
|
||||
import org.betterx.bclib.behaviours.interfaces.BehaviourStone;
|
||||
import org.betterx.bclib.blocks.TripleTerrainBlock;
|
||||
import org.betterx.betterend.interfaces.PottableTerrain;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
|
||||
public class EndTripleTerrain extends TripleTerrainBlock implements PottableTerrain {
|
||||
public class EndTripleTerrain extends TripleTerrainBlock implements PottableTerrain, BehaviourStone {
|
||||
public EndTripleTerrain(MapColor color) {
|
||||
super(Blocks.END_STONE, color);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue