mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
Add missing purpur config options
This commit is contained in:
@@ -0,0 +1,183 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 12 Jan 2025 00:14:45 +0300
|
||||
Subject: [PATCH] Add missing purpur config options
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
index 22e0fad86da2e7b932863ef30182355aa41424a1..d4eee24b5ab89f82e4e90f551d6651330d4508cb 100644
|
||||
--- a/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -181,6 +181,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
}
|
||||
// Purpur end - Configurable entity base attributes
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.allayTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.allayAlwaysDropExp;
|
||||
+ }
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
+
|
||||
@Override
|
||||
protected Brain.Provider<Allay> brainProvider() {
|
||||
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
|
||||
diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index 1d7ae2a08968860636918e7c66b60139a9d761b4..126af60a694600d40e3ae6bd39e94e55dd9d0b6e 100644
|
||||
--- a/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -97,6 +97,18 @@ public class Camel extends AbstractHorse {
|
||||
}
|
||||
// Purpur end - Make entity breeding times configurable
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.camelTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||
+ }
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
+
|
||||
@Override
|
||||
public void addAdditionalSaveData(CompoundTag compound) {
|
||||
super.addAdditionalSaveData(compound);
|
||||
diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index c4ea9485294b7dec2582c638802f003ad70659b6..d286d4a45b6c8d5c684ad11500d2ad1a10a70c18 100644
|
||||
--- a/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -165,6 +165,23 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.frogTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.frogAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
// Purpur start - Make entity breeding times configurable
|
||||
@Override
|
||||
public int getPurpurBreedTime() {
|
||||
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
index e888e606b4b14fa6485de7426bc146b6005962af..a4383a7d41c91f9e478c7e221828ba92437af06c 100644
|
||||
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
@@ -107,6 +107,23 @@ public class Tadpole extends AbstractFish {
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.tadpoleAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
|
||||
+ }
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
+
|
||||
@Override
|
||||
protected PathNavigation createNavigation(Level level) {
|
||||
return new WaterBoundPathNavigation(this, level);
|
||||
diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 11a5da22149a61ca48bbb0a8ed10b71e91a5cc98..ed1ffc1578e50fa6fedc6124fe016a1535c0e968 100644
|
||||
--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -120,6 +120,18 @@ public class Sniffer extends Animal {
|
||||
}
|
||||
// Purpur end - Make entity breeding times configurable
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.snifferTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.snifferAlwaysDropExp;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
protected void defineSynchedData(SynchedEntityData.Builder builder) {
|
||||
super.defineSynchedData(builder);
|
||||
diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index f968e5c99bdb23b268bc34ea1ba5d54ae9ad0ff9..f74c784906208034f51b31bd9aba45733c3ebebe 100644
|
||||
--- a/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -155,6 +155,23 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.wardenTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.wardenAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
public Packet<ClientGamePacketListener> getAddEntityPacket(ServerEntity entity) {
|
||||
return new ClientboundAddEntityPacket(this, entity, this.hasPose(Pose.EMERGING) ? 1 : 0);
|
||||
diff --git a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
index b230955ae880d84fde40b4feffa5caf3c4449eb7..5b88c69427d5915ff547e4caf7b5656e96912e93 100644
|
||||
--- a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
+++ b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
@@ -26,8 +26,8 @@ import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.storage.loot.LootTable;
|
||||
|
||||
public abstract class AbstractChestBoat extends AbstractBoat implements HasCustomInventoryScreen, ContainerEntity {
|
||||
- private static final int CONTAINER_SIZE = 27;
|
||||
- private NonNullList<ItemStack> itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ private static final int CONTAINER_SIZE = org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // DivineMC - Add missing purpur config options
|
||||
+ private NonNullList<ItemStack> itemStacks = NonNullList.withSize(org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // DivineMC - Add missing purpur config options
|
||||
@Nullable
|
||||
private ResourceKey<LootTable> lootTable;
|
||||
private long lootTableSeed;
|
||||
@@ -118,7 +118,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
- return 27;
|
||||
+ return org.purpurmc.purpur.PurpurConfig.chestBoatRows * 9; // DivineMC - Add missing purpur config options
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,160 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 12 Jan 2025 00:14:21 +0300
|
||||
Subject: [PATCH] Add missing purpur config options
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index c5f0b3a31dfa851363df5f96d193c313474b192b..0eb993f2c6b8b7b59ae6995cefb0a921fd3a480a 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -235,6 +235,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
+ public static int chestBoatRows = 3; // DivineMC - Add missing purpur config options
|
||||
public static boolean enderChestSixRows = false;
|
||||
public static boolean enderChestPermissionRows = false;
|
||||
public static boolean cryingObsidianValidForPortalFrame = false;
|
||||
@@ -265,6 +266,7 @@ public class PurpurConfig {
|
||||
case 1 -> 9;
|
||||
default -> 27;
|
||||
});
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // DivineMC - Add missing purpur config options
|
||||
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
|
||||
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
|
||||
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index f52cbfa21b9df10f30216138585218074a495f8a..0be19a242561e58792c2614f2a9c12c225edee9e 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -575,12 +575,20 @@ public class PurpurWorldConfig {
|
||||
public boolean allayControllable = true;
|
||||
public double allayMaxHealth = 20.0D;
|
||||
public double allayScale = 1.0D;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public boolean allayTakeDamageFromWater = false;
|
||||
+ public boolean allayAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void allaySettings() {
|
||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
||||
allayMaxHealth = getDouble("mobs.allay.attributes.max_health", allayMaxHealth);
|
||||
allayScale = Mth.clamp(getDouble("mobs.allay.attributes.scale", allayScale), 0.0625D, 16.0D);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater);
|
||||
+ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp);
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
}
|
||||
|
||||
public boolean armadilloRidable = false;
|
||||
@@ -716,6 +724,10 @@ public class PurpurWorldConfig {
|
||||
public double camelMovementSpeedMin = 0.09D;
|
||||
public double camelMovementSpeedMax = 0.09D;
|
||||
public int camelBreedingTicks = 6000;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public boolean camelTakeDamageFromWater = false;
|
||||
+ public boolean camelAlwaysDropExp = false;
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
private void camelSettings() {
|
||||
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
|
||||
@@ -725,6 +737,10 @@ public class PurpurWorldConfig {
|
||||
camelMovementSpeedMin = getDouble("mobs.camel.attributes.movement_speed.min", camelMovementSpeedMin);
|
||||
camelMovementSpeedMax = getDouble("mobs.camel.attributes.movement_speed.max", camelMovementSpeedMax);
|
||||
camelBreedingTicks = getInt("mobs.camel.breeding-delay-ticks", camelBreedingTicks);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
|
||||
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
}
|
||||
|
||||
public boolean catRidable = false;
|
||||
@@ -1127,12 +1143,22 @@ public class PurpurWorldConfig {
|
||||
public boolean frogControllable = true;
|
||||
public float frogRidableJumpHeight = 0.65F;
|
||||
public int frogBreedingTicks = 6000;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public double frogMaxHealth = 10.0D;
|
||||
+ public boolean frogTakeDamageFromWater = false;
|
||||
+ public boolean frogAlwaysDropExp = false;
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
private void frogSettings() {
|
||||
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
||||
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
||||
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
|
||||
frogRidableJumpHeight = (float) getDouble("mobs.frog.ridable-jump-height", frogRidableJumpHeight);
|
||||
frogBreedingTicks = getInt("mobs.frog.breeding-delay-ticks", frogBreedingTicks);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth);
|
||||
+ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater);
|
||||
+ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
}
|
||||
|
||||
public boolean ghastRidable = false;
|
||||
@@ -1991,6 +2017,10 @@ public class PurpurWorldConfig {
|
||||
public double snifferMaxHealth = 14.0D;
|
||||
public double snifferScale = 1.0D;
|
||||
public int snifferBreedingTicks = 6000;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public boolean snifferTakeDamageFromWater = false;
|
||||
+ public boolean snifferAlwaysDropExp = false;
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
private void snifferSettings() {
|
||||
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
||||
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
||||
@@ -1998,6 +2028,10 @@ public class PurpurWorldConfig {
|
||||
snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth);
|
||||
snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D);
|
||||
snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater);
|
||||
+ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp);
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
}
|
||||
|
||||
public boolean squidRidable = false;
|
||||
@@ -2091,10 +2125,20 @@ public class PurpurWorldConfig {
|
||||
public boolean tadpoleRidable = false;
|
||||
public boolean tadpoleRidableInWater = true;
|
||||
public boolean tadpoleControllable = true;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public double tadpoleMaxHealth = 10.0D;
|
||||
+ public boolean tadpoleTakeDamageFromWater = false;
|
||||
+ public boolean tadpoleAlwaysDropExp = false;
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
private void tadpoleSettings() {
|
||||
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
||||
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
||||
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth);
|
||||
+ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater);
|
||||
+ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp);
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
}
|
||||
|
||||
public boolean traderLlamaRidable = false;
|
||||
@@ -2278,10 +2322,20 @@ public class PurpurWorldConfig {
|
||||
public boolean wardenRidable = false;
|
||||
public boolean wardenRidableInWater = true;
|
||||
public boolean wardenControllable = true;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public double wardenMaxHealth = 500.0D;
|
||||
+ public boolean wardenTakeDamageFromWater = false;
|
||||
+ public boolean wardenAlwaysDropExp = false;
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
private void wardenSettings() {
|
||||
wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable);
|
||||
wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater);
|
||||
wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth);
|
||||
+ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater);
|
||||
+ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp);
|
||||
+ // DivineMC end - Add missing purpur config options
|
||||
}
|
||||
|
||||
public boolean witchRidable = false;
|
||||
@@ -1,328 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Mon, 12 Jun 2023 15:31:21 +0300
|
||||
Subject: [PATCH] Add missing purpur config options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
index 67ff60909dee395d42619c310bafc381b9bfce5d..d1aabc4183023136de6bd12f14742b0aeafb8f60 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||
@@ -163,6 +163,19 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||
this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.allayScale);
|
||||
}
|
||||
// Purpur end - Configurable entity base attributes
|
||||
+
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.allayTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.allayAlwaysDropExp;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
protected Brain.Provider<Allay> brainProvider() {
|
||||
return Brain.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
index d0023e3734bb3c625fa53077f47039dcb82d9606..1e62c6249df7864cc836b7f791fb11c65d6bdc9b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||
@@ -100,6 +100,19 @@ public class Camel extends AbstractHorse {
|
||||
return this.level().purpurConfig.camelBreedingTicks;
|
||||
}
|
||||
// Purpur end - Make entity breeding times configurable
|
||||
+
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.camelTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.camelAlwaysDropExp;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
public void addAdditionalSaveData(CompoundTag nbt) {
|
||||
super.addAdditionalSaveData(nbt);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index d09aa48e20c9a6e0d465b93e3759556638041394..2ce47ff58e5db6fc5387667bc8b02fdef73f9f7c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -165,6 +165,23 @@ public class Frog extends Animal implements VariantHolder<Holder<FrogVariant>> {
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.frogTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.frogAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.frogMaxHealth);
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
// Purpur start - Make entity breeding times configurable
|
||||
@Override
|
||||
public int getPurpurBreedTime() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
index 33429a9afeefce9238969b2894d0a9c033baca51..b504df1a0004f09eb51ee64461b136934a60c2bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
|
||||
@@ -95,6 +95,23 @@ public class Tadpole extends AbstractFish {
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.tadpoleTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.tadpoleAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.tadpoleMaxHealth);
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
protected PathNavigation createNavigation(Level world) {
|
||||
return new WaterBoundPathNavigation(this, world);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
index 489854333e71ad4e7635870eedbdd07a84297a13..161ca711bcc4c6e9d5ac25b61154cf6b8a437d52 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java
|
||||
@@ -120,6 +120,19 @@ public class Sniffer extends Animal {
|
||||
return this.level().purpurConfig.snifferBreedingTicks;
|
||||
}
|
||||
// Purpur end - Make entity breeding times configurable
|
||||
+
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.snifferTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.snifferAlwaysDropExp;
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
protected void defineSynchedData(SynchedEntityData.Builder builder) {
|
||||
super.defineSynchedData(builder);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
index 74011f1ab7e48490109ad93d658bba216eef9e80..6d8c7639c6a264f40b2c402684c54cb694c05c63 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||
@@ -153,6 +153,23 @@ public class Warden extends Monster implements VibrationSystem {
|
||||
}
|
||||
// Purpur end - Ridables
|
||||
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ @Override
|
||||
+ public boolean isSensitiveToWater() {
|
||||
+ return level().purpurConfig.wardenTakeDamageFromWater;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isAlwaysExperienceDropper() {
|
||||
+ return level().purpurConfig.wardenAlwaysDropExp;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void initAttributes() {
|
||||
+ this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(level().purpurConfig.wardenMaxHealth);
|
||||
+ }
|
||||
+ // DivineMC end
|
||||
+
|
||||
@Override
|
||||
public Packet<ClientGamePacketListener> getAddEntityPacket(ServerEntity entityTrackerEntry) {
|
||||
return new ClientboundAddEntityPacket(this, entityTrackerEntry, this.hasPose(Pose.EMERGING) ? 1 : 0);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
index 1f4cc08e84a23213bb9786ea09ad77caeec2d336..a9941d8b9dbe80f77f27c2166f8c2ec9f34077c4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractChestBoat.java
|
||||
@@ -35,10 +35,10 @@ import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.event.entity.EntityRemoveEvent;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
// CraftBukkit end
|
||||
+import org.purpurmc.purpur.PurpurConfig; // DivineMC - Add missing purpur config options
|
||||
|
||||
public abstract class AbstractChestBoat extends AbstractBoat implements HasCustomInventoryScreen, ContainerEntity {
|
||||
-
|
||||
- private static final int CONTAINER_SIZE = 27;
|
||||
+ private static final int CONTAINER_SIZE = PurpurConfig.chestBoatRows * 9; // DivineMC - Add missing purpur config options
|
||||
private NonNullList<ItemStack> itemStacks;
|
||||
@Nullable
|
||||
private ResourceKey<LootTable> lootTable;
|
||||
@@ -46,7 +46,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
|
||||
|
||||
public AbstractChestBoat(EntityType<? extends AbstractChestBoat> type, Level world, Supplier<Item> itemSupplier) {
|
||||
super(type, world, itemSupplier);
|
||||
- this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
|
||||
+ this.itemStacks = NonNullList.withSize(PurpurConfig.chestBoatRows * 9, ItemStack.EMPTY); // DivineMC - Add missing purpur config options
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,7 +142,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
- return 27;
|
||||
+ return PurpurConfig.chestBoatRows * 9; // DivineMC - Add missing purpur config options
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 6a161bb00b4665cf0b148bc7eabd8b07c6b07e99..316718a16f1e81d6706f1374ce27075acfa5707f 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -331,6 +331,7 @@ public class PurpurConfig {
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
+ public static int chestBoatRows = 3; // DivineMC - Add missing purpur config options
|
||||
public static boolean enderChestSixRows = false;
|
||||
public static boolean enderChestPermissionRows = false;
|
||||
public static boolean cryingObsidianValidForPortalFrame = false;
|
||||
@@ -373,6 +374,7 @@ public class PurpurConfig {
|
||||
case 1 -> 9;
|
||||
default -> 27;
|
||||
});
|
||||
+ chestBoatRows = getInt("settings.blocks.chest_boat.rows", chestBoatRows); // DivineMC - Add missing purpur config options
|
||||
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
|
||||
org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27);
|
||||
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 0d5a0e14cbaacc63eeced78a6c28cc64ad918522..7425854b0230d6c3f8d58a5d049a883dc9f0c7e7 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1144,12 +1144,20 @@ public class PurpurWorldConfig {
|
||||
public boolean allayControllable = true;
|
||||
public double allayMaxHealth = 20.0D;
|
||||
public double allayScale = 1.0D;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public boolean allayTakeDamageFromWater = false;
|
||||
+ public boolean allayAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void allaySettings() {
|
||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
||||
allayMaxHealth = getDouble("mobs.allay.attributes.max_health", allayMaxHealth);
|
||||
allayScale = Mth.clamp(getDouble("mobs.allay.attributes.scale", allayScale), 0.0625D, 16.0D);
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ allayTakeDamageFromWater = getBoolean("mobs.allay.take-damage-from-water", allayTakeDamageFromWater);
|
||||
+ allayAlwaysDropExp = getBoolean("mobs.allay.always-drop-exp", allayAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
}
|
||||
|
||||
public boolean armadilloRidable = false;
|
||||
@@ -1299,7 +1307,15 @@ public class PurpurWorldConfig {
|
||||
public double camelMovementSpeedMin = 0.09D;
|
||||
public double camelMovementSpeedMax = 0.09D;
|
||||
public int camelBreedingTicks = 6000;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public boolean camelTakeDamageFromWater = false;
|
||||
+ public boolean camelAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void camelSettings() {
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ camelTakeDamageFromWater = getBoolean("mobs.camel.takes-damage-from-water", camelTakeDamageFromWater);
|
||||
+ camelAlwaysDropExp = getBoolean("mobs.camel.always-drop-exp", camelAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
camelRidableInWater = getBoolean("mobs.camel.ridable-in-water", camelRidableInWater);
|
||||
camelMaxHealthMin = getDouble("mobs.camel.attributes.max_health.min", camelMaxHealthMin);
|
||||
camelMaxHealthMax = getDouble("mobs.camel.attributes.max_health.max", camelMaxHealthMax);
|
||||
@@ -1764,7 +1780,17 @@ public class PurpurWorldConfig {
|
||||
public boolean frogControllable = true;
|
||||
public float frogRidableJumpHeight = 0.65F;
|
||||
public int frogBreedingTicks = 6000;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public double frogMaxHealth = 10.0D;
|
||||
+ public boolean frogTakeDamageFromWater = false;
|
||||
+ public boolean frogAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void frogSettings() {
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ frogMaxHealth = getDouble("mobs.frog.attributes.max_health", frogMaxHealth);
|
||||
+ frogTakeDamageFromWater = getBoolean("mobs.frog.takes-damage-from-water", frogTakeDamageFromWater);
|
||||
+ frogAlwaysDropExp = getBoolean("mobs.frog.always-drop-exp", frogAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
frogRidable = getBoolean("mobs.frog.ridable", frogRidable);
|
||||
frogRidableInWater = getBoolean("mobs.frog.ridable-in-water", frogRidableInWater);
|
||||
frogControllable = getBoolean("mobs.frog.controllable", frogControllable);
|
||||
@@ -2776,7 +2802,15 @@ public class PurpurWorldConfig {
|
||||
public double snifferMaxHealth = 14.0D;
|
||||
public double snifferScale = 1.0D;
|
||||
public int snifferBreedingTicks = 6000;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public boolean snifferTakeDamageFromWater = false;
|
||||
+ public boolean snifferAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void snifferSettings() {
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ snifferTakeDamageFromWater = getBoolean("mobs.sniffer.takes-damage-from-water", snifferTakeDamageFromWater);
|
||||
+ snifferAlwaysDropExp = getBoolean("mobs.sniffer.always-drop-exp", snifferAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable);
|
||||
snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater);
|
||||
snifferControllable = getBoolean("mobs.sniffer.controllable", snifferControllable);
|
||||
@@ -2884,7 +2918,17 @@ public class PurpurWorldConfig {
|
||||
public boolean tadpoleRidable = false;
|
||||
public boolean tadpoleRidableInWater = true;
|
||||
public boolean tadpoleControllable = true;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public double tadpoleMaxHealth = 10.0D;
|
||||
+ public boolean tadpoleTakeDamageFromWater = false;
|
||||
+ public boolean tadpoleAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void tadpoleSettings() {
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ tadpoleMaxHealth = getDouble("mobs.tadpole.attributes.max_health", tadpoleMaxHealth);
|
||||
+ tadpoleTakeDamageFromWater = getBoolean("mobs.tadpole.takes-damage-from-water", tadpoleTakeDamageFromWater);
|
||||
+ tadpoleAlwaysDropExp = getBoolean("mobs.tadpole.always-drop-exp", tadpoleAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
tadpoleRidable = getBoolean("mobs.tadpole.ridable", tadpoleRidable);
|
||||
tadpoleRidableInWater = getBoolean("mobs.tadpole.ridable-in-water", tadpoleRidableInWater);
|
||||
tadpoleControllable = getBoolean("mobs.tadpole.controllable", tadpoleControllable);
|
||||
@@ -3116,7 +3160,17 @@ public class PurpurWorldConfig {
|
||||
public boolean wardenRidable = false;
|
||||
public boolean wardenRidableInWater = true;
|
||||
public boolean wardenControllable = true;
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ public double wardenMaxHealth = 500.0D;
|
||||
+ public boolean wardenTakeDamageFromWater = false;
|
||||
+ public boolean wardenAlwaysDropExp = false;
|
||||
+ // DivineMC end
|
||||
private void wardenSettings() {
|
||||
+ // DivineMC start - Add missing purpur config options
|
||||
+ wardenMaxHealth = getDouble("mobs.warden.attributes.max_health", wardenMaxHealth);
|
||||
+ wardenTakeDamageFromWater = getBoolean("mobs.warden.takes-damage-from-water", wardenTakeDamageFromWater);
|
||||
+ wardenAlwaysDropExp = getBoolean("mobs.warden.always-drop-exp", wardenAlwaysDropExp);
|
||||
+ // DivineMC end
|
||||
wardenRidable = getBoolean("mobs.warden.ridable", wardenRidable);
|
||||
wardenRidableInWater = getBoolean("mobs.warden.ridable-in-water", wardenRidableInWater);
|
||||
wardenControllable = getBoolean("mobs.warden.controllable", wardenControllable);
|
||||
Reference in New Issue
Block a user