mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-25 12:05:14 +01:00
fix lithium-entity to work with tic-tacs unblocking
This commit is contained in:
parent
f43855078b
commit
b1b3f8a3bc
10
PATCHES.md
10
PATCHES.md
@ -425,7 +425,7 @@ # Patches
|
|||||||
| server | Zombie horse naturally spawn | William Blake Galbreath | |
|
| server | Zombie horse naturally spawn | William Blake Galbreath | |
|
||||||
| server | add config for logging login location | Simon Gardling | |
|
| server | add config for logging login location | Simon Gardling | |
|
||||||
| server | dont load chunks for physics | Aikar | |
|
| server | dont load chunks for physics | Aikar | |
|
||||||
| server | lithium AI | JellySquid | |
|
| server | lithium AI | JellySquid | Hugo Planque |
|
||||||
| server | lithium DataTrackerMixin | JellySquid | tr7zw |
|
| server | lithium DataTrackerMixin | JellySquid | tr7zw |
|
||||||
| server | lithium HashedList | JellySquid | |
|
| server | lithium HashedList | JellySquid | |
|
||||||
| server | lithium MixinBox | JellySquid | |
|
| server | lithium MixinBox | JellySquid | |
|
||||||
@ -434,12 +434,12 @@ # Patches
|
|||||||
| server | lithium NoiseChunkGeneratorMixin | JellySquid | |
|
| server | lithium NoiseChunkGeneratorMixin | JellySquid | |
|
||||||
| server | lithium PerlinNoiseSamplerMixin | JellySquid | Bud Gidiere |
|
| server | lithium PerlinNoiseSamplerMixin | JellySquid | Bud Gidiere |
|
||||||
| server | lithium VoronoiBiomeAccessTypeMixin | JellySquid | |
|
| server | lithium VoronoiBiomeAccessTypeMixin | JellySquid | |
|
||||||
| server | lithium block | JellySquid | |
|
| server | lithium block | JellySquid | Hugo Planque |
|
||||||
| server | lithium entity | JellySquid | |
|
| server | lithium entity | JellySquid | Hugo Planque |
|
||||||
| server | lithium enum_values | JellySquid | |
|
| server | lithium enum_values | JellySquid | |
|
||||||
| server | lithium gen | JellySquid | |
|
| server | lithium gen | JellySquid | Hugo Planque |
|
||||||
| server | lithium reduce allocations | JellySquid | Mykyta Komarnytskyy |
|
| server | lithium reduce allocations | JellySquid | Mykyta Komarnytskyy |
|
||||||
| server | lithium shape | JellySquid | |
|
| server | lithium shape | JellySquid | Hugo Planque |
|
||||||
| server | lithium: cache chunk gen sea level | SuperCoder7979 | |
|
| server | lithium: cache chunk gen sea level | SuperCoder7979 | |
|
||||||
| server | lithium: optimize `BlockPos.iterateOutwards` by caching | 2No2Name | |
|
| server | lithium: optimize `BlockPos.iterateOutwards` by caching | 2No2Name | |
|
||||||
| server | lithium: skip ticking block entities that are doing nothing | 2No2Name | |
|
| server | lithium: skip ticking block entities that are doing nothing | 2No2Name | |
|
||||||
|
@ -244,7 +244,7 @@ index 4492f2579da79bd58def922894f40422fbeaf54c..cd1f94e5c1c923ee9d8dd451406ac2be
|
|||||||
if (fluid.a(tag)) {
|
if (fluid.a(tag)) {
|
||||||
double d2 = (double) ((float) i2 + fluid.getHeight(this.world, blockposition_mutableblockposition));
|
double d2 = (double) ((float) i2 + fluid.getHeight(this.world, blockposition_mutableblockposition));
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
index fb62d5bfe188a7ae82a038454cbf0db10de23dda..2f5960a85b3599f369ad334f3b3a0bae8fad8ecf 100644
|
index 5096afa6c11810decc4b4bd73867c48594b932b2..c1d4dd2ba75115b1f53c4ce6a3b49bd840973b8e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
@@ -140,6 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -140,6 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
@ -342,7 +342,7 @@ index fb62d5bfe188a7ae82a038454cbf0db10de23dda..2f5960a85b3599f369ad334f3b3a0bae
|
|||||||
|
|
||||||
f = this.onGround ? f5 * 0.91F : 0.91F;
|
f = this.onGround ? f5 * 0.91F : 0.91F;
|
||||||
Vec3D vec3d6 = this.a(vec3d, f5);
|
Vec3D vec3d6 = this.a(vec3d, f5);
|
||||||
@@ -3546,7 +3549,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -3549,7 +3552,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
while (!flag2 && blockposition.getY() > 0) {
|
while (!flag2 && blockposition.getY() > 0) {
|
||||||
BlockPosition blockposition1 = blockposition.down();
|
BlockPosition blockposition1 = blockposition.down();
|
||||||
@ -351,7 +351,7 @@ index fb62d5bfe188a7ae82a038454cbf0db10de23dda..2f5960a85b3599f369ad334f3b3a0bae
|
|||||||
|
|
||||||
if (iblockdata.getMaterial().isSolid()) {
|
if (iblockdata.getMaterial().isSolid()) {
|
||||||
flag2 = true;
|
flag2 = true;
|
||||||
@@ -3641,7 +3644,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -3644,7 +3647,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
this.stopRiding();
|
this.stopRiding();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,7 +360,7 @@ index fb62d5bfe188a7ae82a038454cbf0db10de23dda..2f5960a85b3599f369ad334f3b3a0bae
|
|||||||
|
|
||||||
if (iblockdata.getBlock() instanceof BlockBed) {
|
if (iblockdata.getBlock() instanceof BlockBed) {
|
||||||
this.world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockBed.OCCUPIED, true), 3);
|
this.world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockBed.OCCUPIED, true), 3);
|
||||||
@@ -3660,7 +3663,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -3663,7 +3666,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
private boolean x() {
|
private boolean x() {
|
||||||
return (Boolean) this.getBedPosition().map((blockposition) -> {
|
return (Boolean) this.getBedPosition().map((blockposition) -> {
|
||||||
@ -369,7 +369,7 @@ index fb62d5bfe188a7ae82a038454cbf0db10de23dda..2f5960a85b3599f369ad334f3b3a0bae
|
|||||||
}).orElse(false);
|
}).orElse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3670,7 +3673,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -3673,7 +3676,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
|
||||||
this.world.getClass();
|
this.world.getClass();
|
||||||
optional.filter(world::isLoaded).ifPresent((blockposition) -> {
|
optional.filter(world::isLoaded).ifPresent((blockposition) -> {
|
||||||
|
@ -906,7 +906,7 @@ index cd1f94e5c1c923ee9d8dd451406ac2bee360e9c3..7befe4263a2d046922438e1a9853f2d8
|
|||||||
public Throwable addedToWorldStack; // Paper - entity debug
|
public Throwable addedToWorldStack; // Paper - entity debug
|
||||||
public CraftEntity getBukkitEntity() {
|
public CraftEntity getBukkitEntity() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
index 2f5960a85b3599f369ad334f3b3a0bae8fad8ecf..bbe9eea55b18e1198916df29cbd922092b485eed 100644
|
index c1d4dd2ba75115b1f53c4ce6a3b49bd840973b8e..4cae70c41bbd977b6a5661e43a5ddd3694e89580 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
@@ -141,9 +141,11 @@ import org.bukkit.event.player.PlayerItemConsumeEvent;
|
@@ -141,9 +141,11 @@ import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||||
@ -1636,7 +1636,7 @@ index f5badbe0dee5c40cf83a5d2993d27ed70ddd2c85..db2b1863b7f46be53839fb3e86870745
|
|||||||
return i < 0 || i >= 256;
|
return i < 0 || i >= 256;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
index eecb17e887bf0d1680a5fb5198a8b4246c14e548..3319c419a9eaf91224396c8b19eb057abd8094e6 100644
|
index fab55929f72c5784291b3bc87f7717ac24b7806f..20c2c05ab09ac3f2b2924f2b5bc938fdc5cdd32e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -55,6 +55,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
@@ -55,6 +55,7 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] lithium entity
|
|||||||
Co-authored-by: Hugo Planque <hookwood01@gmail.com>
|
Co-authored-by: Hugo Planque <hookwood01@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
index bbe9eea55b18e1198916df29cbd922092b485eed..6a24932b17bb8d2e48334e61bfd5290c1c1e2be6 100644
|
index 4cae70c41bbd977b6a5661e43a5ddd3694e89580..29b30c159fae686a28f395d3e5a2236bc9237c1b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java
|
||||||
@@ -286,6 +286,10 @@ public abstract class EntityLiving extends Entity {
|
@@ -286,6 +286,10 @@ public abstract class EntityLiving extends Entity {
|
||||||
@ -31,11 +31,11 @@ index bbe9eea55b18e1198916df29cbd922092b485eed..6a24932b17bb8d2e48334e61bfd5290c
|
|||||||
this.ar = this.as;
|
this.ar = this.as;
|
||||||
if (this.justCreated) {
|
if (this.justCreated) {
|
||||||
this.getBedPosition().ifPresent(this::a);
|
this.getBedPosition().ifPresent(this::a);
|
||||||
@@ -1784,6 +1792,26 @@ public abstract class EntityLiving extends Entity {
|
@@ -1783,7 +1791,24 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
}
|
||||||
|
|
||||||
public IBlockData ds() {
|
public IBlockData ds() {
|
||||||
return this.world.getBlockStateIfLoaded(this.getChunkCoordinates()); // Yatopia
|
- return this.world.getBlockStateIfLoaded(this.getChunkCoordinates()); // Yatopia
|
||||||
+ /*
|
|
||||||
+ // Yatopia start - port lithium
|
+ // Yatopia start - port lithium
|
||||||
+ int x = MathHelper.floor(this.locX());
|
+ int x = MathHelper.floor(this.locX());
|
||||||
+ int y = MathHelper.floor(this.locY());
|
+ int y = MathHelper.floor(this.locY());
|
||||||
@ -47,14 +47,13 @@ index bbe9eea55b18e1198916df29cbd922092b485eed..6a24932b17bb8d2e48334e61bfd5290c
|
|||||||
+ return this.lastStateAtFeet;
|
+ return this.lastStateAtFeet;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ IBlockData state = this.world.getType(getChunkCoordinates());
|
+ IBlockData state = this.world.getBlockStateIfLoaded(this.getChunkCoordinates());
|
||||||
+
|
+
|
||||||
+ this.lastPos = pos;
|
+ this.lastPos = pos;
|
||||||
+ this.lastStateAtFeet = state;
|
+ this.lastStateAtFeet = state;
|
||||||
+
|
+
|
||||||
+ return state;
|
+ return state;
|
||||||
+ // Yatopia end
|
+ // Yatopia end
|
||||||
+ */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean c(BlockPosition blockposition, IBlockData iblockdata) {
|
private boolean c(BlockPosition blockposition, IBlockData iblockdata) {
|
||||||
|
@ -282,7 +282,7 @@ index 7befe4263a2d046922438e1a9853f2d8290ee230..ab5fb00885d22126639e7459ef71c56b
|
|||||||
return this.isSneaking();
|
return this.isSneaking();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
index 3319c419a9eaf91224396c8b19eb057abd8094e6..9dee9ff25ba12f4de6d9080176c371627215b029 100644
|
index 20c2c05ab09ac3f2b2924f2b5bc938fdc5cdd32e..e0d2d2f617594674824cdff34cdcfadaa16ac291 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -56,6 +56,7 @@ import net.minecraft.world.phys.shapes.VoxelShapes;
|
@@ -56,6 +56,7 @@ import net.minecraft.world.phys.shapes.VoxelShapes;
|
||||||
|
Loading…
Reference in New Issue
Block a user