用户:MashKJo/1.12.2模组开发笔记/实现新维度:修订间差异

 
<code>
public class MyDim
{
public static int dimID;
public static DimensionType dimType;
public void registerDimension()
{
public static int dimID;
dimType = DimensionType.register(dimName, dimSuffix, dimID, MyDimWorldProvider.class, isKeepLoaded);
DimensionManager.registerDimension(dimID, public static DimensionType dimType);
 
public void registerDimension()
{
dimType = DimensionType.register(dimName, dimSuffix, dimID, MyDimWorldProvider.class, isKeepLoaded);
DimensionManager.registerDimension(dimID, dimType);
}
}
}
</code>
 
 
<code>
public static DimensionType register(String name, String suffix, int id, Class<? extends WorldProvider> provider, boolean keepLoaded)
{
String enum_name = name.replace(" ", "_").toLowerCase();
DimensionType ret = net.minecraftforge.common.util.EnumHelper.addEnum(DimensionType.class, enum_name, ENUM_ARGS,id, name, suffix, provider);
return ret.setLoadSpawn(keepLoaded);
}
</code>
 
行政员、​优秀编辑者、​界面管理员、​监督员、​管理员、​小部件编辑者
3,258

个编辑