From 1d27add23af04ffca16595698b76983d539e2362 Mon Sep 17 00:00:00 2001 From: bruno Date: Tue, 25 Jun 2024 18:03:31 +0200 Subject: [PATCH] Test --- .../brn/server_storage/ServerStorage.java | 21 ++++++--- .../blocks/HardDriveContainerBlock.java | 21 +++------ .../server_storage/blocks/StorageBlock.java | 9 ---- ...nerBlockItem.java => SimpleBlockItem.java} | 10 ++--- .../{HardDriveItem.java => SimpleItem.java} | 12 ++--- .../items/StorageBlockItem.java | 42 ------------------ .../brn/server_storage/items/TieredItem.java | 31 +++++++++++++ .../server_storage/screens/DriveScreen.java | 14 ++++++ src/main/resources/assets/icon.png | Bin 293 -> 414 bytes .../assets/serverstorage/lang/en_us.json | 24 ++++++++-- .../models/block/drive_container.json | 7 +++ .../serverstorage/models/block/storage.json | 12 +++++ .../serverstorage/models/drive_container.json | 6 --- .../models/item/diamond_drive.json | 6 +++ .../models/item/diamond_head.json | 6 +++ .../models/item/diamond_platter.json | 6 +++ .../models/item/drive_casing.json | 6 +++ .../models/item/drive_container.json | 2 +- .../models/item/golden_drive.json | 6 +++ .../item/{drive.json => golden_head.json} | 2 +- .../models/item/golden_platter.json | 6 +++ .../serverstorage/models/item/iron_drive.json | 6 +++ .../serverstorage/models/item/iron_head.json | 6 +++ .../models/item/iron_platter.json | 6 +++ .../models/item/netherite_drive.json | 6 +++ .../models/item/netherite_head.json | 6 +++ .../models/item/netherite_platter.json | 6 +++ .../serverstorage/models/item/storage.json | 2 +- .../assets/serverstorage/models/storage.json | 6 --- .../serverstorage/textures/block/storage.png | Bin 293 -> 0 bytes .../loot_tables/blocks/drive_container.json | 19 ++++++++ .../serverstorage/recipes/diamond_drive.json | 19 ++++++++ .../serverstorage/recipes/diamond_head.json | 18 ++++++++ .../recipes/diamond_platter.json | 18 ++++++++ .../serverstorage/recipes/drive_casing.json | 24 ++++++++++ .../recipes/drive_container.json | 27 +++++++++++ .../serverstorage/recipes/golden_drive.json | 19 ++++++++ .../serverstorage/recipes/golden_head.json | 18 ++++++++ .../serverstorage/recipes/golden_platter.json | 18 ++++++++ .../serverstorage/recipes/iron_drive.json | 19 ++++++++ .../data/serverstorage/recipes/iron_head.json | 18 ++++++++ .../serverstorage/recipes/iron_platter.json | 18 ++++++++ .../recipes/netherite_drive.json | 19 ++++++++ .../serverstorage/recipes/netherite_head.json | 18 ++++++++ .../recipes/netherite_platter.json | 18 ++++++++ 45 files changed, 480 insertions(+), 103 deletions(-) rename src/main/java/systems/brn/server_storage/items/{HardDriveContainerBlockItem.java => SimpleBlockItem.java} (76%) rename src/main/java/systems/brn/server_storage/items/{HardDriveItem.java => SimpleItem.java} (80%) delete mode 100644 src/main/java/systems/brn/server_storage/items/StorageBlockItem.java create mode 100644 src/main/java/systems/brn/server_storage/items/TieredItem.java create mode 100644 src/main/java/systems/brn/server_storage/screens/DriveScreen.java create mode 100644 src/main/resources/assets/serverstorage/models/block/drive_container.json create mode 100644 src/main/resources/assets/serverstorage/models/block/storage.json delete mode 100644 src/main/resources/assets/serverstorage/models/drive_container.json create mode 100644 src/main/resources/assets/serverstorage/models/item/diamond_drive.json create mode 100644 src/main/resources/assets/serverstorage/models/item/diamond_head.json create mode 100644 src/main/resources/assets/serverstorage/models/item/diamond_platter.json create mode 100644 src/main/resources/assets/serverstorage/models/item/drive_casing.json create mode 100644 src/main/resources/assets/serverstorage/models/item/golden_drive.json rename src/main/resources/assets/serverstorage/models/item/{drive.json => golden_head.json} (57%) create mode 100644 src/main/resources/assets/serverstorage/models/item/golden_platter.json create mode 100644 src/main/resources/assets/serverstorage/models/item/iron_drive.json create mode 100644 src/main/resources/assets/serverstorage/models/item/iron_head.json create mode 100644 src/main/resources/assets/serverstorage/models/item/iron_platter.json create mode 100644 src/main/resources/assets/serverstorage/models/item/netherite_drive.json create mode 100644 src/main/resources/assets/serverstorage/models/item/netherite_head.json create mode 100644 src/main/resources/assets/serverstorage/models/item/netherite_platter.json delete mode 100644 src/main/resources/assets/serverstorage/models/storage.json delete mode 100644 src/main/resources/assets/serverstorage/textures/block/storage.png create mode 100644 src/main/resources/data/serverstorage/loot_tables/blocks/drive_container.json create mode 100644 src/main/resources/data/serverstorage/recipes/diamond_drive.json create mode 100644 src/main/resources/data/serverstorage/recipes/diamond_head.json create mode 100644 src/main/resources/data/serverstorage/recipes/diamond_platter.json create mode 100644 src/main/resources/data/serverstorage/recipes/drive_casing.json create mode 100644 src/main/resources/data/serverstorage/recipes/drive_container.json create mode 100644 src/main/resources/data/serverstorage/recipes/golden_drive.json create mode 100644 src/main/resources/data/serverstorage/recipes/golden_head.json create mode 100644 src/main/resources/data/serverstorage/recipes/golden_platter.json create mode 100644 src/main/resources/data/serverstorage/recipes/iron_drive.json create mode 100644 src/main/resources/data/serverstorage/recipes/iron_head.json create mode 100644 src/main/resources/data/serverstorage/recipes/iron_platter.json create mode 100644 src/main/resources/data/serverstorage/recipes/netherite_drive.json create mode 100644 src/main/resources/data/serverstorage/recipes/netherite_head.json create mode 100644 src/main/resources/data/serverstorage/recipes/netherite_platter.json diff --git a/src/main/java/systems/brn/server_storage/ServerStorage.java b/src/main/java/systems/brn/server_storage/ServerStorage.java index 376db13..651bbe4 100644 --- a/src/main/java/systems/brn/server_storage/ServerStorage.java +++ b/src/main/java/systems/brn/server_storage/ServerStorage.java @@ -11,15 +11,19 @@ import systems.brn.server_storage.blockentities.HardDriveContainerBlockEntity; import systems.brn.server_storage.blockentities.StorageBlockEntity; import systems.brn.server_storage.blocks.HardDriveContainerBlock; import systems.brn.server_storage.blocks.StorageBlock; -import systems.brn.server_storage.items.HardDriveContainerBlockItem; -import systems.brn.server_storage.items.HardDriveItem; -import systems.brn.server_storage.items.StorageBlockItem; +import systems.brn.server_storage.items.SimpleBlockItem; +import systems.brn.server_storage.items.SimpleItem; +import systems.brn.server_storage.items.TieredItem; + +import java.util.Arrays; +import java.util.List; public class ServerStorage implements ModInitializer { + public static final List tiers = Arrays.asList("iron", "golden", "diamond", "netherite"); + public static final String MOD_ID = "serverstorage"; public static final String STORAGE_MODEL_ID = "storage"; - public static final String HARD_DRIVE_MODEL_ID = "drive"; public static final String HARD_DRIVE_CONTAINER_BLOCK_MODEL_ID = "drive_container"; public static BlockEntityType HARD_DRIVE_CONTAINER_BLOCK_ENTITY; @@ -40,12 +44,15 @@ public class ServerStorage implements ModInitializer { public void onInitialize() { StorageBlock.register(); - StorageBlockItem.register(); + SimpleBlockItem.register(STORAGE_BLOCK); HardDriveContainerBlock.register(); - HardDriveContainerBlockItem.register(); + SimpleBlockItem.register(HARD_DRIVE_CONTAINER_BLOCK); - HardDriveItem.register(); + TieredItem.register("drive"); + TieredItem.register("head"); + TieredItem.register("platter"); + SimpleItem.register("drive_casing"); PolymerResourcePackUtils.addModAssets(MOD_ID); PolymerResourcePackUtils.markAsRequired(); diff --git a/src/main/java/systems/brn/server_storage/blocks/HardDriveContainerBlock.java b/src/main/java/systems/brn/server_storage/blocks/HardDriveContainerBlock.java index 342b3b1..c7d74a8 100644 --- a/src/main/java/systems/brn/server_storage/blocks/HardDriveContainerBlock.java +++ b/src/main/java/systems/brn/server_storage/blocks/HardDriveContainerBlock.java @@ -31,6 +31,7 @@ import org.jetbrains.annotations.Nullable; import systems.brn.server_storage.ServerStorage; import systems.brn.server_storage.blockentities.HardDriveContainerBlockEntity; import systems.brn.server_storage.blockentities.StorageBlockEntity; +import systems.brn.server_storage.screens.DriveScreen; import systems.brn.server_storage.screens.StorageScreen; import java.util.List; @@ -56,7 +57,7 @@ public class HardDriveContainerBlock extends Block implements PolymerTexturedBlo } public static void register() { - var modId = id(STORAGE_MODEL_ID); + var modId = id(HARD_DRIVE_CONTAINER_BLOCK_MODEL_ID); HARD_DRIVE_CONTAINER_BLOCK = Registry.register(Registries.BLOCK, modId, new HardDriveContainerBlock(Settings.copy(Blocks.WHITE_WOOL), BlockModelType.FULL_BLOCK, ServerStorage.HARD_DRIVE_CONTAINER_BLOCK_MODEL_ID)); UseBlockCallback.EVENT.register(HardDriveContainerBlock::onUse); @@ -77,21 +78,9 @@ public class HardDriveContainerBlock extends Block implements PolymerTexturedBlo if (block instanceof HardDriveContainerBlock) { if (!world.isClient && !player.isSpectator()) { if (!player.isSneaking()) { - StorageScreen storageScreen = new StorageScreen((ServerPlayerEntity) player, pos, null); - storageScreen.open(); + DriveScreen driveScreen = new DriveScreen((ServerPlayerEntity) player, pos); + driveScreen.open(); - } else if (player.getStackInHand(hand).getItem() == Items.WRITTEN_BOOK) { - ItemStack book = player.getStackInHand(hand); - StorageBlockEntity storageBlockEntity = (StorageBlockEntity) world.getBlockEntity(pos); - assert storageBlockEntity != null; - List> generatedContent = generateBookContent(storageBlockEntity.chests.inventory); - book.set(DataComponentTypes.WRITTEN_BOOK_CONTENT, new WrittenBookContentComponent( - RawFilteredPair.of("Item Listing"), - player.getGameProfile().getName(), - 0, - generatedContent, - false - )); } else { return ActionResult.PASS; } @@ -104,6 +93,6 @@ public class HardDriveContainerBlock extends Block implements PolymerTexturedBlo @Nullable @Override public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { - return new StorageBlockEntity(pos, state); + return new HardDriveContainerBlockEntity(pos, state); } } diff --git a/src/main/java/systems/brn/server_storage/blocks/StorageBlock.java b/src/main/java/systems/brn/server_storage/blocks/StorageBlock.java index 533bc07..9866d40 100644 --- a/src/main/java/systems/brn/server_storage/blocks/StorageBlock.java +++ b/src/main/java/systems/brn/server_storage/blocks/StorageBlock.java @@ -4,11 +4,9 @@ import eu.pb4.polymer.blocks.api.BlockModelType; import eu.pb4.polymer.blocks.api.PolymerBlockModel; import eu.pb4.polymer.blocks.api.PolymerBlockResourceUtils; import eu.pb4.polymer.blocks.api.PolymerTexturedBlock; -import eu.pb4.polymer.core.api.block.PolymerBlockUtils; import net.fabricmc.fabric.api.event.player.UseBlockCallback; import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; -import net.minecraft.block.entity.BlockEntityType; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.WrittenBookContentComponent; import net.minecraft.entity.player.PlayerEntity; @@ -51,13 +49,6 @@ public class StorageBlock extends Block implements PolymerTexturedBlock, BlockEn STORAGE_BLOCK = Registry.register(Registries.BLOCK, modId, new StorageBlock(AbstractBlock.Settings.copy(Blocks.WHITE_WOOL), BlockModelType.FULL_BLOCK, ServerStorage.STORAGE_MODEL_ID)); UseBlockCallback.EVENT.register(StorageBlock::onUse); - - STORAGE_BLOCK_ENTITY = Registry.register( - Registries.BLOCK_ENTITY_TYPE, - modId, - BlockEntityType.Builder.create(StorageBlockEntity::new, STORAGE_BLOCK).build(null) - ); - PolymerBlockUtils.registerBlockEntity(STORAGE_BLOCK_ENTITY); } private static ActionResult onUse(PlayerEntity player, World world, Hand hand, BlockHitResult hitResult) { diff --git a/src/main/java/systems/brn/server_storage/items/HardDriveContainerBlockItem.java b/src/main/java/systems/brn/server_storage/items/SimpleBlockItem.java similarity index 76% rename from src/main/java/systems/brn/server_storage/items/HardDriveContainerBlockItem.java rename to src/main/java/systems/brn/server_storage/items/SimpleBlockItem.java index 2199686..c38dc4e 100644 --- a/src/main/java/systems/brn/server_storage/items/HardDriveContainerBlockItem.java +++ b/src/main/java/systems/brn/server_storage/items/SimpleBlockItem.java @@ -15,10 +15,10 @@ import systems.brn.server_storage.ServerStorage; import static systems.brn.server_storage.ServerStorage.*; -public class HardDriveContainerBlockItem extends BlockItem implements PolymerItem { +public class SimpleBlockItem extends BlockItem implements PolymerItem { private final PolymerModelData polymerModel; - public HardDriveContainerBlockItem(Item.Settings settings, Block block, Identifier identifier) { + public SimpleBlockItem(Item.Settings settings, Block block, Identifier identifier) { super(block, settings); this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER, identifier); } @@ -33,9 +33,9 @@ public class HardDriveContainerBlockItem extends BlockItem implements PolymerIte return this.polymerModel.value(); } - public static void register() { - Identifier identifier= id(ServerStorage.HARD_DRIVE_CONTAINER_BLOCK_MODEL_ID); - Item item = Registry.register(Registries.ITEM, identifier, new HardDriveContainerBlockItem(new Item.Settings(), HARD_DRIVE_CONTAINER_BLOCK, identifier)); + public static void register(Block block) { + Identifier identifier = id(block.getRegistryEntry().registryKey().getValue().getPath()); + Item item = Registry.register(Registries.ITEM, identifier, new SimpleBlockItem(new Item.Settings(), block, identifier)); ItemGroupEvents.modifyEntriesEvent(ItemGroups.FUNCTIONAL).register(content -> content.add(item)); } } diff --git a/src/main/java/systems/brn/server_storage/items/HardDriveItem.java b/src/main/java/systems/brn/server_storage/items/SimpleItem.java similarity index 80% rename from src/main/java/systems/brn/server_storage/items/HardDriveItem.java rename to src/main/java/systems/brn/server_storage/items/SimpleItem.java index a50e5dc..2b2f110 100644 --- a/src/main/java/systems/brn/server_storage/items/HardDriveItem.java +++ b/src/main/java/systems/brn/server_storage/items/SimpleItem.java @@ -13,14 +13,14 @@ import net.minecraft.registry.Registry; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.Identifier; import org.jetbrains.annotations.Nullable; -import systems.brn.server_storage.ServerStorage; import static systems.brn.server_storage.ServerStorage.id; +import static systems.brn.server_storage.ServerStorage.tiers; -public class HardDriveItem extends Item implements PolymerItem { +public class SimpleItem extends Item implements PolymerItem { private final PolymerModelData polymerModel; - public HardDriveItem(Settings settings, Identifier identifier) { + public SimpleItem(Settings settings, Identifier identifier) { super(settings); this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER, identifier); } @@ -35,9 +35,9 @@ public class HardDriveItem extends Item implements PolymerItem { return this.polymerModel.value(); } - public static void register() { - Identifier identifier = id(ServerStorage.HARD_DRIVE_MODEL_ID); - Item item = Registry.register(Registries.ITEM, identifier, new HardDriveItem(new Settings(), identifier)); + public static void register(String name) { + Identifier identifier = id(name); + Item item = Registry.register(Registries.ITEM, identifier, new SimpleItem(new Settings(), identifier)); ItemGroupEvents.modifyEntriesEvent(ItemGroups.FUNCTIONAL).register(content -> content.add(item)); } } diff --git a/src/main/java/systems/brn/server_storage/items/StorageBlockItem.java b/src/main/java/systems/brn/server_storage/items/StorageBlockItem.java deleted file mode 100644 index baf795b..0000000 --- a/src/main/java/systems/brn/server_storage/items/StorageBlockItem.java +++ /dev/null @@ -1,42 +0,0 @@ -package systems.brn.server_storage.items; - -import eu.pb4.polymer.core.api.item.PolymerItem; -import eu.pb4.polymer.resourcepack.api.PolymerModelData; -import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils; -import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; -import net.minecraft.block.Block; -import net.minecraft.item.*; -import net.minecraft.registry.Registries; -import net.minecraft.registry.Registry; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; -import org.jetbrains.annotations.Nullable; -import systems.brn.server_storage.ServerStorage; - -import static systems.brn.server_storage.ServerStorage.STORAGE_BLOCK; -import static systems.brn.server_storage.ServerStorage.id; - -public class StorageBlockItem extends BlockItem implements PolymerItem { - private final PolymerModelData polymerModel; - - public StorageBlockItem(Settings settings, Block block, Identifier identifier) { - super(block, settings); - this.polymerModel = PolymerResourcePackUtils.requestModel(Items.BARRIER, identifier); - } - - @Override - public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) { - return this.polymerModel.item(); - } - - @Override - public int getPolymerCustomModelData(ItemStack itemStack, @Nullable ServerPlayerEntity player) { - return this.polymerModel.value(); - } - - public static void register() { - Identifier identifier = id(ServerStorage.STORAGE_MODEL_ID); - Item item = Registry.register(Registries.ITEM, identifier, new StorageBlockItem(new Item.Settings(), STORAGE_BLOCK, identifier)); - ItemGroupEvents.modifyEntriesEvent(ItemGroups.FUNCTIONAL).register(content -> content.add(item)); - } -} \ No newline at end of file diff --git a/src/main/java/systems/brn/server_storage/items/TieredItem.java b/src/main/java/systems/brn/server_storage/items/TieredItem.java new file mode 100644 index 0000000..7597db3 --- /dev/null +++ b/src/main/java/systems/brn/server_storage/items/TieredItem.java @@ -0,0 +1,31 @@ +package systems.brn.server_storage.items; + +import eu.pb4.polymer.core.api.item.PolymerItem; +import eu.pb4.polymer.resourcepack.api.PolymerModelData; +import eu.pb4.polymer.resourcepack.api.PolymerResourcePackUtils; +import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroups; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.Identifier; +import org.jetbrains.annotations.Nullable; + +import static systems.brn.server_storage.ServerStorage.id; +import static systems.brn.server_storage.ServerStorage.tiers; + +public class TieredItem extends SimpleItem implements PolymerItem { + + public TieredItem(Item.Settings settings, Identifier identifier) { + super(settings, identifier); + } + + public static void register(String name) { + for (String tier : tiers) { + SimpleItem.register(tier + "_" + name); + } + } +} diff --git a/src/main/java/systems/brn/server_storage/screens/DriveScreen.java b/src/main/java/systems/brn/server_storage/screens/DriveScreen.java new file mode 100644 index 0000000..6289c0e --- /dev/null +++ b/src/main/java/systems/brn/server_storage/screens/DriveScreen.java @@ -0,0 +1,14 @@ +package systems.brn.server_storage.screens; + +import eu.pb4.sgui.api.gui.SimpleGui; +import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.util.math.BlockPos; + +public class DriveScreen extends SimpleGui { + BlockPos pos; + public DriveScreen(ServerPlayerEntity player, BlockPos pos) { + super(ScreenHandlerType.HOPPER, player, false); + this.pos = pos; + } +} diff --git a/src/main/resources/assets/icon.png b/src/main/resources/assets/icon.png index 61ed070bec1fbc5b46ceda5e94ad036c5bcea8b3..2e356b54b49d5fba7423c5ac821b9d997be30c83 100644 GIT binary patch delta 375 zcmV--0f_#k0-ghqFnA*7R#G@lU%PYh;)baGA+Y#K^%)R+Nqxi90oF2}d-k1>Kxl`w*up^!?zBo;$e zRceNUGZviOxp2!7q!M8F1=`gny}n>QEx|aPAk>4$7lF1W;S9ZEg9*HTtl)v~_M%wm zL95wD&zB;_t!5k3I{QsfuM{w?4jbFiU%6PesaNLTUJi1Em6xFn<8wNklIy#v5$ z&G-OC4Rmo(B5>|gB`D=_;{%p9f}dPckMTh!;BV$LDW&)YP1^y7Z#1c<5zh^B za{5BPNE&HRB!fdTNmyl0qNL<(Dy%XmQDX810Vnwa0V|601$6e}00000NkvXXu0mjf DBcW}B diff --git a/src/main/resources/assets/serverstorage/lang/en_us.json b/src/main/resources/assets/serverstorage/lang/en_us.json index 9739388..b62195f 100644 --- a/src/main/resources/assets/serverstorage/lang/en_us.json +++ b/src/main/resources/assets/serverstorage/lang/en_us.json @@ -1,5 +1,23 @@ { - "block.serverstorage.storage": "Chest storage controller", - "block.serverstorage.drive": "Hard drive", - "block.serverstorage.drive_container": "Hard drive container" + "block.serverstorage.storage": "Networked storage interface", + + "block.serverstorage.drive_container": "Hard drive container", + + "item.serverstorage.drive_casing": "Hard drive casing", + + "item.serverstorage.iron_drive": "Iron hard drive", + "item.serverstorage.iron_head": "Iron hard drive head", + "item.serverstorage.iron_platter": "Iron hard drive platter", + + "item.serverstorage.golden_drive": "Golden hard drive", + "item.serverstorage.golden_head": "Golden hard drive head", + "item.serverstorage.golden_platter": "Golden hard drive platter", + + "item.serverstorage.diamond_drive": "Diamond hard drive", + "item.serverstorage.diamond_head": "Diamond hard drive head", + "item.serverstorage.diamond_platter": "Diamond hard drive platter", + + "item.serverstorage.netherite_drive": "Netherite hard drive", + "item.serverstorage.netherite_head": "Netherite hard drive head", + "item.serverstorage.netherite_platter": "Netherite hard drive platter" } \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/block/drive_container.json b/src/main/resources/assets/serverstorage/models/block/drive_container.json new file mode 100644 index 0000000..4492d8b --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/block/drive_container.json @@ -0,0 +1,7 @@ +{ + "parent": "block/orientable_vertical", + "textures": { + "front": "serverstorage:block/drive_container_front", + "side": "serverstorage:block/drive_container_side" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/block/storage.json b/src/main/resources/assets/serverstorage/models/block/storage.json new file mode 100644 index 0000000..d08b6a4 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/block/storage.json @@ -0,0 +1,12 @@ +{ + "parent": "block/orientable_with_bottom", + "textures": { + "front": "serverstorage:block/controller_front", + "side": "serverstorage:block/controller_left", + "top": "serverstorage:block/controller_top", + "bottom": "serverstorage:block/controller_bottom", + "east": "serverstorage:block/controller_right", + "south": "serverstorage:block/controller_back", + "west": "serverstorage:block/controller_left" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/drive_container.json b/src/main/resources/assets/serverstorage/models/drive_container.json deleted file mode 100644 index 5bf0c3a..0000000 --- a/src/main/resources/assets/serverstorage/models/drive_container.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "serverstorage:block/drive_container" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/diamond_drive.json b/src/main/resources/assets/serverstorage/models/item/diamond_drive.json new file mode 100644 index 0000000..4a1cd31 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/diamond_drive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/drive_diamond" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/diamond_head.json b/src/main/resources/assets/serverstorage/models/item/diamond_head.json new file mode 100644 index 0000000..338a0aa --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/diamond_head.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/head_diamond" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/diamond_platter.json b/src/main/resources/assets/serverstorage/models/item/diamond_platter.json new file mode 100644 index 0000000..0435fe1 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/diamond_platter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/platter_diamond" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/drive_casing.json b/src/main/resources/assets/serverstorage/models/item/drive_casing.json new file mode 100644 index 0000000..b963cd8 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/drive_casing.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/drive_casing" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/drive_container.json b/src/main/resources/assets/serverstorage/models/item/drive_container.json index 9793643..2a479cb 100644 --- a/src/main/resources/assets/serverstorage/models/item/drive_container.json +++ b/src/main/resources/assets/serverstorage/models/item/drive_container.json @@ -1,3 +1,3 @@ { - "parent": "storage:block/drive_container" + "parent": "serverstorage:block/drive_container" } \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/golden_drive.json b/src/main/resources/assets/serverstorage/models/item/golden_drive.json new file mode 100644 index 0000000..ec6e287 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/golden_drive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/drive_gold" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/drive.json b/src/main/resources/assets/serverstorage/models/item/golden_head.json similarity index 57% rename from src/main/resources/assets/serverstorage/models/item/drive.json rename to src/main/resources/assets/serverstorage/models/item/golden_head.json index ddcec5f..3a39d0b 100644 --- a/src/main/resources/assets/serverstorage/models/item/drive.json +++ b/src/main/resources/assets/serverstorage/models/item/golden_head.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "minecraft:item/drive" + "layer0": "serverstorage:item/head_gold" } } \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/golden_platter.json b/src/main/resources/assets/serverstorage/models/item/golden_platter.json new file mode 100644 index 0000000..138d33f --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/golden_platter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/platter_gold" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/iron_drive.json b/src/main/resources/assets/serverstorage/models/item/iron_drive.json new file mode 100644 index 0000000..6fab3ad --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/iron_drive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/drive_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/iron_head.json b/src/main/resources/assets/serverstorage/models/item/iron_head.json new file mode 100644 index 0000000..7e7c7ef --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/iron_head.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/head_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/iron_platter.json b/src/main/resources/assets/serverstorage/models/item/iron_platter.json new file mode 100644 index 0000000..5db5a4c --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/iron_platter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/platter_iron" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/netherite_drive.json b/src/main/resources/assets/serverstorage/models/item/netherite_drive.json new file mode 100644 index 0000000..6a74a34 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/netherite_drive.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/drive_netherite" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/netherite_head.json b/src/main/resources/assets/serverstorage/models/item/netherite_head.json new file mode 100644 index 0000000..a2e1184 --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/netherite_head.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/head_netherite" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/netherite_platter.json b/src/main/resources/assets/serverstorage/models/item/netherite_platter.json new file mode 100644 index 0000000..7621bbc --- /dev/null +++ b/src/main/resources/assets/serverstorage/models/item/netherite_platter.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "serverstorage:item/platter_netherite" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/item/storage.json b/src/main/resources/assets/serverstorage/models/item/storage.json index fcaf26a..ccb54e5 100644 --- a/src/main/resources/assets/serverstorage/models/item/storage.json +++ b/src/main/resources/assets/serverstorage/models/item/storage.json @@ -1,3 +1,3 @@ { - "parent": "storage:block/storage" + "parent": "serverstorage:block/storage" } \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/models/storage.json b/src/main/resources/assets/serverstorage/models/storage.json deleted file mode 100644 index 3c41d84..0000000 --- a/src/main/resources/assets/serverstorage/models/storage.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "block/cube_all", - "textures": { - "all": "serverstorage:block/storage" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/serverstorage/textures/block/storage.png b/src/main/resources/assets/serverstorage/textures/block/storage.png deleted file mode 100644 index 61ed070bec1fbc5b46ceda5e94ad036c5bcea8b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 293 zcmV+=0owkFP)Px#-$_J4R5*>5lCcfLAP_~rBZ?H>#H9-tkvsqcL{u5UtEBM+u9$!U=qa;_3p%GT zhwyQ>lHVY4r~ed zQzb8LgadX1!sH}&-A}E%DjDf68;B%~piCy+_}hr2Ox3!B9eZ(@l|e~TVoQSrfM%Gd zO|1MVk>D=_;{%p9f}dPckMTh!;BV$LDW&)YP1^y7Z#1c<5zh^Ba{5BPNE&HRB!fdT rNmyl0qNL<(Dy%XmQDX810Vnwa0V|601$6e}00000NkvXXu0mjf;c;`* diff --git a/src/main/resources/data/serverstorage/loot_tables/blocks/drive_container.json b/src/main/resources/data/serverstorage/loot_tables/blocks/drive_container.json new file mode 100644 index 0000000..8ea1667 --- /dev/null +++ b/src/main/resources/data/serverstorage/loot_tables/blocks/drive_container.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "serverstorage:drive_container" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/diamond_drive.json b/src/main/resources/data/serverstorage/recipes/diamond_drive.json new file mode 100644 index 0000000..1391ca3 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/diamond_drive.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "serverstorage:diamond_head" + }, + { + "item": "serverstorage:diamond_platter" + }, + { + "item": "serverstorage:drive_casing" + } + ], + "result": { + "id": "serverstorage:diamond_drive", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/diamond_head.json b/src/main/resources/data/serverstorage/recipes/diamond_head.json new file mode 100644 index 0000000..65d83e9 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/diamond_head.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "# ", + "## ", + " ##" + ], + "key": { + "#": { + "item": "minecraft:diamond" + } + }, + "result": { + "id": "serverstorage:diamond_head", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/diamond_platter.json b/src/main/resources/data/serverstorage/recipes/diamond_platter.json new file mode 100644 index 0000000..55db48b --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/diamond_platter.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "###", + "# #", + "###" + ], + "key": { + "#": { + "item": "minecraft:diamond" + } + }, + "result": { + "id": "serverstorage:diamond_platter", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/drive_casing.json b/src/main/resources/data/serverstorage/recipes/drive_casing.json new file mode 100644 index 0000000..0e5ff38 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/drive_casing.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "IRI", + "IPI", + "IRI" + ], + "key": { + "I": { + "item": "minecraft:iron_ingot" + }, + "R": { + "item": "minecraft:redstone" + }, + "P": { + "item": "minecraft:paper" + } + }, + "result": { + "id": "serverstorage:drive_casing", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/drive_container.json b/src/main/resources/data/serverstorage/recipes/drive_container.json new file mode 100644 index 0000000..b11cef5 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/drive_container.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "IDR", + "DCD", + "RDI" + ], + "key": { + "D": { + "item": "minecraft:diamond" + }, + "R": { + "item": "minecraft:redstone" + }, + "C": { + "item": "minecraft:chest" + }, + "I": { + "item": "minecraft:iron_ingot" + } + }, + "result": { + "id": "serverstorage:drive_container", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/golden_drive.json b/src/main/resources/data/serverstorage/recipes/golden_drive.json new file mode 100644 index 0000000..438dde1 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/golden_drive.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "serverstorage:golden_head" + }, + { + "item": "serverstorage:golden_platter" + }, + { + "item": "serverstorage:drive_casing" + } + ], + "result": { + "id": "serverstorage:golden_drive", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/golden_head.json b/src/main/resources/data/serverstorage/recipes/golden_head.json new file mode 100644 index 0000000..951cf2f --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/golden_head.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "# ", + "## ", + " ##" + ], + "key": { + "#": { + "item": "minecraft:gold_ingot" + } + }, + "result": { + "id": "serverstorage:golden_head", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/golden_platter.json b/src/main/resources/data/serverstorage/recipes/golden_platter.json new file mode 100644 index 0000000..f4f18de --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/golden_platter.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "###", + "# #", + "###" + ], + "key": { + "#": { + "item": "minecraft:gold_ingot" + } + }, + "result": { + "id": "serverstorage:golden_platter", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/iron_drive.json b/src/main/resources/data/serverstorage/recipes/iron_drive.json new file mode 100644 index 0000000..a1ebc70 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/iron_drive.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "serverstorage:iron_head" + }, + { + "item": "serverstorage:iron_platter" + }, + { + "item": "serverstorage:drive_casing" + } + ], + "result": { + "id": "serverstorage:iron_drive", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/iron_head.json b/src/main/resources/data/serverstorage/recipes/iron_head.json new file mode 100644 index 0000000..26775b1 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/iron_head.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "# ", + "## ", + " ##" + ], + "key": { + "#": { + "item": "minecraft:iron_ingot" + } + }, + "result": { + "id": "serverstorage:iron_head", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/iron_platter.json b/src/main/resources/data/serverstorage/recipes/iron_platter.json new file mode 100644 index 0000000..e1b5481 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/iron_platter.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "###", + "# #", + "###" + ], + "key": { + "#": { + "item": "minecraft:iron_ingot" + } + }, + "result": { + "id": "serverstorage:iron_platter", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/netherite_drive.json b/src/main/resources/data/serverstorage/recipes/netherite_drive.json new file mode 100644 index 0000000..293719c --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/netherite_drive.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shapeless", + "category": "misc", + "ingredients": [ + { + "item": "serverstorage:netherite_head" + }, + { + "item": "serverstorage:netherite_platter" + }, + { + "item": "serverstorage:drive_casing" + } + ], + "result": { + "id": "serverstorage:netherite_drive", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/netherite_head.json b/src/main/resources/data/serverstorage/recipes/netherite_head.json new file mode 100644 index 0000000..2921319 --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/netherite_head.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "# ", + "## ", + " ##" + ], + "key": { + "#": { + "item": "minecraft:netherite_ingot" + } + }, + "result": { + "id": "serverstorage:netherite_head", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/serverstorage/recipes/netherite_platter.json b/src/main/resources/data/serverstorage/recipes/netherite_platter.json new file mode 100644 index 0000000..e21c7fa --- /dev/null +++ b/src/main/resources/data/serverstorage/recipes/netherite_platter.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "###", + "# #", + "###" + ], + "key": { + "#": { + "item": "minecraft:netherite_ingot" + } + }, + "result": { + "id": "serverstorage:netherite_platter", + "count": 1 + } +} \ No newline at end of file