Stop using @SneakyThrows since it breaks the JDT used for source remap
This commit is contained in:
@@ -9,7 +9,6 @@ import com.replaymod.render.blend.data.DMesh;
|
||||
import com.replaymod.render.blend.data.DObject;
|
||||
import com.replaymod.replaystudio.us.myles.ViaVersion.util.ReflectionUtil;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Vector3f;
|
||||
import lombok.SneakyThrows;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -70,7 +69,6 @@ public class ChunkExporter implements Exporter {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public void setup() throws IOException {
|
||||
|
||||
Minecraft mc = MCVer.getMinecraft();
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.replaymod.render.blend.Exporter;
|
||||
import com.replaymod.render.blend.data.DObject;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Matrix4f;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Vector3f;
|
||||
import lombok.SneakyThrows;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -29,8 +28,7 @@ public class EntityExporter implements Exporter {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public void setup() throws IOException {
|
||||
public void setup() {
|
||||
entitiesObject = new DObject(DObject.Type.OB_EMPTY);
|
||||
entitiesObject.id.name = "Entities";
|
||||
entitiesObject.layers = 1 << 1;
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.replaymod.render.blend.Exporter;
|
||||
import com.replaymod.render.blend.data.DObject;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Matrix4f;
|
||||
import de.johni0702.minecraft.gui.utils.lwjgl.vector.Vector3f;
|
||||
import lombok.SneakyThrows;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -36,7 +35,6 @@ public class TileEntityExporter implements Exporter {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public void setup() throws IOException {
|
||||
tileEntitiesObject = new DObject(DObject.Type.OB_EMPTY);
|
||||
tileEntitiesObject.id.name = "TileEntities";
|
||||
|
||||
@@ -58,7 +58,6 @@ import io.netty.buffer.Unpooled;
|
||||
import io.netty.channel.ChannelHandler;
|
||||
import io.netty.channel.ChannelHandlerAdapter;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import lombok.SneakyThrows;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.EnumPacketDirection;
|
||||
@@ -559,7 +558,11 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
if (replayTime > currentTimeStamp) {
|
||||
activeThings.removeIf(thing -> {
|
||||
if (thing.despawnTime <= replayTime) {
|
||||
try {
|
||||
thing.despawn(this, ctx::fireChannelRead);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -568,7 +571,11 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
thingSpawnsT.subMap(currentTimeStamp, false, replayTime, true).values()
|
||||
.forEach(things -> things.forEach(thing -> {
|
||||
if (thing.despawnTime > replayTime) {
|
||||
try {
|
||||
thing.spawn(this, ctx::fireChannelRead);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
activeThings.add(thing);
|
||||
}
|
||||
}));
|
||||
@@ -578,7 +585,11 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
} else {
|
||||
activeThings.removeIf(thing -> {
|
||||
if (thing.spawnTime > replayTime) {
|
||||
try {
|
||||
thing.despawn(this, ctx::fireChannelRead);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -587,7 +598,11 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
thingDespawnsT.subMap(replayTime, false, currentTimeStamp, true).values()
|
||||
.forEach(things -> things.forEach(thing -> {
|
||||
if (thing.spawnTime <= replayTime) {
|
||||
try {
|
||||
thing.spawn(this, ctx::fireChannelRead);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
activeThings.add(thing);
|
||||
}
|
||||
}));
|
||||
@@ -701,8 +716,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
}
|
||||
|
||||
@SneakyThrows(IOException.class)
|
||||
private static List<Packet<?>> readPacketsFromCache(NetInput in) {
|
||||
private static List<Packet<?>> readPacketsFromCache(NetInput in) throws IOException {
|
||||
int size = in.readVarInt();
|
||||
List<Packet<?>> packets = new ArrayList<>(size);
|
||||
for (int i = 0; i < size; i++) {
|
||||
@@ -859,12 +873,12 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
indexDespawnPackets = in.readVarInt();
|
||||
}
|
||||
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
sender.buf.readerIndex(indexSpawnPackets);
|
||||
readPacketsFromCache(sender.bufInput).forEach(send);
|
||||
}
|
||||
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
sender.buf.readerIndex(indexDespawnPackets);
|
||||
readPacketsFromCache(sender.bufInput).forEach(send);
|
||||
}
|
||||
@@ -921,8 +935,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows(IOException.class)
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
super.spawn(sender, send);
|
||||
|
||||
sender.buf.readerIndex(index);
|
||||
@@ -938,7 +951,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
super.despawn(sender, send);
|
||||
locations = null;
|
||||
}
|
||||
@@ -1017,8 +1030,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows(IOException.class)
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
super.spawn(sender, send);
|
||||
|
||||
sender.buf.readerIndex(index);
|
||||
@@ -1042,7 +1054,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
super.despawn(sender, send);
|
||||
|
||||
blocksT = null;
|
||||
@@ -1112,8 +1124,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
|
||||
@Override
|
||||
@SneakyThrows(IOException.class)
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void spawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
super.spawn(sender, send);
|
||||
|
||||
sender.buf.readerIndex(index);
|
||||
@@ -1124,7 +1135,7 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) {
|
||||
public void despawn(QuickReplaySender sender, Consumer<Packet<?>> send) throws IOException {
|
||||
super.despawn(sender, send);
|
||||
|
||||
rainStrengths = null;
|
||||
|
||||
Reference in New Issue
Block a user