mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-14 19:25:23 -05:00
Mixin fixes
This commit is contained in:
parent
240d8ab775
commit
09f7993b17
5 changed files with 13 additions and 13 deletions
|
@ -110,7 +110,7 @@ public abstract class MixinCreativePlayerInventoryGui extends AbstractPlayerInve
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "init", at = @At("RETURN"))
|
||||
@Inject(method = "init", at = @At("RETURN"), remap = false)
|
||||
private void init(CallbackInfo info) {
|
||||
fabric_updateSelection();
|
||||
|
||||
|
|
|
@ -29,10 +29,10 @@ import java.util.stream.Stream;
|
|||
public class MixinEntityTracker implements EntityTrackerStreamAccessor {
|
||||
@Shadow
|
||||
@Final
|
||||
private Set<ServerPlayerEntity> field_18250;
|
||||
private Set<ServerPlayerEntity> playersTracking;
|
||||
|
||||
@Override
|
||||
public Stream<ServerPlayerEntity> fabric_getTrackingPlayers() {
|
||||
return field_18250.stream();
|
||||
return playersTracking.stream();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,11 +32,11 @@ import java.util.stream.Stream;
|
|||
public class MixinThreadedAnvilChunkStorage implements EntityTrackerStorageAccessor {
|
||||
@Shadow
|
||||
@Final
|
||||
private Int2ObjectMap<EntityTrackerStreamAccessor> field_18242;
|
||||
private Int2ObjectMap<EntityTrackerStreamAccessor> entityTrackers;
|
||||
|
||||
@Override
|
||||
public Stream<ServerPlayerEntity> fabric_getTrackingPlayers(Entity entity) {
|
||||
EntityTrackerStreamAccessor accessor = field_18242.get(entity.getEntityId());
|
||||
EntityTrackerStreamAccessor accessor = entityTrackers.get(entity.getEntityId());
|
||||
return accessor != null ? accessor.fabric_getTrackingPlayers() : Stream.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,10 +33,10 @@ import java.io.File;
|
|||
@Mixin(MinecraftServer.class)
|
||||
public class MixinMinecraftServer {
|
||||
@Shadow
|
||||
private ResourcePackContainerManager<ResourcePackContainer> field_4595;
|
||||
private ResourcePackContainerManager<ResourcePackContainer> resourcePackContainerManager;
|
||||
|
||||
@Inject(method = "method_3800", at = @At(value = "INVOKE", target = "Lnet/minecraft/resource/ResourcePackContainerManager;addCreator(Lnet/minecraft/resource/ResourcePackCreator;)V", ordinal = 1))
|
||||
public void method_3800(File file, LevelProperties properties, CallbackInfo info) {
|
||||
field_4595.addCreator(new ModResourcePackCreator(ResourceType.DATA));
|
||||
resourcePackContainerManager.addCreator(new ModResourcePackCreator(ResourceType.DATA));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,15 +32,15 @@ import java.util.concurrent.Executor;
|
|||
@Mixin(ReloadableResourceManagerImpl.class)
|
||||
public class MixinReloadableResourceManagerImplClient {
|
||||
@Shadow
|
||||
private List<ResourceReloadListener> field_17935;
|
||||
private List<ResourceReloadListener> listeners;
|
||||
@Shadow
|
||||
private List<ResourceReloadListener> field_17936;
|
||||
private List<ResourceReloadListener> initialListeners;
|
||||
@Shadow
|
||||
private ResourceType type;
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "createReloadHandler")
|
||||
public void createReloadHandler(Executor executor_1, Executor executor_2, CompletableFuture<Void> completableFuture_1, CallbackInfoReturnable<ResourceReloadHandler> callback) {
|
||||
ResourceManagerHelperImpl.sort(type, field_17935);
|
||||
ResourceManagerHelperImpl.sort(type, field_17936);
|
||||
@Inject(at = @At("HEAD"), method = "beginInitialMonitoredReload")
|
||||
public void createReloadHandler(Executor executor_1, Executor executor_2, CompletableFuture<Void> completableFuture_1, CallbackInfoReturnable<ResourceReloadMonitor> callback) {
|
||||
ResourceManagerHelperImpl.sort(type, listeners);
|
||||
ResourceManagerHelperImpl.sort(type, initialListeners);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue