Skip to content

Commit aaeedd8

Browse files
committed
Update to MC 1.21.11
1 parent acd7b30 commit aaeedd8

10 files changed

Lines changed: 68 additions & 68 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'net.neoforged.moddev' version '2.0.119'
2+
id 'net.neoforged.moddev' version '2.0.126'
33
id 'net.darkhax.curseforgegradle' version '1.1.28'
44
id 'com.github.kt3k.coveralls' version '2.12.0'
55
id 'com.diffplug.spotless' version '6.25.0'

gradle.properties

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

66
# Common
7-
minecraft_version=1.21.10
7+
minecraft_version=1.21.11
88
mod_name=CommonCapabilities
99
mod_author=rubensworks (aka kroeser)
1010
mod_id=commoncapabilities
@@ -21,7 +21,7 @@ curseforge_project_id=247007
2121
modrinth_project_id=oFXrCkDI
2222

2323
# NeoForge
24-
neoforge_version=21.10.53-beta
24+
neoforge_version=21.11.10-beta
2525
neoforge_loader_version_range=[4,)
2626
neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/common-capabilities.json
2727

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

3333
# Dependencies
34-
cyclopscore_version=1.25.5-858
34+
cyclopscore_version=1.25.5-868
3535
rfapi_version=1.12-2.1.0.7
3636
enderio_version=3.0.0.40_alpha
3737
endercore_version=0.4.0.24-alpha
@@ -45,5 +45,5 @@ cofhcore_version=1.12.2-4.6.2.25
4545
thermalfoundation_version=1.12.2-2.6.2.26
4646
cofhworld_version=1.12.2-1.3.0.6
4747
codechickenlib_version=1.12.2-3.2.2.354
48-
visualworkbench_version=7084353
49-
puzzleslib_version=7279084
48+
visualworkbench_version=7345079
49+
puzzleslib_version=7344255

src/main/java/org/cyclops/commoncapabilities/GeneralConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.cyclops.commoncapabilities;
22

33
import com.google.common.collect.Lists;
4-
import net.minecraft.resources.ResourceLocation;
4+
import net.minecraft.resources.Identifier;
55
import net.neoforged.bus.api.SubscribeEvent;
66
import net.neoforged.fml.event.config.ModConfigEvent;
77
import org.cyclops.commoncapabilities.api.capability.itemhandler.ItemMatch;
@@ -42,6 +42,6 @@ public void onConfigReload(ModConfigEvent.Reloading event) {
4242
}
4343

4444
protected void updateNbtComparator() {
45-
ItemMatch.DATA_COMPARATOR = DataComparator.INSTANCE = new DataComparator(ignoreDataComponentsForEqualityFilters.stream().map(ResourceLocation::parse).collect(Collectors.toSet()));
45+
ItemMatch.DATA_COMPARATOR = DataComparator.INSTANCE = new DataComparator(ignoreDataComponentsForEqualityFilters.stream().map(Identifier::parse).collect(Collectors.toSet()));
4646
}
4747
}

src/main/java/org/cyclops/commoncapabilities/IngredientComponents.java

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

33
import com.google.common.collect.Lists;
44
import net.minecraft.core.component.DataComponentMap;
5-
import net.minecraft.resources.ResourceLocation;
5+
import net.minecraft.resources.Identifier;
66
import net.minecraft.world.item.Item;
77
import net.minecraft.world.item.ItemStack;
88
import net.minecraft.world.level.material.Fluid;
@@ -29,29 +29,29 @@ public class IngredientComponents {
2929
public static final IngredientComponent<ItemStack, Integer> ITEMSTACK =
3030
new IngredientComponent<>("minecraft:itemstack", new IngredientMatcherItemStack(),
3131
new IngredientSerializerItemStack(), Lists.newArrayList(
32-
new IngredientComponentCategoryType<>(ResourceLocation.parse("itemstack/item"),
32+
new IngredientComponentCategoryType<>(Identifier.parse("itemstack/item"),
3333
Item.class, true,ItemStack::getItem, ItemMatch.ITEM, false),
34-
new IngredientComponentCategoryType<>(ResourceLocation.parse("itemstack/count"),
34+
new IngredientComponentCategoryType<>(Identifier.parse("itemstack/count"),
3535
Integer.class, false, ItemStack::getCount, ItemMatch.STACKSIZE, true),
36-
new IngredientComponentCategoryType<>(ResourceLocation.parse("itemstack/data"),
36+
new IngredientComponentCategoryType<>(Identifier.parse("itemstack/data"),
3737
DataComponentMap.class, false, ItemStack::getComponents, ItemMatch.DATA, false)
3838
)).setTranslationKey("recipecomponent.minecraft.itemstack");
3939

4040
public static final IngredientComponent<FluidStack, Integer> FLUIDSTACK =
4141
new IngredientComponent<>("minecraft:fluidstack", new IngredientMatcherFluidStack(),
4242
new IngredientSerializerFluidStack(), Lists.newArrayList(
43-
new IngredientComponentCategoryType<>(ResourceLocation.parse("fluidstack/fluid"),
43+
new IngredientComponentCategoryType<>(Identifier.parse("fluidstack/fluid"),
4444
Fluid.class, true, FluidStack::getFluid, FluidMatch.FLUID, false),
45-
new IngredientComponentCategoryType<>(ResourceLocation.parse("fluidstack/amount"),
45+
new IngredientComponentCategoryType<>(Identifier.parse("fluidstack/amount"),
4646
Integer.class, false, FluidStack::getAmount, FluidMatch.AMOUNT, true),
47-
new IngredientComponentCategoryType<>(ResourceLocation.parse("fluidstack/data"),
47+
new IngredientComponentCategoryType<>(Identifier.parse("fluidstack/data"),
4848
DataComponentMap.class, false, FluidStack::getComponents, FluidMatch.DATA, false)
4949
)).setTranslationKey("recipecomponent.minecraft.fluidstack");
5050

5151
public static final IngredientComponent<Long, Boolean> ENERGY =
5252
new IngredientComponent<>("minecraft:energy", new IngredientMatcherEnergy(),
5353
new IngredientSerializerEnergy(), Lists.newArrayList(
54-
new IngredientComponentCategoryType<>(ResourceLocation.parse("energy/amount"),
54+
new IngredientComponentCategoryType<>(Identifier.parse("energy/amount"),
5555
Long.class, false, amount -> amount, true, true)
5656
)).setTranslationKey("recipecomponent.minecraft.energy");
5757

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package org.cyclops.commoncapabilities;
22

33
import net.minecraft.core.registries.Registries;
4-
import net.minecraft.resources.ResourceLocation;
4+
import net.minecraft.resources.Identifier;
55
import net.minecraft.world.item.Item;
66
import net.neoforged.neoforge.registries.DeferredHolder;
77

@@ -11,23 +11,23 @@
1111
*/
1212
public class RegistryEntries {
1313

14-
public static final DeferredHolder<Item, Item> ITEM_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:shulker_box"));
15-
public static final DeferredHolder<Item, Item> ITEM_WHITE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:white_shulker_box"));
16-
public static final DeferredHolder<Item, Item> ITEM_ORANGE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:orange_shulker_box"));
17-
public static final DeferredHolder<Item, Item> ITEM_MAGENTA_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:magenta_shulker_box"));
18-
public static final DeferredHolder<Item, Item> ITEM_LIGHT_BLUE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:light_blue_shulker_box"));
19-
public static final DeferredHolder<Item, Item> ITEM_YELLOW_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:yellow_shulker_box"));
20-
public static final DeferredHolder<Item, Item> ITEM_LIME_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:lime_shulker_box"));
21-
public static final DeferredHolder<Item, Item> ITEM_PINK_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:pink_shulker_box"));
22-
public static final DeferredHolder<Item, Item> ITEM_GRAY_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:gray_shulker_box"));
23-
public static final DeferredHolder<Item, Item> ITEM_LIGHT_GRAY_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:light_gray_shulker_box"));
24-
public static final DeferredHolder<Item, Item> ITEM_CYAN_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:cyan_shulker_box"));
25-
public static final DeferredHolder<Item, Item> ITEM_PURPLE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:purple_shulker_box"));
26-
public static final DeferredHolder<Item, Item> ITEM_BLUE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:blue_shulker_box"));
27-
public static final DeferredHolder<Item, Item> ITEM_BROWN_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:brown_shulker_box"));
28-
public static final DeferredHolder<Item, Item> ITEM_GREEN_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:green_shulker_box"));
29-
public static final DeferredHolder<Item, Item> ITEM_RED_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:red_shulker_box"));
30-
public static final DeferredHolder<Item, Item> ITEM_BLACK_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:black_shulker_box"));
31-
public static final DeferredHolder<Item, Item> ITEM_BUNDLE = DeferredHolder.create(Registries.ITEM, ResourceLocation.parse("minecraft:bundle"));
14+
public static final DeferredHolder<Item, Item> ITEM_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:shulker_box"));
15+
public static final DeferredHolder<Item, Item> ITEM_WHITE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:white_shulker_box"));
16+
public static final DeferredHolder<Item, Item> ITEM_ORANGE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:orange_shulker_box"));
17+
public static final DeferredHolder<Item, Item> ITEM_MAGENTA_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:magenta_shulker_box"));
18+
public static final DeferredHolder<Item, Item> ITEM_LIGHT_BLUE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:light_blue_shulker_box"));
19+
public static final DeferredHolder<Item, Item> ITEM_YELLOW_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:yellow_shulker_box"));
20+
public static final DeferredHolder<Item, Item> ITEM_LIME_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:lime_shulker_box"));
21+
public static final DeferredHolder<Item, Item> ITEM_PINK_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:pink_shulker_box"));
22+
public static final DeferredHolder<Item, Item> ITEM_GRAY_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:gray_shulker_box"));
23+
public static final DeferredHolder<Item, Item> ITEM_LIGHT_GRAY_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:light_gray_shulker_box"));
24+
public static final DeferredHolder<Item, Item> ITEM_CYAN_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:cyan_shulker_box"));
25+
public static final DeferredHolder<Item, Item> ITEM_PURPLE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:purple_shulker_box"));
26+
public static final DeferredHolder<Item, Item> ITEM_BLUE_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:blue_shulker_box"));
27+
public static final DeferredHolder<Item, Item> ITEM_BROWN_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:brown_shulker_box"));
28+
public static final DeferredHolder<Item, Item> ITEM_GREEN_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:green_shulker_box"));
29+
public static final DeferredHolder<Item, Item> ITEM_RED_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:red_shulker_box"));
30+
public static final DeferredHolder<Item, Item> ITEM_BLACK_SHULKER_BOX = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:black_shulker_box"));
31+
public static final DeferredHolder<Item, Item> ITEM_BUNDLE = DeferredHolder.create(Registries.ITEM, Identifier.parse("minecraft:bundle"));
3232

3333
}

src/main/java/org/cyclops/commoncapabilities/ingredient/DataComparator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import net.minecraft.core.component.DataComponentMap;
44
import net.minecraft.core.component.DataComponentType;
55
import net.minecraft.core.registries.BuiltInRegistries;
6-
import net.minecraft.resources.ResourceLocation;
6+
import net.minecraft.resources.Identifier;
77
import org.cyclops.commoncapabilities.CommonCapabilities;
88
import org.cyclops.commoncapabilities.GeneralConfig;
99

@@ -24,10 +24,10 @@ public class DataComparator implements Comparator<DataComponentMap> {
2424
*/
2525
public static Comparator<DataComponentMap> INSTANCE = new DataComparator(null);
2626

27-
private final Set<ResourceLocation> ignoreDataComponentTypes;
27+
private final Set<Identifier> ignoreDataComponentTypes;
2828
private Set<DataComponentType<?>> ignoreDataComponentTypeInstances;
2929

30-
public DataComparator(@Nullable Set<ResourceLocation> ignoreDataComponentTypes) {
30+
public DataComparator(@Nullable Set<Identifier> ignoreDataComponentTypes) {
3131
this.ignoreDataComponentTypes = ignoreDataComponentTypes;
3232
}
3333

@@ -36,7 +36,7 @@ public int compare(DataComponentMap o1, DataComponentMap o2) {
3636
return this.compare(o1, o2, this.ignoreDataComponentTypes);
3737
}
3838

39-
protected int compare(DataComponentMap o1, DataComponentMap o2, @Nullable Set<ResourceLocation> ignoreDataComponentTypes) {
39+
protected int compare(DataComponentMap o1, DataComponentMap o2, @Nullable Set<Identifier> ignoreDataComponentTypes) {
4040
// Return immediately if identical
4141
if (o1 == o2 || o1.equals(o2)) {
4242
return 0;

src/main/java/org/cyclops/commoncapabilities/modcompat/vanilla/capability/recipehandler/VanillaRecipeTypeRecipeHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.google.common.collect.Maps;
55
import com.google.common.collect.Sets;
66
import net.minecraft.recipebook.PlaceRecipeHelper;
7-
import net.minecraft.resources.ResourceLocation;
7+
import net.minecraft.resources.Identifier;
88
import net.minecraft.server.level.ServerLevel;
99
import net.minecraft.util.context.ContextMap;
1010
import net.minecraft.world.entity.player.Player;
@@ -66,7 +66,7 @@ public boolean stillValid(Player playerIn) {
6666
private final boolean ignoreEmptySlots;
6767
private final boolean checkOutput;
6868

69-
public static Map<Pair<RecipeType<?>, ResourceLocation>, Collection<IRecipeDefinition>> CACHED_RECIPES = Maps.newHashMap();
69+
public static Map<Pair<RecipeType<?>, Identifier>, Collection<IRecipeDefinition>> CACHED_RECIPES = Maps.newHashMap();
7070

7171
public VanillaRecipeTypeRecipeHandler(Supplier<Level> worldSupplier, RecipeType<T> recipeType, Predicate<Integer> inputSizePredicate, Function<CraftingContainer, C> createRecipeInput, boolean ignoreEmptySlots, boolean checkOutput) {
7272
this.worldSupplier = worldSupplier;
@@ -211,7 +211,7 @@ public static <C extends RecipeInput, T extends Recipe<C>> IRecipeDefinition rec
211211

212212
@Override
213213
public Collection<IRecipeDefinition> getRecipes() {
214-
Pair<RecipeType<?>, ResourceLocation> cacheKey = Pair.of(recipeType, worldSupplier.get().dimension().location());
214+
Pair<RecipeType<?>, Identifier> cacheKey = Pair.of(recipeType, worldSupplier.get().dimension().identifier());
215215
Collection<IRecipeDefinition> cached = CACHED_RECIPES.get(cacheKey);
216216
if (cached == null) {
217217
if (worldSupplier.get().recipeAccess() instanceof RecipeManager recipeManager) {

src/test/java/org/cyclops/commoncapabilities/api/ingredient/TestIngredientInstanceWrapper.java

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

33
import com.google.common.collect.Lists;
4-
import net.minecraft.resources.ResourceLocation;
4+
import net.minecraft.resources.Identifier;
55
import org.cyclops.commoncapabilities.IngredientComponents;
66
import org.cyclops.commoncapabilities.ingredient.IngredientMatcherEnergy;
77
import org.cyclops.commoncapabilities.ingredient.IngredientSerializerEnergy;
@@ -21,7 +21,7 @@ public static void init() {
2121
C = IngredientComponents.ENERGY;
2222
C_OTHER = new IngredientComponent<>("minecraft:energyother", new IngredientMatcherEnergy(),
2323
new IngredientSerializerEnergy(), Lists.newArrayList(
24-
new IngredientComponentCategoryType<>(ResourceLocation.parse("energy/amount"),
24+
new IngredientComponentCategoryType<>(Identifier.parse("energy/amount"),
2525
Long.class, false, amount -> amount, true, true)
2626
));
2727
}

0 commit comments

Comments
 (0)