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)
|
## Release Candidate 22 (TBD)
|
||||||
|
|
||||||
#### Additions
|
#### Additions
|
||||||
* Added Vanilla Auto Crafter
|
* Added Vanilla Auto-Crafter
|
||||||
* Added Enhanced Auto Crafter
|
* Added Enhanced Auto-Crafter
|
||||||
* Added "Smart-Filling" mode to Cargo Input nodes
|
* Added "Smart-Filling" mode to Cargo Input nodes
|
||||||
* Added "Netherite Ingot -> Netherite Block" recipe to Electric Press
|
* 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
|
* Auto-Crafters can now be turned on and off
|
||||||
* Added Produce Collector to automate Milk and Mushroom Stew
|
* Added Produce Collector to automate Milk and Mushroom Stew
|
||||||
* Block Placers can now place down cake
|
* Block Placers can now place down cake
|
||||||
@ -50,7 +50,8 @@
|
|||||||
* Fixed #2903
|
* Fixed #2903
|
||||||
* Fixed #2913
|
* Fixed #2913
|
||||||
* Fixed #2914
|
* 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)
|
## Release Candidate 21 (14 Mar 2021)
|
||||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
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.SlimefunPlugin;
|
||||||
import io.github.thebusybiscuit.slimefun4.implementation.items.autocrafters.AbstractAutoCrafter;
|
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.autocrafters.EnhancedAutoCrafter;
|
||||||
|
import io.github.thebusybiscuit.slimefun4.implementation.items.electric.gadgets.Multimeter;
|
||||||
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,6 +51,13 @@ public class AutoCrafterListener implements Listener {
|
|||||||
SlimefunItem block = slimefunBlock.get();
|
SlimefunItem block = slimefunBlock.get();
|
||||||
|
|
||||||
if (block instanceof AbstractAutoCrafter) {
|
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...
|
// Prevent blocks from being placed, food from being eaten, etc...
|
||||||
e.cancel();
|
e.cancel();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user