net.minecraft.resource.ZipResourcePack Java Examples
The following examples show how to use
net.minecraft.resource.ZipResourcePack.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExistingFileHelper.java From patchwork-api with GNU Lesser General Public License v2.1 | 5 votes |
public ExistingFileHelper(Collection<Path> existingPacks, boolean enable) { this.clientResources = new ReloadableResourceManagerImpl(ResourceType.CLIENT_RESOURCES, Thread.currentThread()); this.serverData = new ReloadableResourceManagerImpl(ResourceType.SERVER_DATA, Thread.currentThread()); this.clientResources.addPack(new DefaultResourcePack("minecraft", "realms")); this.serverData.addPack(new DefaultResourcePack("minecraft")); for (Path existing : existingPacks) { File file = existing.toFile(); ResourcePack pack = file.isDirectory() ? new DirectoryResourcePack(file) : new ZipResourcePack(file); this.clientResources.addPack(pack); this.serverData.addPack(pack); } this.enable = enable; }