23 lines
		
	
	
	
		
			823 B
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
	
		
			823 B
		
	
	
	
		
			Java
		
	
	
	
	
	
| package com.mojang.realmsclient.util.task;
 | |
| 
 | |
| import com.mojang.realmsclient.client.RealmsClient;
 | |
| import com.mojang.realmsclient.dto.WorldTemplate;
 | |
| import com.mojang.realmsclient.exception.RealmsServiceException;
 | |
| import net.fabricmc.api.EnvType;
 | |
| import net.fabricmc.api.Environment;
 | |
| import net.minecraft.network.chat.Component;
 | |
| 
 | |
| @Environment(EnvType.CLIENT)
 | |
| public class ResettingTemplateWorldTask extends ResettingWorldTask {
 | |
| 	private final WorldTemplate template;
 | |
| 
 | |
| 	public ResettingTemplateWorldTask(WorldTemplate template, long serverId, Component title, Runnable callback) {
 | |
| 		super(serverId, title, callback);
 | |
| 		this.template = template;
 | |
| 	}
 | |
| 
 | |
| 	@Override
 | |
| 	protected void sendResetRequest(RealmsClient client, long serverId) throws RealmsServiceException {
 | |
| 		client.resetWorldWithTemplate(serverId, this.template.id);
 | |
| 	}
 | |
| }
 |