mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.alchemy;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
@ -49,7 +49,7 @@ public final class Alchemy {
|
||||
public static double catalysisMinSpeed = AdvancedConfig.getInstance().getCatalysisMinSpeed();
|
||||
public static double catalysisMaxSpeed = AdvancedConfig.getInstance().getCatalysisMaxSpeed();
|
||||
|
||||
public static Map<Block, AlchemyBrewTask> brewingStandMap = new HashMap<Block, AlchemyBrewTask>();
|
||||
public static Map<BlockState, AlchemyBrewTask> brewingStandMap = new HashMap<BlockState, AlchemyBrewTask>();
|
||||
|
||||
private Alchemy() {}
|
||||
|
||||
|
@ -3,7 +3,7 @@ package com.gmail.nossr50.skills.alchemy;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.BrewingStand;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -119,12 +119,12 @@ public final class AlchemyPotionBrewer {
|
||||
}
|
||||
}
|
||||
|
||||
public static void finishBrewing(Block brewingStand, Player player, boolean forced) {
|
||||
if (!(brewingStand.getState() instanceof BrewingStand)) {
|
||||
public static void finishBrewing(BlockState brewingStand, Player player, boolean forced) {
|
||||
if (!(brewingStand instanceof BrewingStand)) {
|
||||
return;
|
||||
}
|
||||
|
||||
BrewerInventory inventory = ((BrewingStand) brewingStand.getState()).getInventory();
|
||||
BrewerInventory inventory = ((BrewingStand) brewingStand).getInventory();
|
||||
ItemStack ingredient = inventory.getIngredient() == null ? null : inventory.getIngredient().clone();
|
||||
|
||||
if (!removeIngredient(inventory, player)) {
|
||||
|
Reference in New Issue
Block a user