diff --git a/patches/server/Add-RegistryAccess-for-managing-Registries.patch b/patches/server/Add-RegistryAccess-for-managing-Registries.patch index fa876721c6..671decaca1 100644 --- a/patches/server/Add-RegistryAccess-for-managing-Registries.patch +++ b/patches/server/Add-RegistryAccess-for-managing-Registries.patch @@ -28,8 +28,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; -+import net.minecraft.world.item.enchantment.Enchantment; -+import net.minecraft.world.level.levelgen.structure.Structure; +import org.bukkit.GameEvent; +import org.bukkit.JukeboxSong; +import org.bukkit.Keyed; @@ -58,11 +56,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import org.bukkit.craftbukkit.potion.CraftPotionEffectType; +import org.bukkit.craftbukkit.util.CraftNamespacedKey; +import org.bukkit.damage.DamageType; ++import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.Cat; +import org.bukkit.entity.Frog; +import org.bukkit.entity.Villager; +import org.bukkit.entity.Wolf; +import org.bukkit.entity.memory.MemoryKey; ++import org.bukkit.generator.structure.Structure; +import org.bukkit.generator.structure.StructureType; +import org.bukkit.inventory.ItemType; +import org.bukkit.inventory.MenuType; @@ -422,6 +422,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ +package io.papermc.paper.registry.entry; + ++import com.google.common.base.Preconditions; +import io.papermc.paper.registry.RegistryHolder; +import io.papermc.paper.registry.RegistryKey; +import java.util.function.BiFunction; @@ -450,6 +451,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + final BiFunction minecraftToBukkit + ) { + super(mcKey, apiKey); ++ Preconditions.checkArgument(!classToPreload.getPackageName().startsWith("net.minecraft"), classToPreload + " should not be in the net.minecraft package as the class-to-preload"); + this.classToPreload = classToPreload; + this.minecraftToBukkit = minecraftToBukkit; + }