Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite recursion when loading world #260

Open
E14 opened this issue Oct 3, 2018 · 4 comments
Open

Infinite recursion when loading world #260

E14 opened this issue Oct 3, 2018 · 4 comments

Comments

@E14
Copy link

E14 commented Oct 3, 2018

Minecraft crashes apparently due to infinite recursion when loading the world... I may have been rotating secret gate blocks with an EnderIO Wrench when the client first crashed...

Optifine?: No
Does adding/removing Optifine affect the issue?: Not tested
Modpack: FTB Revelation
Crash log: https://paste.feed-the-beast.com/view/5781983c
Crash log excerpt:

// I blame Dinnerbone.

Time: 10/3/18 9:32 PM
Description: Exception while updating neighbours

java.lang.StackOverflowError: Exception while updating neighbours
	at net.minecraft.world.World.func_189509_E(World.java:224)
	at net.minecraft.world.World.func_175625_s(World.java:2381)
	at com.wynprice.secretroomsmod.base.interfaces.ISecretTileEntity.getMirrorState(ISecretTileEntity.java:108)
	at com.wynprice.secretroomsmod.base.interfaces.ISecretBlock.getState(ISecretBlock.java:70)
	at com.wynprice.secretroomsmod.blocks.SecretGate.destroyGate(SecretGate.java:109)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:97)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
	at com.wynprice.secretroomsmod.blocks.SecretGate.deactivateGate(SecretGate.java:100)
        (...)
@Wyn-Price
Copy link
Collaborator

This is a known issue. Im working on getting time to work on this mod. Once then ill fix this.

@E14
Copy link
Author

E14 commented Oct 3, 2018

I completely understand.
Just so I may be able to avoid the issue - did this happen due to rotating the block while extended? I think that was the last thing I did.

Reference:

protected void deactivateGate(World worldIn, BlockPos pos)
{
BlockPos position = destroyGate(worldIn, pos, worldIn.getBlockState(pos));
EnumFacing direction = worldIn.getBlockState(pos).getValue(FACING);
if(worldIn.getBlockState(position).getBlock() == this) {
deactivateGate(worldIn, position);
}
worldIn.setBlockState(pos, this.getDefaultState().withProperty(FACING, direction).withProperty(POWERED, false));
}
protected BlockPos destroyGate(World worldIn, BlockPos pos, IBlockState blockstate)
{
EnumFacing direction = blockstate.getValue(FACING);
IBlockState state = getState(worldIn, pos);
BlockPos endPosition = new BlockPos(pos.getX() + ((MAX_LEVELS + 1) * direction.getFrontOffsetX()), pos.getY() + ((MAX_LEVELS + 1) * direction.getFrontOffsetY()), pos.getZ() + ((MAX_LEVELS + 1) * direction.getFrontOffsetZ()));
for(int i = 1; i < MAX_LEVELS + 1; i++)
{
BlockPos position = new BlockPos(pos.getX() + (i * direction.getFrontOffsetX()), pos.getY() + (i * direction.getFrontOffsetY()), pos.getZ() + (i * direction.getFrontOffsetZ()));
if(worldIn.getBlockState(position).getBlock() == SecretBlocks.SECRET_GATE_BLOCK)
worldIn.setBlockToAir(position);
else
return position;
}
((ISecretTileEntity)worldIn.getTileEntity(pos)).setMirrorState(state);
return endPosition;
}

@Wyn-Price
Copy link
Collaborator

Possibly. If you can reload the world, just try not to do that. Ill try and work on a fix soon

@E14
Copy link
Author

E14 commented Oct 3, 2018

Yes, I was able to load the world in mcedit and delete the gate blocks :) (World loads fine afterward)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants