37 lines
2.0 KiB
Diff
37 lines
2.0 KiB
Diff
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/dev/etil/mirai/MiraiConfig.java b/src/main/java/dev/etil/mirai/MiraiConfig.java
|
|
index 5f3ba184fae5170425cfdbd95150ed00c3f3433b..e9c604aa084b159ffa22d4afae4f90e9e7af236c 100644
|
|
--- a/src/main/java/dev/etil/mirai/MiraiConfig.java
|
|
+++ b/src/main/java/dev/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
|
|
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..53b2984d4e5c689f4bce26ec996ede8bcdd69d7d 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<BeehiveBlockEntity.BeeData> 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 = dev.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);
|