Jump to content

Thomas107500

Members
  • Posts

    16
  • Joined

  • Last visited

Thomas107500's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Wait but deobf one also have ":dev" so deobf is suppose to have ":dev"? also how to get the normal dependency out of a normal mod? do i just open the mod with a zip viewer like 7zip and see where the main class is, then thats the path? e.g. "com.devname.modname.mainclass" so the dependency should be "com.devname.modname"?
  2. No i mean they are both there lol that is a straight copy from the build.gradle dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. minecraft 'net.minecraftforge:forge:1.15.2-31.2.0' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version" // Real examples // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // These dependencies get remapped to your current MCP mappings // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' // For more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html }
  3. Wait not in the build.gradle? i am pretty sure it is: ... dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. minecraft 'net.minecraftforge:forge:1.15.2-31.2.0' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version" // Real examples // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // These dependencies get remapped to your current MCP mappings // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' // For more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } ... i will try adding the line you said to it thanks
  4. not sure what you mean by "fg.deobf" because i cant seems to find that anywhere in the build.gradle but i do find something like this: // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env Is that what you mean?
  5. So i am trying to do integration with another mod, but oddly the other mod throws this exception: java.lang.NoSuchMethodError: net.minecraft.util.ResourceLocation.func_208304_a(Ljava/lang/String;)Lnet/minecraft/util/ResourceLocation; I tried running it seperately outside of the dev environment in normal game and it works perfectly export my mod and run along with it outside dev environment also works perfectly, it just cannot run inside the dev environment. What i did is just dropping that mod int to the "mods" folder inside the "run" folder, so maybe i am missing something? Oh btw i am using Eclipse
  6. I will do that next time coz i thought it was just an easy quick fix where i am just blind and miss some minor obvious stuff, i solved it myself the moment i motify my code a bit and run it, it turns out it was this code i wrote: that made the plant able to be pass through by player caused a weird bug, i commented that out and use the doesnotblockmovement() and it worked ?
  7. Like the title said, my crop extend CropBlocks, it breaks on block update ONLY if it is mature. i checked every super methods, but i still cannot determine why it keeps on breaking, what i think is that it might be related to world.isRemote stuff, but the source code super methods already dealt with it and all i do is call the super method. So i am literally clueless. I watched others mod tutorials and they don't have this problem, if more info is needed i can definitely provide, i cant really understand why this happen at all.
  8. OK answer by another modder, so you need .getPendingBlockTicks().scheduleTick() and public boolean ticksRandomly(BlockState state) set to true so the game actually run the tick() method
  9. and for and for whether is the crop/bush blocks updating the blockstate, no i think not because even when plants are not there the farmland will get hydrated in vanilla, so i am kinda sure its not the crop/bush that do the blockstate update
  10. So what i did is this: @Override public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, Random rand) { LOGGER.error("farmland tick called !!!"); breakCrop(state, worldIn, pos); super.tick(state, worldIn, pos, rand); } i am extending FarmlandBlock, so i called its super method, breakCrop is another static method i made and wanted to call, the super method basicly contains the code to attempt to check for water and change blockstate: public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, Random rand) { if (!state.isValidPosition(worldIn, pos)) { turnToDirt(state, worldIn, pos); } else { int i = state.get(MOISTURE); if (!hasWater(worldIn, pos) && !worldIn.isRainingAt(pos.up())) { if (i > 0) { worldIn.setBlockState(pos, state.with(MOISTURE, Integer.valueOf(i - 1)), 2); } else if (!hasCrops(worldIn, pos)) { turnToDirt(state, worldIn, pos); } } else if (i < 7) { worldIn.setBlockState(pos, state.with(MOISTURE, Integer.valueOf(7)), 2); } } } I tried stump on my farmland and it did turn to dirt, so something is running the turnToDirt static method from the super, but my logger message is not appearing on the console, so the tick method is not running.... so yeah i am kinda confused on that.....
  11. I have all the things set up, but i dont know how to check for water and hydrate it, it seems that there is suppose to be a updateTick() method for it but i can't find it anywhere, and check neighbor update wont work because it is not suitable for this case, so how am i suppose to update its blockstate? Do i really have to go for Tile Entity? I did see they used a tick() method from block class which is depreciated and i tried and its not ticking at all. So how exactly did they do that on vanilla?
  12. Same issue here, looks like the gradlew eclipse command doesn't generate an "eclipse" folder, so what i did is first create an empty folder with name eclipse (name doesn't matter) use that as a temp workspace then when loaded into eclipse click import -> general -> existing project into workspace -> point to the mod folder in the "select root directory" and click next and it should work.
  13. And well i decided to try and use the recommended older versions (1.15.2-31.1.0) and it works like a charm, the build is successful and took 32m 21s, so i guess for those who are facing similar problems, try recommended version first, and make sure your jdk is properly installed, have matching version jre, and the path variable is configured correctly. And maybe mark this topic as bug for the forge team to take a look at the build i used before so they can check it out.
  14. Checked and nope they are not in local or global variable
×
×
  • Create New...

Important Information

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