mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
33c990bd9f
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 95d233dc SPIGOT-1807: PlayerTeleportEvent is called twice Spigot Changes: b0819150 PR-116: Slightly reduce item merge radius in Y-direction ef2aa765 PR-119: Fix off-by-one and allow disabling max-tnt-per-tick option
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Hugo Manrique <hugmanrique@gmail.com>
|
|
Date: Mon, 16 Jul 2018 12:42:20 +0200
|
|
Subject: [PATCH] Avoid item merge if stack size above max stack size
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -0,0 +0,0 @@ public class ItemEntity extends Entity {
|
|
|
|
private void mergeWithNeighbours() {
|
|
if (this.isMergable()) {
|
|
+ // Paper start - avoid item merge if stack size above max stack size
|
|
+ ItemStack stack = getItem();
|
|
+ if (stack.getCount() >= stack.getMaxStackSize()) return;
|
|
+ // Paper end
|
|
// Spigot start
|
|
double radius = level.spigotConfig.itemMerge;
|
|
List<ItemEntity> list = this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(radius, radius - 0.5D, radius), (entityitem) -> {
|