mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-13 00:47:52 +00:00
Added invalidateConvertedTile callback for parts
This commit is contained in:
1 parent
607854f537
commit
bb13dbd65c
2 files changed
+6
No files matched your search
@@ -74,6 +74,7 @@ object MultipartGenerator
|
||||
{
|
||||
if(converted)//perform client conversion
|
||||
{
|
||||
ntile.partList(0).invalidateConvertedTile()
|
||||
world.setBlock(pos.x, pos.y, pos.z, MultipartProxy.block.blockID, 0, 0)
|
||||
world.setBlockTileEntity(pos.x, pos.y, pos.z, ntile)
|
||||
PacketCustom.sendToChunk(new Packet53BlockChange(pos.x, pos.y, pos.z, world), world, pos.x>>4, pos.z>>4)
|
||||
|
||||
@@ -240,6 +240,11 @@ abstract class TMultiPart
|
||||
* Called when this part is converted from a normal block/tile (only applicable if a converter has been registered)
|
||||
*/
|
||||
def onConverted() = onAdded()
|
||||
/**
|
||||
* Called when this part is converted from a normal block/tile (only applicable if a converter has been registered) before the original tile has been replaced
|
||||
* Use this to clear out things like inventory from the old tile.
|
||||
*/
|
||||
def invalidateConvertedTile(){}
|
||||
/**
|
||||
* Called when this part has been moved without a save/load.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user