13
0
geforkt von Mirrors/Paper

Expanded Hopper API

== AT ==
public net.minecraft.world.level.block.entity.HopperBlockEntity setCooldown(I)V
public net.minecraft.world.level.block.entity.HopperBlockEntity cooldownTime
Dieser Commit ist enthalten in:
vicisacat 2024-03-15 17:35:40 +01:00
Ursprung 61c73ee83e
Commit 93c49bbe31

Datei anzeigen

@ -40,4 +40,17 @@ public class CraftHopper extends CraftLootable<HopperBlockEntity> implements Hop
public CraftHopper copy(Location location) {
return new CraftHopper(this, location);
}
// Paper start - Expanded Hopper API
@Override
public void setTransferCooldown(final int cooldown) {
com.google.common.base.Preconditions.checkArgument(cooldown >= 0, "Hooper transfer cooldown cannot be negative (" + cooldown + ")");
getSnapshot().setCooldown(cooldown);
}
@Override
public int getTransferCooldown() {
return getSnapshot().cooldownTime;
}
// Paper end - Expanded Hopper API
}