22 lines
		
	
	
		
			835 B
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			835 B
		
	
	
	
		
			Java
		
	
	
	
	
	
| package fr.pandacube.lib.paper.reflect.wrapper.minecraft.world;
 | |
| 
 | |
| import fr.pandacube.lib.paper.reflect.NMSReflect;
 | |
| import fr.pandacube.lib.reflect.wrapper.ReflectWrapper;
 | |
| import fr.pandacube.lib.reflect.ReflectConstructor;
 | |
| 
 | |
| import static fr.pandacube.lib.util.ThrowableUtil.wrapEx;
 | |
| import static fr.pandacube.lib.util.ThrowableUtil.wrapReflectEx;
 | |
| 
 | |
| public class ChunkPos extends ReflectWrapper {
 | |
|     public static final NMSReflect.ClassMapping MAPPING = wrapEx(() -> NMSReflect.mojClass("net.minecraft.world.level.ChunkPos"));
 | |
|     public static final ReflectConstructor<?> CONSTRUCTOR = wrapEx(() -> MAPPING.runtimeReflect().constructor(int.class, int.class));
 | |
| 
 | |
|     public ChunkPos(int x, int z) {
 | |
|         this(wrapReflectEx(() -> CONSTRUCTOR.instantiate(x, z)));
 | |
|     }
 | |
| 
 | |
|     protected ChunkPos(Object obj) {
 | |
|         super(obj);
 | |
|     }
 | |
| }
 |