This repository has been archived by the owner on Jun 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Upstream and Sidestream(s) (Airplane/Purpur)
Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Airplane Changes: 8c50125 Switch bitset to long storage 617dfe2 Patch Paper to use fast item merge raytracing 16104e8 Updated Upstream (Tuinity) Purpur Changes: 5824eb8f Beacon Activation Range Configurable (#372) baa20a6b Config MobEffect by world (#369) ff09f9e6 Updated Upstream (Tuinity & Airplane)
- Loading branch information
1 parent
daedcdd
commit 8a33bae
Showing
12 changed files
with
163 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
patches/Airplane/patches/server/0036-Patch-Paper-to-use-fast-item-merge-raytracing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Paul Sauve <[email protected]> | ||
Date: Tue, 1 Jun 2021 18:06:29 -0500 | ||
Subject: [PATCH] Patch Paper to use fast item merge raytracing | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java | ||
index 077990f1d95ded2c8b89c38978ec25a56df3a984..e1581f0616748da885f457c7fa0f1515490c53f4 100644 | ||
--- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java | ||
+++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java | ||
@@ -230,10 +230,16 @@ public class EntityItem extends Entity { | ||
if (entityitem.z()) { | ||
// Paper Start - Fix items merging through walls | ||
if (this.world.paperConfig.fixItemsMergingThroughWalls) { | ||
+ // Airplane start - fast merging! | ||
+ /* | ||
net.minecraft.world.level.RayTrace rayTrace = new net.minecraft.world.level.RayTrace(this.getPositionVector(), entityitem.getPositionVector(), | ||
net.minecraft.world.level.RayTrace.BlockCollisionOption.COLLIDER, net.minecraft.world.level.RayTrace.FluidCollisionOption.NONE, this); | ||
net.minecraft.world.phys.MovingObjectPositionBlock rayTraceResult = world.rayTrace(rayTrace); | ||
if (rayTraceResult.getType() == net.minecraft.world.phys.MovingObjectPosition.EnumMovingObjectType.BLOCK) continue; | ||
+ */ | ||
+ if (world.rayTraceDirect(this.getPositionVector(), entityitem.getPositionVector(), net.minecraft.world.phys.shapes.VoxelShapeCollision.a(this)) == | ||
+ net.minecraft.world.phys.MovingObjectPosition.EnumMovingObjectType.BLOCK) continue; | ||
+ // Airplane end | ||
} | ||
// Paper End | ||
this.a(entityitem); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
patches/Purpur/patches/server/0219-Config-MobEffect-by-world.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: DoctaEnkoda <[email protected]> | ||
Date: Mon, 31 May 2021 11:06:54 +0200 | ||
Subject: [PATCH] Config MobEffect by world | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/effect/MobEffectList.java b/src/main/java/net/minecraft/world/effect/MobEffectList.java | ||
index 6dbd54c44ac88025464f78e72069c538d9f43dc3..f0348960e17056ea9dad0f08fe010a7c69123094 100644 | ||
--- a/src/main/java/net/minecraft/world/effect/MobEffectList.java | ||
+++ b/src/main/java/net/minecraft/world/effect/MobEffectList.java | ||
@@ -51,16 +51,16 @@ public class MobEffectList { | ||
public void tick(EntityLiving entityliving, int i) { | ||
if (this == MobEffects.REGENERATION) { | ||
if (entityliving.getHealth() < entityliving.getMaxHealth()) { | ||
- entityliving.heal(1.0F, RegainReason.MAGIC_REGEN); // CraftBukkit | ||
+ entityliving.heal(entityliving.getWorld().purpurConfig.entityHealthRegenAmount, RegainReason.MAGIC_REGEN); // CraftBukkit // Purpur | ||
} | ||
} else if (this == MobEffects.POISON) { | ||
- if (entityliving.getHealth() > 1.0F) { | ||
- entityliving.damageEntity(CraftEventFactory.POISON, 1.0F); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON | ||
+ if (entityliving.getHealth() > entityliving.getWorld().purpurConfig.entityMinimalHealthPoison) { // Purpur | ||
+ entityliving.damageEntity(CraftEventFactory.POISON, entityliving.getWorld().purpurConfig.entityPoisonDegenerationAmount); // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON // Purpur | ||
} | ||
} else if (this == MobEffects.WITHER) { | ||
- entityliving.damageEntity(DamageSource.WITHER, 1.0F); | ||
+ entityliving.damageEntity(DamageSource.WITHER, entityliving.getWorld().purpurConfig.entityWitherDegenerationAmount); | ||
} else if (this == MobEffects.HUNGER && entityliving instanceof EntityHuman) { | ||
- ((EntityHuman) entityliving).applyExhaustion(0.005F * (float) (i + 1), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.HUNGER_EFFECT); // CraftBukkit - EntityExhaustionEvent | ||
+ ((EntityHuman) entityliving).applyExhaustion(entityliving.getWorld().purpurConfig.humanHungerExhaustionAmount * (float) (i + 1), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.HUNGER_EFFECT); // CraftBukkit - EntityExhaustionEvent // Purpur | ||
} else if (this == MobEffects.SATURATION && entityliving instanceof EntityHuman) { | ||
if (!entityliving.world.isClientSide) { | ||
// CraftBukkit start | ||
@@ -70,7 +70,7 @@ public class MobEffectList { | ||
org.bukkit.event.entity.FoodLevelChangeEvent event = CraftEventFactory.callFoodLevelChangeEvent(entityhuman, i + 1 + oldFoodLevel); | ||
|
||
if (!event.isCancelled()) { | ||
- entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, 1.0F); | ||
+ entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, entityliving.getWorld().purpurConfig.humanSaturationRegenAmount); // Purpur | ||
} | ||
|
||
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutUpdateHealth(((EntityPlayer) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel)); | ||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | ||
index bd72ed2da22c1d1121ea7ca04e163979baa05b27..f27c55d8d6dabe7d2cbaf6ab01e1a484e1d96f53 100644 | ||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | ||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | ||
@@ -2189,4 +2189,19 @@ public class PurpurWorldConfig { | ||
private void pistonSettings() { | ||
pistonBlockPushLimit = getInt("blocks.piston.block-push-limit", pistonBlockPushLimit); | ||
} | ||
+ | ||
+ public float entityHealthRegenAmount = 1.0F; | ||
+ public float entityMinimalHealthPoison = 1.0F; | ||
+ public float entityPoisonDegenerationAmount = 1.0F; | ||
+ public float entityWitherDegenerationAmount = 1.0F; | ||
+ public float humanHungerExhaustionAmount = 0.005F; | ||
+ public float humanSaturationRegenAmount = 1.0F; | ||
+ private void mobEffectSettings() { | ||
+ entityHealthRegenAmount = (float) getDouble("gameplay-mechanics.mob-effects.health-regen-amount", entityHealthRegenAmount); | ||
+ entityMinimalHealthPoison = (float) getDouble("gameplay-mechanics.mob-effects.minimal-health-poison-amount", entityMinimalHealthPoison); | ||
+ entityPoisonDegenerationAmount = (float) getDouble("gameplay-mechanics.mob-effects.poison-degeneration-amount", entityPoisonDegenerationAmount); | ||
+ entityWitherDegenerationAmount = (float) getDouble("gameplay-mechanics.mob-effects.wither-degeneration-amount", entityWitherDegenerationAmount); | ||
+ humanHungerExhaustionAmount = (float) getDouble("gameplay-mechanics.mob-effects.hunger-exhaustion-amount", humanHungerExhaustionAmount); | ||
+ humanSaturationRegenAmount = (float) getDouble("gameplay-mechanics.mob-effects.saturation-regen-amount", humanSaturationRegenAmount); | ||
+ } | ||
} |
50 changes: 50 additions & 0 deletions
50
patches/Purpur/patches/server/0220-Beacon-Activation-Range-Configurable.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: DoctaEnkoda <[email protected]> | ||
Date: Wed, 2 Jun 2021 02:45:47 +0200 | ||
Subject: [PATCH] Beacon Activation Range Configurable | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeacon.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeacon.java | ||
index f7b210e6d60533d9faf60183a80a562b25f945d0..926e1344a8db4b18caebae77096c2600e0a4958f 100644 | ||
--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeacon.java | ||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityBeacon.java | ||
@@ -79,6 +79,16 @@ public class TileEntityBeacon extends TileEntity implements ITileInventory, ITic | ||
|
||
public double getEffectRange() { | ||
if (this.effectRange < 0) { | ||
+ // Purpur Start | ||
+ if (this.world != null) { | ||
+ switch (this.levels) { | ||
+ case 1: return this.world.purpurConfig.beaconLevelOne; | ||
+ case 2: return this.world.purpurConfig.beaconLevelTwo; | ||
+ case 3: return this.world.purpurConfig.beaconLevelThree; | ||
+ case 4: return this.world.purpurConfig.beaconLevelFour; | ||
+ } | ||
+ } | ||
+ // Purpur End | ||
return this.levels * 10 + 10; | ||
} else { | ||
return effectRange; | ||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | ||
index f27c55d8d6dabe7d2cbaf6ab01e1a484e1d96f53..e72bc4d81e528885dfb129b4718123afa5c16421 100644 | ||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | ||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | ||
@@ -511,6 +511,18 @@ public class PurpurWorldConfig { | ||
anvilAllowColors = getBoolean("blocks.anvil.allow-colors", anvilAllowColors); | ||
} | ||
|
||
+ public int beaconLevelOne = 20; | ||
+ public int beaconLevelTwo = 30; | ||
+ public int beaconLevelThree = 40; | ||
+ public int beaconLevelFour = 50; | ||
+ private void beaconSettings() { | ||
+ beaconLevelOne = getInt("blocks.beacon.effect-range.level-1", beaconLevelOne); | ||
+ beaconLevelTwo = getInt("blocks.beacon.effect-range.level-2", beaconLevelTwo); | ||
+ beaconLevelThree = getInt("blocks.beacon.effect-range.level-3", beaconLevelThree); | ||
+ beaconLevelThree = getInt("blocks.beacon.effect-range.level-3", beaconLevelThree); | ||
+ beaconLevelFour = getInt("blocks.beacon.effect-range.level-4", beaconLevelFour); | ||
+ } | ||
+ | ||
public boolean bedExplode = true; | ||
public double bedExplosionPower = 5.0D; | ||
public boolean bedExplosionFire = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Airplane
updated
5 files
Submodule Purpur
updated
from d2204a to 5824eb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3e07ea8cf6f3739eac4710f914222f952fbce43b | ||
8c5012517e30804bf6376f56625c2ef569c8a15a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
d2204a3daca80a3a3da068215e3fa530bb0620b9 | ||
5824eb8f2c2d243c19732c22943e71d707a50d21 |