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) {
|
||||
BaseBlockEntities.FURNACE.registerBlock(block);
|
||||
}
|
||||
if (block instanceof AddMineableShears){
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.SHEARS);
|
||||
}
|
||||
if (block instanceof AddMineableAxe){
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.AXE);
|
||||
}
|
||||
if (block instanceof AddMineablePickaxe){
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.PICKAXE);
|
||||
}
|
||||
if (block instanceof AddMineableShovel){
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.SHOVEL);
|
||||
}
|
||||
if (block instanceof AddMineableHoe){
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.HOE);
|
||||
}
|
||||
if (block instanceof AddMineableSword){
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.SWORD);
|
||||
if (!(block instanceof PreventMineableAdd)) {
|
||||
if (block instanceof AddMineableShears) {
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.SHEARS);
|
||||
}
|
||||
if (block instanceof AddMineableAxe) {
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.AXE);
|
||||
}
|
||||
if (block instanceof AddMineablePickaxe) {
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.PICKAXE);
|
||||
}
|
||||
if (block instanceof AddMineableShovel) {
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.SHOVEL);
|
||||
}
|
||||
if (block instanceof AddMineableHoe) {
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.HOE);
|
||||
}
|
||||
if (block instanceof AddMineableSword) {
|
||||
TagAPI.addBlockTags(block, NamedMineableTags.SWORD);
|
||||
}
|
||||
}
|
||||
if (block instanceof TagProvider) {
|
||||
TagProvider.class.cast(block).addTags(blockTags, itemTags);
|
||||
|
|
|
@ -39,8 +39,6 @@ public class BaseCropBlock extends BasePlantBlock {
|
|||
public BaseCropBlock(Item drop, Block... terrain) {
|
||||
this(
|
||||
FabricBlockSettings.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.randomTicks()
|
||||
.noCollission(),
|
||||
|
|
|
@ -45,8 +45,6 @@ public abstract class BaseDoublePlantBlock extends BaseBlockNotFull implements R
|
|||
public BaseDoublePlantBlock() {
|
||||
this(
|
||||
FabricBlockSettings.of(Material.PLANT)
|
||||
//TODO: 1.18.2 make sure this works with the new tag system
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
|
@ -55,8 +53,6 @@ public abstract class BaseDoublePlantBlock extends BaseBlockNotFull implements R
|
|||
public BaseDoublePlantBlock(int light) {
|
||||
this(
|
||||
FabricBlockSettings.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.lightLevel((state) -> state.getValue(TOP) ? light : 0)
|
||||
.noCollission()
|
||||
|
|
|
@ -47,7 +47,7 @@ import java.util.List;
|
|||
import java.util.Optional;
|
||||
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);
|
||||
|
||||
public BasePlantBlock() {
|
||||
|
@ -62,8 +62,6 @@ public abstract class BasePlantBlock extends BaseBlockNotFull implements RenderL
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.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)
|
||||
.noCollission()
|
||||
);
|
||||
|
@ -73,8 +71,6 @@ public abstract class BasePlantBlock extends BaseBlockNotFull implements RenderL
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(replaceable ? Material.REPLACEABLE_PLANT : Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.luminance(light)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
|
|
|
@ -20,8 +20,6 @@ public abstract class BasePlantWithAgeBlock extends BasePlantBlock {
|
|||
public BasePlantWithAgeBlock() {
|
||||
this(
|
||||
FabricBlockSettings.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.randomTicks()
|
||||
.noCollission()
|
||||
|
|
|
@ -28,9 +28,7 @@ public class BaseStripableLogBlock extends BaseRotatedPillarBlock {
|
|||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
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 (FabricToolTags.AXES.contains(player.getMainHandItem().getItem())) {
|
||||
world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
if (!world.isClientSide) {
|
||||
world.setBlock(pos,
|
||||
|
|
|
@ -18,8 +18,6 @@ public abstract class BaseUnderwaterWallPlantBlock extends BaseWallPlantBlock im
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.WATER_PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
|
@ -29,8 +27,6 @@ public abstract class BaseUnderwaterWallPlantBlock extends BaseWallPlantBlock im
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.WATER_PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.luminance(light)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.noCollission()
|
||||
|
|
|
@ -53,8 +53,6 @@ public class BaseVineBlock extends BaseBlockNotFull implements RenderLayerProvid
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
//TODO: 1.18.2 make sure this works with the new tag system
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.lightLevel((state) -> bottomOnly ? state.getValue(SHAPE) == TripleShape.BOTTOM ? light : 0 : light)
|
||||
.noCollission()
|
||||
|
@ -111,7 +109,6 @@ public class BaseVineBlock extends BaseBlockNotFull implements RenderLayerProvid
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
//TODO: Test if shearing still works
|
||||
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
||||
Enchantments.SILK_TOUCH,
|
||||
tool
|
||||
|
|
|
@ -39,8 +39,6 @@ public abstract class BaseWallPlantBlock extends BasePlantBlock {
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
|
@ -50,8 +48,6 @@ public abstract class BaseWallPlantBlock extends BasePlantBlock {
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.luminance(light)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
|
|
|
@ -44,8 +44,6 @@ public class FeatureSaplingBlock extends SaplingBlock implements RenderLayerProv
|
|||
|
||||
public FeatureSaplingBlock(Function<BlockState, Feature<?>> featureSupplier) {
|
||||
this(FabricBlockSettings.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.collidable(false)
|
||||
.instabreak()
|
||||
.sound(SoundType.GRASS)
|
||||
|
@ -56,8 +54,6 @@ public class FeatureSaplingBlock extends SaplingBlock implements RenderLayerProv
|
|||
|
||||
public FeatureSaplingBlock(int light, Function<BlockState, Feature<?>> featureSupplier) {
|
||||
this(FabricBlockSettings.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.collidable(false)
|
||||
.luminance(light)
|
||||
.instabreak()
|
||||
|
|
|
@ -28,9 +28,7 @@ public class StripableBarkBlock extends BaseBarkBlock {
|
|||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
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 (FabricToolTags.AXES.contains(player.getMainHandItem().getItem())) {
|
||||
world.playSound(player, pos, SoundEvents.AXE_STRIP, SoundSource.BLOCKS, 1.0F, 1.0F);
|
||||
if (!world.isClientSide) {
|
||||
world.setBlock(pos,
|
||||
|
|
|
@ -42,15 +42,13 @@ import ru.bclib.items.tool.BaseShearsItem;
|
|||
import java.util.List;
|
||||
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);
|
||||
|
||||
public UnderwaterPlantBlock() {
|
||||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.WATER_PLANT)
|
||||
//TODO: 1.18.2 make sure this works with the new tag system
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
|
@ -60,8 +58,6 @@ public abstract class UnderwaterPlantBlock extends BaseBlockNotFull implements R
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.WATER_PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.luminance(light)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.noCollission()
|
||||
|
@ -109,7 +105,6 @@ public abstract class UnderwaterPlantBlock extends BaseBlockNotFull implements R
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
//TODO: Test is shearing still works
|
||||
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
||||
Enchantments.SILK_TOUCH,
|
||||
tool
|
||||
|
|
|
@ -20,8 +20,6 @@ public abstract class UnderwaterPlantWithAgeBlock extends UnderwaterPlantBlock {
|
|||
super(
|
||||
FabricBlockSettings
|
||||
.of(Material.WATER_PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.randomTicks()
|
||||
.noCollission()
|
||||
|
|
|
@ -41,8 +41,6 @@ public abstract class UpDownPlantBlock extends BaseBlockNotFull implements Rende
|
|||
public UpDownPlantBlock() {
|
||||
this(FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
//TODO: 1.18.2 make sure this works with the new tag system
|
||||
//.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.noCollission()
|
||||
);
|
||||
|
@ -86,7 +84,6 @@ public abstract class UpDownPlantBlock extends BaseBlockNotFull implements Rende
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
//TODO: 1.18.2 Test if shearing still works
|
||||
if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
|
||||
Enchantments.SILK_TOUCH,
|
||||
tool
|
||||
|
|
|
@ -19,8 +19,6 @@ public abstract class WallMushroomBlock extends BaseWallPlantBlock {
|
|||
this(
|
||||
FabricBlockSettings
|
||||
.of(Material.PLANT)
|
||||
//TODO: 1.18.2 Check if this is still ok
|
||||
//..breakByHand(true)
|
||||
.luminance(light)
|
||||
.destroyTime(0.2F)
|
||||
.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.interfaces.ItemModelProvider;
|
||||
|
||||
//TODO: 1.18.2 See if mining speed is still ok.
|
||||
public class BasePickaxeItem extends PickaxeItem implements ItemModelProvider {
|
||||
public BasePickaxeItem(Tier material, int attackDamage, float attackSpeed, Properties settings) {
|
||||
super(material, attackDamage, attackSpeed, settings);
|
||||
|
|
|
@ -20,7 +20,6 @@ public class BaseShearsItem extends ShearsItem {
|
|||
|
||||
public static boolean isShear(ItemStack itemStack, Item item){
|
||||
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);
|
||||
} else {
|
||||
return itemStack.is(item);
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.minecraft.world.item.Tier;
|
|||
import ru.bclib.client.models.ModelsHelper;
|
||||
import ru.bclib.interfaces.ItemModelProvider;
|
||||
|
||||
//TODO: 1.18.2 See if mining speed is still ok.
|
||||
public class BaseShovelItem extends ShovelItem implements ItemModelProvider {
|
||||
public BaseShovelItem(Tier material, float attackDamage, float attackSpeed, Properties settings) {
|
||||
super(material, attackDamage, attackSpeed, settings);
|
||||
|
|
|
@ -23,7 +23,6 @@ public abstract class ItemPredicateBuilderMixin {
|
|||
@Inject(method = "matches", at = @At("HEAD"), cancellable = true)
|
||||
void bclib_of(ItemStack itemStack, CallbackInfoReturnable<Boolean> cir) {
|
||||
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) ){
|
||||
cir.setReturnValue(true);
|
||||
}
|
||||
|
|
|
@ -210,7 +210,6 @@ public class BCLBiome extends BCLBiomeSettings {
|
|||
}
|
||||
|
||||
if (!this.structureTags.isEmpty()) {
|
||||
//TODO: 1.18.2 This need to be done by BiomeTags now
|
||||
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) {
|
||||
Holder<ConfiguredFeature<?, ?>> configuredFeature;
|
||||
//TODO: 1.18.2 Check if this cast is working
|
||||
if (!BuiltinRegistries.CONFIGURED_FEATURE.containsKey(id)) {
|
||||
configuredFeature = (Holder<ConfiguredFeature<?, ?>>)(Object)FeatureUtils.register(id.toString(), feature, configuration);
|
||||
} else {
|
||||
|
|
|
@ -63,8 +63,6 @@ public class BCLStructureFeature {
|
|||
this.structure = StructureFeatureAccessor.callRegister(id.toString(), structure, step);
|
||||
this.featureConfigured = StructureFeaturesAccessor.callRegister(structureKey, this.structure.configured(NoneFeatureConfiguration.NONE, biomeTag, adaptNoise));
|
||||
StructureSets.register(structureSetKey, featureConfigured, spreadConfig);
|
||||
//TODO: 1.18 check if structures are added correctly
|
||||
//FlatChunkGeneratorConfigAccessor.getStructureToFeatures().put(this.structure, this.featureConfigured);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue