Skip to content

Commit 745c9e5

Browse files
committed
Update to MC 1.21.8
1 parent 7cc9687 commit 745c9e5

82 files changed

Lines changed: 1219 additions & 1114 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,9 @@ jobs:
5353
GITHUB_USER: ${{ github.actor }}
5454
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5555
- name: 'Test'
56-
env:
57-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
58-
if: ${{ env.COVERALLS_REPO_TOKEN }}
59-
run: ./gradlew test jacocoTestReport coveralls
60-
- name: 'Game Test'
61-
run: ./gradlew runGameTestServer
56+
run: ./gradlew test runGameTestServer jacocoTestReport
57+
- name: 'Submit coverage results'
58+
uses: coverallsapp/github-action@v2
6259
- name: 'Deploy as GitHub CI artifacts'
6360
uses: actions/upload-artifact@v4
6461
with:

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id 'net.neoforged.gradle.userdev' version '7.0.180'
3-
id 'net.darkhax.curseforgegradle' version '1.0.8'
2+
id 'net.neoforged.gradle.userdev' version '7.0.185'
3+
id 'net.darkhax.curseforgegradle' version '1.1.26'
44
id 'com.github.kt3k.coveralls' version '2.12.0'
55
id 'com.diffplug.spotless' version '6.25.0'
66
id 'com.github.johnrengelman.shadow' version '8.1.1'

gradle.properties

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ group=org.cyclops.integratedterminals
44
java_version=21
55

66
# Common
7-
minecraft_version=1.21.4
7+
minecraft_version=1.21.8
88
mod_name=IntegratedTerminals
99
mod_author=rubensworks (aka kroeser)
1010
mod_id=integratedterminals
@@ -15,13 +15,13 @@ display_url=https://www.curseforge.com/minecraft/mc-mods/integrated-terminals
1515
description=Terminals for managing and overviewing Integrated Dynamics networks.
1616
fingerprint=bd0353b3e8a2810d60dd584e256e364bc3bedd44
1717

18-
parchment_version=2024.12.07
19-
parchment_minecraft_version=1.21.4
18+
parchment_version=2025.06.15
19+
parchment_minecraft_version=1.21.5
2020
curseforge_project_id=295910
2121
modrinth_project_id=HmLJoQ1K
2222

2323
# NeoForge
24-
neoforge_version=21.4.33-beta
24+
neoforge_version=21.8.20
2525
neoforge_loader_version_range=[4,)
2626
neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/integrated-terminals.json
2727

@@ -31,8 +31,8 @@ org.gradle.daemon=false
3131
org.gradle.caching=true
3232

3333
# Dependencies
34-
cyclopscore_version=1.25.5-704
35-
integrateddynamics_version=1.24.1-1059
34+
cyclopscore_version=1.25.5-800
35+
integrateddynamics_version=1.24.1-1299
3636
integratedterminalscompat_version=1.0.0-99
37-
integratedcrafting_version=1.1.13-289
38-
commoncapabilities_version=2.9.7-194
37+
integratedcrafting_version=1.1.13-346
38+
commoncapabilities_version=2.9.7-251
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/main/java/org/cyclops/integratedterminals/IntegratedTerminals.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import net.minecraft.world.item.CreativeModeTab;
44
import net.minecraft.world.item.ItemStack;
5-
import net.neoforged.api.distmarker.Dist;
6-
import net.neoforged.api.distmarker.OnlyIn;
75
import net.neoforged.bus.api.IEventBus;
86
import net.neoforged.fml.common.Mod;
97
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
@@ -125,7 +123,6 @@ public void onConfigsRegister(ConfigHandlerCommon configHandler) {
125123
}
126124

127125
@Override
128-
@OnlyIn(Dist.CLIENT)
129126
protected IClientProxy constructClientProxy() {
130127
return new ClientProxy();
131128
}

src/main/java/org/cyclops/integratedterminals/api/ingredient/IIngredientComponentTerminalStorageHandler.java

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
package org.cyclops.integratedterminals.api.ingredient;
22

3-
import net.minecraft.client.gui.GuiGraphics;
4-
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
5-
import net.minecraft.world.entity.player.Player;
3+
import net.minecraft.ChatFormatting;
4+
import net.minecraft.network.chat.Component;
65
import net.minecraft.world.entity.player.Inventory;
6+
import net.minecraft.world.entity.player.Player;
77
import net.minecraft.world.inventory.AbstractContainerMenu;
88
import net.minecraft.world.item.ItemStack;
9-
import net.minecraft.network.chat.Component;
10-
import net.minecraft.ChatFormatting;
11-
import net.neoforged.api.distmarker.Dist;
12-
import net.neoforged.api.distmarker.OnlyIn;
139
import org.cyclops.commoncapabilities.api.ingredient.IIngredientMatcher;
1410
import org.cyclops.commoncapabilities.api.ingredient.IngredientComponent;
1511
import org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage;
16-
import org.cyclops.integratedterminals.client.gui.container.ContainerScreenTerminalStorage;
17-
import org.cyclops.integratedterminals.core.terminalstorage.query.SearchMode;
1812

1913
import javax.annotation.Nullable;
2014
import java.util.Collection;
2115
import java.util.List;
22-
import java.util.function.Predicate;
2316

2417
/**
2518
* Capability for displaying and interacting with ingredient components of a certain type in the storage terminal.
@@ -29,6 +22,8 @@
2922
*/
3023
public interface IIngredientComponentTerminalStorageHandler<T, M> {
3124

25+
public IIngredientComponentTerminalStorageHandlerClient<T, M> getClient();
26+
3227
/**
3328
* @return The ingredient component.
3429
*/
@@ -39,25 +34,6 @@ public interface IIngredientComponentTerminalStorageHandler<T, M> {
3934
*/
4035
public ItemStack getIcon();
4136

42-
/**
43-
* Draw the given instance in the given gui.
44-
* @param guiGraphics The matrix stack.
45-
* @param instance An instance.
46-
* @param maxQuantity The maximum allowed quantity of the given instance.
47-
* @param label An optional label that should be rendered instead of the quantity.
48-
* @param gui A gui to render in.
49-
* @param layer The layer to render in.
50-
* @param partialTick The partial tick.
51-
* @param x The slot X position.
52-
* @param y The slot Y position.
53-
* @param mouseX The mouse X position.
54-
* @param mouseY The mouse Y position.
55-
* @param additionalTooltipLines The additional tooltip lines to add.
56-
*/
57-
@OnlyIn(Dist.CLIENT)
58-
public void drawInstance(GuiGraphics guiGraphics, T instance, long maxQuantity, @Nullable String label, AbstractContainerScreen gui, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y,
59-
int mouseX, int mouseY, @Nullable List<Component> additionalTooltipLines);
60-
6137
/**
6238
* Show the quantity of the given instance on the second tooltip line.
6339
* @param lines Tooltip lines
@@ -191,15 +167,6 @@ public default void insertMaxIntoContainer(IIngredientComponentStorage<T, M> sto
191167
*/
192168
public void drainActivePlayerStackQuantity(Inventory playerInventory, AbstractContainerMenu container, long quantity);
193169

194-
/**
195-
* Get a predicate for matching instances that apply to the given query string.
196-
* @param searchMode The mode to search under
197-
* @param query A query string.
198-
* @return An instance matcher.
199-
*/
200-
@OnlyIn(Dist.CLIENT)
201-
public Predicate<T> getInstanceFilterPredicate(SearchMode searchMode, String query);
202-
203170
/**
204171
* @return The available sorters.
205172
*/
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package org.cyclops.integratedterminals.api.ingredient;
2+
3+
import net.minecraft.client.gui.GuiGraphics;
4+
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
5+
import net.minecraft.network.chat.Component;
6+
import org.cyclops.integratedterminals.client.gui.container.ContainerScreenTerminalStorage;
7+
import org.cyclops.integratedterminals.core.terminalstorage.query.SearchMode;
8+
9+
import javax.annotation.Nullable;
10+
import java.util.List;
11+
import java.util.function.Predicate;
12+
13+
/**
14+
* @author rubensworks
15+
*/
16+
public interface IIngredientComponentTerminalStorageHandlerClient<T, M> {
17+
18+
/**
19+
* Draw the given instance in the given gui.
20+
* @param guiGraphics The matrix stack.
21+
* @param instance An instance.
22+
* @param maxQuantity The maximum allowed quantity of the given instance.
23+
* @param label An optional label that should be rendered instead of the quantity.
24+
* @param gui A gui to render in.
25+
* @param layer The layer to render in.
26+
* @param partialTick The partial tick.
27+
* @param x The slot X position.
28+
* @param y The slot Y position.
29+
* @param mouseX The mouse X position.
30+
* @param mouseY The mouse Y position.
31+
* @param additionalTooltipLines The additional tooltip lines to add.
32+
*/
33+
public void drawInstance(GuiGraphics guiGraphics, T instance, long maxQuantity, @Nullable String label, AbstractContainerScreen gui, ContainerScreenTerminalStorage.DrawLayer layer, float partialTick, int x, int y,
34+
int mouseX, int mouseY, @Nullable List<Component> additionalTooltipLines);
35+
36+
/**
37+
* Get a predicate for matching instances that apply to the given query string.
38+
* @param searchMode The mode to search under
39+
* @param query A query string.
40+
* @return An instance matcher.
41+
*/
42+
public Predicate<T> getInstanceFilterPredicate(SearchMode searchMode, String query);
43+
44+
}

src/main/java/org/cyclops/integratedterminals/api/ingredient/IIngredientInstanceSorter.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package org.cyclops.integratedterminals.api.ingredient;
22

3-
import net.minecraft.world.item.TooltipFlag;
4-
import net.minecraft.world.entity.player.Player;
53
import net.minecraft.network.chat.Component;
6-
import net.neoforged.api.distmarker.Dist;
7-
import net.neoforged.api.distmarker.OnlyIn;
4+
import net.minecraft.world.entity.player.Player;
5+
import net.minecraft.world.item.TooltipFlag;
86
import org.cyclops.cyclopscore.client.gui.image.IImage;
97

108
import java.util.Comparator;
@@ -37,7 +35,6 @@ public interface IIngredientInstanceSorter<T> extends Comparator<T> {
3735
* @param tooltipFlag The tooltip flag.
3836
* @param lines The tooltip lines.
3937
*/
40-
@OnlyIn(Dist.CLIENT)
4138
public void getTooltip(Player player, TooltipFlag tooltipFlag, List<Component> lines);
4239

4340
}

src/main/java/org/cyclops/integratedterminals/api/terminalstorage/ITerminalButton.java

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
package org.cyclops.integratedterminals.api.terminalstorage;
22

33
import net.minecraft.client.gui.components.Button;
4-
import net.minecraft.world.item.TooltipFlag;
5-
import net.minecraft.world.entity.player.Player;
64
import net.minecraft.network.chat.Component;
7-
import net.neoforged.api.distmarker.Dist;
8-
import net.neoforged.api.distmarker.OnlyIn;
5+
import net.minecraft.world.entity.player.Player;
6+
import net.minecraft.world.item.TooltipFlag;
97

10-
import javax.annotation.Nullable;
118
import java.util.List;
129

1310
/**
@@ -16,6 +13,8 @@
1613
public interface ITerminalButton<C extends ITerminalStorageTabClient,
1714
O extends ITerminalStorageTabCommon, B extends Button> {
1815

16+
public ITerminalButtonClient<C, O, B> getClient();
17+
1918
/**
2019
* Reload the button's visual representation based on the container's state.
2120
*/
@@ -56,26 +55,6 @@ public default boolean isInLeftColumn() {
5655
return true;
5756
}
5857

59-
/**
60-
* Create a gui button for displaying this button.
61-
* @param x The button X position.
62-
* @param y The button Y position.
63-
* @return The gui button.
64-
*/
65-
@OnlyIn(Dist.CLIENT)
66-
public B createButton(int x, int y);
67-
68-
/**
69-
* Callback for when the gui button has been clicked.
70-
* @param clientTab The client tab in which the button was clicked.
71-
* @param commonTab The common tab in which the button was clicked.
72-
* @param guiButton The gui button.
73-
* @param channel The active channel.
74-
* @param mouseButton The mouse button that was used to click with.
75-
*/
76-
@OnlyIn(Dist.CLIENT)
77-
public void onClick(C clientTab, @Nullable O commonTab, B guiButton, int channel, int mouseButton);
78-
7958
/**
8059
* @return The unlocalized name
8160
*/
@@ -87,6 +66,5 @@ public default boolean isInLeftColumn() {
8766
* @param tooltipFlag The tooltip flag.
8867
* @param lines The tooltip lines.
8968
*/
90-
@OnlyIn(Dist.CLIENT)
9169
public void getTooltip(Player player, TooltipFlag tooltipFlag, List<Component> lines);
9270
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.cyclops.integratedterminals.api.terminalstorage;
2+
3+
import net.minecraft.client.gui.components.Button;
4+
5+
import javax.annotation.Nullable;
6+
7+
/**
8+
* @author rubensworks
9+
*/
10+
public interface ITerminalButtonClient<C extends ITerminalStorageTabClient,
11+
O extends ITerminalStorageTabCommon, B extends Button> {
12+
13+
/**
14+
* Create a gui button for displaying this button.
15+
* @param x The button X position.
16+
* @param y The button Y position.
17+
* @return The gui button.
18+
*/
19+
public B createButton(int x, int y);
20+
21+
/**
22+
* Callback for when the gui button has been clicked.
23+
* @param clientTab The client tab in which the button was clicked.
24+
* @param commonTab The common tab in which the button was clicked.
25+
* @param guiButton The gui button.
26+
* @param channel The active channel.
27+
* @param mouseButton The mouse button that was used to click with.
28+
*/
29+
public void onClick(C clientTab, @Nullable O commonTab, B guiButton, int channel, int mouseButton);
30+
31+
}

0 commit comments

Comments
 (0)