Git Product home page Git Product logo

examplemod1.7.10's Introduction

Example Forge Mod for Minecraft 1.7.10

An example mod for Minecraft 1.7.10 with Forge focussed on a stable, updatable setup.

Motivation

We had our fair share in struggles with build scripts for Minecraft Forge. There are quite a few pitfalls from non-obvious error messages. This Example Project provides you a build system you can adapt to over 90% of Minecraft Forge mods and can easily be updated if need be.

Help! I'm stuck!

We all have been there! Check out our FAQ. If that doesn't help, please open an issue.

Getting started

Creating mod from scratch:

  1. Unzip project starter into project directory.
  2. Replace placeholders in LICENSE-template and rename it to LICENSE, or remove LICENSE-template and put any other license you like on your code. This is an permissive OSS project and we encourage you participate in OSS movement by having permissive license like one in template. You can find out pros and cons of OSS software in this article
  3. Ensure your project is under VCS. For example initialise git repository by running git init; git commit --message "initialized repository".
  4. Replace placeholders (edit values in gradle.properties, change example package and class names, etc.)
  5. Run ./gradlew build
  6. Make sure to check out the rest sections of this file.
  7. You are good to go!

We also have described guidelines for existing mod migration and porting

Features

  • Updatable: Replace build.gradle with a newer version
  • Optional API artifact (.jar)
  • Optional version replacement in Java files
  • Optional shadowing of dependencies
  • Simplified setup of Mixin and example
  • Scala support (add sources under src/main/scala/ instead of src/main/java/)
  • Optional named developer account for consistent player progression during testing
  • Boilerplate forge mod as starting point
  • Improved warnings for pitfalls
  • Git Tags integration for versioning
  • Jitpack CI
  • GitHub CI:
    • Releasing your artifacts on new tags pushed. Push git tag named after version (e.g. 1.0.0) which will trigger a release of artifacts with according names.
    • Running smoke test for server startup. On any server crash occurring workflow will fail and print the crash log.

Files

  • build.gradle: This is the core script of the build process. You should not need to tamper with it, unless you are trying to accomplish something out of the ordinary. Do not touch this file! You will make a future update near impossible if you do so!
  • gradle.properties: The core configuration file. It includes
  • dependencies.gradle[.kts]: Add your mod's dependencies in this file. This is separate from the main build script, so you may replace the build.gradle if an update is available.
  • repositories.gradle[.kts]: Add your dependencies' repositories. This is separate from the main build script, so you may replace the build.gradle if an update is available.
  • jitpack.yml: Ensures that your mod is available as import over Jitpack.
  • .github/workflows/gradle.yml: A simple CI script that will build your mod any time it is pushed to master or main and publish the result as release in your repository. This feature is free with GitHub if your repository is public.

Forge's Access Transformers

You may activate Forge's Access Transformers by defining a configuration file in gradle.properties.

Check out the example-access-transformers branch for a working example!

Warning: Access Transformers are bugged and will deny you any sources for the decompiled minecraft! Your development environment will still work, but you might face some inconveniences. For example, IntelliJ will not permit searches in dependencies without attached sources.

Mixins

Mixins are usually used to modify vanilla or mod/library in runtime without having to change source code. For example, redirect a call, change visibility or make class implement your interface. It's an advanced topic and most mods don't need to do that.

You can activate Mixin in 'gradle.properties'. In that case a mixin configuration (usually named mixins.mymodid.json) will be generated automatically, and you only have to write the mixins itself. Dependencies are handled as well. Take a look at the examples in Hodgepodge and Angelica.

Advanced

If your project requires custom gradle commands you may add a addon.gradle[.kts] to your project. It will be added automatically to the build script. Although we recommend against it, it is sometimes required. When in doubt, feel free to ask us about it. You may break future updates of this build system! If you need access to properties modified later in the buildscript, you can also use a addon.late.gradle[.kts]. For local tweaks that you don't want to commit to Git, like adding extra JVM arguments for testing, use addon[.late].local.gradle[.kts].

Feedback wanted

If you tried out this build script we would love to head your opinion! Is there any feature missing for you? Did something not work? Please open an issue and we will try to resolve it asap!

Happy modding,
SinTh0r4s, TheElan and basdxz

examplemod1.7.10's People

Contributors

basdxz avatar blueweabo avatar bombcar avatar cardinalstars avatar draknyte1 avatar dream-master avatar drori200 avatar eigenraven avatar embeddedt avatar firenoo avatar github-actions[bot] avatar glease avatar glowredman avatar kada49 avatar kuba6000 avatar makamys avatar miozune avatar mitchej123 avatar muxiu1997 avatar pelotrio avatar relvl avatar serenibyss avatar shpaass avatar theelan avatar timeconqueror avatar ultrahex avatar wlhlm avatar xchgeax avatar zeekdageek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

examplemod1.7.10's Issues

Cannot build, but runclient17 succeedes

Hello, I downloaded the starter zip, unzipped, changed template files and tried to build, but i get an error with task :spotlessJava. Anyone knows what to do with this?
Full error:
`

Task :spotlessJava FAILED
Step 'removeUnusedImports' found problem in 'src\main\java\cz\malanak\logstripper\CommonProxy.java':
null
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at com.diffplug.spotless.java.GoogleJavaFormatStep$State.lambda$constructRemoveUnusedFunction$4(GoogleJavaFormatStep.java:211)
at com.diffplug.spotless.java.GoogleJavaFormatStep$State.lambda$createRemoveUnusedImportsOnly$2(GoogleJavaFormatStep.java:188)
at com.diffplug.spotless.FormatterFunc.apply(FormatterFunc.java:32)
at com.diffplug.spotless.FormatterStepImpl$Standard.format(FormatterStepImpl.java:82)
at com.diffplug.spotless.FormatterStep$Strict.format(FormatterStep.java:88)
at com.diffplug.spotless.Formatter.compute(Formatter.java:230)
at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:203)
at com.diffplug.spotless.PaddedCell.calculateDirtyState(PaddedCell.java:190)
at com.diffplug.gradle.spotless.SpotlessTaskImpl.processInputFile(SpotlessTaskImpl.java:102)
at com.diffplug.gradle.spotless.SpotlessTaskImpl.performAction(SpotlessTaskImpl.java:88)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:45)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.execute(IncrementalTaskAction.java:26)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:248)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:68)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:233)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:216)
at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:199)
at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:166)
at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:50)
at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:28)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.executeDelegateBroadcastingChanges(CaptureStateAfterExecutionStep.java:100)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:72)
at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:50)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:179)
at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:70)
at org.gradle.internal.Either$Right.fold(Either.java:175)
at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:59)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:68)
at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:46)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:36)
at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:25)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:91)
at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:55)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:37)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:76)
at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:37)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:108)
at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:71)
at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:45)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.executeWithNonEmptySources(SkipEmptyWorkStep.java:177)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:81)
at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:53)
at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:32)
at org.gradle.internal.execution.steps.RemoveUntrackedExecutionStateStep.execute(RemoveUntrackedExecutionStateStep.java:21)
at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:75)
at org.gradle.internal.execution.steps.CleanupStaleOutputsStep.execute(CleanupStaleOutputsStep.java:41)
at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:66)
at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:66)
at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:38)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:32)
at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:293)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:21)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:47)
at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:34)
at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:64)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:145)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:134)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'
at com.google.googlejavaformat.java.RemoveUnusedImports.getSimpleName(RemoveUnusedImports.java:293)
Caused by: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'

at com.google.googlejavaformat.java.RemoveUnusedImports.buildReplacements(RemoveUnusedImports.java:275)
at com.google.googlejavaformat.java.RemoveUnusedImports.removeUnusedImports(RemoveUnusedImports.java:227)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
... 131 more

Execution failed for task ':spotlessJava'.

java.lang.reflect.InvocationTargetException

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 3s
17 actionable tasks: 8 executed, 9 up-to-date
`
Thanks for any help.

java.lang.NoSuchFieldError: restoringBlockSnapshots

Whenever launching and trying to enter a SP world, the error in the title is thrown and the game is closed immediately. I haven't messed with the build file, I have only modified the dependencies.gradle and the repositories.gradle files. My example mod currently loads nothing except of its mod info.

  • build.gradle version: 1675624371
  • IDE: IntelliJ IDEA

Here is the crash report:

Open to see crash report
---- Minecraft Crash Report ----
// You're mean.

Time: 06.02.23 01:14
Description: Exception in server tick loop

java.lang.NoSuchFieldError: restoringBlockSnapshots
	at net.minecraft.block.Block.dropBlockAsItemWithChance(Block.java:803)
	at net.minecraft.block.Block.dropBlockAsItem(Block.java:795)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:184)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:152)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:152)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:167)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:132)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:167)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:167)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:152)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:132)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:167)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:167)
	at net.minecraft.world.WorldServer.scheduleBlockUpdateWithPriority(WorldServer.java:455)
	at net.minecraft.world.WorldServer.scheduleBlockUpdate(WorldServer.java:432)
	at net.minecraft.block.BlockDynamicLiquid.onBlockAdded(BlockDynamicLiquid.java:352)
	at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:713)
	at net.minecraft.world.World.setBlock(World.java:518)
	at net.minecraft.block.BlockDynamicLiquid.func_149813_h(BlockDynamicLiquid.java:187)
	at net.minecraft.block.BlockDynamicLiquid.updateTick(BlockDynamicLiquid.java:152)
	at net.minecraft.world.gen.feature.WorldGenLiquids.generate(WorldGenLiquids.java:83)
	at net.minecraft.world.biome.BiomeDecorator.genDecorations(BiomeDecorator.java:344)
	at net.minecraft.world.biome.BiomeDecorator.decorateChunk(BiomeDecorator.java:145)
	at net.minecraft.world.biome.BiomeGenBase.decorate(BiomeGenBase.java:412)
	at net.minecraft.world.biome.BiomeGenForest.decorate(BiomeGenForest.java:198)
	at net.minecraft.world.gen.ChunkProviderGenerate.populate(ChunkProviderGenerate.java:444)
	at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:313)
	at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1157)
	at net.minecraft.world.gen.ChunkProviderServer.originalLoadChunk(ChunkProviderServer.java:208)
	at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:149)
	at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:119)
	at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:305)
	at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:79)
	at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:96)
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:445)
	at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.7.10
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_362, Temurin
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin
	Memory: 2116409888 bytes (2018 MB) / 3324510208 bytes (3170 MB) up to 5726797824 bytes (5461 MB)
	JVM Flags: 2 total; -Xms1G -Xmx6G
	AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
	IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
	FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 17 mods loaded, 17 mods active
	States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
	UCHIJAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
	UCHIJAA	FML{7.10.99.99} [Forge Mod Loader] (recompiled_minecraft-1.7.10.jar) 
	UCHIJAA	Forge{10.13.4.1614} [Minecraft Forge] (recompiled_minecraft-1.7.10.jar) 
	UCHIJAA	NotEnoughItems{1.0.5.120} [Not Enough Items] (NotEnoughItems-1.7.10-1.0.5.120-dev.jar) 
	UCHIJAA	MobiusCore{1.2.5} [MobiusCore] (minecraft.jar) 
	UCHIJAA	CodeChickenCore{1.0.7.47} [CodeChicken Core] (minecraft.jar) 
	UCHIJAA	GT_ASM{6.14.11} [Greg-ASM�] (minecraft.jar) 
	UCHIJAA	digt{master-packages-1-g3016a94.dirty} [DearImGreg Tweaks] (digt-master-packages-1-g3016a94.dirty-dev.jar) 
	UCHIJAA	gregapi{GT6-MC1710} [Greg-API] (gregtech_1.7.10-6.15.10-dev.jar) 
	UCHIJAA	McMultipart{1.2.0.347} [Minecraft Multipart Plugin] (ForgeMultipart-1.7.10-1.2.0.347-dev.jar) 
	UCHIJAA	gregapi_post{GT6-MC1710} [Greg-API-Post] (gregtech_1.7.10-6.15.10-dev.jar) 
	UCHIJAA	gregtech{GT6-MC1710} [GregTech] (gregtech_1.7.10-6.15.10-dev.jar) 
	UCHIJAA	Waila{1.5.11} [Waila] (Waila-1.5.11-RC2-NONEI_1.7.10-dev.jar) 
	UCHIJAA	ForgeMultipart{1.2.0.347} [Forge Multipart] (ForgeMultipart-1.7.10-1.2.0.347-dev.jar) 
	UCHIJAA	ForgeMicroblock{1.2.0.347} [Forge Microblocks] (ForgeMultipart-1.7.10-1.2.0.347-dev.jar) 
	UCHIJAA	MapWriter{2.1.2} [MapWriter] (Opis-1.2.5_1.7.10-dev.jar) 
	UCHIJAA	Opis{1.2.5} [Opis] (Opis-1.2.5_1.7.10-dev.jar) 
	GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
	Profiler Position: N/A (disabled)
	Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
	Player Count: 0 / 8; []
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'fml,forge'

Exception when building: "java.io.FileNotFoundException: <repo>/build/tmp/mixins/mixins.srg (No such file or directory)"

I'm attempting to port a solely mixin-based Forge mod from 1.12.2 to 1.7.10. However, I'm unable to set up a dev environment using this example mod.

The only changes I've made to the repository since downloading it are:

  • Renamed packages
  • Created "mixins" package
  • Made the following gradle.properties changes:
    usesMixins = true
    
    mixinsPackage = mixins
    
    containsMixinsAndOrCoreModOnly = true (changing this made no difference)
    

./gradlew build --debug --stacktrace: https://gist.github.com/unilock/91c498c00c90c569ac3506759a5dce69


  • uname -a:
    Darwin wildstyle.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 arm64
    
  • java --version (aarch64):
    openjdk 17.0.7 2023-04-18 LTS
    OpenJDK Runtime Environment Zulu17.42+19-CA (build 17.0.7+7-LTS)
    OpenJDK 64-Bit Server VM Zulu17.42+19-CA (build 17.0.7+7-LTS, mixed mode, sharing)
    

Option to specify version based on file instead of tags for non-release jars [needs enhancement label]

Use case:
Currently, I am working on Et Futurum Requiem. The current next in-progress version is 2.6.1. However, because the last tag released was 2.6.0, the jars are labeled as 2.6.0 builds. This is wrong, as these are development jars for 2.6.1, not 2.6.0; 2.6.0 was already released. I'd rather just have them be labeled as 2.6.1 with the proper commit hash, signifying they are 2.6.1 snapshots, for me I only want my releases to follow the latest tag name. So if I released 2.6.1 beta 1 under the tag 2.6.1-beta-1 tag, it'd still use that tag for the release, and I'd like the CI to continue to produce jars that are just called 2.6.1 with a commit hash, since 2.6.1 has not hit a full release and thus these builds are still snapshots leading up to 2.6.1.

As far as I can tell, there's no way to achieve this effect under the current revisions of the script.

genIntellijRuns problems and a hacky fix

It seems like genIntellijRuns may cause more issues than help for the way this build script is set up?

In some tutorials it's suggested that you should run gradle task during IDE setup. It creates two application configurations like so:
image

The benefit is you can add more CLI arguments to the launch, however, when you run the tasks it skips over the token replacement section.

As a result if you use this method you end up with modinfo like:
image

And end up with potential crashes like the following with the default proxy setup:

cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: GRADLETOKEN_GROUPNAME.ClientProxy
...
Caused by: java.lang.ClassNotFoundException: GRADLETOKEN_GROUPNAME.ClientProxy


cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: GRADLETOKEN_GROUPNAME.CommonProxy
...
Caused by: java.lang.ClassNotFoundException: GRADLETOKEN_GROUPNAME.CommonProxy

Solutions to the task existing

I don't know what I'm doing with gradle build scripts honestly, if it's possible to make it so the application configurations also run the token replacement they're currently missing

    if (replaceGradleTokenInFile) {
        replaceIn replaceGradleTokenInFile
        if (gradleTokenModId) {
            replace gradleTokenModId, modId
        }
        if (gradleTokenModName) {
            replace gradleTokenModName, modName
        }
        if (gradleTokenVersion) {
            replace gradleTokenVersion, modVersion
        }
        if (gradleTokenGroupName) {
            replace gradleTokenGroupName, modGroup
        }
    }

It may be worth just throwing a deprecation warning any time you run genIntellijRuns pointing people to the other way.

The other way

  1. In Intellij on gradle menu click on Tasks → forgegradle → runClient (It doesn't matter if you want to debug)
    image
  2. Now click on the task dropdown and select Edit Configurations
    image
  3. And hit the little Save icon to prevent the task from running away.
    image
  4. You can now select that task and use Debug to hot swap code with Ctrl+Shift+F9 to your hearts content.
    image

The only problem with this version is you can't add CLI arguments as easily, but if you really need to you can edit build.gradle and edit the following section, for example:

runClient {
    if (developmentEnvironmentUserName) {
        arguments += [
            "--username", developmentEnvironmentUserName,
            "--uuid", "7657b3d4cfd34078b523df0e1eb0f307",
            "--width", "1280",
            "--height", "720"
        ]
    }

    args(arguments)
    jvmArgs(jvmArguments)
}

Keep in mind that build.gradle is sometimes automatically updated and rewritten, so it may disappear or maybe they added a way to add cli arguments to build.properties in the future 🤷‍♂️

Mainly I just wanted to create this issue to help whoever else comes by later and give them a nice googleable bit of information that I lost a bunch of time to fixing it.

Problem with kotlin

Hey, is it possible to integrate kotlin support into the project? I've tried to do this through the 'dependencies.gradle' file using 'shadowCompile', but it's not copying it to the root and my Kotlin is also not present in the final .jar. Could someone please help me with this? Thank you.

Help needed

i want to make a minecraft mod and i understand everything except the 3rd point [Ensure your project is under VCS. For example initialise git repository by running git init; git commit --message "initialized repository"] whats VCS what do i need to do, [Run ./gradlew build] just run bat? Moreover i did everything else ran the gradlew.bat and everything was red "build failed with and exception" could not open cp_proj starter\build.gradle , .gradle\caches\6.9.1\scripts\bunchofnumbers , is there perhaps a more extensive guide?

Relocation causes UnsatisfiedLinkError with JNA

After shading and relocating my discord rich presence library (will be refered to as RPC from here on), trying to run the game with the mod causes a UnsatisfiedLinkError when my rpc library uses a JNA method.

More info on this can be found in this issue:
java-native-access/jna#679

A fix for this (and probably other libraries that use native methods, which from what i infer is the problem here) would be implementing a way for the shadow configuration to if specific packages are to not be relocated.

A possible approach for this can be creating an array in gradle.properties containing package names to not relocate and then in the shadowJar tasks check if it is not empty and if the packages specified in the array are presenet while relocating. If they are, shade them to the root of the jar.

This is to not be confused with using exclude module when declaring the dependency which will exclude the package entirely.

Followup regarding git

Why do you think your code knows better if something is a git repo than the actual git repo?

Should I open a ticket against git to tell them their command is having hallucinations about seeing a git repo that doesn't exist?

image

$ ./gradlew build

> Configure project :
Project is not a git repository, and no VERSION override was set. Either initialize a git repo, set a VERSION environment variable override, or disable the gitVersion module.

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\git\gravity_torch\1.7.10\build.gradle' line: 4

* What went wrong:
An exception occurred applying plugin request [id: 'com.gtnewhorizons.gtnhconvention']
> Failed to apply plugin 'com.gtnewhorizons.gtnhconvention'.
   > Not a git repo, and no VERSION set.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 14s
$ git describe --tags
v2.0.4-1-g4c5bc4c
$ git log
commit 4c5bc4c907cc7a9bc1059f428a41c560ed1d1eb8 (HEAD -> master, origin/master)
Author: Henry Loenwind <[email protected]>
Date:   Tue Jun 25 05:21:12 2024 +0200

    Fixed readme

commit 0ab5d93eee454d1641aed72f641df9905d979cda (tag: v2.0.4)
Author: Henry Loenwind <[email protected]>
Date:   Tue Jun 25 05:07:34 2024 +0200

    More cleanup

commit 08078f19cdf9d1fd21f364323b5719532e1800f3
Author: Henry Loenwind <[email protected]>
Date:   Tue Jun 25 04:58:58 2024 +0200

    Cleanup

commit 3b7385981c8fff8a83d539e8e5ac673ee6381a90
Author: Henry Loenwind <[email protected]>
Date:   Tue Jun 25 04:07:12 2024 +0200

    1.21 port, initial commit

commit 5e9fba1ca163559854e02a48fdd89be2eacd7284
Author: Henry Loenwind <[email protected]>
Date:   Tue Jun 25 04:03:21 2024 +0200

    Created version folder

commit c9b2699303175f18018a93a72b08627a59ec0ce2
Author: Henry Loenwind <[email protected]>
Date:   Thu May 30 09:54:18 2024 +0200

    Delete .github/workflows/release-tags.yml

    Don't trash my carefully crafted release notes, you dumb bot.

commit 37edfb4c4e78eb1274e815e353d33b7e6d247d1e (tag: v1.0.3)
Author: Henry Loenwind <[email protected]>
Date:   Thu May 30 09:45:50 2024 +0200

    Added compatibility with Angelica (threaded rendering)

    and optimized rendering top and bottom faces a tiny bit. RenderingContext needs an overhaul....

commit a071de12bcfc99362c5f4099b1783b9e176c14eb
Author: Henry Loenwind <[email protected]>
Date:   Wed May 29 18:46:19 2024 +0200

    Update README.md

commit 508a2eea89fe43aeada29da8d25ab47c515980dd (tag: v1.0.2)
Author: Henry Loenwind <[email protected]>
Date:   Wed May 29 03:12:17 2024 +0200

    Tweaked rendering to use a single Tessellator for better compatibility

    Also cleaned up colour code to be a bit nicer

commit d0a9fbcca3033b88e7e20cf1d6fb094c918678dd
Author: Henry Loenwind <[email protected]>
Date:   Wed May 29 03:06:56 2024 +0200

    Fixed config values not actually being set from the config file

commit f6f6e29bcabb7dc59c813cf1dc34bb44d8853c8b (tag: v1.0.1)
Author: Henry Loenwind <[email protected]>
Date:   Wed May 29 01:27:25 2024 +0200

    Added config to force Tessellator rendering

    Probably needed for compatibility with rendering overhaul mods.

commit bc014932d2eae8ca10f9b1209c8bd0a6936638f0
Author: Henry Loenwind <[email protected]>
Date:   Tue May 28 23:04:35 2024 +0200

    Removed debug option

commit 90e978c772b6199627a637c412ec4cbbb17dacbb
Author: Henry Loenwind <[email protected]>
Date:   Tue May 28 22:53:35 2024 +0200

    Fixed spelling mistakes

:

Also, I'm not even trying to build the project. For that I can override with the environment variable manually. I'm trying to open it in Eclipse. Just OPEN it to look at the code. And even Eclipse sees it as a git repo.

image

Putting something in a furnace causes the game to crash due to missing pollution class

So I decided to play around and try to create a version of Gregtech that does not depend on IC2 (Very ambitious) and when setting up the example I named my main folder gregtech and my main class GT_Mod just like the current GT5. I also created a common folder and setup a blocks, recipes, and items folder underneath it. I began to follow a tutorial to refamiliarize myself with modding 1.7 and things were going fine until I created a furnace recipe and attempted to use it which caused the game to crash. I have added a screenshot of my dev environment so you could see the messages. but it basically went looking for a class definition for the real gregtech pollution and crashed because it couldn't find it. I don' think that would be intended behaviour for a tutorial mod which shouldn't care about that even if I name things exactly the same as the real Gregtech.
Pollution

How to disable git check?

image

It obviously isn't working, so how do I disable it?

PS: Obviously, on the command line I can set a VERSION environment variable. But in Eclipse that's not possible.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.