Confirmed some fixes related to BN
This commit is contained in:
parent
61f9854cd5
commit
a9c9a7359b
23 changed files with 25 additions and 70 deletions
|
@ -113,23 +113,25 @@ public class PostInitAPI {
|
||||||
else if (block instanceof BaseFurnaceBlock) {
|
else if (block instanceof BaseFurnaceBlock) {
|
||||||
BaseBlockEntities.FURNACE.registerBlock(block);
|
BaseBlockEntities.FURNACE.registerBlock(block);
|
||||||
}
|
}
|
||||||
if (block instanceof AddMineableShears){
|
if (!(block instanceof PreventMineableAdd)) {
|
||||||
TagAPI.addBlockTags(block, NamedMineableTags.SHEARS);
|
if (block instanceof AddMineableShears) {
|
||||||
}
|
TagAPI.addBlockTags(block, NamedMineableTags.SHEARS);
|
||||||
if (block instanceof AddMineableAxe){
|
}
|
||||||
TagAPI.addBlockTags(block, NamedMineableTags.AXE);
|
if (block instanceof AddMineableAxe) {
|
||||||
}
|
TagAPI.addBlockTags(block, NamedMineableTags.AXE);
|
||||||
if (block instanceof AddMineablePickaxe){
|
}
|
||||||
TagAPI.addBlockTags(block, NamedMineableTags.PICKAXE);
|
if (block instanceof AddMineablePickaxe) {
|
||||||
}
|
TagAPI.addBlockTags(block, NamedMineableTags.PICKAXE);
|
||||||
if (block instanceof AddMineableShovel){
|
}
|
||||||
TagAPI.addBlockTags(block, NamedMineableTags.SHOVEL);
|
if (block instanceof AddMineableShovel) {
|
||||||
}
|
TagAPI.addBlockTags(block, NamedMineableTags.SHOVEL);
|
||||||
if (block instanceof AddMineableHoe){
|
}
|
||||||
TagAPI.addBlockTags(block, NamedMineableTags.HOE);
|
if (block instanceof AddMineableHoe) {
|
||||||
}
|
TagAPI.addBlockTags(block, NamedMineableTags.HOE);
|
||||||
if (block instanceof AddMineableSword){
|
}
|
||||||
TagAPI.addBlockTags(block, NamedMineableTags.SWORD);
|
if (block instanceof AddMineableSword) {
|
||||||
|
TagAPI.addBlockTags(block, NamedMineableTags.SWORD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (block instanceof TagProvider) {
|
if (block instanceof TagProvider) {
|
||||||
TagProvider.class.cast(block).addTags(blockTags, itemTags);
|
TagProvider.class.cast(block).addTags(blockTags, itemTags);
|
||||||
|
|
|
@ -39,8 +39,6 @@ public class BaseCropBlock extends BasePlantBlock {
|
||||||
public BaseCropBlock(Item drop, Block... terrain) {
|
public BaseCropBlock(Item drop, Block... terrain) {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings.of(Material.PLANT)
|
FabricBlockSettings.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.randomTicks()
|
.randomTicks()
|
||||||
.noCollission(),
|
.noCollission(),
|
||||||
|
|
|
@ -45,8 +45,6 @@ public abstract class BaseDoublePlantBlock extends BaseBlockNotFull implements R
|
||||||
public BaseDoublePlantBlock() {
|
public BaseDoublePlantBlock() {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings.of(Material.PLANT)
|
FabricBlockSettings.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 make sure this works with the new tag system
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
);
|
);
|
||||||
|
@ -55,8 +53,6 @@ public abstract class BaseDoublePlantBlock extends BaseBlockNotFull implements R
|
||||||
public BaseDoublePlantBlock(int light) {
|
public BaseDoublePlantBlock(int light) {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings.of(Material.PLANT)
|
FabricBlockSettings.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.lightLevel((state) -> state.getValue(TOP) ? light : 0)
|
.lightLevel((state) -> state.getValue(TOP) ? light : 0)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
|
|
@ -47,7 +47,7 @@ import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public abstract class BasePlantBlock extends BaseBlockNotFull implements RenderLayerProvider, BonemealableBlock, AddMineableShears, AddMineableHoe {
|
public abstract class BasePlantBlock extends BaseBlockNotFull implements RenderLayerProvider, BonemealableBlock{
|
||||||
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 14, 12);
|
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 14, 12);
|
||||||
|
|
||||||
public BasePlantBlock() {
|
public BasePlantBlock() {
|
||||||
|
@ -62,8 +62,6 @@ public abstract class BasePlantBlock extends BaseBlockNotFull implements RenderL
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
||||||
//TODO: 1.18.2 make sure this works with the new tag system
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
);
|
);
|
||||||
|
@ -73,8 +71,6 @@ public abstract class BasePlantBlock extends BaseBlockNotFull implements RenderL
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.luminance(light)
|
.luminance(light)
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
|
|
@ -20,8 +20,6 @@ public abstract class BasePlantWithAgeBlock extends BasePlantBlock {
|
||||||
public BasePlantWithAgeBlock() {
|
public BasePlantWithAgeBlock() {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings.of(Material.PLANT)
|
FabricBlockSettings.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.randomTicks()
|
.randomTicks()
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
|
|
@ -28,9 +28,7 @@ public class BaseStripableLogBlock extends BaseRotatedPillarBlock {
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||||
//TODO: 1.18.2 check
|
|
||||||
if (TagAPI.isToolWithMineableTag(player.getMainHandItem(), NamedMineableTags.AXE)){
|
if (TagAPI.isToolWithMineableTag(player.getMainHandItem(), NamedMineableTags.AXE)){
|
||||||
//if (FabricToolTags.AXES.contains(player.getMainHandItem().getItem())) {
|
|
||||||
world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
|
world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
world.setBlock(pos,
|
world.setBlock(pos,
|
||||||
|
|
|
@ -18,8 +18,6 @@ public abstract class BaseUnderwaterWallPlantBlock extends BaseWallPlantBlock im
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.WATER_PLANT)
|
.of(Material.WATER_PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.WET_GRASS)
|
.sound(SoundType.WET_GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
);
|
);
|
||||||
|
@ -29,8 +27,6 @@ public abstract class BaseUnderwaterWallPlantBlock extends BaseWallPlantBlock im
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.WATER_PLANT)
|
.of(Material.WATER_PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.luminance(light)
|
.luminance(light)
|
||||||
.sound(SoundType.WET_GRASS)
|
.sound(SoundType.WET_GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
|
|
@ -53,8 +53,6 @@ public class BaseVineBlock extends BaseBlockNotFull implements RenderLayerProvid
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.PLANT)
|
.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 make sure this works with the new tag system
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.lightLevel((state) -> bottomOnly ? state.getValue(SHAPE) == TripleShape.BOTTOM ? light : 0 : light)
|
.lightLevel((state) -> bottomOnly ? state.getValue(SHAPE) == TripleShape.BOTTOM ? light : 0 : light)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
@ -111,7 +109,6 @@ public class BaseVineBlock extends BaseBlockNotFull implements RenderLayerProvid
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||||
//TODO: Test if shearing still works
|
|
||||||
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
||||||
Enchantments.SILK_TOUCH,
|
Enchantments.SILK_TOUCH,
|
||||||
tool
|
tool
|
||||||
|
|
|
@ -39,8 +39,6 @@ public abstract class BaseWallPlantBlock extends BasePlantBlock {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.PLANT)
|
.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
);
|
);
|
||||||
|
@ -50,8 +48,6 @@ public abstract class BaseWallPlantBlock extends BasePlantBlock {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.PLANT)
|
.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.luminance(light)
|
.luminance(light)
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
|
|
@ -44,8 +44,6 @@ public class FeatureSaplingBlock extends SaplingBlock implements RenderLayerProv
|
||||||
|
|
||||||
public FeatureSaplingBlock(Function<BlockState, Feature<?>> featureSupplier) {
|
public FeatureSaplingBlock(Function<BlockState, Feature<?>> featureSupplier) {
|
||||||
this(FabricBlockSettings.of(Material.PLANT)
|
this(FabricBlockSettings.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.collidable(false)
|
.collidable(false)
|
||||||
.instabreak()
|
.instabreak()
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
|
@ -56,8 +54,6 @@ public class FeatureSaplingBlock extends SaplingBlock implements RenderLayerProv
|
||||||
|
|
||||||
public FeatureSaplingBlock(int light, Function<BlockState, Feature<?>> featureSupplier) {
|
public FeatureSaplingBlock(int light, Function<BlockState, Feature<?>> featureSupplier) {
|
||||||
this(FabricBlockSettings.of(Material.PLANT)
|
this(FabricBlockSettings.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.collidable(false)
|
.collidable(false)
|
||||||
.luminance(light)
|
.luminance(light)
|
||||||
.instabreak()
|
.instabreak()
|
||||||
|
|
|
@ -28,9 +28,7 @@ public class StripableBarkBlock extends BaseBarkBlock {
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||||
//TODO: 1.18.2 check
|
|
||||||
if (TagAPI.isToolWithMineableTag(player.getMainHandItem(), NamedMineableTags.AXE)){
|
if (TagAPI.isToolWithMineableTag(player.getMainHandItem(), NamedMineableTags.AXE)){
|
||||||
//if (FabricToolTags.AXES.contains(player.getMainHandItem().getItem())) {
|
|
||||||
world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
|
world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
world.setBlock(pos,
|
world.setBlock(pos,
|
||||||
|
|
|
@ -42,15 +42,13 @@ import ru.bclib.items.tool.BaseShearsItem;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
public abstract class UnderwaterPlantBlock extends BaseBlockNotFull implements RenderLayerProvider, BonemealableBlock, LiquidBlockContainer, AddMineableShears, AddMineableHoe {
|
public abstract class UnderwaterPlantBlock extends BaseBlockNotFull implements RenderLayerProvider, BonemealableBlock, LiquidBlockContainer {
|
||||||
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 14, 12);
|
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 14, 12);
|
||||||
|
|
||||||
public UnderwaterPlantBlock() {
|
public UnderwaterPlantBlock() {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.WATER_PLANT)
|
.of(Material.WATER_PLANT)
|
||||||
//TODO: 1.18.2 make sure this works with the new tag system
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.WET_GRASS)
|
.sound(SoundType.WET_GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
);
|
);
|
||||||
|
@ -60,8 +58,6 @@ public abstract class UnderwaterPlantBlock extends BaseBlockNotFull implements R
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.WATER_PLANT)
|
.of(Material.WATER_PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.luminance(light)
|
.luminance(light)
|
||||||
.sound(SoundType.WET_GRASS)
|
.sound(SoundType.WET_GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
@ -109,7 +105,6 @@ public abstract class UnderwaterPlantBlock extends BaseBlockNotFull implements R
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||||
//TODO: Test is shearing still works
|
|
||||||
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
||||||
Enchantments.SILK_TOUCH,
|
Enchantments.SILK_TOUCH,
|
||||||
tool
|
tool
|
||||||
|
|
|
@ -20,8 +20,6 @@ public abstract class UnderwaterPlantWithAgeBlock extends UnderwaterPlantBlock {
|
||||||
super(
|
super(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.WATER_PLANT)
|
.of(Material.WATER_PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.WET_GRASS)
|
.sound(SoundType.WET_GRASS)
|
||||||
.randomTicks()
|
.randomTicks()
|
||||||
.noCollission()
|
.noCollission()
|
||||||
|
|
|
@ -41,8 +41,6 @@ public abstract class UpDownPlantBlock extends BaseBlockNotFull implements Rende
|
||||||
public UpDownPlantBlock() {
|
public UpDownPlantBlock() {
|
||||||
this(FabricBlockSettings
|
this(FabricBlockSettings
|
||||||
.of(Material.PLANT)
|
.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 make sure this works with the new tag system
|
|
||||||
//.breakByHand(true)
|
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
.noCollission()
|
.noCollission()
|
||||||
);
|
);
|
||||||
|
@ -86,7 +84,6 @@ public abstract class UpDownPlantBlock extends BaseBlockNotFull implements Rende
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||||
//TODO: 1.18.2 Test if shearing still works
|
|
||||||
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
||||||
Enchantments.SILK_TOUCH,
|
Enchantments.SILK_TOUCH,
|
||||||
tool
|
tool
|
||||||
|
|
|
@ -19,8 +19,6 @@ public abstract class WallMushroomBlock extends BaseWallPlantBlock {
|
||||||
this(
|
this(
|
||||||
FabricBlockSettings
|
FabricBlockSettings
|
||||||
.of(Material.PLANT)
|
.of(Material.PLANT)
|
||||||
//TODO: 1.18.2 Check if this is still ok
|
|
||||||
//..breakByHand(true)
|
|
||||||
.luminance(light)
|
.luminance(light)
|
||||||
.destroyTime(0.2F)
|
.destroyTime(0.2F)
|
||||||
.sound(SoundType.GRASS)
|
.sound(SoundType.GRASS)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
package ru.bclib.interfaces.tools;
|
||||||
|
|
||||||
|
public interface PreventMineableAdd {
|
||||||
|
}
|
|
@ -9,7 +9,6 @@ import net.minecraft.world.item.Tier;
|
||||||
import ru.bclib.client.models.ModelsHelper;
|
import ru.bclib.client.models.ModelsHelper;
|
||||||
import ru.bclib.interfaces.ItemModelProvider;
|
import ru.bclib.interfaces.ItemModelProvider;
|
||||||
|
|
||||||
//TODO: 1.18.2 See if mining speed is still ok.
|
|
||||||
public class BasePickaxeItem extends PickaxeItem implements ItemModelProvider {
|
public class BasePickaxeItem extends PickaxeItem implements ItemModelProvider {
|
||||||
public BasePickaxeItem(Tier material, int attackDamage, float attackSpeed, Properties settings) {
|
public BasePickaxeItem(Tier material, int attackDamage, float attackSpeed, Properties settings) {
|
||||||
super(material, attackDamage, attackSpeed, settings);
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
|
|
|
@ -20,7 +20,6 @@ public class BaseShearsItem extends ShearsItem {
|
||||||
|
|
||||||
public static boolean isShear(ItemStack itemStack, Item item){
|
public static boolean isShear(ItemStack itemStack, Item item){
|
||||||
if (item == Items.SHEARS){
|
if (item == Items.SHEARS){
|
||||||
//TODO: 1.18.2 see if removing SHEARS_MINEABLE causes any problems... It should not, since it is a Block-Tag
|
|
||||||
return itemStack.is(item) | itemStack.is(CommonItemTags.SHEARS);
|
return itemStack.is(item) | itemStack.is(CommonItemTags.SHEARS);
|
||||||
} else {
|
} else {
|
||||||
return itemStack.is(item);
|
return itemStack.is(item);
|
||||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.world.item.Tier;
|
||||||
import ru.bclib.client.models.ModelsHelper;
|
import ru.bclib.client.models.ModelsHelper;
|
||||||
import ru.bclib.interfaces.ItemModelProvider;
|
import ru.bclib.interfaces.ItemModelProvider;
|
||||||
|
|
||||||
//TODO: 1.18.2 See if mining speed is still ok.
|
|
||||||
public class BaseShovelItem extends ShovelItem implements ItemModelProvider {
|
public class BaseShovelItem extends ShovelItem implements ItemModelProvider {
|
||||||
public BaseShovelItem(Tier material, float attackDamage, float attackSpeed, Properties settings) {
|
public BaseShovelItem(Tier material, float attackDamage, float attackSpeed, Properties settings) {
|
||||||
super(material, attackDamage, attackSpeed, settings);
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
|
|
|
@ -23,7 +23,6 @@ public abstract class ItemPredicateBuilderMixin {
|
||||||
@Inject(method = "matches", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "matches", at = @At("HEAD"), cancellable = true)
|
||||||
void bclib_of(ItemStack itemStack, CallbackInfoReturnable<Boolean> cir) {
|
void bclib_of(ItemStack itemStack, CallbackInfoReturnable<Boolean> cir) {
|
||||||
if (this.items != null && this.items.size() == 1 && this.items.contains(Items.SHEARS)) {
|
if (this.items != null && this.items.size() == 1 && this.items.contains(Items.SHEARS)) {
|
||||||
//TODO: 1.18.2 See if removing minable_shears test is having an efffect...
|
|
||||||
if (itemStack.is(CommonItemTags.SHEARS) ){
|
if (itemStack.is(CommonItemTags.SHEARS) ){
|
||||||
cir.setReturnValue(true);
|
cir.setReturnValue(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,6 @@ public class BCLBiome extends BCLBiomeSettings {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.structureTags.isEmpty()) {
|
if (!this.structureTags.isEmpty()) {
|
||||||
//TODO: 1.18.2 This need to be done by BiomeTags now
|
|
||||||
structureTags.forEach(tagKey -> TagAPI.addBiomeTag(tagKey, actualBiome.value()));
|
structureTags.forEach(tagKey -> TagAPI.addBiomeTag(tagKey, actualBiome.value()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ public class BCLFeature {
|
||||||
|
|
||||||
private static <FC extends FeatureConfiguration, F extends Feature<FC>> Holder<PlacedFeature> buildPlacedFeature(ResourceLocation id, F feature, FC configuration, PlacementModifier[] modifiers) {
|
private static <FC extends FeatureConfiguration, F extends Feature<FC>> Holder<PlacedFeature> buildPlacedFeature(ResourceLocation id, F feature, FC configuration, PlacementModifier[] modifiers) {
|
||||||
Holder<ConfiguredFeature<?, ?>> configuredFeature;
|
Holder<ConfiguredFeature<?, ?>> configuredFeature;
|
||||||
//TODO: 1.18.2 Check if this cast is working
|
|
||||||
if (!BuiltinRegistries.CONFIGURED_FEATURE.containsKey(id)) {
|
if (!BuiltinRegistries.CONFIGURED_FEATURE.containsKey(id)) {
|
||||||
configuredFeature = (Holder<ConfiguredFeature<?, ?>>)(Object)FeatureUtils.register(id.toString(), feature, configuration);
|
configuredFeature = (Holder<ConfiguredFeature<?, ?>>)(Object)FeatureUtils.register(id.toString(), feature, configuration);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -63,8 +63,6 @@ public class BCLStructureFeature {
|
||||||
this.structure = StructureFeatureAccessor.callRegister(id.toString(), structure, step);
|
this.structure = StructureFeatureAccessor.callRegister(id.toString(), structure, step);
|
||||||
this.featureConfigured = StructureFeaturesAccessor.callRegister(structureKey, this.structure.configured(NoneFeatureConfiguration.NONE, biomeTag, adaptNoise));
|
this.featureConfigured = StructureFeaturesAccessor.callRegister(structureKey, this.structure.configured(NoneFeatureConfiguration.NONE, biomeTag, adaptNoise));
|
||||||
StructureSets.register(structureSetKey, featureConfigured, spreadConfig);
|
StructureSets.register(structureSetKey, featureConfigured, spreadConfig);
|
||||||
//TODO: 1.18 check if structures are added correctly
|
|
||||||
//FlatChunkGeneratorConfigAccessor.getStructureToFeatures().put(this.structure, this.featureConfigured);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue