Java Code Examples for net.minecraft.world.World.getPerWorldStorage()

The following are Jave code examples for showing how to use getPerWorldStorage() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: NemesisSystem   File: NemesisRegistryProvider.java   Source Code and License Vote up 5 votes
public static INemesisRegistry get(World world) {
	MapStorage storage = world.getPerWorldStorage();
	NemesisRegistry instance = (NemesisRegistry) storage.getOrLoadData(NemesisRegistry.class, NemesisRegistry.NAME);
	if (instance == null) {
		instance = new NemesisRegistry();
		storage.setData(NemesisRegistry.NAME, instance);
	}
	return instance;
}