add default silverfish movement speed & attack damage attributes

This commit is contained in:
granny
2024-06-21 00:26:19 -07:00
parent b5f1c487e7
commit c0f5e78dc2
41 changed files with 268 additions and 262 deletions

View File

@@ -221,10 +221,10 @@ index ebbfd1fec85f1d4e099f02c91f3d7346b6bb3c7b..86704fcba15cec26eef3f77167aee911
AABB axisalignedbb = this.getBoundingBox().inflate(0.2D);
Iterator iterator = BlockPos.betweenClosed(Mth.floor(axisalignedbb.minX), Mth.floor(axisalignedbb.minY), Mth.floor(axisalignedbb.minZ), Mth.floor(axisalignedbb.maxX), Mth.floor(axisalignedbb.maxY), Mth.floor(axisalignedbb.maxZ)).iterator();
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
index 75f82922260b2c0666021e7ed42dfde401e1a9d6..a175144d5480b7af091787c6ab366fb3e8d70587 100644
index 9d5d71135b00eb0ab1b1dfaf7925e13b8a44d22c..dee89c6e5b4750ebefb3888485a2bc099a81ce58 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
@@ -191,7 +191,7 @@ public class Silverfish extends Monster {
@@ -193,7 +193,7 @@ public class Silverfish extends Monster {
continue;
}
// CraftBukkit end
@@ -233,7 +233,7 @@ index 75f82922260b2c0666021e7ed42dfde401e1a9d6..a175144d5480b7af091787c6ab366fb3
world.destroyBlock(blockposition1, true, this.silverfish);
} else {
world.setBlock(blockposition1, ((InfestedBlock) block).hostStateByInfested(world.getBlockState(blockposition1)), 3);
@@ -229,7 +229,7 @@ public class Silverfish extends Monster {
@@ -231,7 +231,7 @@ public class Silverfish extends Monster {
} else {
RandomSource randomsource = this.mob.getRandom();
@@ -375,7 +375,7 @@ index c7377d04ceac3ea624117439783a443c6d6f6d08..0c732cfbd9ce50198a3f85ae8ef2263d
}
}
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9ad411f2d 100644
index 555ba78408b10368a997dad12cdf578d3e4306fc..abcbf373c1c1061203c5b482d60dadb0146419aa 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -114,8 +114,11 @@ public class PurpurWorldConfig {
@@ -598,23 +598,23 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
}
public boolean shulkerRidable = false;
@@ -1564,6 +1599,7 @@ public class PurpurWorldConfig {
public boolean silverfishRidableInWater = true;
public boolean silverfishControllable = true;
@@ -1566,6 +1601,7 @@ public class PurpurWorldConfig {
public double silverfishMaxHealth = 8.0D;
public double silverfishMovementSpeed = 0.25D;
public double silverfishAttackDamage = 1.0D;
+ public boolean silverfishBypassMobGriefing = false;
private void silverfishSettings() {
silverfishRidable = getBoolean("mobs.silverfish.ridable", silverfishRidable);
silverfishRidableInWater = getBoolean("mobs.silverfish.ridable-in-water", silverfishRidableInWater);
@@ -1574,6 +1610,7 @@ public class PurpurWorldConfig {
set("mobs.silverfish.attributes.max_health", oldValue);
}
@@ -1578,6 +1614,7 @@ public class PurpurWorldConfig {
silverfishMaxHealth = getDouble("mobs.silverfish.attributes.max_health", silverfishMaxHealth);
silverfishMovementSpeed = getDouble("mobs.silverfish.attributes.movement_speed", silverfishMovementSpeed);
silverfishAttackDamage = getDouble("mobs.silverfish.attributes.attack_damage", silverfishAttackDamage);
+ silverfishBypassMobGriefing = getBoolean("mobs.silverfish.bypass-mob-griefing", silverfishBypassMobGriefing);
}
public boolean skeletonRidable = false;
@@ -1651,6 +1688,7 @@ public class PurpurWorldConfig {
@@ -1655,6 +1692,7 @@ public class PurpurWorldConfig {
public int snowGolemSnowBallMax = 20;
public float snowGolemSnowBallModifier = 10.0F;
public double snowGolemAttackDistance = 1.25D;
@@ -622,7 +622,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
private void snowGolemSettings() {
snowGolemRidable = getBoolean("mobs.snow_golem.ridable", snowGolemRidable);
snowGolemRidableInWater = getBoolean("mobs.snow_golem.ridable-in-water", snowGolemRidableInWater);
@@ -1667,6 +1705,7 @@ public class PurpurWorldConfig {
@@ -1671,6 +1709,7 @@ public class PurpurWorldConfig {
snowGolemSnowBallMax = getInt("mobs.snow_golem.max-shoot-interval-ticks", snowGolemSnowBallMax);
snowGolemSnowBallModifier = (float) getDouble("mobs.snow_golem.snow-ball-modifier", snowGolemSnowBallModifier);
snowGolemAttackDistance = getDouble("mobs.snow_golem.attack-distance", snowGolemAttackDistance);
@@ -630,7 +630,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
}
public boolean snifferRidable = false;
@@ -1853,6 +1892,7 @@ public class PurpurWorldConfig {
@@ -1857,6 +1896,7 @@ public class PurpurWorldConfig {
public int villagerBreedingTicks = 6000;
public boolean villagerClericsFarmWarts = false;
public boolean villagerClericFarmersThrowWarts = true;
@@ -638,7 +638,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
private void villagerSettings() {
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
@@ -1869,6 +1909,7 @@ public class PurpurWorldConfig {
@@ -1873,6 +1913,7 @@ public class PurpurWorldConfig {
villagerBreedingTicks = getInt("mobs.villager.breeding-delay-ticks", villagerBreedingTicks);
villagerClericsFarmWarts = getBoolean("mobs.villager.clerics-farm-warts", villagerClericsFarmWarts);
villagerClericFarmersThrowWarts = getBoolean("mobs.villager.cleric-wart-farmers-throw-warts-at-villagers", villagerClericFarmersThrowWarts);
@@ -646,7 +646,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
}
public boolean vindicatorRidable = false;
@@ -1941,6 +1982,7 @@ public class PurpurWorldConfig {
@@ -1945,6 +1986,7 @@ public class PurpurWorldConfig {
public double witherMaxHealth = 300.0D;
public float witherHealthRegenAmount = 1.0f;
public int witherHealthRegenDelay = 20;
@@ -654,7 +654,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
private void witherSettings() {
witherRidable = getBoolean("mobs.wither.ridable", witherRidable);
witherRidableInWater = getBoolean("mobs.wither.ridable-in-water", witherRidableInWater);
@@ -1958,6 +2000,7 @@ public class PurpurWorldConfig {
@@ -1962,6 +2004,7 @@ public class PurpurWorldConfig {
witherMaxHealth = getDouble("mobs.wither.attributes.max_health", witherMaxHealth);
witherHealthRegenAmount = (float) getDouble("mobs.wither.health-regen-amount", witherHealthRegenAmount);
witherHealthRegenDelay = getInt("mobs.wither.health-regen-delay", witherHealthRegenDelay);
@@ -662,7 +662,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
}
public boolean witherSkeletonRidable = false;
@@ -2029,6 +2072,7 @@ public class PurpurWorldConfig {
@@ -2033,6 +2076,7 @@ public class PurpurWorldConfig {
public double zombieJockeyChance = 0.05D;
public boolean zombieJockeyTryExistingChickens = true;
public boolean zombieAggressiveTowardsVillagerWhenLagging = true;
@@ -670,7 +670,7 @@ index 70b1c8041d4fabb73b41bed97f150b6444688c30..e183f7f2e513c5b79997db783df6d3f9
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -2044,6 +2088,7 @@ public class PurpurWorldConfig {
@@ -2048,6 +2092,7 @@ public class PurpurWorldConfig {
zombieJockeyChance = getDouble("mobs.zombie.jockey.chance", zombieJockeyChance);
zombieJockeyTryExistingChickens = getBoolean("mobs.zombie.jockey.try-existing-chickens", zombieJockeyTryExistingChickens);
zombieAggressiveTowardsVillagerWhenLagging = getBoolean("mobs.zombie.aggressive-towards-villager-when-lagging", zombieAggressiveTowardsVillagerWhenLagging);