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