377
This commit is contained in:
parent
d18d1b820e
commit
500ff29dbd
2 changed files with 3 additions and 21 deletions
|
@ -125,5 +125,5 @@ public class TechReborn implements ModInitializer {
|
|||
|
||||
LOGGER.info("TechReborn setup done!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import net.minecraft.state.property.Property;
|
|||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.SystemUtil;
|
||||
|
||||
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import reborncore.api.power.IEnergyInterfaceTile;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.TechReborn;
|
||||
|
@ -66,12 +66,6 @@ public class ItemDebugTool extends Item {
|
|||
sendMessage(context, new TextComponent(getTileEntityType(tile)));
|
||||
if (tile instanceof IEnergyInterfaceTile) {
|
||||
sendMessage(context, new TextComponent(getRCPower((IEnergyInterfaceTile) tile)));
|
||||
} else {
|
||||
IEnergyStorage capEnergy = tile
|
||||
.getCapability(CapabilityEnergy.ENERGY, context.getPlayerHorizontalFacing()).orElseGet(null);
|
||||
if (capEnergy != null) {
|
||||
sendMessage(context, new TextComponent(getForgePower(capEnergy)));
|
||||
}
|
||||
}
|
||||
}
|
||||
return ActionResult.SUCCESS;
|
||||
|
@ -100,7 +94,7 @@ public class ItemDebugTool extends Item {
|
|||
String s = "" + ChatFormat.GREEN;
|
||||
s += "Block Registry Name: ";
|
||||
s += ChatFormat.BLUE;
|
||||
s += block.getRegistryName().toString();
|
||||
s += Registry.BLOCK.getId(block);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
@ -124,16 +118,4 @@ public class ItemDebugTool extends Item {
|
|||
|
||||
return s;
|
||||
}
|
||||
|
||||
private String getForgePower(IEnergyStorage cap) {
|
||||
String s = "" + ChatFormat.GREEN;
|
||||
s += "Power: ";
|
||||
s += ChatFormat.RED;
|
||||
s += cap.getEnergyStored();
|
||||
s += "/";
|
||||
s += cap.getMaxEnergyStored();
|
||||
s += " RF";
|
||||
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue