This repository has been archived by the owner on Aug 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
Fix skull items not displaying skins #146
Open
ShinyDialga
wants to merge
1
commit into
OvercastNetwork:real1.8
Choose a base branch
from
ShinyDialga:fix-skull-item-display
base: real1.8
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
CraftBukkit/0105-Fix-skull-items-not-displaying-skins.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
From d16baea641c129325cf8547f0de387718bbc2214 Mon Sep 17 00:00:00 2001 | ||
From: ShinyDialga45 <shinydialga45@gmail.com> | ||
Date: Sun, 17 May 2015 20:05:31 -0500 | ||
Subject: [PATCH] Fix skull items not displaying skins | ||
|
||
|
||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java | ||
index 89912bc..bdde9aa 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java | ||
@@ -5,6 +5,7 @@ import java.util.Map; | ||
import net.minecraft.server.GameProfileSerializer; | ||
import net.minecraft.server.NBTTagCompound; | ||
|
||
+import net.minecraft.server.TileEntitySkull; | ||
import org.bukkit.Material; | ||
import org.bukkit.configuration.serialization.DelegateDeserialization; | ||
import org.bukkit.craftbukkit.inventory.CraftMetaItem.SerializableMeta; | ||
@@ -26,7 +27,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { | ||
return; | ||
} | ||
CraftMetaSkull skullMeta = (CraftMetaSkull) meta; | ||
- this.profile = skullMeta.profile; | ||
+ profile = TileEntitySkull.b(skullMeta.profile); | ||
} | ||
|
||
CraftMetaSkull(NBTTagCompound tag) { | ||
@@ -37,6 +38,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { | ||
} else if (tag.hasKeyOfType(SKULL_OWNER.NBT, 8) && !tag.getString(SKULL_OWNER.NBT).isEmpty()) { | ||
profile = new GameProfile(null, tag.getString(SKULL_OWNER.NBT)); | ||
} | ||
+ profile = TileEntitySkull.b(profile); | ||
} | ||
|
||
CraftMetaSkull(Map<String, Object> map) { | ||
@@ -95,7 +97,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { | ||
if (name == null) { | ||
profile = null; | ||
} else { | ||
- profile = new GameProfile(null, name); | ||
+ profile = TileEntitySkull.b(new GameProfile(null, name)); | ||
} | ||
|
||
return true; | ||
@@ -119,7 +121,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { | ||
if (meta instanceof CraftMetaSkull) { | ||
CraftMetaSkull that = (CraftMetaSkull) meta; | ||
|
||
- return (this.hasOwner() ? that.hasOwner() && this.profile.equals(that.profile) : !that.hasOwner()); | ||
+ return (this.hasOwner() ? that.hasOwner() && profile.equals(that.profile) : !that.hasOwner()); | ||
} | ||
return true; | ||
} | ||
@@ -133,8 +135,8 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { | ||
Builder<String, Object> serialize(Builder<String, Object> builder) { | ||
super.serialize(builder); | ||
if (hasOwner()) { | ||
- return builder.put(SKULL_OWNER.BUKKIT, this.profile.getName()); | ||
+ return builder.put(SKULL_OWNER.BUKKIT, profile.getName()); | ||
} | ||
return builder; | ||
} | ||
-} | ||
+} | ||
\ No newline at end of file | ||
-- | ||
1.9.4.msysgit.2 | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be using fully qualified names rather than imports for patches