make StatementParameterItemStacks override the description and output the item stack desc
This commit is contained in:
parent
b59ce91945
commit
bcb2a40fa5
2 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@ Additions:
|
|||
* Gates:
|
||||
* Gate recipes now show up in NEI properly (asie)
|
||||
* Light Sensor expansion for detecting brightness in front of a gate (asie)
|
||||
* Gate statement parameters now display the item stack information (asie)
|
||||
* Pipes:
|
||||
* Massive optimizations - up to 3x less server-intensive (asie, Player)
|
||||
* Improvements to Stripes Pipes:
|
||||
|
@ -46,3 +47,4 @@ APIs:
|
|||
Breaking changes:
|
||||
* Item pipes may no longer be connected to the front of the Mining Well or Quarry.
|
||||
* Behaviour change: robots now always output to item/fluid pipes, not item/fluid containers
|
||||
* Lists are no longer recursive
|
||||
|
|
|
@ -3,6 +3,7 @@ package buildcraft.core.lib.gui;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import buildcraft.api.statements.StatementParameterItemStack;
|
||||
|
||||
/**
|
||||
* Created by asie on 1/24/15.
|
||||
|
@ -28,7 +29,8 @@ public abstract class StatementParameterSlot extends AdvancedSlot {
|
|||
public String getDescription() {
|
||||
IStatementParameter parameter = getParameter();
|
||||
|
||||
if (parameter != null) {
|
||||
// HACK: We're explicitly returning null so that the item stack description is used.
|
||||
if (parameter != null && !(parameter instanceof StatementParameterItemStack)) {
|
||||
return parameter.getDescription() != null ? parameter.getDescription() : "";
|
||||
} else {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue