Draw Bridge

Draw Bridge

445k Downloads

[1.14.4] Drawbridge Render as non-full block

NielsPilgaard opened this issue ยท 4 comments

commented

Describe the bug
using the drawerbridge, there is a slot for the block to render as another to blend in with the rest of your base, but as you can see if its not a full block it allows x-ray

Additionally, placing a complex block as the render block can crash you - It does with a Wire from the mod Silent Mechanisms. Crash-report at the bottom.

To Reproduce
Steps to reproduce the behavior:

  1. Place Drawbridge
  2. Give it a torch as a render item
  3. See-through drawbridge

Expected behavior
For the Drawbridge to reject/not accept the item, or otherwise indicate that it should not be used. Maybe default to normal Drawbridge render.

Screenshots
Screenshot

Versions

  • Minecraft Version 1.14.4
  • Forge Version 28.1.39
  • UTeamCore Version 1.14.4-2.7.4.134

Log (if crash occures)
https://gist.github.com/NillerMedDild/9bbd31a0abf3aeea8374d42927659342

commented

This shouldn't happen as you shouldn't be able to put in a torch in the first place in the first place.
I am investigating this.

Cheers
~MrTroble

commented

This is a bug, that I have cause by not checking for the right properties.
Currently we only check if the block is solid:

public boolean isItemValid(int index, ItemStack stack) {
final Item item = stack.getItem();
if (!(item instanceof BlockItem) || item == DrawBridgeBlocks.DRAW_BRIDGE.asItem()) {
return false;
}
final Block block = ((BlockItem) item).getBlock();
return block.getDefaultState().isSolid();
}

This check is not enough. Dunno which method is better suited here.

commented

I have already thought that this was an issue ... gonna change that

commented

This should be fixed by now ... if this should reoccur please reopen