mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 10:59:16 +00:00
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage. And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system). However these patches might be useful for vanilla entity storage if is used.
115 lines
7.1 KiB
Diff
115 lines
7.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Sat, 3 Dec 2022 08:57:15 +0800
|
|
Subject: [PATCH] Leaves: Jade Protocol
|
|
|
|
Original license: GPLv3
|
|
Original project: https://github.com/LeavesMC/Leaves
|
|
|
|
This patch is Powered by Jade (https://github.com/Snownee/Jade)
|
|
|
|
diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
index 6fbeaff7178a21338920d6738767033260b7a726..b0ce3ab6939cb9e37171bb64e8c5308deb03195e 100644
|
|
--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
|
|
@@ -61,7 +61,7 @@ public class Armadillo extends Animal {
|
|
public final AnimationState rollOutAnimationState = new AnimationState();
|
|
public final AnimationState rollUpAnimationState = new AnimationState();
|
|
public final AnimationState peekAnimationState = new AnimationState();
|
|
- private int scuteTime;
|
|
+ public int scuteTime; // Leaves - private -> public
|
|
private boolean peekReceivedClient = false;
|
|
|
|
public Armadillo(EntityType<? extends Animal> entityType, Level level) {
|
|
diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
index 5abdf4253f1d0a6f35d8e05f7a0a2b4100083f76..5d3479a55a10444e3ad3d9ec16160f9d520a1dc6 100644
|
|
--- a/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java
|
|
@@ -286,7 +286,7 @@ public class Tadpole extends AbstractFish {
|
|
}
|
|
}
|
|
|
|
- private int getTicksLeftUntilAdult() {
|
|
+ public int getTicksLeftUntilAdult() { // Leaves - private -> public
|
|
return Math.max(0, ticksToBeFrog - this.age);
|
|
}
|
|
|
|
diff --git a/net/minecraft/world/level/storage/loot/LootPool.java b/net/minecraft/world/level/storage/loot/LootPool.java
|
|
index 6901e629d941e22e64d83eed4e8cfee3165a96a1..fdc26c8d8c82c20534c57af2a0281b99998cc9f6 100644
|
|
--- a/net/minecraft/world/level/storage/loot/LootPool.java
|
|
+++ b/net/minecraft/world/level/storage/loot/LootPool.java
|
|
@@ -37,7 +37,7 @@ public class LootPool {
|
|
)
|
|
.apply(instance, LootPool::new)
|
|
);
|
|
- private final List<LootPoolEntryContainer> entries;
|
|
+ public final List<LootPoolEntryContainer> entries; // Leaves - private -> public
|
|
private final List<LootItemCondition> conditions;
|
|
private final Predicate<LootContext> compositeCondition;
|
|
private final List<LootItemFunction> functions;
|
|
diff --git a/net/minecraft/world/level/storage/loot/LootTable.java b/net/minecraft/world/level/storage/loot/LootTable.java
|
|
index 8612cdf7161f8ddff60a6478cc901318b8f958ba..07a962d647baa99b0e1bf3898a07cc914e91397e 100644
|
|
--- a/net/minecraft/world/level/storage/loot/LootTable.java
|
|
+++ b/net/minecraft/world/level/storage/loot/LootTable.java
|
|
@@ -50,7 +50,7 @@ public class LootTable {
|
|
public static final LootTable EMPTY = new LootTable(LootContextParamSets.EMPTY, Optional.empty(), List.of(), List.of());
|
|
private final ContextKeySet paramSet;
|
|
private final Optional<ResourceLocation> randomSequence;
|
|
- private final List<LootPool> pools;
|
|
+ public final List<LootPool> pools; // Leaves - private -> public
|
|
private final List<LootItemFunction> functions;
|
|
private final BiFunction<ItemStack, LootContext, ItemStack> compositeFunction;
|
|
public org.bukkit.craftbukkit.CraftLootTable craftLootTable; // CraftBukkit
|
|
diff --git a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java
|
|
index eeaa49e9f70a18b5d39493aeff73f31b05ac2faa..8cd0403d7873c4c37caef75935b06b056c3d951d 100644
|
|
--- a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java
|
|
+++ b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java
|
|
@@ -16,7 +16,7 @@ public abstract class CompositeEntryBase extends LootPoolEntryContainer {
|
|
return "Empty children list";
|
|
}
|
|
};
|
|
- protected final List<LootPoolEntryContainer> children;
|
|
+ public final List<LootPoolEntryContainer> children; // Leaves - private -> public
|
|
private final ComposableEntryContainer composedChildren;
|
|
|
|
protected CompositeEntryBase(List<LootPoolEntryContainer> children, List<LootItemCondition> conditions) {
|
|
diff --git a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java
|
|
index 65e27bce9e59ef97bc8b914d646fba924d0f0877..a49bdcdf37b351436e0ba6d7865f10827c4e6ab4 100644
|
|
--- a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java
|
|
+++ b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java
|
|
@@ -14,7 +14,7 @@ import net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder;
|
|
import net.minecraft.world.level.storage.loot.predicates.LootItemCondition;
|
|
|
|
public abstract class LootPoolEntryContainer implements ComposableEntryContainer {
|
|
- protected final List<LootItemCondition> conditions;
|
|
+ public final List<LootItemCondition> conditions; // Leaves - private -> public
|
|
private final Predicate<LootContext> compositeCondition;
|
|
|
|
protected LootPoolEntryContainer(List<LootItemCondition> conditions) {
|
|
diff --git a/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java b/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java
|
|
index 141026601cd9a4561426b85fd1f8e7dc0544fbd7..a5d7ebb93c147bf0f806ac3c9b2dc4b878573944 100644
|
|
--- a/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java
|
|
+++ b/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java
|
|
@@ -29,7 +29,7 @@ public class NestedLootTable extends LootPoolSingletonContainer {
|
|
return "->{inline}";
|
|
}
|
|
};
|
|
- private final Either<ResourceKey<LootTable>, LootTable> contents;
|
|
+ public final Either<ResourceKey<LootTable>, LootTable> contents; // Leaves - private -> public
|
|
|
|
private NestedLootTable(
|
|
Either<ResourceKey<LootTable>, LootTable> contents, int weight, int quality, List<LootItemCondition> conditions, List<LootItemFunction> functions
|
|
diff --git a/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java b/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java
|
|
index bae72197acc929c7ed3e964f156115d728eb2176..8f3094f42f3366a1313d70c0b27fbe5632b2082a 100644
|
|
--- a/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java
|
|
+++ b/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java
|
|
@@ -12,7 +12,7 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
|
import net.minecraft.world.level.storage.loot.ValidationContext;
|
|
|
|
public abstract class CompositeLootItemCondition implements LootItemCondition {
|
|
- protected final List<LootItemCondition> terms;
|
|
+ public final List<LootItemCondition> terms; // Leaves - private -> public
|
|
private final Predicate<LootContext> composedPredicate;
|
|
|
|
protected CompositeLootItemCondition(List<LootItemCondition> terms, Predicate<LootContext> composedPredicate) {
|