ComputerCraft

ComputerCraft

21M Downloads

Turtle mining banner wipes its contents.

Wojbie opened this issue ยท 10 comments

commented

If turtle mines any banner it gets black banner with all customization wiped out.

commented

This issue can only be fixed by Forge, I have issued a report there:
MinecraftForge/MinecraftForge#2258

commented

Well that's annoying ๐Ÿ˜•

On Sunday, December 20, 2015, Daniel Ratcliffe [email protected]
wrote:

BlockBanner does not implement Block.getDrops(), that is all.

On 20 December 2015 at 14:09, LinkTheProgrammer <[email protected]
javascript:_e(%7B%7D,'cvml','[email protected]');>
wrote:

Right, that method in Block that gives all the types of ItemEntities that
BlockEntity drops (am I right?). Suppose this Banner is a child of
BlockEntity (TileEntity), then how is forge not already hooking this
method
if it is in every BlockEntity? Or is Mojang doing the unspeakable and
making code specific to a subclass of BlockEntity available in
BlockEntity
and would be why the hook is not yet available?

โ€”
Reply to this email directly or view it on GitHub
<
https://github.com/dan200/ComputerCraft/issues/29#issuecomment-166119108>
.

โ€”
Reply to this email directly or view it on GitHub
#29 (comment)
.

commented

Isn't there a way to fix it yourself in the meantime by saving the customization of the block currently breaking, then apply them to the item when it is dropped?

commented

No, Block NBT and Item NBT aren't convertible in a general case way, and
I'm not adding special case code just for banners.

On 20 December 2015 at 13:49, LinkTheProgrammer [email protected]
wrote:

Isn't there a way to fix it yourself in the meantime by saving the
customization of the block currently breaking, then apply them to the item
when it is dropped?

โ€”
Reply to this email directly or view it on GitHub
#29 (comment)
.

commented

They have specific code in the block class for banners. This code just
hasn't been adapted to the forge getDroppedItems() hook that CC uses.

On 20 December 2015 at 13:55, LinkTheProgrammer [email protected]
wrote:

I never knew you couldn't convert a BlockEntityTag to ItemEntityTag. How
then do banners and other items keep the customizations of the BlockEntity
that drops it?

โ€”
Reply to this email directly or view it on GitHub
#29 (comment)
.

commented

I never knew you couldn't convert a BlockEntityTag to ItemEntityTag. How then do banners and other items keep the customizations of the BlockEntity that drops it?

commented

Right, that method in Block that gives all the types of ItemEntities that BlockEntity drops (am I right?). Suppose this Banner is a child of BlockEntity (TileEntity), then how is forge not already hooking this method if it is in every BlockEntity? Or is Mojang doing the unspeakable and making code specific to a subclass of BlockEntity available in BlockEntity and would be why the hook is not yet available?

commented

BlockBanner does not implement Block.getDrops(), that is all.

On 20 December 2015 at 14:09, LinkTheProgrammer [email protected]
wrote:

Right, that method in Block that gives all the types of ItemEntities that
BlockEntity drops (am I right?). Suppose this Banner is a child of
BlockEntity (TileEntity), then how is forge not already hooking this method
if it is in every BlockEntity? Or is Mojang doing the unspeakable and
making code specific to a subclass of BlockEntity available in BlockEntity
and would be why the hook is not yet available?

โ€”
Reply to this email directly or view it on GitHub
#29 (comment)
.

commented

Closing this, it's in forge's court now

commented

This is now solved in Forge.
Thanks Lex! MinecraftForge/MinecraftForge@4672f7b