From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Etil <81570777+etil2jz@users.noreply.github.com> Date: Thu, 9 Dec 2021 15:39:29 +0100 Subject: [PATCH] Configurable max bees in hive diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java index 41c9f074203915c31c1ae7a160ce509c13383f84..ce56e8ca4b4f866eddcf0849c3b53928550a6126 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java @@ -43,7 +43,7 @@ public class BeehiveBlockEntity extends BlockEntity { private final List stored = Lists.newArrayList(); @Nullable public BlockPos savedFlowerPos; - public int maxBees = 3; // CraftBukkit - allow setting max amount of bees a hive can hold + public int maxBees = wtf.etil.mirai.MiraiConfig.maxBees; // CraftBukkit - allow setting max amount of bees a hive can hold // Mirai - configurable max bees in hive public BeehiveBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.BEEHIVE, pos, state); diff --git a/src/main/java/wtf/etil/mirai/MiraiConfig.java b/src/main/java/wtf/etil/mirai/MiraiConfig.java index 10bcda92607b04b255819a6c70358131e97baa1a..2849478bde14769d1202ca15ecaa8a341f1043a3 100644 --- a/src/main/java/wtf/etil/mirai/MiraiConfig.java +++ b/src/main/java/wtf/etil/mirai/MiraiConfig.java @@ -137,4 +137,11 @@ public class MiraiConfig { "Whether or not player login location should be written in logs."); } + public static int maxBees; + private static void maximumBees() { + maxBees = getInt("max-bees-in-hive", 3, + "This value defines how many bees can fit in a hive.", + "Allowing more bees in a hive can reduce the number of ticking hives."); + } + } \ No newline at end of file