Jump to content

Recommended Posts

Posted

Hello, been a while since I've been here, took quite the break from Forge.  Anyways, I am attempting to create a custom dimension and upon the player entering, the game crashes as it tries to tick the world's entities.

 

Spoiler

---- Minecraft Crash Report ----
// I'm sorry, Dave.

Time: 1/25/18 10:59 AM
Description: Exception ticking world entities

java.lang.IndexOutOfBoundsException: Index: 23, Size: 23
    at java.util.ArrayList.rangeCheck(Unknown Source)
    at java.util.ArrayList.remove(Unknown Source)
    at net.minecraft.world.World.updateEntities(World.java:1969)
    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:642)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:840)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
    at java.lang.Thread.run(Unknown Source)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
    at java.util.ArrayList.rangeCheck(Unknown Source)
    at java.util.ArrayList.remove(Unknown Source)
    at net.minecraft.world.World.updateEntities(World.java:1969)
    at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:642)

-- Affected level --
Details:
    Level name: New World
    All players: 0 total; []
    Chunk stats: ServerChunkCache: 625 Drop: 625
    Level seed: 2829564701002734721
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options: 
    Level spawn location: World: (0,0,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 0 game time, 0 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:840)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590)
    at java.lang.Thread.run(Unknown Source)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_121, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 757140896 bytes (722 MB) / 1391460352 bytes (1327 MB) up to 3797417984 bytes (3621 MB)
    JVM Flags: 0 total; 
    IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
    FML: MCP 9.42 Powered by Forge 14.23.1.2555 5 mods loaded, 5 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

    | State     | ID         | Version      | Source                           | Signature |
    |:--------- |:---------- |:------------ |:-------------------------------- |:--------- |
    | UCHIJAAAA | minecraft  | 1.12.2       | minecraft.jar                    | None      |
    | UCHIJAAAA | mcp        | 9.42         | minecraft.jar                    | None      |
    | UCHIJAAAA | FML        | 8.0.99.99    | forgeSrc-1.12.2-14.23.1.2555.jar | None      |
    | UCHIJAAAA | forge      | 14.23.1.2555 | forgeSrc-1.12.2-14.23.1.2555.jar | None      |
    | UCHIJAAAA | enderrifts | 0.0.1        | bin                              | None      |

    Loaded coremods (and transformers): 
    GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    Profiler Position: N/A (disabled)
    Player Count: 1 / 8; [EntityPlayerMP['Selim_042'/248, l='New World', x=-274.80, y=63.40, z=176.65]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fml,forge'
[10:59:22] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2018-01-25_10.59.18-server.txt
AL lib: (EE) alc_cleanup: 1 device not closed

 

 

I'm happy to post any code that might be necessary.  Thank you for the help and I am glad to be back!

Posted
2 hours ago, Selim_042 said:

I'm happy to post any code that might be necessary.  Thank you for the help and I am glad to be back!

The number of situations where your code isn't necessary numbers precisely zero.

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

 

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

 

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

Posted

DimensionRift:

Spoiler

public class DimensionRift {

	public static final int DIMENSION_ID = DimensionManager.getNextFreeDimId();
	public static final String DIMENSION_NAME = "Rift Dimension";
	public static final DimensionType DIMENSION_TYPE = DimensionType.register(
			DIMENSION_NAME.toUpperCase(), "_" + DIMENSION_NAME.toLowerCase(), DIMENSION_ID,
			WorldProviderRift.class, false);

	public static void mainRegistry() {
		DimensionManager.registerDimension(DIMENSION_ID, DimensionRift.DIMENSION_TYPE);
	}

	public static boolean isTestDimension(World world) {
		return isTestDimension(world.provider.getDimension());
	}

	public static boolean isTestDimension(int id) {
		return id == DimensionRift.DIMENSION_ID;
	}
}

 

 

ChunkGeneratorRift:

Spoiler

public class ChunkGeneratorRift implements IChunkGenerator {

	private World world;

	public ChunkGeneratorRift(World world) {
		world.setSeaLevel(0);
		this.world = world;
	}

	@Override
	public Chunk generateChunk(int x, int z) {
		ChunkPrimer chunkprimer = new ChunkPrimer();
		Chunk chunk = new Chunk(this.world, chunkprimer, x, z);
		Biome biomeRift = new BiomeRift();
		byte[] abyte = chunk.getBiomeArray();

		for (int l = 0; l < abyte.length; ++l) {
			abyte[l] = (byte) Biome.getIdForBiome(biomeRift);
		}

		chunk.generateSkylightMap();
		return chunk;
	}

	@Override
	public void populate(int x, int z) {}

	@Override
	public boolean generateStructures(Chunk chunkIn, int x, int z) {
		return false;
	}

	@Override
	public List<SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos) {
		return new ArrayList<SpawnListEntry>();
	}

	@Override
	public void recreateStructures(Chunk chunkIn, int x, int z) {}

	@Override
	public BlockPos getNearestStructurePos(World worldIn, String structureName, BlockPos position,
			boolean findUnexplored) {
		return null;
	}

	@Override
	public boolean isInsideStructure(World worldIn, String structureName, BlockPos pos) {
		return false;
	}

}

WorldProviderRift:

Spoiler


public class WorldProviderRift extends WorldProvider {

	@Override
	public IChunkGenerator createChunkGenerator() {
		// return new TestDimensionChunkGenerator(this.worldObj,
		// this.getDimension(), false);
		return new ChunkGeneratorRift(this.world);
	}

	@Override
	public boolean isSurfaceWorld() {
		return false;
	}

	@Override
	public boolean canRespawnHere() {
		return true;
	}

	@Override
	public int getRespawnDimension(EntityPlayerMP player) {
		// return DimensionRift.DIMENSION_ID;
		return 0; // overworld
	}

	@Override
	public Biome getBiomeForCoords(BlockPos pos) {
		return new BiomeRift();
	}

	@Override
	public DimensionType getDimensionType() {
		// return DimensionRift.DIMENSION_TYPE;
		return DimensionType.OVERWORLD;
	}

}

 

 

 

 

 

Posted

WorldProviderRift:

Spoiler

public class WorldProviderRift extends WorldProvider {

	@Override
	public IChunkGenerator createChunkGenerator() {
		// return new TestDimensionChunkGenerator(this.worldObj,
		// this.getDimension(), false);
		return new ChunkGeneratorRift(this.world);
	}

	@Override
	public boolean isSurfaceWorld() {
		return false;
	}

	@Override
	public boolean canRespawnHere() {
		return true;
	}

	@Override
	public int getRespawnDimension(EntityPlayerMP player) {
		// return DimensionRift.DIMENSION_ID;
		return 0; // overworld
	}

	@Override
	public Biome getBiomeForCoords(BlockPos pos) {
		return new BiomeRift();
	}

	@Override
	public DimensionType getDimensionType() {
		// return DimensionRift.DIMENSION_TYPE;
		return DimensionType.OVERWORLD;
	}

}

 

 

 

Posted

Well, it seems like you are quite out of luck in terms of getting help here, it seems.
A friend of mine referred this to me, because he was wondering about some of the terms in your classes; the word "Rift" in particular.

 

You see, I am one of the developers of the 1.12+ port of Dimensional Doors, a mod which is almost completely about "rifts" and their ability to be used as a (teleportation) shortcut to get from point A to point B in no-time, possibly inter-dimensionally.
If you would like to, you could come to our Discord server and state your case and problem there. We'd love it if you'd want to explain the idea behind your mod to us and we hope we can help you.
Also feel free to take a look at our Github. :)

I walk amongst titans.

Posted

So your code generates a totally empty dimension, right? At least I didn't see anywhere where you generated blocks. Just checking if that is what you intended. 

 

Also, I'm assuming that your registration code is called properly from somewhere.

 

You didn't create a new WorldType. Don't know if that is a problem, as I usually do a new world type along with my new dimensions. How is the player entering your dimension?

 

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Posted
1 hour ago, jabelar said:

So your code generates a totally empty dimension, right? At least I didn't see anywhere where you generated blocks. Just checking if that is what you intended. 

 

Also, I'm assuming that your registration code is called properly from somewhere.

 

You didn't create a new WorldType. Don't know if that is a problem, as I usually do a new world type along with my new dimensions. How is the player entering your dimension?

 

Yep, it is meant to generate an empty dimension.

 

Everything is registered.

 

It isn't a problem as this is now resolved, but now I have an issue with the server and client disagreeing on what dimension the player is in (or that is what I think it is).  Entities from the previous dimension are still being send to the client along with any block updates.

 

Previously (with the above code) the player was entering with an ender pearl, now they are entering with a block right click.

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



×
×
  • Create New...

Important Information

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