Jump to content

[1.7.2] [SOLVED] Pickup Handler won't work


Recommended Posts



I've created a Pickup Handler, but it looks like that this Pickup Handler won't load.

Common Proxy


public void registerEventHooks()
	FMLCommonHandler.instance().bus().register(new PlayerDimensionEventHook());
	FMLCommonHandler.instance().bus().register(new PlayerPickupEventHook());
	FMLCommonHandler.instance().bus().register(new PlayerEventHook());

	MinecraftForge.EVENT_BUS.register(new BonemealEventHook());
	//MinecraftForge.EVENT_BUS.register(new PlayerPickupEventHook());

	GameRegistry.registerFuelHandler(new FFuelHandler());


(I tested it with both, MinecraftForge.EVENT_BUS.register and FMLCommonHandler.instance().bus().register)




package minecraftplaye.primevalforest.event;

import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.PlayerEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import minecraftplaye.primevalforest.achievement.PFAchievementPage;
import minecraftplaye.primevalforest.blocks.PFBlocks;
import net.minecraft.item.ItemStack;

public class PlayerPickupEventHook
     * Checks if the player picks an Item or Block up!
     * @param event The MCForge ItemPickupEvent
@SubscribeEvent(priority = EventPriority.NORMAL)
public void notifyPickup(PlayerEvent.ItemPickupEvent  event)
	if(event.pickedUp.getEntityItem().isItemEqual(new ItemStack(PFBlocks.port_sapling)))



I'm using Forge 1.7.2-


EDIT: Ok, I solved it, forgot to remove the SideOnly... in the Event class


Developer of Primeval Forest.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.