Update to MC 1.14 / Fabric
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
//#if MC<11400
|
||||
package com.replaymod.compat.oranges17animations;
|
||||
|
||||
import com.replaymod.replay.camera.CameraEntity;
|
||||
import de.johni0702.minecraft.gui.utils.EventRegistrations;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.client.event.RenderLivingEvent;
|
||||
import net.minecraftforge.eventbus.api.EventPriority;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
//#if MC>=11300
|
||||
import net.minecraftforge.fml.ModList;
|
||||
//#else
|
||||
//$$ import net.minecraftforge.fml.common.Loader;
|
||||
//#endif
|
||||
|
||||
import static com.replaymod.core.versions.MCVer.*;
|
||||
|
||||
/**
|
||||
@@ -20,13 +16,9 @@ import static com.replaymod.core.versions.MCVer.*;
|
||||
*
|
||||
* To fix this issue, we simply cancel the RenderLivingEvent.Pre before it gets to ArmorAnimation if the entity is invisible.
|
||||
*/
|
||||
public class HideInvisibleEntities {
|
||||
public class HideInvisibleEntities extends EventRegistrations {
|
||||
private final Minecraft mc = Minecraft.getInstance();
|
||||
//#if MC>=11300
|
||||
private final boolean modLoaded = ModList.get().isLoaded("animations");
|
||||
//#else
|
||||
//$$ private final boolean modLoaded = Loader.isModLoaded("animations");
|
||||
//#endif
|
||||
private final boolean modLoaded = isModLoaded("animations");
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.HIGH)
|
||||
public void preRenderLiving(RenderLivingEvent.Pre event) {
|
||||
@@ -37,3 +29,4 @@ public class HideInvisibleEntities {
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
Reference in New Issue
Block a user