Added Core Mod to redirect the Enchantment Rendering getSystemTime() calls to a the EnchantmentTimer (glow now slows down)

This commit is contained in:
Marius Metzger
2015-03-16 01:45:36 +01:00
parent 403d896862
commit 14f53f7429
31 changed files with 549 additions and 184 deletions

View File

@@ -32,9 +32,9 @@ import eu.crushedpixel.replaymod.gui.replaystudio.GuiReplayStudio;
import eu.crushedpixel.replaymod.gui.replayviewer.GuiReplayViewer;
import eu.crushedpixel.replaymod.online.authentication.AuthenticationHandler;
import eu.crushedpixel.replaymod.registry.ReplayGuiRegistry;
import eu.crushedpixel.replaymod.replay.MCTimerHandler;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.studio.VersionValidator;
import eu.crushedpixel.replaymod.timer.MCTimerHandler;
import eu.crushedpixel.replaymod.utils.MouseUtils;
import eu.crushedpixel.replaymod.utils.ResourceHelper;
import eu.crushedpixel.replaymod.video.VideoWriter;

View File

@@ -31,9 +31,9 @@ import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.GL11;
import eu.crushedpixel.replaymod.entities.CameraEntity;
import eu.crushedpixel.replaymod.gui.GuiMouseInput;
import eu.crushedpixel.replaymod.gui.GuiReplaySpeedSlider;
import eu.crushedpixel.replaymod.gui.GuiSpectateSelection;
import eu.crushedpixel.replaymod.gui.elements.GuiMouseInput;
import eu.crushedpixel.replaymod.holders.Keyframe;
import eu.crushedpixel.replaymod.holders.Position;
import eu.crushedpixel.replaymod.holders.PositionKeyframe;

View File

@@ -8,7 +8,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
import eu.crushedpixel.replaymod.ReplayMod;
import eu.crushedpixel.replaymod.entities.CameraEntity.MoveDirection;
import eu.crushedpixel.replaymod.gui.GuiMouseInput;
import eu.crushedpixel.replaymod.gui.elements.GuiMouseInput;
import eu.crushedpixel.replaymod.registry.KeybindRegistry;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.spectate.SpectateHandler;

View File

@@ -138,6 +138,7 @@ public class RecordingHandler {
@SubscribeEvent
public void onPlayerTick(PlayerTickEvent e) {
if(!ConnectionEventHandler.isRecording()) return;
try {
if(e.player != mc.thePlayer) return;
if(!ConnectionEventHandler.isRecording()) return;
@@ -318,6 +319,7 @@ public class RecordingHandler {
@SubscribeEvent
public void onPickupItem(ItemPickupEvent event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
ConnectionEventHandler.insertPacket(new S0DPacketCollectItem(event.pickedUp.getEntityId(), entityID));
} catch(Exception e) {
@@ -327,6 +329,7 @@ public class RecordingHandler {
@SubscribeEvent
public void onRespawn(PlayerRespawnEvent event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
//destroy entity, then respawn
ConnectionEventHandler.insertPacket(new S13PacketDestroyEntities(entityID));
@@ -338,6 +341,7 @@ public class RecordingHandler {
@SubscribeEvent
public void onHurt(LivingHurtEvent event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
if(event.entity.getEntityId() != mc.thePlayer.getEntityId()) {
return;
@@ -374,6 +378,7 @@ public class RecordingHandler {
@SubscribeEvent
public void onDeath(LivingDeathEvent event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
if(event.entity.getEntityId() != mc.thePlayer.getEntityId()) {
return;
@@ -397,6 +402,7 @@ public class RecordingHandler {
@SubscribeEvent
public void onStartEating(PlayerUseItemEvent.Start event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
if(!event.entityPlayer.isEating()) return;
S0BPacketAnimation packet = new S0BPacketAnimation();
@@ -419,8 +425,8 @@ public class RecordingHandler {
@SubscribeEvent
public void onSleep(PlayerSleepInBedEvent event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
if(event.entityPlayer != mc.thePlayer) {
return;
};
@@ -449,6 +455,7 @@ public class RecordingHandler {
@SubscribeEvent
public void enterMinecart(MinecartInteractEvent event) {
if(!ConnectionEventHandler.isRecording()) return;
try {
if(event.player != mc.thePlayer) {
return;