Jump to content

Recommended Posts

Posted

 

  Reveal hidden contents

 

 

Welp, is not compiling and giving me alot of error, im getting mad!

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Posted
  On 11/4/2016 at 6:29 PM, diesieben07 said:

What IDE are you using and how exactly did you set up the workspace?

 

Im recent to configuring IDE, and i tried using Netbeans & Eclipse, the error i got all from eclipse, and im using gradlew 1.10.2

 

The forge one, i followed all Tutorials.

Sorry, im newbie

Posted
  On 11/4/2016 at 6:46 PM, marcocorriero said:

We can talk in somewhere else? like skype or discord? , because i dont like refreshing every min the page lol

On the bottom-right of the page you can click the
Notify

button to notify you by email when there's a message in this thread.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted
  On 11/4/2016 at 6:53 PM, larsgerrits said:

  Quote

We can talk in somewhere else? like skype or discord? , because i dont like refreshing every min the page lol

On the bottom-right of the page you can click the
Notify

button to notify you by email when there's a message in this thread.

 

Thank you!, now help meh to edit this mod, it makes error in every way! i used 1.10.2 gradle, and is making error in all things with Field

Posted
  On 11/4/2016 at 6:55 PM, diesieben07 said:

  Quote
This tutorial is highly outdated. I suggest you follow the official documentation.

 

  Quote
We can talk in somewhere else? like skype or discord?
No thanks.

 

  Quote
because i dont like refreshing every min the page lol
Then don't.

 

I did all things, same errors....

Posted
  On 11/4/2016 at 7:06 PM, marcocorriero said:

  Quote

Describe step by step what you did.

 

After i did gradlew eclipse i opened it, same errors as compilation, maybe someone wanna help me with teamviewer?

Did you run gradlew setupDecompWorkspace?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 11/4/2016 at 7:07 PM, Animefan8888 said:

  Quote

  Quote

Describe step by step what you did.

 

After i did gradlew eclipse i opened it, same errors as compilation, maybe someone wanna help me with teamviewer?

Did you run gradlew setupDecompWorkspace?

 

yep, i did

 

  Quote

You did not follow the instructions then.

Try again, do not skip steps, do not change steps, do not pass go, do not collect $400.

 

  Quote
maybe someone wanna help me with teamviewer?
Hourly rates are $50 and up.

 

I did, same errors,

 

Why paid teamviewer? -.- is just a small forge mod editing...

Posted
  On 11/4/2016 at 7:11 PM, Animefan8888 said:

Then you did not describe step by step like Diesieben asked.

 

 

  Reveal hidden contents

 

 

 

Opening the Source of the mod, BOOM , alot of errors.

Posted
  On 11/4/2016 at 7:15 PM, diesieben07 said:

Are you even listening? Now you posted some random console log.

I want an exact description of every step you performed in order to set up this workspace.

So far you said you ran gradlew eclipse and opened eclipse. That is not how you set up a workspace. If you did something else, please describe it. Step by step, from start to finish.

 

Okay, i did Gradlew setup

 

after i did Gradlew eclipse,

 

When i set the eclipse workspace to the Eclipse folder 

I get MDKesample

I delete the testmod.java

and i import the Mod source.

 

There the errors

 

 

  Reveal hidden contents

 

Posted
  On 11/4/2016 at 7:21 PM, diesieben07 said:

  Quote
Okay, i did Gradlew setup
I am assuming you downloaded and unzipped the MDK? Also, you need to run the "setupDecompWorkspace" (or at least "setupDevWorkspace") task. Not the "setup" task.

 

  Quote
I get MDKesample
Please clarify.

 

  Quote
and i import the Mod source.
Please clarify.

 

I imported a one Mod released by McModding , is named BetterCreativeInventory, he uploaded the non-compiled jar as his latest release, i want to do some edits

 

MDKesample appears when i import eclipse folder generated by gradle.

Posted
  On 11/4/2016 at 7:33 PM, diesieben07 said:

  Quote
I imported a one Mod released by McModding , is named BetterCreativeInventory, he uploaded the non-compiled jar as his latest release, i want to do some edits
Do you have their permission? Why did you not specify this at first? From looking closer at the errors it appears as though you have an obfuscated version of the source code. Ask them to provide you with an unobfuscated version.

 

He released it into a Jar, look at his latest download https://minecraft.curseforge.com/projects/betterinventory

Posted

buddies i don't know what you did there but is really easy

 

you download forge

 

you do "gradlew setupDecompWorkspace" then "gradlew eclipse" in terminal

 

you import your mod into eclipse like project import existing project (do not import Java project or Gradle project it won't work)

 

edit gradle.build and add your modid in there (instead of test or whatever it defaults to) and if you use java 8 change 1.6 to 1.8. make sure your mod has @MODID with proper mod id and make sure it matches your gradle.build modid  (if it doesn't it won't work).

 

code your mod

 

then to compile "gradlew build" in terminal

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Posted
  On 11/4/2016 at 7:35 PM, marcocorriero said:

He released it into a Jar, look at his latest download https://minecraft.curseforge.com/projects/betterinventory

 

That's the download link for the mod file and is a compiled .jar file. I don't think Eclipse can read that. And if someone posts their mod for download that doesn't mean you have the right to change it. Did you get the permission from the mod author to do changes to the mod? If you didn't then i suppose you can still change stuff, only if you keep the modified version private and not give it to anyone else.

Posted
  On 11/4/2016 at 7:48 PM, Cerandior said:

  Quote

He released it into a Jar, look at his latest download https://minecraft.curseforge.com/projects/betterinventory

 

That's the download link for the mod file and is a compiled .jar file. I don't think Eclipse can read that. And if someone posts their mod for download that doesn't mean you have the right to change it. Did you get the permission from the mod author to do changes to the mod? If you didn't then i suppose you can still change stuff, only if you keep the modified version private and not give it to anyone else.

 

If you open with the winrar, you can notice the mod is not compiled, soo he released the source

 

https://minecraft.curseforge.com/projects/betterinventory/files/2327551

 

try to open this .jar with winrar.

the files are all .java

 

 

	field_146292_n.add(new GuiButton(100, 5, field_146295_m / 2 + 25, 20, 20, Chat.code(0) + "&0"));
	field_146292_n.add(new GuiButton(101, 30, field_146295_m / 2 + 25, 20, 20, Chat.code(1) + "&1"));
	field_146292_n.add(new GuiButton(102, 55, field_146295_m / 2 + 25, 20, 20, Chat.code(2) + "&2"));
	field_146292_n.add(new GuiButton(103, 80, field_146295_m / 2 + 25, 20, 20, Chat.code(3) + "&3"));
	field_146292_n.add(new GuiButton(104, 105, field_146295_m / 2 + 25, 20, 20, Chat.code(4) + "&4"));
	field_146292_n.add(new GuiButton(105, 130, field_146295_m / 2 + 25, 20, 20, Chat.code(5) + "&5"));
	field_146292_n.add(new GuiButton(106, 155, field_146295_m / 2 + 25, 20, 20, Chat.code(6) + "&6"));
	field_146292_n.add(new GuiButton(107, 180, field_146295_m / 2 + 25, 20, 20, Chat.code(7) + "&7"));
	field_146292_n.add(new GuiButton(108, 205, field_146295_m / 2 + 25, 20, 20, Chat.code( + "&8"));
	field_146292_n.add(new GuiButton(109, 230, field_146295_m / 2 + 25, 20, 20, Chat.code(9) + "&9"));
	field_146292_n.add(new GuiButton(110, 255, field_146295_m / 2 + 25, 20, 20, Chat.code("a") + "&a"));
	field_146292_n.add(new GuiButton(111, 280, field_146295_m / 2 + 25, 20, 20, Chat.code("b") + "&b"));
	field_146292_n.add(new GuiButton(112, 305, field_146295_m / 2 + 25, 20, 20, Chat.code("c") + "&c"));
	field_146292_n.add(new GuiButton(113, 330, field_146295_m / 2 + 25, 20, 20, Chat.code("d") + "&d"));
	field_146292_n.add(new GuiButton(114, 355, field_146295_m / 2 + 25, 20, 20, Chat.code("e") + "&e"));
	field_146292_n.add(new GuiButton(115, 380, field_146295_m / 2 + 25, 20, 20, Chat.code("f") + "&f"));
	field_146292_n.add(new GuiButton(116, 405, field_146295_m / 2 + 25, 20, 20, Chat.Obfuscated + "&k"));
	field_146292_n.add(new GuiButton(117, 430, field_146295_m / 2 + 25, 20, 20, Chat.Bold + "&l"));
	field_146292_n.add(new GuiButton(118, field_146294_l - 225, field_146295_m / 2, 20, 20, Chat.Strikethrough + "&m"));
	field_146292_n.add(new GuiButton(119, field_146294_l - 200, field_146295_m / 2, 20, 20, Chat.Underline + "&n"));
	field_146292_n.add(new GuiButton(120, field_146294_l - 175, field_146295_m / 2, 20, 20, Chat.Italic + "&o"));
	field_146292_n.add(new GuiButton(121, field_146294_l - 150, field_146295_m / 2, 20, 20, Chat.Reset + "&r"));

 

all errors are about those fields in every .java.

Posted

Do NOT try to export jar from your Eclipse. it will NOT work. You can only export and compile a mod using "gradlew build" in terminal.

 

If it won't compile it will tell you why. Fix the code and try again.

 

For example for me it said Lambdas are not supported. I looked it up and lambdas are a feature of Java 8 and my gradle.build had 1.6 compat support. So my Java was compiling for 1.6 . I changed that to 1.8 and it compiled. Read the errors !

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Posted
  On 11/4/2016 at 7:58 PM, trollworkout said:

Do NOT try to export jar from your Eclipse. it will NOT work. You can only export and compile a mod using "gradlew build" in terminal.

He is importing the mod not exporting. He needs to correctly deobfuscate it before it will work in a dev environment though.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Oh my bad. In the topic said "Help with Compiling a mod" not help with importing and deobfuscating a mod.  I didn't realize the discussion went that way.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Posted
  On 11/4/2016 at 7:59 PM, Animefan8888 said:

  Quote

Do NOT try to export jar from your Eclipse. it will NOT work. You can only export and compile a mod using "gradlew build" in terminal.

He is importing the mod not exporting. He needs to correctly deobfuscate it before it will work in a dev environment though.

 

Is a correct deobfuscated mod, i didnt decompiled it, if you extract this

 

https://minecraft.curseforge.com/projects/betterinventory/files/2327551

 

Is a source .jar...

Posted
  On 11/4/2016 at 8:01 PM, marcocorriero said:

  Quote

  Quote

Do NOT try to export jar from your Eclipse. it will NOT work. You can only export and compile a mod using "gradlew build" in terminal.

He is importing the mod not exporting. He needs to correctly deobfuscate it before it will work in a dev environment though.

 

Is a correct deobfuscated mod, i didnt decompiled it, if you extract this

 

 

 

https://minecraft.curseforge.com/projects/betterinventory/files/2327551

 

Is a source .jar...

 

oh, i did what he said, trying to compile with gradlew build, looks 1 error!

 

 

C:\Users\marco\Desktop\forge-1.10.2-12.18.2.2099-mdk (1)>gradlew build
This mapping 'snapshot_20160518' was designed for MC 1.9.4! Use at your own peri
l.
#################################################
         ForgeGradle 2.2-SNAPSHOT-c438b06
  https://github.com/MinecraftForge/ForgeGradle
#################################################
               Powered by MCP unknown
             http://modcoderpack.com
         by: Searge, ProfMobius, Fesh0r,
         R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:deobfCompileDummyTask
:deobfProvidedDummyTask
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Users\marco\Desktop\forge-1.10.2-12.18.2.2099-mdk (1)\build\sources\main\java
\mcmodding4k\betterinventory\Tabs\TabPotion.java:35: error: bad initializer for
for-loop
    for (NBT : array)
         ^
1 error
1 warning
: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:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 8.195 secs

C:\Users\marco\Desktop\forge-1.10.2-12.18.2.2099-mdk (1)>

 

here the code for the error class, cannot find it (im a newbie with java code) im trying to learn

 

package mcmodding4k.betterinventory.Tabs;

import java.util.List;
import mcmodding4k.betterinventory.util.ItemStacks;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.JsonToNBT;
import net.minecraft.nbt.NBTException;
import net.minecraft.potion.Potion;

public class TabPotion
  extends CreativeTabs
{
  public TabPotion(int id, String unlocalizedName)
  {
    super(id, unlocalizedName);
    func_78025_a("item_search.png");
  }
  
  public Item func_78016_d()
  {
    return Items.field_151068_bn;
  }
  
  public boolean hasSearchBar()
  {
    return true;
  }
  
  public void func_78018_a(List<ItemStack> p_78018_1_)
  {
    String[] array = { "{AttributeModifiers:[{AttributeName:\"generic.maxHealth\",Name:\"generic.maxHealth\",Amount:20,Operation:0,UUIDLeast:967858,UUIDMost:899140}]}", "{AttributeModifiers:[{AttributeName:\"generic.maxHealth\",Name:\"generic.maxHealth\",Amount:-20,Operation:0,UUIDLeast:967858,UUIDMost:899140}]}", "{AttributeModifiers:[{AttributeName:\"generic.movementSpeed\",Name:\"generic.movementSpeed\",Amount:0.1,Operation:1,UUIDLeast:15939,UUIDMost:395317}]}", "{AttributeModifiers:[{AttributeName:\"generic.movementSpeed\",Name:\"generic.movementSpeed\",Amount:1,Operation:1,UUIDLeast:15939,UUIDMost:395317}]}", "{AttributeModifiers:[{AttributeName:\"generic.movementSpeed\",Name:\"generic.movementSpeed\",Amount:10,Operation:1,UUIDLeast:15939,UUIDMost:395317}]}" };
    for (NBT : array)
    {
      stick = new ItemStack(Items.field_151055_y);
      try
      {
        stick.func_77982_d(JsonToNBT.func_180713_a(NBT));
      }
      catch (NBTException localNBTException) {}
      p_78018_1_.add(stick);
    }
    p_78018_1_.add(new ItemStack(Items.field_151117_aB));
    String[] types = { "potion", "splash_potion", "lingering_potion" };
    String[] amplifiers = { "0", "1", "2", "12", "60", "144", "254", "255" };
    int[] durations = { 1, 20, 60, 100000 };
    String NBT = types;ItemStack stick = NBT.length;
    for (localNBTException = 0; localNBTException < stick; localNBTException++)
    {
      String type = NBT[localNBTException];
      for (int effect = 1; effect <= 25; effect++) {
        for (String amplifier : amplifiers) {
          for (int duration : durations) {
            p_78018_1_.add(ItemStacks.stringtostack(type + " 1 0 {CustomPotionEffects:[{Id:" + effect + ",Amplifier:" + amplifier + ",Duration:" + duration * 20 + "}],display:{Name:\"" + type + " " + 
            
              Potion.func_188412_a(effect).func_76393_a() + " " + amplifier + " for " + (duration == 100000 ? "ever" : new StringBuilder().append(duration).append("sec").toString()) + "\"}}"));
          }
        }
      }
    }
  }
}

Posted
  On 11/4/2016 at 7:59 PM, Animefan8888 said:

  Quote

Do NOT try to export jar from your Eclipse. it will NOT work. You can only export and compile a mod using "gradlew build" in terminal.

He is importing the mod not exporting. He needs to correctly deobfuscate it before it will work in a dev environment though.

 

I got some progress after what he said , look ^

 

  Quote

Do NOT try to export jar from your Eclipse. it will NOT work. You can only export and compile a mod using "gradlew build" in terminal.

 

If it won't compile it will tell you why. Fix the code and try again.

 

For example for me it said Lambdas are not supported. I looked it up and lambdas are a feature of Java 8 and my gradle.build had 1.6 compat support. So my Java was compiling for 1.6 . I changed that to 1.8 and it compiled. Read the errors !

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements




×
×
  • Create New...

Important Information

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