Skip to content

Commit

Permalink
Merge pull request #48 from sweetrpg/1.18
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
paulyhedral authored Dec 6, 2024
2 parents c9d9c25 + 5946c3a commit d85cfe1
Show file tree
Hide file tree
Showing 39 changed files with 622 additions and 256 deletions.
2 changes: 1 addition & 1 deletion .release-info/1.18/RELEASE_HASH
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f90114caa2b504cf129370ac131d1ebbc574c405
c9d9c25a769d18442685b9f67624e811f348e536
2 changes: 1 addition & 1 deletion .release-info/1.18/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.2.3
4 changes: 4 additions & 0 deletions CHANGELOG/1.18/0.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 0.2.1

- `[DEV]` Code cleanup
- `[DEV]` Documentation
3 changes: 1 addition & 2 deletions CHANGELOG/1.18/current.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
- `[DEV]` Code cleanup
- `[DEV]` Documentation
- `[NEW]` Advancements!
12 changes: 12 additions & 0 deletions src/generated/resources/assets/crafttracker/lang/de_de.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"advancements.crafttracker.main.acquire_list_item.description": "Einen Artikel erwerben, der auf der Einkaufsliste steht",
"advancements.crafttracker.main.acquire_list_item.title": "Einfach weiter einkaufen",
"advancements.crafttracker.main.clear_queue.description": "Leeren Sie die Herstellungswarteschlange vollst\u00E4ndig.",
"advancements.crafttracker.main.clear_queue.title": "Wie ein Boss",
"advancements.crafttracker.main.craft_item.description": "Einen in der Warteschlange befindlichen Gegenstand herstellen",
"advancements.crafttracker.main.craft_item.title": "Arbeiten",
"advancements.crafttracker.main.populate_list.description": "Die Einkaufsliste f\u00FCllen",
"advancements.crafttracker.main.populate_list.title": "To-do-Liste",
"advancements.crafttracker.main.queue_item.description": "Einen Gegenstand zur Herstellungswarteschlange hinzuf\u00FCgen",
"advancements.crafttracker.main.queue_item.title": "Denken Sie daran",
"advancements.crafttracker.main.root.description": "Behalten Sie den \u00DCberblick \u00FCber alle Dinge, die Sie zum Herstellen ben\u00F6tigen",
"advancements.crafttracker.main.root.title": "Tracking-Handwerk",
"crafttracker.config.client.craft_queue_height": "Die H\u00F6he der Craft-Warteschlangen\u00FCberlagerung",
"crafttracker.config.client.craft_queue_hide_empty": "Soll das Overlay der Herstellungswarteschlange ausgeblendet werden, wenn es leer ist?",
"crafttracker.config.client.craft_queue_width": "Die Breite der Craft-Warteschlangen\u00FCberlagerung",
Expand Down
12 changes: 12 additions & 0 deletions src/generated/resources/assets/crafttracker/lang/en_gb.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"advancements.crafttracker.main.acquire_list_item.description": "Acquire an item that is in the shopping list",
"advancements.crafttracker.main.acquire_list_item.title": "Just Keep Shopping",
"advancements.crafttracker.main.clear_queue.description": "Clear the crafting queue entirely",
"advancements.crafttracker.main.clear_queue.title": "Like A Boss",
"advancements.crafttracker.main.craft_item.description": "Craft a queued item",
"advancements.crafttracker.main.craft_item.title": "Workin'",
"advancements.crafttracker.main.populate_list.description": "Populate the shopping list",
"advancements.crafttracker.main.populate_list.title": "Honey-do List",
"advancements.crafttracker.main.queue_item.description": "Add an item to the crafting queue",
"advancements.crafttracker.main.queue_item.title": "Remember This",
"advancements.crafttracker.main.root.description": "Keep track of all the things you need to craft",
"advancements.crafttracker.main.root.title": "Tracking Crafts",
"crafttracker.config.client.craft_queue_height": "The height of the craft queue overlay",
"crafttracker.config.client.craft_queue_hide_empty": "Should the craft queue overlay be hidden when it is empty?",
"crafttracker.config.client.craft_queue_width": "The width of the craft queue overlay",
Expand Down
12 changes: 12 additions & 0 deletions src/generated/resources/assets/crafttracker/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{
"advancements.crafttracker.main.acquire_list_item.description": "Acquire an item that is in the shopping list",
"advancements.crafttracker.main.acquire_list_item.title": "Just Keep Shopping",
"advancements.crafttracker.main.clear_queue.description": "Clear the crafting queue entirely",
"advancements.crafttracker.main.clear_queue.title": "Like A Boss",
"advancements.crafttracker.main.craft_item.description": "Craft a queued item",
"advancements.crafttracker.main.craft_item.title": "Workin'",
"advancements.crafttracker.main.populate_list.description": "Populate the shopping list",
"advancements.crafttracker.main.populate_list.title": "Honey-do List",
"advancements.crafttracker.main.queue_item.description": "Add an item to the crafting queue",
"advancements.crafttracker.main.queue_item.title": "Remember This",
"advancements.crafttracker.main.root.description": "Keep track of all the things you need to craft",
"advancements.crafttracker.main.root.title": "Tracking Crafts",
"crafttracker.config.client.craft_queue_height": "The height of the craft queue overlay",
"crafttracker.config.client.craft_queue_hide_empty": "Should the craft queue overlay be hidden when it is empty?",
"crafttracker.config.client.craft_queue_width": "The width of the craft queue overlay",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parent": "crafttracker:main/populate_list",
"display": {
"icon": {
"item": "minecraft:crafting_table"
},
"title": {
"translate": "advancements.crafttracker.main.acquire_item.title"
},
"description": {
"translate": "advancements.crafttracker.main.acquire_item.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"main": {
"trigger": "crafttracker:acquire_item",
"conditions": {}
}
},
"requirements": [
[
"main"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parent": "crafttracker:main/queue_item",
"display": {
"icon": {
"item": "minecraft:crafting_table"
},
"title": {
"translate": "advancements.crafttracker.main.clear_queue.title"
},
"description": {
"translate": "advancements.crafttracker.main.clear_queue.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"main": {
"trigger": "crafttracker:clear_queue",
"conditions": {}
}
},
"requirements": [
[
"main"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parent": "crafttracker:main/queue_item",
"display": {
"icon": {
"item": "minecraft:crafting_table"
},
"title": {
"translate": "advancements.crafttracker.main.craft_item.title"
},
"description": {
"translate": "advancements.crafttracker.main.craft_item.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"main": {
"trigger": "crafttracker:craft_item",
"conditions": {}
}
},
"requirements": [
[
"main"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parent": "crafttracker:main/root",
"display": {
"icon": {
"item": "minecraft:paper"
},
"title": {
"translate": "advancements.crafttracker.main.populate_list.title"
},
"description": {
"translate": "advancements.crafttracker.main.populate_list.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"main": {
"trigger": "crafttracker:populate_list",
"conditions": {}
}
},
"requirements": [
[
"main"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parent": "crafttracker:main/root",
"display": {
"icon": {
"item": "minecraft:paper"
},
"title": {
"translate": "advancements.crafttracker.main.queue_item.title"
},
"description": {
"translate": "advancements.crafttracker.main.queue_item.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"main": {
"trigger": "crafttracker:queue_item",
"conditions": {}
}
},
"requirements": [
[
"main"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"display": {
"icon": {
"item": "minecraft:paper"
},
"title": {
"translate": "advancements.crafttracker.main.root.title"
},
"description": {
"translate": "advancements.crafttracker.main.root.description"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false,
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png"
},
"criteria": {
"main": {
"trigger": "minecraft:tick",
"conditions": {}
}
},
"requirements": [
[
"main"
]
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import com.sweetrpg.crafttracker.common.lib.Constants;
import com.sweetrpg.crafttracker.common.manager.CraftingQueueManager;
import com.sweetrpg.crafttracker.common.manager.ShoppingListManager;
import com.sweetrpg.crafttracker.common.network.PacketHandler;
import com.sweetrpg.crafttracker.common.network.packet.data.AdvancementData;
import com.sweetrpg.crafttracker.common.registry.ModAdvancements;
import com.sweetrpg.crafttracker.common.registry.ModKeyBindings;
import com.sweetrpg.crafttracker.common.util.InventoryUtil;
import com.sweetrpg.crafttracker.common.util.KeyUtil;
Expand Down Expand Up @@ -137,6 +140,8 @@ private static void handlePopulateShoppingList() {
if(needed > 0)
sMgr.addItem(player, f.getItemId(), needed);
});

PacketHandler.sendToServer(new AdvancementData(ModAdvancements.Key.POPULATE_LIST));
}

private static void handleToggleShoppingList() {
Expand Down Expand Up @@ -179,6 +184,9 @@ private static void handleAddToQueue() {

var player = Minecraft.getInstance().player;
CraftingQueueManager.INSTANCE.addProduct(player, res, 1);

// send advancement packet
PacketHandler.sendToServer(new AdvancementData(ModAdvancements.Key.QUEUE_ITEM));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import com.sweetrpg.crafttracker.common.lib.Constants;
import com.sweetrpg.crafttracker.common.manager.CraftingQueueManager;
import com.sweetrpg.crafttracker.common.model.CraftingQueueProduct;
import com.sweetrpg.crafttracker.common.network.PacketHandler;
import com.sweetrpg.crafttracker.common.network.packet.data.AdvancementData;
import com.sweetrpg.crafttracker.common.registry.ModAdvancements;
import mezz.jei.api.constants.VanillaTypes;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiComponent;
Expand Down Expand Up @@ -165,6 +168,9 @@ public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
CraftingQueueManager.INSTANCE.removeAll();
QueueManagementScreen.this.productItems = CraftingQueueManager.INSTANCE.getEndProducts();
this.renderables.clear();

// send advancement packet
PacketHandler.sendToServer(new AdvancementData(ModAdvancements.Key.CLEAR_QUEUE));
}) /*{
@Override
public void renderToolTip(PoseStack pPoseStack, int pMouseX, int pMouseY) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.sweetrpg.crafttracker.common;

import com.sweetrpg.crafttracker.common.network.PacketHandler;
import com.sweetrpg.crafttracker.common.registry.ModAdvancements;
import com.sweetrpg.crafttracker.common.registry.ModTriggers;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;

public class CommonSetup {

public static void init(final FMLCommonSetupEvent event) {
event.enqueueWork(() -> {
PacketHandler.init();
ModAdvancements.register();
ModTriggers.register();
});
}

Expand Down
Loading

0 comments on commit d85cfe1

Please sign in to comment.