Use callback-style events throughout all versions
Removes the need for //#if statements on each and every event handler. Instead we now always use the equivalent Callback and have one central 1.12.2 class which forwards Forge events to the callbacks.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.replaymod.render.hooks;
|
||||
|
||||
import com.replaymod.core.events.PreRenderHandCallback;
|
||||
import com.replaymod.core.versions.MCVer;
|
||||
import com.replaymod.render.RenderSettings;
|
||||
import com.replaymod.render.capturer.CaptureData;
|
||||
@@ -15,7 +16,6 @@ import net.minecraft.client.util.math.MatrixStack;
|
||||
//#if MC>=11400
|
||||
import com.replaymod.core.events.PostRenderCallback;
|
||||
import com.replaymod.core.events.PreRenderCallback;
|
||||
import com.replaymod.core.events.PreRenderHandCallback;
|
||||
//#else
|
||||
//#if MC>=11400
|
||||
//$$ import net.minecraftforge.fml.hooks.BasicEventHooks;
|
||||
@@ -41,9 +41,7 @@ public class EntityRendererHandler extends EventRegistrations implements WorldRe
|
||||
this.settings = settings;
|
||||
this.renderInfo = renderInfo;
|
||||
|
||||
//#if MC>=11400
|
||||
on(PreRenderHandCallback.EVENT, () -> omnidirectional);
|
||||
//#endif
|
||||
|
||||
((IEntityRenderer) mc.gameRenderer).replayModRender_setHandler(this);
|
||||
register();
|
||||
|
||||
Reference in New Issue
Block a user