Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

UserMC123

Members
  • Posts

    26
  • Joined

  • Last visited

Everything posted by UserMC123

  1. Just to be clear I am getting the error in the dev environment during the game testing when the class with the dependent code is called. https://github.com/User-PARROT/TTS however seeing as how the dependencies are broken I want to make sure that when I compile the mod. they are there.
  2. doesn't work in the development environment and i will need it to be added to the jar when i compile it
  3. this is the class for the biome: private static int getSkyColorWithTemperatureModifier(float p_244206_0_) { float lvt_1_1_ = p_244206_0_ / 3.0F; lvt_1_1_ = MathHelper.clamp(lvt_1_1_, -1.0F, 1.0F); return MathHelper.hsvToRgb(0.62222224F - lvt_1_1_ * 0.05F, 0.5F + lvt_1_1_ * 0.1F, 1.0F); } public static Biome makeTestForestBiome(float depth, float scale) { MobSpawnInfo.Builder spawnInf = new MobSpawnInfo.Builder(); DefaultBiomeFeatures.farmAnimals(spawnInf); DefaultBiomeFeatures.commonSpawns(spawnInf); spawnInf.setPlayerCanSpawn(); net.minecraft.world.biome.BiomeGenerationSettings.Builder builder = (new net.minecraft.world.biome.BiomeGenerationSettings.Builder()).surfaceBuilder(ConfiguredSurfaceBuilders.GRASS); DefaultBiomeFeatures.addDefaultCarvers(builder); DefaultBiomeFeatures.addDefaultLakes(builder); DefaultBiomeFeatures.baseJungleSpawns(spawnInf); DefaultBiomeFeatures.addDefaultMonsterRoom(builder); DefaultBiomeFeatures.addDefaultUndergroundVariety(builder); DefaultBiomeFeatures.addDefaultOres(builder); DefaultBiomeFeatures.addDefaultSoftDisks(builder); DefaultBiomeFeatures.addForestGrass(builder); DefaultBiomeFeatures.addForestGrass(builder); DefaultBiomeFeatures.addFerns(builder); DefaultBiomeFeatures.addJungleTrees(builder); DefaultBiomeFeatures.addDefaultMushrooms(builder); DefaultBiomeFeatures.addDefaultSprings(builder); DefaultBiomeFeatures.addJungleGrass(builder); DefaultBiomeFeatures.addLightBambooVegetation(builder); return (new net.minecraft.world.biome.Biome.Builder()).precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.JUNGLE).depth(depth).scale(scale).temperature(0.6F).downfall(0.2F).specialEffects((new net.minecraft.world.biome.BiomeAmbience.Builder()).waterColor(3124991).waterFogColor(5541815).fogColor(14412287).foliageColorOverride(8640564).skyColor(getSkyColorWithTemperatureModifier(0.6F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build()).mobSpawnSettings(spawnInf.build()).generationSettings(builder.build()).build(); }
  4. You can add biomes without json. this is how i do it public static final DeferredRegister<Biome> Mod_biomes = DeferredRegister.create(ForgeRegistries.BIOMES, test.MOD_ID); public static final RegistryObject<Biome> test_forest = Mod_biomes.register("test_forest",()-> TestForestBiome.makeTestForestBiome(0.4f,0.6f)); public static final RegistryKey<Biome> TEST_FOREST_KEY = RegistryKey.create(Registry.BIOME_REGISTRY, new ResourceLocation(test.MOD_ID, "test_forest")); public static void addBiomesToOverworld() { BiomeManager.addBiome(BiomeManager.BiomeType.WARM, new BiomeManager.BiomeEntry(TEST_FOREST_KEY, 1)); }
  5. It was debugging to see if the class would be there during the run. but it did nothing! And just having implementation does nothing either
  6. Here is my build.gradle: buildscript { repositories { maven { url = 'https://maven.minecraftforge.net' } maven { url = "https://oss.sonatype.org/content/repositories/snapshots" } mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true classpath group: 'edu.cmu.sphinx', name: 'sphinx4-core', version:'5' classpath group: 'edu.cmu.sphinx', name: 'sphinx4-data', version:'5' } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' java.toolchain.languageVersion = JavaLanguageVersion.of(16) println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { mappings channel: 'official', version: '1.17.1' runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' mods { tts { source sourceSets.main } } } server { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' mods { tts { source sourceSets.main } } } data { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { tts { source sourceSets.main } } } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { maven { url 'https://repo.maven.apache.org/maven2' name 'Maven Central' } maven { url "https://oss.sonatype.org/content/repositories/snapshots" name 'Sphinx4' } } dependencies { minecraft 'net.minecraftforge:forge:1.17.1-37.0.58' runtimeOnly group: 'edu.cmu.sphinx', name: 'sphinx4-core', version:'5prealpha-SNAPSHOT' runtimeOnly group: 'edu.cmu.sphinx', name: 'sphinx4-data', version:'5prealpha-SNAPSHOT' compileOnly group: 'edu.cmu.sphinx', name: 'sphinx4-core', version:'5prealpha-SNAPSHOT' compileOnly group: 'edu.cmu.sphinx', name: 'sphinx4-data', version:'5prealpha-SNAPSHOT' implementation group: 'edu.cmu.sphinx', name: 'sphinx4-core', version:'5prealpha-SNAPSHOT' implementation group: 'edu.cmu.sphinx', name: 'sphinx4-data', version:'5prealpha-SNAPSHOT' } // Example for how to get properties into the manifest for reading at runtime. jar { manifest { attributes([ "Specification-Title" : "tts", "Specification-Vendor" : "examplemodsareus", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : "examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } jar.finalizedBy('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } I can import them like normal but the game seems to think they don't exist?
  7. OK but now i get this: > Configure project : Java: 1.8.0_241 JVM: 25.241-b07(Oracle Corporation) Arch: amd64 WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula. FAILURE: Build failed with an exception. * What went wrong: org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String; * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Exception is: java.lang.NoSuchMethodError: org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String; at org.jetbrains.plugins.gradle.tooling.util.resolve.DependencyResultsTransformer.processResolvedResult(DependencyResultsTransformer.java:117) at org.jetbrains.plugins.gradle.tooling.util.resolve.DependencyResultsTransformer.buildExternalDependencies(DependencyResultsTransformer.java:77) at org.jetbrains.plugins.gradle.tooling.util.resolve.ArtifactQueryResolver.resolve(ArtifactQueryResolver.java:99) at org.jetbrains.plugins.gradle.tooling.util.resolve.DependencyResolverImpl.resolveDependencies(DependencyResolverImpl.java:105) at org.jetbrains.plugins.gradle.tooling.util.resolve.DependencyResolverImpl.resolveDependencies(DependencyResolverImpl.java:94) at org.jetbrains.plugins.gradle.tooling.builder.ModelBuildScriptClasspathBuilderImpl.buildAll(ModelBuildScriptClasspathBuilderImpl.java:88) at org.jetbrains.plugins.gradle.tooling.internal.ExtraModelBuilder.buildAll(ExtraModelBuilder.java:88) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuilderWithNoParameter.build(DefaultToolingModelBuilderRegistry.java:223) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:322) at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication.reapply(DefaultUserCodeApplicationContext.java:98) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$UserCodeAssigningBuilder.build(DefaultToolingModelBuilderRegistry.java:322) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.lambda$build$0(DefaultToolingModelBuilderRegistry.java:265) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:340) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:340) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:321) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$LockSingleProjectBuilder.build(DefaultToolingModelBuilderRegistry.java:265) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder$1.call(DefaultToolingModelBuilderRegistry.java:300) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79) at org.gradle.tooling.provider.model.internal.DefaultToolingModelBuilderRegistry$BuildOperationWrappingBuilder.build(DefaultToolingModelBuilderRegistry.java:297) at org.gradle.tooling.internal.provider.runner.DefaultBuildController.getModel(DefaultBuildController.java:102) 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.findModel(AbstractBuildController.java:57) at org.gradle.tooling.internal.consumer.connection.AbstractBuildController.findModel(AbstractBuildController.java:44) at org.jetbrains.plugins.gradle.model.ProjectImportAction$MyBuildController.findModel(ProjectImportAction.java:524) at org.jetbrains.plugins.gradle.model.ClassSetImportModelProvider.populateProjectModels(ClassSetImportModelProvider.java:39) at org.jetbrains.plugins.gradle.model.ProjectImportAction.addProjectModels(ProjectImportAction.java:211) at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:127) at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:55) at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:77) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionRunningListener.runAction(AbstractClientProvidedBuildActionRunner.java:132) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionRunningListener.apply(AbstractClientProvidedBuildActionRunner.java:119) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner$ActionRunningListener.apply(AbstractClientProvidedBuildActionRunner.java:96) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$2(DefaultBuildTreeLifecycleController.java:84) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$doBuild$4(DefaultBuildTreeLifecycleController.java:105) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:213) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.doBuild(DefaultBuildTreeLifecycleController.java:99) at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:70) at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:58) at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:52) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:50) at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:69) at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:90) at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:128) at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40) at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:40) at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53) at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:40) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75) at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62) at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79) at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:103) at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64) at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.lambda$execute$0(BuildSessionLifecycleBuildActionExecuter.java:55) at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:54) at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:36) 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.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75) at org.gradle.util.internal.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) * Get more help at https://help.gradle.org CONFIGURE FAILED in 1s Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
  8. When I am running the setup I get: Starting Gradle Daemon... Gradle Daemon started in 1 s 690 ms > Configure project : Java: 1.8.0_241 JVM: 25.241-b07(Oracle Corporation) Arch: amd64 WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula. FAILURE: Build failed with an exception. * What went wrong: org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String; * 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 CONFIGURE FAILED in 15s Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
  9. The Slots Move the stacks correctly when I shift click but when I manually move the stack it duplicates and creates ghost items please tell me what I did wrong???? my git repo: https://github.com/User-PARROT/MC-FORGE-1.16-Capability-Testing
  10. My capability works It saves and loads the items in the slots. I need to know how do i get .getStackInSlot(1) in a different class or somthing like it.
  11. public interface ITESTInv extends IItemHandlerModifiable { } And public class TESTInventory extends ItemStackHandler implements ITESTInv { public static ITESTInv container; public TESTInventory () { super(8); } @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); } @Override public CompoundNBT serializeNBT() { return super.serializeNBT(); } @Override public void deserializeNBT(CompoundNBT nbt) { super.deserializeNBT(nbt); } }
  12. Ok I've tried that in @SubscribeEvent public void ClientsTick(TickEvent.ClientTickEvent event) { if (event.phase == TickEvent.Phase.END) { if (!(TESTInventory.container.getStackInSlot(1).isEmpty())) { LOGGER.info("Is Not Empty"); } } } And TESTInventory.container get the IItemHandler from the capability and when I load a world I get a java.lang.NullPointerException: null
  13. I have a custom inventory that uses capabilities and it works I just need to know how would I be able to get if ex slot 1 has dirt.
  14. Never mind I fixed the problem I Forgot to register my Capability
  15. I have a custom inventory that saves when i have the world running but when I rejoin the items are not there in the slots.
  16. You Need to Change public static final RegistryObject<Item> COPPER_ORE = ITEMS.register("copper_ore", () -> new Item(new Item.Properties().group(ItemGroup.MISC))); To public static final RegistryObject<Item> COPPER_ORE = ITEMS.register("copper_ore", () -> new BlockItem(BlockList.COPPER_ORE.get(),new Item.Properties().group(ItemGroup.MISC)));
  17. Try This: public class TestChestTile extends LockableLootTileEntity { protected int Size = 36; private NonNullList<ItemStack> chest_items = NonNullList.withSize(Size,ItemStack.EMPTY); protected int numPlayerUsing; private IItemHandlerModifiable items = createHandler(); private LazyOptional<IItemHandlerModifiable> itemHandler = LazyOptional.of(()-> items); public TestChestTile(TileEntityType<?> p_i48284_1_) { super(p_i48284_1_); } public TestChestTile() { this(TileEntityInit.TEST_CHEST_TILE.get()); } @Override public int getSizeInventory() { return Size; } @Override public NonNullList<ItemStack> getItems() { return chest_items; } public void setItems(NonNullList<ItemStack> items) { this.chest_items = items; } @Override protected ITextComponent getDefaultName() { return new TranslationTextComponent("container.test_chest"); } @Override protected Container createMenu(int id, PlayerInventory player) { return new TestChestContainer(id,player,this); } @Override public CompoundNBT write(CompoundNBT compound) { super.write(compound); if (!this.checkLootAndWrite(compound)) { ItemStackHelper.saveAllItems(compound, this.chest_items); } return compound; } @Override public void read(BlockState state,CompoundNBT compound) { super.read(state,compound); this.chest_items = NonNullList.withSize(this.getSizeInventory(), ItemStack.EMPTY); if (!this.checkLootAndRead(compound)) { ItemStackHelper.loadAllItems(compound, this.chest_items); } } @Override public boolean receiveClientEvent(int id, int type) { if(id == 1){ this.numPlayerUsing = type; return true; } else { return super.receiveClientEvent(id, type); } } @Override public void openInventory(PlayerEntity playerEntity) { if(playerEntity.isSpectator()){ if(this.numPlayerUsing < 0){ this.numPlayerUsing = 0; } ++numPlayerUsing; this.openOrClose(); } } @Override public void closeInventory(PlayerEntity playerEntity) { if(!playerEntity.isSpectator()){ --this.numPlayerUsing; this.openOrClose(); } } protected void openOrClose(){ Block block = this.getBlockState().getBlock(); if (block instanceof TestChestBlock) { this.world.addBlockEvent(this.pos, block, 1, this.numPlayerUsing); this.world.notifyNeighborsOfStateChange(this.pos, block); } } public static int getPlayersUsing(IBlockReader reader, BlockPos pos) { BlockState blockstate = reader.getBlockState(pos); if (blockstate.hasTileEntity()) { TileEntity tileentity = reader.getTileEntity(pos); if (tileentity instanceof TestChestTile) { return ((TestChestTile) tileentity).numPlayerUsing; } } return 0; } public static void swapContents(TestChestTile te, TestChestTile otherTe) { NonNullList<ItemStack> list = te.getItems(); te.setItems(otherTe.getItems()); otherTe.setItems(list); } @Override public void updateContainingBlockInfo() { super.updateContainingBlockInfo(); if (this.itemHandler != null) { this.itemHandler.invalidate(); this.itemHandler = null; } } @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nonnull Direction side) { if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return itemHandler.cast(); } return super.getCapability(cap, side); } private IItemHandlerModifiable createHandler() { return new InvWrapper(this); } @Override public void remove() { super.remove(); if(itemHandler != null) { itemHandler.invalidate(); } }
  18. I am trying to make a custom structure by following This Tutorial. And when I add this to my biome to add the structure the game crashes. build.withStructure(FeatureConfig.CONFIGURED_HOUSE)
  19. Fixed it. the problem was I had the wrong version of forge. I needed to have: [[dependencies.test]] modId="forge" mandatory=true versionRange="[35,)" ordering="NONE" side="BOTH" [[dependencies.test]] modId="minecraft" mandatory=true versionRange="[1.16.4,1.17)" ordering="NONE" side="BOTH" I had: [[dependencies.test]] modId="forge" mandatory=true versionRange="[35,)" ordering="NONE" side="BOTH" [[dependencies.test]] modId="minecraft" mandatory=true versionRange="[1.16.4,1.17)" ordering="NONE" side="BOTH"
  20. I tried to use DeferredRegister And they work but when I package my mod in to a .jar file and launch the game with it installed I get this Test Mod (test) encountered an error during the common_setup event phase And in the crash report I see this. ---- Minecraft Crash Report ---- // There are four lights! Time: 12/15/20 3:20 PM Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:85) [?:?] {re:classloading} at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.lambda$null$1(Minecraft.java:508) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft$$Lambda$3860/1126454617.run(Unknown Source) [?:?] {} at net.minecraft.util.Util.func_215077_a(SourceFile:404) [?:?] {re:classloading} at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:504) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft$$Lambda$3572/1610803524.accept(Unknown Source) [?:?] {} at net.minecraft.client.gui.ResourceLoadProgressGui.func_230430_a_(ResourceLoadProgressGui.java:113) [?:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.func_195458_a(GameRenderer.java:480) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:976) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {} at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.4-35.1.10.jar:35.1] {} at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$426/474933596.call(Unknown Source) [forge-1.16.4-35.1.10.jar:35.1] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at java.util.Objects.requireNonNull(Objects.java:290) ~[?:1.8.0_51] {} -- MOD test -- Details: Mod File: modid-1.0.jar Failure message: Test Mod (test) encountered an error during the common_setup event phase java.lang.NullPointerException: Registry Object not present: test:test_entity Mod Version: 1.0 Mod Issue URL: http://my.issue.tracker/ Exception message: java.lang.NullPointerException: Registry Object not present: test:test_entity Stacktrace: at java.util.Objects.requireNonNull(Objects.java:290) ~[?:1.8.0_51] {} at net.minecraftforge.fml.RegistryObject.get(RegistryObject.java:120) ~[?:?] {re:classloading} at com.test.testMod.util.ForgeEvents.EntityRenderer.registerEntityRenders(EntityRenderer.java:76) ~[?:1.0]
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.