Jump to content

Entity Attributes not applying


bigMojitos

Recommended Posts

Hi, I have a custom entity with Attributes which aren't applying. Before when I didn't have an EntityAttributeCreationEvent handler my entity wouldn't event load but, I added one and It now spawns and renders/animates. However, none of the Entity Attribute modifiers are actually applying to my entity. No matte how much I change the Attack Speed or Movement variable it always stays the same.

Heres my Entity Class

package willh.org.medieval.entity.reus;

import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.PathfinderMob;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.goal.*;
import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal;
import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal;
import net.minecraft.world.entity.animal.Cow;
import net.minecraft.world.entity.monster.Monster;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraftforge.event.entity.player.AttackEntityEvent;
import software.bernie.geckolib3.core.IAnimatable;
import software.bernie.geckolib3.core.PlayState;
import software.bernie.geckolib3.core.builder.AnimationBuilder;
import software.bernie.geckolib3.core.controller.AnimationController;
import software.bernie.geckolib3.core.event.predicate.AnimationEvent;
import software.bernie.geckolib3.core.manager.AnimationData;
import software.bernie.geckolib3.core.manager.AnimationFactory;

public class ReusEntity extends Monster implements IAnimatable {
    boolean attacking;

    public ReusEntity(EntityType<? extends Monster> p_20966_, Level p_20967_) {
        super(p_20966_, p_20967_);
        attacking =false;
    }
    private AnimationFactory factory = new AnimationFactory(this);

    @Override
    public void registerControllers(AnimationData data) {
        data.addAnimationController(new AnimationController(this, "controller",
                0, this::predicate));

    }
    public static void print(String r){
        if(Minecraft.getInstance().player != null) {
            Player p = Minecraft.getInstance().player;
            p.sendSystemMessage(Component.nullToEmpty(r));
        }

    }

    @Override
    public boolean doHurtTarget(Entity p_21372_) {
        this.level.broadcastEntityEvent(this, (byte)10);
        return super.doHurtTarget(p_21372_);
    }
    @Override
    public void handleEntityEvent(byte p_21375_) {
        attacking = p_21375_ == 10;
        super.handleEntityEvent(p_21375_);
    }

    protected void registerGoals() {

        this.goalSelector.addGoal(0, new MeleeAttackGoal(this, 1.1d, false) {});
        this.goalSelector.addGoal(1, new FloatGoal(this));
        this.goalSelector.addGoal(2, new PanicGoal(this, 1.25D));
        this.goalSelector.addGoal(3, new NearestAttackableTargetGoal(this, Cow.class,true));
        this.goalSelector.addGoal(4, new LookAtPlayerGoal(this, Player.class, 8.0F));
        this.goalSelector.addGoal(5, new RandomLookAroundGoal(this));
        this.targetSelector.addGoal(6, (new HurtByTargetGoal(this)).setAlertOthers());
    }

    private <E extends IAnimatable> PlayState predicate(AnimationEvent<E> event) {

        if (event.isMoving()) {
            event.getController().setAnimation(new AnimationBuilder().addAnimation("walkEquipped.model.new", true));
            return PlayState.CONTINUE;
        }
        event.getController().setAnimation(new AnimationBuilder().addAnimation("idle_equipped.new", true));
        return PlayState.CONTINUE;
    }

    public static AttributeSupplier setAttributes() {
        return Mob.createMobAttributes()
                .add(Attributes.MAX_HEALTH, 20.0D)
                .add(Attributes.ATTACK_DAMAGE, 3.0f)
                .add(Attributes.ATTACK_SPEED, 0.9)
                .add(Attributes.MOVEMENT_SPEED, 0.3f).build();
    }

    @Override
    public AnimationFactory getFactory() {
        return this.factory;
    }
}

And heres my main mod class where I register my EntityAttributeCreationEvent handler:

@Mod(Medieval.MOD_ID)
public class Medieval
{
    public static final String MOD_ID = "medi";

    private static final Logger LOGGER = LogUtils.getLogger();

    public static ResourceLocation modLoc(String name) {
        return new ResourceLocation(MOD_ID, name);
    }

    public Medieval() {
        IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
        // Add to the constructor
        ItemInit.register(modEventBus);
        EntityInit.ENTITIES.register(modEventBus);
        modEventBus.addListener(this::commonSetup);
        modEventBus.addListener(this::clientSetup);
        GeckoLib.initialize();

        modEventBus.addListener(this::commonSetup);
        MinecraftForge.EVENT_BUS.register(this);
    }
    private void commonSetup(final FMLCommonSetupEvent event)
    {
    }
    private void clientSetup(FMLClientSetupEvent event){
        EntityRenderers.register(EntityInit.REUS.get(), ReusRenderer::new);

    }

    @Mod.EventBusSubscriber(modid = MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
    public static class ClientModEvents
    {
        @SubscribeEvent
        public static void onClientSetup(FMLClientSetupEvent event)
        {
            LOGGER.info("HELLO FROM CLIENT SETUP");
            LOGGER.info("MINECRAFT NAME >> {}", Minecraft.getInstance().getUser().getName());
        }

        @SubscribeEvent
        public static void registerEntityAttributes(EntityAttributeCreationEvent event){
            event.put(EntityInit.REUS.get(), ReusEntity.setAttributes());

        }
    }
}

Any help would be appreciated thanks!

Link to comment
Share on other sites

You should move your Events into the correct class. Your ClientModEvents class will be also load (and called) on server, this will crash the Server, since the Minecraft class is client only.
Why did you put the EntityAttributeCreationEvent EventHandler in a class called "ClientModEvents", the Event should be called on both sides.

You also register the FMLCommonSetupEvent twice.
You should take a look at this FCW page to see how Events works and how you register them correctly.

A few things i would recommend you to do:

  1. Do not put Events into your main Mod class
  2. Separate Events which are fired on different buses and different sides into their own class

After fixing your Events, check if the EntityAttributeCreationEvent is called using the debugger.

Last but not least, EntityRenderers should be registered in EntityRenderersEvent.RegisterRenderers

  • Like 1
Link to comment
Share on other sites

So I did what you told me and put my entity registering method in the EntityRenderersEvent.RegisterRenderers handler and then I moved that Handler, along with the EntityAttributeCreationEvent handler, too a separate client side class. It lead to the error "Entity has no attributes". Since my project is not the big I uploaded that version of it to Github so if you're okay with looking at it heres the link : github.com/bigMojitos/MilMedi . So ater that didn't work I reverted back to registering in the Main Mod class and running debug on the EntityAttributeCreationEvent, heres what I got: https://imgur.com/a/CehO5A3 . It seems like its working but I'm not seeing the affects in game, my mob is still moves and attacks at the same speed no matter how much I adjust those two attributes. What should I do?

Edited by bigMojitos
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Im not sure what im doing wrong, I'm using bisect hosting to run a server but for some reason the server wont start but i can play single player just fine. Heres the crash log  [29.11 20:30:53] [Multicraft] Starting server! [29.11 20:30:53] [Multicraft] Loaded config for "Forge - Forge Latest 1.16.5" [29.11 20:30:54] [Multicraft] Updating eula.txt file [29.11 20:30:54] [Server] latestPulling from venturenodellc/multicraftjava [29.11 20:30:54] [Server] Digestsha256:cfe3307961f8fcb6a78db7b68289fa340ec2df2389dddb2c04f6d968541970d8 [29.11 20:30:54] [Server] StatusImage is up to date for venturenodellc/multicraftjava:latest [29.11 20:30:55] [Server] [Log4jPatch] [INFO] Patching org/apache/logging/log4j/core/lookup/JndiLookup [29.11 20:30:55] [Server] [Log4jPatch] [INFO] Patching org/apache/logging/log4j/core/pattern/MessagePatternConverter [29.11 20:30:55] [Server] [Log4jPatch] [WARN] Unable to find noLookups:Z field in org/apache/logging/log4j/core/pattern/MessagePatternConverter [29.11 20:30:56] [Server] 2023-11-20:30:56,205 main WARN Advanced terminal features are not available in this environment [29.11 20:30:56] [Server] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.39, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] [29.11 20:30:56] [Server] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 1.8.0_311 by Oracle Corporation [29.11 20:30:56] [Server] [main/INFO] [ne.mi.fm.lo.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust [29.11 20:30:57] [Server] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.4 Source=file:/libraries/org/spongepowered/mixin/0.8.4/mixin-0.8.4.jar Service=ModLauncher Env=SERVER [29.11 20:30:57] [Server] [main/INFO] [io.do.se.co.SerializationIsBad/]: Initializing SerializationIsBad, implementation type: modlauncher [29.11 20:30:57] [Server] [main/INFO] [io.do.se.co.SerializationIsBad/]: Using remote config file [29.11 20:30:57] [Server] [main/INFO] [io.do.se.co.SerializationIsBad/]: Loaded config file [29.11 20:30:57] [Server] [main/INFO] [io.do.se.co.SerializationIsBad/]: Blocking Enabled: true [29.11 20:30:57] [Server] [main/INFO] [io.do.se.co.SerializationIsBad/]: Loaded Patch Modules: 38 [29.11 20:30:59] [Server] [main/INFO] [STDERR/]: [org.antlr.v4.runtime.ConsoleErrorListener:syntaxError:38]: line 1:0 token recognition error at: '~' [29.11 20:31:01] [Server] Init CreativeCore coremods ... [29.11 20:31:02] [Server] [main/ERROR] [mixin/]: Mixin config notenoughcrashes.mixins.json does not specify "minVersion" property [29.11 20:31:02] [Server] [main/ERROR] [mixin/]: Mixin config notenoughcrashes.forge.mixins.json does not specify "minVersion" property [29.11 20:31:02] [Server] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [com.fuzs.animatedrecipebook.mixin.MixinConnector] [29.11 20:31:02] [Server] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'fmlserver' with arguments [--gameDir, ., nogui] [29.11 20:31:02] [Server] [main/WARN] [mixin/]: Reference map 'atlantis.mixins.refmap.json' for atlantis.mixins.json could not be read. If this is a development environment you can ignore this message [29.11 20:31:03] [Server] [Serene Seasons Transformer]Transforming func_176224_k in net/minecraft/block/CauldronBlock [29.11 20:31:04] [Server] [Serene Seasons Transformer]Patched 1 calls [29.11 20:31:04] [Server] [main/INFO] [ne.mi.co.Co.placebo/COREMODLOG]: Patching LivingEntity#attackEntityFrom [29.11 20:31:05] [Server] [main/WARN] [mixin/]: Error loading class: com/ferreusveritas/dynamictrees/worldgen/BiomeRadiusCoordinator (java.lang.ClassNotFoundException: null) [29.11 20:31:05] [Server] [main/WARN] [mixin/]: Error loading class: com/ferreusveritas/dynamictrees/worldgen/TreeGenerator (java.lang.ClassNotFoundException: null) [29.11 20:31:05] [Server] [main/INFO] [ne.mi.co.Co.placebo/COREMODLOG]: Patching DataPackRegistries#<init> [29.11 20:31:05] [Server] [Serene Seasons Transformer]Transforming func_201854_a in net/minecraft/world/biome/Biome [29.11 20:31:05] [Server] [Serene Seasons Transformer]Patched 1 calls [29.11 20:31:05] [Server] [Serene Seasons Transformer]Transforming func_201850_b in net/minecraft/world/biome/Biome [29.11 20:31:05] [Server] [Serene Seasons Transformer]Patched 1 calls [29.11 20:31:05] [Server] [main/INFO] [ne.mi.co.Co.placebo/COREMODLOG]: Patching ItemStack#onItemUse [29.11 20:31:09] [Server] [Serene Seasons Transformer]Transforming func_201854_a in net/minecraft/world/biome/Biome [29.11 20:31:09] [Server] [Serene Seasons Transformer]Patched 1 calls [29.11 20:31:09] [Server] [Serene Seasons Transformer]Transforming func_201850_b in net/minecraft/world/biome/Biome [29.11 20:31:09] [Server] [Serene Seasons Transformer]Patched 1 calls [29.11 20:31:10] [Server] [Serene Seasons Transformer]Transforming func_176224_k in net/minecraft/block/CauldronBlock [29.11 20:31:10] [Server] [Serene Seasons Transformer]Patched 1 calls [29.11 20:31:10] [Server] [main/INFO] [ne.mi.co.Co.placebo/COREMODLOG]: Patching LivingEntity#attackEntityFrom [29.11 20:31:11] [Server] [main/INFO] [FerriteCore - class definer/]: Using Java 8 class definer [29.11 20:31:13] [Server] [Serene Seasons Transformer]Transforming func_70636_d in net/minecraft/entity/passive/SnowGolemEntity [29.11 20:31:13] [Server] [Serene Seasons Transformer]Patched 2 calls [29.11 20:31:18] [Server] [main/INFO] [ne.mi.co.Co.placebo/COREMODLOG]: Patching ItemStack#onItemUse [29.11 20:31:25] [Server] [main/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to load class com.fuzs.animatedrecipebook.AnimatedRecipeButton [29.11 20:31:25] [Server] java.lang.NoClassDefFoundErrornet/minecraft/client/gui/widget/button/Button [29.11 20:31:25] [Server] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:47) ~[forge:36.{re:classloading} [29.11 20:31:25] [Server] at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source) ~[?:?] {} [29.11 20:31:25] [Server] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:62) ~[forge:36.{re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:288) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.lambda$buildMods$29(ModLoader.java:267) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1727) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:269) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:169) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:171) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.server.ServerModLoader.load(ServerModLoader.java:30) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraft.server.Main.main(Main.java:95) ~[?:?] {re:classloading,re:mixin,pl:mixin:A} [29.11 20:31:25] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) ~[forge-1.16.5-36.2.39.jar:36.{} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:25] [Server] Caused byjava.lang.ClassNotFoundException: net.minecraft.client.gui.widget.button.Button [29.11 20:31:25] [Server] at java.lang.ClassLoader.findClass(ClassLoader.java:523) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:106) ~[modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_{} [29.11 20:31:25] [Server] ... more [29.11 20:31:25] [Server] Suppressedjava.lang.ClassNotFoundException [29.11 20:31:25] [Server] at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:282) ~[modlauncher-8.1.3.jar:?] {} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:47) ~[forge:36.{re:classloading} [29.11 20:31:25] [Server] at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source) ~[?:?] {} [29.11 20:31:25] [Server] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:62) ~[forge:36.{re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:288) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.lambda$buildMods$29(ModLoader.java:267) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1727) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:269) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:169) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:171) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.fml.server.ServerModLoader.load(ServerModLoader.java:30) ~[forge:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraft.server.Main.main(Main.java:95) ~[?:?] {re:classloading,re:mixin,pl:mixin:A} [29.11 20:31:25] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_{} [29.11 20:31:25] [Server] at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) ~[forge-1.16.5-36.2.39.jar:36.{} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:25] [Server] at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:25] [Server] [main/FATAL] [ne.mi.fm.ja.FMLJavaModLanguageProvider/LOADING]: Failed to build mod [29.11 20:31:25] [Server] java.lang.reflect.InvocationTargetExceptionnull [29.11 20:31:25] [Server] at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source) ~[?:?] {} [29.11 20:31:28] [Multicraft] Skipped 104 lines due to rate limit (100/s) [29.11 20:31:28] [Server] [main/INFO] [Puzzles Lib/]: Registering element diagonalfences:diagonal_fences [29.11 20:31:28] [Server] [main/FATAL] [ne.mi.fm.ModLoader/CORE]: Failed to initialize mod containers [29.11 20:31:28] [Server] net.minecraftforge.fml.ModLoadingExceptionAnimated Recipe Book has class loading errors [29.11 20:31:28] [Server] §7java.lang.NoClassDefFoundErrornet/minecraft/client/gui/widget/button/Button [29.11 20:31:28] [Server] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:53) ~[forge:36.{re:classloading} [29.11 20:31:28] [Server] at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source) ~[?:?] {} [29.11 20:31:28] [Server] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:62) ~[forge:36.{re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:288) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.lambda$buildMods$29(ModLoader.java:267) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1727) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:269) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:169) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:171) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.server.ServerModLoader.load(ServerModLoader.java:30) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraft.server.Main.main(Main.java:95) ~[?:?] {re:classloading,re:mixin,pl:mixin:A} [29.11 20:31:28] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) ~[forge-1.16.5-36.2.39.jar:36.{} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:49) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:46) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.server.ServerMain.main(ServerMain.java:43) [forge-1.16.5-36.2.39.jar:?] {re:classloading} [29.11 20:31:28] [Server] Caused byjava.lang.NoClassDefFoundError: net/minecraft/client/gui/widget/button/Button [29.11 20:31:28] [Server] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:47) ~[forge:36.{re:classloading} [29.11 20:31:28] [Server] ... more [29.11 20:31:28] [Server] Caused byjava.lang.ClassNotFoundException: net.minecraft.client.gui.widget.button.Button [29.11 20:31:28] [Server] at java.lang.ClassLoader.findClass(ClassLoader.java:523) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:106) ~[modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:47) ~[forge:36.{re:classloading} [29.11 20:31:28] [Server] ... more [29.11 20:31:28] [Server] Suppressedjava.lang.ClassNotFoundException [29.11 20:31:28] [Server] at cpw.mods.modlauncher.TransformingClassLoader$DelegatedClassLoader.findClass(TransformingClassLoader.java:282) ~[modlauncher-8.1.3.jar:?] {} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:136) ~[modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.TransformingClassLoader.loadClass(TransformingClassLoader.java:98) ~[modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.Class.forName0(Native Method) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.javafmlmod.FMLModContainer.<init>(FMLModContainer.java:47) ~[forge:36.{re:classloading} [29.11 20:31:28] [Server] at sun.reflect.GeneratedConstructorAccessor48.newInstance(Unknown Source) ~[?:?] {} [29.11 20:31:28] [Server] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:62) ~[forge:36.{re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:288) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.lambda$buildMods$29(ModLoader.java:267) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1727) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.buildMods(ModLoader.java:269) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.lambda$gatherAndInitializeMods$11(ModLoader.java:169) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:171) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraftforge.fml.server.ServerModLoader.load(ServerModLoader.java:30) ~[forge:?] {re:classloading} [29.11 20:31:28] [Server] at net.minecraft.server.Main.main(Main.java:95) ~[?:?] {re:classloading,re:mixin,pl:mixin:A} [29.11 20:31:28] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_{} [29.11 20:31:28] [Server] at net.minecraftforge.fml.loading.FMLServerLaunchProvider.lambda$launchService$0(FMLServerLaunchProvider.java:37) ~[forge-1.16.5-36.2.39.jar:36.{} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:28] [Server] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {re:classloading} [29.11 20:31:29] [Multicraft] Server shut down (starting) [29.11 20:31:29] [Multicraft] Maximum number of automatic restarts reached (3 within 600 seconds). Not restarting crashed server [29.11 20:31:29] [Multicraft] Server stopped
    • https://paste.ee/p/q4Ntl Lates logs https://paste.ee/p/uMwrR Crash Reports   
    • I do believe your custom mob needs to implement the RangeAttackMob interface. Then make your mob shoot 3 arrows via implementing the performRangedAttack() method. See the AbstractSkeleton class for reference, which makes the Skeleton mobs shoot only 1 arrow. If you need help on making a mob in general, refer to this video: https://www.youtube.com/watch?v=6ycbDR4hAkI  
    • While I cannot pinpoint what is preventing the rooster from damaging the player, try using a debugger and set a breakpoint in the MeleeAttackGoal class--in the tick() and/or checkAndPerformAttack() methods.
    • It is a library mod - so you have to remove the mods, requiring puzzlelib Check for these mods and remove these https://legacy.curseforge.com/minecraft/mc-mods/puzzles-lib/relations/dependents?filter-related-dependents=3
  • Topics

×
×
  • Create New...

Important Information

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