Jump to content

[TUTORIAL] Getting Started with ForgeGradle


GrygrFlzr

Recommended Posts

Ok, so I managed to fix the error, and my mod properly compiled. However, when I tried to run the mod on my minecraft forge profile, it didn't appear. Forge acted as if the mod didn't exist. I'm not sure why this happened, so I guessed that it was a problem with the forge version. I changed it in the build file, but still got the same result ._.

Link to comment
Share on other sites

My source code is in the src/main/java/com/slayer, as I believe it should be. However, when I open the jar file with JD-Gui, the only thing that shows up is a MANIFEST.MF inside a META-INF folder. The manifest file only has this line of text:

 

Manifest-Version: 1.0

 

I'm really not sure what's going on here. I made sure that all of the syntax errors in the build file were fixed, and my java files are in the right place. It seems that I'm doing everything correctly, so why wouldn't the mod compile properly?

 

 

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

inside the .jar archive there's not .java file to edit...

 

How can i edit the entities?

i cant edit files .class

Yes, of course you cannot edit them. They are part of libraries that Minecraft uses resp. part of Minecraft itself. You cannot just edit other people's code.

 

And why i saw people editing it?

in tutorials all this .class is .jar, and they edit by it.

 

i still don't understanding.

 

 

diesieben07, i cant understand it too, i dont know what is  EntityJoinWorldEvent.

as i said, i'm beginner.

 

Link to comment
Share on other sites

  • 1 month later...

Hello. I am getting the error "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path". You have an entry in your troubleshooting section for that, however I couldn't find a folder 'natives' within a folder 'build' anywhere on my harddisk. I followed your tutorial to the letter. Could you shed some light on this problem?

Link to comment
Share on other sites

  • 1 month later...

Just wanted to chime in here and say that if anyone is receiving a stackoverflow exception during the :recompileMc task - update your JDK. This had me confused for about an hour this morning. - I updated to jdk 7u80 and everything went off without a hitch.

 

[Original Error] http://pastebin.com/BDhapB5Q

As it was generated from "gradle setupDecompWorkspace eclipse"

Link to comment
Share on other sites

  • 5 months later...
  • 6 months later...

hi, i'm starting again my modding career,

but the fact that using "GradleStart in the run configuration for eclipse" is only mentioned in the comments and not in the initial post makes me kind of wondering. Written in 2013 it should be checked if everything in 2017 is still the way it was. And if so it should be mentioned there. My last time modding was 2015.

Sorry if someone is pissed if i say this, but i think as a coder, who checks every bit and byte and comma, you can't leave an important tutorial like that. It does not even explain what "gradlew eclipse" does exactly [..] .. Saying so i presume we are happy about as much (terrific) modders as possible .. [rant over][wishing a happy day]

Link to comment
Share on other sites

24 minutes ago, chrissiOnAir said:

hi, i'm starting again my modding career,

but the fact that using "GradleStart in the run configuration for eclipse" is only mentioned in the comments and not in the initial post makes me kind of wondering. Written in 2013 it should be checked if everything in 2017 is still the way it was. And if so it should be mentioned there. My last time modding was 2015.

Sorry if someone is pissed if i say this, but i think as a coder, who checks every bit and byte and comma, you can't leave an important tutorial like that. It does not even explain what "gradlew eclipse" does exactly [..] .. Saying so i presume we are happy about as much (terrific) modders as possible .. [rant over][wishing a happy day]

 

It's still the same as it was. This page is the most up-to-date guide on setting up a ForgeGradle workspace and it explains what each step does in a bit more detail.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

  • 1 year later...
1 minute ago, diesieben07 said:

这不是支持线程。此外,此论坛不再支持1.7.10及更早版本。如果您需要支持,请更新到现代版的Minecraft。

so is that mean, i wanna get some help need me updata my forge verson to 1.10.x or more?

but some people say that the mod of 1.7.10 are best made... 

Link to comment
Share on other sites

Hi everyone, sorry for bothering you all, but i'm having trouble setting up the environment for modding minecraft. When i run the command "gradlew setupDecompWorkspace" it says it can't resolve the dependencies for classpath, can somebody help me? I'm sorry if i post this here but i'm currently new so i don't know whether i should post this here or somewhere else.

Link to comment
Share on other sites

  • 3 months later...
  • 8 months later...
  • 5 months later...
  • Guest unpinned and locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
    • It is an issue with quark - update it to this build: https://www.curseforge.com/minecraft/mc-mods/quark/files/3642325
    • Remove Instant Massive Structures Mod from your server     Add new crash-reports with sites like https://paste.ee/  
    • Update your drivers: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x
  • Topics

×
×
  • Create New...

Important Information

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