Electroblob's Wizardry

Electroblob's Wizardry

18M Downloads

Mine spell drops untextured leaves

incarn opened this issue ยท 2 comments

commented

Please read the guide for contributing before posting.

Minecraft version: 1.12.2
Wizardry version: 4.2.11
Environment: Singleplayer and Server

Issue details:
Start new world. (creative)
Give master sorc wand
Give Mine spell book
give orb of the moon
Give Arcane workbench
add spell to wand.
make sure orb in inventory.
use on leaves.
About 75% of birch and oak leaves(thats all I tested) drop as the black and pink untextured blocks.
They don't stack with the 'proper' leaf blocks.

Wiz Mine with Orb of the Moon

Other mods involved: None. removed all other mods and started new world to test

commented

Looks like it is this code in Mine.java

// Copied from Block, where (for some reason) it's protected
private static ItemStack getSilkTouchDrop(IBlockState state){

	Item item = Item.getItemFromBlock(state.getBlock());
	int i = 0;

	if(item.getHasSubtypes()){
		i = state.getBlock().getMetaFromState(state);
	}

	return new ItemStack(item, 1, i);
}

If I disable the subtypes check and only ever return 0 the leaves are fine.
Not a fix of course as I imagine that would mess up all kinds of stuff. :)

commented

Ah yeah, I can see what's going on there. As the comment says, that code was copied from Block#getSilkTouchDrop(IBlockState), but looks like I didn't realise some blocks override it, leaves being one of them. Guess I'll have to reflect into it instead then ๐Ÿ™„