Jump to content

Custom Mod Breaks Mobs in 1.15.2


JJ Revans

Recommended Posts

So I am making a mod that adds an entity that beats the game for you. When I spawn it in, all mobs in the game freeze and liquids stop working. Not only that, but chunk generation slows down considerably and the world becomes un-savable. The script for the entity's actions is in it's basic Entity script, so the script is very very lengthy. Here it is: (btw, it is incomplete)

package com.jaegalaxy.illi.entities;

import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.*;
import net.minecraft.entity.ai.goal.SwimGoal;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.SoundEvents;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.DifficultyInstance;
import net.minecraft.world.IWorld;
import net.minecraft.world.World;

import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.List;

public class BotEntity extends MobEntity
{
    public List<ItemStack> itemStackList = Arrays.asList();

    private final float SPEED = 0.23f;

    private BlockPos CraftingTablePos;

    private boolean SPAWNEDYET = false;

    private boolean foundTree = false; // whether or not we have found a tree
    private BlockPos nearestTree; // where the nearest tree is
    private int tryfindtreerepeats = 5; // how many times we want to find and break a tree

    private Block mineForBlock;
    private boolean startMining = false;
    private boolean movingtomine = false;
    private BlockPos mineStart;
    private BlockPos movingToMinePos;
    private boolean afterMiningMove = false;

    private boolean smeltingIron = false;
    private int ticksSinceStartedSmeltingIron = 0;

    private boolean goingToWater = false;
    private BlockPos WaterPos;
    private boolean goingToLava = false;
    private BlockPos LavaPos;

    private boolean waitingForNPortal = false;
    private boolean goingToPortalAfterBuilt = false;
    private BlockPos OGPortalPos;
    private boolean WTSAGIP = false;
    private int WTSAGIP_ticks = 0;

    boolean findingBlazes = false;
    BlockPos blazeLocation;

    boolean tryingToKill = false;


    public BotEntity(EntityType<? extends BotEntity> type, World worldIn)
    {
        super(type, worldIn);
    }

    @Override
    protected void registerAttributes() {
        super.registerAttributes();
        this.getAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20);
        this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.23F);
    }

    @Override
    protected void registerGoals() {
        this.goalSelector.addGoal(0, new SwimGoal(this));
    }

    @Nullable
    @Override
    public ILivingEntityData onInitialSpawn(IWorld worldIn, DifficultyInstance difficultyIn, SpawnReason reason, @Nullable ILivingEntityData spawnDataIn, @Nullable CompoundNBT dataTag)
    {
        BotStart();
        return super.onInitialSpawn(worldIn, difficultyIn, reason, spawnDataIn, dataTag);
    }

    void BotStart()
    {
        SPAWNEDYET = true;
        TryFindTree();
    }

    @Override
    public void onDeath(DamageSource cause) {
        super.onDeath(cause);

        if(!world.isRemote)
        {
            for (ItemStack stacky : itemStackList)
            {
                ItemEntity stackyEntity = new ItemEntity(world, getPosX(), getPosY(), getPosZ());
                world.addEntity(stackyEntity);
            }
        }
    }

    @Nullable
    @Override
    protected SoundEvent getHurtSound(DamageSource damageSourceIn) {
        return SoundEvents.ENTITY_PLAYER_HURT;
    }

    @Nullable
    @Override
    protected SoundEvent getDeathSound() {
        return SoundEvents.ENTITY_PLAYER_DEATH;
    }

    //public boolean canAttackClass(Class par1Class)
    //{
      //  return EntityCreeper.class != par1Class && EntityGhast.class != par1Class;
    //}

    void TryFindTree() // we want to find a tree.
    {
        foundTree = false; // we have not found a tree
        nearestTree = FindBlock(Blocks.OAK_LOG, 50); // we want to find the nearest tree
        if(!nearestTree.equals(new BlockPos(getPosX(), getPosY(), getPosZ()))) // if the FindBlock doesnt give us the random thing...
            getNavigator().tryMoveToXYZ(nearestTree.getX() - 1, nearestTree.getY(), nearestTree.getZ() - 1, SPEED); // get to the tree
        else{ // otherwise...
            foundTree = true; // P.S. this is totally a lie just FYI
            TryFindTree(); // find a new tree
        }
    }

    void TryBreakTree() // we want to break a tree.
    {
        world.setBlockState(nearestTree, Blocks.AIR.getDefaultState()); // mine the wood
        itemStackList.add(new ItemStack(Items.OAK_LOG)); // mmm get that nice tasty wood
    }

    void TryCraftOakPlanks() // 4 oak planks = 1 oak log. do this for every log!
    {
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.OAK_LOG))){ // if the bot has oak log
                itemStackList.remove(stacky); // take away the oak logs
                itemStackList.add(new ItemStack(Items.OAK_PLANKS)); // give the bot wooden planks
                itemStackList.add(new ItemStack(Items.OAK_PLANKS)); // give the bot wooden planks
                itemStackList.add(new ItemStack(Items.OAK_PLANKS)); // give the bot wooden planks
                itemStackList.add(new ItemStack(Items.OAK_PLANKS)); // give the bot wooden planks
                // these planks will be used for sticks and such
            }
        }

        TryCraftCraftingTable(); // craft a crafting table
    }

    void TryCraftCraftingTable() // crafting table = 4 oak planks.
    {
        int loops = 4; // do this once
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.OAK_PLANKS))){ // if the bot has oak planks
                if(loops > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away the oak plank
                    loops--; // we have looped
                }
            }
        }
        itemStackList.add(new ItemStack(Items.CRAFTING_TABLE)); // give the bot a crafting table

        TryPlaceCraftingTable(); // place a crafting table
    }

    void TryPlaceCraftingTable() // place crafting table. do this until a crafting table is crafted
    {
        BlockPos craftpos = new BlockPos(getPosX(), getPosY(), getPosZ() +1 );
        int loops = 1; // do this once
        world.setBlockState(craftpos, Blocks.CRAFTING_TABLE.getDefaultState());
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.CRAFTING_TABLE))){ // if the bot has crafting table
                if(loops > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away the crafting table
                    loops--; // we have looped
                }
            }
        }
        world.setBlockState(craftpos, Blocks.CRAFTING_TABLE.getDefaultState()); // place the crafting table
        CraftingTablePos = craftpos;
        TryCraftSomeSticks(); // craft those sticks!
    }

    void TryCraftSomeSticks() // 8 sticks = 4 oak planks
    {
        int loops = 2; // do this twice
        for(ItemStack stacky : itemStackList) { // repeat for each item in the bot's inventory
            if (stacky.equals(new ItemStack(Items.OAK_PLANKS))) { // if the bot has oak planks
                if (loops > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away an oak plank
                    itemStackList.remove(stacky); // take away an oak plank
                    itemStackList.add(new ItemStack(Items.CRAFTING_TABLE)); // give the bot a crafting table
                    itemStackList.add(new ItemStack(Items.CRAFTING_TABLE)); // give the bot a crafting table
                    itemStackList.add(new ItemStack(Items.CRAFTING_TABLE)); // give the bot a crafting table
                    itemStackList.add(new ItemStack(Items.CRAFTING_TABLE)); // give the bot a crafting table
                    loops--;
                }
            }
        }

        TryCraftPickaxe(); // craft a pickaxe...
    }

    void TryCraftPickaxe()
    {
        // TAKE AWAY OAK PLANKS!
        int loops = 3; // do this 3 times
        for(ItemStack stacky : itemStackList) { // repeat for each item in the bot's inventory
            if (stacky.equals(new ItemStack(Items.OAK_PLANKS))) { // if the bot has oak planks
                if (loops > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away an oak plank
                    loops--; // we have looped
                }
            }
        }

        // TAKE AWAY STICKS!
        int loops2 = 2; // do this twice
        for(ItemStack stacky : itemStackList) { // repeat for each item in the bot's inventory
            if (stacky.equals(new ItemStack(Items.STICK))) { // if the bot has stick
                if (loops2 > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away stick
                    loops2--; // we have looped
                }
            }
        }

        itemStackList.add(new ItemStack(Items.WOODEN_PICKAXE)); // give the bot a pickaxe

        TryMineForCobble();
    }

    void TryMineForCobble()
    {
        StartMine(Blocks.COBBLESTONE);
    }

    void TryCraftStonePickaxe()
    {
        // repeat for each item in the bot's inventory
        // if the bot has cobblestone
        // take it away
        itemStackList.removeIf(stacky -> stacky.equals(new ItemStack(Items.COBBLESTONE)));
        int loops = 2;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.STICK))){ // if the bot has sticks
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    loops--;
                }
            }
        }

        itemStackList.add(new ItemStack(Items.STONE_PICKAXE)); // give the bot a pickaxe

        TryMineMoreForIron();
    }

    void TryMineMoreForIron()
    {
        StartMine(Blocks.IRON_ORE);
    }

    void SmeltIron()
    {
        // craft a furnace using cobblestone collected
        SI_CraftFurnace();
    }

    void SI_CraftFurnace()
    {
        itemStackList.removeIf(stacky -> stacky.equals(new ItemStack(Items.COBBLESTONE)));
        int loops = 8;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.COBBLESTONE))){ // if the bot has cobblestone
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    loops--;
                }
            }
        }

        BlockPos furnacePos = new BlockPos(CraftingTablePos.getX() - 1, CraftingTablePos.getY(), CraftingTablePos.getZ());
        world.setBlockState(furnacePos, Blocks.FURNACE.getDefaultState());

        SI_StartSmeltIron();
    }

    void SI_StartSmeltIron()
    {
        smeltingIron = true;
    }

    void SI_HandleSmeltSystemAndCraftIronBucket()
    {
        // remove items used for smelting
        itemStackList.add(new ItemStack(Items.IRON_INGOT)); // give the bot an iron ingot
        itemStackList.add(new ItemStack(Items.IRON_INGOT)); // give the bot an iron ingot
        itemStackList.add(new ItemStack(Items.IRON_INGOT)); // give the bot an iron ingot

        int loops = 3;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.OAK_PLANKS))){ // if the bot has cobblestone
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    loops--;
                }
            }
        }

        int loops2 = 3;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.IRON_INGOT))){ // if the bot has cobblestone
                if(loops2 > 0) {
                    itemStackList.remove(stacky); // take it away
                    loops2--;
                }
            }
        }

        itemStackList.add(new ItemStack(Items.BUCKET)); // give the bot an iron ingot

        AfterwardsCraftAStoneSwordPlease();
    }

    void AfterwardsCraftAStoneSwordPlease()
    {
        // use the crafting algorithm to make a stone sword
        // TAKE AWAY COBBLESTONE!
        int loops = 2; // do this twice
        for(ItemStack stacky : itemStackList) { // repeat for each item in the bot's inventory
            if (stacky.equals(new ItemStack(Items.COBBLESTONE))) { // if the bot has oak planks
                if (loops > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away an oak plank
                    loops--; // we have looped
                }
            }
        }

        // TAKE AWAY STICKS!
        int loops2 = 1; // do this once
        for(ItemStack stacky : itemStackList) { // repeat for each item in the bot's inventory
            if (stacky.equals(new ItemStack(Items.STICK))) { // if the bot has stick
                if (loops2 > 0) { // if we have not looped enough
                    itemStackList.remove(stacky); // take away stick
                    loops2--; // we have looped
                }
            }
        }

        itemStackList.add(new ItemStack(Items.STONE_SWORD)); // give the bot a sword
        FindWater();
    }

    void FindWater()
    {
        // set destination to water and wait
        BlockPos waterPos = FindBlock(Blocks.WATER, 100);
        getNavigator().tryMoveToXYZ(waterPos.getX(), waterPos.getY(), waterPos.getZ(), 0.23f);
        WaterPos = new BlockPos(waterPos.getX() - 1, waterPos.getY(), waterPos.getZ());
        goingToWater = true;
    }

    void FillBucketWithWater()
    {
        // get some water in the bucket!
        BlockPos actualwaterpos = new BlockPos(WaterPos.getX() + 1, WaterPos.getY(), WaterPos.getZ());
        world.setBlockState(actualwaterpos, Blocks.AIR.getDefaultState());

        int loops = 1;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.BUCKET))){ // if the bot has bucket
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    itemStackList.add(new ItemStack(Items.WATER_BUCKET)); // give the bot a water bucket
                    loops--;
                }
            }
        }

        FindLava();
    }

    void FindLava()
    {
        // set destination to lava and wait
        BlockPos _lavaPos = FindBlock(Blocks.LAVA, 100);
        getNavigator().tryMoveToXYZ(_lavaPos.getX()-7, _lavaPos.getY(), _lavaPos.getZ()-7, 0.23f);
        LavaPos = new BlockPos(_lavaPos.getX()-7, _lavaPos.getY(), _lavaPos.getZ()-7);
        goingToLava = true;
    }

    void CreatePortal()
    {
        // follow the slightly complex algorithm to build a portal

        // make a hole (2x1x2)
        BlockPos pos1 = new BlockPos(LavaPos.getX(), LavaPos.getY(), LavaPos.getZ());
        BlockPos pos2 = new BlockPos(LavaPos.getX(), LavaPos.getY(), LavaPos.getZ()+1);
        BlockPos pos3 = new BlockPos(LavaPos.getX()+1, LavaPos.getY(), LavaPos.getZ());
        BlockPos pos4 = new BlockPos(LavaPos.getX()+1, LavaPos.getY(), LavaPos.getZ()+1);

        CP_MineBlock(pos1);
        CP_MineBlock(pos2);
        CP_MineBlock(pos3);
        CP_MineBlock(pos4);

        // make a wall (2x3x1)
        BlockPos PP1 = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+1, LavaPos.getZ());
        BlockPos PP2 = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+2, LavaPos.getZ());
        BlockPos PP3 = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+3, LavaPos.getZ());
        BlockPos PP4 = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+1, LavaPos.getZ()+1);
        BlockPos PP5 = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+2, LavaPos.getZ()+1);
        BlockPos PP6 = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+3, LavaPos.getZ()+1);

        CP_PlaceBLock(PP1, Blocks.COBBLESTONE);
        CP_PlaceBLock(PP2, Blocks.COBBLESTONE);
        CP_PlaceBLock(PP3, Blocks.COBBLESTONE);
        CP_PlaceBLock(PP4, Blocks.COBBLESTONE);
        CP_PlaceBLock(PP5, Blocks.COBBLESTONE);
        CP_PlaceBLock(PP6, Blocks.COBBLESTONE);

        // pour some water
        BlockPos WP = new BlockPos(LavaPos.getX()-1, LavaPos.getY()+4, LavaPos.getZ()+1);

        CP_EmptyWaterBucket(WP);

        // fill bucket with lava and empty it repeatedly!
        BlockPos EP1 = new BlockPos(LavaPos.getX(), LavaPos.getY()+1, LavaPos.getZ()-1);
        BlockPos EP2 = new BlockPos(LavaPos.getX(), LavaPos.getY()+2, LavaPos.getZ()-1);
        BlockPos EP3 = new BlockPos(LavaPos.getX(), LavaPos.getY()+3, LavaPos.getZ()-1);
        BlockPos EP4 = new BlockPos(LavaPos.getX(), LavaPos.getY()+4, LavaPos.getZ());
        BlockPos EP5 = new BlockPos(LavaPos.getX(), LavaPos.getY()+1, LavaPos.getZ()+2);
        BlockPos EP6 = new BlockPos(LavaPos.getX(), LavaPos.getY()+2, LavaPos.getZ()+2);
        BlockPos EP7 = new BlockPos(LavaPos.getX(), LavaPos.getY()+3, LavaPos.getZ()+2);
        BlockPos EP8 = new BlockPos(LavaPos.getX(), LavaPos.getY()+4, LavaPos.getZ()+1);
        BlockPos EP9 = new BlockPos(LavaPos.getX(), LavaPos.getY(), LavaPos.getZ());
        BlockPos EP10 = new BlockPos(LavaPos.getX(), LavaPos.getY(), LavaPos.getZ()+1);

        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP1);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP2);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP3);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP4);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP5);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP6);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP7);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP8);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP9);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_EmptyLavaBucket(EP10);

        // use an algorithm to set the portal on fire - run IgnitePortal()
        IgnitePortal(EP10, EP9);
    }

    void CP_EmptyWaterBucket(BlockPos emptyPos)
    {
        // replace water bucket with regular bucket
        int loops = 1;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.WATER_BUCKET))){ // if the bot has water bucket
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    itemStackList.add(new ItemStack(Items.BUCKET)); // give the bot a bucket
                    loops--;
                }
            }
        }

        // put down water at "emptyPos"
        world.setBlockState(emptyPos, Blocks.WATER.getDefaultState());
    }

    void CP_FillLavaBucket(BlockPos fillPos)
    {
        // replace bucket with lava bucket
        int loops = 1;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.BUCKET))){ // if the bot has bucket
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    itemStackList.add(new ItemStack(Items.LAVA_BUCKET)); // give the bot a lava bucket
                    loops--;
                }
            }
        }

        // replace lava at "fillPos" with air
        world.setBlockState(fillPos, Blocks.AIR.getDefaultState());
    }

    void CP_EmptyLavaBucket(BlockPos emptyPos)
    {
        // replace lava bucket with regular bucket
        int loops = 1;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(Items.LAVA_BUCKET))){ // if the bot has lava bucket
                if(loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    itemStackList.add(new ItemStack(Items.BUCKET)); // give the bot a bucket
                    loops--;
                }
            }
        }

        // put down lava at "emptyPos"
        world.setBlockState(emptyPos, Blocks.LAVA.getDefaultState());
    }

    void CP_MineBlock(BlockPos blockPos)
    {
        // give the bot the block that will be removed
        itemStackList.add(new ItemStack(Item.getItemFromBlock(world.getBlockState(blockPos).getBlock()))); // give the bot a bucket

        // replace block at "blockPos" with air
        world.setBlockState(blockPos, Blocks.AIR.getDefaultState());
    }

    void CP_PlaceBLock(BlockPos placePos, Block blockToPlace)
    {
        // remove "blockToPlace" from the bot's inv.
        int loops = 1;
        for(ItemStack stacky : itemStackList) { // repeat for each item in the bot's inventory
            if (stacky.equals(new ItemStack(Item.getItemFromBlock(blockToPlace)))) { // if the bot has lava bucket
                if (loops > 0) {
                    itemStackList.remove(stacky); // take it away
                    loops--;
                }
            }
        }

        // place that block at "placePos"
        world.setBlockState(placePos, blockToPlace.getDefaultState());
    }

    void IgnitePortal(BlockPos portalBottomRight, BlockPos portalBottomLeft)
    {
        // replace a block behind the bottom of the portal with lava (left I guess)
        CP_MineBlock(portalBottomLeft);
        CP_FillLavaBucket(FindBlock(Blocks.LAVA, 25));
        CP_PlaceBLock(portalBottomLeft, Blocks.LAVA);

        // place wooden planks right above it
        BlockPos PBRA = new BlockPos(portalBottomRight.getX()-1, portalBottomRight.getY()+1, portalBottomRight.getZ());
        BlockPos PBLA = new BlockPos(portalBottomLeft.getX()-1, portalBottomLeft.getY()+1, portalBottomLeft.getZ());

        CP_MineBlock(PBRA);
        CP_MineBlock(PBLA);
        CP_PlaceBLock(PBRA, Blocks.OAK_PLANKS);
        CP_PlaceBLock(PBLA, Blocks.OAK_PLANKS);

        // wait for the portal to ignite
        waitingForNPortal = true;
    }

    void FindBlazes()
    {
        // set destination to a blaze spawner and wait
        BlockPos blazePos = FindBlock(Blocks.SPAWNER, 100);
        BlockPos newBlazePos = new BlockPos(blazePos.getX(), blazePos.getY() + 1, blazePos.getZ());
        getNavigator().tryMoveToXYZ(newBlazePos.getX(), newBlazePos.getY(), newBlazePos.getZ(), 0.23f);
        blazeLocation = newBlazePos;
        findingBlazes = true;
    }

    void Kill(Entity entity)
    {
        moveToKill(entity);
    }

    void moveToKill(Entity entity)
    {
        getNavigator().tryMoveToEntityLiving(entity, 0.23f); // this may not work...
    }

    @Override
    public void tick() // called every 1/20 of a second
    {
        //super.tick(); // makes sure the parent "Goal" does all it needs to do in tick TODO possibly uncomment

        if(!SPAWNEDYET) return;

        if(tryingToKill)
        {

        }

        if(waitingForNPortal)
        {
            BlockPos pos = FindBlock(Blocks.NETHER_PORTAL, 10);
            if(pos != getPosition())
            {
                waitingForNPortal = false;
                OGPortalPos = pos;
                getNavigator().tryMoveToXYZ(pos.getX(), pos.getY(), pos.getZ(), 0.23f);
                goingToPortalAfterBuilt = true;
            }
        }

        if(goingToPortalAfterBuilt)
        {
            if(getPosition() == OGPortalPos)
            {
                goingToPortalAfterBuilt = false;
                WTSAGIP = true;
            }
        }

        if(WTSAGIP)
        {
            WTSAGIP_ticks++;
            if(WTSAGIP_ticks >= 200)
            {
                WTSAGIP = false;
                FindBlazes();
            }
        }

        if(goingToWater)
        {
            if(getPosition() == WaterPos)
            {
                goingToWater = false;
                FillBucketWithWater();
            }
        }

        if(goingToLava)
        {
            if(getPosition() == LavaPos)
            {
                goingToWater = false;
                CreatePortal();
            }
        }

        if(smeltingIron) {
            ticksSinceStartedSmeltingIron++;
            if(ticksSinceStartedSmeltingIron >= 60)
            {
                smeltingIron = false;
                SI_HandleSmeltSystemAndCraftIronBucket();
            }
        }

        if(!foundTree) // updates whether or not we have found a tree
        {
            if(getPosition().equals(new BlockPos(nearestTree.getX() - 1, getPosY(), nearestTree.getZ() - 1)))
            {
                foundTree = true; // we have gotten to the tree
                tryfindtreerepeats--; // we have "repeated"
                if(tryfindtreerepeats <= 0) // if we have repeated enough...
                {
                    TryCraftOakPlanks(); // craft some oak planks
                }
                else { // otherwise...
                    TryBreakTree(); // break the tree we found
                    TryFindTree(); // find a new tree
                }
            }
        }

        if(startMining)
        {
            if(getPosition() == new BlockPos(mineStart.getX() - 1, getPosY(), mineStart.getZ() - 1))
            {
                MineInMine();
                startMining = false;
            }
        }

        if(movingtomine)
        {
            if(getPosition() == movingToMinePos)
            {
                MineInMine();
            }
        }

        if(afterMiningMove)
        {
            if(getPosition() == new BlockPos(CraftingTablePos.getX(), CraftingTablePos.getY(), CraftingTablePos.getZ() - 1))
            {
                afterMiningMove = false;
                if(mineForBlock == Blocks.COBBLESTONE)
                    TryCraftStonePickaxe();
                else if (mineForBlock == Blocks.IRON_ORE)
                    SmeltIron();
            }
        }

        CheckBlocksNearAndMine(Blocks.IRON_ORE);
        CheckBlocksNearAndMine(Blocks.DIAMOND_ORE);
    }

    void CheckBlocksNearAndMine(Block checkfordis)
    {
        BlockPos blockabove = new BlockPos(getPosX(), getPosY() +1, getPosZ());
        BlockPos blockbelow = new BlockPos(getPosX(), getPosY() -1, getPosZ());
        BlockPos blockNZ = new BlockPos(getPosX(), getPosY(), getPosZ() -1);
        BlockPos blockPZ = new BlockPos(getPosX(), getPosY(), getPosZ() +1);
        BlockPos blockNX = new BlockPos(getPosX() -1, getPosY(), getPosZ());
        BlockPos blockPX = new BlockPos(getPosX() +1, getPosY(), getPosZ());
        BlockPos blockabovetwo = new BlockPos(getPosX(), getPosY() +2, getPosZ());
        if(world.getBlockState(blockabove) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockabove, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
        if(world.getBlockState(blockbelow) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockbelow, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
        if(world.getBlockState(blockNZ) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockNZ, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
        if(world.getBlockState(blockPZ) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockPZ, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
        if(world.getBlockState(blockNX) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockNX, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
        if(world.getBlockState(blockPX) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockPX, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
        if(world.getBlockState(blockabovetwo) == checkfordis.getDefaultState())
        {
            world.setBlockState(blockabovetwo, Blocks.AIR.getDefaultState());
            itemStackList.add(new ItemStack(Item.getItemFromBlock(checkfordis))); // give the bot stuff
        }
    }

    BlockPos FindBlock(Block targetBlock, int radius) // finds the nearest block of a type
    {
        BlockPos closestPos = null;
        BlockPos checkPos = getPosition();

        for (int x = (int)getPosX()-radius; x < (int)getPosX()+radius; x++)
        {
            for (int y = (int)getPosY()-radius; x < (int)getPosY()+radius; y++)
            {
                for (int z = (int)getPosZ()-radius; z < (int)getPosZ()+radius; z++)
                {
                    checkPos = new BlockPos(x, y, z);
                    if (world.getBlockState(checkPos).getBlock() == targetBlock)
                    {
                        // check if it is closer than any previously found position
                        if (closestPos == null ||
                                getDistanceSq((int)getPosX() - checkPos.getX(),
                                        (int)getPosY() - checkPos.getY(),
                                        (int)getPosZ() - checkPos.getZ())
                                        < getDistanceSq((int)getPosX() - closestPos.getX(),
                                        (int)getPosY() - closestPos.getY(),
                                        (int)getPosZ() - closestPos.getZ()))
                        {
                            closestPos = checkPos;
                        }
                    }
                }
            }
        }
        if(closestPos != null)
            return closestPos;
        else
            return new BlockPos(getPosX(),getPosY(),getPosZ()); // return this random thing
    }

    void StartMine(Block thisisnewblock)
    {
        mineForBlock = thisisnewblock;
        getNavigator().tryMoveToXYZ(getPosX(), getPosY(), getPosZ() - 2, 0.23f);
        mineStart = new BlockPos(getPosX(), getPosY(), getPosZ() - 2);
        startMining = true;
    }

    void MineInMine()
    {
        movingtomine = false;
        BlockPos topblock = new BlockPos(getPosX(), getPosY() + 1, getPosZ() + 1);
        BlockPos midblock = new BlockPos(getPosX(), getPosY(), getPosZ() + 1);
        BlockPos lowblock = new BlockPos(getPosX(), getPosY() - 1, getPosZ() + 1);
        BlockState topblockOG = world.getBlockState(topblock);
        BlockState midblockOG = world.getBlockState(midblock);
        BlockState lowblockOG = world.getBlockState(lowblock);
        world.setBlockState(topblock, Blocks.AIR.getDefaultState());
        world.setBlockState(midblock, Blocks.AIR.getDefaultState());
        world.setBlockState(lowblock, Blocks.AIR.getDefaultState());
        itemStackList.add(new ItemStack(Item.getItemFromBlock(topblockOG.getBlock()))); // give the bot stuff
        itemStackList.add(new ItemStack(Item.getItemFromBlock(midblockOG.getBlock()))); // give the bot stuff
        itemStackList.add(new ItemStack(Item.getItemFromBlock(lowblockOG.getBlock()))); // give the bot stuff
        if(!HasAmountOfItem(Items.COBBLESTONE, 3) && mineForBlock == Blocks.COBBLESTONE)
        {
            getNavigator().tryMoveToXYZ(lowblock.getX(), lowblock.getY(), lowblock.getZ(), 0.23f);
            movingToMinePos = lowblock;
            movingtomine = true;
        }else if (!HasAmountOfItem(Items.IRON_ORE, 3) && mineForBlock == Blocks.IRON_ORE)
        {
            getNavigator().tryMoveToXYZ(lowblock.getX(), lowblock.getY(), lowblock.getZ(), 0.23f);
            movingToMinePos = lowblock;
            movingtomine = true;
        }
        else{
            AfterMine();
        }
    }

    void AfterMine()
    {
        getNavigator().tryMoveToXYZ(CraftingTablePos.getX(), CraftingTablePos.getY(), CraftingTablePos.getZ() - 1, 0.23f);
        afterMiningMove = true;
    }

    boolean HasAmountOfItem(Item checkForItem, int amountOfItem)
    {
        int amountfound = 0;
        for(ItemStack stacky : itemStackList){ // repeat for each item in the bot's inventory
            if(stacky.equals(new ItemStack(checkForItem))) { // if the bot has oak log
                amountfound++;
            }
        }
        if(amountfound >= amountOfItem)
            return true;
        else
            return false;
    }
}

 

 

Any help is appreciated!

Link to comment
Share on other sites

 

32 minutes ago, JJ Revans said:

    void TryFindTree() // we want to find a tree.
    {
        foundTree = false; // we have not found a tree
        nearestTree = FindBlock(Blocks.OAK_LOG, 50); // we want to find the nearest tree
        if(!nearestTree.equals(new BlockPos(getPosX(), getPosY(), getPosZ()))) // if the FindBlock doesnt give us the random thing...
            getNavigator().tryMoveToXYZ(nearestTree.getX() - 1, nearestTree.getY(), nearestTree.getZ() - 1, SPEED); // get to the tree
        else{ // otherwise...
            foundTree = true; // P.S. this is totally a lie just FYI
            TryFindTree(); // find a new tree
        }
    }

(1) Try to find a tree:
(2)  - If you fail to find a tree:

(3)  - - Goto 1

 

Plus you have a bunch of stuff that appears to indicate that you don't understand how the mob AI works, like your CreateNetherPortal method which tells the entity to find 14 lava blocks in one tick. It doesn't wait for the entity to actually DO anything, it says "find a lava blocks, place lava block, repeat 13 more times." All in the same function.

Edited by Draco18s

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.

Link to comment
Share on other sites

3 minutes ago, JJ Revans said:

Is the code getting stuck in an infinite loop?

Yes.

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.

Link to comment
Share on other sites

    private int startingRadius = 9; // the radius of our block checking

void TryFindTree() // we want to find a tree.
    {
        foundTree = false; // we have not found a tree
        startingRadius+=20;
        nearestTree = FindBlock(Blocks.OAK_LOG, startingRadius); // we want to find the nearest tree
        if(!nearestTree.equals(new BlockPos(getPosX(), getPosY(), getPosZ()))) // if the FindBlock doesnt give us the random thing...
            getNavigator().tryMoveToXYZ(nearestTree.getX() - 1, nearestTree.getY(), nearestTree.getZ() - 1, SPEED); // get to the tree
        else{ // otherwise...
            foundTree = true; // P.S. this is totally a lie just FYI
            TryFindTree(); // find a new tree
        }
    }

 

 

So I changed the script to work like this and spawned the entity near a tree. The problem still occurs. I may have put another infinite loop somewhere, but I am not sure...

 

About your Mob AI statement, I may be doing this in the completely wrong way. It was just the first way of doing things that jumped to my mind. Feel free to give suggestions if I have no idea what I'm doing, and thanks for your help!

Edited by JJ Revans
Link to comment
Share on other sites

2 hours ago, JJ Revans said:

So I changed the script to work like this and spawned the entity near a tree. The problem still occurs. I may have put another infinite loop somewhere, but I am not sure...

I'm not sure either, use the debugger.

2 hours ago, JJ Revans said:

I may be doing this in the completely wrong way. It was just the first way of doing things that jumped to my mind.

Here's a hint: you need to do one thing at a time and wait for the entity to complete that thing before you have it do something else.

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.

Link to comment
Share on other sites

20 hours ago, JJ Revans said:

I may have put another infinite loop somewhere

Yes you did in your y for loop in FindBlock.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

1 hour ago, JJ Revans said:

when I damage it it freezes like before

This sure sounds like a good place to start debugging.

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.

Link to comment
Share on other sites

Congrats! You know what function is the problem. Now debug that function.

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.

Link to comment
Share on other sites

So I believe the problem occurs when I run

        getNavigator().tryMoveToXYZ(nearestTree.getX() - 1, nearestTree.getY(), nearestTree.getZ() - 1, SPEED); // get to the tree

Is there a different function I should use, or is there another problem?

 

should I use 

getNavigator.getPathToXYZ();
getNavigator.setPath();

?

Edited by JJ Revans
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, I want to add more memory to the RunClient gradle task. I added VM options into the configurations and put in "-Xms256m -Xmx2048m" but it doesn't work.
    • Hello, I'm trying to modify the effects of native enchantments for bows and arrows in Minecraft. After using a decompilation tool, I found that the specific implementations of native bow and arrow enchantments (including `ArrowDamageEnchantment`, `ArrowKnockbackEnchantment`, `ArrowFireEnchantment`, `ArrowInfiniteEnchantment`, `ArrowPiercingEnchantment`) do not contain any information about the enchantment effects (such as the `getDamageProtection` function for `ProtectionEnchantment`, `getDamageBonus` function for `DamageEnchantment`, etc.). Upon searching for the base class of arrows, `AbstractArrow`, I found a function named setEnchantmentEffectsFromEntity`, which seems to be used to retrieve the enchantment levels of the tool held by a `LivingEntity` and calculate the specific values of the enchantment effects. However, after testing with the following code, I found that this function is not being called:   @Mixin(AbstractArrow.class) public class ModifyArrowEnchantmentEffects {     private static final Logger LOGGER = LogUtils.getLogger();     @Inject(         method = "setEnchantmentEffectsFromEntity",         at = @At("HEAD")     )     private void logArrowEnchantmentEffectsFromEntity(CallbackInfo ci) {         LOGGER.info("Arrow enchantment effects from entity");     } }   Upon further investigation, I found that within the onHitEntity method, there are several lines of code:               if (!this.level().isClientSide &amp;&amp; entity1 instanceof LivingEntity) {                EnchantmentHelper.doPostHurtEffects(livingentity, entity1);                EnchantmentHelper.doPostDamageEffects((LivingEntity)entity1, livingentity);             }   These lines of code actually call the doPostHurt and doPostAttack methods of each enchantment in the enchantment list. However, this leads back to the issue because native bow and arrow enchantments do not implement these functions. Although their base class defines the functions, they are empty. At this point, I'm completely stumped and seeking assistance. Thank you.
    • I have been trying to make a server with forge but I keep running into an issue. I have jdk 22 installed as well as Java 8. here is the debug file  
    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
  • Topics

×
×
  • Create New...

Important Information

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