Skip to content

Commit b49ce7f

Browse files
1.21.11 port (#1989)
* 1.21.11 port progress * 1.21.11 port progress * More progress * More progress * More progress * More progress * Finally, two more things to go. * Progress * Progress * Now its launching. * Various fixes - Fixed some text not rendering because of missing alpha value (0xFFFFFF as opposed to 0xFFFFFFFF) - Fixed some AW and AT entries. - Got neoforge to actually launch - Removed @onlyin annotations * Fixed crucial error where operators werent allowed to grab items and non operators were. * Made sure that the server is not null, not an issue with only REI but saw someone have an error to do with GameInstance.getServer() being null. * Prepare for 1.21.11 --------- Co-authored-by: shedaniel <daniel@shedaniel.me>
1 parent 3c69d52 commit b49ce7f

File tree

180 files changed

+820
-810
lines changed

Some content is hidden

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

180 files changed

+820
-810
lines changed

.github/workflows/curseforge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ on:
2525
- 19.x-1.21.5
2626
- 20.x-1.21.6
2727
- 1.21.9
28+
- 1.21.11
2829

2930
jobs:
3031
build:

api/src/main/java/me/shedaniel/rei/api/client/ClientHelper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
import net.minecraft.ChatFormatting;
3535
import net.minecraft.core.registries.BuiltInRegistries;
3636
import net.minecraft.network.chat.Component;
37-
import net.minecraft.resources.ResourceLocation;
37+
38+
import net.minecraft.resources.*;
3839
import net.minecraft.world.item.Item;
3940
import net.minecraft.world.item.Items;
4041

@@ -117,7 +118,7 @@ default Component getFormattedModFromItem(Item item) {
117118
* @param identifier the identifier to find
118119
* @return the mod name with blue and italic formatting
119120
*/
120-
default Component getFormattedModFromIdentifier(ResourceLocation identifier) {
121+
default Component getFormattedModFromIdentifier(Identifier identifier) {
121122
String mod = getModFromIdentifier(identifier);
122123
if (mod.isEmpty())
123124
return Component.empty();
@@ -171,7 +172,7 @@ default List<Component> appendModIdToTooltips(List<Component> components, String
171172
* @param identifier the identifier to find
172173
* @return the mod name
173174
*/
174-
default String getModFromIdentifier(ResourceLocation identifier) {
175+
default String getModFromIdentifier(Identifier identifier) {
175176
if (identifier == null)
176177
return "";
177178
return getModFromModId(identifier.getNamespace());

api/src/main/java/me/shedaniel/rei/api/client/REIRuntime.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import net.fabricmc.api.Environment;
3737
import net.minecraft.client.gui.screens.Screen;
3838
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
39-
import net.minecraft.resources.ResourceLocation;
39+
import net.minecraft.resources.Identifier;
4040
import org.jetbrains.annotations.ApiStatus;
4141
import org.jetbrains.annotations.Nullable;
4242

@@ -160,15 +160,15 @@ default Optional<ScreenOverlay> getOverlay(boolean reset) {
160160
*
161161
* @return the texture location of the default display background
162162
*/
163-
ResourceLocation getDefaultDisplayTexture();
163+
Identifier getDefaultDisplayTexture();
164164

165165
/**
166166
* Returns the texture location of the default display background.
167167
*
168168
* @param darkTheme whether dark mode is enabled
169169
* @return the texture location of the default display background
170170
*/
171-
ResourceLocation getDefaultDisplayTexture(boolean darkTheme);
171+
Identifier getDefaultDisplayTexture(boolean darkTheme);
172172

173173
/**
174174
* Returns the location of the search field, according to the current screen.

api/src/main/java/me/shedaniel/rei/api/client/config/ConfigObject.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
3232
import net.fabricmc.api.EnvType;
3333
import net.fabricmc.api.Environment;
34-
import net.minecraft.resources.ResourceLocation;
34+
import net.minecraft.resources.Identifier;
3535
import org.jetbrains.annotations.ApiStatus;
3636
import org.jetbrains.annotations.Nullable;
3737

@@ -247,7 +247,7 @@ default boolean isLeftHandSidePanel() {
247247

248248
@ApiStatus.Experimental
249249
@Nullable
250-
ResourceLocation getInputMethodId();
250+
Identifier getInputMethodId();
251251

252252
boolean doesDisableRecipeBook();
253253

api/src/main/java/me/shedaniel/rei/api/client/entry/filtering/FilteringRuleType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import net.minecraft.client.gui.screens.Screen;
2929
import net.minecraft.nbt.CompoundTag;
3030
import net.minecraft.network.chat.Component;
31-
import net.minecraft.resources.ResourceLocation;
31+
import net.minecraft.resources.Identifier;
3232
import org.jetbrains.annotations.ApiStatus;
3333
import org.jetbrains.annotations.Nullable;
3434

@@ -74,7 +74,7 @@ static CompoundTag save(FilteringRule<?> rule, CompoundTag tag) {
7474
*/
7575
@Nullable
7676
static FilteringRule<?> read(CompoundTag tag) {
77-
FilteringRuleType<?> type = FilteringRuleTypeRegistry.getInstance().get(ResourceLocation.tryParse(tag.getString("id").orElseThrow()));
77+
FilteringRuleType<?> type = FilteringRuleTypeRegistry.getInstance().get(Identifier.tryParse(tag.getString("id").orElseThrow()));
7878
if (type == null) return null;
7979
return type.readFrom(tag.getCompoundOrEmpty("rule"));
8080
}
@@ -127,7 +127,7 @@ default Component getSubtitle(T rule) {
127127
*
128128
* @return the id of the filtering rule type
129129
*/
130-
default ResourceLocation getId() {
130+
default Identifier getId() {
131131
return Objects.requireNonNull(FilteringRuleTypeRegistry.getInstance().getId(this), "Id of " + this);
132132
}
133133

api/src/main/java/me/shedaniel/rei/api/client/entry/filtering/FilteringRuleTypeRegistry.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import me.shedaniel.rei.impl.ClientInternals;
2828
import net.fabricmc.api.EnvType;
2929
import net.fabricmc.api.Environment;
30-
import net.minecraft.resources.ResourceLocation;
30+
import net.minecraft.resources.Identifier;
3131
import org.jetbrains.annotations.ApiStatus;
3232
import org.jetbrains.annotations.Nullable;
3333

@@ -47,7 +47,7 @@ static FilteringRuleTypeRegistry getInstance() {
4747
* @return the filtering rule type with the specified id, or {@code null} if none exists
4848
*/
4949
@Nullable
50-
FilteringRuleType<?> get(ResourceLocation id);
50+
FilteringRuleType<?> get(Identifier id);
5151

5252
/**
5353
* Returns the id of the specified filtering rule type, or {@code null} if none exists.
@@ -56,15 +56,15 @@ static FilteringRuleTypeRegistry getInstance() {
5656
* @return the id of the specified filtering rule type, or {@code null} if none exists
5757
*/
5858
@Nullable
59-
ResourceLocation getId(FilteringRuleType<?> rule);
59+
Identifier getId(FilteringRuleType<?> rule);
6060

6161
/**
6262
* Registers the specified filtering rule type.
6363
*
6464
* @param id the id of the filtering rule type
6565
* @param rule the filtering rule type
6666
*/
67-
void register(ResourceLocation id, FilteringRuleType<?> rule);
67+
void register(Identifier id, FilteringRuleType<?> rule);
6868

6969
/**
7070
* Returns the basic filtering rule that can be used to filter entries,

api/src/main/java/me/shedaniel/rei/api/client/entry/type/BuiltinClientEntryTypes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
import me.shedaniel.rei.api.common.entry.type.EntryType;
2828
import net.fabricmc.api.EnvType;
2929
import net.fabricmc.api.Environment;
30-
import net.minecraft.resources.ResourceLocation;
30+
import net.minecraft.resources.Identifier;
3131
import org.jetbrains.annotations.ApiStatus;
3232

3333
@ApiStatus.NonExtendable
3434
@Environment(EnvType.CLIENT)
3535
public interface BuiltinClientEntryTypes {
36-
ResourceLocation RENDERING_ID = ResourceLocation.withDefaultNamespace("rendering");
36+
Identifier RENDERING_ID = Identifier.withDefaultNamespace("rendering");
3737

3838
EntryType<Renderer> RENDERING = EntryType.deferred(RENDERING_ID);
3939
}

api/src/main/java/me/shedaniel/rei/api/client/favorites/CompoundFavoriteRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import me.shedaniel.rei.api.client.gui.Renderer;
3131
import net.fabricmc.api.EnvType;
3232
import net.fabricmc.api.Environment;
33-
import net.minecraft.Util;
3433
import net.minecraft.client.gui.GuiGraphics;
34+
import net.minecraft.util.*;
3535

3636
import java.util.List;
3737
import java.util.function.IntFunction;

api/src/main/java/me/shedaniel/rei/api/client/favorites/FavoriteEntry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import net.fabricmc.api.Environment;
3636
import net.minecraft.client.input.MouseButtonEvent;
3737
import net.minecraft.nbt.CompoundTag;
38-
import net.minecraft.resources.ResourceLocation;
38+
import net.minecraft.resources.Identifier;
3939
import org.jetbrains.annotations.ApiStatus;
4040
import org.jetbrains.annotations.Nullable;
4141

@@ -113,7 +113,7 @@ public Optional<Supplier<Collection<FavoriteMenuEntry>>> getMenuEntries() {
113113
@Override
114114
public abstract FavoriteEntry copy();
115115

116-
public abstract ResourceLocation getType();
116+
public abstract Identifier getType();
117117

118118
@Override
119119
public boolean equals(Object o) {

api/src/main/java/me/shedaniel/rei/api/client/favorites/FavoriteEntryType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import net.fabricmc.api.Environment;
3434
import net.minecraft.nbt.CompoundTag;
3535
import net.minecraft.network.chat.Component;
36-
import net.minecraft.resources.ResourceLocation;
36+
import net.minecraft.resources.Identifier;
3737
import org.jetbrains.annotations.ApiStatus;
3838
import org.jetbrains.annotations.Nullable;
3939

@@ -44,12 +44,12 @@ public interface FavoriteEntryType<T extends FavoriteEntry> {
4444
/**
4545
* A builtin type of favorites, wrapping a {@link EntryStack}.
4646
*/
47-
ResourceLocation ENTRY_STACK = ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "entry_stack");
47+
Identifier ENTRY_STACK = Identifier.fromNamespaceAndPath("roughlyenoughitems", "entry_stack");
4848
/**
4949
* A builtin type of favorites, wrapping a {@link Display}.
5050
*/
5151
@ApiStatus.Experimental
52-
ResourceLocation DISPLAY = ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "display");
52+
Identifier DISPLAY = Identifier.fromNamespaceAndPath("roughlyenoughitems", "display");
5353

5454
static Registry registry() {
5555
return PluginManager.getClientInstance().get(FavoriteEntryType.Registry.class);
@@ -63,12 +63,12 @@ static Registry registry() {
6363

6464
@ApiStatus.NonExtendable
6565
interface Registry extends Reloadable<REIClientPlugin> {
66-
void register(ResourceLocation id, FavoriteEntryType<?> type);
66+
void register(Identifier id, FavoriteEntryType<?> type);
6767

68-
@Nullable <A extends FavoriteEntry> FavoriteEntryType<A> get(ResourceLocation id);
68+
@Nullable <A extends FavoriteEntry> FavoriteEntryType<A> get(Identifier id);
6969

7070
@Nullable
71-
ResourceLocation getId(FavoriteEntryType<?> type);
71+
Identifier getId(FavoriteEntryType<?> type);
7272

7373
Section getOrCrateSection(Component text);
7474

0 commit comments

Comments
 (0)