== AT ==
public net.minecraft.server.level.ServerChunkCache mainThread
public net.minecraft.server.level.ServerLevel chunkSource
public org.bukkit.craftbukkit.inventory.CraftItemStack handle
public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder;
public net.minecraft.server.level.ServerChunkCache mainThreadProcessor
public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor
public net.minecraft.world.level.chunk.LevelChunkSection states
This commit is contained in:
Aikar
2016-03-28 20:55:47 -04:00
parent a82a09d198
commit b01c811c2f
81 changed files with 6261 additions and 473 deletions

View File

@@ -454,7 +454,34 @@
@Nullable
public <T> T set(DataComponentType<? super T> type, @Nullable T value) {
@@ -858,7 +1082,7 @@
@@ -804,7 +1028,26 @@
} else {
this.getItem().verifyComponentsAfterLoad(this);
}
+ }
+
+ // Paper start - (this is just a good no conflict location)
+ public org.bukkit.inventory.ItemStack asBukkitMirror() {
+ return CraftItemStack.asCraftMirror(this);
+ }
+ public org.bukkit.inventory.ItemStack asBukkitCopy() {
+ return CraftItemStack.asCraftMirror(this.copy());
+ }
+ public static ItemStack fromBukkitCopy(org.bukkit.inventory.ItemStack itemstack) {
+ return CraftItemStack.asNMSCopy(itemstack);
+ }
+ private org.bukkit.craftbukkit.inventory.CraftItemStack bukkitStack;
+ public org.bukkit.inventory.ItemStack getBukkitStack() {
+ if (bukkitStack == null || bukkitStack.handle != this) {
+ bukkitStack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this);
+ }
+ return bukkitStack;
}
+ // Paper end
public void applyComponents(DataComponentPatch changes) {
this.components.applyPatch(changes);
@@ -858,7 +1101,7 @@
}
private <T extends TooltipProvider> void addToTooltip(DataComponentType<T> componentType, Item.TooltipContext context, Consumer<Component> textConsumer, TooltipFlag type) {
@@ -463,7 +490,7 @@
if (t0 != null) {
t0.addToTooltip(context, textConsumer, type);
@@ -866,7 +1090,7 @@
@@ -866,7 +1109,7 @@
}
@@ -472,7 +499,7 @@
boolean flag = this.getItem().shouldPrintOpWarning(this, player);
if (!type.isCreative() && this.has(DataComponents.HIDE_TOOLTIP)) {
@@ -941,7 +1165,7 @@
@@ -941,7 +1184,7 @@
}
}
@@ -481,7 +508,7 @@
ItemAttributeModifiers itemattributemodifiers = (ItemAttributeModifiers) this.getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY);
if (itemattributemodifiers.showInTooltip()) {
@@ -966,7 +1190,7 @@
@@ -966,7 +1209,7 @@
}
}
@@ -490,13 +517,14 @@
double d0 = modifier.amount();
boolean flag = false;
@@ -1091,6 +1315,13 @@
@@ -1091,6 +1334,14 @@
EnchantmentHelper.forEachModifier(this, slot, attributeModifierConsumer);
}
+ // CraftBukkit start
+ @Deprecated
+ public void setItem(Item item) {
+ this.bukkitStack = null; // Paper
+ this.item = item;
+ }
+ // CraftBukkit end
@@ -504,7 +532,7 @@
public Component getDisplayName() {
MutableComponent ichatmutablecomponent = Component.empty().append(this.getHoverName());
@@ -1153,7 +1384,7 @@
@@ -1153,7 +1404,7 @@
}
public void consume(int amount, @Nullable LivingEntity entity) {