1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Fixed a stupid issue and added some docs.

This commit is contained in:
LinoxGH 2020-08-27 20:53:13 +03:00 committed by GitHub
parent 8c1cccc390
commit f371a5fda6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,6 +33,14 @@ import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
/**
* This machine draws liquids from the world and puts them
* into buckets provided to the machine by using energy.
*
* @author TheBusyBiscuit
* @author Linox
*
*/
public class FluidPump extends SimpleSlimefunItem<BlockTicker> implements InventoryBlock, EnergyNetComponent {
private static final int ENERGY_CONSUMPTION = 32;
@ -157,7 +165,7 @@ public class FluidPump extends SimpleSlimefunItem<BlockTicker> implements Invent
if (!block.isLiquid()) return false;
BlockData data = block.getBlockData();
if (data instanceof Levelled) {
return ((Levelled) data).getLevel == 0;
return ((Levelled) data).getLevel() == 0;
}
return false;
}