本文整理了Java中net.minecraft.world.WorldType.canBeCreated()
方法的一些代码示例,展示了WorldType.canBeCreated()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorldType.canBeCreated()
方法的具体详情如下:
包路径:net.minecraft.world.WorldType
类名称:WorldType
方法名:canBeCreated
暂无
代码示例来源:origin: superckl/BiomeTweaker
private boolean canSelectCurWorldType()
{
final WorldType worldtype = WorldType.WORLD_TYPES[this.selectedIndex];
if (worldtype != null && worldtype.canBeCreated())
return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? GuiScreen.isShiftKeyDown() : true;
else
return false;
}
代码示例来源:origin: jabelar/ExampleMod-1.12
/**
* Returns whether the currently-selected world type is actually acceptable for selection
* Used to hide the "debug" world type unless the shift key is depressed.
*/
private boolean canSelectCurWorldType()
{
WorldType worldtype = WorldType.WORLD_TYPES[selectedIndex];
if (worldtype != null && worldtype.canBeCreated())
{
return worldtype == WorldType.DEBUG_ALL_BLOCK_STATES ? isShiftKeyDown() : true;
}
else
{
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!