mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
add farm beacon warmup
This commit is contained in:
@@ -21,9 +21,9 @@ public interface FarmBeacon {
|
||||
ItemMeta meta = item.getItemMeta();
|
||||
meta.itemName(Component.text("Farm Beacon", NamedTextColor.LIGHT_PURPLE));
|
||||
meta.lore(List.of(Component.text("Allows crops to grow larger and more bountiful", NamedTextColor.WHITE),
|
||||
Component.text("Within a 20 block radius:", NamedTextColor.WHITE),
|
||||
Component.text("doubles growth times, and", NamedTextColor.WHITE),
|
||||
Component.text("increase soil fertility +5%", NamedTextColor.WHITE),
|
||||
Component.text("Increases soil fertility +5%", NamedTextColor.WHITE),
|
||||
Component.text("within a 20 block radius.", NamedTextColor.WHITE),
|
||||
Component.text("Takes 6 days to become effective.", NamedTextColor.WHITE),
|
||||
Component.text("Requires a beacon base and sky exposure", NamedTextColor.WHITE)));
|
||||
meta.setEnchantmentGlintOverride(true);
|
||||
meta.setFireResistant(true);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class FarmBeaconListener implements Listener {
|
||||
Block block = event.getBlock();
|
||||
Beacon type = (Beacon) block.getState(false);
|
||||
|
||||
type.getPersistentDataContainer().set(FARM_BEACON_KEY, PersistentDataType.BOOLEAN, true);
|
||||
type.getPersistentDataContainer().set(FARM_BEACON_KEY, PersistentDataType.LONG, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
|
||||
Reference in New Issue
Block a user