gnembon / fabric-carpet

Fabric Carpet
MIT License
1.65k stars 261 forks source link

Enchanting table is still not movable after enabling movableBlockEntities #1873

Open ipg0 opened 4 months ago

ipg0 commented 4 months ago

The /carpet movableBlockEntities true command enables moving almost any block entity, but moving the enchanting table still fails. Is this a bug, or are there any extensions for this mod that would finally allow it?

axialeaa commented 3 months ago

This seems to be intentional, as there's a direct reference to enchanting tables being ignored in PistonBaseBlock_movableBEMixin#isPushableBlockEntity(Block):

private static boolean isPushableBlockEntity(Block block) {
    return block != Blocks.ENDER_CHEST && block != Blocks.ENCHANTING_TABLE && block != Blocks.END_GATEWAY && block != Blocks.END_PORTAL && block != Blocks.MOVING_PISTON && block != Blocks.SPAWNER;
}                                                         ^ here :)

This is probably in consideration of the fact that enchanting tables and ender chests both feature obsidian in their crafting recipes!

ipg0 commented 3 months ago

This seems to be intentional, as there's a direct reference to enchanting tables being ignored in PistonBaseBlock_movableBEMixin#isPushableBlockEntity(Block):

private static boolean isPushableBlockEntity(Block block) {
    return block != Blocks.ENDER_CHEST && block != Blocks.ENCHANTING_TABLE && block != Blocks.END_GATEWAY && block != Blocks.END_PORTAL && block != Blocks.MOVING_PISTON && block != Blocks.SPAWNER;
}                                                         ^ here :)

This is probably in consideration of the fact that enchanting tables and ender chests both feature obsidian in their crafting recipes!

I was just playing a modpack which adds another kind of enchanting table, and I had built a massive redstone contraption to switch between a modded ench table and a regular one within a single bookshelf array, only to discover that I can't move the enchanting table with a piston.

I already forked this mod and removed the mentioned check, anyway :)