Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

deenkayros

Members
  • Joined

  • Last visited

Everything posted by deenkayros

  1. Not exactly, I mean the other animation ...
  2. Hi, How can I force the animation like when you makes a right-click on a block with any tool item (axe, pickaxe, ...) ?
  3. And If I use an existing vanilla variable like "timeUntilPortal" = X while I'm grabbing the entity? where "X" = unusual number ...
  4. I found this code: @SubscribeEvent public void onEntityUpdate(LivingUpdateEvent event) throws InterruptedException { } But I need to get the current player that is grabbing it ... It would be perfect if i can set a "grabber-id" variable on the entity with which to obtain the player.. or How can i do it?
  5. how? ... I refer to a vanilla entity ...
  6. Hi, I need to cancel or make ineffective the onLivingUpdate() event of a specific Entity ... in order to make the Entity totally immobile. Thank in advance. PS: I tried to set the "motion" properties but the entity seems however trying to walk...
  7. Yes, I added this code but nothing to do: entity.motionX = entity.motionZ = entity.motionY = 0.0D; The code is called by the item right click event on the entity ("itemInteractionForEntity") but the entity goes up and down like a glitch ...in short, I need to cancel the event (updateEntity or livingUpdate) where the entity perform the fall ...
  8. I tried to change any value but nothing works.... seems i'm using the wrong methods/fields/functions ...
  9. Hello, I need to grab an entity and keep it stationary in air, i tried this code but it still trying to fall: x = player.posX + player.getLookVec().xCoord; y = player.posY + player.getLookVec().yCoord; z = player.posZ + player.getLookVec().zCoord; entity.prevPosX = x; entity.prevPosY = y; entity.prevPosZ = z; entity.setPosition(x, y, z); entity.fallDistance = 0.0F; entity.onGround = false; entity.isAirBorne = true; entity.timeUntilPortal = 5; entity.setInWeb(); help....
  10. Hello, I need to get the Entity in front to me by Right click Item...
  11. I mean the packet ... but nevermind
  12. Thank You, now works!!! BUT I'm already on server side and I still need to cast the EntityPlayerMP, here my code: @SubscribeEvent public void onPlayerTick(PlayerTickEvent event) { if (!event.player.worldObj.isRemote) { for (int s = 0; s < 9; ++s) { if (event.player.inventory.getStackInSlot(s) != null) { if (event.player.inventory.getStackInSlot(s).getItem() == MyItem) { event.player.inventory.currentItem = s; EntityPlayerMP playerMP = (EntityPlayerMP) event.player; playerMP.inventory.currentItem = s; playerMP.playerNetServerHandler.sendPacket(new S09PacketHeldItemChange(playerMP.inventory.currentItem)); } } } } Also I mean, if I need to send the package anyway?
  13. I can't find the player method "playerNetServerHandler"
  14. Hi, How can I change the current slot selected in hotbar? (not the held item) Thanks in advance ...
  15. ok, sorry for delay, I moved all my code into the "onBlockActivate" event: public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { if (player.isSneaking()) { if (player.getCurrentEquippedItem() != null) TileEntityPortalSticky tileentitySticky = (TileEntityPortalSticky)world.getTileEntity(x, y, z); } return false; } But seems dont call the event when the player is sneaked ... is it possible?
  16. Hi, How can I get an existing TileEntity by item right-click? This code get always myTile = null: myTileEntity myTile = (myTileEntity)world.getTileEntity(x, y, z); Instead on own block onUpdateTick event, the same code work fine o_O please help ...
  17. then how can i get the "registredName" ?
  18. The mod is surely loaded because i check it into my mod "PostInit": @EventHandler public void PostInit(FMLPostInitializationEvent PostEvent) { ExtraUtilsMod = Loader.isModLoaded("ExtraUtilities"); } And I found the string name "tile.extrautils:cobblestone_compressed" using block.getUnlocalizedName() func ... then I have no idea ...
  19. Hello, This code give me a NPE because I trying to create an instance of outer mod installed block ("ExtraUtils"): new ItemStack(Item.getItemFromBlock(Block.getBlockFromName("tile.extrautils:cobblestone_compressed")), 1, 0) What is the right func/method to make it, if it possible? thank you ...
  20. Hello, How can I force the Xp Bar update/refresh? I mean, What is the method/function/field that makes it? thanks in advance ...
  21. Hello, I successfully compiled without errors my mod but now it shows a warning: warning: [options] bootstrap class path not set in conjunction with -source 1.6 Note: C:\Users\7ed\Desktop\Forge 1.7.10b\build\sources\java\com\mymod\main \mymod.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 warning I tried to compile it with -Xlint:deprecated option but can't recognize it ....
  22. hellooo, This function destroys the block with own default drop: playerEntity.worldObj.func_147480_a(xHit, yHit, zHit, true); ..but if I need the original block item (i.e. silk touched) Which func I should use? thanks in advance...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.