From 8f88a19e8e0aa6d6f96b5fecd17e766b5492e6ec Mon Sep 17 00:00:00 2001 From: "Rob \"N3X15\" Nelson" Date: Wed, 27 Apr 2011 09:50:19 -0700 Subject: [PATCH] Mark BB-10 fixed, also add in more informative logs so people know why the chest won't roll back correctly. --- pom.xml | 8 +++++++- .../me/taylorkelly/bigbrother/datablock/DeltaChest.java | 9 +++++++-- .../java/me/taylorkelly/bigbrother/tests/TestUtils.java | 6 ------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index c458727..11ea8fb 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,12 @@ http://ci.nexisonline.net:8080/nexus/content/groups/public/ + + + bukkit-plugins + http://repo.bukkit.org/artifactory/plugins-release + + @@ -98,7 +104,7 @@ gitdescribe-maven-plugin 1.3 - BigBrother- + git-BigBrother- diff --git a/src/main/java/me/taylorkelly/bigbrother/datablock/DeltaChest.java b/src/main/java/me/taylorkelly/bigbrother/datablock/DeltaChest.java index a20a4e6..48c0001 100644 --- a/src/main/java/me/taylorkelly/bigbrother/datablock/DeltaChest.java +++ b/src/main/java/me/taylorkelly/bigbrother/datablock/DeltaChest.java @@ -57,12 +57,13 @@ public static String getInventoryDelta(ItemStack[] orig, ItemStack[] latest) { return builder.toString(); } - public static DeltaEntry[] processDeltaStream(int chestCapacity,String data) { + public static DeltaEntry[] processDeltaStream(int chestCapacity, String data) { data=data.substring(1); DeltaEntry[] de = new DeltaEntry[chestCapacity]; for(int i = 0;i chestCapacity-1) { - BBLogging.debug("Skipping slot #"+e.Slot+", not enough room in chest."); + BBLogging.debug("Skipping slot #"+e.Slot+", not enough room in chest. ("+e.Slot+" > "+chestCapacity+")"); + numskipped++; } else { de[e.Slot]=e; } } + if(numskipped>0) + BBLogging.warning("Skipped "+numskipped+" slots because there's not enough room in the chest."); + return de; } public static class DeltaEntry { diff --git a/src/test/java/me/taylorkelly/bigbrother/tests/TestUtils.java b/src/test/java/me/taylorkelly/bigbrother/tests/TestUtils.java index daaa1fb..ad1111c 100644 --- a/src/test/java/me/taylorkelly/bigbrother/tests/TestUtils.java +++ b/src/test/java/me/taylorkelly/bigbrother/tests/TestUtils.java @@ -1,11 +1,5 @@ package me.taylorkelly.bigbrother.tests; -import java.io.File; - -import me.taylorkelly.bigbrother.BBLogging; -import net.minecraft.server.ChunkCoordinates; -import net.minecraft.server.ServerNBTManager; -import net.minecraft.server.WorldManager; import net.minecraft.server.WorldServer; import org.bukkit.World;