本文整理了Java中net.minecraft.inventory.Container.updateProgressBar()
方法的一些代码示例,展示了Container.updateProgressBar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.updateProgressBar()
方法的具体详情如下:
包路径:net.minecraft.inventory.Container
类名称:Container
方法名:updateProgressBar
暂无
代码示例来源:origin: sinkillerj/ProjectE
@Override
public void run() {
EntityPlayer player = Minecraft.getMinecraft().player;
if (player.openContainer != null && player.openContainer.windowId == msg.windowId)
{
player.openContainer.updateProgressBar(msg.propId, msg.propVal);
}
}
});
代码示例来源:origin: PrinceOfAmber/Cyclic
@Override
public void run() {
EntityPlayer player = ModCyclic.proxy.getClientPlayer();
if (player.openContainer != null) {
player.openContainer.updateProgressBar(message.fieldId, message.value);
}
}
});
代码示例来源:origin: Chisel-Team/Chisel
@Override
public void updateProgressBar(int id, int data) {
super.updateProgressBar(id, data);
if (id == 0) {
this.te.setProgress(data);
} else if (id == 1) {
te.setEnergy(data);
}
}
代码示例来源:origin: sinkillerj/ProjectE
@Override
public void run() {
EntityPlayer player = Minecraft.getMinecraft().player;
if (player.openContainer != null && player.openContainer.windowId == msg.windowId) {
//It should always be a LongContainer if it is this type of packet, if not fallback to normal update
if (player.openContainer instanceof LongContainer)
{
((LongContainer) player.openContainer).updateProgressBarLong(msg.propId, msg.propVal);
}
else
{
player.openContainer.updateProgressBar(msg.propId, (int) msg.propVal);
}
}
}
});
内容来源于网络,如有侵权,请联系作者删除!