Change ItemTooltipEventHandler to be more specific about the energy value for an object and if it's not learnable/researchable
(cherry picked from commit 7d34112f0ad256ecd564c37763804f37e1d6ff63)
This commit is contained in:
parent
2aa81c0457
commit
39a3c8eef8
|
@ -35,7 +35,7 @@ public class ItemTooltipEventHandler {
|
|||
EnergyValue energyValue = EnergyValueRegistryProxy.getEnergyValue(wrappedItemStack);
|
||||
EnergyValue stackEnergyValue = EnergyValueRegistryProxy.getEnergyValueForStack(wrappedItemStack);
|
||||
|
||||
if (energyValue != null && (BlacklistRegistryProxy.isExchangeable(wrappedItemStack) || BlacklistRegistryProxy.isLearnable(wrappedItemStack))) {
|
||||
if (energyValue != null) {
|
||||
|
||||
if (wrappedItemStack.getStackSize() > 1) {
|
||||
event.toolTip.add(String.format("Exchange Energy (Item): %s", energyValue)); // TODO Localize
|
||||
|
@ -60,6 +60,14 @@ public class ItemTooltipEventHandler {
|
|||
else {
|
||||
event.toolTip.add("No Exchange Energy value"); // TODO Localize
|
||||
}
|
||||
|
||||
if (!BlacklistRegistryProxy.isLearnable(wrappedItemStack)) {
|
||||
event.toolTip.add("Not learnable"); // TODO Localize
|
||||
}
|
||||
|
||||
if (!BlacklistRegistryProxy.isExchangeable(wrappedItemStack)) {
|
||||
event.toolTip.add("Not exchangeable"); // TODO Localize
|
||||
}
|
||||
}
|
||||
|
||||
if (((Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) && (event.entityPlayer != null && event.entityPlayer.openContainer instanceof ContainerResearchStation))) {
|
||||
|
|
Loading…
Reference in New Issue