mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2025-01-25 09:41:32 +01:00
Update VirtualCraftingHolder.java
Hoppers now respect their redstone behaviour when under an AutoCrafter.
This commit is contained in:
parent
c71c8d6214
commit
e8e84c8dde
@ -217,7 +217,12 @@ public class VirtualCraftingHolder implements InventoryHolder {
|
|||||||
Inventory output;
|
Inventory output;
|
||||||
|
|
||||||
if(blockBelow.getState() instanceof Hopper){
|
if(blockBelow.getState() instanceof Hopper){
|
||||||
|
Bukkit.broadcastMessage("Below is hopper!");
|
||||||
Hopper hopper = (Hopper) blockBelow.getState();
|
Hopper hopper = (Hopper) blockBelow.getState();
|
||||||
|
if(blockBelow.isBlockPowered() || blockBelow.isBlockIndirectlyPowered()){
|
||||||
|
Bukkit.broadcastMessage("Hopper is powered!");
|
||||||
|
continue; //If hopper is powered no crafting should happen.
|
||||||
|
}
|
||||||
output = hopper.getInventory();
|
output = hopper.getInventory();
|
||||||
} else {
|
} else {
|
||||||
output = getInventory(blockBelow);
|
output = getInventory(blockBelow);
|
||||||
|
Loading…
Reference in New Issue
Block a user