Get rid of all the ATs in favor of Mixins

This commit is contained in:
Jonas Herzig
2019-05-06 16:53:39 +02:00
parent 2094c518a0
commit bd91d0d3bd
41 changed files with 302 additions and 778 deletions

View File

@@ -10,6 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
//#if MC>=11400
//$$ import com.replaymod.core.events.PreRenderHandCallback;
//#else
import com.replaymod.core.versions.MCVer;
import net.minecraftforge.client.ForgeHooksClient;
//#endif
@@ -20,15 +21,15 @@ import net.minecraftforge.client.ForgeHooksClient;
}, remap = false)
public abstract class MixinShadersRender {
@Inject(method = "renderHand0", at = @At("HEAD"), cancellable = true)
@Inject(method = "renderHand0", at = @At("HEAD"), cancellable = true, remap = false)
private static void replayModCompat_disableRenderHand0(GameRenderer er, float partialTicks, int renderPass, CallbackInfo ci) {
//#if MC>=11400
//$$ if (PreRenderHandCallback.EVENT.invoker().preRenderHand()) {
//#else
//#if MC>=11300
if (ForgeHooksClient.renderFirstPersonHand(er.getMinecraft().renderGlobal, partialTicks)) {
if (ForgeHooksClient.renderFirstPersonHand(MCVer.getMinecraft().renderGlobal, partialTicks)) {
//#else
//$$ if (ForgeHooksClient.renderFirstPersonHand(er.mc.renderGlobal, partialTicks, renderPass)) {
//$$ if (ForgeHooksClient.renderFirstPersonHand(MCVer.getMinecraft().renderGlobal, partialTicks, renderPass)) {
//#endif
//#endif
ci.cancel();