mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 05:02:18 +00:00
Fix some logical bugs related to the Grindstone Event (#9089)
This commit is contained in:
1 parent
b25a092cf1
commit
8358b800e9
5 files changed
+112
-12
No files matched your search
@@ -759,7 +759,11 @@ public class ForgeHooks
|
||||
public static int onGrindstoneChange(@NotNull ItemStack top, @NotNull ItemStack bottom, Container outputSlot, int xp)
|
||||
{
|
||||
GrindstoneEvent.OnplaceItem e = new GrindstoneEvent.OnplaceItem(top, bottom, xp);
|
||||
if (MinecraftForge.EVENT_BUS.post(e)) return e.getXp();
|
||||
if (MinecraftForge.EVENT_BUS.post(e))
|
||||
{
|
||||
outputSlot.setItem(0, ItemStack.EMPTY);
|
||||
return -1;
|
||||
}
|
||||
if (e.getOutput().isEmpty()) return Integer.MIN_VALUE;
|
||||
|
||||
outputSlot.setItem(0, e.getOutput());
|
||||
|
||||
Reference in new issue
Block a user