Added smokers.

This commit is contained in:
songoda 2019-09-20 11:51:38 -04:00
parent c18eddac22
commit 5d813d9d1e
5 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ public class Furnace {
public void plus(FurnaceSmeltEvent e) {
Block block = location.getBlock();
if (!block.getType().name().contains("FURNACE")) return;
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) return;
this.uses++;
this.tolevel++;
@ -180,7 +180,7 @@ public class Furnace {
public void updateCook() {
Block block = location.getBlock();
if (!block.getType().name().contains("FURNACE")) return;
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) return;
Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> {
int num = getPerformanceTotal();

View File

@ -48,7 +48,7 @@ public class BlockListeners implements Listener {
public void onBlockPlace(BlockPlaceEvent event) {
if (plugin.getBlacklistHandler().isBlacklisted(event.getPlayer().getWorld())
|| !event.getBlock().getType().name().contains("FURNACE"))
|| !event.getBlock().getType().name().contains("FURNACE") && !event.getBlock().getType().name().contains("SMOKER"))
return;
ItemStack item = event.getItemInHand();
@ -73,7 +73,7 @@ public class BlockListeners implements Listener {
return;
}
Block block = event.getBlock();
if (!block.getType().name().contains("FURNACE")
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")
|| plugin.getBlacklistHandler().isBlacklisted(event.getPlayer().getWorld()))
return;

View File

@ -33,7 +33,7 @@ public class InteractListeners implements Listener {
}
Player player = event.getPlayer();
if (event.getAction() != Action.LEFT_CLICK_BLOCK
|| (!block.getType().name().contains("FURNACE"))
|| !block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")
|| player.isSneaking()
|| player.getInventory().getItemInHand().getType().name().contains("PICKAXE")
|| !player.hasPermission("EpicFurnaces.overview")) {

View File

@ -38,7 +38,7 @@ public class InventoryListeners implements Listener {
if (event.getAction() != InventoryAction.NOTHING) {
if (event.getCurrentItem().getType() != Material.AIR) {
ItemStack item = event.getCurrentItem();
if (item.getType().name().contains("FURNACE")) {
if (item.getType().name().contains("FURNACE") && !item.getType().name().contains("SMOKER")) {
event.setCancelled(true);
}
}

View File

@ -105,7 +105,7 @@ public class FurnaceTask extends BukkitRunnable {
Block block = location.getBlock();
if (!block.getType().name().contains("FURNACE")) continue;
if (!block.getType().name().contains("FURNACE") && !block.getType().name().contains("SMOKER")) continue;
Furnace furnace1 = plugin.getFurnaceManager().getFurnace(block);
if (furnace == furnace1) continue;
org.bukkit.block.Furnace furnaceBlock = ((org.bukkit.block.Furnace) block.getState());