diff --git a/src/main/java/dev/hephaestus/glowcase/Glowcase.java b/src/main/java/dev/hephaestus/glowcase/Glowcase.java index 7bfa21d..84476b4 100644 --- a/src/main/java/dev/hephaestus/glowcase/Glowcase.java +++ b/src/main/java/dev/hephaestus/glowcase/Glowcase.java @@ -2,27 +2,19 @@ import com.google.common.base.Supplier; import com.google.common.base.Suppliers; -import com.mojang.brigadier.arguments.StringArgumentType; -import com.mojang.brigadier.builder.LiteralArgumentBuilder; -import com.mojang.brigadier.context.CommandContext; import dev.hephaestus.glowcase.block.HyperlinkBlock; import dev.hephaestus.glowcase.block.ItemDisplayBlock; -import dev.hephaestus.glowcase.block.MailboxBlock; import dev.hephaestus.glowcase.block.TextBlock; import dev.hephaestus.glowcase.block.entity.HyperlinkBlockEntity; import dev.hephaestus.glowcase.block.entity.ItemDisplayBlockEntity; -import dev.hephaestus.glowcase.block.entity.MailboxBlockEntity; import dev.hephaestus.glowcase.block.entity.TextBlockEntity; import dev.hephaestus.glowcase.compat.PolydexCompatibility; import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.Block; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.command.argument.BlockPosArgumentType; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; @@ -32,11 +24,8 @@ import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.tag.TagKey; -import net.minecraft.server.command.CommandManager; -import net.minecraft.server.command.ServerCommandSource; import net.minecraft.text.Text; import net.minecraft.util.Identifier; -import net.minecraft.util.math.BlockPos; public class Glowcase implements ModInitializer { public static final String MODID = "glowcase"; @@ -53,10 +42,6 @@ public class Glowcase implements ModInitializer { public static final Supplier ITEM_DISPLAY_BLOCK_ITEM = registerItem("item_display_block", () -> new BlockItem(ITEM_DISPLAY_BLOCK.get(), new Item.Settings())); public static final Supplier> ITEM_DISPLAY_BLOCK_ENTITY = registerBlockEntity("item_display_block", () -> BlockEntityType.Builder.create(ItemDisplayBlockEntity::new, ITEM_DISPLAY_BLOCK.get()).build(null)); - public static final Supplier MAILBOX_BLOCK = registerBlock("mailbox", MailboxBlock::new); - public static final Supplier MAILBOX_ITEM = registerItem("mailbox", () -> new BlockItem(MAILBOX_BLOCK.get(), new Item.Settings())); - public static final Supplier> MAILBOX_BLOCK_ENTITY = registerBlockEntity("mailbox", () -> BlockEntityType.Builder.create(MailboxBlockEntity::new, MAILBOX_BLOCK.get()).build(null)); - public static final Supplier TEXT_BLOCK = registerBlock("text_block", TextBlock::new); public static final Supplier TEXT_BLOCK_ITEM = registerItem("text_block", () -> new BlockItem(TEXT_BLOCK.get(), new Item.Settings())); public static final Supplier> TEXT_BLOCK_ENTITY = registerBlockEntity("text_block", () -> BlockEntityType.Builder.create(TextBlockEntity::new, TEXT_BLOCK.get()).build(null)); @@ -67,7 +52,6 @@ public class Glowcase implements ModInitializer { .entries((displayContext, entries) -> { entries.add(HYPERLINK_BLOCK_ITEM.get()); entries.add(ITEM_DISPLAY_BLOCK_ITEM.get()); - entries.add(MAILBOX_ITEM.get()); entries.add(TEXT_BLOCK_ITEM.get()); }) .build() @@ -97,36 +81,8 @@ public static Supplier> registerBlock public void onInitialize() { GlowcaseNetworking.init(); - CommandRegistrationCallback.EVENT.register((dispatcher, access, environment) -> { - dispatcher.register( - LiteralArgumentBuilder.literal("mail") - .then(CommandManager.argument("pos", new BlockPosArgumentType()) - .then(CommandManager.argument("message", StringArgumentType.greedyString()).executes(this::sendMessage))) - ); - }); - if (FabricLoader.getInstance().isModLoaded("polydex2")) { PolydexCompatibility.onInitialize(); } } - - private int sendMessage(CommandContext ctx) { - BlockPos pos = BlockPosArgumentType.getBlockPos(ctx, "pos"); - String message = ctx.getArgument("message", String.class); - PlayerEntity sender = ctx.getSource().getPlayer(); - - if (sender != null) { - if (sender.getWorld().getBlockEntity(pos) instanceof MailboxBlockEntity mailbox) { - mailbox.addMessage(new MailboxBlockEntity.Message(sender.getUuid(), sender.getNameForScoreboard(), message)); - ctx.getSource().sendFeedback(() -> Text.translatable("command.glowcase.message_sent"), false); - return 0; - } else { - ctx.getSource().sendError(Text.translatable("command.glowcase.failed.no_mailbox")); - return 100; - } - } else { - ctx.getSource().sendError(Text.translatable("command.glowcase.failed.no_world")); - return 100; - } - } } diff --git a/src/main/java/dev/hephaestus/glowcase/GlowcaseCommonProxy.java b/src/main/java/dev/hephaestus/glowcase/GlowcaseCommonProxy.java index 5209db4..65ee6c0 100644 --- a/src/main/java/dev/hephaestus/glowcase/GlowcaseCommonProxy.java +++ b/src/main/java/dev/hephaestus/glowcase/GlowcaseCommonProxy.java @@ -15,11 +15,7 @@ public void openItemDisplayBlockEditScreen(BlockPos pos) { //No-op } - public void prefillMailboxChat(BlockPos pos) { - //No-op - } - public void openTextBlockEditScreen(BlockPos pos) { //No-op } -} \ No newline at end of file +} diff --git a/src/main/java/dev/hephaestus/glowcase/block/MailboxBlock.java b/src/main/java/dev/hephaestus/glowcase/block/MailboxBlock.java deleted file mode 100644 index 1309c03..0000000 --- a/src/main/java/dev/hephaestus/glowcase/block/MailboxBlock.java +++ /dev/null @@ -1,93 +0,0 @@ -package dev.hephaestus.glowcase.block; - -import dev.hephaestus.glowcase.Glowcase; -import dev.hephaestus.glowcase.block.entity.MailboxBlockEntity; -import net.minecraft.block.Block; -import net.minecraft.block.BlockEntityProvider; -import net.minecraft.block.BlockState; -import net.minecraft.block.ShapeContext; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemPlacementContext; -import net.minecraft.item.ItemStack; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.state.StateManager; -import net.minecraft.state.property.BooleanProperty; -import net.minecraft.state.property.Properties; -import net.minecraft.util.ActionResult; -import net.minecraft.util.hit.BlockHitResult; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.shape.VoxelShape; -import net.minecraft.util.shape.VoxelShapes; -import net.minecraft.world.BlockView; -import net.minecraft.world.World; -import org.jetbrains.annotations.Nullable; - -import java.util.Objects; - -public class MailboxBlock extends Block implements BlockEntityProvider { - public static final BooleanProperty HAS_MAIL = BooleanProperty.of("has_mail"); - - private static final VoxelShape SHAPE_NS = VoxelShapes.cuboid(0.3125, 0, 0.0625, 0.6875, 0.5, 0.9375); - private static final VoxelShape SHAPE_EW = VoxelShapes.cuboid(0.0625, 0, 0.3125, 0.9375, 0.5, 0.6875); - - public MailboxBlock() { - super(Settings.create().nonOpaque().strength(-1, Integer.MAX_VALUE)); - } - - @Override - protected void appendProperties(StateManager.Builder builder) { - super.appendProperties(builder); - builder.add(Properties.HORIZONTAL_FACING, HAS_MAIL); - } - - @Override - public BlockState getPlacementState(ItemPlacementContext ctx) { - return this.getDefaultState().with(Properties.HORIZONTAL_FACING, ctx.getHorizontalPlayerFacing().getOpposite()).with(HAS_MAIL, false); - } - - @Override - public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { - return switch (state.get(Properties.HORIZONTAL_FACING)) { - case NORTH, SOUTH -> SHAPE_NS; - case EAST, WEST -> SHAPE_EW; - default -> VoxelShapes.fullCube(); - }; - } - - @Override - public VoxelShape getCollisionShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { - return this.getOutlineShape(state, world, pos, context); - } - - @Nullable - @Override - public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { - return new MailboxBlockEntity(pos, state); - } - - @Override - public void onPlaced(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) { - if (world.getBlockEntity(pos) instanceof MailboxBlockEntity mailbox && placer instanceof ServerPlayerEntity player) { - mailbox.setOwner(player); - } - } - - @Override - protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) { - if (!(world.getBlockEntity(pos) instanceof MailboxBlockEntity be)) return ActionResult.CONSUME; - boolean mine = Objects.equals(player.getUuid(), be.owner()); - - if (world.isClient && !mine) { - Glowcase.proxy.prefillMailboxChat(pos); - } - - if (!world.isClient && mine) { - if (player.isSneaking()) be.removeAllMessagesFromMostRecentSender(); - else be.removeMessage(); - } - - return ActionResult.SUCCESS; - } -} diff --git a/src/main/java/dev/hephaestus/glowcase/block/entity/MailboxBlockEntity.java b/src/main/java/dev/hephaestus/glowcase/block/entity/MailboxBlockEntity.java deleted file mode 100644 index 6a7437a..0000000 --- a/src/main/java/dev/hephaestus/glowcase/block/entity/MailboxBlockEntity.java +++ /dev/null @@ -1,139 +0,0 @@ -package dev.hephaestus.glowcase.block.entity; - -import dev.hephaestus.glowcase.Glowcase; -import dev.hephaestus.glowcase.block.MailboxBlock; -import net.minecraft.block.BlockState; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.nbt.NbtCompound; -import net.minecraft.nbt.NbtElement; -import net.minecraft.nbt.NbtList; -import net.minecraft.network.listener.ClientPlayPacketListener; -import net.minecraft.network.packet.Packet; -import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket; -import net.minecraft.registry.RegistryWrapper; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.util.math.BlockPos; -import org.jetbrains.annotations.Nullable; - -import java.util.ArrayDeque; -import java.util.Deque; -import java.util.UUID; - -public class MailboxBlockEntity extends BlockEntity { - private final Deque messages = new ArrayDeque<>(); - private UUID owner; - - public MailboxBlockEntity(BlockPos pos, BlockState state) { - super(Glowcase.MAILBOX_BLOCK_ENTITY.get(), pos, state); - } - - public void setOwner(ServerPlayerEntity player) { - this.owner = player.getUuid(); - this.markDirty(); - this.dispatch(); - } - - public void addMessage(Message message) { - this.messages.addFirst(message); - - if (this.world != null) { - this.world.setBlockState(this.pos, this.getCachedState().with(MailboxBlock.HAS_MAIL, true)); - } - - this.markDirty(); - this.dispatch(); - } - - public void removeMessage() { - if (this.world != null && this.messages.isEmpty()) { - //whuh? This prooobably shouldn't happen, but if it does just reset the state to empty - this.world.setBlockState(this.pos, this.getCachedState().with(MailboxBlock.HAS_MAIL, false)); - } else if (this.messages.removeFirst() != null && this.world != null && this.messages.isEmpty()) { - this.world.setBlockState(this.pos, this.getCachedState().with(MailboxBlock.HAS_MAIL, false)); - this.markDirty(); - this.dispatch(); - } - } - - public int messageCount() { - return this.messages.size(); - } - - public Message getMessage() { - return this.messages.getFirst(); - } - - @Override - protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) { - super.writeNbt(nbt, registryLookup); - - nbt.putUuid("Owner", this.owner); - - NbtList list = nbt.getList("Messages", NbtElement.COMPOUND_TYPE); - - for (Message message : this.messages) { - NbtCompound messageTag = new NbtCompound(); - - messageTag.putUuid("Sender", message.sender); - messageTag.putString("SenderName", message.senderName); - messageTag.putString("Message", message.message); - - list.add(messageTag); - } - - nbt.put("Messages", list); - } - - @Override - protected void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup) { - super.readNbt(nbt, registryLookup); - - this.owner = nbt.getUuid("Owner"); - this.messages.clear(); - - for (NbtElement element : nbt.getList("Messages", NbtElement.COMPOUND_TYPE)) { - if (element instanceof NbtCompound message) { - this.messages.addLast(new Message( - message.getUuid("Sender"), - message.getString("SenderName"), - message.getString("Message") - )); - } - } - } - - public UUID owner() { - return this.owner; - } - - public void removeAllMessagesFromMostRecentSender() { - if (!this.messages.isEmpty()) { - UUID sender = this.messages.pop().sender; - - this.messages.removeIf(message -> message.sender.equals(sender)); - this.markDirty(); - this.dispatch(); - } - } - - public record Message(UUID sender, String senderName, String message) { - } - - // standard blockentity boilerplate - - public void dispatch() { - if (world instanceof ServerWorld sworld) sworld.getChunkManager().markForUpdate(pos); - } - - @Override - public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registryLookup) { - return createNbt(registryLookup); - } - - @Nullable - @Override - public Packet toUpdatePacket() { - return BlockEntityUpdateS2CPacket.create(this); - } -} diff --git a/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClient.java b/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClient.java index b4806e1..02b4a8e 100644 --- a/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClient.java +++ b/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClient.java @@ -1,25 +1,14 @@ package dev.hephaestus.glowcase.client; import dev.hephaestus.glowcase.Glowcase; -import dev.hephaestus.glowcase.block.entity.MailboxBlockEntity; import dev.hephaestus.glowcase.client.render.block.entity.BakedBlockEntityRenderer; import dev.hephaestus.glowcase.client.render.block.entity.HyperlinkBlockEntityRenderer; import dev.hephaestus.glowcase.client.render.block.entity.ItemDisplayBlockEntityRenderer; import dev.hephaestus.glowcase.client.render.block.entity.TextBlockEntityRenderer; import net.fabricmc.api.ClientModInitializer; -import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; import net.fabricmc.fabric.api.client.rendering.v1.InvalidateRenderStateCallback; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.font.TextRenderer; import net.minecraft.client.render.block.entity.BlockEntityRendererFactories; -import net.minecraft.client.util.Window; -import net.minecraft.text.OrderedText; -import net.minecraft.text.StringVisitable; -import net.minecraft.text.Text; -import net.minecraft.util.hit.BlockHitResult; - -import java.util.List; public class GlowcaseClient implements ClientModInitializer { @Override @@ -32,48 +21,5 @@ public void onInitializeClient() { WorldRenderEvents.AFTER_TRANSLUCENT.register(BakedBlockEntityRenderer.Manager::render); InvalidateRenderStateCallback.EVENT.register(BakedBlockEntityRenderer.Manager::reset); - - HudRenderCallback.EVENT.register((context, tickDelta) -> { - MinecraftClient client = MinecraftClient.getInstance(); - - if (client.world != null && client.crosshairTarget instanceof BlockHitResult hitResult && client.world.getBlockEntity(hitResult.getBlockPos()) instanceof MailboxBlockEntity mailbox && mailbox.messageCount() > 0 && mailbox.owner().equals(client.getSession().getUuidOrNull())) { - Window window = client.getWindow(); - TextRenderer textRenderer = client.textRenderer; - MailboxBlockEntity.Message message = mailbox.getMessage(); - List lines = textRenderer.wrapLines(StringVisitable.plain(message.message()), window.getWidth() / 2); - Text reminder2 = Text.translatable("glowcase.mailbox.reminder2"); - - int padding = 3; - - int lineHeight = (textRenderer.fontHeight + 3); - - int contentWidth = Math.max(window.getScaledWidth() / 2, textRenderer.getWidth(reminder2)); - int totalWidth = contentWidth + padding * 2; - int totalHeight = (lines.size() + 6) * lineHeight; - - int startX = window.getScaledWidth() / 2 - totalWidth / 2; - int startY = window.getScaledHeight() / 2 - totalHeight / 2; - - context.fill(startX, startY, startX + totalWidth, startY + totalHeight, 0x80000000); - - int y = startY + lineHeight * 2; - - for (OrderedText line : lines) { - context.drawText(client.textRenderer, line, startX + 3, y, -1, false); - y += lineHeight; - } - - context.drawText(client.textRenderer, Text.translatable("glowcase.mailbox.sender", message.senderName()), startX + 3, startY + 3, -1, false); - - Text messageCount = Text.literal("1/" + mailbox.messageCount()); - context.drawText(client.textRenderer, messageCount, startX + totalWidth - 3 - textRenderer.getWidth(messageCount), y + lineHeight, -1, false); - - Text reminder1 = Text.translatable("glowcase.mailbox.reminder1"); - context.drawText(client.textRenderer, reminder1, startX + totalWidth - 3 - textRenderer.getWidth(reminder1), y + lineHeight * 2, 0xFFAAAAAA, false); - - context.drawText(client.textRenderer, reminder2, startX + totalWidth - 3 - textRenderer.getWidth(reminder2), y + lineHeight * 3, 0xFFAAAAAA, false); - - } - }); } } diff --git a/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClientProxy.java b/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClientProxy.java index 04948e6..2cf548d 100644 --- a/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClientProxy.java +++ b/src/main/java/dev/hephaestus/glowcase/client/GlowcaseClientProxy.java @@ -7,7 +7,6 @@ import dev.hephaestus.glowcase.client.gui.screen.ingame.HyperlinkBlockEditScreen; import dev.hephaestus.glowcase.client.gui.screen.ingame.ItemDisplayBlockEditScreen; import dev.hephaestus.glowcase.client.gui.screen.ingame.TextBlockEditScreen; -import dev.hephaestus.glowcase.mixin.client.MinecraftClientAccessor; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.ConfirmLinkScreen; import net.minecraft.util.math.BlockPos; @@ -34,12 +33,6 @@ public void openItemDisplayBlockEditScreen(BlockPos pos) { } } - @Override - public void prefillMailboxChat(BlockPos pos) { - ((MinecraftClientAccessor) MinecraftClient.getInstance()) - .invokeOpenChatScreen(String.format("/mail %d %d %d ", pos.getX(), pos.getY(), pos.getZ())); - } - @Override public void openTextBlockEditScreen(BlockPos pos) { MinecraftClient client = MinecraftClient.getInstance(); diff --git a/src/main/resources/assets/glowcase/blockstates/mailbox.json b/src/main/resources/assets/glowcase/blockstates/mailbox.json deleted file mode 100644 index 0eb0ac0..0000000 --- a/src/main/resources/assets/glowcase/blockstates/mailbox.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "variants": { - "facing=north,has_mail=true": { - "model": "glowcase:block/mailbox" - }, - "facing=east,has_mail=true": { - "model": "glowcase:block/mailbox", - "y": 90 - }, - "facing=south,has_mail=true": { - "model": "glowcase:block/mailbox", - "y": 180 - }, - "facing=west,has_mail=true": { - "model": "glowcase:block/mailbox", - "y": 270 - }, - "facing=north,has_mail=false": { - "model": "glowcase:block/mailbox_empty" - }, - "facing=east,has_mail=false": { - "model": "glowcase:block/mailbox_empty", - "y": 90 - }, - "facing=south,has_mail=false": { - "model": "glowcase:block/mailbox_empty", - "y": 180 - }, - "facing=west,has_mail=false": { - "model": "glowcase:block/mailbox_empty", - "y": 270 - } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/glowcase/lang/en_us.json b/src/main/resources/assets/glowcase/lang/en_us.json index 395bee6..a32d0e3 100644 --- a/src/main/resources/assets/glowcase/lang/en_us.json +++ b/src/main/resources/assets/glowcase/lang/en_us.json @@ -3,7 +3,6 @@ "block.glowcase.text_block": "Text Block", "block.glowcase.hyperlink_block": "Hyperlink Block", "block.glowcase.item_display_block": "Item Display Block", - "block.glowcase.mailbox": "Mailbox", "gui.glowcase.scale": "Scale: %d", "gui.glowcase.alignment": "Alignment: %s", "gui.glowcase.gives_item": "Gives Item: %s", @@ -14,12 +13,6 @@ "gui.glowcase.none": "(None)", "item.glowcase.text_block": "Text Block", "item.glowcase.hyperlink_block": "Hyperlink Block", - "command.glowcase.message_sent": "Message sent!", - "command.glowcase.failed.no_mailbox": "Failed to send message; no mailbox exists at that location", - "command.glowcase.failed.no_world": "Failed to send message; sender must be in a world", - "glowcase.mailbox.sender": "From %s", - "glowcase.mailbox.reminder1": "Right click to delete this message", - "glowcase.mailbox.reminder2": "Sneak+Right click to delete all messages from this sender", "gui.glowcase.title": "Title", "gui.glowcase.url": "URL" -} \ No newline at end of file +} diff --git a/src/main/resources/assets/glowcase/models/block/mailbox.json b/src/main/resources/assets/glowcase/models/block/mailbox.json deleted file mode 100644 index f62ddff..0000000 --- a/src/main/resources/assets/glowcase/models/block/mailbox.json +++ /dev/null @@ -1,376 +0,0 @@ -{ - "textures": { - "0": "minecraft:block/iron_block", - "1": "minecraft:block/red_terracotta", - "particle": "minecraft:block/iron_block" - }, - "elements": [ - { - "from": [ - 5, - 0, - 1 - ], - "to": [ - 6, - 7, - 15 - ], - "rotation": { - "angle": 0, - "axis": "y", - "origin": [ - 14, - 8, - 9 - ] - }, - "faces": { - "north": { - "uv": [ - 10, - 9, - 11, - 16 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 5, - 9, - 6, - 16 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1, - 9, - 15, - 16 - ], - "texture": "#0" - }, - "up": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - } - } - }, - { - "from": [ - 10, - 0, - 1 - ], - "to": [ - 11, - 7, - 15 - ], - "rotation": { - "angle": 0, - "axis": "y", - "origin": [ - 14, - 8, - 9 - ] - }, - "faces": { - "north": { - "uv": [ - 5, - 9, - 6, - 16 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1, - 9, - 15, - 16 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 10, - 9, - 11, - 16 - ], - "texture": "#0" - }, - "up": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - } - } - }, - { - "from": [ - 6, - 0, - 1 - ], - "to": [ - 10, - 8, - 15 - ], - "rotation": { - "angle": 0, - "axis": "y", - "origin": [ - 14, - 10, - 9 - ] - }, - "faces": { - "north": { - "uv": [ - 6, - 8, - 10, - 16 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1, - 7, - 15, - 8 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 6, - 8, - 10, - 16 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1, - 7, - 15, - 8 - ], - "texture": "#0" - }, - "up": { - "uv": [ - 6, - 1, - 10, - 15 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 6, - 1, - 10, - 15 - ], - "texture": "#0" - } - } - }, - { - "from": [ - 4.875, - 2, - 3 - ], - "to": [ - 5, - 10, - 4 - ], - "rotation": { - "angle": 0, - "axis": "x", - "origin": [ - 5, - 2.5, - 3.5 - ] - }, - "faces": { - "north": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "east": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "south": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "west": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "up": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "down": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - } - } - }, - { - "from": [ - 4.875, - 8, - 3 - ], - "to": [ - 5, - 10, - 5 - ], - "rotation": { - "angle": 0, - "axis": "x", - "origin": [ - 5, - 2.5, - 3.5 - ] - }, - "faces": { - "north": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "east": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "south": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "west": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "up": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "down": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - } - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/glowcase/models/block/mailbox_empty.json b/src/main/resources/assets/glowcase/models/block/mailbox_empty.json deleted file mode 100644 index 92f69c7..0000000 --- a/src/main/resources/assets/glowcase/models/block/mailbox_empty.json +++ /dev/null @@ -1,384 +0,0 @@ -{ - "textures": { - "0": "minecraft:block/iron_block", - "1": "minecraft:block/red_terracotta", - "particle": "minecraft:block/iron_block" - }, - "elements": [ - { - "from": [ - 5, - 0, - 1 - ], - "to": [ - 6, - 7, - 15 - ], - "rotation": { - "angle": 0, - "axis": "y", - "origin": [ - 14, - 8, - 9 - ] - }, - "faces": { - "north": { - "uv": [ - 10, - 9, - 11, - 16 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 5, - 9, - 6, - 16 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1, - 9, - 15, - 16 - ], - "texture": "#0" - }, - "up": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - } - } - }, - { - "from": [ - 10, - 0, - 1 - ], - "to": [ - 11, - 7, - 15 - ], - "rotation": { - "angle": 0, - "axis": "y", - "origin": [ - 14, - 8, - 9 - ] - }, - "faces": { - "north": { - "uv": [ - 5, - 9, - 6, - 16 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1, - 9, - 15, - 16 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 10, - 9, - 11, - 16 - ], - "texture": "#0" - }, - "up": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.5, - 7.5, - 3, - 8 - ], - "texture": "#0" - } - } - }, - { - "from": [ - 6, - 0, - 1 - ], - "to": [ - 10, - 8, - 15 - ], - "rotation": { - "angle": 0, - "axis": "y", - "origin": [ - 14, - 10, - 9 - ] - }, - "faces": { - "north": { - "uv": [ - 6, - 8, - 10, - 16 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1, - 7, - 15, - 8 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 6, - 8, - 10, - 16 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1, - 7, - 15, - 8 - ], - "texture": "#0" - }, - "up": { - "uv": [ - 6, - 1, - 10, - 15 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 6, - 1, - 10, - 15 - ], - "texture": "#0" - } - } - }, - { - "from": [ - 4.875, - 2, - 3 - ], - "to": [ - 5, - 3, - 11 - ], - "rotation": { - "angle": 0, - "axis": "x", - "origin": [ - 5, - 2.5, - 3.5 - ] - }, - "faces": { - "north": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 180, - "texture": "#1" - }, - "east": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 270, - "texture": "#1" - }, - "south": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "west": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 90, - "texture": "#1" - }, - "up": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 180, - "texture": "#1" - }, - "down": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - } - } - }, - { - "from": [ - 4.875, - 1, - 9 - ], - "to": [ - 5, - 3, - 11 - ], - "rotation": { - "angle": 0, - "axis": "x", - "origin": [ - 5, - 2.5, - 3.5 - ] - }, - "faces": { - "north": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 180, - "texture": "#1" - }, - "east": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 270, - "texture": "#1" - }, - "south": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - }, - "west": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 90, - "texture": "#1" - }, - "up": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "rotation": 180, - "texture": "#1" - }, - "down": { - "uv": [ - 7, - 7, - 8, - 8 - ], - "texture": "#1" - } - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/glowcase/models/item/mailbox.json b/src/main/resources/assets/glowcase/models/item/mailbox.json deleted file mode 100644 index 8dd882c..0000000 --- a/src/main/resources/assets/glowcase/models/item/mailbox.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "glowcase:block/mailbox" -} \ No newline at end of file diff --git a/src/main/resources/data/glowcase/tags/item/items.json b/src/main/resources/data/glowcase/tags/item/items.json index 9687e49..26dc5c1 100644 --- a/src/main/resources/data/glowcase/tags/item/items.json +++ b/src/main/resources/data/glowcase/tags/item/items.json @@ -3,7 +3,6 @@ "values": [ "glowcase:hyperlink_block", "glowcase:item_display_block", - "glowcase:text_block", - "glowcase:mailbox" + "glowcase:text_block" ] -} \ No newline at end of file +}