mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: d985976 Add config for mobs immune to default effects (#4835) Tuinity Changes: ea43797 Fix portalling from the overworld above y 255
This commit is contained in:
34
patches/server/0129-Changeable-Mob-Left-Handed-Chance.patch
Normal file
34
patches/server/0129-Changeable-Mob-Left-Handed-Chance.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Kerllenevich <me@notom3ga.me>
|
||||
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 df79f95ab2c8b9106cac889787b840b166ff0a9c..2f061e2825127e4a38e261ccacf56926a2421bb0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1204,7 +1204,7 @@ public abstract class Mob extends LivingEntity {
|
||||
@Nullable
|
||||
public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData, @Nullable CompoundTag entityNbt) {
|
||||
this.getAttribute(Attributes.FOLLOW_RANGE).addPermanentModifier(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, AttributeModifier.Operation.MULTIPLY_BASE));
|
||||
- if (this.random.nextFloat() < 0.05F) {
|
||||
+ if (this.random.nextFloat() < this.level.purpurConfig.entityLeftHandedChance) { // Purpur
|
||||
this.setLeftHanded(true);
|
||||
} else {
|
||||
this.setLeftHanded(false);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 72592ed2f2fc83974b9adcff7406bb84a77ed62a..adf2d5b31a5e15cd0afb7bea2c9016f6857358e9 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -128,8 +128,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