1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2021-03-21 20:06:46 +01:00
parent 0803529176
commit 001e7654aa
5 changed files with 17 additions and 3 deletions

View File

@ -36,6 +36,7 @@
* Fixed #2862
* Fixed #2887
* Fixed items getting deleted when breaking enhanced furnaces
* Fixed #2895
## Release Candidate 21 (14 Mar 2021)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21

View File

@ -260,6 +260,10 @@
<title>Slimefun4 - Implementations</title>
<packages>io.github.thebusybiscuit.slimefun4.implementation*</packages>
</group>
<group>
<title>Slimefun4 - Integrations with other plugins</title>
<packages>io.github.thebusybiscuit.slimefun4.integrations*</packages>
</group>
<group>
<title>Slimefun4 - Common utility packages</title>
<packages>io.github.thebusybiscuit.slimefun4.utils*</packages>

View File

@ -111,6 +111,7 @@ public abstract class AbstractAutoCrafter extends SlimefunItem implements Energy
// Prevent blocks from being placed, food from being eaten, etc...
e.cancel();
// Check if we have a valid chest below
if (!isValidChest(b.getRelative(BlockFace.DOWN))) {
SlimefunPlugin.getLocalization().sendMessage(p, "messages.auto-crafting.missing-chest");
} else if (SlimefunPlugin.getProtectionManager().hasPermission(p, b, ProtectableAction.INTERACT_BLOCK)) {
@ -128,6 +129,8 @@ public abstract class AbstractAutoCrafter extends SlimefunItem implements Energy
showRecipe(p, b, recipe);
}
}
} else {
SlimefunPlugin.getLocalization().sendMessage(p, "inventory.no-access");
}
});
}
@ -373,7 +376,7 @@ public abstract class AbstractAutoCrafter extends SlimefunItem implements Energy
* @param capacity
* The amount of energy this machine can store
*
* @return This method will return the current instance of {@link AContainer}, so that can be chained.
* @return This method will return the current instance of {@link AContainer}, so that it can be chained.
*/
@Nonnull
public final AbstractAutoCrafter setCapacity(int capacity) {
@ -393,7 +396,7 @@ public abstract class AbstractAutoCrafter extends SlimefunItem implements Energy
* @param energyConsumption
* The energy consumed per tick
*
* @return This method will return the current instance of {@link AContainer}, so that can be chained.
* @return This method will return the current instance of {@link AContainer}, so that it can be chained.
*/
@Nonnull
public final AbstractAutoCrafter setEnergyConsumption(int energyConsumption) {
@ -407,6 +410,7 @@ public abstract class AbstractAutoCrafter extends SlimefunItem implements Energy
@Override
public void register(@Nonnull SlimefunAddon addon) {
Validate.notNull(addon, "A SlimefunAddon cannot be null!");
this.addon = addon;
if (getCapacity() <= 0) {

View File

@ -1,4 +1,4 @@
/**
* This package contains any electric machines related to auomatic crafting tables.
* This package contains any electric machines related to automatic crafting tables.
*/
package io.github.thebusybiscuit.slimefun4.implementation.items.electric.machines.auto_crafters;

View File

@ -16,6 +16,7 @@ import org.bukkit.util.Vector;
import io.github.thebusybiscuit.slimefun4.api.items.ItemSetting;
import io.github.thebusybiscuit.slimefun4.api.items.settings.DoubleRangeSetting;
import io.github.thebusybiscuit.slimefun4.implementation.handlers.VanillaInventoryDropHandler;
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
@ -33,6 +34,7 @@ import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
*
* @author TheBusyBiscuit
* @author Walshy
*
* @see InfusedMagnet
*/
public class InfusedHopper extends SimpleSlimefunItem<BlockTicker> {
@ -46,6 +48,9 @@ public class InfusedHopper extends SimpleSlimefunItem<BlockTicker> {
super(category, item, recipeType, recipe);
addItemSetting(silent, radius, toggleable);
// Fixes #2895 - Make sure we drop all inventory contents
addItemHandler(new VanillaInventoryDropHandler<>(org.bukkit.block.Hopper.class));
}
@Override