-
Posts
42 -
Joined
-
Last visited
Everything posted by CosmicDan
-
[SOLVED] "Failed to apply patch" when making 1.14.4 source jar
CosmicDan replied to CosmicDan's topic in ForgeGradle
Resolved by using Oracle JDK 1.8. -
Resolved by using Oracle JDK 1.8. --------------------- Ok everything else is all good, but for some reason the source file cannot be generated. Is this a known issue? Do I have to use Oracle JDK 1.8 instead of OpenJDK 1.8 (tried both HotSpot and OpenJ9 JIT compiler versions, same result)? I have no idea and I'm a bit embarrassed to be asking this, I didn't have this problem with 1.14.3 though. It does mention to "see log for details", but there is no error of any sort in neither console.log nor forge-1.14.4-28.0.55-mci.jar.log - there are no other log files in gradle cache. > Configure project : New Dep: net.minecraftforge:forge:1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3 Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings CONFIGURE SUCCESSFUL in 0s [07:49:27] [main/INFO]: Writing debug log file accesstransform.log [07:49:27] [main/INFO]: Access Transformer processor running version 0.14.4+42+59f903b [07:49:27] [main/INFO]: Command line arguments [--inJar, C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55\forge-1.14.4-28.0.55-injected.jar, --outJar, C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3\forge-1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3.jar, --logFile, accesstransform.log, --atFile, D:\Games\Minecraft\Modding\~Mine\~1.14.x\Thermodynamix\build\_atJar_-448309199_\parent_at.cfg] [07:49:27] [main/INFO]: Reading from C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55\forge-1.14.4-28.0.55-injected.jar [07:49:27] [main/INFO]: Writing to C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3\forge-1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3.jar [07:49:27] [main/INFO]: Transformer file D:\Games\Minecraft\Modding\~Mine\~1.14.x\Thermodynamix\build\_atJar_-448309199_\parent_at.cfg [07:49:27] [main/WARN]: Found existing output jar C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3\forge-1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3.jar, overwriting [07:49:30] [main/INFO]: JAR transformation complete C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3\forge-1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3.jar Creating SRG -> MCP TSRG Download https://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp_snapshot/20190831-1.14.3/mcp_snapshot-20190831-1.14.3.zip Failed to apply patch: net.minecraftforge:forge:1.14.4-28.0.55:userdev: patches/net/minecraft/crash/CrashReportCategory.java Hunk #1 Failed: Cannot find hunk target Error getting artifact: net.minecraftforge:forge:1.14.4-28.0.55_mapped_snapshot_20190831-1.14.3:sources@jar from MinecraftUserRepo java.lang.RuntimeException: Failed to apply patches to source file, see log for details: C:\Users\CosmicDan\.gradle\caches\forge_gradle\minecraft_user_repo\net\minecraftforge\forge\1.14.4-28.0.55\forge-1.14.4-28.0.55-decomp.jar at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findPatched(MinecraftUserRepo.java:959) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findSource(MinecraftUserRepo.java:995) at net.minecraftforge.gradle.userdev.MinecraftUserRepo.findFile(MinecraftUserRepo.java:394) at net.minecraftforge.gradle.common.util.BaseRepo.getArtifact(BaseRepo.java:81) at net.minecraftforge.gradle.common.util.BaseRepo.getArtifact(BaseRepo.java:41) at net.minecraftforge.gradle.common.util.BaseRepo$Builder$1.lambda$getArtifact$0(BaseRepo.java:127) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531) at net.minecraftforge.gradle.common.util.BaseRepo$Builder$1.getArtifact(BaseRepo.java:127) at net.minecraftforge.gradle.common.util.BaseRepo$Builder$1.getArtifact(BaseRepo.java:124) at com.amadornes.artifactural.base.repository.ArtifactProviderBuilder$Complete.getArtifact(ArtifactProviderBuilder.java:92) at com.amadornes.artifactural.base.repository.SimpleRepository.getArtifact(SimpleRepository.java:41) at com.amadornes.artifactural.gradle.GradleRepositoryAdapter$GeneratingFileResourceRepository.findArtifact(GradleRepositoryAdapter.java:298) at com.amadornes.artifactural.gradle.GradleRepositoryAdapter$GeneratingFileResourceRepository.resource(GradleRepositoryAdapter.java:277) at com.amadornes.artifactural.gradle.GradleRepositoryAdapter$GeneratingFileResourceRepository.resource(GradleRepositoryAdapter.java:243) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.staticResourceExists(DefaultExternalResourceArtifactResolver.java:83) at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.artifactExists(DefaultExternalResourceArtifactResolver.java:71) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.findOptionalArtifacts(ExternalResourceResolver.java:260) at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver$MavenRemoteRepositoryAccess.resolveSourceArtifacts(MavenResolver.java:264) at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver$MavenRemoteRepositoryAccess.resolveSourceArtifacts(MavenResolver.java:240) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$AbstractRepositoryAccess.resolveArtifactsWithType(ExternalResourceResolver.java:380) at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveArtifactsWithType(ExternalResourceResolver.java:450) at com.amadornes.artifactural.gradle.GradleRepositoryAdapter$1$1.resolveArtifactsWithType(GradleRepositoryAdapter.java:202) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveArtifactsWithType(CachingModuleComponentRepository.java:402) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LocalModuleComponentRepository$LocalAccess.resolveArtifactsWithType(LocalModuleComponentRepository.java:89) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveArtifactsWithType(ErrorHandlingModuleComponentRepository.java:153) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainArtifactResolver.resolveArtifactsWithType(RepositoryChainArtifactResolver.java:50) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver.resolveArtifactsWithType(ErrorHandlingArtifactResolver.java:37) at org.gradle.api.internal.artifacts.query.DefaultArtifactResolutionQuery.addArtifacts(DefaultArtifactResolutionQuery.java:175) at org.gradle.api.internal.artifacts.query.DefaultArtifactResolutionQuery.buildComponentResult(DefaultArtifactResolutionQuery.java:168) at org.gradle.api.internal.artifacts.query.DefaultArtifactResolutionQuery.createResult(DefaultArtifactResolutionQuery.java:142) at org.gradle.api.internal.artifacts.query.DefaultArtifactResolutionQuery.execute(DefaultArtifactResolutionQuery.java:133) at org.gradle.plugins.ide.internal.resolver.IdeDependencySet$IdeDependencyResult.resolveAuxiliaryArtifacts(IdeDependencySet.java:161) at org.gradle.plugins.ide.internal.resolver.IdeDependencySet$IdeDependencyResult.visit(IdeDependencySet.java:90) at org.gradle.plugins.ide.internal.resolver.IdeDependencySet.visit(IdeDependencySet.java:71) at org.gradle.plugins.ide.idea.model.internal.IdeaDependenciesProvider.visitDependencies(IdeaDependenciesProvider.java:105) at org.gradle.plugins.ide.idea.model.internal.IdeaDependenciesProvider.getDependencies(IdeaDependenciesProvider.java:90) at org.gradle.plugins.ide.idea.model.internal.IdeaDependenciesProvider.provide(IdeaDependenciesProvider.java:66) at org.gradle.plugins.ide.idea.model.IdeaModule.resolveDependencies(IdeaModule.java:589) at org.gradle.plugins.ide.internal.tooling.IdeaModelBuilder.buildDependencies(IdeaModelBuilder.java:125) at org.gradle.plugins.ide.internal.tooling.IdeaModelBuilder.build(IdeaModelBuilder.java:112) at org.gradle.plugins.ide.internal.tooling.IdeaModelBuilder.buildAll(IdeaModelBuilder.java:78) at org.gradle.plugins.ide.internal.tooling.IdeaModelBuilder.buildAll(IdeaModelBuilder.java:59) at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:79) at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter$2.getModel(InternalBuildActionAdapter.java:74) at org.gradle.tooling.internal.consumer.connection.BuildControllerAdapter.getModel(BuildControllerAdapter.java:62) at org.gradle.tooling.internal.consumer.connection.AbstractBuildController.getModel(AbstractBuildController.java:40) at org.gradle.tooling.internal.consumer.connection.AbstractBuildController.getModel(AbstractBuildController.java:28) at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:114) at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:48) at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:77) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.runAction(ClientProvidedPhasedActionRunner.java:109) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.access$000(ClientProvidedPhasedActionRunner.java:41) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner$1.run(ClientProvidedPhasedActionRunner.java:97) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner$1.buildFinished(ClientProvidedPhasedActionRunner.java:91) at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:370) at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:352) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:340) at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:327) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230) at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149) at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324) at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140) at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93) at com.sun.proxy.$Proxy16.buildFinished(Unknown Source) at org.gradle.initialization.DefaultGradleLauncher.finishBuild(DefaultGradleLauncher.java:162) at org.gradle.initialization.DefaultGradleLauncher.finishBuild(DefaultGradleLauncher.java:128) at org.gradle.internal.invocation.GradleBuildController$2.call(GradleBuildController.java:87) at org.gradle.internal.invocation.GradleBuildController$2.call(GradleBuildController.java:83) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:38) at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:96) at org.gradle.internal.invocation.GradleBuildController.configure(GradleBuildController.java:83) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:63) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.run(RunAsBuildOperationBuildActionRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:43) at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50) at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:74) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:62) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:748)
-
> Caused by: java.util.zip.ZipException: zip file is empty Start over from scratch, delete .gradle in your HOME folder even. Looks like one of the dependency jar's are bad, that's my guess.
-
Forge 1.12.2 - 14.23.5.2835 Exception Ticking World Crash
CosmicDan replied to TEA's topic in Support & Bug Reports
That's completely different. The original error is 100% reproducible in unmodified Forge, but now it's been fixed in 2836. Whatever error you're getting is something else. -
Can't run setupDecompworkspace | Found java version null.
CosmicDan replied to warframeza002's topic in ForgeGradle
Set JAVA_HOME environment variable via system settings (see here for a guide) and then restart your PC. Make sure it is set to a JDK 1.8 installation, e.g. C:\Program Files\Java\jdk_1.8-something-i-don't-remember\ If you still have troubles, try Command Prompt rather than Powershell. Powershell should work but I don't personally know. -
Hi, I'm trying to draw arbitrary things in the world. I based my initial work on "MoreOverlays" code (MIT licensed) which renders chunk boundaries and I do have some experience with drawing in OpenGL, but I have no idea why this happens - depending on the angle I'm looking at, it draws as either "partially black speckles" or completely black, instead of the color I set. Furthermore, the hex value given to GlStateManager.color is not always correct (e.g. 0xFFFFFF = pink). Screenshots of problem: Current code: @SubscribeEvent // tried both RenderWorldLastEvent and DrawBlockHighlightEvent; no difference //public void onRenderWorldLast(RenderWorldLastEvent event) { public static void drawMonumentPlacementOverlay(DrawBlockHighlightEvent event) { // I know these don't belong here, it's just put here so I can HotSwap my code changes easily in debug mode final int lineWidth = 3; final int edgeRadius = 1; final int edgeColor = 0xFF0000; final int middleColor = 0x00FF00; final int gridColor = 0xFF0000; //log.info("Eh?"); final EntityPlayer player = Minecraft.getMinecraft().player; if (player.getHeldItemMainhand().getItem().equals(Item.getItemFromBlock(ModBlocks.MONUMENT))) { Minecraft.getMinecraft().renderEngine.bindTexture(BLANK_TEX); GlStateManager.pushMatrix(); GL11.glLineWidth(lineWidth); GlStateManager.translate(-render.viewerPosX, -render.viewerPosY, -render.viewerPosZ); int h = player.world.getHeight(); int h0 = (int) player.posY; int h1 = Math.min(h, Math.max(h0 - 16, 0)); int h2 = Math.min(h, Math.max(h0 + 16, 0)); int x0 = player.chunkCoordX * 16; int x1 = x0 + 16; int x2 = x0 + 8; int z0 = player.chunkCoordZ * 16; int z1 = z0 + 16; int z2 = z0 + 8; int radius = edgeRadius * 16; GlStateManager.color( ((float)((edgeColor>>16) & 0xFF))/255F, ((float)((edgeColor>>8) & 0xFF))/255F, ((float)(edgeColor & 0xFF))/255F); for(int xo=-16-radius; xo<=radius; xo+=16){ for(int yo=-16-radius; yo<=radius; yo+=16){ renderEdge(x0-xo, z0-yo, h); } } GlStateManager.popMatrix(); } } public static void renderEdge(double x, double z, double h) { Tessellator tess = Tessellator.getInstance(); BufferBuilder renderer = tess.getBuffer(); renderer.begin(GL11.GL_LINES, DefaultVertexFormats.POSITION); renderer.pos(x, 0, z).endVertex(); renderer.pos(x, h, z).endVertex(); tess.draw(); } I've seen posts of people seeking answers for similar problems, but they're all for old Minecraft where functions no longer exist or don't solve them. Greatly appreciate any help!
-
Howdy, Is this alright or is there a better way? @SubscribeEvent(priority = EventPriority.LOWEST) public void onSomeEventWithResultLate(SomeEventWithResult event) { if (ModConfig.COMPATIBILITY.runLatest) { // do stuff as late as possible so hopefully our result is the one that counts } } @SubscribeEvent(priority = EventPriority.HIGHEST) public void onSomeEventWithResultEarly(SomeEventWithResult event) { if (!ModConfig.COMPATIBILITY.runLatest) { // do stuff as soon as possible to let other mod events override it if they want } } Obviously the idea is to let the user decide whether they want this aspect of a mod to be more important to less important than other mods. I may also have logic in the LOWEST priority to react differently depending on an existing result, if any, but that's neither here nor there.
-
What about 19? Seems quite a few mods have this problem and nobody knows how to fix it. Maybe you should add an option to dump a stacktrace with these warnings @LexManos because it is a bit of a problem.
-
[SOLVED] Get a variant string value from block meta/state
CosmicDan replied to CosmicDan's topic in Modder Support
Sweet, thanks guys - will do. -
[SOLVED] Get a variant string value from block meta/state
CosmicDan replied to CosmicDan's topic in Modder Support
Oh wow that seems really obvious now, I already use #getPropertyString in an actual StateMapper already *facepalm* Thanks heaps! An aside, would you happen to have any recommended reading for the latest Forge stuff (in addition to the Forge docs and TheGreyGhost's articles/MBE repo)? I recently read a gist of yours that was helpful. -
[SOLVED] Get a variant string value from block meta/state
CosmicDan posted a topic in Modder Support
Hi, I've been trying to figure out how to get a variant property string (for the purposes of building a ModelResourceLocation for a subblock) programmatically, given a block meta and/or blockstate. The variants seem to be ordered the same as meta, but I am not sure if this is always the case. If it is, is there a better way than doing blockState.getValue(blockState.getPropertyKeys(...))? If it is not the case, how would one achieve this? Also, I've noticed there is a getVariants method in BlockStateMapper, but I'm unable to get a handle on the BlockModelShapes as early as I require (in the ModelRegistryEvent) sadly. Cheers. -
[Solved] Trouble decompiling at 'fixmcsources'
CosmicDan replied to Servant_Girl's topic in Modder Support
This looks like the MCP mappings are wrong or something.... What version of the Forge MDK are you using? What commands did you use? At what stage does this error happen? If this is an error during a ForgeGradle thing (assuming it is), the IDE settings won't mean anything. You don't technically need an IDE at all to make Forge mods. Did you do everything on the official documentation for getting started? I recently setup a new 1.12.1 environment and had no problems with these instructions. -
Migrating to the new registration event system solved everything. The simpler BlockRichOreStateMapper I shared above applied through ModelLoader.setCustomStateMapper via ModelRegistryEvent worked perfectly to copy the vanilla block model on registration As is usually the case, only my ignorance was to blame for this frustration. Thanks again guys!
-
At the risk of incurring the wrath of Lex, these new Forge changes feel like a serious case of over-engineering (or maybe it's Mojang to blame, or just the fact that it's an API strapped onto a reverse-engineered application...) Determined to get the original goal I wanted - to assign textures/models dynamically from the base block of runtime-generated blocks - I still can't figure out the block model copying. The MBE case seems like it's way too complicated and not necessary for this case - since the models dont need to be *runtime dynamic* - I thought "Why can't I just grab the model from the base blockstate? I'll try that". So, something like this... ModelLoader.setCustomStateMapper(newBlock, new BlockRichOreStateMapper()); ...and... public class BlockRichOreStateMapper extends StateMapperBase { @Override protected ModelResourceLocation getModelResourceLocation(IBlockState state) { log.info(state.getBlock().getClass().getName()); // hello world Block blockToModel = state.getBlock(); if (state.getBlock() instanceof BlockRichOre) { blockToModel = ((BlockRichOre) state.getBlock()).getBaseBlock(); } return new ModelResourceLocation(Block.REGISTRY.getNameForObject(blockToModel), this.getPropertyString(state.getProperties())); } } No idea if that would work, but it is just a test - I don't even get any log output, the getModelResourceLocation method is never called. I am calling setCustomStateMapper from a client-sided method in the init phase. So I found out about some ModelRegistryEvent and moved it to there instead, but this event is fired before init - but I need to register the blocks in init. So it seems that models are registered preInit, or at least before init - and that might be why I couldn't get something based on GreyGhost's MBE's CamoBlock working either... So. Given the situation that I need to register my blocks AFTER every other mod has registered blocks, how then can I assign models to these blocks when Forge needs/wants to - which is before my blocks even exist?
-
Ah I even have a tab of GreyGhost's MBE repo to help me get up to date, funny! I couldn't get it to work on first attempt but this is quite a bit to take in. However I realize now it's probably better I just copy textures into the mod myself and manually define the ore block extras as it would allow Resource Packs to retexture them too. I'll just only register the ore variants if an oredict entry exists for it, similar to what you do in Ore Flowers. Thanks
-
Howdy, I've a desire of creating blocks dynamically based on the existence of other blocks in the game. These blocks are duplicates of other blocks but with slightly changed functionality - ore variants, if it's any significance. Everything works perfectly, except the world block models just show the missing texture placeholder (the hand and inventory model/textures are fine). Changes since 1.7.10 have taught me that I need to set a block model which has proven a bit more complicated than overriding getIcon. I think I need to set the IBakedModel somewhere, but all I have is this: public void registerBlockRender(Block newBlock, Block baseBlock) { // set item model ItemModelMesher itemModelMesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); itemModelMesher.register(Item.getItemFromBlock(newBlock), 0, new ModelResourceLocation(baseBlock.getRegistryName().getResourceDomain() + ":" + baseBlock.getRegistryName().getResourcePath())); // set world block model IBakedModel baseModel = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(baseBlock.getDefaultState()); // ? } As mentioned, the item model works fine - it's an exact duplicate of the original item model - but I'm stuck on what to do about the actual world block model. I've looked around flailed around the sources trying to find this out but I'm clueless. Perhaps I need to register to a ModelBake event that I read about somewhere...? Context: These blocks are created and registered during FMLInitializationEvent, which calls the above registration method via client proxy if the block creation and registration was successful. I do it here because I want to be sure that all other mods have registered their ores (which they should be doing in preInit).
-
Fair enough, thanks for the info. I just discovered that Kotlin/Native can now compile for Win32 and also seems to support calling the WinAPI natively, which is... whoa. Kotlin might just be going places afterall!
-
What do you recommend as a first foray into Kotlin? Or would diving straight in with Forge be OK for someone who already knows Java well? If so, how is that done - with this Forgelin thing?
-
Lombok *is* used in the enterprise, is very mature (been around longer than Kotlin) and is endorsed by Oracle themselves. Of course, JetBrain's Kotlin is a direct competitor to Oracle's Java so it's not all surprising you've picked a side here. But if I were with a company that, for whatever strange reason, had a policy against Lombok, then I wouldn't be too fond of Java either. I did write out more but decided to snip it - I don't really have strong opinions about this. Just stating that I don't see the point in learning Kotlin *personally* because it has no professional application yet. I'm not in love with Java but it's benefits outweigh the flaws in my use case. EDIT: I want to iterate that I wasn't so much touting Java as technically superior to Kotlin, but rather (with Lombok) it's not THAT bad, and you can be sure to get much more support for it. Technical superiority isn't *everything*. I do find Kotlin interesting, though to me it seems not worth the time investment nor dealing with relatively obscurity, if outside of Android and maybe RAD. At least for the moment. I'll be keeping an eye on it. Java is pretty old fashioned and it doesn't look like it'll stop dominating market share any time soon but titans do fall. EDIT2: I've been reading some more *recent* stuff about Kotlin and it seems it might be time I take another look at it.
-
A lot of the complaints about Java are sourced from it's verbosity - as diesieben07 mentioned. But that verbosity is also the reason why Java is so popular in the enterprise sector - it makes large projects and collaboration MUCH easier. While it's of course a good idea to write lots of inline comments, Java's main benefit is that it's self-documenting. But again, others might consider it as "too verbose". If you plan on making an opensource mod and like collaboration, I think you really should stick with Java. To save time on the verbosity and repetition, use Project Lombok (it's essential for me these days). Also if you use Eclipse, switch to IntelliJ IDEA - I was resistant to switch for a long time, but after a few days of configuring and learning I am VERY glad I swallowed my pride and took the time to switch and learn. I know Kotlin is gaining ground, and is even now an officially supported Android development language, but sticking to relatively obscure languages will keep your contribution level similarly obscure. I tried to get into Kotlin but I honestly didn't see the point in partitioning my language focus for it's minor benefits. No companies out there will expect you to know it. I personally don't care much for Kotlin. The null-phobia is a reactionary one that is yet-another level of abstraction that isn't necessary IMO and doesn't always provide NPE safety much anyway. But I'm the kind of guy who has my IDE warn me on fields that aren't explicitly declared to null Also it got rid of the ternary operator, and various other little things that just seem counter-productive. But I have a C++ background so yeah. It's obviously loved by a lot of people but it just isn't for me. Java gets a lot of hate, and I've had my fair share of annoyances with it (I started working with C# a while ago and it's really a fantastic language) but I always come back to Java mostly because of the massive community, availability of resources and the volume of capable programmers. It's very easy for any programmer to grasp any Java that even loosely follows the standards and conventions (which is exactly why some criticize it as being too verbose). In summary: I suggest Java with Project Lombok if you want to be community-friendly and keep your commercial-level programming well practiced. Almost all of the major issues people have with Java are solved with Lombok and Java 8's new functional programming additions (i.e. lambda's and method references).
-
Questions about debugging a particular area of lag
CosmicDan posted a topic in Support & Bug Reports
Bit of an open question, I'll try and be concise. On a 1.7.10 server modpack, all players experience significant lag when logging in to the server and when respawning. I have a hunch that it's waiting on some mod for player-related data to save or load causing it. Questions are: 1) Is this actually possible? 2) Could somebody summarize the "spawn" logic for me or point me in the right direction to examine the flow of code for login/respawn of players? I can check this out easily in an Forge-src workspace. 3) Does anybody have any tips on where I might be able to throw in some debug info in source to diagnose this? (I've never compiled Forge from source before, I'm hoping it's not too convoluted a process). Or, better yet, is there some kind of Java tool that I can use to debug or... generate a stacktrace whenever a method is called...? Or something like that? I guess similar to a breakpoint in an IDE but to do with compiled code (since I obviously can't run a modpack server with forge sources)? Or if any more experienced Java developers could point me to any other tool that might assist me in diagnosing it would be great.. if such a tool like that exists it'd be pretty awesome. Thanks! -
What's the deal with mcmod.info (some technical questions)
CosmicDan replied to CosmicDan's topic in ForgeGradle
Great, that clears that up. Thanks for your time! -
1.8 means it's for Minecraft 1.8, that isn't obvious? Looking at my build.gradle, it's not appended like you say - it's also prepended.