@@ -28,7 +28,7 @@
|
||||
|
||||
@Nullable
|
||||
static MobEffectList filterEffect(@Nullable MobEffectList mobeffectlist) {
|
||||
@@ -245,39 +259,78 @@
|
||||
@@ -245,38 +259,77 @@
|
||||
super.setRemoved();
|
||||
}
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
}
|
||||
|
||||
+ return false;
|
||||
}
|
||||
}
|
||||
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private static void applyEffects(World world, BlockPosition blockposition, int i, @Nullable MobEffectList mobeffectlist, @Nullable MobEffectList mobeffectlist1) {
|
||||
+ if (!world.isClientSide && mobeffectlist != null) {
|
||||
+ double d0 = (double) (i * 10 + 10);
|
||||
@@ -109,14 +109,13 @@
|
||||
+ if (hasSecondaryEffect(i, mobeffectlist, mobeffectlist1)) {
|
||||
+ applyEffect(list, mobeffectlist1, j, 0);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ }
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
|
||||
public static void playSound(World world, BlockPosition blockposition, SoundEffect soundeffect) {
|
||||
world.playSound((EntityHuman) null, blockposition, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
|
||||
}
|
||||
@@ -312,7 +365,7 @@
|
||||
if (nbttagcompound.contains(s, 8)) {
|
||||
MinecraftKey minecraftkey = MinecraftKey.tryParse(nbttagcompound.getString(s));
|
||||
|
||||
@@ -124,8 +124,9 @@
|
||||
ItemStack itemstack = (ItemStack) nonnulllist.get(3);
|
||||
+ InventoryHolder owner = tileentitybrewingstand.getOwner();
|
||||
+ List<org.bukkit.inventory.ItemStack> brewResults = new ArrayList<>(3);
|
||||
+
|
||||
+ for (int i = 0; i < 3; ++i) {
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
- nonnulllist.set(i, PotionBrewer.mix(itemstack, (ItemStack) nonnulllist.get(i)));
|
||||
+ brewResults.add(i, CraftItemStack.asCraftMirror(PotionBrewer.mix(itemstack, (ItemStack) nonnulllist.get(i))));
|
||||
+ }
|
||||
+
|
||||
@@ -137,9 +138,8 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
- nonnulllist.set(i, PotionBrewer.mix(itemstack, (ItemStack) nonnulllist.get(i)));
|
||||
+
|
||||
+ for (int i = 0; i < 3; ++i) {
|
||||
+ // CraftBukkit start - validate index in case it is cleared by plugins
|
||||
+ if (i < brewResults.size()) {
|
||||
+ nonnulllist.set(i, CraftItemStack.asNMSCopy(brewResults.get(i)));
|
||||
|
||||
Reference in New Issue
Block a user