Skip to content

Commit f5b4fca

Browse files
committed
feat(minecraft): update to 26.1-snapshot-1
Lots of changes to RegistryLoader and Villager Trades See: https://minecraft.wiki/w/Java_Edition_26.1_Snapshot_1
1 parent b88b440 commit f5b4fca

File tree

54 files changed

+274
-302
lines changed

Some content is hidden

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

54 files changed

+274
-302
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mixinConfigs=mixins.sponge.accessors.json,mixins.sponge.api.json,mixins.sponge.c
1111
mixins.sponge.entityactivation.json,mixins.sponge.exploit.json,mixins.sponge.inventory.json,mixins.sponge.movementcheck.json,\
1212
mixins.sponge.tracker.json,mixins.sponge.ipforward.json,mixins.sponge.optimization.json,mixins.sponge.test.json
1313

14-
minecraftVersion=1.21.11
14+
minecraftVersion=26.1-snapshot-1
1515
recommendedVersion=0-SNAPSHOT
1616

1717
org.gradle.dependency.verification.console=verbose

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pluginManagement {
1010
}
1111
}
1212
plugins {
13-
id("org.spongepowered.gradle.vanilla") version "0.2.2"
13+
id("org.spongepowered.gradle.vanilla") version "0.3.0-SNAPSHOT"
1414
id("implementation-structure")
1515
}
1616
}

src/accessors/java/org/spongepowered/common/accessor/resources/RegistryDataLoader_LoaderAccessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.spongepowered.asm.mixin.Mixin;
3030
import org.spongepowered.asm.mixin.gen.Accessor;
3131

32-
@Mixin(targets = "net/minecraft/resources/RegistryDataLoader$Loader")
32+
@Mixin(RegistryDataLoader.RegistryLoadTask.class)
3333
public interface RegistryDataLoader_LoaderAccessor<T> {
3434

3535
@Accessor("data") RegistryDataLoader.RegistryData<T> accessor$data();
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.spongepowered.common.accessor.resources;
2+
3+
import net.minecraft.core.WritableRegistry;
4+
import net.minecraft.resources.RegistryDataLoader;
5+
import org.spongepowered.asm.mixin.Mixin;
6+
import org.spongepowered.asm.mixin.gen.Accessor;
7+
8+
@Mixin(RegistryDataLoader.RegistryLoadTask.class)
9+
public interface RegistryDataLoader_RegistryLoadTaskAccessor<E> {
10+
11+
@Accessor("registry") WritableRegistry<E> accessor$getRegistry();
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.spongepowered.common.accessor.resources;
2+
3+
import net.minecraft.server.packs.resources.ResourceManager;
4+
import org.spongepowered.asm.mixin.Mixin;
5+
import org.spongepowered.asm.mixin.gen.Accessor;
6+
7+
@Mixin(targets = "net/minecraft/resources/RegistryDataLoader$ResourceManagerRegistryLoadTask")
8+
public interface RegistryDataLoader_ResourceManagerRegistryLoadTaskAccessor {
9+
10+
@Accessor("resourceManager") ResourceManager accessor$getResourceManager();
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package org.spongepowered.common.accessor.util;
2+
3+
import net.minecraft.util.thread.BlockableEventLoop;
4+
import org.spongepowered.asm.mixin.Mixin;
5+
import org.spongepowered.asm.mixin.gen.Invoker;
6+
7+
@Mixin(BlockableEventLoop.class)
8+
public interface BlockableEventLoopAccessor {
9+
10+
@Invoker("pollTask") boolean invoker$pollTask();
11+
12+
}

src/accessors/resources/mixins.sponge.accessors.json

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"commands.arguments.selector.options.EntitySelectorOptions_OptionAccessor",
1818
"commands.arguments.selector.options.EntitySelectorOptionsAccessor",
1919
"core.MappedRegistryAccessor",
20-
"entity.animal.frog.FrogAccessor",
2120
"entity.animal.equine.AbstractChestedHorseEntityAccessor",
21+
"entity.animal.frog.FrogAccessor",
2222
"entity.vehicle.minecart.AbstractMinecartAccessor",
2323
"network.ConnectionAccessor",
2424
"network.chat.StyleAccessor",
@@ -31,6 +31,8 @@
3131
"network.protocol.game.ServerboundMoveVehiclePacketAccessor",
3232
"network.protocol.handshake.ClientIntentionPacketAccessor",
3333
"resources.RegistryDataLoader_LoaderAccessor",
34+
"resources.RegistryDataLoader_RegistryLoadTaskAccessor",
35+
"resources.RegistryDataLoader_ResourceManagerRegistryLoadTaskAccessor",
3436
"resources.ResourceKeyAccessor",
3537
"server.MinecraftServer_ReloadableResourcesAccessor",
3638
"server.MinecraftServerAccessor",
@@ -54,6 +56,7 @@
5456
"sounds.SoundEventAccessor",
5557
"stats.StatsCounterAccessor",
5658
"tags.TagEntryAccessor",
59+
"util.BlockableEventLoopAccessor",
5760
"util.datafix.schemas.V100Accessor",
5861
"world.CompoundContainerAccessor",
5962
"world.DamageSourcesAccessor",
@@ -75,23 +78,23 @@
7578
"world.entity.PortalProcessorAccessor",
7679
"world.entity.ai.targeting.TargetingConditionsAccessor",
7780
"world.entity.animal.AnimalAccessor",
78-
"world.entity.animal.feline.CatAccessor",
79-
"world.entity.animal.fox.FoxAccessor",
8081
"world.entity.animal.cow.MooshroomAccessor",
82+
"world.entity.animal.equine.AbstractHorseAccessor",
83+
"world.entity.animal.equine.HorseAccessor",
84+
"world.entity.animal.equine.LlamaAccessor",
85+
"world.entity.animal.equine.TraderLlamaAccessor",
86+
"world.entity.animal.feline.CatAccessor",
8187
"world.entity.animal.feline.OcelotAccessor",
88+
"world.entity.animal.fish.PufferfishAccessor",
89+
"world.entity.animal.fish.TropicalFishAccessor",
90+
"world.entity.animal.fox.FoxAccessor",
91+
"world.entity.animal.frog.TadpoleAccessor",
8292
"world.entity.animal.panda.PandaAccessor",
8393
"world.entity.animal.parrot.ParrotAccessor",
8494
"world.entity.animal.pig.PigAccessor",
85-
"world.entity.animal.fish.PufferfishAccessor",
8695
"world.entity.animal.rabbit.RabbitAccessor",
87-
"world.entity.animal.fish.TropicalFishAccessor",
88-
"world.entity.animal.turtle.TurtleAccessor",
89-
"world.entity.animal.frog.TadpoleAccessor",
90-
"world.entity.animal.equine.AbstractHorseAccessor",
91-
"world.entity.animal.equine.HorseAccessor",
92-
"world.entity.animal.equine.LlamaAccessor",
93-
"world.entity.animal.equine.TraderLlamaAccessor",
9496
"world.entity.animal.sheep.SheepAccessor",
97+
"world.entity.animal.turtle.TurtleAccessor",
9598
"world.entity.animal.wolf.WolfAccessor",
9699
"world.entity.boss.enderdragon.phases.EnderDragonPhaseAccessor",
97100
"world.entity.boss.wither.WitherBossAccessor",
@@ -105,26 +108,26 @@
105108
"world.entity.monster.CreeperAccessor",
106109
"world.entity.monster.EnderManAccessor",
107110
"world.entity.monster.EndermiteAccessor",
108-
"world.entity.monster.illager.EvokerAccessor",
109111
"world.entity.monster.GuardianAccessor",
110112
"world.entity.monster.PatrollingMonsterAccessor",
111113
"world.entity.monster.PhantomAccessor",
112-
"world.entity.monster.illager.PillagerAccessor",
113114
"world.entity.monster.RavagerAccessor",
114115
"world.entity.monster.SlimeAccessor",
115-
"world.entity.monster.illager.SpellcasterIllagerAccessor",
116116
"world.entity.monster.VexAccessor",
117+
"world.entity.monster.illager.EvokerAccessor",
118+
"world.entity.monster.illager.PillagerAccessor",
119+
"world.entity.monster.illager.SpellcasterIllagerAccessor",
117120
"world.entity.monster.illager.VindicatorAccessor",
118121
"world.entity.monster.zombie.ZombifiedPiglinAccessor",
119122
"world.entity.npc.villager.AbstractVillagerAccessor",
120123
"world.entity.player.AbilitiesAccessor",
121124
"world.entity.player.PlayerAccessor",
122-
"world.entity.projectile.arrow.AbstractArrowAccessor",
123-
"world.entity.projectile.arrow.ArrowAccessor",
124125
"world.entity.projectile.EyeOfEnderAccessor",
125126
"world.entity.projectile.FireworkRocketEntityAccessor",
126127
"world.entity.projectile.FishingHookAccessor",
127128
"world.entity.projectile.ShulkerBulletAccessor",
129+
"world.entity.projectile.arrow.AbstractArrowAccessor",
130+
"world.entity.projectile.arrow.ArrowAccessor",
128131
"world.entity.raid.RaidAccessor",
129132
"world.entity.raid.RaiderAccessor",
130133
"world.entity.raid.RaidsAccessor",
@@ -134,11 +137,11 @@
134137
"world.inventory.AbstractContainerMenuAccessor",
135138
"world.inventory.AbstractCraftingMenuAccessor",
136139
"world.inventory.AbstractFurnaceMenuAccessor",
140+
"world.inventory.AbstractMountInventoryMenuAccessor",
137141
"world.inventory.BeaconMenuAccessor",
138142
"world.inventory.BrewingStandMenuAccessor",
139143
"world.inventory.DispenserMenuAccessor",
140144
"world.inventory.HopperMenuAccessor",
141-
"world.inventory.AbstractMountInventoryMenuAccessor",
142145
"world.inventory.ItemCombinerMenuAccessor",
143146
"world.inventory.MerchantMenuAccessor",
144147
"world.inventory.ResultSlotAccessor",

src/main/java/org/spongepowered/common/advancement/SpongeFilteredTrigger.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.google.gson.Gson;
2828
import com.google.gson.JsonObject;
2929
import net.minecraft.advancements.CriterionTriggerInstance;
30-
import net.minecraft.advancements.criterion.CriterionValidator;
30+
import net.minecraft.world.level.storage.loot.ValidationContextSource;
3131
import org.apache.logging.log4j.LogManager;
3232
import org.apache.logging.log4j.Logger;
3333
import org.spongepowered.api.advancement.criteria.trigger.FilteredTrigger;
@@ -70,8 +70,7 @@ public JsonObject serializeToJson() {
7070
}
7171

7272
@Override
73-
public void validate(final CriterionValidator var1) {
73+
public void validate(ValidationContextSource validator) {
7474

7575
}
76-
7776
}

src/main/java/org/spongepowered/common/adventure/SpongeAdventure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public static HoverEvent<?> asAdventure(final net.minecraft.network.chat.HoverEv
520520
final var stack = si.item();
521521
final Registry<Item> itemRegistry = SpongeCommon.vanillaRegistry(Registries.ITEM);
522522
yield HoverEvent.showItem(
523-
SpongeAdventure.asAdventure(stack.getItemHolder().unwrap().map(ResourceKey::identifier, itemRegistry::getKey)),
523+
SpongeAdventure.asAdventure(stack.typeHolder().unwrap().map(ResourceKey::identifier, itemRegistry::getKey)),
524524
stack.getCount(),
525525
SpongeAdventure.asAdventure(stack.getComponentsPatch())
526526
);

src/main/java/org/spongepowered/common/bridge/resources/RegistryDataLoader_LoaderBridge.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)