mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixed Multimeter not working on Auto-Crafters
This commit is contained in:
parent
2cf3ede10b
commit
95a2d9e385
@ -25,11 +25,11 @@
|
||||
## Release Candidate 22 (TBD)
|
||||
|
||||
#### Additions
|
||||
* Added Vanilla Auto Crafter
|
||||
* Added Enhanced Auto Crafter
|
||||
* Added Vanilla Auto-Crafter
|
||||
* Added Enhanced Auto-Crafter
|
||||
* Added "Smart-Filling" mode to Cargo Input nodes
|
||||
* Added "Netherite Ingot -> Netherite Block" recipe to Electric Press
|
||||
* Added Armor Forge Auto Crafter
|
||||
* Added Armor Forge Auto-Crafter
|
||||
* Auto-Crafters can now be turned on and off
|
||||
* Added Produce Collector to automate Milk and Mushroom Stew
|
||||
* Block Placers can now place down cake
|
||||
@ -50,7 +50,8 @@
|
||||
* Fixed #2903
|
||||
* Fixed #2913
|
||||
* Fixed #2914
|
||||
* Fixed Auto Crafters swallowing buckets when crafting cake
|
||||
* Fixed Auto-Crafters swallowing buckets when crafting cake
|
||||
* Fixed Multimeter not working on Auto-Crafters
|
||||
|
||||
## Release Candidate 21 (14 Mar 2021)
|
||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
||||
|
@ -14,6 +14,7 @@ import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.items.autocrafters.AbstractAutoCrafter;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.items.autocrafters.EnhancedAutoCrafter;
|
||||
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.Multimeter;
|
||||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
||||
|
||||
/**
|
||||
@ -50,6 +51,13 @@ public class AutoCrafterListener implements Listener {
|
||||
SlimefunItem block = slimefunBlock.get();
|
||||
|
||||
if (block instanceof AbstractAutoCrafter) {
|
||||
Optional<SlimefunItem> slimefunItem = e.getSlimefunItem();
|
||||
|
||||
if (!e.getPlayer().isSneaking() && slimefunItem.isPresent() && slimefunItem.get() instanceof Multimeter) {
|
||||
// Allow Multimeters to pass through and do their job
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent blocks from being placed, food from being eaten, etc...
|
||||
e.cancel();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user