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

Everything posted by Mad Alchemist

  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?
  16. My project has only one mixin at this moment, and it is: @Mixin(ZombieEntity.class) public abstract class MixinZombieEntity { @Overwrite(remap = true) public boolean isSunSensitive() { if(ConfigHandler.GENERAL.burnAtDay.get()) { return(true); } else { return(false); } } } Problem is, after I have added Parchment, i am getting an error: Zombienation\src\main\java\com\madalchemist\zombienation\mixin\MixinZombieEntity.java:14: error: No obfuscation mapping for @Overwrite method public boolean isSunSensitive() { ^ If I set remap to false, evereything compiles ok, but vanilla zombies burn in sun even if should not.
  17. Found a bug. Field was declared as LivingEntity, but should be, for example, MonsterEntity...
  18. Got another problem with my wall-breaking zombies. How do I get their current attack target (if any), or a spot where they want to walk into? There are no methods like Zombie.getTarget()... P.S. I am still on 1.16.5 and now using Parchment
  19. Closed project, restartedd IDE, loaded project again... Yes! Those meaningless P_666_666_666 gone away. But still, is this method (public RayTraceResult pick(double pHitDistance, float pPartialTicks, boolean pHitFluids) suitable for my needs? As far as I understand, pHitDistance is how long is the ray traced, pHidFluids is whether fluid blocks cause collision, but what are pPartialTicks?
  20. Got a list of versions by opening repository in browser. Now project loads and builds properly, but argument names are still meaningless.
  21. Full log is here. But, I am sure it crashes because cannot download mappings. In parchment docs, there was mappings channel: 'parchment', version: '2021.08.15-1.17.1' Where do I get list of valid versions for 1.16.5?
  22. Tried to set up all stuff from parchment docs. Got following error: Could not resolve all files for configuration ':runtimeClasspathCopy'. > Could not find net.minecraftforge:forge:1.16.5-36.1.0_mapped_parchment_1.16.5_at_8047e1fb20118f11ea75ef67e07a7d525623ed3c. Searched in the following locations: - file:/C:/Users/Mad Alchemist/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.1.0_mapped_parchment_1.16.5_at_8047e1fb20118f11ea75ef67e07a7d525623ed3c/forge-1.16.5-36.1.0_mapped_parchment_1.16.5_at_8047e1fb20118f11ea75ef67e07a7d525623ed3c.pom - file:/C:/Users/Mad Alchemist/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.1.0_mapped_parchment_1.16.5_at_8047e1fb20118f11ea75ef67e07a7d525623ed3c/forge-1.16.5-36.1.0_mapped_parchment_1.16.5_at_8047e1fb20118f11ea75ef67e07a7d525623ed3c.jar Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html Here is my build.gradle now: And here how it was before: Last version that worked I am not familiar enough with gradle internals and where it downloads all dependencies from and where it stores all cached stuff.
  23. I am trying to make zombies able to break wall if there is a yummy player behind it. As far as I understood, I have to use RayTraceResult, but zombies have only public RayTraceResult pick(double p_213324_1_, float p_213324_3_, boolean p_213324_4_) What this methot does, and, what are these arguments with as meaningless names as usually? P.S. I am using 1.16.5
  24. Where is this "ForgeInternalHandler" located? And, can't I just do it in entity tick and check if chunk entity is in is fully loaded?
  25. Leaving it "as is", it will also replace everything that extends SkeletonEntity or StrayEntity classes? Not sure if I want it... It may be desired behavior if some mod adds skeletons by extending vanilla ones... And thanks for help, I probably would never find out it myself...

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.