Added some common tags (#303)

This commit is contained in:
Frank 2021-10-18 20:00:11 +02:00
parent 14ddd13ed2
commit 1d81c16451
7 changed files with 23 additions and 15 deletions

View file

@ -1,6 +1,10 @@
package ru.betterend.blocks;
import java.util.Collections;
import java.util.List;
import com.google.common.collect.Lists;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.client.color.block.BlockColor;
@ -19,6 +23,7 @@ import net.minecraft.world.level.material.Material;
import net.minecraft.world.level.material.MaterialColor;
import net.minecraft.world.level.storage.loot.LootContext;
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
import ru.bclib.api.TagAPI;
import ru.bclib.blocks.BaseBlock;
import ru.bclib.interfaces.CustomColorProvider;
import ru.bclib.util.ColorUtil;
@ -26,9 +31,6 @@ import ru.bclib.util.MHelper;
import ru.betterend.noise.OpenSimplexNoise;
import ru.betterend.registry.EndBlocks;
import java.util.Collections;
import java.util.List;
public class HelixTreeLeavesBlock extends BaseBlock implements CustomColorProvider {
public static final IntegerProperty COLOR = EndBlockProperties.COLOR;
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
@ -40,6 +42,8 @@ public class HelixTreeLeavesBlock extends BaseBlock implements CustomColorProvid
.sound(SoundType.WART_BLOCK)
.sound(SoundType.GRASS)
.strength(0.2F));
TagAPI.addTags(this, TagAPI.BLOCK_LEAVES);
}
@Override

View file

@ -1,7 +1,11 @@
package ru.betterend.blocks.basis;
import java.util.EnumMap;
import java.util.List;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.core.BlockPos;
@ -19,14 +23,12 @@ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import ru.bclib.api.TagAPI;
import ru.bclib.blocks.BaseAttachedBlock;
import ru.bclib.client.render.BCLRenderLayer;
import ru.bclib.interfaces.RenderLayerProvider;
import ru.bclib.util.MHelper;
import java.util.EnumMap;
import java.util.List;
public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
private final ItemLike drop;
@ -41,6 +43,7 @@ public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
.noCollission());
this.drop = drop;
this.dropChance = dropChance;
TagAPI.addTags(this, TagAPI.BLOCK_LEAVES);
}
public FurBlock(ItemLike drop, int dropChance) {
@ -51,6 +54,7 @@ public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
.noCollission());
this.drop = drop;
this.dropChance = dropChance;
TagAPI.addTags(this, TagAPI.BLOCK_LEAVES);
}
@Override

View file

@ -1,11 +1,13 @@
package ru.betterend.blocks.basis;
import ru.bclib.api.TagAPI;
import ru.bclib.blocks.FeatureSaplingBlock;
import ru.betterend.interfaces.PottablePlant;
public abstract class PottableFeatureSapling extends FeatureSaplingBlock implements PottablePlant {
public PottableFeatureSapling() {
super();
TagAPI.addTags(this, TagAPI.BLOCK_SAPLINGS);
}
public PottableFeatureSapling(int light) {

View file

@ -6,16 +6,13 @@ import ru.bclib.blocks.BaseLeavesBlock;
import ru.betterend.interfaces.PottablePlant;
public class PottableLeavesBlock extends BaseLeavesBlock implements PottablePlant {
private Block sapling;
public PottableLeavesBlock(Block sapling, MaterialColor color) {
super(sapling, color);
this.sapling = sapling;
}
public PottableLeavesBlock(Block sapling, MaterialColor color, int light) {
super(sapling, color, light);
this.sapling = sapling;
}
@Override

View file

@ -1,5 +1,10 @@
package ru.betterend.registry;
import java.util.List;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.BlockItem;
@ -7,7 +12,6 @@ import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.MaterialColor;
import org.jetbrains.annotations.NotNull;
import ru.bclib.blocks.BaseBarrelBlock;
import ru.bclib.blocks.BaseChestBlock;
import ru.bclib.blocks.BaseFurnaceBlock;
@ -146,9 +150,6 @@ import ru.betterend.item.material.EndArmorMaterial;
import ru.betterend.item.material.EndToolMaterial;
import ru.betterend.tab.CreativeTabs;
import java.util.List;
import java.util.stream.Collectors;
public class EndBlocks extends BlockRegistry {
// Terrain //
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());

View file

@ -45,7 +45,7 @@
"fabricloader": ">=0.11.6",
"fabric": ">=0.36.0",
"minecraft": ">=1.17",
"bclib": ">=0.4.1"
"bclib": ">=0.4.2"
},
"suggests": {
"byg": ">=1.1.3",