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 added an option to replace all skeletons in overworld with zombies, but it may (exactly, MAY and not WILL) crash server during world load. Here is a problemmatic piece of code: /* This code is inside EntityJoinWorldEvent event handler */ /* Replace skeletons with zombies? */ if (ConfigHandler.GENERAL.noSkeletons.get()) { //Zombienation.LOGGER.debug("Attempting to replace skeleton with zombie..."); if (event.getEntity() instanceof SkeletonEntity || event.getEntity() instanceof StrayEntity) { if (event.getEntity().level.dimension().location().toString().equals("minecraft:overworld")) { /* Random zombie randomly turns into any other zombie from vanilla or my mod on spawn */ /* Zombie itself isn't a problem - I have tried vanilla zombies or even pigs */ RandomZombie zombie = new RandomZombie(ZombiesRegistry.RANDOM_ZOMBIE.get(), event.getEntity().level); zombie.setPos(event.getEntity().getX(), event.getEntity().getY(), event.getEntity().getZ()); event.getEntity().level.addFreshEntity(zombie); //Server freezes at this line /* Line below is never reached if server freezes, so it can't be an issue? */ event.setCanceled(true); //Zombienation.LOGGER.debug("Done!"); } } }
  2. Hi! In my mod, "Zombination", being attacked by zombie gives a slight chance to contract a zombie virus. It happens in LivingAttackEvent handler, and, problem is, zombies may infect players even if attack was blocked by shield. Of course, I can check if attacked entity is a player, has a shield, and is crouching, but, maybe, there is a better way to make shield protect from infection? This is how it works currently (no check for shield blocking): /* Is damage source a zombie ? */ if (event.getSource().getEntity() instanceof ZombieEntity || event.getSource().getEntity() instanceof ZombieBear || event.getSource().getEntity() instanceof ZolphinEntity) { /* Is target an enderman? */ if(event.getEntityLiving() instanceof EndermanEntity) { // Heal enderman, so that zombies almost never win this fight event.getEntityLiving().heal(10f); } /* Is target infectable */ if (isInfectable(event.getEntity())) { double d = Math.random(); if (d <= ConfigHandler.INFECTION.infectionChance.get() || (event.getEntity().hasCustomName() && event.getEntity().getCustomName().getString().equals("Heisenberg"))) { /* Is entity already infected? */ if(!event.getEntityLiving().hasEffect(PotionsRegistry.POTION_ZOMBIE_VIRUS.getEffect())) { event.getEntityLiving().addEffect(new EffectInstance(PotionsRegistry.POTION_ZOMBIE_VIRUS, ConfigHandler.INFECTION.infectionDuration.get() * 20, (int) 0, true, (false))); } } }
  3. I am trying to make a sword with configurable attack damage and attack speed. But there is a problem: config files are loaded after items registered, and sword always have default damage and speed. Is there any way to: a) Load config file BEFORE registering items? b) Change attack damage and attack speed after item is registered?
  4. It seems like class name conversion goes wrong: Z:\Dev\Zombienation-1.17>gradlew -PUPDATE_CLASSNAMES=true updateClassnames > Configure project : Java: 16.0.2 JVM: 16.0.2+7-67(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. > Task :extractRangeMap java.lang.IllegalArgumentException: Could not get Binary name! com/madalchemist/zombienation/CreativeTab.java @ 223 at net.minecraftforge.srg2source.extract.ExtractUtil.getInternalName(ExtractUtil.java:39) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker.getInternalName(SymbolReferenceWalker.java:105) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker.process(SymbolReferenceWalker.java:406) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker$1.visit(SymbolReferenceWalker.java:750) at org.eclipse.jdt.core.dom.SimpleName.accept0(SimpleName.java:198) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3103) at org.eclipse.jdt.core.dom.SimpleType.accept0(SimpleType.java:195) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker.acceptChild(SymbolReferenceWalker.java:93) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker.process(SymbolReferenceWalker.java:544) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker$1.visit(SymbolReferenceWalker.java:769) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:509) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3126) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:258) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3055) at net.minecraftforge.srg2source.extract.SymbolReferenceWalker.safeWalk(SymbolReferenceWalker.java:81) at net.minecraftforge.srg2source.extract.RangeExtractor$1.acceptAST(RangeExtractor.java:234) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1065) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:661) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:1001) at net.minecraftforge.srg2source.extract.RangeExtractor.batchGenerate(RangeExtractor.java:250) at net.minecraftforge.srg2source.extract.RangeExtractor.run(RangeExtractor.java:149) at net.minecraftforge.srg2source.RangeExtractMain.main(RangeExtractMain.java:116) at net.minecraftforge.srg2source.ConsoleTool$Redefined.main(ConsoleTool.java:115) at net.minecraftforge.srg2source.ConsoleTool.main(ConsoleTool.java:48) (and this repeats for every class in my mod) I see libraries, including forge, but cannot find required classes inside
  5. I have created mod for 1.16.5, and it works well enough. But, when I tried to port it to 1.17, I found that MOST of minecraft classes used in mod are no longer available (event bacic ones like block, item, entity, etc.). IntelliJ IDEA marks almost every line as error. What actually happened? Is 1.17 so much incompatible? Or there was some error in workspace setup? This is my build.gradle
  6. Hi! I am trying to make my own zombie apocalypse mod, and I want to make my zombies look different. A good example how it must look are zombies in "7 Days to die" game. I want to use player skins as textures for my zombies, but they look completely screwed up on zombie model. And, if I use player model instead, textures fit perfectly, but zombie walks like player, not like zombie. Do I have to create my own model for my zombies? Or is there a way to make player model move like zombie / fit player skin on zombie model? I know you will recommend me to look at vanilla classes. I already did it. There are a lot of variable names like p_212850_1_, which makes code very hard to understand...

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.