Added some common tags (#303)
This commit is contained in:
parent
14ddd13ed2
commit
1d81c16451
7 changed files with 23 additions and 15 deletions
|
@ -15,6 +15,6 @@ archives_base_name=better-end
|
||||||
|
|
||||||
patchouli_version = 55-FABRIC-SNAPSHOT
|
patchouli_version = 55-FABRIC-SNAPSHOT
|
||||||
fabric_version = 0.36.1+1.17
|
fabric_version = 0.36.1+1.17
|
||||||
bclib_version = 0.4.1
|
bclib_version = 0.4.2
|
||||||
rei_version = 6.0.264-alpha
|
rei_version = 6.0.264-alpha
|
||||||
canvas_version = 1.0.+
|
canvas_version = 1.0.+
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
package ru.betterend.blocks;
|
package ru.betterend.blocks;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||||
import net.minecraft.client.color.block.BlockColor;
|
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.material.MaterialColor;
|
||||||
import net.minecraft.world.level.storage.loot.LootContext;
|
import net.minecraft.world.level.storage.loot.LootContext;
|
||||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||||
|
import ru.bclib.api.TagAPI;
|
||||||
import ru.bclib.blocks.BaseBlock;
|
import ru.bclib.blocks.BaseBlock;
|
||||||
import ru.bclib.interfaces.CustomColorProvider;
|
import ru.bclib.interfaces.CustomColorProvider;
|
||||||
import ru.bclib.util.ColorUtil;
|
import ru.bclib.util.ColorUtil;
|
||||||
|
@ -26,9 +31,6 @@ import ru.bclib.util.MHelper;
|
||||||
import ru.betterend.noise.OpenSimplexNoise;
|
import ru.betterend.noise.OpenSimplexNoise;
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class HelixTreeLeavesBlock extends BaseBlock implements CustomColorProvider {
|
public class HelixTreeLeavesBlock extends BaseBlock implements CustomColorProvider {
|
||||||
public static final IntegerProperty COLOR = EndBlockProperties.COLOR;
|
public static final IntegerProperty COLOR = EndBlockProperties.COLOR;
|
||||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
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.WART_BLOCK)
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.strength(0.2F));
|
.strength(0.2F));
|
||||||
|
|
||||||
|
TagAPI.addTags(this, TagAPI.BLOCK_LEAVES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package ru.betterend.blocks.basis;
|
package ru.betterend.blocks.basis;
|
||||||
|
|
||||||
|
import java.util.EnumMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||||
import net.minecraft.core.BlockPos;
|
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.CollisionContext;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
import ru.bclib.api.TagAPI;
|
||||||
import ru.bclib.blocks.BaseAttachedBlock;
|
import ru.bclib.blocks.BaseAttachedBlock;
|
||||||
import ru.bclib.client.render.BCLRenderLayer;
|
import ru.bclib.client.render.BCLRenderLayer;
|
||||||
import ru.bclib.interfaces.RenderLayerProvider;
|
import ru.bclib.interfaces.RenderLayerProvider;
|
||||||
import ru.bclib.util.MHelper;
|
import ru.bclib.util.MHelper;
|
||||||
|
|
||||||
import java.util.EnumMap;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
|
public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
|
||||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||||
private final ItemLike drop;
|
private final ItemLike drop;
|
||||||
|
@ -41,6 +43,7 @@ public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
|
||||||
.noCollission());
|
.noCollission());
|
||||||
this.drop = drop;
|
this.drop = drop;
|
||||||
this.dropChance = dropChance;
|
this.dropChance = dropChance;
|
||||||
|
TagAPI.addTags(this, TagAPI.BLOCK_LEAVES);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FurBlock(ItemLike drop, int dropChance) {
|
public FurBlock(ItemLike drop, int dropChance) {
|
||||||
|
@ -51,6 +54,7 @@ public class FurBlock extends BaseAttachedBlock implements RenderLayerProvider {
|
||||||
.noCollission());
|
.noCollission());
|
||||||
this.drop = drop;
|
this.drop = drop;
|
||||||
this.dropChance = dropChance;
|
this.dropChance = dropChance;
|
||||||
|
TagAPI.addTags(this, TagAPI.BLOCK_LEAVES);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package ru.betterend.blocks.basis;
|
package ru.betterend.blocks.basis;
|
||||||
|
|
||||||
|
import ru.bclib.api.TagAPI;
|
||||||
import ru.bclib.blocks.FeatureSaplingBlock;
|
import ru.bclib.blocks.FeatureSaplingBlock;
|
||||||
import ru.betterend.interfaces.PottablePlant;
|
import ru.betterend.interfaces.PottablePlant;
|
||||||
|
|
||||||
public abstract class PottableFeatureSapling extends FeatureSaplingBlock implements PottablePlant {
|
public abstract class PottableFeatureSapling extends FeatureSaplingBlock implements PottablePlant {
|
||||||
public PottableFeatureSapling() {
|
public PottableFeatureSapling() {
|
||||||
super();
|
super();
|
||||||
|
TagAPI.addTags(this, TagAPI.BLOCK_SAPLINGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PottableFeatureSapling(int light) {
|
public PottableFeatureSapling(int light) {
|
||||||
|
|
|
@ -6,16 +6,13 @@ import ru.bclib.blocks.BaseLeavesBlock;
|
||||||
import ru.betterend.interfaces.PottablePlant;
|
import ru.betterend.interfaces.PottablePlant;
|
||||||
|
|
||||||
public class PottableLeavesBlock extends BaseLeavesBlock implements PottablePlant {
|
public class PottableLeavesBlock extends BaseLeavesBlock implements PottablePlant {
|
||||||
private Block sapling;
|
|
||||||
|
|
||||||
public PottableLeavesBlock(Block sapling, MaterialColor color) {
|
public PottableLeavesBlock(Block sapling, MaterialColor color) {
|
||||||
super(sapling, color);
|
super(sapling, color);
|
||||||
this.sapling = sapling;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PottableLeavesBlock(Block sapling, MaterialColor color, int light) {
|
public PottableLeavesBlock(Block sapling, MaterialColor color, int light) {
|
||||||
super(sapling, color, light);
|
super(sapling, color, light);
|
||||||
this.sapling = sapling;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
package ru.betterend.registry;
|
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.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.item.BlockItem;
|
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.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.material.MaterialColor;
|
import net.minecraft.world.level.material.MaterialColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import ru.bclib.blocks.BaseBarrelBlock;
|
import ru.bclib.blocks.BaseBarrelBlock;
|
||||||
import ru.bclib.blocks.BaseChestBlock;
|
import ru.bclib.blocks.BaseChestBlock;
|
||||||
import ru.bclib.blocks.BaseFurnaceBlock;
|
import ru.bclib.blocks.BaseFurnaceBlock;
|
||||||
|
@ -146,9 +150,6 @@ import ru.betterend.item.material.EndArmorMaterial;
|
||||||
import ru.betterend.item.material.EndToolMaterial;
|
import ru.betterend.item.material.EndToolMaterial;
|
||||||
import ru.betterend.tab.CreativeTabs;
|
import ru.betterend.tab.CreativeTabs;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class EndBlocks extends BlockRegistry {
|
public class EndBlocks extends BlockRegistry {
|
||||||
// Terrain //
|
// Terrain //
|
||||||
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
public static final Block ENDSTONE_DUST = registerBlock("endstone_dust", new EndstoneDustBlock());
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"fabricloader": ">=0.11.6",
|
"fabricloader": ">=0.11.6",
|
||||||
"fabric": ">=0.36.0",
|
"fabric": ">=0.36.0",
|
||||||
"minecraft": ">=1.17",
|
"minecraft": ">=1.17",
|
||||||
"bclib": ">=0.4.1"
|
"bclib": ">=0.4.2"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"byg": ">=1.1.3",
|
"byg": ">=1.1.3",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue