Jump to content

[1.7.2]Custom Bed doesn't reset Time in custom Dimension


Dragonisser

Recommended Posts

Well i made it so i can sleep in my custom bed in my custom dimension, but the world time doesn't reset to 0 or day, when i go to sleep(actually this works ~_~).

 

 

BlockCobaltBed

package cobaltmod.blocks;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Iterator;
import java.util.Random;

import cobaltmod.api.CMStuff;

import net.minecraft.block.Block;
import net.minecraft.block.BlockBed;
import net.minecraft.block.BlockDirectional;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.util.Direction;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;

public class BlockCobaltBed extends BlockBed
{
    public static final int[][] field_149981_a = new int[][] {{0, 1}, { -1, 0}, {0, -1}, {1, 0}};
    @SideOnly(Side.CLIENT)
    private IIcon[] field_149980_b;
    @SideOnly(Side.CLIENT)
    private IIcon[] field_149982_M;
    @SideOnly(Side.CLIENT)
    private IIcon[] field_149983_N;
    private static final String __OBFID = "CL_00000198";

    public BlockCobaltBed()
    {
        super();
        this.func_149978_e();
        this.disableStats();
    }

    /**
     * Called upon block activation (right click on the block.)
     */
    public boolean onBlockActivated(World p_149727_1_, int p_149727_2_, int p_149727_3_, int p_149727_4_, EntityPlayer p_149727_5_, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_)
    {
        if (p_149727_1_.isRemote)
        {
            return true;
        }
        else
        {
            int i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_);

            if (!isBlockHeadOfBed(i1))
            {
                int j1 = getDirection(i1);
                p_149727_2_ += field_149981_a[j1][0];
                p_149727_4_ += field_149981_a[j1][1];

                if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_, p_149727_4_) != this)
                {
                    return true;
                }

                i1 = p_149727_1_.getBlockMetadata(p_149727_2_, p_149727_3_, p_149727_4_);
            }

            if (p_149727_1_.provider.canRespawnHere() && p_149727_1_.getBiomeGenForCoords(p_149727_2_, p_149727_4_) != BiomeGenBase.hell)
            {
                if (func_149976_c(i1))
                {
                    EntityPlayer entityplayer1 = null;
                    Iterator iterator = p_149727_1_.playerEntities.iterator();

                    while (iterator.hasNext())
                    {
                        EntityPlayer entityplayer2 = (EntityPlayer)iterator.next();

                        if (entityplayer2.isPlayerSleeping())
                        {
                            ChunkCoordinates chunkcoordinates = entityplayer2.playerLocation;

                            if (chunkcoordinates.posX == p_149727_2_ && chunkcoordinates.posY == p_149727_3_ && chunkcoordinates.posZ == p_149727_4_)
                            {
                                entityplayer1 = entityplayer2;
                            }
                        }
                    }

                    if (entityplayer1 != null)
                    {
                        p_149727_5_.addChatComponentMessage(new ChatComponentTranslation("tile.bed.occupied", new Object[0]));
                        return true;
                    }

                    func_149979_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, false);
                }

                EntityPlayer.EnumStatus enumstatus = p_149727_5_.sleepInBedAt(p_149727_2_, p_149727_3_, p_149727_4_);

                if (enumstatus == EntityPlayer.EnumStatus.OK)
                {
                    func_149979_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, true);
                    return true;
                }
                else
                {
                    if (enumstatus == EntityPlayer.EnumStatus.NOT_POSSIBLE_NOW)
                    {
                        p_149727_5_.addChatComponentMessage(new ChatComponentTranslation("tile.bed.noSleep", new Object[0]));
                    }
                    else if (enumstatus == EntityPlayer.EnumStatus.NOT_SAFE)
                    {
                        p_149727_5_.addChatComponentMessage(new ChatComponentTranslation("tile.bed.notSafe", new Object[0]));
                    }

                    return true;
                }
            }
            else
            {
                double d2 = (double)p_149727_2_ + 0.5D;
                double d0 = (double)p_149727_3_ + 0.5D;
                double d1 = (double)p_149727_4_ + 0.5D;
                p_149727_1_.setBlockToAir(p_149727_2_, p_149727_3_, p_149727_4_);
                int k1 = getDirection(i1);
                p_149727_2_ += field_149981_a[k1][0];
                p_149727_4_ += field_149981_a[k1][1];

                if (p_149727_1_.getBlock(p_149727_2_, p_149727_3_, p_149727_4_) == this)
                {
                    p_149727_1_.setBlockToAir(p_149727_2_, p_149727_3_, p_149727_4_);
                    d2 = (d2 + (double)p_149727_2_ + 0.5D) / 2.0D;
                    d0 = (d0 + (double)p_149727_3_ + 0.5D) / 2.0D;
                    d1 = (d1 + (double)p_149727_4_ + 0.5D) / 2.0D;
                }

                p_149727_1_.newExplosion((Entity)null, (double)((float)p_149727_2_ + 0.5F), (double)((float)p_149727_3_ + 0.5F), (double)((float)p_149727_4_ + 0.5F), 5.0F, true, true);
                return true;
            }
        }
    }

    /**
     * Gets the block's texture. Args: side, meta
     */
    @SideOnly(Side.CLIENT)
    public IIcon getIcon(int p_149691_1_, int p_149691_2_)
    {
        if (p_149691_1_ == 0)
        {
            return Blocks.planks.getBlockTextureFromSide(p_149691_1_);
        }
        else
        {
            int k = getDirection(p_149691_2_);
            int l = Direction.bedDirection[k][p_149691_1_];
            int i1 = isBlockHeadOfBed(p_149691_2_) ? 1 : 0;
            return (i1 != 1 || l != 2) && (i1 != 0 || l != 3) ? (l != 5 && l != 4 ? this.field_149983_N[i1] : this.field_149982_M[i1]) : this.field_149980_b[i1];
        }
    }

    @SideOnly(Side.CLIENT)
    public void registerBlockIcons(IIconRegister p_149651_1_)
    {
        this.field_149983_N = new IIcon[] {p_149651_1_.registerIcon( "mod_cobalt:cobaltbed_f_t"), p_149651_1_.registerIcon("mod_cobalt:cobaltbed_h_t")};
        this.field_149980_b = new IIcon[] {p_149651_1_.registerIcon("mod_cobalt:cobaltbed_f_e"), p_149651_1_.registerIcon("mod_cobalt:cobaltbed_h_e")};
        this.field_149982_M = new IIcon[] {p_149651_1_.registerIcon("mod_cobalt:cobaltbed_f_s"), p_149651_1_.registerIcon("mod_cobalt:cobaltbed_h_s")};
    }

    /**
     * The type of render function that is called for this block
     */
    public int getRenderType()
    {
        return 14;
    }

    /**
     * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
     */
    public boolean renderAsNormalBlock()
    {
        return false;
    }

    /**
     * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
     * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
     */
    public boolean isOpaqueCube()
    {
        return false;
    }

    /**
     * Updates the blocks bounds based on its current state. Args: world, x, y, z
     */
    public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
    {
        this.func_149978_e();
    }

    /**
     * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are
     * their own) Args: x, y, z, neighbor Block
     */
    public void onNeighborBlockChange(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
    {
        int l = p_149695_1_.getBlockMetadata(p_149695_2_, p_149695_3_, p_149695_4_);
        int i1 = getDirection(l);

        if (isBlockHeadOfBed(l))
        {
            if (p_149695_1_.getBlock(p_149695_2_ - field_149981_a[i1][0], p_149695_3_, p_149695_4_ - field_149981_a[i1][1]) != this)
            {
                p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_);
            }
        }
        else if (p_149695_1_.getBlock(p_149695_2_ + field_149981_a[i1][0], p_149695_3_, p_149695_4_ + field_149981_a[i1][1]) != this)
        {
            p_149695_1_.setBlockToAir(p_149695_2_, p_149695_3_, p_149695_4_);

            if (!p_149695_1_.isRemote)
            {
                this.dropBlockAsItem(p_149695_1_, p_149695_2_, p_149695_3_, p_149695_4_, l, 0);
            }
        }
    }

    public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
    {
        /**
         * Returns whether or not this bed block is the head of the bed.
         */
        return isBlockHeadOfBed(p_149650_1_) ? Item.getItemById(0) : Items.bed;
    }

    private void func_149978_e()
    {
        this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5625F, 1.0F);
    }

    /**
     * Returns whether or not this bed block is the head of the bed.
     */
    public static boolean isBlockHeadOfBed(int p_149975_0_)
    {
        return (p_149975_0_ &  != 0;
    }

    public static boolean func_149976_c(int p_149976_0_)
    {
        return (p_149976_0_ & 4) != 0;
    }

    public static void func_149979_a(World p_149979_0_, int p_149979_1_, int p_149979_2_, int p_149979_3_, boolean p_149979_4_)
    {
        int l = p_149979_0_.getBlockMetadata(p_149979_1_, p_149979_2_, p_149979_3_);

        if (p_149979_4_)
        {
            l |= 4;
        }
        else
        {
            l &= -5;
        }

        p_149979_0_.setBlockMetadataWithNotify(p_149979_1_, p_149979_2_, p_149979_3_, l, 4);
    }

    public static ChunkCoordinates func_149977_a(World p_149977_0_, int p_149977_1_, int p_149977_2_, int p_149977_3_, int p_149977_4_)
    {
        int i1 = p_149977_0_.getBlockMetadata(p_149977_1_, p_149977_2_, p_149977_3_);
        int j1 = BlockDirectional.getDirection(i1);

        for (int k1 = 0; k1 <= 1; ++k1)
        {
            int l1 = p_149977_1_ - field_149981_a[j1][0] * k1 - 1;
            int i2 = p_149977_3_ - field_149981_a[j1][1] * k1 - 1;
            int j2 = l1 + 2;
            int k2 = i2 + 2;

            for (int l2 = l1; l2 <= j2; ++l2)
            {
                for (int i3 = i2; i3 <= k2; ++i3)
                {
                    if (World.doesBlockHaveSolidTopSurface(p_149977_0_, l2, p_149977_2_ - 1, i3) && !p_149977_0_.getBlock(l2, p_149977_2_, i3).getMaterial().isOpaque() && !p_149977_0_.getBlock(l2, p_149977_2_ + 1, i3).getMaterial().isOpaque())
                    {
                        if (p_149977_4_ <= 0)
                        {
                            return new ChunkCoordinates(l2, p_149977_2_, i3);
                        }

                        --p_149977_4_;
                    }
                }
            }
        }

        return null;
    }

    /**
     * Drops the block items with a specified chance of dropping the specified items
     */
    public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
    {
        if (!isBlockHeadOfBed(p_149690_5_))
        {
            super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, 0);
        }
    }

    /**
     * Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility
     * and stop pistons
     */
    public int getMobilityFlag()
    {
        return 1;
    }

    /**
     * Gets an item for the block being called on. Args: world, x, y, z
     */
    @SideOnly(Side.CLIENT)
    public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_)
    {
        return CMStuff.cobaltbed1;
    }

    /**
     * Called when the block is attempted to be harvested
     */
    public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_)
    {
        if (p_149681_6_.capabilities.isCreativeMode && isBlockHeadOfBed(p_149681_5_))
        {
            int i1 = getDirection(p_149681_5_);
            p_149681_2_ -= field_149981_a[i1][0];
            p_149681_4_ -= field_149981_a[i1][1];

            if (p_149681_1_.getBlock(p_149681_2_, p_149681_3_, p_149681_4_) == this)
            {
                p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_, p_149681_4_);
            }
        }
    }
    public boolean isBed(IBlockAccess world, int x, int y, int z, EntityLivingBase player)
    {
        return this == CMStuff.cobaltbed;
    }
}

 

 

WorldProvider

package cobaltmod.dimension;

import cobaltmod.main.mod_cobalt;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.chunk.IChunkProvider;

public class WorldProviderCobalt extends WorldProvider 
{
public void registerWorldChunkManager() 
{
	this.worldChunkMgr = new WorldChunkManagerCobalt(mod_cobalt.biomeplains, 0.8F);
	this.dimensionId = mod_cobalt.cobaltdimension;
}

public String getDimensionName()
{
	return "Cobaltis";
}

@Override
public IChunkProvider createChunkGenerator() 
{
	return new ChunkProviderCobalt(worldObj, worldObj.getSeed(), true);
}

public String getSaveFolder() 
{
	return "Cobaltis";
}
public boolean isSurfaceWorld()
    {
        return true;
    }
public boolean canRespawnHere()
    {
        return true;
    }
}

 

 

And yes it's just copy paste of the normal Bed.

 

 

I've put this in the Code. It works like the normal bed, but it isn't the best solution.

 

if (enumstatus == EntityPlayer.EnumStatus.OK)
                {
                    func_149979_a(p_149727_1_, p_149727_2_, p_149727_3_, p_149727_4_, true);
                    System.out.println("WIIIIIIIIIIIIIIIIIIIIIIIH");
                    for (int zeit = 0; zeit < 1000000; ++zeit)
                    {
                    	System.out.println(zeit);
                    	for (int j = 0; j < MinecraftServer.getServer().worldServers.length; ++j)
                    	{
                    		MinecraftServer.getServer().worldServers[j].setWorldTime(0);
                    	}
                    }
                    return true;
                    
                }

Link to comment
Share on other sites

Hi

 

The resetting of time when all players are sleeping is in WorldServer.tick()

 

        if (this.areAllPlayersAsleep())

        {

            if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle"))

            {

                long i = this.worldInfo.getWorldTime() + 24000L;

                this.worldInfo.setWorldTime(i - i % 24000L);

            }

 

            this.wakeAllPlayers();

        }

 

-TGG

Link to comment
Share on other sites

Well i made it so i can sleep in my custom bed in my custom dimension, but the world time doesn't reset to 0 or day, when i go to sleep(actually this works ~_~).

 

World time...do you want to have an independent time for your dimension?

 

EDIT: wait, can you use the normal bed in your dimension?

Here could be your advertisement!

Link to comment
Share on other sites

Well i made it so i can sleep in my custom bed in my custom dimension, but the world time doesn't reset to 0 or day, when i go to sleep(actually this works ~_~).

 

World time...do you want to have an independent time for your dimension?

 

EDIT: wait, can you use the normal bed in your dimension?

 

No the normal bed doesn't work either.

Link to comment
Share on other sites

Ok, i'm very intersted in that last reply.

 

Can you have a unique time for a custom dimension.  I tried and couldn't figure it out.  If you know how, please share.

Long time Bukkit & Forge Programmer

Happy to try and help

Link to comment
Share on other sites

Hi

 

Look in EntityPlayer.sleepInBedAt

 

    public EnumStatus sleepInBedAt(int par1, int par2, int par3)

    {

        PlayerSleepInBedEvent event = new PlayerSleepInBedEvent(this, par1, par2, par3);

        MinecraftForge.EVENT_BUS.post(event);

        if (event.result != null)

        {

            return event.result;

        }

        if (!this.worldObj.isRemote)

        {

            if (this.isPlayerSleeping() || !this.isEntityAlive())

            {

                return EnumStatus.OTHER_PROBLEM;

            }

 

            if (!this.worldObj.provider.isSurfaceWorld())

            {

                return EnumStatus.NOT_POSSIBLE_HERE;

            }

 

            if (this.worldObj.isDaytime())

            {

                return EnumStatus.NOT_POSSIBLE_NOW;

            }

 

-TGG

 

Link to comment
Share on other sites

Hi

 

Look in EntityPlayer.sleepInBedAt

 

    public EnumStatus sleepInBedAt(int par1, int par2, int par3)

    {

        PlayerSleepInBedEvent event = new PlayerSleepInBedEvent(this, par1, par2, par3);

        MinecraftForge.EVENT_BUS.post(event);

        if (event.result != null)

        {

            return event.result;

        }

        if (!this.worldObj.isRemote)

        {

            if (this.isPlayerSleeping() || !this.isEntityAlive())

            {

                return EnumStatus.OTHER_PROBLEM;

            }

 

            if (!this.worldObj.provider.isSurfaceWorld())

            {

                return EnumStatus.NOT_POSSIBLE_HERE;

            }

 

            if (this.worldObj.isDaytime())

            {

                return EnumStatus.NOT_POSSIBLE_NOW;

            }

 

-TGG

 

This doesn't change anything. The normal bed doesn't work either even when my Dimension is SurfaceWorld and canRespawnHere true.

 

The sleeping animation works, but the time doesn't reset. 

Link to comment
Share on other sites

Hmmm

 

so - your symptoms are

(1) you can sleep in a bed, you lie down, close your eyes etc, then wake up; but

(2) the time isn't reset to zero (how can you tell)?

 

Did you try putting a breakpoint in here

 

        if (this.areAllPlayersAsleep())

        {

          if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle"))  /// HERE

            {

                long i = this.worldInfo.getWorldTime() + 24000L;

                this.worldInfo.setWorldTime(i - i % 24000L);

            }

 

            this.wakeAllPlayers();

        }

 

-TGG

Link to comment
Share on other sites

Using worldinfo sets just that dimension time?  When i tried to play with it, it set all dimension times, but maybe I screwed it up.

 

No it reset the time in all dimension. I didn't say that it reset only the time of my dimension.

 

Hmmm

 

so - your symptoms are

(1) you can sleep in a bed, you lie down, close your eyes etc, then wake up; but

(2) the time isn't reset to zero (how can you tell)?

 

Did you try putting a breakpoint in here

 

        if (this.areAllPlayersAsleep())

        {

          if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle"))  /// HERE

            {

                long i = this.worldInfo.getWorldTime() + 24000L;

                this.worldInfo.setWorldTime(i - i % 24000L);

            }

 

            this.wakeAllPlayers();

        }

 

-TGG

 

Yeah these are the Symptoms

 

Found the problem:

 

if (this.worldServers[0].areAllPlayersAsleep())
                    {
                        this.tick();
                        l = 0L;
                    }

 

It's in the MinecraftServer.java. And it's only work for the World 0 = Normal World

Link to comment
Share on other sites

if (this.worldServers[0].areAllPlayersAsleep())
                    {
                        this.tick();
                        l = 0L;
                    }

 

It's in the MinecraftServer.java. And it's only work for the World 0 = Normal World

 

Are you sure?  That's just the tick loop; it counts the elapsed milliseconds and performs a tick every 50ms.  I don't think it has anything to do with the world time?

 

-TGG

Link to comment
Share on other sites

if (this.worldServers[0].areAllPlayersAsleep())
                    {
                        this.tick();
                        l = 0L;
                    }

 

It's in the MinecraftServer.java. And it's only work for the World 0 = Normal World

 

Are you sure?  That's just the tick loop; it counts the elapsed milliseconds and performs a tick every 50ms.  I don't think it has anything to do with the world time?

 

-TGG

 

hmm, but the code in WorldServer.java never gets called

 

if (this.areAllPlayersAsleep())
        {
           if (this.getGameRules().getGameRuleBooleanValue("doDaylightCycle"))   /// HERE
            {
                long i = this.worldInfo.getWorldTime() + 24000L;
                this.worldInfo.setWorldTime(i - i % 24000L);
            }

            this.wakeAllPlayers();
        }

Link to comment
Share on other sites

> hmm, but the code in WorldServer.java never gets called

 

Interesting;

 

I'd suggest you go digging through the vanilla with breakpoints and/or System.out.println and see if you can figure out why that never gets called.  A good place to start is probably

EntityPlayer.sleepInBedAt.  I don't see an obvious reason myself, sorry....

 

-TGG

 

Link to comment
Share on other sites

> hmm, but the code in WorldServer.java never gets called

 

Interesting;

 

I'd suggest you go digging through the vanilla with breakpoints and/or System.out.println and see if you can figure out why that never gets called.  A good place to start is probably

EntityPlayer.sleepInBedAt.  I don't see an obvious reason myself, sorry....

 

-TGG

 

Well, i simply use my method i mention above, because it works like a normal bed. Then i write some mystery lore about my bed, that it is the only way to sleep here, etc. :P

 

Thanks anyway ^^

Link to comment
Share on other sites

I think this is complicated a bit,

since if that is accepted, the time of every dimensions changes when everyone in the one dimension sleeps.

You might as well use the event.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

A nice addition to the time functionality would be to have two types of dimensions, synced and time-independent. Synced would check for players asleep in all synced dimensions and reset the synced clock to daytime. Time-independent would check for players all sleeping in that dimension and reset the independent clock in that dimension only.

This allows great flexibility.

Link to comment
Share on other sites

Before making a pullrequest or something, think about the ways to solve this problem now.

you can use the PlayerSleepInBedEvent to control the case and reset the tick.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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

    • Use Java 17 instead of java 21
    • By the way, the server says it pauses after it tells me done, I don't understand why.
    • C:\Users\Wil_Enp\Desktop\1>REM Forge requires a configured set of both JVM and program arguments. C:\Users\Wil_Enp\Desktop\1>REM Add custom JVM arguments to the user_jvm_args.txt C:\Users\Wil_Enp\Desktop\1>REM Add custom program arguments {such as nogui} to this file in the next line before the  or C:\Users\Wil_Enp\Desktop\1>REM  pass them to this script directly C:\Users\Wil_Enp\Desktop\1>java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.18.2-40.2.18/win_args.txt 2024-04-28 13:58:58,840 main WARN Advanced terminal features are not available in this environment [13:58:59] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 40.2.18, --fml.mcVersion, 1.18.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220404.173914] [13:58:59] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 9.1.3+9.1.3+main.9b69c82a starting: java version 21.0.2 by BellSoft [13:58:59] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/Wil_Enp/Desktop/1/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2314!/ Service=ModLauncher Env=SERVER [13:58:59] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\Wil_Enp\Desktop\1\libraries\net\minecraftforge\fmlcore\1.18.2-40.2.18\fmlcore-1.18.2-40.2.18.jar is missing mods.toml file [13:58:59] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\Wil_Enp\Desktop\1\libraries\net\minecraftforge\javafmllanguage\1.18.2-40.2.18\javafmllanguage-1.18.2-40.2.18.jar is missing mods.toml file [13:58:59] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\Wil_Enp\Desktop\1\libraries\net\minecraftforge\lowcodelanguage\1.18.2-40.2.18\lowcodelanguage-1.18.2-40.2.18.jar is missing mods.toml file [13:58:59] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file C:\Users\Wil_Enp\Desktop\1\libraries\net\minecraftforge\mclanguage\1.18.2-40.2.18\mclanguage-1.18.2-40.2.18.jar is missing mods.toml file [13:58:59] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: No dependencies to load found. Skipping! [13:59:00] [main/INFO] [cp.mo.mo.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeserver' with arguments [] [13:59:09] [modloading-worker-0/INFO] [ne.mi.co.ForgeMod/FORGEMOD]: Forge mod loading, version 40.2.18, for MC 1.18.2 with MCP 20220404.173914 [13:59:09] [modloading-worker-0/INFO] [ne.mi.co.MinecraftForge/FORGE]: MinecraftForge v40.2.18 Initialized [13:59:11] [main/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Configuration file C:\Users\Wil_Enp\Desktop\1\config\forge-common.toml is not correct. Correcting [13:59:11] [main/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key general was corrected from null to its default, SimpleCommentedConfig:{}. [13:59:11] [main/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key general.defaultWorldType was corrected from null to its default, default. [13:59:12] [Forge Version Check/INFO] [ne.mi.fm.VersionChecker/]: [forge] Starting version check at https://files.minecraftforge.net/net/minecraftforge/forge/promotions_slim.json [13:59:14] [Forge Version Check/INFO] [ne.mi.fm.VersionChecker/]: [forge] Found status: AHEAD Current: 40.2.18 Target: null [13:59:15] [main/ERROR] [minecraft/Settings]: Failed to load properties from file: server.properties [13:59:15] [main/INFO] [mojang/YggdrasilAuthenticationService]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD' [13:59:15] [main/WARN] [minecraft/VanillaPackResources]: Assets URL 'union:/C:/Users/Wil_Enp/Desktop/1/libraries/net/minecraft/server/1.18.2-20220404.173914/server-1.18.2-20220404.173914-srg.jar%2341!/assets/.mcassetsroot' uses unexpected schema [13:59:15] [main/WARN] [minecraft/VanillaPackResources]: Assets URL 'union:/C:/Users/Wil_Enp/Desktop/1/libraries/net/minecraft/server/1.18.2-20220404.173914/server-1.18.2-20220404.173914-srg.jar%2341!/data/.mcassetsroot' uses unexpected schema [13:59:20] [main/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [13:59:20] [main/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0] [13:59:20] [main/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, destination] and [teleport, targets] with inputs: [Player, 0123, @e, dd12be42-52a9-4a91-a8a1-11c01849e498] [13:59:20] [main/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498] [13:59:21] [main/WARN] [minecraft/Commands]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0] [13:59:23] [Worker-Main-18/INFO] [minecraft/RecipeManager]: Loaded 7 recipes [13:59:26] [Worker-Main-18/INFO] [minecraft/AdvancementList]: Loaded 1141 advancements [13:59:27] [Server thread/INFO] [minecraft/DedicatedServer]: Starting minecraft server version 1.18.2 [13:59:27] [Server thread/INFO] [minecraft/DedicatedServer]: Loading properties [13:59:27] [Server thread/INFO] [minecraft/DedicatedServer]: Default game type: SURVIVAL [13:59:27] [Server thread/INFO] [minecraft/MinecraftServer]: Generating keypair [13:59:27] [Server thread/INFO] [minecraft/DedicatedServer]: Starting Minecraft server on *:25565 [13:59:27] [Server thread/INFO] [minecraft/ServerConnectionListener]: Using default channel type [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Configuration file .\world\serverconfig\forge-server.toml is not correct. Correcting [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server was corrected from null to its default, SimpleCommentedConfig:{}. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.removeErroringBlockEntities was corrected from null to its default, false. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.removeErroringEntities was corrected from null to its default, false. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.fullBoundingBoxLadders was corrected from null to its default, false. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.zombieBaseSummonChance was corrected from null to its default, 0.1. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.zombieBabyChance was corrected from null to its default, 0.05. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.treatEmptyTagsAsAir was corrected from null to its default, false. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.skipEmptyShapelessCheck was corrected from null to its default, true. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.fixAdvancementLoading was corrected from null to its default, true. [13:59:27] [Server thread/WARN] [ne.mi.co.ForgeConfigSpec/CORE]: Incorrect key server.permissionHandler was corrected from null to its default, forge:default_handler. [13:59:27] [Server thread/INFO] [minecraft/DedicatedServer]: Preparing level "world" [13:59:31] [Server thread/INFO] [minecraft/MinecraftServer]: Preparing start region for dimension minecraft:overworld [13:59:32] [Worker-Main-24/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 0% [13:59:32] [Worker-Main-22/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 0% [13:59:32] [Worker-Main-27/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 0% [13:59:33] [Worker-Main-28/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 1% [13:59:33] [Worker-Main-18/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 4% [13:59:34] [Worker-Main-29/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 6% [13:59:34] [Worker-Main-16/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 9% [13:59:35] [Worker-Main-29/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 12% [13:59:35] [Worker-Main-19/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 15% [13:59:36] [Worker-Main-26/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 19% [13:59:36] [Worker-Main-30/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 24% [13:59:37] [Worker-Main-19/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 30% [13:59:37] [Worker-Main-23/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 33% [13:59:38] [Worker-Main-20/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 39% [13:59:38] [Worker-Main-26/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 44% [13:59:39] [Worker-Main-18/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 49% [13:59:39] [Worker-Main-26/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 54% [13:59:40] [Worker-Main-30/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 58% [13:59:40] [Worker-Main-30/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 63% [13:59:41] [Worker-Main-23/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 68% [13:59:41] [Worker-Main-16/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 72% [13:59:42] [Worker-Main-29/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 77% [13:59:42] [Worker-Main-16/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 84% [13:59:43] [Worker-Main-19/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 88% [13:59:43] [Worker-Main-24/INFO] [minecraft/LoggerChunkProgressListener]: Preparing spawn area: 93% [13:59:44] [Server thread/INFO] [minecraft/LoggerChunkProgressListener]: Time elapsed: 12446 ms [13:59:44] [Server thread/INFO] [minecraft/DedicatedServer]: Done (16.942s)! For help, type "help" [13:59:44] [Server thread/INFO] [ne.mi.se.pe.PermissionAPI/]: Successfully initialized permission handler forge:default_handler stop [13:59:53] [Server thread/INFO] [minecraft/DedicatedServer]: Stopping the server [13:59:53] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [13:59:53] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [13:59:53] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [13:59:53] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [13:59:54] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [13:59:54] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [13:59:54] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [13:59:54] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [13:59:54] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [13:59:54] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved C:\Users\Wil_Enp\Desktop\1>pause Press any key to continue . . .     I've been trying to solve this for days, what is the error?
    • Add crash-reports with sites like https://paste.ee/ and paste the link to it here There is an issue with spectrelib - try other builds or remove this mod and the mods requiring it
  • Topics

×
×
  • Create New...

Important Information

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