Revert "Automatic tool configuration for Blocks"

This reverts commit 8c1f9567a5.
This commit is contained in:
Frank Bauer 2021-07-04 23:48:37 +02:00
parent 8c1f9567a5
commit 18d78acd07
35 changed files with 76 additions and 89 deletions

View file

@ -31,7 +31,7 @@ public class ColoredMaterial {
String id = Registry.BLOCK.getKey(source).getPath();
colors.forEach((color, name) -> {
String blockName = id + "_" + name;
Block block = constructor.apply(BlocksHelper.copySettingsOf(source).materialColor(MaterialColor.COLOR_BLACK));
Block block = constructor.apply(FabricBlockSettings.copyOf(source).materialColor(MaterialColor.COLOR_BLACK));
EndBlocks.registerBlock(blockName, block);
if (craftEight) {
GridRecipe.make(BetterEnd.MOD_ID, blockName, block).checkConfig(Configs.RECIPE_CONFIG).setOutputCount(8).setShape("###", "#D#", "###").addMaterial('#', source).addMaterial('D', dyes.get(color)).build();

View file

@ -10,7 +10,6 @@ import ru.bclib.blocks.BaseSlabBlock;
import ru.bclib.blocks.BaseStairsBlock;
import ru.bclib.blocks.BaseWallBlock;
import ru.bclib.recipes.GridRecipe;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.TagHelper;
import ru.betterend.BetterEnd;
import ru.betterend.blocks.EndPedestal;
@ -32,7 +31,7 @@ public class CrystalSubblocksMaterial {
public final Block brick_wall;
public CrystalSubblocksMaterial(String name, Block source) {
FabricBlockSettings material = BlocksHelper.copySettingsOf(source);
FabricBlockSettings material = FabricBlockSettings.copyOf(source);
polished = EndBlocks.registerBlock(name + "_polished", new BaseBlock(material));
tiles = EndBlocks.registerBlock(name + "_tiles", new BaseBlock(material));
pillar = EndBlocks.registerBlock(name + "_pillar", new BaseRotatedPillarBlock(material));

View file

@ -31,7 +31,6 @@ import ru.bclib.items.tool.BaseSwordItem;
import ru.bclib.recipes.FurnaceRecipe;
import ru.bclib.recipes.GridRecipe;
import ru.bclib.recipes.SmithingTableRecipe;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.TagHelper;
import ru.betterend.BetterEnd;
import ru.betterend.blocks.BulbVineLanternBlock;
@ -91,26 +90,26 @@ public class MetalMaterial {
public final Item boots;
public static MetalMaterial makeNormal(String name, MaterialColor color, Tier material, ArmorMaterial armor) {
return new MetalMaterial(name, true, BlocksHelper.copySettingsOf(Blocks.IRON_BLOCK).materialColor(color), EndItems.makeEndItemSettings(), material, armor);
return new MetalMaterial(name, true, FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).materialColor(color), EndItems.makeEndItemSettings(), material, armor);
}
public static MetalMaterial makeNormal(String name, MaterialColor color, float hardness, float resistance, Tier material, ArmorMaterial armor) {
return new MetalMaterial(name, true, BlocksHelper.copySettingsOf(Blocks.IRON_BLOCK).materialColor(color).hardness(hardness).resistance(resistance), EndItems.makeEndItemSettings(), material, armor);
return new MetalMaterial(name, true, FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).materialColor(color).hardness(hardness).resistance(resistance), EndItems.makeEndItemSettings(), material, armor);
}
public static MetalMaterial makeOreless(String name, MaterialColor color, Tier material, ArmorMaterial armor) {
return new MetalMaterial(name, false, BlocksHelper.copySettingsOf(Blocks.IRON_BLOCK).materialColor(color), EndItems.makeEndItemSettings(), material, armor);
return new MetalMaterial(name, false, FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).materialColor(color), EndItems.makeEndItemSettings(), material, armor);
}
public static MetalMaterial makeOreless(String name, MaterialColor color, float hardness, float resistance, Tier material, ArmorMaterial armor) {
return new MetalMaterial(name, false, BlocksHelper.copySettingsOf(Blocks.IRON_BLOCK).materialColor(color).hardness(hardness).resistance(resistance), EndItems.makeEndItemSettings(), material, armor);
return new MetalMaterial(name, false, FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).materialColor(color).hardness(hardness).resistance(resistance), EndItems.makeEndItemSettings(), material, armor);
}
private MetalMaterial(String name, boolean hasOre, FabricBlockSettings settings, Properties itemSettings, Tier material, ArmorMaterial armor) {
BlockBehaviour.Properties lanternProperties = FabricBlockSettings.copyOf(settings).hardness(1).resistance(1).luminance(15).sound(SoundType.LANTERN);
final int level = material.getLevel();
ore = hasOre ? EndBlocks.registerBlock(name + "_ore", new BaseBlock(BlocksHelper.copySettingsOf(Blocks.END_STONE))) : null;
ore = hasOre ? EndBlocks.registerBlock(name + "_ore", new BaseBlock(FabricBlockSettings.copyOf(Blocks.END_STONE))) : null;
block = EndBlocks.registerBlock(name + "_block", new BaseBlock(settings));
tile = EndBlocks.registerBlock(name + "_tile", new BaseBlock(settings));
stairs = EndBlocks.registerBlock(name + "_stairs", new BaseStairsBlock(tile));

View file

@ -16,7 +16,6 @@ import ru.bclib.blocks.BaseStoneButtonBlock;
import ru.bclib.blocks.BaseWallBlock;
import ru.bclib.blocks.StonePressurePlateBlock;
import ru.bclib.recipes.GridRecipe;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.TagHelper;
import ru.betterend.BetterEnd;
import ru.betterend.blocks.EndPedestal;
@ -47,7 +46,7 @@ public class StoneMaterial {
public final Block furnace;
public StoneMaterial(String name, MaterialColor color) {
FabricBlockSettings material = BlocksHelper.copySettingsOf(Blocks.END_STONE).materialColor(color);
FabricBlockSettings material = FabricBlockSettings.copyOf(Blocks.END_STONE).materialColor(color);
stone = EndBlocks.registerBlock(name, new BaseBlock(material));
polished = EndBlocks.registerBlock(name + "_polished", new BaseBlock(material));

View file

@ -33,7 +33,6 @@ import ru.bclib.blocks.BaseWoodenButtonBlock;
import ru.bclib.blocks.StripableBarkBlock;
import ru.bclib.blocks.WoodenPressurePlateBlock;
import ru.bclib.recipes.GridRecipe;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.TagHelper;
import ru.betterend.BetterEnd;
import ru.betterend.config.Configs;
@ -70,7 +69,7 @@ public class WoodenMaterial {
public final Tag.Named<Item> logItemTag;
public WoodenMaterial(String name, MaterialColor woodColor, MaterialColor planksColor) {
FabricBlockSettings materialPlanks = BlocksHelper.copySettingsOf(Blocks.OAK_PLANKS).materialColor(planksColor);
FabricBlockSettings materialPlanks = FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).materialColor(planksColor);
log_stripped = EndBlocks.registerBlock(name + "_stripped_log", new BaseRotatedPillarBlock(materialPlanks));
bark_stripped = EndBlocks.registerBlock(name + "_stripped_bark", new BaseBarkBlock(materialPlanks));