1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

"resf" renamed to "chamber"

This commit is contained in:
AtomicScience 2017-11-21 11:25:06 +03:00 committed by GitHub
parent cb5f146840
commit afb341acff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -748,21 +748,21 @@ public class SlimefunSetup {
p.getWorld().playSound(p.getLocation(), Sound.BLOCK_LAVA_POP, 1, 1); p.getWorld().playSound(p.getLocation(), Sound.BLOCK_LAVA_POP, 1, 1);
p.getWorld().playEffect(b.getLocation(), Effect.MOBSPAWNER_FLAMES, 1); p.getWorld().playEffect(b.getLocation(), Effect.MOBSPAWNER_FLAMES, 1);
Block raw_disp = b.getRelative(BlockFace.DOWN); Block raw_disp = b.getRelative(BlockFace.DOWN);
Hopper resf = null; Hopper chamber = null;
if(BlockStorage.check(raw_disp.getRelative(BlockFace.EAST).getState().getBlock(), "IGNITION_CHAMBER")) { if(BlockStorage.check(raw_disp.getRelative(BlockFace.EAST).getState().getBlock(), "IGNITION_CHAMBER")) {
resf = (Hopper) raw_disp.getRelative(BlockFace.EAST).getState(); chamber = (Hopper) raw_disp.getRelative(BlockFace.EAST).getState();
} else if (BlockStorage.check(raw_disp.getRelative(BlockFace.WEST).getState().getBlock(), "IGNITION_CHAMBER")) { } else if (BlockStorage.check(raw_disp.getRelative(BlockFace.WEST).getState().getBlock(), "IGNITION_CHAMBER")) {
resf = (Hopper) raw_disp.getRelative(BlockFace.WEST).getState(); chamber = (Hopper) raw_disp.getRelative(BlockFace.WEST).getState();
} else if (BlockStorage.check(raw_disp.getRelative(BlockFace.NORTH).getState().getBlock(), "IGNITION_CHAMBER")) { } else if (BlockStorage.check(raw_disp.getRelative(BlockFace.NORTH).getState().getBlock(), "IGNITION_CHAMBER")) {
resf = (Hopper) raw_disp.getRelative(BlockFace.NORTH).getState(); chamber = (Hopper) raw_disp.getRelative(BlockFace.NORTH).getState();
} else if (BlockStorage.check(raw_disp.getRelative(BlockFace.SOUTH).getState().getBlock(), "IGNITION_CHAMBER")){ } else if (BlockStorage.check(raw_disp.getRelative(BlockFace.SOUTH).getState().getBlock(), "IGNITION_CHAMBER")){
resf = (Hopper) raw_disp.getRelative(BlockFace.SOUTH).getState(); chamber = (Hopper) raw_disp.getRelative(BlockFace.SOUTH).getState();
} }
if (SlimefunStartup.chance(100, (Integer) Slimefun.getItemValue("SMELTERY", "chance.fireBreak"))) { if (SlimefunStartup.chance(100, (Integer) Slimefun.getItemValue("SMELTERY", "chance.fireBreak"))) {
if(resf != null) { if(chamber != null) {
if(resf.getInventory().contains(Material.FLINT_AND_STEEL)) { if(chamber.getInventory().contains(Material.FLINT_AND_STEEL)) {
ItemStack item = resf.getInventory().getItem(resf.getInventory().first(Material.FLINT_AND_STEEL)); ItemStack item = chamber.getInventory().getItem(chamber.getInventory().first(Material.FLINT_AND_STEEL));
item.setDurability((short) (item.getDurability() + 1)); item.setDurability((short) (item.getDurability() + 1));
if(item.getDurability() >= item.getType().getMaxDurability()) { if(item.getDurability() >= item.getType().getMaxDurability()) {
item.setAmount(0); item.setAmount(0);