Jump to content

Recommended Posts

Posted

Oh wait... I noticed that the JakanJump isn't working. And by not working I mean the entity isn't jumping, but the Zertums are

 

here is the code

package common.zeroquest.network.imessage;

import common.zeroquest.ZeroQuest;
import common.zeroquest.entity.EntityJakan;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.Entity;
import net.minecraft.potion.Potion;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class JakanJump implements IMessage{

public int entityId;

 public JakanJump(){}
 public JakanJump(int entityId)
 {
	 this.entityId = entityId;
 } 

    @Override
    public void fromBytes(ByteBuf buf) {
    	entityId = buf.readInt();
    }

    @Override
    public void toBytes(ByteBuf buf) {
        buf.writeInt(this.entityId);
    }


    public static class Handler implements IMessageHandler<JakanJump, IMessage> {

   	 public Handler(){}
	@Override
	public IMessage onMessage(JakanJump message, MessageContext ctx) {

		Entity target = ctx.getServerHandler().playerEntity;
        if(!(target instanceof EntityJakan))
        	return null;
        
        EntityJakan dog = (EntityJakan)target;
		if(dog.onGround) {

			dog.motionY = 2F * 2 * 0.1F;
			if(dog.isPotionActive(Potion.jump))
				dog.motionY += (double)((float)(dog.getActivePotionEffect(Potion.jump).getAmplifier() + 3) * 0.1F);
			dog.isAirBorne = true;
		}
		return message;
	}
    }
}

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

And the Jakan Code

 

package common.zeroquest.entity;

import java.util.List;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIFollowOwner;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAIMate;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAITargetNonTamed;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.passive.EntityCow;
import net.minecraft.entity.passive.EntityPig;
import net.minecraft.entity.passive.EntitySheep;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.projectile.EntityArrow;
import net.minecraft.init.Items;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.pathfinding.PathNavigateGround;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;

import com.google.common.base.Predicate;

import common.zeroquest.ModAchievements;
import common.zeroquest.ModItems;
import common.zeroquest.ZeroQuest;
import common.zeroquest.core.proxy.CommonProxy;
import common.zeroquest.inventory.InventoryPack;
import common.zeroquest.lib.Constants;
import common.zeroquest.lib.Sound;
import common.zeroquest.util.ItemUtils;



public class EntityJakan extends EntityCustomTameable /*implements IRangedAttackMob*/
{
    
    public static final double maxHealth = 50;
    public static final double attackDamage = 6;
    public static final double speed = 0.30000001192092896;
    public static final double maxHealthTamed = 60;
    public static final double attackDamageTamed = 8;
    public static final double maxHealthBaby = 10;
    public static final double attackDamageBaby = 2;
    
    // data value IDs TODO
    /**DO NOT CHANGE!**/
    public static final int INDEX_TAME = 16;
    public static final int INDEX_SADDLE = 19;

    public EntityJakan(World worldIn)
    {
        super(worldIn);
        this.setSize(2.6F, 2.6F);
        this.isImmuneToFire = true;
        ((PathNavigateGround)this.getNavigator()).func_179690_a(true);
        this.tasks.addTask(1, new EntityAISwimming(this));
        this.tasks.addTask(2, this.aiSit);
        this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
        this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
        this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
        this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
        this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
        this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
        this.tasks.addTask(9, new EntityAILookIdle(this));
        this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
        this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
        this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true, new Class[0]));
        this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntityAnimal.class, false, new Predicate()
        {
            private static final String __OBFID = "CL_00002229";
            public boolean func_180094_a(Entity p_180094_1_)
            {
                return p_180094_1_ instanceof EntitySheep || p_180094_1_ instanceof EntityPig || p_180094_1_ instanceof EntityCow;
            }
            public boolean apply(Object p_apply_1_)
            {
                return this.func_180094_a((Entity)p_apply_1_);
            }
        }));
        this.setTamed(false);
        this.inventory = new InventoryPack(this);
    }

    @Override
    protected void applyEntityAttributes()
    {
        super.applyEntityAttributes();
        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxHealth);
        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(attackDamage);
        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(speed);

        if (this.isTamed())
        {
            this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxHealthTamed);
            this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(attackDamageTamed);
        }
        else if (this.isChild())
        {
            this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(maxHealthBaby);
            this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(attackDamageBaby);
        }
    }

    /**
     * Sets the active target the Task system uses for tracking
     */
    @Override
    public void setAttackTarget(EntityLivingBase p_70624_1_)
    {
        super.setAttackTarget(p_70624_1_);

        if (p_70624_1_ == null)
        {
            this.setAngry(false);
        }
        else if (!this.isTamed())
        {
            this.setAngry(true);
        }
    }
    @Override
    protected void entityInit()
    {
        super.entityInit();
        this.dataWatcher.addObject(INDEX_SADDLE, Byte.valueOf((byte)0));
    }

    @Override
    protected void playStepSound(BlockPos p_180429_1_, Block p_180429_2_)
    {
        if (inWater) {
            // no sounds for underwater action
        } else if (this.isChild()) {
            // play default step sound for babies
            super.playStepSound(p_180429_1_, p_180429_2_);
        } else {
            // play stomping for bigger dragons
            worldObj.playSoundAtEntity(this, Sound.Step, 0.15F, 1.0F);
        }
    }

    @Override
    public void writeEntityToNBT(NBTTagCompound tagCompound)
    {
        super.writeEntityToNBT(tagCompound);
        tagCompound.setBoolean("Angry", this.isAngry());
        tagCompound.setBoolean("Saddle", this.getSaddled());
    }

    @Override
    public void readEntityFromNBT(NBTTagCompound tagCompund)
    {
        super.readEntityFromNBT(tagCompund);
        this.setAngry(tagCompund.getBoolean("Angry"));
        this.setSaddled(tagCompund.getBoolean("Saddle"));
    }

    /**
     * Returns the sound this mob makes while it's alive.
     */
    @Override
    protected String getLivingSound()
    {
        return this.canSeeCreeper ? Sound.JakanGrowl : this.isAngry() ? Sound.JakanSnarl :
        	 this.getHealth() <=10 ? Sound.JakanWhine :
        	(this.rand.nextInt(3) == 0 ? 
        			(Sound.JakanBreathe)
        					: Sound.JakanRoar);
        }
    
    @Override
    public void playLivingSound() {
    	String sound = getLivingSound();
    	if (sound == null) {
    		return;
    	}
    	if (!this.isChild()) {
    		float volume = getSoundVolume() * 1.0f;
    		float pitch = getSoundPitch();
    		this.playSound(sound, volume, pitch);
    	}else{
    		float volume = getSoundVolume() * 1.0f;
    		float pitch = getSoundPitch() * 2;
    		this.playSound(sound, volume, pitch);
    	}
    }

    /**
     * Returns the sound this mob makes when it is hurt.
     */
    @Override
    protected String getHurtSound()
    {
        return "mob.enderdragon.hit";
    }

    /**
     * Returns the sound this mob makes on death.
     */
    @Override
    protected String getDeathSound()
    {
        return Sound.JakanDeath;
    }

    /**
     * Get number of ticks, at least during which the living entity will be silent.
     */
@Override
    public int getTalkInterval() {
    	if(this.canSeeCreeper){
    		return 40;
    	}else if(this.getHealth() <=10){
    		return 20;
    	}else{
    		return 200;
    	}
    }
    
    /**
     * Returns the item ID for the item the mob drops on death.
     */
@Override
    protected void dropFewItems(boolean par1, int par2)
    {
        rare = rand.nextInt(20);
            {
                if (this.isBurning())
                {
                    this.dropItem(ModItems.jakanMeatCooked, 1);
                }
                else if (rare <= 12)
                {
                    this.dropItem(ModItems.jakanMeatRaw, 1);
                }
                if(rare <= 6 && !this.isTamed())
                {
                	this.dropItem(ModItems.nileGrain, 1);
                }
                if (this.getSaddled())
                {
                    this.dropItem(Items.saddle, 1);
                }
                else
                {
                	
                }
                
            }
        }

    /**
     * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
     * use this to react to sunlight and start to burn.
     */
@Override
    public void onLivingUpdate() //TODO
    {
        super.onLivingUpdate();
        if (isServer() && this.getAttackTarget() == null && this.isAngry())
        {
            this.setAngry(false);
        }
        
        if(Constants.DEF_HEALING == true && !this.isChild() && this.getHealth() <=10 && this.isTamed())
        {
       		this.addPotionEffect(new PotionEffect(10, 200));
        }
        //Dying
        if(this.getHealth() <=10 && this.isTamed()){ //TODO
        	double d0 = this.rand.nextGaussian() * 0.04D;
        	double d1 = this.rand.nextGaussian() * 0.04D;
        	double d2 = this.rand.nextGaussian() * 0.04D;
        	worldObj.spawnParticle(EnumParticleTypes.SPELL_WITCH, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
        }
        if (this.getAttackTarget() == null && isTamed() && 15 > 0) {
            List list1 = worldObj.getEntitiesWithinAABB(EntityCreeper.class, AxisAlignedBB.fromBounds(posX, posY, posZ, posX + 1.0D, posY + 1.0D, posZ + 1.0D).expand(sniffRange(), 4D, sniffRange()));

            if (!list1.isEmpty() && !isSitting() && this.getHealth() > 1 && !this.isChild()) {
                canSeeCreeper = true;
            }
            else {
                canSeeCreeper = false;
            }
        }
    }

    public float getEyeHeight()
    {
        return this.height * 0.8F;
    }

    public int getVerticalFaceSpeed()
    {
        return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
    }

    /**
     * Called when the entity is attacked.
     */
    @Override
    public boolean attackEntityFrom(DamageSource source, float amount)
    {
        if (this.isEntityInvulnerable(source))
        {
            return false;
        }
        else
        {
            Entity entity = source.getEntity();
            this.aiSit.setSitting(false);

            if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow))
            {
                amount = (amount + 1.0F) / 2.0F;
            }

            return super.attackEntityFrom(source, amount);
        }
    }

    public boolean attackEntityAsMob(Entity par1Entity)
    {
        float damage = (float)this.getEntityAttribute(SharedMonsterAttributes.attackDamage).getAttributeValue();
        int i = 0;
        int critChance = 5;
        critChance += 2;
        
        if (rand.nextInt(6) < critChance) { //TODO
        	damage += (damage + 3) / 2;
            double d0 = this.rand.nextGaussian() * 0.02D;
            double d1 = this.rand.nextGaussian() * 0.02D;
            double d2 = this.rand.nextGaussian() * 0.02D;
            worldObj.spawnParticle(EnumParticleTypes.CRIT, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) -
            		(double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + 
            		(double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2);
        }

        boolean flag = par1Entity.attackEntityFrom(DamageSource.causeMobDamage(this), damage);

        if (flag)
        {
            if (i > 0)
            {
                par1Entity.addVelocity((double)(-MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F) * (float)i * 0.5F), 0.1D, (double)(MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F) * (float)i * 0.5F));
                this.motionX *= 0.6D;
                this.motionZ *= 0.6D;
            }
            
            float volume = getSoundVolume() * 0.7f;
            float pitch = getPitch();
            worldObj.playSoundAtEntity(this, "random.eat", volume, pitch);
        }
	return flag;
    }

    /**
     * Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
     */
    public boolean interact(EntityPlayer par1EntityPlayer)
    {
        ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem();

        if (this.isTamed())
        {
            if (itemstack != null)
            {
                if (itemstack.getItem() instanceof ItemFood)
                {
                    ItemFood itemfood = null;
                    if(getHealthRelative() < 1)
                    {
                    	itemfood = (ItemFood) ItemUtils.consumeEquipped(par1EntityPlayer, Items.fish,
                            Items.porkchop, Items.beef, Items.chicken, Items.rabbit, Items.mutton, Items.cooked_porkchop, Items.cooked_beef,
                            Items.cooked_chicken, Items.cooked_fish, Items.cooked_rabbit, Items.cooked_mutton, ModItems.jakanMeatRaw, ModItems.jakanMeatCooked, 
                            ModItems.zertumMeatRaw, ModItems.zertumMeatCooked, ModItems.vitoidFruit);
                        if (itemfood != null) {
                        	float volume = getSoundVolume() * 1.0f;
                        	float pitch =  getPitch();
                        	worldObj.playSoundAtEntity(this, "random.eat", volume, pitch);
                            this.heal((float)itemfood.getHealAmount(itemstack));
                        }
                        return true;
                    }
                }
                else if(!this.isChild() && ItemUtils.hasEquipped(par1EntityPlayer, Items.saddle)) //TODO
                {
                	this.setSaddled(true);
                }
                else if(itemstack.getItem() == Items.stick && canInteract(par1EntityPlayer)) //TODO
                {
                	if(isServer()){
                		par1EntityPlayer.openGui(ZeroQuest.instance, CommonProxy.PetPack, this.worldObj, this.getEntityId(), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ));
                		this.worldObj.playSoundEffect(this.posX, this.posY + 0.5D, this.posZ, "random.chestopen", 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
                		return true;
                	}
                }
                
                else if (isServer() && this.getSaddled() && !this.isChild() && this.riddenByEntity == null && par1EntityPlayer.ridingEntity == null && !par1EntityPlayer.onGround && !ItemUtils.hasEquippedUsable(par1EntityPlayer) || par1EntityPlayer.getHeldItem() == null)
                {
					this.getSitAI().setSitting(false);
					this.setSitting(false);
					par1EntityPlayer.mountEntity(this);
                        par1EntityPlayer.triggerAchievement(ModAchievements.MountUp);
                }
            }

            if (canInteract(par1EntityPlayer) && isServer() && !this.isBreedingItem(itemstack))
            {
            	this.aiSit.setSitting(!this.isSitting());
                this.isJumping = false;
                this.navigator.clearPathEntity();
                this.setAttackTarget((EntityLivingBase)null);
            }
        }
        else if (ItemUtils.consumeEquipped(par1EntityPlayer, ModItems.nileBone) && !this.isAngry())
        {
            if (isServer())
            {
                tamedFor(par1EntityPlayer, rand.nextInt(3) == 0);
            }
            return true;
        }
        return super.interact(par1EntityPlayer);
    }
    
    @Override
    public void moveEntityWithHeading(float strafe, float forward) {
        if (this.riddenByEntity instanceof EntityPlayer) {
            this.prevRotationYaw = this.rotationYaw = this.riddenByEntity.rotationYaw;
            this.rotationPitch = this.riddenByEntity.rotationPitch * 0.5F;
            this.setRotation(this.rotationYaw, this.rotationPitch);
            this.rotationYawHead = this.renderYawOffset = this.rotationYaw;
            strafe = ((EntityPlayer)this.riddenByEntity).moveStrafing * 0.5F;
            forward = ((EntityPlayer)this.riddenByEntity).moveForward;

            if (forward <= 0.0F)
                forward *= 0.25F;

            if (this.onGround) {
                if (forward > 0.0F) {
                    float f2 = MathHelper.sin(this.rotationYaw * (float)Math.PI / 180.0F);
                    float f3 = MathHelper.cos(this.rotationYaw * (float)Math.PI / 180.0F);
                    this.motionX += (double)(-0.4F * f2 * 0.15F); // May change
                    this.motionZ += (double)(0.4F * f3 * 0.15F);
                }
            }

            this.stepHeight = 1.0F;
            this.jumpMovementFactor = this.getAIMoveSpeed() * 0.2F;

            if (!this.worldObj.isRemote)  {
                this.setAIMoveSpeed((float)this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue() / 4);
                super.moveEntityWithHeading(strafe, forward);
            }

            if (this.onGround) {
                //this.jumpPower = 0.0F;
               // this.setHorseJumping(false);
            }

            this.prevLimbSwingAmount = this.limbSwingAmount;
            double d0 = this.posX - this.prevPosX;
            double d1 = this.posZ - this.prevPosZ;
            float f4 = MathHelper.sqrt_double(d0 * d0 + d1 * d1) * 4.0F;

            if (f4 > 1.0F)
                f4 = 1.0F;

            this.limbSwingAmount += (f4 - this.limbSwingAmount) * 0.4F;
            this.limbSwing += this.limbSwingAmount;
        }
        else {
            this.stepHeight = 0.5F;
            this.jumpMovementFactor = 0.02F;
            super.moveEntityWithHeading(strafe, forward);
        }
    }
    
    @Override
    public void fall(float distance, float damageMultiplier)
    {
        if (distance > 1.0F)
        {
            this.playSound(Sound.Land, 0.4F, 1.0F);
        }

        int i = MathHelper.ceiling_float_int((distance * 0.5F - 3.0F) * damageMultiplier);

        if (i > 0)
        {
            this.attackEntityFrom(DamageSource.fall, (float)i);

            if (this.riddenByEntity != null)
            {
                this.riddenByEntity.attackEntityFrom(DamageSource.fall, (float)i);
            }

            Block block = this.worldObj.getBlockState(new BlockPos(this.posX, this.posY - 0.2D - (double)this.prevRotationYaw, this.posZ)).getBlock();

            if (block.getMaterial() != Material.air && !this.isSilent())
            {
                Block.SoundType soundtype = block.stepSound;
                this.worldObj.playSoundAtEntity(this, soundtype.getStepSound(), soundtype.getVolume() * 0.5F, soundtype.getFrequency() * 0.75F);
            }
        }
    }
    
    @Override
    public float getAIMoveSpeed() {
    	double speed = this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).getAttributeValue();
    	
    	speed += 0.2;
    	
    	if((!(this.getAttackTarget() instanceof EntityJakan) && !(this.getAttackTarget() instanceof EntityPlayer)) || this.riddenByEntity instanceof EntityPlayer)
    			speed /= 4;
    	
        return (float)speed;
    }

    /**
     * Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
     * the animal type)
     */
    public boolean isBreedingItem(ItemStack itemstack)
    {
    	return itemstack == null ? false : itemstack.getItem() == ModItems.vitoidFruit;
    }

    public int getMaxSpawnedInChunk()
    {
        return 8;
    }

    public boolean isAngry()
    {
        return (this.dataWatcher.getWatchableObjectByte(INDEX_TAME) & 2) != 0;
    }

    public void setAngry(boolean p_70916_1_)
    {
        byte b0 = this.dataWatcher.getWatchableObjectByte(INDEX_TAME);

        if (p_70916_1_)
        {
            this.dataWatcher.updateObject(INDEX_TAME, Byte.valueOf((byte)(b0 | 2)));
        }
        else
        {
            this.dataWatcher.updateObject(INDEX_TAME, Byte.valueOf((byte)(b0 & -3)));
        }
    }

    public boolean getSaddled()
    {
        return (this.dataWatcher.getWatchableObjectByte(INDEX_SADDLE) & 1) != 0;
    }

    public void setSaddled(boolean p_70900_1_)
    {
        if (p_70900_1_)
        {
            this.dataWatcher.updateObject(INDEX_SADDLE, Byte.valueOf((byte)1));
        }
        else
        {
            this.dataWatcher.updateObject(INDEX_SADDLE, Byte.valueOf((byte)0));
        }
    }    
    
    public EntityJakan createChild(EntityAgeable p_90011_1_)
    {
    	EntityJakan entityJakan = new EntityJakan(this.worldObj);
        String s = this.getOwnerId();

        if (s != null && s.trim().length() > 0)
        {
        	entityJakan.setOwnerId(s);
        	entityJakan.setTamed(true);
        }

        return entityJakan;
    }
    
    /**
     * Returns true if the mob is currently able to mate with the specified mob.
     */
    public boolean canMateWith(EntityAnimal p_70878_1_)
    {
        if (p_70878_1_ == this)
        {
            return false;
        }
        else if (!this.isTamed())
        {
            return false;
        }
        else if (!(p_70878_1_ instanceof EntityJakan))
        {
            return false;
        }
        else
        {
        	EntityJakan entitywolf = (EntityJakan)p_70878_1_;
            return !entitywolf.isTamed() ? false : (entitywolf.isSitting() ? false : this.isInLove() && entitywolf.isInLove());
        }
    }
    
    /**
     * Determines if an entity can be despawned, used on idle far away entities
     */
    protected boolean canDespawn()
    {
        return !this.isTamed() && this.ticksExisted > 2400;
    }
    
    public boolean allowLeashing()
    {
        return !this.isAngry() && super.allowLeashing();
    }
}

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!

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.