Scavenge

Scavenge

2M Downloads

Property require_tile_items crashes the game.

xt9 opened this issue ยท 3 comments

commented

JSON file: https://pastebin.com/Gvvnq4JY
Crash report: https://pastebin.com/xHHq34XQ

Latest Scavenge version, I have only tried this on the Thaumcraft pedestals so far so I'm not aware if it's an issue with all TE's or just this one.

commented

This is a thaumcraft bug. Because the function that crashes is the function to find out how many slots it has.

		TileEntity tile = world.getTileEntity(pos);
		if(tile == null || !tile.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null))
		{
			return false;
		}
		IItemHandler handler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
		List<StackObject> toCheck = new ArrayList<StackObject>(list.size());
		for(StackObject obj : list)
		{
			toCheck.add(obj);
		}
		int count = handler.getSlots(); // << this line crashes because of thaumcraft

You can show this code to Azanor that should provide him with everything that he needs to know.
Basically the "Null" side should be the Inventory that shows read access to all known slots, but even if it is only readonly access this should be still not crashing here.

commented

Yeah the norm is for sure letting null access all capabilities. Could you perhaps let the require_tile_items property specify a side aswell so you can try the other sides when null fails because the mod in question did not handle capabilities correctly?

Anyways it's cool that the issues is not on the Scavenge side of things. I've really enjoyed playing around with it and its incredibly versatile.

commented

sadly not right now.

Yeah but it could be so much more modular written. Its pretty bad written right now.