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

Fixed Multiblocks

This commit is contained in:
TheBusyBiscuit 2019-08-30 20:41:39 +02:00
parent 0fd44d2136
commit 5ec7a27b2b
3 changed files with 12 additions and 9 deletions

View File

@ -21,7 +21,9 @@ public class Juicer extends MultiBlockMachine {
public Juicer() {
super(
Categories.MACHINES_1, SlimefunItems.JUICER, "JUICER",
Categories.MACHINES_1,
SlimefunItems.JUICER,
"JUICER",
new ItemStack[] {null, new ItemStack(Material.GLASS), null, null, new ItemStack(Material.NETHER_BRICK_FENCE), null, null, new CustomItem(Material.DISPENSER, "Dispenser (Facing up)"), null},
new ItemStack[] {
new ItemStack(Material.APPLE), SlimefunItems.APPLE_JUICE,

View File

@ -263,10 +263,10 @@ public final class SlimefunSetup {
new ItemStack[] {SlimefunItems.SALT, new ItemStack(Material.COOKED_BEEF), null, null, null, null, null, null, null}, new String[] {"Saturation"}, new Integer[] {20})
.register(true);
new GrindStone().register(true);
new ArmorForge().register(true);
new OreCrusher().register(true);
new Compressor().register(true);
new GrindStone().register();
new ArmorForge().register();
new OreCrusher().register();
new Compressor().register();
new SlimefunItem(Categories.LUMPS_AND_MAGIC, SlimefunItems.MAGIC_LUMP_1, "MAGIC_LUMP_1", RecipeType.GRIND_STONE,
new ItemStack[] {null, null, null, null, new ItemStack(Material.NETHER_WART), null, null, null, null}, new CustomItem(SlimefunItems.MAGIC_LUMP_1, 2))
@ -437,7 +437,7 @@ public final class SlimefunSetup {
new ItemStack[] {SlimefunItems.STEEL_PLATE, SlimefunItems.BASIC_CIRCUIT_BOARD, SlimefunItems.STEEL_PLATE, SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.STEEL_PLATE, SlimefunItems.ELECTRIC_MOTOR, null, new ItemStack(Material.HOPPER), null})
.register(true);
new PressureChamber().register(true);
new PressureChamber().register();
new SlimefunItem(Categories.TECH_MISC, SlimefunItems.BATTERY, "BATTERY", RecipeType.ENHANCED_CRAFTING_TABLE,
new ItemStack[] { null, new ItemStack(Material.REDSTONE), null, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT, SlimefunItems.ZINC_INGOT, SlimefunItems.SULFATE, SlimefunItems.COPPER_INGOT })
@ -1899,7 +1899,7 @@ public final class SlimefunSetup {
new ItemStack[] {null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null, null, new ItemStack(Material.DIAMOND_BOOTS), null, null, SlimefunItems.ESSENCE_OF_AFTERLIFE, null})
.register(true);
new Juicer().register(true);
new Juicer().register();
new Juice(Categories.FOOD, SlimefunItems.APPLE_JUICE, "APPLE_JUICE", RecipeType.JUICER,
new ItemStack[] {null, null, null, null, new ItemStack(Material.APPLE), null, null, null, null})

View File

@ -1,6 +1,7 @@
package me.mrCookieSlime.Slimefun.listeners;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import me.mrCookieSlime.CSCoreLibPlugin.general.Block.BlockAdjacents;
@ -138,9 +139,9 @@ public class BlockListener implements Listener {
if (!multiblocks.isEmpty()) {
e.setCancelled(true);
System.out.println(Arrays.toString(multiblocks.get(multiblocks.size() - 1).getBuild()));
for (ItemHandler handler: SlimefunItem.getHandlers("MultiBlockInteractionHandler")) {
if (((MultiBlockInteractionHandler) handler).onInteract(p, multiblocks.get(multiblocks.size() - 1), b)) break;
if (((MultiBlockInteractionHandler) handler).onInteract(p, multiblocks.get(multiblocks.size() - 1), b)) continue;
}
MultiBlockInteractEvent event = new MultiBlockInteractEvent(p, multiblocks.get(multiblocks.size() - 1), b);