mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
SPIGOT-4131: Fix typo affecting setting BlockData
This commit is contained in:
parent
19ff43d9e1
commit
ca75fead2c
@ -138,7 +138,7 @@ public class CraftBlockData implements BlockData {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private static <N extends Enum<N> & INamable> N toNMS(Enum<?> bukkit, Class<N> nms) {
|
private static <N extends Enum<N> & INamable> N toNMS(Enum<?> bukkit, Class<N> nms) {
|
||||||
Enum<?> converted;
|
Enum<?> converted;
|
||||||
BiMap<Enum<?>, Enum<?>> nmsToBukkit = classMappings.get(nms.getClass());
|
BiMap<Enum<?>, Enum<?>> nmsToBukkit = classMappings.get(nms);
|
||||||
|
|
||||||
if (nmsToBukkit != null) {
|
if (nmsToBukkit != null) {
|
||||||
converted = nmsToBukkit.inverse().get(bukkit);
|
converted = nmsToBukkit.inverse().get(bukkit);
|
||||||
@ -157,7 +157,7 @@ public class CraftBlockData implements BlockData {
|
|||||||
|
|
||||||
if (nmsToBukkit == null) {
|
if (nmsToBukkit == null) {
|
||||||
nmsToBukkit = HashBiMap.create();
|
nmsToBukkit = HashBiMap.create();
|
||||||
classMappings.put(nms.getClass(), nmsToBukkit);
|
classMappings.put(nms, nmsToBukkit);
|
||||||
}
|
}
|
||||||
|
|
||||||
nmsToBukkit.put(converted, bukkit);
|
nmsToBukkit.put(converted, bukkit);
|
||||||
|
Loading…
Reference in New Issue
Block a user