本文整理汇总了Java中net.minecraft.world.storage.WorldInfo.getSaveVersion方法的典型用法代码示例。如果您正苦于以下问题:Java WorldInfo.getSaveVersion方法的具体用法?Java WorldInfo.getSaveVersion怎么用?Java WorldInfo.getSaveVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.storage.WorldInfo
的用法示例。
在下文中一共展示了WorldInfo.getSaveVersion方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSaveList
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
public List<SaveFormatComparator> getSaveList() throws AnvilConverterException
{
if (this.savesDirectory != null && this.savesDirectory.exists() && this.savesDirectory.isDirectory())
{
List<SaveFormatComparator> list = Lists.<SaveFormatComparator>newArrayList();
File[] afile = this.savesDirectory.listFiles();
for (File file1 : afile)
{
if (file1.isDirectory())
{
String s = file1.getName();
WorldInfo worldinfo = this.getWorldInfo(s);
if (worldinfo != null && (worldinfo.getSaveVersion() == 19132 || worldinfo.getSaveVersion() == 19133))
{
boolean flag = worldinfo.getSaveVersion() != this.getSaveVersion();
String s1 = worldinfo.getWorldName();
if (StringUtils.isEmpty(s1))
{
s1 = s;
}
long i = 0L;
list.add(new SaveFormatComparator(s, s1, worldinfo.getLastTimePlayed(), i, worldinfo.getGameType(), flag, worldinfo.isHardcoreModeEnabled(), worldinfo.areCommandsAllowed()));
}
}
}
return list;
}
else
{
throw new AnvilConverterException("Unable to read or access folder where game worlds are saved!");
}
}
示例2: getSaveList
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
public List<WorldSummary> getSaveList() throws AnvilConverterException
{
if (this.savesDirectory != null && this.savesDirectory.exists() && this.savesDirectory.isDirectory())
{
List<WorldSummary> list = Lists.<WorldSummary>newArrayList();
File[] afile = this.savesDirectory.listFiles();
for (File file1 : afile)
{
if (file1.isDirectory())
{
String s = file1.getName();
WorldInfo worldinfo = this.getWorldInfo(s);
if (worldinfo != null && (worldinfo.getSaveVersion() == 19132 || worldinfo.getSaveVersion() == 19133))
{
boolean flag = worldinfo.getSaveVersion() != this.getSaveVersion();
String s1 = worldinfo.getWorldName();
if (StringUtils.isEmpty(s1))
{
s1 = s;
}
long i = 0L;
list.add(new WorldSummary(worldinfo, s, s1, 0L, flag));
}
}
}
return list;
}
else
{
throw new AnvilConverterException(I18n.translateToLocal("selectWorld.load_folder_access"));
}
}
示例3: getSaveList
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public List<WorldSummary> getSaveList() throws AnvilConverterException
{
if (this.savesDirectory != null && this.savesDirectory.exists() && this.savesDirectory.isDirectory())
{
List<WorldSummary> list = Lists.<WorldSummary>newArrayList();
File[] afile = this.savesDirectory.listFiles();
for (File file1 : afile)
{
if (file1.isDirectory())
{
String s = file1.getName();
WorldInfo worldinfo = this.getWorldInfo(s);
if (worldinfo != null && (worldinfo.getSaveVersion() == 19132 || worldinfo.getSaveVersion() == 19133))
{
boolean flag = worldinfo.getSaveVersion() != this.getSaveVersion();
String s1 = worldinfo.getWorldName();
if (StringUtils.isEmpty(s1))
{
s1 = s;
}
long i = 0L;
list.add(new WorldSummary(worldinfo, s, s1, 0L, flag));
}
}
}
return list;
}
else
{
throw new AnvilConverterException("Unable to read or access folder where game worlds are saved!");
}
}
示例4: isOldMapFormat
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
/**
* gets if the map is old chunk saving (true) or McRegion (false)
*/
public boolean isOldMapFormat(String saveName)
{
WorldInfo worldinfo = this.getWorldInfo(saveName);
return worldinfo != null && worldinfo.getSaveVersion() != this.getSaveVersion();
}
示例5: func_154334_a
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
public boolean func_154334_a(String saveName)
{
WorldInfo worldinfo = this.getWorldInfo(saveName);
return worldinfo != null && worldinfo.getSaveVersion() == 19132;
}
示例6: isConvertible
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
public boolean isConvertible(String saveName)
{
WorldInfo worldinfo = this.getWorldInfo(saveName);
return worldinfo != null && worldinfo.getSaveVersion() == 19132;
}
示例7: isConvertible
import net.minecraft.world.storage.WorldInfo; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public boolean isConvertible(String saveName)
{
WorldInfo worldinfo = this.getWorldInfo(saveName);
return worldinfo != null && worldinfo.getSaveVersion() == 19132;
}