mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Revert "Added PlayerOpenContainerEvent and added ForgeHooks.canInteractWith"
This reverts commit 8d0b58ee6f.
# Conflicts:
# common/net/minecraftforge/common/ForgeHooks.java
# patches/minecraft/net/minecraft/entity/player/EntityPlayer.java.patch
# patches/minecraft/net/minecraft/entity/player/EntityPlayerMP.java.patch
This commit is contained in:
1 parent
1a97d74939
commit
d1f4d71d93
4 files changed
-59
No files matched your search
@@ -93,7 +93,6 @@ import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||
import net.minecraftforge.event.entity.player.AnvilRepairEvent;
|
||||
import net.minecraftforge.event.entity.player.AttackEntityEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerOpenContainerEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.event.world.NoteBlockEvent;
|
||||
import net.minecraftforge.fluids.IFluidBlock;
|
||||
@@ -655,13 +654,6 @@ public class ForgeHooks
|
||||
return ichat;
|
||||
}
|
||||
|
||||
public static boolean canInteractWith(EntityPlayer player, Container openContainer)
|
||||
{
|
||||
PlayerOpenContainerEvent event = new PlayerOpenContainerEvent(player, openContainer);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
return event.getResult() == Event.Result.DEFAULT ? event.isCanInteractWith() : event.getResult() == Event.Result.ALLOW ? true : false;
|
||||
}
|
||||
|
||||
public static int onBlockBreakEvent(World world, GameType gameType, EntityPlayerMP entityPlayer, BlockPos pos)
|
||||
{
|
||||
// Logic from tryHarvestBlock for pre-canceling the event
|
||||
|
||||
Reference in new issue
Block a user