Shoot arrow power?

Started by AtlantiaKing11NL on Sat, 06/13/2015 - 18:11
Last seen on 17:27, 27. Mar 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Shoot arrow power?
Sat, 06/13/2015 - 18:12 (edited)

Hello!

I'm creating a TF2 mod with MCreator, but my question is:

Can i get a lower shoot arrow power then 1? (the default bow)

Cause i want to make something like a shotgun thing, so a shotgun don't shoot far, so the power needs to be lower.

 

Greetings!

Edited by AtlantiaKing11NL on Sat, 06/13/2015 - 18:12
Last seen on 19:05, 25. Feb 2017
Joined Jan 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
umm unfortunely I think you
Sat, 06/13/2015 - 18:26

umm unfortunely I think you will need to use a bit of coding

Last seen on 17:27, 27. Mar 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
i'm not so good with coding
Sat, 06/13/2015 - 18:48

i'm not so good with coding in MCreator...

Myabe i can get some help somewhere?

Greetings

Last seen on 16:38, 7. Aug 2018
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
... Maybe you could use 0.1
Sun, 06/14/2015 - 06:08

... Maybe you could use 0.1 or something in a decimal lower than 1.

Last seen on 17:27, 27. Mar 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
arrow power 0.1 errors:
Sun, 06/14/2015 - 10:42

arrow power 0.1 errors:

 

>C:\Pylo\MCreator156\forge\build\sources\java\mod\mcreator\mcreator_scattergun.java:150: error: no suitable constructor found for EntityArrow(World,EntityLivingBase,double)
>EntityArrow entityarrow = new EntityArrow(world, (EntityLivingBase)entity, 0.1 * 2.0F);
>                          ^
>    constructor EntityArrow.EntityArrow(World,EntityLivingBase,float) is not applicable
>      (actual argument double cannot be converted to float by method invocation conversion)
>    constructor EntityArrow.EntityArrow(World,EntityLivingBase,EntityLivingBase,float,float) is not applicable
>      (actual and formal argument lists differ in length)
>    constructor EntityArrow.EntityArrow(World,double,double,double) is not applicable
>      (actual and formal argument lists differ in length)
>    constructor EntityArrow.EntityArrow(World) is not applicable
>      (actual and formal argument lists differ in length)
>C:\Pylo\MCreator156\forge\build\sources\java\mod\mcreator\mcreator_scattergun.java:153: error: method playSoundAtEntity in class World cannot be applied to given types;
>world.playSoundAtEntity(entity, "random.bow", 1.0F, 1.0F / (0.5F * 0.4F + 1.2F) + 0.1 * 0.5F);
>     ^
>  required: Entity,String,float,float
>  found: EntityPlayer,String,float,double
>  reason: actual argument double cannot be converted to float by method invocation conversion
>C:\Pylo\MCreator156\forge\build\sources\java\mod\mcreator\mcreator_scattergun.java:163: error: no suitable constructor found for EntityArrow(World,EntityLivingBase,double)
>EntityArrow entityarrow = new EntityArrow(world, (EntityLivingBase)entity, 0.1 * 2.0F);
>                          ^
>    constructor EntityArrow.EntityArrow(World,EntityLivingBase,float) is not applicable
>      (actual argument double cannot be converted to float by method invocation conversion)
>    constructor EntityArrow.EntityArrow(World,EntityLivingBase,EntityLivingBase,float,float) is not applicable
>      (actual and formal argument lists differ in length)
>    constructor EntityArrow.EntityArrow(World,double,double,double) is not applicable
>      (actual and formal argument lists differ in length)
>    constructor EntityArrow.EntityArrow(World) is not applicable
>      (actual and formal argument lists differ in length)
>C:\Pylo\MCreator156\forge\build\sources\java\mod\mcreator\mcreator_scattergun.java:166: error: method playSoundAtEntity in class World cannot be applied to given types;
>world.playSoundAtEntity(entity, "random.bow", 1.0F, 1.0F / (0.5F * 0.4F + 1.2F) + 0.1 * 0.5F);
>     ^
>  required: Entity,String,float,float
>  found: EntityPlayer,String,float,double
>  reason: actual argument double cannot be converted to float by method invocation conversion
>4 errors
>:compileJava FAILED
>FAILURE: Build failed with an exception.
>* What went wrong:
>Execution failed for task ':compileJava'.
>> Compilation failed; see the compiler error output for details.
>BUILD FAILED
>Total time: 37.76 secs
>* Try:
>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
>C:\Pylo\MCreator156\forge>
>Task completed with return code 0 in 38432 milliseconds

Last seen on 14:06, 21. Sep 2018
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
in the source of gun is this:
Sun, 06/14/2015 - 11:19

in the source of gun is this:

 if (flag || par3EntityPlayer.inventory.hasItem(Items.redstone))
        {
            float f = 20.0F; (you gave maybe different number)

            EntityArrow entityarrow = new EntityArrow(par2World, par3EntityPlayer, f * 2.0F)
            {

 

change float f =  to 0.1;

Last seen on 17:27, 27. Mar 2016
Joined Jun 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Thanks! but now the name of
Sun, 06/14/2015 - 11:44

Thanks! but now the name of my gun glitches, it calls: Scattergun but in MC it's item.Scattergun2.name?

How can i fix this?

Last seen on 14:06, 21. Sep 2018
Joined Aug 2013
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
this is bug of mcreator
Sun, 06/14/2015 - 12:20

this is bug of mcreator

you have 2 options:

Wait to next update.

Or export the mod to zip, open the zip file and go to Assets/"Your mod name"/lang. open the file in it (en_US.lang). in this file find line with your gun name and open your mod in mcreator and correct the glitched name

 

FOR EXAMPLE:

My gun is named Potato Launcher. In the game is called item.PotatoLauncher.name.

The bug is in the en_US file where is instead of item.PotatoLauncher.name = Potato Launcher

item.potatoLauncher.name = Potato Launcher.

You must correct the first part of the line (item.potatoLauncher.name change to item.PotatoLauncher.name) and it will work on 100%