remove broken debug

This commit is contained in:
Jesse Boyd 2019-11-01 22:56:07 +01:00
parent 822bc20c7c
commit 0c1fdcc498
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
11 changed files with 3 additions and 25 deletions

View File

@ -113,9 +113,6 @@ public class FaweBukkit implements IFawe, Listener {
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
new ChunkListener_9(); new ChunkListener_9();
} }
new TestChunkPacketSend(plugin);
}); });
} }

View File

@ -22,17 +22,12 @@ public class TestChunkPacketSend {
@Override @Override
public void onPacketSending(PacketEvent event) { public void onPacketSending(PacketEvent event) {
if (event.getPacketType() != PacketType.Play.Server.MAP_CHUNK) { if (event.getPacketType() != PacketType.Play.Server.MAP_CHUNK) {
System.out.println("Wrong packet");
return; return;
} }
PacketContainer packet = event.getPacket(); PacketContainer packet = event.getPacket();
StructureModifier<Byte> bytes = packet.getBytes(); StructureModifier<Byte> bytes = packet.getBytes();
StructureModifier<WrappedBlockData> blockData = packet.getBlockData(); StructureModifier<WrappedBlockData> blockData = packet.getBlockData();
List<WrappedBlockData> values = blockData.getValues(); List<WrappedBlockData> values = blockData.getValues();
System.out.println("Packet " + values.size() + " | " + blockData.size());
System.out.println(bytes.size());
System.out.println(packet.getByteArrays().size());
System.out.println(packet.getBlocks().size());
} }
}); });
} }

View File

@ -39,7 +39,6 @@ public interface IBlocks extends Trimable {
int mask = 0; int mask = 0;
for (int layer = 0; layer < FaweCache.IMP.CHUNK_LAYERS; layer++) { for (int layer = 0; layer < FaweCache.IMP.CHUNK_LAYERS; layer++) {
if (hasSection(layer)) { if (hasSection(layer)) {
System.out.println("Has layer 0 " + layer);
mask += (1 << layer); mask += (1 << layer);
} }
} }

View File

@ -15,8 +15,6 @@ public class BatchProcessorHolder implements IBatchProcessorHolder {
@Override @Override
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) { public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
System.out.println("Process set");
System.out.println(getProcessor());
return getProcessor().processSet(chunk, get, set); return getProcessor().processSet(chunk, get, set);
} }
@ -27,6 +25,7 @@ public class BatchProcessorHolder implements IBatchProcessorHolder {
@Override @Override
public String toString() { public String toString() {
return super.toString() + "{" + getProcessor() + "}"; IBatchProcessor tmp = getProcessor();
return super.toString() + "{" + (tmp == this ? "" : getProcessor()) + "}";
} }
} }

View File

@ -37,7 +37,6 @@ public interface IBatchProcessorHolder extends IBatchProcessor {
@Override @Override
default IBatchProcessor join(IBatchProcessor other) { default IBatchProcessor join(IBatchProcessor other) {
setProcessor(getProcessor().join(other)); setProcessor(getProcessor().join(other));
System.out.println("Join " + other + " | " + getProcessor());
return this; return this;
} }

View File

@ -56,14 +56,11 @@ public class MultiBatchProcessor implements IBatchProcessor {
@Override @Override
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) { public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
try { try {
System.out.println("Processes len " + this.processors.length);
for (IBatchProcessor processor : this.processors) { for (IBatchProcessor processor : this.processors) {
set = processor.processSet(chunk, get, set); set = processor.processSet(chunk, get, set);
if (set == null) { if (set == null) {
System.out.println("Return null " + processor.getClass());
return null; return null;
} }
System.out.println("Process " + processor.getClass());
} }
return set; return set;
} catch (Throwable e) { } catch (Throwable e) {

View File

@ -11,7 +11,6 @@ public enum NullProcessor implements IBatchProcessor {
INSTANCE; INSTANCE;
@Override @Override
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) { public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
System.out.println("Null process " + chunk.getX() + "," + chunk.getZ());
return null; return null;
} }

View File

@ -89,8 +89,6 @@ public class SingleThreadQueueExtent extends BatchProcessorHolder implements IQu
*/ */
protected synchronized void reset() { protected synchronized void reset() {
if (!this.initialized) return; if (!this.initialized) return;
System.out.println("Reset");
new Exception().printStackTrace();
checkThread(); checkThread();
if (!this.chunks.isEmpty()) { if (!this.chunks.isEmpty()) {
for (IChunk chunk : this.chunks.values()) { for (IChunk chunk : this.chunks.values()) {
@ -130,7 +128,6 @@ public class SingleThreadQueueExtent extends BatchProcessorHolder implements IQu
@Override @Override
public Extent addProcessor(IBatchProcessor processor) { public Extent addProcessor(IBatchProcessor processor) {
join(processor); join(processor);
System.out.println("Add processor " + this.getClass());
return this; return this;
} }
@ -339,7 +336,6 @@ public class SingleThreadQueueExtent extends BatchProcessorHolder implements IQu
chunks.clear(); chunks.clear();
} }
pollSubmissions(0, true); pollSubmissions(0, true);
System.out.println(submissions.size());
} }
@Override @Override

View File

@ -47,7 +47,6 @@ public class VisualExtent extends AbstractDelegateExtent {
@Override @Override
public Operation commit() { public Operation commit() {
IQueueExtent queue = (IQueueExtent) getExtent(); IQueueExtent queue = (IQueueExtent) getExtent();
System.out.println("Send block updates");
return null; return null;
} }
@ -59,7 +58,6 @@ public class VisualExtent extends AbstractDelegateExtent {
public void clear() { public void clear() {
IQueueExtent queue = (IQueueExtent) getExtent(); IQueueExtent queue = (IQueueExtent) getExtent();
System.out.println("Clear");
queue.cancel(); queue.cancel();
} }
} }

View File

@ -155,7 +155,6 @@ public class RegionCommands {
editSession.addProcessor(new ChunkSendProcessor(world, () -> Stream.of(player))); editSession.addProcessor(new ChunkSendProcessor(world, () -> Stream.of(player)));
editSession.addProcessor(NullProcessor.INSTANCE); editSession.addProcessor(NullProcessor.INSTANCE);
editSession.setBlocks(region, pattern); editSession.setBlocks(region, pattern);
System.out.println("Done");
} }
@Command( @Command(

View File

@ -247,7 +247,7 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
@Override @Override
public String toString() { public String toString() {
return super.toString() + ":" + extent.toString(); return super.toString() + ":" + (extent == this ? "" : extent.toString());
} }
@Override @Override