From 61ef61058cc89cc13d5f51f5675271b879eb1718 Mon Sep 17 00:00:00 2001 From: Sunstrike Date: Tue, 10 Dec 2013 01:36:17 +0000 Subject: [PATCH] Change to new Mantle DebugData --- build.properties | 2 +- .../tconstruct/blocks/logic/SmelteryLogic.java | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build.properties b/build.properties index fd3d8948..7e589efe 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ minecraft_version=1.6.4 forge_version=9.11.1.964 -mantle_version=b4348c +mantle_version=caa5f6 FMP_version=1.0.0.211 CCLIB_version=1.0.0.44 NEI_version=1.6.1.5_d1 diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index 8d72192e..9f21e897 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -1,9 +1,8 @@ package tconstruct.blocks.logic; -import java.util.ArrayList; -import java.util.List; -import java.util.Random; +import java.util.*; +import mantle.debug.DebugData; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; @@ -30,6 +29,7 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidTank; +import org.apache.commons.lang3.ArrayUtils; import tconstruct.common.TRepo; import tconstruct.inventory.SmelteryContainer; import mantle.blocks.abstracts.InventoryLogic; @@ -1153,10 +1153,12 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci this.needsUpdate = true; } + // IDebuggable @Override - public void sendDebugToPlayer(EntityPlayer player) { - super.sendDebugToPlayer(player); - player.addChatMessage("[SmelteryLogic] layers: " + layers + ", liquid: " + currentLiquid + "/" + maxLiquid + ", direction: " + direction); - player.addChatMessage("[SmelteryLogic] inUse: " + inUse + ", tick: " + tick); + public DebugData getDebugInfo(EntityPlayer player) { + List str = new ArrayList(Arrays.asList(super.getDebugInfo(player).strings)); + str.add("layers: " + layers + ", liquid: " + currentLiquid + "/" + maxLiquid + ", direction: " + direction); + str.add("inUse: " + inUse + ", tick: " + tick); + return new DebugData(player, getClass(), str.toArray(new String[str.size()])); } }