36 lines
1.8 KiB
Diff
36 lines
1.8 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/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
|
|
index b05ac56823feaf062b1418c9e6dbe4268225f00f..2d981971497c3f06a3bae7a15679af462f489b6f 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 = 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 63d750d5858d20304b9608697ae618eb97cb6eb6..667eaabe95e9b44cad64dd5aba5ac693f4d726ed 100644
|
|
--- a/src/main/java/wtf/etil/mirai/MiraiConfig.java
|
|
+++ b/src/main/java/wtf/etil/mirai/MiraiConfig.java
|
|
@@ -189,6 +189,9 @@ public class MiraiConfig {
|
|
logPlayerLoginLoc = getBoolean("log-player-login-location", logPlayerLoginLoc);
|
|
}
|
|
|
|
-
|
|
+ public static int maxBees = 3;
|
|
+ private static void maximumBees() {
|
|
+ maxBees = getInt("max-bees-in-hive", maxBees);
|
|
+ }
|
|
|
|
}
|
|
\ No newline at end of file
|