Merge pull request #135 from tsao-chi-fork/1.15.2-patch-4

never drop items on command "/give"
This commit is contained in:
Joseph Robinson
2020-04-01 21:08:42 -07:00
committed by GitHub

View File

@@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E3=84=97=E3=84=A0=CB=8B=20=E3=84=91=E3=84=A7=CB=8A?=
<tsao-chi@the-lingo.org>
Date: Thu, 2 Apr 2020 11:35:19 +0800
Subject: [PATCH] never drop items on command "/give"
diff --git a/src/main/java/net/minecraft/server/CommandGive.java b/src/main/java/net/minecraft/server/CommandGive.java
index 81b26bb4d094f8aede9d5432671936ab3ee42c84..1f3097c9450b5903c35d3b36fd642ddd131786d7 100644
--- a/src/main/java/net/minecraft/server/CommandGive.java
+++ b/src/main/java/net/minecraft/server/CommandGive.java
@@ -36,6 +36,7 @@ public class CommandGive {
boolean flag = entityplayer.inventory.pickup(itemstack);
EntityItem entityitem;
+ if (true) continue; // Akarin - never drop items on command "/give"
if (flag && itemstack.isEmpty()) {
itemstack.setCount(1);
entityitem = entityplayer.drop(itemstack, false);