Skip to content

Commit bcf1e76

Browse files
committed
1 parent cf63e89 commit bcf1e76

File tree

7 files changed

+19
-15
lines changed

7 files changed

+19
-15
lines changed

neoforge/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ name=SpongeNeo
22
implementation=NeoForge
33
description=The SpongeAPI implementation for NeoForge
44

5-
neoForgeVersion=21.10.16-beta
5+
neoForgeVersion=21.11.0-beta
66
mixinConfigs=mixins.spongeneo.accessors.json,mixins.spongeneo.api.json,mixins.spongeneo.inventory.json,mixins.spongeneo.core.json,mixins.spongeneo.tracker.json

neoforge/src/applaunch/java/org/spongepowered/neoforge/applaunch/plugin/NeoForgePluginPlatform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
import net.neoforged.fml.loading.FMLLoader;
2828
import net.neoforged.fml.loading.FMLPaths;
29-
import net.neoforged.neoforge.internal.versions.neoforge.NeoForgeVersion;
29+
import net.neoforged.neoforge.common.NeoForgeVersion;
3030
import org.spongepowered.common.applaunch.AppLaunch;
3131
import org.spongepowered.common.applaunch.config.LaunchConfig;
3232
import org.spongepowered.common.applaunch.config.TokenReplacement;

neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/server/ReloadableServerResourcesMixin_Neo.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import net.minecraft.server.RegistryLayer;
3434
import net.minecraft.server.ReloadableServerResources;
3535
import net.minecraft.server.packs.resources.ResourceManager;
36+
import net.minecraft.server.permissions.PermissionSet;
3637
import net.minecraft.world.flag.FeatureFlagSet;
3738
import org.spongepowered.asm.mixin.Mixin;
3839
import org.spongepowered.asm.mixin.injection.At;
@@ -44,9 +45,12 @@
4445
@Mixin(ReloadableServerResources.class)
4546
public abstract class ReloadableServerResourcesMixin_Neo {
4647

47-
@WrapOperation(method = "lambda$loadResources$3", at = @At(value = "NEW", target = "(Lnet/minecraft/core/LayeredRegistryAccess;Lnet/minecraft/core/HolderLookup$Provider;Lnet/minecraft/world/flag/FeatureFlagSet;Lnet/minecraft/commands/Commands$CommandSelection;Ljava/util/List;I)Lnet/minecraft/server/ReloadableServerResources;"))
48-
private static ReloadableServerResources impl$onCreateResources(final LayeredRegistryAccess<RegistryLayer> $$0, final HolderLookup.Provider $$1, final FeatureFlagSet $$2,
49-
final Commands.CommandSelection $$3, final List<?> $$4, final int $$5, final Operation<ReloadableServerResources> original, final @Local(argsOnly = true) ResourceManager resourceManager) {
48+
@WrapOperation(method = "lambda$loadResources$3", at = @At(value = "NEW",
49+
target = "(Lnet/minecraft/core/LayeredRegistryAccess;Lnet/minecraft/core/HolderLookup$Provider;Lnet/minecraft/world/flag/FeatureFlagSet;Lnet/minecraft/commands/Commands$CommandSelection;Ljava/util/List;Lnet/minecraft/server/permissions/PermissionSet;)Lnet/minecraft/server/ReloadableServerResources;"))
50+
private static ReloadableServerResources impl$onCreateResources(
51+
final LayeredRegistryAccess<RegistryLayer> $$0, final HolderLookup.Provider $$1, final FeatureFlagSet $$2,
52+
final Commands.CommandSelection $$3, final List<?> $$4, final PermissionSet $$5,
53+
final Operation<ReloadableServerResources> original, final @Local(argsOnly = true) ResourceManager resourceManager) {
5054
final ReloadableServerResources instance = original.call($$0, $$1, $$2, $$3, $$4, $$5);
5155
if (instance.getCommands().getDispatcher() instanceof final DelegatingCommandDispatcher delegatingCommandDispatcher) {
5256
delegatingCommandDispatcher.permissionService(((ResourceManagerBridge) resourceManager).bridge$services().permissionService());

neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/world/entity/animal/SnowGolemMixin_Neo.java renamed to neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/world/entity/animal/golem/SnowGolemMixin_Neo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2323
* THE SOFTWARE.
2424
*/
25-
package org.spongepowered.neoforge.mixin.core.world.entity.animal;
25+
package org.spongepowered.neoforge.mixin.core.world.entity.animal.golem;
2626

2727
import net.minecraft.server.level.ServerLevel;
2828
import net.minecraft.world.entity.Entity;
29-
import net.minecraft.world.entity.animal.SnowGolem;
29+
import net.minecraft.world.entity.animal.golem.SnowGolem;
3030
import net.neoforged.neoforge.event.EventHooks;
3131
import org.spongepowered.asm.mixin.Mixin;
3232
import org.spongepowered.asm.mixin.injection.At;

neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/world/entity/vehicle/AbstractBoatMixin_Neo.java renamed to neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/world/entity/vehicle/boat/AbstractBoatMixin_Neo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2323
* THE SOFTWARE.
2424
*/
25-
package org.spongepowered.neoforge.mixin.core.world.entity.vehicle;
25+
package org.spongepowered.neoforge.mixin.core.world.entity.vehicle.boat;
2626

2727
import net.minecraft.core.BlockPos;
2828
import net.minecraft.world.entity.Entity;
29-
import net.minecraft.world.entity.vehicle.AbstractBoat;
29+
import net.minecraft.world.entity.vehicle.boat.AbstractBoat;
3030
import net.minecraft.world.level.LevelReader;
3131
import net.minecraft.world.level.block.Blocks;
3232
import net.minecraft.world.level.block.state.BlockState;

neoforge/src/mixins/java/org/spongepowered/neoforge/mixin/core/world/level/block/entity/AbstractFurnaceBlockEntityMixin_Neo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ public abstract class AbstractFurnaceBlockEntityMixin_Neo extends BaseContainerB
9696
final Cause cause = PhaseTracker.getInstance().currentCause();
9797
if (entity.cookingTimer == 0) { // Start
9898
final CookingEvent.Start event = SpongeEventFactory.createCookingEventStart(cause, (FurnaceBlockEntity) entityIn, Optional.of(fuel),
99-
Optional.of((CookingRecipe) recipe.value()), Optional.of((ResourceKey) (Object) recipe.id().location()));
99+
Optional.of((CookingRecipe) recipe.value()), Optional.of((ResourceKey) (Object) recipe.id().identifier()));
100100
SpongeCommon.post(event);
101101
return !event.isCancelled();
102102
} else { // Tick up
103103
final ItemStackSnapshot cooking = ItemStackUtil.snapshotOf(entity.items.getFirst());
104104
final CookingEvent.Tick event = SpongeEventFactory.createCookingEventTick(cause, (FurnaceBlockEntity) entityIn, cooking, Optional.of(fuel),
105-
Optional.of((CookingRecipe) recipe.value()), Optional.of((ResourceKey) (Object) recipe.id().location()));
105+
Optional.of((CookingRecipe) recipe.value()), Optional.of((ResourceKey) (Object) recipe.id().identifier()));
106106
SpongeCommon.post(event);
107107
return !event.isCancelled();
108108
}
@@ -122,7 +122,7 @@ public abstract class AbstractFurnaceBlockEntityMixin_Neo extends BaseContainerB
122122
final var recipe = entity.bridge$getCurrentRecipe();
123123
final ItemStackSnapshot cooking = ItemStackUtil.snapshotOf(entity.items.get(0));
124124
final CookingEvent.Tick event = SpongeEventFactory.createCookingEventTick(cause, (FurnaceBlockEntity) entityIn, cooking, Optional.of(fuel),
125-
recipe.map(r -> (CookingRecipe) r.value()), recipe.map(r -> (ResourceKey) (Object) r.id().location()));
125+
recipe.map(r -> (CookingRecipe) r.value()), recipe.map(r -> (ResourceKey) (Object) r.id().identifier()));
126126
SpongeCommon.post(event);
127127
if (event.isCancelled()) {
128128
return entity.cookingTimer; // dont tick down
@@ -182,7 +182,7 @@ public abstract class AbstractFurnaceBlockEntityMixin_Neo extends BaseContainerB
182182
}
183183
final Optional<ItemStackSnapshot> fuel = hasFuel && !slots.get(1).isEmpty() ? Optional.of(ItemStackUtil.snapshotOf(slots.get(1))) : Optional.empty();
184184
final CookingEvent.Finish event = SpongeEventFactory.createCookingEventFinish(cause, entity,
185-
fuel, Optional.of((CookingRecipe) recipe.value()), Optional.of((ResourceKey) (Object) recipe.id().location()), Collections.unmodifiableList(transactions));
185+
fuel, Optional.of((CookingRecipe) recipe.value()), Optional.of((ResourceKey) (Object) recipe.id().identifier()), Collections.unmodifiableList(transactions));
186186
SpongeCommon.post(event);
187187

188188
for (final SlotTransaction transaction : transactions) {

neoforge/src/mixins/resources/mixins.spongeneo.core.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
"world.entity.EntityMixin_Neo",
3232
"world.entity.LivingEntityMixin_Neo",
3333
"world.entity.LivingEntityMixin_Neo_Damage",
34-
"world.entity.animal.SnowGolemMixin_Neo",
34+
"world.entity.animal.golem.SnowGolemMixin_Neo",
3535
"world.entity.item.ItemEntityMixin_Neo",
3636
"world.entity.player.PlayerMixin_Neo_Damage",
3737
"world.entity.projectile.FishingHookMixin_Neo",
38-
"world.entity.vehicle.AbstractBoatMixin_Neo",
38+
"world.entity.vehicle.boat.AbstractBoatMixin_Neo",
3939
"world.level.ServerExplosionMixin_NeoForge",
4040
"world.level.block.FireBlockMixin_Neo",
4141
"world.level.block.entity.AbstractFurnaceBlockEntityMixin_Neo"

0 commit comments

Comments
 (0)