Making Flying Armor

Started by Spaceguy230 on Sun, 01/24/2016 - 00:00
Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Making Flying Armor
Sun, 01/24/2016 - 00:00

I am making an armor mod that has completely cusomizable armors in it but I have run into a problem. I want to make an armor that makes the player able to fly like they were playing in creative mode. I have looked up how to make that possible and I found a couple places that people showed code that they entered to make this possible. But when I put the same code in my mod on a test armor, I just get errors. And I can't test or extract my mod. Can someone please help me figure out how to make the armor fly? Thank You.

Don't Forget To Be Awesome!

-Spaceguy230

 

Last seen on 00:30, 7. May 2018
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
AD SOME P-B AND J TO IT!!!!
Sun, 01/24/2016 - 03:39

AD SOME P-B AND J TO IT!!!!

Last seen on 00:30, 7. May 2018
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
FIRST TO COMMENT OHHHHHHHHH
Sun, 01/24/2016 - 03:41

FIRST TO COMMENT OHHHHHHHHH

Last seen on 01:53, 17. Mar 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
if(true){    if(true){if
Sun, 01/24/2016 - 05:00

if(true){
    if(true){
if(world.isRemote)
entity.capabilities.allowFlying = true;
}

for the actual flight, and this is for the surviving if they choose to stop

if(true){
{
    entity.fallDistance = 0.0F;
}

Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:if(true){    if(true){if
Sun, 01/24/2016 - 16:01

@#3 Where do I put this code?

Last seen on 01:53, 17. Mar 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:if(true){    if(true){if
Sun, 01/24/2016 - 18:48

@#3.1 Right In the armor, put the top code in the chestplate or a piece of the armor in the tick event, then place the bottom code in the tick event for the boot or any other piece of the armor where the top code isn't. Don't have both sets of code in one piece of armor, and you only need the code in one piece of the armor i.e the top code in the armor, and the bottom code in the boots.

Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:RE:if(true){    if(true){if
Mon, 01/25/2016 - 01:07

@#3.1.1 I made an armor called FlyingArmor and I inserted the top code onto the chestplate. And the bottom code on the boots. Both codes were inserted through the tick event "Custom Code" for the respective armor piece. When I try to recompile the code, I get multiple errors.

Here is my log:
[spoiler]Executing gradle command: clean build
MCreator was not able to connect to the internet. Gradle tasks are not going to work.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:\Pylo\MCreator162>cd forge
C:\Pylo\MCreator162\forge>SET "JAVA_HOME=C:\Pylo\MCreator162\jdk64\"
C:\Pylo\MCreator162\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator162\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator162\forge>SET "JAVA_OPTS=-Xmx2048m -Xms625m"
C:\Pylo\MCreator162\forge>gradlew clean build
This set of MCP mappings was designed for MC 1.8.8. Use at your own peril.
#################################################
         ForgeGradle 2.1-SNAPSHOT-8267717        
  https://github.com/MinecraftForge/ForgeGradle  
#################################################
               Powered by MCP unknown               
             http://modcoderpack.com             
         by: Searge, ProfMobius, Fesh0r,         
         R4wk, ZeuX, IngisKahn, bspkrs           
#################################################
:clean
:deobfCompileDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:applyBinaryPatches SKIPPED
:deobfProvidedDummyTask
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:deobfMcMCP SKIPPED
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:155: error: illegal start of type
}).setUnlocalizedName("FlyingArmor_body");body.setMaxStackSize(1);
 ^
C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:155: error: ';' expected
}).setUnlocalizedName("FlyingArmor_body");body.setMaxStackSize(1);
  ^
C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:155: error: invalid method declaration; return type required
}).setUnlocalizedName("FlyingArmor_body");body.setMaxStackSize(1);
   ^
C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:155: error: illegal start of type
}).setUnlocalizedName("FlyingArmor_body");body.setMaxStackSize(1);
                      ^
C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:155: error:  expected }).setUnlocalizedName("FlyingArmor_body");body.setMaxStackSize(1);                                                               ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:155: error: illegal start of type }).setUnlocalizedName("FlyingArmor_body");body.setMaxStackSize(1);                                                                ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:156: error: expected legs = (new ItemArmor(enuma, armorPreffix, 2){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){     ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:161: error: expected }).setUnlocalizedName("FlyingArmor_leggins");legs.setMaxStackSize(1);                                                                  ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:161: error: illegal start of type }).setUnlocalizedName("FlyingArmor_leggins");legs.setMaxStackSize(1);                                                                   ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:162: error: expected boots = (new ItemArmor(enuma, armorPreffix, 3){public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack){      ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:174: error: illegal start of type }).setUnlocalizedName("FlyingArmor_boots");boots.setMaxStackSize(1);  ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:174: error: ';' expected }).setUnlocalizedName("FlyingArmor_boots");boots.setMaxStackSize(1);   ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:174: error: invalid method declaration; return type required }).setUnlocalizedName("FlyingArmor_boots");boots.setMaxStackSize(1);    ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:174: error: illegal start of type }).setUnlocalizedName("FlyingArmor_boots");boots.setMaxStackSize(1);                       ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:174: error: expected }).setUnlocalizedName("FlyingArmor_boots");boots.setMaxStackSize(1);                                                                 ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:174: error: illegal start of type }).setUnlocalizedName("FlyingArmor_boots");boots.setMaxStackSize(1);                                                                  ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:176: error: expected GameRegistry.registerItem(helmet, "FlyingArmor_head");                          ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:176: error: expected GameRegistry.registerItem(helmet, "FlyingArmor_head");                                 ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:176: error: illegal start of type GameRegistry.registerItem(helmet, "FlyingArmor_head");                                   ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:177: error: expected GameRegistry.registerItem(body, "FlyingArmor_body");                          ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:177: error: expected GameRegistry.registerItem(body, "FlyingArmor_body");                               ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:177: error: illegal start of type GameRegistry.registerItem(body, "FlyingArmor_body");                                 ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:178: error: expected GameRegistry.registerItem(legs, "FlyingArmor_leggins");                          ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:178: error: expected GameRegistry.registerItem(legs, "FlyingArmor_leggins");                               ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:178: error: illegal start of type GameRegistry.registerItem(legs, "FlyingArmor_leggins");                                 ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:179: error: expected GameRegistry.registerItem(boots, "FlyingArmor_boots");                          ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:179: error: expected GameRegistry.registerItem(boots, "FlyingArmor_boots");                                ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:179: error: illegal start of type GameRegistry.registerItem(boots, "FlyingArmor_boots");                                  ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:181: error: ')' expected }  ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:183: error: reached end of file while parsing }  ^ C:\Pylo\MCreator162\forge\build\sources\main\java\mod\mcreator\mcreator_testArmor.java:184: error: reached end of file while parsing 31 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. * Try: BUILD FAILED Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Total time: 27.467 secs C:\Pylo\MCreator162\forge> Task completed with return code 0 in 28138 milliseconds[/spoiler]

What am I doing wrong?

 

Last seen on 01:53, 17. Mar 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:RE:RE:if(true){    if(true){if
Mon, 01/25/2016 - 05:41

@#3.1.1.1 It's hard to tell what is going on for me at least, maybe remove the armor and try again, this is where I learned how to to do it. 
https://www.youtube.com/watch?v=s6rNBiex8Vk
 

 

Last seen on 20:45, 14. May 2016
Joined Jan 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You could add jump boost
Mon, 01/25/2016 - 08:02

You could add jump boost effect and amplify it a lot so it looks like you were flying, other than that i don't have anything. Hope it helps.

 

Last seen on 15:36, 13. Nov 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:RE:RE:RE:if(true){    if(true){if
Tue, 01/26/2016 - 00:49

@#3.1.1.1.1 I found where you messed up. In the original code you put in the post, you put 2 "if(true){" statements in their. You had the right code, you just added a little bit to it that broke the code. Thanks for the help.

Last seen on 01:53, 17. Mar 2016
Joined May 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:RE:RE:RE:RE:if(true){    if(true){if
Tue, 01/26/2016 - 02:11

@#3.1.1.1.1.1  sorry about that XD