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.

D3_M0N

Members
  • Joined

  • Last visited

Everything posted by D3_M0N

  1. Hi, ive a problem: iam trying to use a plugin method in my forge mod. the plugin is my own and calls an custom event that i use in my other plugins... the mod throws an class not fount exception even if i use pluginmanager.getplugin to call it.... has someone an idea how i can fix it? PluginManager pm = Bukkit.getServer().getPluginManager(); ForgeEventCompat fec = (ForgeEventCompat) pm.getPlugin("ForgeEventCompat");
  2. ok ive got it to do what i want:-) the next problem is i need something that does this with it. check if .getSaturationLevel() is 19 wait a few seconds add 1 check if .getSaturationLevel() is 18 wait a few seconds add 1 i try to slow down the time the SaturationLevel decrease....
  3. public void addStats(int p_75122_1_, float p_75122_2_) thats my problem
  4. ok now ive got something my hunger is now stuck @20 can someone tell me what is the int and float of that player.getFoodStats().addStats(3, 10F);
  5. yea ive locked there. i dont know what event ive to use..... im stuck on this for like 4 hrs now.........
  6. hi again, i need to know how i can slow down the hunger of a player.... ive tryed a few methodes from the internet but nothing works..... has some one any ideas^^
  7. ive tried this in my bow class @SideOnly(Side.CLIENT) @SubscribeEvent public void onUpdateFOV(FOVUpdateEvent event) { float fov = event.fov; if( event.entity.isUsingItem() && event.entity.getItemInUse().getItem() == ItemVars.Bow1 ) { int duration = event.entity.getItemInUseDuration(); float multiplier = duration / 10.0F; if( multiplier > 1.0F ) { multiplier = 1.0F; } else { multiplier *= multiplier; } fov *= 1.0F - multiplier * 0.8F; } event.newfov = fov; } hmmmm wont work^^
  8. Hi, i need ot know how i get my custom bow to change the players FOV. i tryed some code but its to old to work with 1.7.10.
  9. hmm iam stupid got it now.......
  10. Heyho i need a little bit help.. again^^ how can i get this to work: public boolean hitEntity(ItemStack p_77644_1_, EntityLivingBase p_77644_2_, EntityLivingBase p_77644_3_, EntityPlayer entityplayer, Entity p_71059_1_) { p_77644_1_.damageItem(1, p_77644_3_); boolean flag = entityplayer.fallDistance > 0.0F && !entityplayer.onGround && !entityplayer.isOnLadder() && !entityplayer.isInWater() && !entityplayer.isPotionActive(Potion.blindness) && entityplayer.ridingEntity == null && p_71059_1_ instanceof EntityLivingBase; if(flag) { do this here!!!! {
  11. hmmm ive found another problem this works with 1 arrow and its only removing 1 arrow from my workbench on crafting GameRegistry.addShapelessRecipe(new ItemStack(SkyPvP.fireArrow1, , new ItemStack(Items.arrow,16), new ItemStack(Items.potionitem,1,16419)); i want it to take 16 arrows...
  12. thx for the reply:-) i got it now... the potion item ids are so fu.. up there are false potions in the game....... ive installed NIE to check this-.-
  13. nvm ive the wrong ids... has someone a 1.7 id list for potions?
  14. Hi, im back again with another stupid question^^ how can i add a splash potion to my recipe? new ItemStack(Items.potionitem,1,16387)); does not work..... it seems thats 16387 is not the right id........ btw normal potions do work.
  15. Ok know it works thank you for your patience
  16. Also: deine 3 sachen müssen die hier rein? und wenn ja wo bzw ich brauch ein beispiel da ich noch nicht alles in java/forge verstehe: oder muss ich die sachen in die main modfile packen? public static class Handler implements IMessageHandler<KeyMessage, IMessage> { @Override public IMessage onMessage(KeyMessage message, MessageContext ctx) { //String string = message.text; EntityPlayer player = ctx.getServerHandler().playerEntity; ItemStack hand = player.getCurrentEquippedItem(); int itemDamage = hand.getItemDamage(); if(player.getCurrentEquippedItem() != null) if(hand.getItem() == SkyPvP.testBow) { if(player.inventory.hasItem(Items.arrow)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(Items.bow, 1, (int) itemDamage)); System.out.println("Normal Bow"); } } else if(hand.getItem() == Items.bow) { if(player.inventory.hasItem(SkyPvP.fireArrow1)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(SkyPvP.testBow, 1, (int) itemDamage)); System.out.println("Test Bow"); } } return null; } } }
  17. ok I have now understood the concept but how do I bring it in my code...... my code: press button->packethandler: switch the current bow to another bow if my inv has its specific arrow in it. (ich sitze seit heut mittag an dem problem und werd noch wahnsinnig:-()
  18. sry but i think i dont get it.... EntityPlayer player = ctx.getServerHandler().playerEntity; ItemStack hand = player.getCurrentEquippedItem(); --> ItemStack oldBow = player.getCurrentEquippedItem(); --> ItemStack newBow = oldBow.copy(); int itemDamage = hand.getItemDamage(); if(player.getCurrentEquippedItem() != null) if(hand.getItem() == SkyPvP.testBow) { if(player.inventory.hasItem(Items.arrow)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(Items.bow, 1, (int) itemDamage)); System.out.println("Normal Bow"); } } else if(hand.getItem() == Items.bow) { if(player.inventory.hasItem(SkyPvP.fireArrow1)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(SkyPvP.testBow, 1, (int) itemDamage)); System.out.println("Test Bow"); } } return null; } } newBow.func_150996_a(theOtherBowItem); // setItem ive no idea what to do with this...
  19. yea ive tryed that but i just dont how i add the "NBTTagList enchantment" NBTTagList enchantment = hand.getEnchantmentTagList(); <----thats what ive tryed but i dont know what i need to add here: player.inventory.addItemStackToInventory(new ItemStack(Items.bow, 1, (int) itemDamage)); sry that i ask so easy things... i just dont get it right...
  20. i think that will not work for my code since i use 2 diferent bows... public static class Handler implements IMessageHandler<KeyMessage, IMessage> { @Override public IMessage onMessage(KeyMessage message, MessageContext ctx) { //String string = message.text; EntityPlayer player = ctx.getServerHandler().playerEntity; ItemStack hand = player.getCurrentEquippedItem(); int itemDamage = hand.getItemDamage(); if(player.getCurrentEquippedItem() != null) if(hand.getItem() == SkyPvP.testBow) { if(player.inventory.hasItem(Items.arrow)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(Items.bow, 1, (int) itemDamage)); System.out.println("Normal Bow"); } } else if(hand.getItem() == Items.bow) { if(player.inventory.hasItem(SkyPvP.fireArrow1)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(SkyPvP.testBow, 1, (int) itemDamage)); System.out.println("Test Bow"); } } return null; } } } hmmmm
  21. hmm now ive a new problem^^ i need to copy the enchantments the same way...... this time i dont think i will get this to work:-( can some one help me pls?!
  22. ... i got it myself int itemDamage = hand.getItemDamage(); if(player.getCurrentEquippedItem() != null) if(hand.getItem() == MYMod.testBow) { if(player.inventory.hasItem(Items.arrow)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(Items.bow, 1, (int) itemDamage));
  23. Heyho, iam trying to code a small PvP Mod and i need to copy the damage value from one Bow to another Bow..... ive absolutely no idea how to do this. it needs to work with this:D if(player.getCurrentEquippedItem() != null) if(hand.getItem() == MyMod.testBow) { if(player.inventory.hasItem(Items.arrow)){ player.inventory.setInventorySlotContents(player.inventory.currentItem, (ItemStack)null); player.inventory.addItemStackToInventory(new ItemStack(Items.bow));

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.