aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/caelo/mixin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/moe/nea/caelo/mixin')
-rw-r--r--src/main/java/moe/nea/caelo/mixin/PatchCustomItemModelCache.java37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/main/java/moe/nea/caelo/mixin/PatchCustomItemModelCache.java b/src/main/java/moe/nea/caelo/mixin/PatchCustomItemModelCache.java
index afeafef..3374768 100644
--- a/src/main/java/moe/nea/caelo/mixin/PatchCustomItemModelCache.java
+++ b/src/main/java/moe/nea/caelo/mixin/PatchCustomItemModelCache.java
@@ -16,27 +16,26 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(value = CustomItems.class, remap = false)
public class PatchCustomItemModelCache {
- @SuppressWarnings("InvalidInjectorMethodSignature")
- @Inject(method = "getCustomItemProperties", at = @At("HEAD"), cancellable = true)
- private static void overrideCustomItemProperties(
- ItemStack itemStack, int type,
- CallbackInfoReturnable<CustomItemProperties> cir) {
- OptifineCustomItemCache.retrieveCacheHit(itemStack, type, cir);
- }
+ @Inject(method = "getCustomItemProperties", at = @At("HEAD"), cancellable = true)
+ private static void overrideCustomItemProperties(
+ ItemStack itemStack, int type,
+ CallbackInfoReturnable<CustomItemProperties> cir) {
+ OptifineCustomItemCache.retrieveCacheHit(itemStack, type, cir);
+ }
- @Inject(method = "getCustomItemProperties", at = @At(value = "RETURN", ordinal = 2),
- locals = LocalCapture.CAPTURE_FAILHARD)
- private static void storeCustomItemProperties(
- ItemStack itemStack, int type, CallbackInfoReturnable<CustomItemProperties> cir,
- Item item, int itemId, CustomItemProperties[] cips, int i, CustomItemProperties cip) {
- OptifineCustomItemCache.storeCustomItemProperties(itemStack, type, cip);
- }
+ @Inject(method = "getCustomItemProperties", at = @At(value = "RETURN", ordinal = 2),
+ locals = LocalCapture.CAPTURE_FAILHARD)
+ private static void storeCustomItemProperties(
+ ItemStack itemStack, int type, CallbackInfoReturnable<CustomItemProperties> cir,
+ Item item, int itemId, CustomItemProperties[] cips, int i, CustomItemProperties cip) {
+ OptifineCustomItemCache.storeCustomItemProperties(itemStack, type, cip);
+ }
- @Inject(method = "getCustomItemProperties", at = @At(value = "RETURN", ordinal = 3))
- private static void storeCustomItemProperties(
- ItemStack itemStack, int type, CallbackInfoReturnable<CustomItemProperties> cir) {
- OptifineCustomItemCache.storeNoCustomItemProperties(itemStack, type);
- }
+ @Inject(method = "getCustomItemProperties", at = @At(value = "RETURN", ordinal = 3))
+ private static void storeCustomItemProperties(
+ ItemStack itemStack, int type, CallbackInfoReturnable<CustomItemProperties> cir) {
+ OptifineCustomItemCache.storeNoCustomItemProperties(itemStack, type);
+ }
} \ No newline at end of file