Skip to content

Commit

Permalink
add multiversioning
Browse files Browse the repository at this point in the history
  • Loading branch information
MicrocontrollersDev committed Jul 16, 2024
1 parent c37af0e commit cac72fc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

@Mixin(value = ForgeBlockStateV1.Variant.Deserializer.class, remap = false)
public class ForgeBlockStateV1Mixin_OptimizeTransforms {
//#if MC==10809
@Redirect(method = "deserialize(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lnet/minecraftforge/client/model/ForgeBlockStateV1$Variant;", at = @At(value = "NEW", target = "net/minecraftforge/client/model/TRSRTransformation"))
private TRSRTransformation patcher$from(ModelRotation rotation) {
return TRSRTransformationHook.from(rotation);
}
//#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@

@Mixin(value = ForgeHooksClient.class, remap = false)
public abstract class ForgeHooksClientMixin_OptimizeTransforms {
//#if MC==10809
@SuppressWarnings("deprecation")
@Redirect(method = "applyTransform(Lnet/minecraft/client/renderer/block/model/ItemTransformVec3f;Lcom/google/common/base/Optional;)Lcom/google/common/base/Optional;", at = @At(value = "NEW", target = "net/minecraftforge/client/model/TRSRTransformation"))
private static TRSRTransformation patcher$from(ItemTransformVec3f transform) {
return TRSRTransformationHook.from(transform);
}
//#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

@Mixin(value = TRSRTransformation.class, remap = false)
public class TRSRTransformationMixin_OptimizeTransforms {
//#if MC==10809
@Shadow
@Final
private static TRSRTransformation identity;
Expand Down Expand Up @@ -37,4 +38,5 @@ public class TRSRTransformationMixin_OptimizeTransforms {
cir.setReturnValue(transform);
}
}
//#endif
}

0 comments on commit cac72fc

Please sign in to comment.