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

[1.16.5] Unwanted Potions automatically generated in vanilla Creative Tabs


Recommended Posts

Hello,

I'm currently making an effect and custom potions and it works fine and all, but in the Brewing and Weapons vanilla tabs there is automatically generated potions with my effect (potion, splashpotion, lingering potion and tipped arrows).

For example, here is my custom potion :

Spoiler

custom_potion.png.40ad29fbb0e7be1b9d9e1da11dd0b568.png

And here is the automatically generated potion :

Spoiler

auto_potion.png.1d28e806108daaeb02e6f771c8988d18.png

 

I found a method in the PotionItem and I think it may be related to this :

public void fillItemCategory(ItemGroup p_150895_1_, NonNullList<ItemStack> p_150895_2_) {
      if (this.allowdedIn(p_150895_1_)) {
         for(Potion potion : Registry.POTION) {
            if (potion != Potions.EMPTY) {
               p_150895_2_.add(PotionUtils.setPotion(new ItemStack(this), potion));
            }
         }
      }
}

 

Here is my ModPotions class :

public class ModPotions
{
    public static final RegistryObject<Effect> ASTRAAL_EFFECT = Registration.EFFECTS.register("astraal",
            () -> new ModEffect(EffectType.BENEFICIAL, 0xFF2AC8F2));

    public static final RegistryObject<Potion> ASTRAAL_POTION = Registration.POTIONS.register("astraal",
            () -> new Potion(new EffectInstance(ASTRAAL_EFFECT.get(), 3500, 0)));

    public static final RegistryObject<Potion> LONG_ASTRAAL_POTION = Registration.POTIONS.register("long_astraal",
            () -> new Potion(new EffectInstance(ASTRAAL_EFFECT.get(), 6500, 0)));

    public static final RegistryObject<Potion> STRONG_ASTRAAL_POTION = Registration.POTIONS.register("strong_astraal",
            () -> new Potion(new EffectInstance(ASTRAAL_EFFECT.get(), 3500, 1)));
}

 

For each new Potion I'm making, there is a potion and all its variants generated in the vanilla tabs.

I fail to see what I should do to fix this, so any sort of help is appreciated, thank you all in advance.

Link to post
Share on other sites
9 hours ago, Dakuro said:

For each new Potion I'm making, there is a potion and all its variants generated in the vanilla tabs.

I fail to see what I should do to fix this, so any sort of help is appreciated, thank you all in advance.

its not possible to fix that, because there is no event to modify this
It shouldn't really matter because there are no recipes for the potions, so you can't get them in survival

 

9 hours ago, Dakuro said:

Registration.EFFECTS

You should also put your DeferredRegisters in the same class as the associated RegistryObjects, since this can usually lead to problems

 

Link to post
Share on other sites

Thank you for your response!

16 minutes ago, Luis_ST said:

its not possible to fix that, because there is no event to modify this
It shouldn't really matter because there are no recipes for the potions, so you can't get them in survival

Oh well, yes that's not so important, I just thought it would be inconsistent to have unwanted potions in the vanilla tabs, but we can't do anything about it.

 

18 minutes ago, Luis_ST said:

You should also put your DeferredRegisters in the same class as the associated RegistryObjects, since this can usually lead to problems

Oh I wasn't aware this was really important, than you for the tip! Just for my curiosity, what kind of problems could it cause?

Link to post
Share on other sites
45 minutes ago, Dakuro said:

Just for my curiosity, what kind of problems could it cause?

I'm not 100% sure because I've never tested it myself, but I think NullPointerException and ExceptionInInitializerError
-> putting the DeferredRegister in the class of the RegistryObjects ensures that the class is loaded

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Switched to JDK 16. Now have this: Exception in thread "main" java.lang.module.ResolutionException: Module authlib reads more than one module named cpw.mods.securejarhandler     at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:908)     at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:729)     at java.base/java.lang.module.Resolver.finish(Resolver.java:379)     at java.base/java.lang.module.Configuration.<init>(Configuration.java:140)     at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:494)     at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:298)     at cpw.mods.bootstraplauncher@0.1.15/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:77) Can't find much real info on what this means, let alone relating it to what I'm trying to do. Once again, help appreciated.
    • I Installed the latest version of forge and it still keeps crashing.  
    • i am looking for a mod that shows all the chunks that have been loaded or a mod that shows all of the chunks that are currently loaded for 1.17.1
    • Heya. I have been trying to figure out why using /tp keeps crashing me when Im using forge 1.16.5. the crash report is below. please help me out. ---- Minecraft Crash Report ---- // Don't do that. Time: 7/25/21 5:11 PM Description: Exception generating new chunk java.lang.IllegalArgumentException: bound must be positive     at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_51] {}     at net.minecraft.world.gen.feature.structure.Structure.func_236392_a_(Structure.java:202) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.world.gen.feature.structure.Structure.func_242785_a(Structure.java:221) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.world.gen.feature.StructureFeature.func_242771_a(SourceFile:35) ~[?:?] {re:classloading}     at net.minecraft.world.gen.ChunkGenerator.func_242705_a(SourceFile:278) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorMixin,pl:mixin:A}     at net.minecraft.world.gen.ChunkGenerator.func_242707_a(SourceFile:267) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorMixin,pl:mixin:A}     at net.minecraft.world.chunk.ChunkStatus.lambda$static$2(ChunkStatus.java:41) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.chunk.ChunkStatus$$Lambda$2265/387194988.doWork(Unknown Source) ~[?:?] {}     at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:524) ~[?:?] {re:classloading}     at net.minecraft.world.server.ChunkManager$$Lambda$6523/918777125.apply(Unknown Source) ~[?:?] {}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading,re:classloading}     at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:522) ~[?:?] {re:classloading}     at net.minecraft.world.server.ChunkManager$$Lambda$6520/530773096.apply(Unknown Source) ~[?:?] {}     at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[?:1.8.0_51] {}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926) ~[?:1.8.0_51] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[?:1.8.0_51] {}     at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?] {re:classloading}     at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter$$Lambda$6464/1211192729.run(Unknown Source) ~[?:?] {}     at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:94) ~[?:?] {re:classloading}     at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213145_a(SourceFile:137) ~[?:?] {re:classloading}     at net.minecraft.util.concurrent.DelegatedTaskExecutor.run(SourceFile:105) ~[?:?] {re:classloading}     at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402) ~[?:1.8.0_51] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_51] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_51] {}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1689) ~[?:1.8.0_51] {}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_51] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace:     at java.util.Random.nextInt(Random.java:388) ~[?:1.8.0_51] {}     at net.minecraft.world.gen.feature.structure.Structure.func_236392_a_(Structure.java:202) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.world.gen.feature.structure.Structure.func_242785_a(Structure.java:221) ~[?:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.world.gen.feature.StructureFeature.func_242771_a(SourceFile:35) ~[?:?] {re:classloading}     at net.minecraft.world.gen.ChunkGenerator.func_242705_a(SourceFile:278) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorMixin,pl:mixin:A}     at net.minecraft.world.gen.ChunkGenerator.func_242707_a(SourceFile:267) ~[?:?] {re:mixin,re:classloading,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorAccessor,pl:mixin:APP:repurposed_structures.mixins.json:ChunkGeneratorMixin,pl:mixin:A}     at net.minecraft.world.chunk.ChunkStatus.lambda$static$2(ChunkStatus.java:41) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.chunk.ChunkStatus$$Lambda$2265/387194988.doWork(Unknown Source) ~[?:?] {}     at net.minecraft.world.chunk.ChunkStatus.func_223198_a(ChunkStatus.java:198) ~[?:?] {re:classloading,pl:accesstransformer:B} -- Chunk to be generated -- Details:     Location: 170,-183     Position hash: -785979014998     Generator: net.minecraft.world.gen.NoiseChunkGenerator@68c16e02 Stacktrace:     at net.minecraft.world.server.ChunkManager.lambda$null$18(ChunkManager.java:524) ~[?:?] {re:classloading}     at net.minecraft.world.server.ChunkManager$$Lambda$6523/918777125.apply(Unknown Source) ~[?:?] {}     at com.mojang.datafixers.util.Either$Left.map(Either.java:38) ~[datafixerupper-4.0.26.jar:?] {re:classloading,re:classloading,re:classloading}     at net.minecraft.world.server.ChunkManager.lambda$chunkGenerate$20(ChunkManager.java:522) ~[?:?] {re:classloading}     at net.minecraft.world.server.ChunkManager$$Lambda$6520/530773096.apply(Unknown Source) ~[?:?] {}     at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:952) ~[?:1.8.0_51] {}     at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926) ~[?:1.8.0_51] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) ~[?:1.8.0_51] {}     at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter.func_219083_b(SourceFile:58) ~[?:?] {re:classloading}     at net.minecraft.world.chunk.ChunkTaskPriorityQueueSorter$$Lambda$6464/1211192729.run(Unknown Source) ~[?:?] {}     at net.minecraft.util.concurrent.DelegatedTaskExecutor.func_213148_e(SourceFile:94) ~[?:?] {re:classloading} -- Affected level -- Details:     All players: 1 total; [ServerPlayerEntity['KrystalTheFox_'/132, l='ServerLevel[Modded Survival]', x=2748.50, y=77.00, z=-2911.50]]     Chunk stats: ServerChunkCache: 3347     Level dimension: minecraft:overworld     Level spawn location: World: (51,64,-90), Chunk: (at 3,4,6 in 3,-6; contains blocks 48,0,-96 to 63,255,-81), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)     Level time: 42412 game time, 227 day time     Level name: Modded Survival     Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false     Level weather: Rain time: 120492 (now: false), thunder time: 52965 (now: false)     Known server brands: forge     Level was modded: true     Level storage version: 0x04ABD - Anvil Stacktrace:     at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:854) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:787) ~[?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:78) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:642) [?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232) [?:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer$$Lambda$6334/1896438195.run(Unknown Source) [?:?] {}     at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] {} -- System Details -- Details:     Minecraft Version: 1.16.5     Minecraft Version ID: 1.16.5     Operating System: Windows 10 (amd64) version 10.0     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 1148904608 bytes (1095 MB) / 2147483648 bytes (2048 MB) up to 2147483648 bytes (2048 MB)     CPUs: 4     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     ModLauncher: 8.0.9+86+master.3cf110c     ModLauncher launch target: fmlclient     ModLauncher naming: srg     ModLauncher services:          /mixin-0.8.2.jar mixin PLUGINSERVICE          /eventbus-4.0.0.jar eventbus PLUGINSERVICE          /forge-1.16.5-36.0.45.jar object_holder_definalize PLUGINSERVICE          /forge-1.16.5-36.0.45.jar runtime_enum_extender PLUGINSERVICE          /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE          /forge-1.16.5-36.0.45.jar capability_inject_definalize PLUGINSERVICE          /forge-1.16.5-36.0.45.jar runtimedistcleaner PLUGINSERVICE          /mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE          /forge-1.16.5-36.0.45.jar fml TRANSFORMATIONSERVICE      FML: 36.0     Forge: net.minecraftforge:36.0.45     FML Language Providers:          javafml@36.0         minecraft@1     Mod List:          forge-1.16.5-36.0.45-client.jar                   |Minecraft                     |minecraft                     |1.16.5              |DONE      |NOSIGNATURE         dungeons_mobs-1.16.5-1.0.5.jar                    |Dungeons Mobs                 |dungeons_mobs                 |1.0.5               |DONE      |NOSIGNATURE         repurposed_structures-1.16.5-2.6.6-forge.jar      |Repurposed Structures         |repurposed_structures         |1.16.5-2.6.6-forge  |DONE      |NOSIGNATURE         illagers_plus-1.16.4v1.5.jar                      |Illagers+                     |illagers_plus                 |1.16.4v1.5          |DONE      |NOSIGNATURE         enchantwithmob-1.16.5-1.4.6.jar                   |Enchant With Mob              |enchantwithmob                |1.16.5-1.4.6        |DONE      |NOSIGNATURE         Ma-Enchants-1.16.5-3.6.0 (1).jar                  |Ma Enchants                   |ma-enchants                   |1.16.5-3.6.0        |DONE      |NOSIGNATURE         forge-1.16.5-36.0.45-universal.jar                |Forge                         |forge                         |36.0.45             |DONE      |22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90         torohealth-1.16.4-forge-4.jar                     |ToroHealth                    |torohealth                    |NONE                |DONE      |NOSIGNATURE         extragolems-11.3.0.jar                            |Extra Golems                  |golems                        |11.3.0              |DONE      |NOSIGNATURE         Deeper+in+The+Caves+Remake+1.1.jar                |Deeper In The Caves Remake    |stacked_dimensions_warden     |1.0.0               |DONE      |NOSIGNATURE         MobBattleMod-1.16.2-2.3.4 (2).jar                 |Mob Battle Mod                |mobbattle                     |1.16.2-2.3.4        |DONE      |NOSIGNATURE         supertools-1.16.5-4.5.jar                         |Vanilla+ Tools                |supertools                    |version             |DONE      |NOSIGNATURE     Crash Report UUID: 2888177d-2bf6-4908-99f1-1b7b6465ec05     Player Count: 1 / 8; [ServerPlayerEntity['KrystalTheFox_'/132, l='ServerLevel[Modded Survival]', x=2748.50, y=77.00, z=-2911.50]]     Data Packs: vanilla, mod:dungeons_mobs (incompatible), mod:repurposed_structures, mod:illagers_plus, mod:enchantwithmob, mod:ma-enchants (incompatible), mod:forge, mod:torohealth, mod:golems (incompatible), mod:stacked_dimensions_warden, mod:mobbattle (incompatible), mod:supertools (incompatible)     Type: Integrated Server (map_client.txt)     Is Modded: Definitely; Client brand changed to 'forge'
    • I installed a Forge server, ran the normal .jar file, accepted the EULA, tried to run the forge.jar file but it doesn't give me any folders (like the mods or config) folder. Already looked through the forum here but there weren't any help. I also updated to the newest Java version but it doesn't help.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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