Everything posted by D3_M0N
-
Problem: MCPC-Plus 1.4.7: Use plugin method in forge mod
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");
-
[1.7.10] feed player
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....
-
[1.7.10] feed player
public void addStats(int p_75122_1_, float p_75122_2_) thats my problem
-
[1.7.10] feed player
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);
-
[1.7.10] feed player
yea ive locked there. i dont know what event ive to use..... im stuck on this for like 4 hrs now.........
-
[1.7.10] feed player
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^^
-
[1.7.10] Custom Bow FOV change ?[SOLVED]
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^^
-
[1.7.10] Custom Bow FOV change ?[SOLVED]
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.
-
[1.7.10] check if attack was a crit (Problem)[SOLVED]
hmm iam stupid got it now.......
-
[1.7.10] check if attack was a crit (Problem)[SOLVED]
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!!!! {
-
[1.7.10] Adding Splash Potion to shapeless recipe?!
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...
-
[1.7.10] Adding Splash Potion to shapeless recipe?!
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-.-
-
[1.7.10] Adding Splash Potion to shapeless recipe?!
nvm ive the wrong ids... has someone a 1.7 id list for potions?
-
[1.7.10] Adding Splash Potion to shapeless recipe?!
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.
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
Ok know it works thank you for your patience
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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; } } }
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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:-()
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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...
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
ive just edited my post
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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...
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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?!
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
... 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));
-
[1.7.10] copying damage value from one Item to another Item[SOLVED]
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));
IPS spam blocked by CleanTalk.