Remap CraftBukkit to Mojang+Yarn Mappings
By: Initial Source <noreply+automated@papermc.io>
This commit is contained in:
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.IRegistry;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.contents.TranslatableContents;
|
||||
import org.bukkit.JukeboxSong;
|
||||
@@ -18,7 +17,7 @@ public class CraftJukeboxSong implements JukeboxSong, Handleable<net.minecraft.w
|
||||
}
|
||||
|
||||
public static JukeboxSong minecraftHolderToBukkit(Holder<net.minecraft.world.item.JukeboxSong> minecraft) {
|
||||
return minecraftToBukkit(minecraft.value());
|
||||
return CraftJukeboxSong.minecraftToBukkit(minecraft.value());
|
||||
}
|
||||
|
||||
public static net.minecraft.world.item.JukeboxSong bukkitToMinecraft(JukeboxSong bukkit) {
|
||||
@@ -28,9 +27,9 @@ public class CraftJukeboxSong implements JukeboxSong, Handleable<net.minecraft.w
|
||||
public static Holder<net.minecraft.world.item.JukeboxSong> bukkitToMinecraftHolder(JukeboxSong bukkit) {
|
||||
Preconditions.checkArgument(bukkit != null);
|
||||
|
||||
IRegistry<net.minecraft.world.item.JukeboxSong> registry = CraftRegistry.getMinecraftRegistry(Registries.JUKEBOX_SONG);
|
||||
net.minecraft.core.Registry<net.minecraft.world.item.JukeboxSong> registry = CraftRegistry.getMinecraftRegistry(Registries.JUKEBOX_SONG);
|
||||
|
||||
if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<net.minecraft.world.item.JukeboxSong> holder) {
|
||||
if (registry.wrapAsHolder(CraftJukeboxSong.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.item.JukeboxSong> holder) {
|
||||
return holder;
|
||||
}
|
||||
|
||||
@@ -48,18 +47,18 @@ public class CraftJukeboxSong implements JukeboxSong, Handleable<net.minecraft.w
|
||||
|
||||
@Override
|
||||
public net.minecraft.world.item.JukeboxSong getHandle() {
|
||||
return handle;
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public NamespacedKey getKey() {
|
||||
return key;
|
||||
return this.key;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getTranslationKey() {
|
||||
return ((TranslatableContents) handle.description().getContents()).getKey();
|
||||
return ((TranslatableContents) this.handle.description().getContents()).getKey();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user