【发布时间】:2014-07-02 01:34:45
【问题描述】:
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister p_149651_1_)
{
this.field_150182_M = p_149651_1_.registerIcon(this.getTextureName() + "_" + "cross");
this.field_150183_N = p_149651_1_.registerIcon(this.getTextureName() + "_" + "line");
this.field_150184_O = p_149651_1_.registerIcon(this.getTextureName() + "_" + "cross_overlay");
this.field_150180_P = p_149651_1_.registerIcon(this.getTextureName() + "_" + "line_overlay");
this.blockIcon = this.field_150182_M;
}
@SideOnly(Side.CLIENT)
public static IIcon getRedstoneWireIcon(String p_150173_0_)
{
return p_150173_0_.equals("cross") ? ModMain.bluestoneWire.field_150182_M : (p_150173_0_.equals("line") ? ModMain.bluestoneWire.field_150183_N : (p_150173_0_.equals("cross_overlay") ? ModMain.bluestoneWire.field_150184_O : (p_150173_0_.equals("line_overlay") ? ModMain.bluestoneWire.field_150180_P : null)));
}
我正在尝试制作自定义红石类型,但我不知道如何分配纹理。我从原始红石文件中复制了代码,但我很难理解它。我的getRedstoneWireIcon() 方法在所有field_ 术语中都出现错误。就是说无法解析或者不是字段。
【问题讨论】: