-
Notifications
You must be signed in to change notification settings - Fork 12
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
Showing
5 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
client/src/main/java/com/fox2code/foxloader/client/mixins/MixinTexturePackCustom.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,25 @@ | ||
package com.fox2code.foxloader.client.mixins; | ||
|
||
import net.minecraft.src.client.renderer.block.TexturePackCustom; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(TexturePackCustom.class) | ||
public class MixinTexturePackCustom { | ||
@Unique private Boolean compatibilityStatus; | ||
|
||
@Inject(method = "isCompatible", at = @At("HEAD"), cancellable = true) | ||
public void hotfix_isCompatibleHead(CallbackInfoReturnable<Boolean> cir) { | ||
if (this.compatibilityStatus != null) { | ||
cir.setReturnValue(this.compatibilityStatus); | ||
} | ||
} | ||
|
||
@Inject(method = "isCompatible", at = @At("RETURN")) | ||
public void hotfix_isCompatibleReturn(CallbackInfoReturnable<Boolean> cir) { | ||
this.compatibilityStatus = cir.getReturnValue(); | ||
} | ||
} |
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
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