Fix templates errors pre-1.21.6
Signed-off-by: Irmo van den Berge <irmo.vandenberge@ziggo.nl>
This commit is contained in:
1 parent
27c11df76c
commit
ea2f7cd6ba
3 files changed
+12
-9
No files matched your search
+1
@@ -7,6 +7,7 @@ import com.bergerkiller.mountiplex.reflection.declarations.Template;
|
||||
* To access members without creating a handle type, use the static {@link #T} member.
|
||||
* New handles can be created from raw instances using {@link #createHandle(Object)}.
|
||||
*/
|
||||
@Template.Optional
|
||||
@Template.InstanceType("net.minecraft.util.ProblemReporter")
|
||||
public abstract class ProblemReporterHandle extends Template.Handle {
|
||||
/** @see ProblemReporterClass */
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package net.minecraft.util;
|
||||
import com.bergerkiller.generated.net.minecraft.util.ProblemReporterHandle;
|
||||
|
||||
// Since 1.21.6
|
||||
class ProblemReporter {
|
||||
optional class ProblemReporter {
|
||||
|
||||
public static (ProblemReporterHandle) ProblemReporter createScoped() {
|
||||
// Global macro
|
||||
|
||||
+10
-8
@@ -29,19 +29,21 @@ class ValueInput {
|
||||
#endif
|
||||
}
|
||||
|
||||
public static (ValueInputHandle) ValueInput forNBTOnWorld((Object) ProblemReporter problemreporter, (org.bukkit.World) net.minecraft.world.level.World world, (CommonTagCompound) NBTTagCompound nbttagcompound) {
|
||||
#if version >= 1.21.6
|
||||
public static (ValueInputHandle) ValueInput forNBTOnWorld((Object) ProblemReporter problemreporter, (org.bukkit.World) net.minecraft.world.level.World world, (CommonTagCompound) NBTTagCompound nbttagcompound) {
|
||||
return TagValueInput.create(problemreporter, world.registryAccess(), nbttagcompound);
|
||||
#else
|
||||
return nbttagcompound;
|
||||
#endif
|
||||
}
|
||||
|
||||
public static (ValueInputHandle) ValueInput forNBT((Object) ProblemReporter problemreporter, (Object) HolderLookup.a holderLookup, (CommonTagCompound) NBTTagCompound nbttagcompound) {
|
||||
#if version >= 1.21.6
|
||||
return TagValueInput.create(problemreporter, holderLookup, nbttagcompound);
|
||||
#else
|
||||
return nbttagcompound;
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
public static (ValueInputHandle) ValueInput forNBTOnWorld((Object) Object problemreporter, (org.bukkit.World) Object world, (CommonTagCompound) Object nbttagcompound) {
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
public static (ValueInputHandle) ValueInput forNBT((Object) Object problemreporter, (Object) Object holderLookup, (CommonTagCompound) Object nbttagcompound) {
|
||||
return nbttagcompound;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in new issue
Block a user