mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-26 01:45:04 +01:00
SPIGOT-5053: Initialize beacon with stored levels where available
This commit is contained in:
parent
b1c5fd6817
commit
411609dc81
1 changed files with 2 additions and 1 deletions
|
@ -119,7 +119,7 @@
|
||||||
public void a(SoundEffect soundeffect) {
|
public void a(SoundEffect soundeffect) {
|
||||||
this.world.a((EntityHuman) null, this.position, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
this.world.a((EntityHuman) null, this.position, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||||
}
|
}
|
||||||
@@ -254,8 +309,10 @@
|
@@ -254,8 +309,11 @@
|
||||||
@Override
|
@Override
|
||||||
public void load(NBTTagCompound nbttagcompound) {
|
public void load(NBTTagCompound nbttagcompound) {
|
||||||
super.load(nbttagcompound);
|
super.load(nbttagcompound);
|
||||||
|
@ -128,6 +128,7 @@
|
||||||
+ // Craftbukkit start - persist manually set non-default beacon effects (SPIGOT-3598)
|
+ // Craftbukkit start - persist manually set non-default beacon effects (SPIGOT-3598)
|
||||||
+ this.primaryEffect = MobEffectList.fromId(nbttagcompound.getInt("Primary"));
|
+ this.primaryEffect = MobEffectList.fromId(nbttagcompound.getInt("Primary"));
|
||||||
+ this.secondaryEffect = MobEffectList.fromId(nbttagcompound.getInt("Secondary"));
|
+ this.secondaryEffect = MobEffectList.fromId(nbttagcompound.getInt("Secondary"));
|
||||||
|
+ this.levels = nbttagcompound.getInt("Levels"); // SPIGOT-5053, use where available
|
||||||
+ // Craftbukkit end
|
+ // Craftbukkit end
|
||||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||||
this.customName = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName"));
|
this.customName = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue