Skip to content

Commit 1fe87fe

Browse files
committed
Debug clean up
1 parent 3d411d2 commit 1fe87fe

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

src/main/java/world/bentobox/boxed/listeners/NewAreaListener.java

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -153,21 +153,16 @@ private void runStructurePrinter() {
153153
* Build something in the queue. Structures are built one by one
154154
*/
155155
private void buildStructure() {
156-
//BentoBox.getInstance().logDebug("buildStructure");
157156
// Only kick off a build if there is something to build and something isn't
158157
// already being built
159158
if (!pasting && !itemsToBuild.isEmpty()) {
160159
// Build item
161-
//BentoBox.getInstance().logDebug("Build item");
162160
StructureRecord item = itemsToBuild.poll();
163161
placeStructure(item);
164-
} else {
165-
//BentoBox.getInstance().logDebug("Nothing to do");
166162
}
167163
}
168164

169165
private void placeStructure(StructureRecord item) {
170-
//BentoBox.getInstance().logDebug("Placing structure");
171166
// Set the semaphore - only paste one at a time
172167
pasting = true;
173168
// Place the structure - this cannot be done async
@@ -231,14 +226,13 @@ public void onChunkLoad(ChunkLoadEvent e) {
231226
if (!(addon.inWorld(chunk.getWorld()))) {
232227
return;
233228
}
234-
//BentoBox.getInstance().logDebug(e.getEventName());
235229
Pair<Integer, Integer> chunkCoords = new Pair<Integer, Integer>(chunk.getX(), chunk.getZ());
236230
if (pending.containsKey(chunkCoords)) {
237231
Iterator<StructureRecord> it = pending.get(chunkCoords).iterator();
238232
while (it.hasNext()) {
239233
StructureRecord item = it.next();
240234
if (item.location().getWorld().equals(e.getWorld())) {
241-
//BentoBox.getInstance().logDebug("Placing structure in itemsToBuild " + item);
235+
// Placing structure in itemsToBuild
242236
this.itemsToBuild.add(item);
243237
it.remove();
244238
}
@@ -247,8 +241,6 @@ public void onChunkLoad(ChunkLoadEvent e) {
247241
ToBePlacedStructures tbd = new ToBePlacedStructures();
248242
tbd.setReadyToBuild(pending);
249243
toPlace.saveObjectAsync(tbd);
250-
} else {
251-
//BentoBox.getInstance().logDebug("Nothing to build in this chunk");
252244
}
253245
}
254246

@@ -394,7 +386,7 @@ private void place(ConfigurationSection section, Location center, Environment en
394386
int y = Integer.parseInt(coords[1].strip());
395387
int z = Integer.parseInt(coords[2].strip()) + center.getBlockZ();
396388
Location location = new Location(world, x, y, z);
397-
//BentoBox.getInstance().logDebug("Structure " + name + " will be placed at " + location);
389+
// Structure will be placed at location
398390
readyToBuild.computeIfAbsent(new Pair<>(x >> 4, z >> 4), k -> new ArrayList<>())
399391
.add(new StructureRecord(name, "minecraft:" + name, location, rotation, mirror, noMobs));
400392
this.itemsToBuild
@@ -411,8 +403,6 @@ private void place(ConfigurationSection section, Location center, Environment en
411403
return list1;
412404
}));
413405

414-
//BentoBox.getInstance().logDebug("mergedMap size = " + mergedMap.size());
415-
//BentoBox.getInstance().logDebug("readyToBuild size = " + readyToBuild.size());
416406
// Save the list
417407
tbd.setReadyToBuild(mergedMap);
418408
toPlace.saveObjectAsync(tbd);
@@ -520,7 +510,6 @@ private static void processJigsaw(Block b, StructureRotation structureRotation,
520510
spawnMob(b, bjb);
521511
}
522512
} catch (Exception e) {
523-
BentoBox.getInstance().logDebug("We have an error");
524513
e.printStackTrace();
525514
}
526515
}
@@ -553,17 +542,12 @@ private static void spawnMob(Block b, BoxedJigsawBlock bjb) {
553542
} else if (bjb.getPool().contains("villagers")) {
554543
type = EntityType.VILLAGER;
555544
}
556-
// if (type == null) {
557-
// BentoBox.getInstance().logDebug(bjb.getPool());
558-
// }
559545
// Spawn it
560546
if (type != null) {
561547
Entity e = b.getWorld().spawnEntity(b.getRelative(BlockFace.UP).getLocation(), type);
562548
if (e != null) {
563549
e.setPersistent(true);
564550
}
565-
// BentoBox.getInstance().logDebug("Spawned a " + type + " at " +
566-
// b.getRelative(BlockFace.UP).getLocation());
567551
}
568552
}
569553

@@ -650,12 +634,10 @@ private static String nmsData(Block block) {
650634

651635
private ToBePlacedStructures loadToDos() {
652636
if (!toPlace.objectExists(TODO)) {
653-
//BentoBox.getInstance().logDebug("No TODO list");
654637
return new ToBePlacedStructures();
655638
}
656639
ToBePlacedStructures list = toPlace.loadObject(TODO);
657640
if (list == null) {
658-
//BentoBox.getInstance().logDebug("TODO list is null");
659641
return new ToBePlacedStructures();
660642
}
661643
if (!list.getReadyToBuild().isEmpty()) {

src/main/java/world/bentobox/boxed/nms/AbstractMetaData.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ public abstract class AbstractMetaData {
1515
public abstract String nmsData(Block block);
1616

1717
protected String getData(TileEntity te, String method, String field) {
18-
/*
19-
for (Method m : te.getClass().getMethods()) {
20-
BentoBox.getInstance().logDebug(m.getName() + " returns " + m.getReturnType() + " and has these parameters "
21-
+ m.getParameterTypes());
22-
}
23-
te.getUpdateTag();
24-
*/
2518
try {
2619
// Check if the method 'j' exists
2720
Method updatePacketMethod = te.getClass().getDeclaredMethod(method);

0 commit comments

Comments
 (0)