-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6c48a1
commit 31db5bc
Showing
5 changed files
with
37 additions
and
46 deletions.
There are no files selected for viewing
44 changes: 0 additions & 44 deletions
44
...n/java/com/github/dimadencep/mods/rrls/mixins/compat/ClientCommonNetworkHandlerMixin.java
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
...in/java/com/github/dimadencep/mods/rrls/mixins/compat/ServerResourcePackManagerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.github.dimadencep.mods.rrls.mixins.compat; | ||
|
||
import com.github.dimadencep.mods.rrls.Rrls; | ||
import net.minecraft.client.resource.server.PackStateChangeCallback; | ||
import net.minecraft.client.resource.server.ServerResourcePackManager; | ||
import org.spongepowered.asm.mixin.Final; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
import java.util.UUID; | ||
|
||
@Mixin(ServerResourcePackManager.class) | ||
public class ServerResourcePackManagerMixin { | ||
@Shadow | ||
@Final | ||
PackStateChangeCallback stateChangeCallback; | ||
|
||
@Inject( | ||
method = "onAdd", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lnet/minecraft/client/resource/server/ServerResourcePackManager;onPackChanged()V" | ||
) | ||
) | ||
public void earlyResourcePackStatusSend(UUID id, ServerResourcePackManager.PackEntry pack, CallbackInfo ci) { | ||
if (Rrls.MOD_CONFIG.earlyPackStatusSend) { | ||
this.stateChangeCallback.onFinish(pack.id, PackStateChangeCallback.FinishState.APPLIED); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
accessWidener v2 named | ||
accessible field net/minecraft/client/resource/server/ServerResourcePackManager$PackEntry id Ljava/util/UUID; | ||
accessible field net/minecraft/client/MinecraftClient overlay Lnet/minecraft/client/gui/screen/Overlay; | ||
accessible class net/minecraft/client/resource/server/ServerResourcePackManager$PackEntry | ||
accessible class net/minecraft/client/MinecraftClient$LoadingContext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters