Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mad Alchemist

Members
  • Joined

  • Last visited

  1. I have ported most of my mod from 1.16.5 to 1.18.2, but stuck with porting structures... In 1.16.5, there was java code where it was possible to adjust structure height. Code was entirely based on TelepathicGrunt's tutorials. I didn't succeeded in porting 1.16.5 code to 1.18.2, and then found the same tutorial updated to 1.18.2, but... There was no java code anymore! Structures in 1.18.2 can be generated using .nbt and JSON only. Ok, it's even easier, I thought then. But... Whenever I use structure block to save my structure to .nbt file and then using this .nbt to spawn my structure, every part is generated above ground. I am trying to make a well with drowned spawner inside, but it always spawns as a weird tower filled with water. No matter where I put my structure block - below structure, on top of it, or at ground level (in creative world where I build it, structure itself is placed as if it was generated as intended) - it always spawns with it's bottom on surface. How do I adjust structure placement in 1.18.2?
  2. You speak of it as if crashing minecraft mod could disable cooling in nuclear power plant or change orbits of GPS satellites in real world... With such attitude, when nobody must go creative until fully mastered java, forge, mixins, etc., all we would have today is vanilla MC, maybe with very few mods written by grandmeisters and puny datapacks with sooo limited functionality. The worst thing that really could happen, I believe, is my mod breaking someone other's mod, and modpack author is forced to remove either my mod or second one. By the way, I found a solution somewhere in internet, but have lost a link there. Crashes and non-working mixins was not my fault! But I had to put this into build.gradle: // Generate a fixed tsrg file after generating the default tsrg file createMcpToSrg { outputs.upToDateWhen {false} doLast { fixFG5TsrgForMixinAP(output.get().asFile, file("${buildDir}/fixMcpToSrg/output.tsrg")) } } // Tell mixin to use the fixed TSRG file mixin { reobfSrgFile = file("${buildDir}/fixMcpToSrg/output.tsrg") } // Function that actually fixes the TSRG file static def fixFG5TsrgForMixinAP(File inFile, File outFile) { // Make directory if needed outFile.parentFile.mkdirs() try (Scanner scanner = new Scanner(inFile); PrintWriter out = new PrintWriter(outFile)) { boolean firstLine = true while (scanner.hasNextLine()) { String next = scanner.nextLine() // Skip first 'tsrg left right' header line if (firstLine) { firstLine = false continue } // Skip 'static' indicators if (next.trim() == "static") { continue } // Export line otherwise out.println(next) } } } And now mixins are working, and I have replaced that scary @Overwrite with @Inject I believe it would work with initial version that used @Overwrite too...
  3. Yes, it is still have weird problem with BrownBear, but currently applied workaround so that mod can be published
  4. I removed BrownBear from natural spawns. It still can be spawned in creative. And now there is no crashes. Just did this: /* if (BiomeDictionary.getBiomes(BiomeDictionary.Type.FOREST).contains(resourceKey)) { event.getSpawns().getSpawner(MobCategory.CREATURE) .add(new MobSpawnSettings.SpawnerData(EntityRegistry.BROWN_BEAR.get(), ConfigurationHandler.SPAWN.brownBearSpawnWeight.get(), ConfigurationHandler.SPAWN.brownBearGroupMin.get(), ConfigurationHandler.SPAWN.brownBearGroupMax.get())); } */ } And in EntitySpawn event made that 1/20 of wolves turn into bears instantly. Now all works so good that can be published, just have to warn players that there may be other, less frequent problems.
  5. EntityRegistry but I already fixed it based on GitafiStudios Waddles which is a real treasure for those who want to create their own entities mod, because of small and easy-to-read code and many versions of MC supported.
  6. Should I copy and edit PolarBear instead of extending it? Because otherwise it doesn't looks different from all zombies I have. And, zombies also extend vanilla zombie, so it's unlikely that it is the case.
  7. I have figured out that this crash is related to BrownBear. When I removed only bear, leaving all other entities, all works fine. But there is nothing suspicious in BrownBear code too!
  8. I just figured out that this is the class that causes crashes (by commenting out all the code). Do you mean that I have somewhere in config file groupMin > groupMax? ConfigurationHandler disallows that, groupMin is always >=0 and groupMax is always > groupMin both in defaults and actual config.
  9. I have started this topic for 1.17.1 version of my mod, but 1.17.1 isn't supported anymode. I have updated forge to 1.18.2 (it was surprisingly easy with very few code changes, usually it is hell), but... Problem persisted, and it's the same. Exactly same crash report, reproduced several times in exactly same conditions. Here is, the crash report (not exactly: crash report was not generated, it's debug.log): Source code is available at https://github.com/MadAlchemist/Zombienation/tree/1.18.2, but don't know which file is bugged...
  10. You can find it on a github, but I already found an example how to do it all properly.
  11. Just created 1.18.2 fork of my project (because 1.17.1 is not supported anymore). It was surprisingly easy to make code compatible enough to compile (usually, version upgrade is a hell), it event creates main window, but crashes at some point. Here is a crash report, log, and suspicious piece of code (that worked on 1.17): I added log outputs into suspicious method and figured out that it crashes at "Creating entity type" point.
  12. After I have ported most of my mod to 1.16.5, I am getting a strange crash during world creation (or shortly after) on standalone servers. Single-player is OK. Here is latest.log (and there was no debug.log in logs directory): I can't even figure out which feature of mod is bugged, as my mod isn't even mentioned in crash report. Or it is bad version of forge? I tried to run my mod on 1.17.1-37.1.1, and here is source code of all my mod if you need it: https://github.com/MadAlchemist/Zombienation/tree/1.17.1 (Don't judge too harshly for bad coding practices, if nobody would start modding before mastered java, all we would have today is vanilla MC)
  13. Where should I extend it? Because public abstract class MixinZombieEntity extends MonsterEntity definitely is a wrong code and will not compile.
  14. Of course, I understand that creating a new ZombieEntity by extending MonsterEntity will not make skeletons not burn in sun. But I already have lot of my own zombies, I need to modify behavior of vanilla one! And changing ZombieEntity to MonsterEntity in mixin code made code compile again, but it just don't works now. Nothing crashes, but vanilla zombies burn to crisp every morning... package com.madalchemist.zombienation.mixin; import com.madalchemist.zombienation.ConfigHandler; import net.minecraft.entity.monster.MonsterEntity; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(MonsterEntity.class) public abstract class MixinZombieEntity { @Inject(method="isSunSensitive", at=@At("HEAD"), cancellable = true) public void isSunSensitive(CallbackInfoReturnable<Boolean> cir) { cir.setReturnValue(ConfigHandler.GENERAL.burnAtDay.get()); } }
  15. Souldn't this also make skeletons not burn in sun?

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.