Added extra debugging info.
This commit is contained in:
@ -18,6 +18,7 @@ public class OnBlockBreakEventHandler {
|
||||
@SubscribeEvent
|
||||
public void OnBlockBreakEvent(BlockEvent.BreakEvent event) {
|
||||
Instant start = Instant.now();
|
||||
boolean usedCache = true;
|
||||
float xpToDrop = event.getExpToDrop();
|
||||
|
||||
// Get Block id
|
||||
@ -34,6 +35,8 @@ public class OnBlockBreakEventHandler {
|
||||
}
|
||||
|
||||
if (operations == null) {
|
||||
usedCache = false;
|
||||
|
||||
// Calculate operations
|
||||
operations = OperationUtils.calculateOperationList(
|
||||
block_id,
|
||||
@ -55,6 +58,7 @@ public class OnBlockBreakEventHandler {
|
||||
if (Config.Server.debugExtra.get()) {
|
||||
XpTools.LOGGER.debug("Completed block break event:");
|
||||
XpTools.LOGGER.debug("\tOperations: {}", operations);
|
||||
XpTools.LOGGER.debug("\tUsed cache: {}", usedCache);
|
||||
XpTools.LOGGER.debug("\tTime taken (nano seconds): {}", Duration.between(start, Instant.now()).toNanos());
|
||||
XpTools.LOGGER.debug("\tXP: {} -> {}", event.getExpToDrop(), xpToDrop);
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ public class OnLivingExperienceDropEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onLivingExperienceDropEvent(LivingExperienceDropEvent event) {
|
||||
Instant start = Instant.now();
|
||||
boolean usedCache = true;
|
||||
float xpToDrop = event.getDroppedExperience();
|
||||
|
||||
// Get Entity id
|
||||
@ -34,6 +35,8 @@ public class OnLivingExperienceDropEventHandler {
|
||||
}
|
||||
|
||||
if (operations == null) {
|
||||
usedCache = false;
|
||||
|
||||
// Calculate operations
|
||||
operations = OperationUtils.calculateOperationList(
|
||||
entity_id,
|
||||
@ -55,6 +58,7 @@ public class OnLivingExperienceDropEventHandler {
|
||||
if (Config.Server.debugExtra.get()) {
|
||||
XpTools.LOGGER.debug("Completed entity kill event:");
|
||||
XpTools.LOGGER.debug("\tOperations: {}", operations);
|
||||
XpTools.LOGGER.debug("\tUsed cache: {}", usedCache);
|
||||
XpTools.LOGGER.debug("\tTime taken (nano seconds): {}", Duration.between(start, Instant.now()).toNanos());
|
||||
XpTools.LOGGER.debug("\tXP: {} -> {}", event.getDroppedExperience(), xpToDrop);
|
||||
}
|
||||
|
Reference in New Issue
Block a user