mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
150 patches...
This commit is contained in:
34
patches/server/0100-Changeable-Mob-Left-Handed-Chance.patch
Normal file
34
patches/server/0100-Changeable-Mob-Left-Handed-Chance.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Kerllenevich <ben@omega24.dev>
|
||||
Date: Mon, 30 Nov 2020 11:40:11 -0500
|
||||
Subject: [PATCH] Changeable Mob Left Handed Chance
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 17e6e4a858d3a2332c14d2860d2f5d1e87e1c629..7b0cb3f4d8d810b32cda964c20437fea5ea00e24 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1422,7 +1422,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||
attributemodifiable.addPermanentModifier(new AttributeModifier(Mob.RANDOM_SPAWN_BONUS_ID, randomsource.triangle(0.0D, 0.11485000000000001D), AttributeModifier.Operation.ADD_MULTIPLIED_BASE));
|
||||
}
|
||||
|
||||
- this.setLeftHanded(randomsource.nextFloat() < 0.05F);
|
||||
+ this.setLeftHanded(randomsource.nextFloat() < world.getLevel().purpurConfig.entityLeftHandedChance); // Purpur
|
||||
return entityData;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 3bbc81e6a97728b032f0097b2a88a7ff69bd18ce..a5f51c2dff32452ad5dda0623dda90da358fe322 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -150,8 +150,10 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
|
||||
public int entityLifeSpan = 0;
|
||||
+ public float entityLeftHandedChance = 0.05f;
|
||||
private void entitySettings() {
|
||||
entityLifeSpan = getInt("gameplay-mechanics.entity-lifespan", entityLifeSpan);
|
||||
+ entityLeftHandedChance = (float) getDouble("gameplay-mechanics.entity-left-handed-chance", entityLeftHandedChance);
|
||||
}
|
||||
|
||||
public boolean infinityWorksWithoutArrows = false;
|
||||
Reference in New Issue
Block a user