More building blocks

This commit is contained in:
DBotThePony 2021-08-29 19:22:59 +07:00
parent a246cf5e25
commit baa789b77a
Signed by: DBot
GPG Key ID: DCC23B5715498507
4 changed files with 91 additions and 16 deletions

View File

@ -151,6 +151,42 @@ const facings = [
}
}
// просто дропы блоков
{
const blocks = [
'matter_cable',
'tritanium_block',
'tritanium_striped_block',
'carbon_fibre_block',
'crate_red',
'crate_blue',
'crate_yellow',
'crate_green',
'crate_black',
'crate_pink',
'crate_purple',
]
for (const name of blocks) {
fs.writeFileSync(root_data + 'loot_tables/blocks/' + name + '.json', JSON.stringify({
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "overdrive_that_matters:" + name
}
]
}
]
}, null, '\t'))
}
}
// дропы с машин
{
const drops = {

View File

@ -109,6 +109,12 @@ public class Registry {
public static final ResourceLocation MATTER_BOTTLER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "matter_bottler");
public static final ResourceLocation DRIVE_VIEWER = new ResourceLocation(OverdriveThatMatters.MOD_ID, "drive_viewer");
// building blocks
public static final ResourceLocation TRITANIUM_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_block");
public static final ResourceLocation TRITANIUM_STRIPED_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "tritanium_striped_block");
public static final ResourceLocation CARBON_FIBRE_BLOCK = new ResourceLocation(OverdriveThatMatters.MOD_ID, "carbon_fibre_block");
// capabilities
public static final ResourceLocation ANDROID_CAPABILITY = new ResourceLocation(OverdriveThatMatters.MOD_ID, "android_capability");
@ -200,6 +206,30 @@ public class Registry {
public static final Block[] CRATES = new Block[Registry.CRATES.length];
public static final Block TRITANIUM_BLOCK = new Block(
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.COLOR_LIGHT_BLUE)
.sound(SoundType.BASALT)
.requiresCorrectToolForDrops()
.explosionResistance(80)
.strength(4)
);
public static final Block TRITANIUM_STRIPED_BLOCK = new Block(
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.COLOR_LIGHT_BLUE)
.sound(SoundType.BASALT)
.requiresCorrectToolForDrops()
.explosionResistance(80)
.strength(4)
);
public static final Block CARBON_FIBRE_BLOCK = new Block(
BlockBehaviour.Properties.of(Material.METAL, MaterialColor.COLOR_LIGHT_BLUE)
.sound(SoundType.BASALT)
.requiresCorrectToolForDrops()
.explosionResistance(40)
.strength(3)
);
static {
for (int i = 0; i < Registry.CRATES.length; i++) {
CRATES[i] = new Block(BlockBehaviour.Properties.of(Material.METAL, Registry.CRATES[i].color)
@ -221,6 +251,10 @@ public class Registry {
MATTER_REPLICATOR.setRegistryName(Names.MATTER_REPLICATOR);
MATTER_BOTTLER.setRegistryName(Names.MATTER_BOTTLER);
DRIVE_VIEWER.setRegistryName(Names.DRIVE_VIEWER);
TRITANIUM_BLOCK.setRegistryName(Names.TRITANIUM_BLOCK);
TRITANIUM_STRIPED_BLOCK.setRegistryName(Names.TRITANIUM_STRIPED_BLOCK);
CARBON_FIBRE_BLOCK.setRegistryName(Names.CARBON_FIBRE_BLOCK);
}
@SubscribeEvent
@ -236,6 +270,9 @@ public class Registry {
event.getRegistry().register(MATTER_REPLICATOR);
event.getRegistry().register(MATTER_BOTTLER);
event.getRegistry().register(DRIVE_VIEWER);
event.getRegistry().register(TRITANIUM_BLOCK);
event.getRegistry().register(TRITANIUM_STRIPED_BLOCK);
event.getRegistry().register(CARBON_FIBRE_BLOCK);
for (var crate : CRATES) {
event.getRegistry().register(crate);
@ -281,6 +318,10 @@ public class Registry {
public static final Item[] CRATES = new Item[Registry.CRATES.length];
public static final Item TRITANIUM_BLOCK = new BlockItem(Blocks.TRITANIUM_BLOCK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item TRITANIUM_STRIPED_BLOCK = new BlockItem(Blocks.TRITANIUM_STRIPED_BLOCK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
public static final Item CARBON_FIBRE_BLOCK = new BlockItem(Blocks.CARBON_FIBRE_BLOCK, new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
static {
for (int i = 0; i < Registry.CRATES.length; i++) {
CRATES[i] = new BlockItem(Blocks.CRATES[i], new Item.Properties().stacksTo(64).tab(OverdriveThatMatters.CREATIVE_TAB));
@ -317,6 +358,10 @@ public class Registry {
PORTABLE_DENSE_CONDENSATION_DRIVE.setRegistryName(Names.PORTABLE_DENSE_CONDENSATION_DRIVE);
NUTRIENT_PASTE.setRegistryName(Names.NUTRIENT_PASTE);
TRITANIUM_BLOCK.setRegistryName(Names.TRITANIUM_BLOCK);
TRITANIUM_STRIPED_BLOCK.setRegistryName(Names.TRITANIUM_STRIPED_BLOCK);
CARBON_FIBRE_BLOCK.setRegistryName(Names.CARBON_FIBRE_BLOCK);
}
@SubscribeEvent
@ -352,6 +397,10 @@ public class Registry {
event.getRegistry().register(NUTRIENT_PASTE);
event.getRegistry().register(TRITANIUM_BLOCK);
event.getRegistry().register(TRITANIUM_STRIPED_BLOCK);
event.getRegistry().register(CARBON_FIBRE_BLOCK);
for (var crate : CRATES) {
event.getRegistry().register(crate);
}

View File

@ -9,6 +9,11 @@
"overdrive_that_matters:pattern_storage",
"overdrive_that_matters:matter_scanner",
"overdrive_that_matters:matter_panel",
"overdrive_that_matters:matter_replicator"
"overdrive_that_matters:matter_replicator",
"overdrive_that_matters:matter_bottler",
"overdrive_that_matters:drive_viewer",
"overdrive_that_matters:tritanium_block",
"overdrive_that_matters:tritanium_striped_block",
"overdrive_that_matters:carbon_fibre_block"
]
}

View File

@ -1,15 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"name": "overdrive_that_matters:matter_cable"
}
]
}
]
}