Added properties for individual metal blocks for hardness. Thanks to ErrorSys.
Added properties for individual machine casings so that they are easier to break with a pickaxe.
This commit is contained in:
parent
43c0fa9e89
commit
19b44c200a
6 changed files with 116 additions and 19 deletions
|
@ -39,7 +39,7 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
||||||
public final int heatCapacity;
|
public final int heatCapacity;
|
||||||
|
|
||||||
public BlockMachineCasing(int heatCapacity) {
|
public BlockMachineCasing(int heatCapacity) {
|
||||||
super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f).sounds(BlockSoundGroup.METAL));
|
super(FabricBlockSettings.of(Material.METAL).strength(2f, 2f).sounds(BlockSoundGroup.METAL).requiresTool());
|
||||||
this.heatCapacity = heatCapacity;
|
this.heatCapacity = heatCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,5 +56,4 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
return new MachineCasingBlockEntity(pos, state);
|
return new MachineCasingBlockEntity(pos, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,15 +31,15 @@ import reborncore.common.BaseBlock;
|
||||||
|
|
||||||
public class BlockStorage extends BaseBlock {
|
public class BlockStorage extends BaseBlock {
|
||||||
|
|
||||||
public BlockStorage(boolean isHot) {
|
|
||||||
super(isHot ? getDefaultSettings().luminance(15).nonOpaque() : getDefaultSettings());
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockStorage() {
|
public BlockStorage() {
|
||||||
this(false);
|
this(false, 3f, 6f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static FabricBlockSettings getDefaultSettings() {
|
public BlockStorage(boolean isHot, float hardness, float resistance) {
|
||||||
return FabricBlockSettings.of(Material.METAL).strength(2f, 2f).sounds(BlockSoundGroup.METAL);
|
super(isHot ? getDefaultSettings(hardness, resistance).luminance(15).nonOpaque() : getDefaultSettings(hardness, resistance));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FabricBlockSettings getDefaultSettings(float hardness, float resistance) {
|
||||||
|
return FabricBlockSettings.of(Material.METAL).strength(hardness, resistance).sounds(BlockSoundGroup.METAL).requiresTool();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -491,10 +491,38 @@ public class TRContent {
|
||||||
public static final Tag.Identified<Item> STORAGE_BLOCK_TAG = TagFactory.ITEM.create(new Identifier(TechReborn.MOD_ID, "storage_blocks"));
|
public static final Tag.Identified<Item> STORAGE_BLOCK_TAG = TagFactory.ITEM.create(new Identifier(TechReborn.MOD_ID, "storage_blocks"));
|
||||||
|
|
||||||
public enum StorageBlocks implements ItemConvertible, TagConvertible<Item> {
|
public enum StorageBlocks implements ItemConvertible, TagConvertible<Item> {
|
||||||
ADVANCED_ALLOY, ALUMINUM, BRASS, BRONZE, CHROME, ELECTRUM, HOT_TUNGSTENSTEEL(true), INVAR, IRIDIUM,
|
ADVANCED_ALLOY(false, 5f, 6f),
|
||||||
IRIDIUM_REINFORCED_STONE, IRIDIUM_REINFORCED_TUNGSTENSTEEL, LEAD, NICKEL, PERIDOT, PLATINUM, RAW_IRIDIUM,
|
ALUMINUM(),
|
||||||
RAW_LEAD, RAW_SILVER, RAW_TIN, RAW_TUNGSTEN, RED_GARNET, REFINED_IRON, RUBY, SAPPHIRE, SILVER, STEEL, TIN,
|
BRASS(),
|
||||||
TITANIUM, TUNGSTEN, TUNGSTENSTEEL, YELLOW_GARNET, ZINC;
|
BRONZE(false, 5f, 6f),
|
||||||
|
CHROME(false, 5f, 6f),
|
||||||
|
ELECTRUM(),
|
||||||
|
HOT_TUNGSTENSTEEL(true, 5f, 6f),
|
||||||
|
INVAR(),
|
||||||
|
IRIDIUM(false, 5f, 6f),
|
||||||
|
IRIDIUM_REINFORCED_STONE(false, 30f, 800f),
|
||||||
|
IRIDIUM_REINFORCED_TUNGSTENSTEEL(false, 50f, 1200f),
|
||||||
|
LEAD(),
|
||||||
|
NICKEL(false, 5f, 6f),
|
||||||
|
PERIDOT(false, 5f, 6f),
|
||||||
|
PLATINUM(false, 5f, 6f),
|
||||||
|
RAW_IRIDIUM(false, 2f, 2f),
|
||||||
|
RAW_LEAD(false, 2f, 2f),
|
||||||
|
RAW_SILVER(false, 2f, 2f),
|
||||||
|
RAW_TIN(false, 2f, 2f),
|
||||||
|
RAW_TUNGSTEN(false, 2f, 2f),
|
||||||
|
RED_GARNET(false, 5f, 6f),
|
||||||
|
REFINED_IRON(false, 5f, 6f),
|
||||||
|
RUBY(false, 5f, 6f),
|
||||||
|
SAPPHIRE(false, 5f, 6f),
|
||||||
|
SILVER(false, 5f, 6f),
|
||||||
|
STEEL(false, 5f, 6f),
|
||||||
|
TIN(),
|
||||||
|
TITANIUM(false, 5f, 6f),
|
||||||
|
TUNGSTEN(false, 5f, 6f),
|
||||||
|
TUNGSTENSTEEL(false, 30f, 800f),
|
||||||
|
YELLOW_GARNET(false, 5f, 6f),
|
||||||
|
ZINC(false, 5f, 6f);
|
||||||
|
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Block block;
|
private final Block block;
|
||||||
|
@ -503,9 +531,9 @@ public class TRContent {
|
||||||
private final WallBlock wallBlock;
|
private final WallBlock wallBlock;
|
||||||
private final Tag.Identified<Item> tag;
|
private final Tag.Identified<Item> tag;
|
||||||
|
|
||||||
StorageBlocks(boolean isHot) {
|
StorageBlocks(boolean isHot, float hardness, float resistance) {
|
||||||
name = this.toString().toLowerCase(Locale.ROOT);
|
name = this.toString().toLowerCase(Locale.ROOT);
|
||||||
block = new BlockStorage(isHot);
|
block = new BlockStorage(isHot, hardness, resistance);
|
||||||
InitUtils.setup(block, name + "_storage_block");
|
InitUtils.setup(block, name + "_storage_block");
|
||||||
tag = TagFactory.ITEM.create(new Identifier("c", name + "_blocks"));
|
tag = TagFactory.ITEM.create(new Identifier("c", name + "_blocks"));
|
||||||
|
|
||||||
|
@ -520,7 +548,7 @@ public class TRContent {
|
||||||
}
|
}
|
||||||
|
|
||||||
StorageBlocks() {
|
StorageBlocks() {
|
||||||
this(false);
|
this(false, 3f, 6f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -27,6 +27,41 @@
|
||||||
"techreborn:tin_ore",
|
"techreborn:tin_ore",
|
||||||
"techreborn:deepslate_tin_ore",
|
"techreborn:deepslate_tin_ore",
|
||||||
"techreborn:tungsten_ore",
|
"techreborn:tungsten_ore",
|
||||||
"techreborn:deepslate_tungsten_ore"
|
"techreborn:deepslate_tungsten_ore",
|
||||||
|
"techreborn:hot_tungstensteel_storage_block",
|
||||||
|
"techreborn:iridium_storage_block",
|
||||||
|
"techreborn:iridium_reinforced_stone_storage_block",
|
||||||
|
"techreborn:iridium_reinforced_tungstensteel_storage_block",
|
||||||
|
"techreborn:raw_iridium_storage_block",
|
||||||
|
"techreborn:raw_tungsten_storage_block",
|
||||||
|
"techreborn:titanium_storage_block",
|
||||||
|
"techreborn:tungsten_storage_block",
|
||||||
|
"techreborn:tungstensteel_storage_block",
|
||||||
|
"techreborn:advanced_alloy_storage_block",
|
||||||
|
"techreborn:aluminum_storage_block",
|
||||||
|
"techreborn:brass_storage_block",
|
||||||
|
"techreborn:bronze_storage_block",
|
||||||
|
"techreborn:chrome_storage_block",
|
||||||
|
"techreborn:electrum_storage_block",
|
||||||
|
"techreborn:invar_storage_block",
|
||||||
|
"techreborn:lead_storage_block",
|
||||||
|
"techreborn:nickel_storage_block",
|
||||||
|
"techreborn:peridot_storage_block",
|
||||||
|
"techreborn:platinum_storage_block",
|
||||||
|
"techreborn:raw_lead_storage_block",
|
||||||
|
"techreborn:raw_silver_storage_block",
|
||||||
|
"techreborn:raw_tin_storage_block",
|
||||||
|
"techreborn:red_garnet_storage_block",
|
||||||
|
"techreborn:refined_iron_storage_block",
|
||||||
|
"techreborn:ruby_storage_block",
|
||||||
|
"techreborn:sapphire_storage_block",
|
||||||
|
"techreborn:silver_storage_block",
|
||||||
|
"techreborn:steel_storage_block",
|
||||||
|
"techreborn:tin_storage_block",
|
||||||
|
"techreborn:yellow_garnet_storage_block",
|
||||||
|
"techreborn:zinc_storage_block",
|
||||||
|
"techreborn:basic_machine_casing",
|
||||||
|
"techreborn:advanced_machine_casing",
|
||||||
|
"techreborn:industrial_machine_casing"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -8,6 +8,15 @@
|
||||||
"techreborn:sodalite_ore",
|
"techreborn:sodalite_ore",
|
||||||
"techreborn:deepslate_sodalite_ore",
|
"techreborn:deepslate_sodalite_ore",
|
||||||
"techreborn:tungsten_ore",
|
"techreborn:tungsten_ore",
|
||||||
"techreborn:deepslate_tungsten_ore"
|
"techreborn:deepslate_tungsten_ore",
|
||||||
|
"techreborn:hot_tungstensteel_storage_block",
|
||||||
|
"techreborn:iridium_storage_block",
|
||||||
|
"techreborn:iridium_reinforced_stone_storage_block",
|
||||||
|
"techreborn:iridium_reinforced_tungstensteel_storage_block",
|
||||||
|
"techreborn:raw_iridium_storage_block",
|
||||||
|
"techreborn:raw_tungsten_storage_block",
|
||||||
|
"techreborn:titanium_storage_block",
|
||||||
|
"techreborn:tungsten_storage_block",
|
||||||
|
"techreborn:tungstensteel_storage_block"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -17,6 +17,32 @@
|
||||||
"techreborn:deepslate_sapphire_ore",
|
"techreborn:deepslate_sapphire_ore",
|
||||||
"techreborn:silver_ore",
|
"techreborn:silver_ore",
|
||||||
"techreborn:deepslate_silver_ore",
|
"techreborn:deepslate_silver_ore",
|
||||||
"techreborn:sphalerite_ore"
|
"techreborn:sphalerite_ore",
|
||||||
|
"techreborn:advanced_alloy_storage_block",
|
||||||
|
"techreborn:aluminum_storage_block",
|
||||||
|
"techreborn:brass_storage_block",
|
||||||
|
"techreborn:bronze_storage_block",
|
||||||
|
"techreborn:chrome_storage_block",
|
||||||
|
"techreborn:electrum_storage_block",
|
||||||
|
"techreborn:invar_storage_block",
|
||||||
|
"techreborn:lead_storage_block",
|
||||||
|
"techreborn:nickel_storage_block",
|
||||||
|
"techreborn:peridot_storage_block",
|
||||||
|
"techreborn:platinum_storage_block",
|
||||||
|
"techreborn:raw_lead_storage_block",
|
||||||
|
"techreborn:raw_silver_storage_block",
|
||||||
|
"techreborn:raw_tin_storage_block",
|
||||||
|
"techreborn:red_garnet_storage_block",
|
||||||
|
"techreborn:refined_iron_storage_block",
|
||||||
|
"techreborn:ruby_storage_block",
|
||||||
|
"techreborn:sapphire_storage_block",
|
||||||
|
"techreborn:silver_storage_block",
|
||||||
|
"techreborn:steel_storage_block",
|
||||||
|
"techreborn:tin_storage_block",
|
||||||
|
"techreborn:yellow_garnet_storage_block",
|
||||||
|
"techreborn:zinc_storage_block",
|
||||||
|
"techreborn:basic_machine_casing",
|
||||||
|
"techreborn:advanced_machine_casing",
|
||||||
|
"techreborn:industrial_machine_casing"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue