Fix grid crash and translucent cable config
This commit is contained in:
@@ -92,6 +92,8 @@ public final class RefinedStorage {
|
||||
public int stackUpgradeUsage;
|
||||
public int interdimensionalUpgradeUsage;
|
||||
|
||||
public boolean translucentCables;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent e) {
|
||||
PROXY.preInit(e);
|
||||
@@ -144,6 +146,8 @@ public final class RefinedStorage {
|
||||
stackUpgradeUsage = config.getInt("stack", "upgrades", 12, 0, Integer.MAX_VALUE, "The additional energy used per Stack Upgrade");
|
||||
interdimensionalUpgradeUsage = config.getInt("interdimensional", "upgrades", 1000, 0, Integer.MAX_VALUE, "The additional energy used by the Interdimensional Upgrade");
|
||||
|
||||
translucentCables = config.getBoolean("translucentCables", "misc", false, "For resource pack makers that want a translucent cable");
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
|
@@ -13,6 +13,7 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.inventory.InventoryHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -336,4 +337,9 @@ public class BlockCable extends BlockCoverable {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
return RefinedStorage.INSTANCE.translucentCables ? BlockRenderLayer.TRANSLUCENT : super.getBlockLayer();
|
||||
}
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package refinedstorage.gui.grid.stack;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import joptsimple.internal.Strings;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -49,7 +50,7 @@ public class ClientStackItem implements IClientStack {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return Strings.join(stack.getTooltip(null, true), "\n");
|
||||
return Strings.join(stack.getTooltip(Minecraft.getMinecraft().thePlayer, true), "\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user