mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
0003/0132
This commit is contained in:
@@ -5,39 +5,35 @@ Subject: [PATCH] Leaves Utils
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 81a18b8e605bd4c28b48a32c80be231609182970..f8d45c1076852a0553c3dd7c5512f76a6891e2cb 100644
|
||||
index 3d2c0a4d3a1f9d3e5cc6cd0cdb988ae1205de821..910bec7cbb2ef140ab16d99f93859326b5475a25 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -351,6 +351,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -372,6 +372,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
public boolean isTemporarilyActive;
|
||||
public long activatedImmunityTick = Integer.MIN_VALUE;
|
||||
|
||||
+ private CompoundTag leavesData = new CompoundTag(); // Leaves - Leaves ex data
|
||||
+ private net.minecraft.nbt.CompoundTag leavesData = new net.minecraft.nbt.CompoundTag(); // Leaves - Leaves ex data
|
||||
+
|
||||
public void inactiveTick() {
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -2516,6 +2518,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
compound.putBoolean("Paper.FreezeLock", true);
|
||||
@@ -2585,6 +2587,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
output.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
+ compound.put("Leaves.Data", leavesData); // Leaves - leaves ex data
|
||||
return compound;
|
||||
} catch (Throwable var8) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var8, "Saving entity NBT");
|
||||
@@ -2646,6 +2649,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
freezeLocked = compound.getBooleanOr("Paper.FreezeLock", false);
|
||||
+ output.store("Leaves.Data", net.minecraft.nbt.CompoundTag.CODEC, leavesData); // Leaves - leaves ex data
|
||||
} catch (Throwable var7) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Saving entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being saved");
|
||||
@@ -2705,6 +2708,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
freezeLocked = input.getBooleanOr("Paper.FreezeLock", false);
|
||||
// Paper end
|
||||
+ // Leaves start - leaves ex data
|
||||
+ if (compound.contains("Leaves.Data")) {
|
||||
+ leavesData = compound.getCompoundOrEmpty("Leaves.Data");
|
||||
+ }
|
||||
+ // Leaves end - leaves ex data
|
||||
} catch (Throwable var8) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var8, "Loading entity NBT");
|
||||
+ leavesData = input.read("Leaves.Data", net.minecraft.nbt.CompoundTag.CODEC).orElse(new net.minecraft.nbt.CompoundTag());
|
||||
} catch (Throwable var7) {
|
||||
CrashReport crashReport = CrashReport.forThrowable(var7, "Loading entity NBT");
|
||||
CrashReportCategory crashReportCategory = crashReport.addCategory("Entity being loaded");
|
||||
@@ -5114,4 +5122,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -5365,4 +5369,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
@@ -48,7 +44,7 @@ index 81a18b8e605bd4c28b48a32c80be231609182970..f8d45c1076852a0553c3dd7c5512f76a
|
||||
+ // Leaves end - leaves ex data
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/block/Block.java b/net/minecraft/world/level/block/Block.java
|
||||
index ae3e6e31171b1bcfba1ae51a0941b52dda270acd..f289e37f77e1c9d3b0f6c29da1b99f0d5f156e37 100644
|
||||
index be6f37f91569c659c609e5e8d38671ca86f8cd95..958914e40fceda5d67a98154817b4c5ce478a62d 100644
|
||||
--- a/net/minecraft/world/level/block/Block.java
|
||||
+++ b/net/minecraft/world/level/block/Block.java
|
||||
@@ -610,6 +610,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
Reference in New Issue
Block a user