5257a41Merge branch 1.10.2 into 1.11689f897Merge branch 1.9.4 into 1.10.20aed9c3Merge branch 1.8.9 into 1.9.4f36ebf1Merge branch 1.8 into 1.8.908170b3Downgrade FG to 2.1 because FG 2.2 is 1.9+ only41d2547Update translations00e999fFix replay not being closed when opened via URI scheme handler (fixes #92)767ea29Fix book gui not being suppressed during replay (fixes #90)5b04edbHide ReplayMod app entry from menus on Linux6aff99dFix livelock during netty write to embedded channel (fixes #85)703805fFix infinite loop in mc.scheduledTasks (fixes #86)7a4440cUpdate ReplayStudio0b9c56cFix resource packs not working after first time jumping back in time933ee5f[Compat] Fix camera entity with BetterSprinting prior to 2.0.0 (fixes #78)83b1090Fix hotbar being visible while spectating player (fixes #83)5c73117[Compat] Fix invisible entities with Orange's 1.7 Animations (fixes #78)4704b29Replace the RenderPlayer hook (used subclassing) with a mixin (fixes #79)0c226b0Fix path at end of replay resulting in constant reloading (fixes #56)1b9b13eRename render success sound to all lowercase (required for 1.11) (fixes #66)c2000b3Fix only front-facing chunks visible for ODS rendering (fixes #67)aafeeccFix initial login gui not closing on success (fixes #68)9292addUse percent-encoding for replay file names (fixes #71)8499c0fFix name of invis armor stand with CustomNameVisible not rendering (fixes #72)b9ea572Try to handle invalid ffmpeg arguments more gracefully (fixes #77)a2f8c88Fix compression packets being recorded (fixes #80)19629c3Replace usages of System.out with loggerfe1d9b8Stop Forge from allowing the mod to load on other MC versions (fixes #82)d56fa9bUpdate ReplayStudio/MCProtocolLib (Fixes missing ARMOR_STAND MobType)7c719e0Update ReplayStudio/MCProtocolLib (Fixes missing ARMOR_STAND MobType)1a1e96cFix server with RM installed refusing clients without RM (fixes #76)35eb9caReplace usage of FMLLog with the mod logger
29 lines
1.2 KiB
Java
29 lines
1.2 KiB
Java
package com.replaymod.compat.oranges17animations;
|
|
|
|
import com.replaymod.replay.camera.CameraEntity;
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraftforge.client.event.RenderLivingEvent;
|
|
import net.minecraftforge.fml.common.Loader;
|
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|
|
|
/**
|
|
* Orange seems to have copied vast parts of the RendererLivingEntity into their ArmorAnimation class which cancels the RenderLivingEvent.Pre and calls its own code instead.
|
|
* This breaks our mixin which assures that, even though the camera is in spectator mode, it cannot see invisible entities.
|
|
*
|
|
* To fix this issue, we simply cancel the RenderLivingEvent.Pre before it gets to ArmorAnimation if the entity is invisible.
|
|
*/
|
|
public class HideInvisibleEntities {
|
|
private final Minecraft mc = Minecraft.getMinecraft();
|
|
private final boolean modLoaded = Loader.isModLoaded("animations");
|
|
|
|
@SubscribeEvent(priority = EventPriority.HIGH)
|
|
public void preRenderLiving(RenderLivingEvent.Pre event) {
|
|
if (modLoaded) {
|
|
if (mc.player instanceof CameraEntity && event.getEntity().isInvisible()) {
|
|
event.setCanceled(true);
|
|
}
|
|
}
|
|
}
|
|
}
|