Configuration to change the maximum number of bees in a hive (#301)

This commit is contained in:
Bierque Jason
2021-04-29 19:56:07 +02:00
committed by GitHub
parent 9fd776eb9a
commit 79c82d2a22

View File

@@ -0,0 +1,39 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: DoctaEnkoda <bierquejason@gmail.com>
Date: Thu, 29 Apr 2021 19:37:48 +0200
Subject: [PATCH] Config to change the max number of bees
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeehive.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeehive.java
index 3cbcbb028b864f1d14e004628bbc0829f71ab476..3ce6a1b1f75443d1d1c6740d6f3f730f06a34f6a 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeehive.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeehive.java
@@ -29,7 +29,7 @@ public class TileEntityBeehive extends TileEntity implements ITickable {
private final List<TileEntityBeehive.HiveBee> bees = Lists.newArrayList();
@Nullable
public BlockPosition flowerPos = null;
- public int maxBees = 3; // CraftBukkit - allow setting max amount of bees a hive can hold
+ public int maxBees = net.pl3x.purpur.PurpurConfig.beeInsideBeeHive; // CraftBukkit - allow setting max amount of bees a hive can hold // Purpur - Change max bees inside beehive and bee_nest
public TileEntityBeehive() {
super(TileEntityTypes.BEEHIVE);
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index b410d38a431f79971ca183b476115d9e85e1cd6e..c0ef121956ad42bbb555eb8ee6c46b1845dd9e0d 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
@@ -213,6 +213,7 @@ public class PurpurConfig {
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
public static boolean cryingObsidianValidForPortalFrame = false;
+ public static int beeInsideBeeHive = 3;
private static void blockSettings() {
if (version < 3) {
boolean oldValue = getBoolean("settings.barrel.packed-barrels", true);
@@ -228,6 +229,7 @@ public class PurpurConfig {
InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
cryingObsidianValidForPortalFrame = getBoolean("settings.blocks.crying_obsidian.valid-for-portal-frame", cryingObsidianValidForPortalFrame);
+ beeInsideBeeHive = getInt("settings.blocks.beehive.max-bees-inside", beeInsideBeeHive);
}
public static boolean allowInfinityMending = false;