Java Code Examples for net.minecraftforge.common.MinecraftForge

The following examples show how to use net.minecraftforge.common.MinecraftForge. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
public void initializeRegistry() {
    GTLog.logger.info("Initializing ore generation registry...");
    registerShapeGenerator("ellipsoid", EllipsoidGenerator::new);
    registerShapeGenerator("sphere", SphereGenerator::new);
    registerShapeGenerator("plate", PlateGenerator::new);
    registerShapeGenerator("single", SingleBlockGenerator::new);
    registerBlockFiller("simple", SimpleBlockFiller::new);
    registerBlockFiller("ignore_bedrock", () -> new BlacklistedBlockFiller(Lists.newArrayList(Blocks.BEDROCK.getDefaultState())));
    registerVeinPopulator("surface_rock", SurfaceRockPopulator::new);
    registerVeinPopulator("fluid_spring", FluidSpringPopulator::new);
    registerVeinPopulator("surface_block", SurfaceBlockPopulator::new);

    WorldGeneratorImpl worldGenerator = new WorldGeneratorImpl();
    GameRegistry.registerWorldGenerator(worldGenerator, 1);
    MinecraftForge.ORE_GEN_BUS.register(worldGenerator);
    try {
        reinitializeRegisteredVeins();
    } catch (IOException | RuntimeException exception) {
        GTLog.logger.fatal("Failed to initialize worldgen registry.", exception);
    }
}
 
Example 2
@EventHandler
public void load(FMLInitializationEvent event) {
    ElectroMagicTools.logger.info(localize("console.EMT.init.begin"));

    ElectroMagicTools.logger.info(localize("console.EMT.init.loadProxies"));
    proxy.load();
    ElectroMagicTools.logger.info(localize("console.EMT.init.mobDrops"));
    MinecraftForge.EVENT_BUS.register(new EntityEventHandler());
    ElectroMagicTools.logger.info(localize("console.EMT.init.loot"));
    DungeonChestGenerator.generateLoot();

    ElectroMagicTools.logger.info(localize("console.EMT.init.entities"));
    BaseEntityRegistry.registerEMTEntities();
    ElectroMagicTools.logger.info(localize("console.EMT.init.guiHandler"));
    NetworkRegistry.INSTANCE.registerGuiHandler(this, proxy);

    ElectroMagicTools.logger.info(localize("console.EMT.init.end"));
}
 
Example 3
@Override
public void setReputation(CivilizationType civ, int amount) {
	if (civ == null) {
		return;
	}
	reputations.put(civ, amount);
	if (!player.getEntityWorld().isRemote) {
		ToroQuestPacketHandler.INSTANCE.sendTo(new MessageSetPlayerReputation(civ, amount), (EntityPlayerMP) player);
		MinecraftForge.EVENT_BUS.post(new CivilizationEvent.ReputationChange(player, civ, amount));

		ReputationLevel level = ReputationLevel.fromReputation(amount);


		/* TODO
		if (ReputationLevel.FRIEND.equals(level)) {
			player.addStat(FRIEND_ACHIEVEMNT);
		} else if (ReputationLevel.ALLY.equals(level)) {
			player.addStat(ALLY_ACHIEVEMNT);
		} else if (ReputationLevel.HERO.equals(level)) {
			player.addStat(HERO_ACHIEVEMNT);
		}*/

	}
}
 
Example 4
Source Project: ForgeWurst   Source File: NukerHack.java    License: GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	
	if(currentBlock != null)
		try
		{
			PlayerControllerUtils.setIsHittingBlock(true);
			mc.playerController.resetBlockRemoving();
			currentBlock = null;
			
		}catch(ReflectiveOperationException e)
		{
			throw new RuntimeException(e);
		}
	
	prevBlocks.clear();
	id = 0;
}
 
Example 5
Source Project: Wizardry   Source File: BlockUtils.java    License: GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Tries breaking a block safely and fires an event for it.
 *
 * @return Whether the block was successfully broken
 */
public static boolean breakBlock(@Nonnull World world, @Nonnull BlockPos pos, @Nullable IBlockState oldState, @Nonnull EntityPlayerMP player) {
	if (!world.isBlockLoaded(pos)) return false;

	if (!(player instanceof FakePlayer) && !hasEditPermission(pos, player)) return false;

	if (oldState == null) oldState = world.getBlockState(pos);

	BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, pos, oldState, player);
	MinecraftForge.EVENT_BUS.post(event);

	if (event.isCanceled()) return false;

	TileEntity tile = world.getTileEntity(pos);
	Block block = oldState.getBlock();
	if (block.removedByPlayer(oldState, world, pos, player, true)) {
		block.onPlayerDestroy(world, pos, oldState);
		block.harvestBlock(world, player, pos, oldState, tile, player.getHeldItemMainhand());
		world.notifyBlockUpdate(pos, oldState, Blocks.AIR.getDefaultState(), 3);
	} else return false;

	return true;
}
 
Example 6
Source Project: ForgeWurst   Source File: FullbrightHack.java    License: GNU General Public License v3.0 6 votes vote down vote up
@SubscribeEvent
public void onUpdate(WUpdateEvent event)
{
	if(isEnabled())
	{
		if(mc.gameSettings.gammaSetting < 16)
			mc.gameSettings.gammaSetting =
				Math.min(mc.gameSettings.gammaSetting + 0.5F, 16);
		
		return;
	}
	
	if(mc.gameSettings.gammaSetting > 0.5F)
		mc.gameSettings.gammaSetting =
			Math.max(mc.gameSettings.gammaSetting - 0.5F, 0.5F);
	else
		MinecraftForge.EVENT_BUS.unregister(this);
}
 
Example 7
@Override
public void onLoaded() {
	super.onLoaded();
	if (this.isSimulating() && !this.enet) {
		MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
		this.enet = true;
	}
}
 
Example 8
Source Project: ForgeWurst   Source File: ChestEspHack.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void onDisable()
{
	MinecraftForge.EVENT_BUS.unregister(this);
	
	GL11.glDeleteLists(greenBox, 1);
	greenBox = 0;
	GL11.glDeleteLists(orangeBox, 1);
	orangeBox = 0;
	GL11.glDeleteLists(cyanBox, 1);
	cyanBox = 0;
	GL11.glDeleteLists(normalChests, 1);
	normalChests = 0;
}
 
Example 9
public static void init(){
    MinecraftForge.EVENT_BUS.register(SemiBlockManager.getServerInstance());
    FMLCommonHandler.instance().bus().register(SemiBlockManager.getServerInstance());
    Class requesterClass = Loader.isModLoaded(ModIds.AE2) ? SemiBlockRequesterAE.class : SemiBlockRequester.class;

    registerSemiBlock(SemiBlockActiveProvider.ID, SemiBlockActiveProvider.class, false);
    registerSemiBlock(SemiBlockPassiveProvider.ID, SemiBlockPassiveProvider.class, false);
    registerSemiBlock(SemiBlockStorage.ID, SemiBlockStorage.class, false);
    registerSemiBlock(SemiBlockDefaultStorage.ID, SemiBlockDefaultStorage.class, false);
    registerSemiBlock(SemiBlockRequester.ID, requesterClass, false);
    registerSemiBlock("heatFrame", SemiBlockHeatFrame.class);

    PneumaticCraft.proxy.registerSemiBlockRenderer((ItemSemiBlockBase)Itemss.logisticsFrameRequester);
    SemiBlockManager.registerSemiBlockToItemMapping(requesterClass, Itemss.logisticsFrameRequester);

    PneumaticCraft.proxy.registerSemiBlockRenderer((ItemSemiBlockBase)Itemss.logisticsFrameDefaultStorage);
    SemiBlockManager.registerSemiBlockToItemMapping(SemiBlockDefaultStorage.class, Itemss.logisticsFrameDefaultStorage);

    PneumaticCraft.proxy.registerSemiBlockRenderer((ItemSemiBlockBase)Itemss.logisticsFrameStorage);
    SemiBlockManager.registerSemiBlockToItemMapping(SemiBlockStorage.class, Itemss.logisticsFrameStorage);

    PneumaticCraft.proxy.registerSemiBlockRenderer((ItemSemiBlockBase)Itemss.logisticsFramePassiveProvider);
    SemiBlockManager.registerSemiBlockToItemMapping(SemiBlockPassiveProvider.class, Itemss.logisticsFramePassiveProvider);

    PneumaticCraft.proxy.registerSemiBlockRenderer((ItemSemiBlockBase)Itemss.logisticsFrameActiveProvider);
    SemiBlockManager.registerSemiBlockToItemMapping(SemiBlockActiveProvider.class, Itemss.logisticsFrameActiveProvider);
}
 
Example 10
Source Project: SimplyJetpacks   Source File: CommonProxy.java    License: MIT License 5 votes vote down vote up
public void registerHandlers() {
    SimplyJetpacks.logger.info("Registering handlers");
    NetworkRegistry.INSTANCE.registerGuiHandler(SimplyJetpacks.instance, new GuiHandler());
    FMLCommonHandler.instance().bus().register(new SyncHandler());
    FMLCommonHandler.instance().bus().register(new PlatingReturnHandler());
    MinecraftForge.EVENT_BUS.register(new EntityInteractHandler());
    MinecraftForge.EVENT_BUS.register(new LivingTickHandler());
}
 
Example 11
Source Project: ForgeHax   Source File: RenderEventService.java    License: MIT License 5 votes vote down vote up
@SubscribeEvent(priority = EventPriority.LOW)
public void onRenderGameOverlayEvent(final RenderGameOverlayEvent.Text event) {
  if (event.getType().equals(RenderGameOverlayEvent.ElementType.TEXT)) {
    MinecraftForge.EVENT_BUS.post(new Render2DEvent(event.getPartialTicks()));
    GlStateManager.color(1.f, 1.f, 1.f, 1.f); // reset color
  }
}
 
Example 12
Source Project: PneumaticCraft   Source File: ClientProxy.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public void registerHandlers(){
    super.registerHandlers();
    MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
    FMLCommonHandler.instance().bus().register(new ClientEventHandler());

    MinecraftForge.EVENT_BUS.register(HUDHandler.instance());
    FMLCommonHandler.instance().bus().register(HUDHandler.instance());
    FMLCommonHandler.instance().bus().register(ClientTickHandler.instance());
    FMLCommonHandler.instance().bus().register(getHackTickHandler());
    FMLCommonHandler.instance().bus().register(clientHudHandler = new CommonHUDHandler());
    MinecraftForge.EVENT_BUS.register(new ClientSemiBlockManager());

    MinecraftForge.EVENT_BUS.register(HUDHandler.instance().getSpecificRenderer(CoordTrackUpgradeHandler.class));
    MinecraftForge.EVENT_BUS.register(AreaShowManager.getInstance());
    FMLCommonHandler.instance().bus().register(AreaShowManager.getInstance());

    FMLCommonHandler.instance().bus().register(KeyHandler.getInstance());
    ThirdPartyManager.instance().clientSide();

    /*  if(Config.enableUpdateChecker) {
          UpdateChecker.instance().start();
          FMLCommonHandler.instance().bus().register(UpdateChecker.instance());
      }*/
    EntityTrackHandler.registerDefaultEntries();
    getAllKeybindsFromOptionsFile();
    new IGWSupportNotifier();
}
 
Example 13
Source Project: malmo   Source File: RewardForPossessingItemImplementation.java    License: MIT License 5 votes vote down vote up
@Override
public void prepare(MissionInit missionInit) {
    super.prepare(missionInit);
    MinecraftForge.EVENT_BUS.register(this);
    possessedItems = new HashMap<String, Integer>();
    maxPossessedItems = new HashMap<String, Integer>();
}
 
Example 14
Source Project: Chisel-2   Source File: PlayerSpecials.java    License: GNU General Public License v2.0 5 votes vote down vote up
private PlayerSpecials() {
	RenderHolstered backChisel = new RenderHolstered(new ItemStack(ChiselItems.obsidianChisel));
	RenderTranslucent translucent = new RenderTranslucent();

	renderMap.putAll(UUID.fromString("a7529984-8cb2-4fb9-b799-97980f770101"), Lists.newArrayList(backChisel, translucent)); // Cricket
       renderMap.putAll(UUID.fromString("a1d2532b-ee11-4ca3-b4c5-76e168d4c98e"), Lists.newArrayList(backChisel, translucent)); // TheCricket26
	renderMap.putAll(UUID.fromString("5399b615-3440-4c66-939d-ab1375952ac3"), Lists.newArrayList(backChisel, translucent)); // Drullkus

	renderMap.put(UUID.fromString("671516b1-4fb3-4c03-aa7c-9c88cfab3ae8"), new RenderHolstered(new ItemStack(ChiselItems.diamondChisel))); // tterrag
	renderMap.put(UUID.fromString("ad18f501-08fa-4e7e-b324-86750009106e"), new RenderHolstered(new ItemStack(ChiselItems.chisel)));//minecreatr

	MinecraftForge.EVENT_BUS.register(this);
}
 
Example 15
Source Project: TFC2   Source File: GuiAnvil.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void mouseClickMove(int mouseX, int mouseY, int clickedMouseButton, long timeSinceLastClick) 
{
	if (clickedMouseButton == 0)
	{
		for (int l = 0; l < this.buttonList.size(); ++l)
		{
			GuiButton guibutton = (GuiButton)this.buttonList.get(l);

			if (guibutton.mousePressed(this.mc, mouseX, mouseY))
			{
				ActionPerformedEvent.Pre event = new ActionPerformedEvent.Pre(this, guibutton, this.buttonList);
				if (MinecraftForge.EVENT_BUS.post(event))
					break;

				if(selectedButton == event.getButton())
					continue;
				else
				{
					this.mouseReleased(mouseX, mouseY, 0);
				}

				this.selectedButton = event.getButton();
				event.getButton().playPressSound(this.mc.getSoundHandler());
				this.actionPerformed(event.getButton());
				if (this.equals(this.mc.currentScreen))
					MinecraftForge.EVENT_BUS.post(new ActionPerformedEvent.Post(this, event.getButton(), this.buttonList));
			}
		}
	}
}
 
Example 16
Source Project: malmo   Source File: RewardForCollectingItemImplementation.java    License: MIT License 5 votes vote down vote up
@Override
public void prepare(MissionInit missionInit)
{
    super.prepare(missionInit);
    MinecraftForge.EVENT_BUS.register(this);
    MalmoMod.MalmoMessageHandler.registerForMessage(this, MalmoMessageType.SERVER_COLLECTITEM);
}
 
Example 17
Source Project: NotEnoughItems   Source File: ServerHandler.java    License: MIT License 5 votes vote down vote up
public static void init() {
    instance = new ServerHandler();

    PacketCustom.assignHandler(NEICPH.channel, new NEISPH());
    FMLCommonHandler.instance().bus().register(instance);
    MinecraftForge.EVENT_BUS.register(instance);

    Item.getItemFromBlock(Blocks.mob_spawner).setHasSubtypes(true);
    NEIActions.init();
}
 
Example 18
@Inject(method = "sendWatchPackets", at = @At("HEAD"))
private void fireWatchEvents(ServerPlayerEntity player, ChunkPos pos, Packet<?>[] packets, boolean withinMaxWatchDistance, boolean withinViewDistance, CallbackInfo callback) {
	if (withinViewDistance && !withinMaxWatchDistance) {
		ChunkWatchEvent.Watch event = new ChunkWatchEvent.Watch(player, pos, world);

		MinecraftForge.EVENT_BUS.post(event);
	}
}
 
Example 19
Source Project: EnderZoo   Source File: EnderZoo.java    License: Creative Commons Zero v1.0 Universal 5 votes vote down vote up
@EventHandler
 public void preInit(FMLPreInitializationEvent event) {
  
MinecraftForge.EVENT_BUS.register(new RegistryHandler());
  
   itemForCreativeMenuIcon = ItemForCreativeMenuIcon.create();

   Config.load(event);
   
   itemWitheringDust = ItemWitheringDust.create();
   itemConfusingDust = ItemConfusingDust.create();
   itemEnderFragment = ItemEnderFragment.create();
   itemGuardiansBow = ItemGuardiansBow.create();   
   itemOwlEgg = ItemOwlEgg.create();

   if (Config.confusingChargeEnabled) {
     blockConfusingCharge = BlockConfusingCharge.create();
   }
   if (Config.enderChargeEnabled) {
     blockEnderCharge = BlockEnderCharge.create();
   }
   if (Config.concussionChargeEnabled) {
     blockConcussionCharge = BlockConcussionCharge.create();
   }
   potions = new Potions();

   FMLInterModComms.sendMessage("waila", "register", "crazypants.enderzoo.waila.WailaCompat.load");
   proxy.preInit();
 }
 
Example 20
@Override
public void init(FMLInitializationEvent e) {
	super.init(e);
	registerTintedBlocks();
	registerTintedItems();
	MinecraftForge.EVENT_BUS.register(this);
	this.onRegisterRender();
}
 
Example 21
Source Project: Custom-Main-Menu   Source File: GuiCustom.java    License: MIT License 5 votes vote down vote up
@Override
protected void actionPerformed(GuiButton button) throws IOException
{
	if (button instanceof GuiCustomWrappedButton && this.guiConfig.name.equals("mainmenu"))
	{
		GuiCustomWrappedButton wrapped = (GuiCustomWrappedButton) button;
		if (wrapped.wrappedButton != null)
		{
			ActionPerformedEvent.Pre event = new ActionPerformedEvent.Pre(new GuiFakeMain(), wrapped.wrappedButton, new ArrayList<GuiButton>());
			if (MinecraftForge.EVENT_BUS.post(event))
			{
				return;
			}
			event.getButton().playPressSound(this.mc.getSoundHandler());
			if (this.equals(this.mc.currentScreen))
			{
				MinecraftForge.EVENT_BUS.post(new ActionPerformedEvent.Post(new GuiFakeMain(), wrapped.wrappedButton, new ArrayList<GuiButton>()));
			}
		}
	}
	else if (button.id >= 6000 && button instanceof GuiCustomButton)
	{
		GuiCustomButton custom = (GuiCustomButton) button;
		// It's one of mine :o
		if (custom.b.action != null)
		{
			custom.b.action.perform(custom.b, this);
		}
	}
}
 
Example 22
Source Project: spark   Source File: ForgeClientSparkPlugin.java    License: GNU General Public License v3.0 5 votes vote down vote up
public static void register(ForgeSparkMod mod, FMLClientSetupEvent event) {
    Minecraft minecraft = event.getMinecraftSupplier().get();

    ForgeClientSparkPlugin plugin = new ForgeClientSparkPlugin(mod, minecraft);
    MinecraftForge.EVENT_BUS.register(plugin);

    plugin.scheduler.scheduleWithFixedDelay(plugin::checkCommandRegistered, 10, 10, TimeUnit.SECONDS);
}
 
Example 23
Source Project: TinkersToolLeveling   Source File: ModToolLeveling.java    License: MIT License 5 votes vote down vote up
public ModToolLeveling() {
  super("toolleveling", 0xffffff);

  aspects.clear();
  addAspects(new ModifierAspect.DataAspect(this));

  MinecraftForge.EVENT_BUS.register(this);
}
 
Example 24
Source Project: TFC2   Source File: ClientProxy.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
public void postInit(FMLPostInitializationEvent event)
{
	super.postInit(event);
	MinecraftForge.EVENT_BUS.register(new ModelBakeHandler());
	MinecraftForge.EVENT_BUS.register(new SmallVesselHighlightHandler());
}
 
Example 25
Source Project: Gadomancy   Source File: ClientProxy.java    License: GNU Lesser General Public License v3.0 5 votes vote down vote up
@Override
public void postInitalize() {
    IResourceManager manager = Minecraft.getMinecraft().getResourceManager();
    if(manager instanceof SimpleReloadableResourceManager) {
        SimpleReloadableResourceManager rm = (SimpleReloadableResourceManager) manager;
        rm.registerReloadListener(ResourceReloadListener.getInstance());
    }

    MinecraftForge.EVENT_BUS.register(EffectHandler.getInstance());
    MinecraftForge.EVENT_BUS.register(new RenderEventHandler());

    FMLCommonHandler.instance().bus().register(new ClientHandler());

    super.postInitalize();
}
 
Example 26
Source Project: OpenModsLib   Source File: VanillaAnvilLogic.java    License: MIT License 5 votes vote down vote up
private boolean onAnvilChange(@Nonnull ItemStack inputItem, @Nonnull ItemStack modifierItem, String itemName, int baseCost) {
	AnvilUpdateEvent e = new AnvilUpdateEvent(inputItem, modifierItem, itemName, baseCost);
	if (MinecraftForge.EVENT_BUS.post(e)) return false;
	if (!e.getOutput().isEmpty()) {
		this.outputStack = e.getOutput();
		this.maximumCost = e.getCost();
		this.materialCost = e.getMaterialCost();
		return false;
	}
	return true;
}
 
Example 27
Source Project: IGW-mod   Source File: GuiWiki.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void setCurrentFile(ItemStack stack){
    String defaultName = WikiRegistry.getPageForItemStack(stack);
    if(defaultName == null) defaultName = stack.getUnlocalizedName().replace("tile.", "block/").replace("item.", "item/");
    ItemWikiEvent wikiEvent = new ItemWikiEvent(stack, defaultName);
    MinecraftForge.EVENT_BUS.post(wikiEvent);
    if(stack != null) {
        stack = stack.copy();
        //            stack.stackSize = 1;
        stack.setCount(1);
    }

    setCurrentFile(wikiEvent.pageOpened, stack);
}
 
Example 28
Source Project: customstuff4   Source File: ToolTip.java    License: GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void doInit(InitPhase phase, ContentHelper helper)
{
    stack = item.getItemStack();

    MinecraftForge.EVENT_BUS.register(this);
}
 
Example 29
Source Project: HoloInventory   Source File: ClientEventHandler.java    License: MIT License 5 votes vote down vote up
public static void init()
{
    if (instance != null) MinecraftForge.EVENT_BUS.unregister(instance);
    instance = new ClientEventHandler();
    MinecraftForge.EVENT_BUS.register(new ClientEventHandler());

    keyHold = new KeyBinding("Hold to show", KeyConflictContext.IN_GAME, Keyboard.KEY_H, HoloInventory.MODID);
    keyToggle = new KeyBinding("Toggle to show", KeyConflictContext.IN_GAME, 0, HoloInventory.MODID);
    ClientRegistry.registerKeyBinding(keyHold);
    ClientRegistry.registerKeyBinding(keyToggle);
}
 
Example 30
Source Project: AdvancedRocketry   Source File: EntityElevatorCapsule.java    License: MIT License 5 votes vote down vote up
@Override
public void useNetworkData(EntityPlayer player, Side side, byte id,
		NBTTagCompound nbt) {
	if(id == PACKET_WRITE_DST_INFO && world.isRemote) {
		if(nbt.hasKey("dimid")) {
			dstTilePos = new DimensionBlockPosition(nbt.getInteger("dimid"), new HashedBlockPosition(nbt.getInteger("x"), nbt.getInteger("y"), nbt.getInteger("z")));
		}
		else dstTilePos = null;
	}
	else if(id == PACKET_WRITE_SRC_INFO && world.isRemote) {
		if(nbt.hasKey("dimid")) {
			srcTilePos = new DimensionBlockPosition(nbt.getInteger("dimid"), new HashedBlockPosition(nbt.getInteger("x"), nbt.getInteger("y"), nbt.getInteger("z")));
		}
		else srcTilePos = null;
	}
	else if(id == PACKET_RECIEVE_NBT) {
		PacketHandler.sendToPlayersTrackingEntity(new PacketEntity(this, PACKET_WRITE_DST_INFO), this);
	}
	else if(id == PACKET_LAUNCH_EVENT && world.isRemote) {
		List<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, getEntityBoundingBox());
		for(Entity ent : list) {
			if(this.getRidingEntity() == null)
				ent.startRiding(this);
		}

		MinecraftForge.EVENT_BUS.post(new RocketEvent.RocketLaunchEvent(this));
	}
	else if(id == PACKET_DEORBIT && world.isRemote) {
		MinecraftForge.EVENT_BUS.post(new RocketEvent.RocketDeOrbitingEvent(this));
	}
}