Closed WalkerKnapp closed 3 years ago
This PR implements everything in net.minecraftforge.event.entity.item. Implementations differ slightly from forge, notably in onPlayerTossEvent (https://github.com/PatchworkMC/YarnForge/blob/af120a35c3e6951b7ef4318801b6b8dce6fc5420/src/main/java/net/minecraftforge/common/ForgeHooks.java#L428). As far as I can tell, this needlessly replaces calls to PlayerEntity#dropItem(ItemStack, boolean, boolean) and calls it instead in ForgeHooks, and has to deal with spawning the item manually. Instead, this PR injects into dropItem(ItemStack, boolean, boolean) directly.
net.minecraftforge.event.entity.item
PlayerEntity#dropItem(ItemStack, boolean, boolean)
ForgeHooks
dropItem(ItemStack, boolean, boolean)
Corresponding testmods PR: PatchworkMC/patchwork-testmods#5
This PR implements everything in
net.minecraftforge.event.entity.item
. Implementations differ slightly from forge, notably in onPlayerTossEvent (https://github.com/PatchworkMC/YarnForge/blob/af120a35c3e6951b7ef4318801b6b8dce6fc5420/src/main/java/net/minecraftforge/common/ForgeHooks.java#L428). As far as I can tell, this needlessly replaces calls toPlayerEntity#dropItem(ItemStack, boolean, boolean)
and calls it instead inForgeHooks
, and has to deal with spawning the item manually. Instead, this PR injects intodropItem(ItemStack, boolean, boolean)
directly.Corresponding testmods PR: PatchworkMC/patchwork-testmods#5