diff --git a/src/main/java/techreborn/blocks/storage/item/StorageUnitBlock.java b/src/main/java/techreborn/blocks/storage/item/StorageUnitBlock.java index 1d2e6ce59..c65633b6f 100644 --- a/src/main/java/techreborn/blocks/storage/item/StorageUnitBlock.java +++ b/src/main/java/techreborn/blocks/storage/item/StorageUnitBlock.java @@ -50,7 +50,7 @@ public class StorageUnitBlock extends BlockMachineBase { public final TRContent.StorageUnit unitType; public StorageUnitBlock(TRContent.StorageUnit unitType) { - super((Settings.of(unitType.name.equals("crude") ? Material.WOOD : Material.METAL).strength(2.0F, 2.0F))); + super((Settings.of(unitType.name.equals("buffer") || unitType.name.equals("crude") ? Material.WOOD : Material.METAL).strength(2.0F, 2.0F))); this.unitType = unitType; } diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java index d0c279496..40d3156ea 100644 --- a/src/main/java/techreborn/init/TRContent.java +++ b/src/main/java/techreborn/init/TRContent.java @@ -302,6 +302,7 @@ public class TRContent { } public enum StorageUnit implements ItemConvertible { + BUFFER(1), CRUDE(TechRebornConfig.crudeStorageUnitMaxStorage), BASIC(TechRebornConfig.basicStorageUnitMaxStorage), ADVANCED(TechRebornConfig.advancedStorageUnitMaxStorage), @@ -312,7 +313,7 @@ public class TRContent { public final String name; public final Block block; - // How many blocks it can hold + // How many items it can hold public int capacity; @@ -321,7 +322,10 @@ public class TRContent { block = new StorageUnitBlock(this); this.capacity = capacity; - InitUtils.setup(block, name + "_storage_unit"); + if (name.equals("buffer")) + InitUtils.setup(block, "storage_buffer"); + else + InitUtils.setup(block, name + "_storage_unit"); } @Override diff --git a/src/main/resources/assets/techreborn/blockstates/storage_buffer.json b/src/main/resources/assets/techreborn/blockstates/storage_buffer.json new file mode 100644 index 000000000..4625ea979 --- /dev/null +++ b/src/main/resources/assets/techreborn/blockstates/storage_buffer.json @@ -0,0 +1,8 @@ +{ + "variants": { + "facing=north": { "model": "techreborn:block/machines/tier0_machines/storage_buffer" }, + "facing=south": { "model": "techreborn:block/machines/tier0_machines/storage_buffer", "y": 180 }, + "facing=west": { "model": "techreborn:block/machines/tier0_machines/storage_buffer", "y": 270 }, + "facing=east": { "model": "techreborn:block/machines/tier0_machines/storage_buffer", "y": 90 } + } +} diff --git a/src/main/resources/assets/techreborn/lang/en_us.json b/src/main/resources/assets/techreborn/lang/en_us.json index 0379689dc..5c8fad24a 100644 --- a/src/main/resources/assets/techreborn/lang/en_us.json +++ b/src/main/resources/assets/techreborn/lang/en_us.json @@ -7,6 +7,7 @@ "block.techreborn.gas_turbine": "Gas Turbine", "block.techreborn.thermal_generator": "Thermal Generator", + "block.techreborn.storage_buffer": "Storage Buffer", "block.techreborn.crude_storage_unit": "Crude Storage Unit", "block.techreborn.basic_storage_unit": "Basic Storage Unit", "block.techreborn.advanced_storage_unit": "Advanced Storage Unit", diff --git a/src/main/resources/assets/techreborn/models/block/machines/tier0_machines/storage_buffer.json b/src/main/resources/assets/techreborn/models/block/machines/tier0_machines/storage_buffer.json new file mode 100644 index 000000000..d30604875 --- /dev/null +++ b/src/main/resources/assets/techreborn/models/block/machines/tier0_machines/storage_buffer.json @@ -0,0 +1,9 @@ +{ + "parent": "minecraft:block/orientable", + "textures": { + "top": "techreborn:block/machines/tier0_machines/storage_buffer_top", + "front": "techreborn:block/machines/tier0_machines/storage_buffer_front", + "bottom": "techreborn:block/machines/tier0_machines/storage_buffer_bottom", + "side": "techreborn:block/machines/tier0_machines/storage_buffer_side" + } +} diff --git a/src/main/resources/assets/techreborn/models/item/storage_buffer.json b/src/main/resources/assets/techreborn/models/item/storage_buffer.json new file mode 100644 index 000000000..3966c863e --- /dev/null +++ b/src/main/resources/assets/techreborn/models/item/storage_buffer.json @@ -0,0 +1,4 @@ +{ + "parent": "techreborn:block/machines/tier0_machines/storage_buffer" +} + diff --git a/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_bottom.png b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_bottom.png new file mode 100644 index 000000000..dcb218f48 Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_bottom.png differ diff --git a/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_front.png b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_front.png new file mode 100644 index 000000000..3f4bce1ae Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_front.png differ diff --git a/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_side.png b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_side.png new file mode 100644 index 000000000..b44fd761d Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_side.png differ diff --git a/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_top.png b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_top.png new file mode 100644 index 000000000..dcb218f48 Binary files /dev/null and b/src/main/resources/assets/techreborn/textures/block/machines/tier0_machines/storage_buffer_top.png differ diff --git a/src/main/resources/data/techreborn/advancements/recipes/crafting_table/unit/storage/storage_buffer.json b/src/main/resources/data/techreborn/advancements/recipes/crafting_table/unit/storage/storage_buffer.json new file mode 100644 index 000000000..9403a9bfd --- /dev/null +++ b/src/main/resources/data/techreborn/advancements/recipes/crafting_table/unit/storage/storage_buffer.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "techreborn:crafting_table/unit/storage/storage_buffer" + ] + }, + "criteria": { + "has_wood_plate": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "c:wood_plates" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "techreborn:crafting_table/unit/storage/storage_buffer" + } + } + }, + "requirements": [ + [ + "has_wood_plate", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/loot_tables/blocks/storage_buffer.json b/src/main/resources/data/techreborn/loot_tables/blocks/storage_buffer.json new file mode 100644 index 000000000..81a908f85 --- /dev/null +++ b/src/main/resources/data/techreborn/loot_tables/blocks/storage_buffer.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "techreborn:storage_buffer" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/crafting_table/unit/storage/storage_buffer.json b/src/main/resources/data/techreborn/recipes/crafting_table/unit/storage/storage_buffer.json new file mode 100644 index 000000000..2fbb0d8a1 --- /dev/null +++ b/src/main/resources/data/techreborn/recipes/crafting_table/unit/storage/storage_buffer.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "WWW", + "WPW", + "WWW" + ], + "key": { + "P": { + "item": "minecraft:paper" + }, + "W": { + "tag": "c:wood_plates" + } + }, + "result": { + "item": "techreborn:storage_buffer" + } +}