Jump to content

Recommended Posts

Posted

Hey, I'm trying to execute this walking animation I created using MCAnimator ONLY when the entity is moving. But I'm having trouble achieving this

 

Model Code

package common.zeroquest.client.renderer.entity.model;

import java.util.HashMap;

import net.minecraft.client.model.ModelBase;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import common.zeroquest.client.mca.MCAModelRenderer;
import common.zeroquest.client.mca.libary.MCAVersionChecker;
import common.zeroquest.client.mca.libary.animation.AnimationHandler;
import common.zeroquest.client.mca.libary.math.Matrix4f;
import common.zeroquest.client.mca.libary.math.Quaternion;
import common.zeroquest.entity.EntityRowarn;

public class ModelRowarn extends ModelBase {
public final int MCA_MIN_REQUESTED_VERSION = 5;
public HashMap<String, MCAModelRenderer> parts = new HashMap<String, MCAModelRenderer>();

MCAModelRenderer neck1;
MCAModelRenderer torso1;
MCAModelRenderer tail1;
MCAModelRenderer leftHindLeg1;
MCAModelRenderer rightHindLeg1;
MCAModelRenderer leftFrontLeg;
MCAModelRenderer rightFrontLeg;
MCAModelRenderer neck2;
MCAModelRenderer torso2;
MCAModelRenderer tail2;
MCAModelRenderer leftHindLeg2;
MCAModelRenderer rightHindLeg2;
MCAModelRenderer leftFrontClaw1;
MCAModelRenderer leftFrontClaw2;
MCAModelRenderer rightFrontClaw1;
MCAModelRenderer rightFrontClaw2;
MCAModelRenderer topJaw;
MCAModelRenderer tail3;
MCAModelRenderer leftHindLeg3;
MCAModelRenderer rightHindLeg3;
MCAModelRenderer bottomJaw;
MCAModelRenderer tail4;
MCAModelRenderer leftHindClaw1;
MCAModelRenderer leftHindClaw2;
MCAModelRenderer rightHindClaw1;
MCAModelRenderer rightHindClaw2;
MCAModelRenderer fin1;
MCAModelRenderer fin2;

public ModelRowarn() {
	MCAVersionChecker.checkForLibraryVersion(getClass(), MCA_MIN_REQUESTED_VERSION);

	textureWidth = 256;
	textureHeight = 128;

	neck1 = new MCAModelRenderer(this, "Neck1", 21, 0);
	neck1.mirror = false;
	neck1.addBox(-2.0F, -2.0F, 1.0F, 4, 4, 6);
	neck1.setInitialRotationPoint(-0.5F, -11.0F, 9.0F);
	neck1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.16652437F, 0.0F, 0.0F, 0.9860373F)).transpose());
	neck1.setTextureSize(256, 128);
	parts.put(neck1.boxName, neck1);

	torso1 = new MCAModelRenderer(this, "Torso1", 69, 0);
	torso1.mirror = false;
	torso1.addBox(-2.5F, -2.5F, -9.0F, 5, 5, 9);
	torso1.setInitialRotationPoint(-0.5F, -10.5F, 4.0F);
	torso1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.055739015F, 0.0F, 0.0F, 0.9984454F)).transpose());
	torso1.setTextureSize(256, 128);
	parts.put(torso1.boxName, torso1);

	tail1 = new MCAModelRenderer(this, "Tail1", 99, 0);
	tail1.mirror = false;
	tail1.addBox(-2.0F, -2.0F, -10.0F, 4, 4, 10);
	tail1.setInitialRotationPoint(-0.5F, -11.5F, -4.0F);
	tail1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.055739015F, 0.0F, 0.0F, 0.9984454F)).transpose());
	tail1.setTextureSize(256, 128);
	parts.put(tail1.boxName, tail1);

	leftHindLeg1 = new MCAModelRenderer(this, "LeftHindLeg1", 11, 17);
	leftHindLeg1.mirror = false;
	leftHindLeg1.addBox(-1.0F, -5.0F, -2.0F, 2, 5, 3);
	leftHindLeg1.setInitialRotationPoint(1.5F, -11.0F, -3.0F);
	leftHindLeg1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.14816688F, 0.0F, 0.0F, 0.98896235F)).transpose());
	leftHindLeg1.setTextureSize(256, 128);
	parts.put(leftHindLeg1.boxName, leftHindLeg1);

	rightHindLeg1 = new MCAModelRenderer(this, "RightHindLeg1", 23, 17);
	rightHindLeg1.mirror = false;
	rightHindLeg1.addBox(-1.0F, -5.0F, -2.0F, 2, 5, 3);
	rightHindLeg1.setInitialRotationPoint(-2.5F, -11.0F, -3.0F);
	rightHindLeg1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.14816688F, 0.0F, 0.0F, 0.98896235F)).transpose());
	rightHindLeg1.setTextureSize(256, 128);
	parts.put(rightHindLeg1.boxName, rightHindLeg1);

	leftFrontLeg = new MCAModelRenderer(this, "LeftFrontLeg", 0, 17);
	leftFrontLeg.mirror = false;
	leftFrontLeg.addBox(-1.0F, -11.0F, -1.0F, 2, 11, 2);
	leftFrontLeg.setInitialRotationPoint(2.0F, -11.0F, 8.0F);
	leftFrontLeg.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.0F, 0.0F, 1.0F)).transpose());
	leftFrontLeg.setTextureSize(256, 128);
	parts.put(leftFrontLeg.boxName, leftFrontLeg);

	rightFrontLeg = new MCAModelRenderer(this, "RightFrontLeg", 35, 17);
	rightFrontLeg.mirror = false;
	rightFrontLeg.addBox(-1.0F, -11.0F, -1.0F, 2, 11, 2);
	rightFrontLeg.setInitialRotationPoint(-3.0F, -11.0F, 8.0F);
	rightFrontLeg.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.0F, 0.0F, 1.0F)).transpose());
	rightFrontLeg.setTextureSize(256, 128);
	parts.put(rightFrontLeg.boxName, rightFrontLeg);

	neck2 = new MCAModelRenderer(this, "Neck2", 0, 0);
	neck2.mirror = false;
	neck2.addBox(-2.0F, -2.0F, 1.0F, 4, 4, 6);
	neck2.setInitialRotationPoint(0.0F, -0.4F, 5.0F);
	neck2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.1478094F, 0.0F, 0.0F, 0.9890159F)).transpose());
	neck2.setTextureSize(256, 128);
	parts.put(neck2.boxName, neck2);
	neck1.addChild(neck2);

	torso2 = new MCAModelRenderer(this, "Torso2", 42, 0);
	torso2.mirror = false;
	torso2.addBox(-2.5F, -2.5F, -8.0F, 5, 5, ;
	torso2.setInitialRotationPoint(0.0F, -0.5F, 7.0F);
	torso2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.043619387F, 0.0F, 0.0F, 0.99904823F)).transpose());
	torso2.setTextureSize(256, 128);
	parts.put(torso2.boxName, torso2);
	torso1.addChild(torso2);

	tail2 = new MCAModelRenderer(this, "Tail2", 129, 0);
	tail2.mirror = false;
	tail2.addBox(-1.5F, -1.5F, -10.0F, 3, 3, 10);
	tail2.setInitialRotationPoint(0.0F, 0.0F, -9.0F);
	tail2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.06104854F, 0.0F, 0.0F, 0.9981348F)).transpose());
	tail2.setTextureSize(256, 128);
	parts.put(tail2.boxName, tail2);
	tail1.addChild(tail2);

	leftHindLeg2 = new MCAModelRenderer(this, "LeftHindLeg2", 11, 27);
	leftHindLeg2.mirror = false;
	leftHindLeg2.addBox(-1.0F, -4.0F, -1.0F, 2, 4, 2);
	leftHindLeg2.setInitialRotationPoint(0.0F, -4.3F, 0.3F);
	leftHindLeg2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.40673664F, 0.0F, 0.0F, 0.9135454F)).transpose());
	leftHindLeg2.setTextureSize(256, 128);
	parts.put(leftHindLeg2.boxName, leftHindLeg2);
	leftHindLeg1.addChild(leftHindLeg2);

	rightHindLeg2 = new MCAModelRenderer(this, "RightHindLeg2", 23, 27);
	rightHindLeg2.mirror = false;
	rightHindLeg2.addBox(-1.0F, -4.0F, -1.0F, 2, 4, 2);
	rightHindLeg2.setInitialRotationPoint(0.0F, -4.3F, 0.3F);
	rightHindLeg2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.40673664F, 0.0F, 0.0F, 0.9135454F)).transpose());
	rightHindLeg2.setTextureSize(256, 128);
	parts.put(rightHindLeg2.boxName, rightHindLeg2);
	rightHindLeg1.addChild(rightHindLeg2);

	leftFrontClaw1 = new MCAModelRenderer(this, "LeftFrontClaw1", 11, 43);
	leftFrontClaw1.mirror = false;
	leftFrontClaw1.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	leftFrontClaw1.setInitialRotationPoint(-0.5F, -10.0F, 0.0F);
	leftFrontClaw1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, -0.09281317F, 0.0F, 0.99568355F)).transpose());
	leftFrontClaw1.setTextureSize(256, 128);
	parts.put(leftFrontClaw1.boxName, leftFrontClaw1);
	leftFrontLeg.addChild(leftFrontClaw1);

	leftFrontClaw2 = new MCAModelRenderer(this, "LeftFrontClaw2", 11, 43);
	leftFrontClaw2.mirror = false;
	leftFrontClaw2.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	leftFrontClaw2.setInitialRotationPoint(0.5F, -10.0F, 0.0F);
	leftFrontClaw2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.09281374F, 0.0F, 0.9956835F)).transpose());
	leftFrontClaw2.setTextureSize(256, 128);
	parts.put(leftFrontClaw2.boxName, leftFrontClaw2);
	leftFrontLeg.addChild(leftFrontClaw2);

	rightFrontClaw1 = new MCAModelRenderer(this, "RightFrontClaw1", 23, 43);
	rightFrontClaw1.mirror = false;
	rightFrontClaw1.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	rightFrontClaw1.setInitialRotationPoint(-0.5F, -10.0F, 0.0F);
	rightFrontClaw1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, -0.09281317F, 0.0F, 0.99568355F)).transpose());
	rightFrontClaw1.setTextureSize(256, 128);
	parts.put(rightFrontClaw1.boxName, rightFrontClaw1);
	rightFrontLeg.addChild(rightFrontClaw1);

	rightFrontClaw2 = new MCAModelRenderer(this, "RightFrontClaw2", 23, 43);
	rightFrontClaw2.mirror = false;
	rightFrontClaw2.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	rightFrontClaw2.setInitialRotationPoint(0.5F, -10.0F, 0.0F);
	rightFrontClaw2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.09281374F, 0.0F, 0.9956835F)).transpose());
	rightFrontClaw2.setTextureSize(256, 128);
	parts.put(rightFrontClaw2.boxName, rightFrontClaw2);
	rightFrontLeg.addChild(rightFrontClaw2);

	topJaw = new MCAModelRenderer(this, "TopJaw", 0, 54);
	topJaw.mirror = false;
	topJaw.addBox(-2.0F, -1.0F, 0.5F, 5, 3, ;
	topJaw.setInitialRotationPoint(-0.5F, 1.5F, 6.0F);
	topJaw.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.2923717F, 0.0F, 0.0F, 0.9563048F)).transpose());
	topJaw.setTextureSize(256, 128);
	parts.put(topJaw.boxName, topJaw);
	neck2.addChild(topJaw);

	tail3 = new MCAModelRenderer(this, "Tail3", 157, 0);
	tail3.mirror = false;
	tail3.addBox(-1.0F, -1.0F, -10.0F, 2, 2, 10);
	tail3.setInitialRotationPoint(0.0F, 0.0F, -8.0F);
	tail3.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.02617695F, 0.0F, 0.0F, 0.99965733F)).transpose());
	tail3.setTextureSize(256, 128);
	parts.put(tail3.boxName, tail3);
	tail2.addChild(tail3);

	leftHindLeg3 = new MCAModelRenderer(this, "LeftHindLeg3", 11, 35);
	leftHindLeg3.mirror = false;
	leftHindLeg3.addBox(-1.0F, -4.0F, -1.0F, 2, 4, 2);
	leftHindLeg3.setInitialRotationPoint(0.0F, -3.4F, -0.2F);
	leftHindLeg3.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.27563736F, 0.0F, 0.0F, 0.9612617F)).transpose());
	leftHindLeg3.setTextureSize(256, 128);
	parts.put(leftHindLeg3.boxName, leftHindLeg3);
	leftHindLeg2.addChild(leftHindLeg3);

	rightHindLeg3 = new MCAModelRenderer(this, "RightHindLeg3", 23, 35);
	rightHindLeg3.mirror = false;
	rightHindLeg3.addBox(-1.0F, -4.0F, -1.0F, 2, 4, 2);
	rightHindLeg3.setInitialRotationPoint(0.0F, -3.4F, -0.2F);
	rightHindLeg3.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.27563736F, 0.0F, 0.0F, 0.9612617F)).transpose());
	rightHindLeg3.setTextureSize(256, 128);
	parts.put(rightHindLeg3.boxName, rightHindLeg3);
	rightHindLeg2.addChild(rightHindLeg3);

	bottomJaw = new MCAModelRenderer(this, "BottomJaw", 0, 68);
	bottomJaw.mirror = false;
	bottomJaw.addBox(-2.0F, -1.0F, 0.5F, 5, 2, 9);
	bottomJaw.setInitialRotationPoint(0.0F, -2.0F, 0.0F);
	bottomJaw.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.0F, 0.0F, 1.0F)).transpose());
	bottomJaw.setTextureSize(256, 128);
	parts.put(bottomJaw.boxName, bottomJaw);
	topJaw.addChild(bottomJaw);

	tail4 = new MCAModelRenderer(this, "Tail4", 182, 0);
	tail4.mirror = false;
	tail4.addBox(-0.5F, -0.5F, -9.0F, 1, 1, 9);
	tail4.setInitialRotationPoint(0.0F, 0.0F, -8.0F);
	tail4.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(-0.02617695F, 0.0F, 0.0F, 0.99965733F)).transpose());
	tail4.setTextureSize(256, 128);
	parts.put(tail4.boxName, tail4);
	tail3.addChild(tail4);

	leftHindClaw1 = new MCAModelRenderer(this, "LeftHindClaw1", 11, 43);
	leftHindClaw1.mirror = false;
	leftHindClaw1.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	leftHindClaw1.setInitialRotationPoint(-0.5F, -3.0F, 0.0F);
	leftHindClaw1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, -0.09281317F, 0.0F, 0.99568355F)).transpose());
	leftHindClaw1.setTextureSize(256, 128);
	parts.put(leftHindClaw1.boxName, leftHindClaw1);
	leftHindLeg3.addChild(leftHindClaw1);

	leftHindClaw2 = new MCAModelRenderer(this, "LeftHindClaw2", 11, 43);
	leftHindClaw2.mirror = false;
	leftHindClaw2.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	leftHindClaw2.setInitialRotationPoint(0.5F, -3.0F, 0.0F);
	leftHindClaw2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.09281276F, 0.0F, 0.99568355F)).transpose());
	leftHindClaw2.setTextureSize(256, 128);
	parts.put(leftHindClaw2.boxName, leftHindClaw2);
	leftHindLeg3.addChild(leftHindClaw2);

	rightHindClaw1 = new MCAModelRenderer(this, "RightHindClaw1", 23, 43);
	rightHindClaw1.mirror = false;
	rightHindClaw1.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	rightHindClaw1.setInitialRotationPoint(-0.5F, -3.0F, 0.0F);
	rightHindClaw1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, -0.09281317F, 0.0F, 0.99568355F)).transpose());
	rightHindClaw1.setTextureSize(256, 128);
	parts.put(rightHindClaw1.boxName, rightHindClaw1);
	rightHindLeg3.addChild(rightHindClaw1);

	rightHindClaw2 = new MCAModelRenderer(this, "RightHindClaw2", 23, 43);
	rightHindClaw2.mirror = false;
	rightHindClaw2.addBox(-0.5F, -1.0F, 0.0F, 1, 1, 3);
	rightHindClaw2.setInitialRotationPoint(0.5F, -3.0F, 0.0F);
	rightHindClaw2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.09281276F, 0.0F, 0.99568355F)).transpose());
	rightHindClaw2.setTextureSize(256, 128);
	parts.put(rightHindClaw2.boxName, rightHindClaw2);
	rightHindLeg3.addChild(rightHindClaw2);

	fin1 = new MCAModelRenderer(this, "Fin1", 182, 12);
	fin1.mirror = false;
	fin1.addBox(-5.0F, 0.0F, -8.0F, 5, 0, 7);
	fin1.setInitialRotationPoint(0.0F, 0.0F, -4.0F);
	fin1.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.0F, 0.0F, 1.0F)).transpose());
	fin1.setTextureSize(256, 128);
	parts.put(fin1.boxName, fin1);
	tail4.addChild(fin1);

	fin2 = new MCAModelRenderer(this, "Fin2", 182, 21);
	fin2.mirror = false;
	fin2.addBox(-0.5F, 0.0F, -8.0F, 5, 0, 7);
	fin2.setInitialRotationPoint(0.0F, 0.0F, -4.0F);
	fin2.setInitialRotationMatrix(new Matrix4f().set(new Quaternion(0.0F, 0.0F, 0.0F, 1.0F)).transpose());
	fin2.setTextureSize(256, 128);
	parts.put(fin2.boxName, fin2);
	tail4.addChild(fin2);

}

@Override
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) {
	EntityRowarn entity = (EntityRowarn) par1Entity;

	AnimationHandler.performAnimationInModel(parts, entity);

	// Render every non-child part
	neck1.render(par7);
	torso1.render(par7);
	tail1.render(par7);
	leftHindLeg1.render(par7);
	rightHindLeg1.render(par7);
	leftFrontLeg.render(par7);
	rightFrontLeg.render(par7);
}

@Override
public void setLivingAnimations(EntityLivingBase par1EntityLivingBase, float par2, float par3, float par4) {
	EntityRowarn entityRowarn = (EntityRowarn) par1EntityLivingBase;
	if (par2 != 0 && par3 != 0) {
		entityRowarn.getAnimationHandler().activateAnimation("walking", 0);
	}
}

@Override
public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) {}

public MCAModelRenderer getModelRendererFromName(String name) {
	return parts.get(name);
}
}

 

Entity Code

package common.zeroquest.entity;

import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import common.zeroquest.client.mca.animations.AnimationHandlerRowarn;
import common.zeroquest.client.mca.libary.IMCAnimatedEntity;
import common.zeroquest.client.mca.libary.animation.AnimationHandler;

public class EntityRowarn extends EntityAnimal implements IMCAnimatedEntity {
protected AnimationHandler animHandler = new AnimationHandlerRowarn(this);
private float field_175482_b;
private final float field_175484_c;
private float field_175483_bk;
private float field_175485_bl;
private float field_175486_bm;
private int field_175479_bo;
private boolean field_175480_bp;
private EntityAIWander wander;
private static final String __OBFID = "CL_00002213";

public EntityRowarn(World worldIn) {
	super(worldIn);
	this.experienceValue = 10;
	this.setSize(1F, 1F);
	EntityAIMoveTowardsRestriction entityaimovetowardsrestriction;
	this.tasks.addTask(5, entityaimovetowardsrestriction = new EntityAIMoveTowardsRestriction(this, 1.0D));
	this.tasks.addTask(7, this.wander = new EntityAIWander(this, 1.0D, 80));
	this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
	this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityRowarn.class, 12.0F, 0.01F));
	this.tasks.addTask(9, new EntityAILookIdle(this));
	this.wander.setMutexBits(3);
	entityaimovetowardsrestriction.setMutexBits(3);
	this.field_175484_c = this.field_175482_b = this.rand.nextFloat();
}

@Override
public AnimationHandler getAnimationHandler() {
	return animHandler;
}

@Override
protected void applyEntityAttributes() {
	super.applyEntityAttributes();
	this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D);
	this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(16.0D);
	this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(30.0D);
}

@Override
public EntityAgeable createChild(EntityAgeable ageable) {
	// TODO Auto-generated method stub
	return null;
}
}

 

Rowarn Animation Handler

package common.zeroquest.client.mca.animations;

import java.util.HashMap;

import common.zeroquest.client.mca.libary.IMCAnimatedEntity;
import common.zeroquest.client.mca.libary.animation.AnimationHandler;
import common.zeroquest.client.mca.libary.animation.Channel;

public class AnimationHandlerRowarn extends AnimationHandler {
/** Map with all the animations. */
public static HashMap<String, Channel> animChannels = new HashMap<String, Channel>();
static {
	animChannels.put("swimming", new ChannelSwimming("swimming", 30.0F, 40, Channel.LINEAR));
	animChannels.put("leapinto", new ChannelLeapinto("leapinto", 20.0F, 50, Channel.LINEAR));
	animChannels.put("walking", new ChannelWalking("walking", 15.0F, 20, Channel.LINEAR));
}

public AnimationHandlerRowarn(IMCAnimatedEntity entity) {
	super(entity);
}

@Override
public void activateAnimation(String name, float startingFrame) {
	super.activateAnimation(animChannels, name, startingFrame);
}

@Override
public void stopAnimation(String name) {
	super.stopAnimation(animChannels, name);
}

@Override
public void fireAnimationEventClientSide(Channel anim, float prevFrame, float frame) {}

@Override
public void fireAnimationEventServerSide(Channel anim, float prevFrame, float frame) {}
}

 

Main Animation Handler

package common.zeroquest.client.mca.libary.animation;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import net.minecraft.entity.Entity;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import common.zeroquest.client.mca.MCAModelRenderer;
import common.zeroquest.client.mca.libary.IMCAnimatedEntity;
import common.zeroquest.client.mca.libary.math.Quaternion;
import common.zeroquest.client.mca.libary.math.Vector3f;

public abstract class AnimationHandler {
public static AnimTickHandler animTickHandler;
/** Owner of this handler. */
private final IMCAnimatedEntity animatedEntity;
/** List of all the activate animations of this Entity. */
public ArrayList<Channel> animCurrentChannels = new ArrayList();
/** Previous time of every active animation. */
public HashMap<String, Long> animPrevTime = new HashMap<String, Long>();
/** Current frame of every active animation. */
public HashMap<String, Float> animCurrentFrame = new HashMap<String, Float>();
/**
 * Contains the unique names of the events that have been already fired
 * during each animation. It becomes empty at the end of every animation.
 * The key is the animation name and the value is the list of already-called
 * events.
 */
private final HashMap<String, ArrayList<String>> animationEvents = new HashMap<String, ArrayList<String>>();

public AnimationHandler(IMCAnimatedEntity entity) {
	if (animTickHandler == null) {
		animTickHandler = new AnimTickHandler();
	}
	animTickHandler.addEntity(entity);

	animatedEntity = entity;
}

public IMCAnimatedEntity getEntity() {
	return animatedEntity;
}

public void activateAnimation(HashMap<String, Channel> animChannels, String name, float startingFrame) {
	if (animChannels.get(name) != null) {
		Channel selectedChannel = animChannels.get(name);
		int indexToRemove = animCurrentChannels.indexOf(selectedChannel);
		if (indexToRemove != -1) {
			animCurrentChannels.remove(indexToRemove);
		}

		animCurrentChannels.add(selectedChannel);
		animPrevTime.put(name, System.nanoTime());
		animCurrentFrame.put(name, startingFrame);
		if (animationEvents.get(name) == null) {
			animationEvents.put(name, new ArrayList<String>());
		}
	}
	else {
		System.out.println("The animation called " + name + " doesn't exist!");
	}
}

public abstract void activateAnimation(String name, float startingFrame);

public void stopAnimation(HashMap<String, Channel> animChannels, String name) {
	Channel selectedChannel = animChannels.get(name);
	if (selectedChannel != null) {
		int indexToRemove = animCurrentChannels.indexOf(selectedChannel);
		if (indexToRemove != -1) {
			animCurrentChannels.remove(indexToRemove);
			animPrevTime.remove(name);
			animCurrentFrame.remove(name);
			animationEvents.get(name).clear();
		}
	}
	else {
		System.out.println("The animation called " + name + " doesn't exist!");
	}
}

public abstract void stopAnimation(String name);

public void animationsUpdate() {
	for (Iterator<Channel> it = animCurrentChannels.iterator(); it.hasNext() {
		Channel anim = it.next();
		float prevFrame = animCurrentFrame.get(anim.name);
		boolean animStatus = updateAnimation(animatedEntity, anim, animPrevTime, animCurrentFrame);
		if (animCurrentFrame.get(anim.name) != null) {
			fireAnimationEvent(anim, prevFrame, animCurrentFrame.get(anim.name));
		}
		if (!animStatus) {
			it.remove();
			animPrevTime.remove(anim.name);
			animCurrentFrame.remove(anim.name);
			animationEvents.get(anim.name).clear();
		}
	}
}

public boolean isAnimationActive(String name) {
	boolean animAlreadyUsed = false;
	for (Channel anim : animatedEntity.getAnimationHandler().animCurrentChannels) {
		if (anim.name.equals(name)) {
			animAlreadyUsed = true;
			break;
		}
	}

	return animAlreadyUsed;
}

private void fireAnimationEvent(Channel anim, float prevFrame, float frame) {
	if (isWorldRemote(animatedEntity)) {
		fireAnimationEventClientSide(anim, prevFrame, frame);
	}
	else {
		fireAnimationEventServerSide(anim, prevFrame, frame);
	}
}

@SideOnly(Side.CLIENT)
public abstract void fireAnimationEventClientSide(Channel anim, float prevFrame, float frame);

public abstract void fireAnimationEventServerSide(Channel anim, float prevFrame, float frame);

/** Check if the animation event has already been called. */
public boolean alreadyCalledEvent(String animName, String eventName) {
	if (animationEvents.get(animName) == null) {
		System.out.println("Cannot check for event " + eventName + "! Animation " + animName + "does not exist or is not active.");
		return true;
	}
	return animationEvents.get(animName).contains(eventName);
}

/** Set the animation event as "called", so it won't be fired again. */
public void setCalledEvent(String animName, String eventName) {
	if (animationEvents.get(animName) != null) {
		animationEvents.get(animName).add(eventName);
	}
	else {
		System.out.println("Cannot set event " + eventName + "! Animation " + animName + "does not exist or is not active.");
	}
}

/** Update animation values. Return false if the animation should stop. */
public static boolean updateAnimation(IMCAnimatedEntity entity, Channel channel, HashMap<String, Long> prevTimeAnim, HashMap<String, Float> prevFrameAnim) {
	if (FMLCommonHandler.instance().getEffectiveSide().isServer() || (FMLCommonHandler.instance().getEffectiveSide().isClient() && !isGamePaused())) {
		if (!(channel.mode == Channel.CUSTOM)) {
			long prevTime = prevTimeAnim.get(channel.name);
			float prevFrame = prevFrameAnim.get(channel.name);

			long currentTime = System.nanoTime();
			double deltaTime = (currentTime - prevTime) / 1000000000.0;
			float numberOfSkippedFrames = (float) (deltaTime * channel.fps);

			float currentFrame = prevFrame + numberOfSkippedFrames;

			if (currentFrame < channel.totalFrames - 1) // -1 as the first
														// frame mustn't be
														// "executed" as it
														// is the starting
														// situation
			{
				prevTimeAnim.put(channel.name, currentTime);
				prevFrameAnim.put(channel.name, currentFrame);
				return true;
			}
			else {
				if (channel.mode == Channel.LOOP) {
					prevTimeAnim.put(channel.name, currentTime);
					prevFrameAnim.put(channel.name, 0F);
					return true;
				}
				return false;
			}
		}
		else {
			return true;
		}
	}
	else {
		long currentTime = System.nanoTime();
		prevTimeAnim.put(channel.name, currentTime);
		return true;
	}
}

@SideOnly(Side.CLIENT)
private static boolean isGamePaused() {
	net.minecraft.client.Minecraft MC = net.minecraft.client.Minecraft.getMinecraft();
	return MC.isSingleplayer() && MC.currentScreen != null && MC.currentScreen.doesGuiPauseGame() && !MC.getIntegratedServer().getPublic();
}

/**
 * Apply animations if running or apply initial values. Must be called only
 * by the model class.
 */
@SideOnly(Side.CLIENT)
public static void performAnimationInModel(HashMap<String, MCAModelRenderer> parts, IMCAnimatedEntity entity) {
	for (Map.Entry<String, MCAModelRenderer> entry : parts.entrySet()) {
		String boxName = entry.getKey();
		MCAModelRenderer box = entry.getValue();

		boolean anyRotationApplied = false;
		boolean anyTranslationApplied = false;
		boolean anyCustomAnimationRunning = false;

		for (Channel channel : entity.getAnimationHandler().animCurrentChannels) {
			if (channel.mode != Channel.CUSTOM) {
				float currentFrame = entity.getAnimationHandler().animCurrentFrame.get(channel.name);

				// Rotations
				KeyFrame prevRotationKeyFrame = channel.getPreviousRotationKeyFrameForBox(boxName, entity.getAnimationHandler().animCurrentFrame.get(channel.name));
				int prevRotationKeyFramePosition = prevRotationKeyFrame != null
						? channel.getKeyFramePosition(prevRotationKeyFrame) : 0;

				KeyFrame nextRotationKeyFrame = channel.getNextRotationKeyFrameForBox(boxName, entity.getAnimationHandler().animCurrentFrame.get(channel.name));
				int nextRotationKeyFramePosition = nextRotationKeyFrame != null
						? channel.getKeyFramePosition(nextRotationKeyFrame) : 0;

				float SLERPProgress = (currentFrame - prevRotationKeyFramePosition) / (nextRotationKeyFramePosition - prevRotationKeyFramePosition);
				if (SLERPProgress > 1F || SLERPProgress < 0F) {
					SLERPProgress = 1F;
				}

				if (prevRotationKeyFramePosition == 0 && prevRotationKeyFrame == null && !(nextRotationKeyFramePosition == 0)) {
					Quaternion currentQuat = new Quaternion();
					currentQuat.slerp(parts.get(boxName).getDefaultRotationAsQuaternion(), nextRotationKeyFrame.modelRenderersRotations.get(boxName), SLERPProgress);
					box.getRotationMatrix().set(currentQuat).transpose();

					anyRotationApplied = true;
				}
				else if (prevRotationKeyFramePosition == 0 && prevRotationKeyFrame != null && !(nextRotationKeyFramePosition == 0)) {
					Quaternion currentQuat = new Quaternion();
					currentQuat.slerp(prevRotationKeyFrame.modelRenderersRotations.get(boxName), nextRotationKeyFrame.modelRenderersRotations.get(boxName), SLERPProgress);
					box.getRotationMatrix().set(currentQuat).transpose();

					anyRotationApplied = true;
				}
				else if (!(prevRotationKeyFramePosition == 0) && !(nextRotationKeyFramePosition == 0)) {
					Quaternion currentQuat = new Quaternion();
					currentQuat.slerp(prevRotationKeyFrame.modelRenderersRotations.get(boxName), nextRotationKeyFrame.modelRenderersRotations.get(boxName), SLERPProgress);
					box.getRotationMatrix().set(currentQuat).transpose();

					anyRotationApplied = true;
				}

				// Translations
				KeyFrame prevTranslationKeyFrame = channel.getPreviousTranslationKeyFrameForBox(boxName, entity.getAnimationHandler().animCurrentFrame.get(channel.name));
				int prevTranslationsKeyFramePosition = prevTranslationKeyFrame != null
						? channel.getKeyFramePosition(prevTranslationKeyFrame) : 0;

				KeyFrame nextTranslationKeyFrame = channel.getNextTranslationKeyFrameForBox(boxName, entity.getAnimationHandler().animCurrentFrame.get(channel.name));
				int nextTranslationsKeyFramePosition = nextTranslationKeyFrame != null
						? channel.getKeyFramePosition(nextTranslationKeyFrame) : 0;

				float LERPProgress = (currentFrame - prevTranslationsKeyFramePosition) / (nextTranslationsKeyFramePosition - prevTranslationsKeyFramePosition);
				if (LERPProgress > 1F) {
					LERPProgress = 1F;
				}

				if (prevTranslationsKeyFramePosition == 0 && prevTranslationKeyFrame == null && !(nextTranslationsKeyFramePosition == 0)) {
					Vector3f startPosition = parts.get(boxName).getPositionAsVector();
					Vector3f endPosition = nextTranslationKeyFrame.modelRenderersTranslations.get(boxName);
					Vector3f currentPosition = new Vector3f(startPosition);
					currentPosition.interpolate(endPosition, LERPProgress);
					box.setRotationPoint(currentPosition.x, currentPosition.y, currentPosition.z);

					anyTranslationApplied = true;
				}
				else if (prevTranslationsKeyFramePosition == 0 && prevTranslationKeyFrame != null && !(nextTranslationsKeyFramePosition == 0)) {
					Vector3f startPosition = prevTranslationKeyFrame.modelRenderersTranslations.get(boxName);
					Vector3f endPosition = nextTranslationKeyFrame.modelRenderersTranslations.get(boxName);
					Vector3f currentPosition = new Vector3f(startPosition);
					currentPosition.interpolate(endPosition, LERPProgress);
					box.setRotationPoint(currentPosition.x, currentPosition.y, currentPosition.z);
				}
				else if (!(prevTranslationsKeyFramePosition == 0) && !(nextTranslationsKeyFramePosition == 0)) {
					Vector3f startPosition = prevTranslationKeyFrame.modelRenderersTranslations.get(boxName);
					Vector3f endPosition = nextTranslationKeyFrame.modelRenderersTranslations.get(boxName);
					Vector3f currentPosition = new Vector3f(startPosition);
					currentPosition.interpolate(endPosition, LERPProgress);
					box.setRotationPoint(currentPosition.x, currentPosition.y, currentPosition.z);

					anyTranslationApplied = true;
				}
			}
			else {
				anyCustomAnimationRunning = true;

				((CustomChannel) channel).update(parts, entity);
			}
		}

		// Set the initial values for each box if necessary
		if (!anyRotationApplied && !anyCustomAnimationRunning) {
			box.resetRotationMatrix();
		}
		if (!anyTranslationApplied && !anyCustomAnimationRunning) {
			box.resetRotationPoint();
		}
	}
}

public static boolean isWorldRemote(IMCAnimatedEntity animatedEntity) {
	return ((Entity) animatedEntity).worldObj.isRemote;
}
}

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Posted

I had massive, massive problems with MCAnimator and animations.  And not just in the "animate when" situation, but in a "does bad bad things and will crash the game" kind of way.  I was never able to fix it and instead rebuilt things using a standard quadruped.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Some people swear by it, but as I wanted to have an animation only play when my mob was walking, I did what looked like the only way to play and stop animations, which caused Concurrent Modification Exceptions.  Which no one was able to help me figure out.

 

So.

 

Yeah.  Don't use MCAnimator.  Good news, the model it creates is very easy to turn into a ModelBase.  You need to refactor some function names and work out the euler rotations from the quaternions (but as you created the model using eulers...) but it's pretty much a 1:1 port.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Well, I wanted to use the model from MCAnimator to have animations when my entity jumps and lands and swims in water, thats why I used MCAnimator. Since I can't use it, is there any alternative?

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Posted

Quick and easy? Not that I know of.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Yeah, I'd given it a shot after I'd seen a lot of praise on these forums, but it turns out no one uses it for animation.  Surprise, surprise.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

They custom built their animator. 

public class DragonAnimator { ... }

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Haven't the faintest. :D

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Hey,

 

I was strugling too with most programs like MCAnimator etc.. I don't know blender, you should try it to see if its working or not.

But the Link that helped me out (for Entities at least) is this:

 

http://jabelarminecraft.blogspot.nl/p/complex-entity-models-including.html

 

He explains some neat tips and tricks on how to create your own animatons.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

From what I hear It's better to code models and animations yourself, but I've been struggling with entity animation as well as soon as I tried to do it. :/

Posted

Yeah, it's pretty useful and easier to use for visualization, but should I at all, use it? Even just to use it to get the numbers to model them using the method jabelar recommends us using for animation?

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Posted

It's useful for visualization, but I find modeling in techne to be a pain sometimes. Don't you?

 

Edit: Lol, I forgot we were talking about MCAnimator. It is a little easier and is useful for visualizing of animation, but still a pain to model in in my opinion. ;)

Posted

I know right? I never did figure that addChild stuff out...

Posted

Here, I used this tutorial to master the addChild methods: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571589-modding-animation-guide

 

I also did trial and error and finally got them correct.. but still need help with advanced animations

Main Developer and Owner of Zero Quest

Visit the Wiki for more information

If I helped anyone, please give me a applaud and a thank you!

Posted

I do recommend it indeed, because it supports childmodelParts. But keep in mind that it aint perfect.

I experianced an slight offset in the dimensions. but it shouldnt be disturbing if you don't need a model to be moving punctual at the single degree.

(I only discoveres it cause I wanted a model to move exactualy across certain lines)

 

If you need an example, I made an animated tileEntity in my mechanicalCraftingTable mod.(Link below) Feel free to take a look at it.

 

Keep in mind though, my mod and the tutorial is for mc 1.7.10!

So you probably need to dig into the .jons files etc. But apart from that, it should look similar.

Anyway good luck, and please share the results! Im curious.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted
  On 5/27/2015 at 10:30 PM, NovaViper said:

Here, I used this tutorial to master the addChild methods: http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571589-modding-animation-guide

 

I also did trial and error and finally got them correct.. but still need help with advanced animations

 

Cool. I think next time I work with entities I'll try to do it in Java. I tried to work with animation in Java but I couldn't figure out how to convert from degrees to radians. This tutorial helps though, http://jabelarminecraft.blogspot.ca/p/introduction-first-of-all-to-understand.html. In fact, I didn't even know they were called radians before today, all I knew was somehow I needed to convert degrees to the stupid huge decimal number format thingy. :D

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

    • Rubidium and Embeddium are versions of the same mod, you can only have one. I believe Embeddium is the one that's actively maintained.
    • Hello, New to modding, but have a solid CS foundation. I've created multiple custom BlockEntities that all have the same issue, which is that the inventory only updates on right click (overriding the useItemOn method). I've seen multiple posts on here outlining a similar issue to mine, but I've already implemented the solution of: overriding the correct methods in the BlockEntity class and calling setChanged(). I've tried every different place for setChanged() to no success. I'm wondering if I'm missing something else or if there was some change to sending data to the client in 1.21.5? Or will I have to use a custom packet sender? Here is the code for one of my BlockEntity classes with a single inventory slot: public class MyCustomBlockEntity extends BlockEntity { public final ItemStackHandler inventory = new ItemStackHandler(1) { @Override protected int getStackLimit(int slot, @NotNull ItemStack stack) { return 1; } @Override protected void onContentsChanged(int slot) { setChanged(); if (!level.isClientSide()) { level.setBlockAndUpdate(getBlockPos(), getBlockState()); } } }; public MyCustomBlockEntity(BlockPos pPos, BlockState pBlockState) { super(ModBlockEntities.MY_CUSTOM_BE.get(), pPos, pBlockState); } public void clearContents() { inventory.setStackInSlot(0, ItemStack.EMPTY); } public void dropItem() { SimpleContainer inv = new SimpleContainer(inventory.getSlots()); inv.setItem(0, inventory.getStackInSlot(0)); Containers.dropContents(this.level, this.worldPosition, inv); } @Override public void setRemoved() { dropItem(); super.setRemoved(); } @Override protected void saveAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) { super.saveAdditional(pTag, pRegistries); pTag.put("inventory", inventory.serializeNBT(pRegistries)); } @Override protected void loadAdditional(CompoundTag pTag, HolderLookup.Provider pRegistries) { super.loadAdditional(pTag, pRegistries); inventory.deserializeNBT(pRegistries, pTag.getCompound("inventory").get()); } @Override public Packet<ClientGamePacketListener> getUpdatePacket() { return ClientboundBlockEntityDataPacket.create(this); } @Override public CompoundTag getUpdateTag(HolderLookup.Provider pRegistries) { return saveWithoutMetadata(pRegistries); } } Mostly encountering the issue when calling the clearContents() method anywhere outside of useItemOn() in the Block class. I've also tried overriding both the handleUpdateTag() and onDataPacket() methods, calling their super along with loadAdditional(), but neither changed the outcome. Thanks in advance for any replies.
    • Hi all! I’m working on a Jurassic Park-themed mod for Minecraft 1.20.1, aiming to include dinosaurs, fossils, DNA extraction, and cool machines. This is a free project, mainly passion-driven, and I’ll give full credit to everyone involved. this is the perfect opportunity for beginners of modeling and coding. This project will give you experience and a creative freedom If you love dinosaurs and Minecraft modding, hit me up! Thanks! Add Me ogfrost. <--- Discord
    • I'm just really confused. This bug only applies to modpacks made by me. i have tried using different launchers prism, modrinth etc. I have tried with multiple modpacks. All of this has not prevented this bug. Relevant part of log is here: [06Jun2025 16:18:49.882] [main/ERROR] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Failed to build unique mod list after mod discovery. net.minecraftforge.fml.loading.EarlyLoadingException: Duplicate mods found     at net.minecraftforge.fml.loading.UniqueModListBuilder.buildUniqueList(UniqueModListBuilder.java:87) ~[loader-47.2.2.jar:47.2]     at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.discoverMods(ModDiscoverer.java:106) ~[loader-47.2.2.jar:47.2]     at net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:164) ~[loader-47.2.2.jar:47.2]     at net.minecraftforge.fml.loading.FMLServiceProvider.beginScanning(FMLServiceProvider.java:86) ~[loader-47.2.2.jar:47.2]     at cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:112) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:100) ~[modlauncher-10.0.9.jar:?]     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]     at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779) ~[?:?]     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]     at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]     at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]     at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]     at java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]     at cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:102) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:55) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:88) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]     at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:67) ~[?:?]     at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105) ~[?:?]     at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) ~[?:?]     at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[?:?] [06Jun2025 16:18:49.894] [main/ERROR] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Mod Discovery failed. Skipping dependency discovery.     Full log [06Jun2025 16:18:48.612] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, DeltaBlack_, --version, 1.20.1, --gameDir, C:/Users/sammi/AppData/Roaming/PrismLauncher/instances/SITE 111/minecraft, --assetsDir, C:/Users/sammi/AppData/Roaming/PrismLauncher/assets, --assetIndex, 5, --uuid, 0ff86c0727f444f1a926b954a58d8c44, --accessToken, ????????, --userType, msa, --versionType, release, --launchTarget, forgeclient, --fml.forgeVersion, 47.1.105, --fml.fmlVersion, 47.2.2, --fml.mcVersion, 1.20.1, --fml.mcpVersion, 20230612.114412, --width, 854, --height, 480] [06Jun2025 16:18:48.615] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 11 arch amd64 version 10.0 [06Jun2025 16:18:49.050] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [06Jun2025 16:18:49.173] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6 [06Jun2025 16:18:49.311] [main/INFO] [EARLYDISPLAY/]: Requested GL version 4.6 got version 4.6 [06Jun2025 16:18:49.496] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/sammi/AppData/Roaming/PrismLauncher/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%23152!/ Service=ModLauncher Env=CLIENT [06Jun2025 16:18:49.502] [pool-2-thread-1/INFO] [EARLYDISPLAY/]: GL info: AMD Radeon Graphics GL version 4.6.0 Core Profile Context 24.10.21.03.240627, ATI Technologies Inc. [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "[1.20.1] SecurityCraft v1.10.0.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "ad_astra-forge-1.20.1-1.15.20.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "architectury-9.2.14-forge.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "bellsandwhistles-0.4.5-1.20.x-Create6.0+.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "botarium-forge-1.20.1-2.3.4.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "chloride-FORGE-mc1.20.1-v1.7.2.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "copycats-3.0.1+mc.1.20.1-forge.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "Create Encased-1.20.1-1.7.1-fix2.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "create-1.20.1-6.0.4.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "create_enchantment_industry-1.3.2-for-create-6.0.4.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.713] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "create_security-0.1.2-forge-1.20.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.714] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "createdeco-2.0.3-1.20.1-forge.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.714] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "createframed-1.20.1-1.6.5.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.714] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "creategoggles-1.20.1-6.0.0-[FORGE].jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "Crystal-Clear-2.1-Beta-forge.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "design_decor-0.4.0b-1.20.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "embeddium-0.3.31+mc1.20.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "entityculling-forge-1.7.4-mc1.20.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "interiors-0.5.6+forge-mc1.20.1-local.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "Jade-1.20.1-Forge-11.13.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "jei-1.20.1-forge-15.20.0.112.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "ManyIdeasCore-1.20.1-1.4.2.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "ManyIdeasDoors-1.20.1-1.2.3.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "prma-1.20.1-0.4.4-cr6.0-SIMPLE-beta-all.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.715] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "RecipesLibrary-1.20.1-2.0.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "resourcefulconfig-forge-1.20.1-2.1.3.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "resourcefullib-forge-1.20.1-2.1.29.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "rubidium-extra-0.5.4.4+mc1.20.1-build.131.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "rubidium-mc1.20.1-0.7.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "skinlayers3d-forge-1.7.5-mc1.20.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "Steam_Rails-1.6.7+forge-mc1.20.1.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "tacz-1.20.1-1.1.5.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "Xaeros_Minimap_25.2.6_Forge_1.20.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.716] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "XaerosWorldMap_1.39.9_Forge_1.20.jar" of type MOD with provider {mods folder locator at C:\Users\sammi\AppData\Roaming\PrismLauncher\instances\SITE 111\minecraft\mods} [06Jun2025 16:18:49.853] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\sammi\AppData\Roaming\PrismLauncher\libraries\net\neoforged\fancymodloader\core\47.2.2\core-47.2.2.jar is missing mods.toml file [06Jun2025 16:18:49.856] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\sammi\AppData\Roaming\PrismLauncher\libraries\net\neoforged\fancymodloader\language-java\47.2.2\language-java-47.2.2.jar is missing mods.toml file [06Jun2025 16:18:49.858] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\sammi\AppData\Roaming\PrismLauncher\libraries\net\neoforged\fancymodloader\language-lowcode\47.2.2\language-lowcode-47.2.2.jar is missing mods.toml file [06Jun2025 16:18:49.861] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\sammi\AppData\Roaming\PrismLauncher\libraries\net\neoforged\fancymodloader\language-minecraft\47.2.2\language-minecraft-47.2.2.jar is missing mods.toml file [06Jun2025 16:18:49.866] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "core-47.2.2.jar" of type LIBRARY with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@3c2fa57a [06Jun2025 16:18:49.867] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "language-java-47.2.2.jar" of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@3c2fa57a [06Jun2025 16:18:49.867] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "language-lowcode-47.2.2.jar" of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@3c2fa57a [06Jun2025 16:18:49.867] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "language-minecraft-47.2.2.jar" of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@3c2fa57a [06Jun2025 16:18:49.867] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "client-1.20.1-20230612.114412-srg.jar" of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@3c2fa57a [06Jun2025 16:18:49.867] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "forge-1.20.1-47.1.105-universal.jar" of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@3c2fa57a [06Jun2025 16:18:49.872] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Found mod file "events-47.2.2.jar" of type GAMELIBRARY with provider net.minecraftforge.fml.loading.moddiscovery.BuiltinGameLibraryLocator@38834000 [06Jun2025 16:18:49.881] [main/ERROR] [net.minecraftforge.fml.loading.UniqueModListBuilder/LOADING]: Found duplicate mods:     Mod ID: 'rubidium' from mod files: rubidium-mc1.20.1-0.7.1.jar, embeddium-0.3.31+mc1.20.1.jar [06Jun2025 16:18:49.882] [main/ERROR] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Failed to build unique mod list after mod discovery. net.minecraftforge.fml.loading.EarlyLoadingException: Duplicate mods found     at net.minecraftforge.fml.loading.UniqueModListBuilder.buildUniqueList(UniqueModListBuilder.java:87) ~[loader-47.2.2.jar:47.2]     at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.discoverMods(ModDiscoverer.java:106) ~[loader-47.2.2.jar:47.2]     at net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:164) ~[loader-47.2.2.jar:47.2]     at net.minecraftforge.fml.loading.FMLServiceProvider.beginScanning(FMLServiceProvider.java:86) ~[loader-47.2.2.jar:47.2]     at cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:112) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:100) ~[modlauncher-10.0.9.jar:?]     at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]     at java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1779) ~[?:?]     at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]     at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]     at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) ~[?:?]     at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) ~[?:?]     at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) ~[?:?]     at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:622) ~[?:?]     at java.util.stream.ReferencePipeline.toList(ReferencePipeline.java:627) ~[?:?]     at cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:102) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:55) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.Launcher.run(Launcher.java:88) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]     at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:67) ~[?:?]     at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105) ~[?:?]     at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129) ~[?:?]     at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[?:?] [06Jun2025 16:18:49.894] [main/ERROR] [net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer/SCAN]: Mod Discovery failed. Skipping dependency discovery.    
    • I've just started modding, and I'm trying to make custom swords. When I try to import SwordItem, I get the error:  What confuses me is that other item classes work fine: package io.github.xxx.denseswords.item; import io.github.xxx.denseswords.DenseSwords; import net.minecraft.world.item.Item; // works fine import net.minecraft.world.item.ShovelItem; // works fine import net.minecraft.world.item.SwordItem; // Error: The import cannot be resolved import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.RegistryObject; Forge MDK v55.0.15 - Minecraft 1.21.5 Java v24.0.1 Windows 11 IDE: Visual Studio Code
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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