@@ -66,6 +66,11 @@ void Block::setDimensionId( int id )
dimansionId = id;
}
+void api( Framework::StreamReader *zRequest, NetworkResponse *zResponse )
+{
+ // TODO: answer api requests
+}
+
bool Block::isTickSource() const
{
return tickSource;
@@ -1,6 +1,7 @@
#include "BlockType.h"
#include "ItemType.h"
#include "BasicBlocks.h"
+#include "Block.h"
using namespace Framework;
@@ -5,7 +5,6 @@
#include <Writer.h>
#include "StaticRegistry.h"
-#include "Block.h"
class Game;
class Item;
@@ -12,6 +12,12 @@ ItemSlot::ItemSlot( int maxSize, int pullPriority, int pushPriority, int allowed
allowHigherStackSize( allowHigherStackSize )
{}
+ItemSlot::~ItemSlot()
+ if( items )
+ items->release();
ItemStack *ItemSlot::takeItemsOut( int count, Direction dir )
if( !items )
@@ -16,6 +16,7 @@ private:
public:
ItemSlot( int maxSize, int pullPriority, int pushPriority, int allowedPullSide, int allowedPushSides, bool allowHigherStackSize );
+ ~ItemSlot();
ItemStack *takeItemsOut( int count, Direction dir );
void addItems( ItemStack *zStack, Direction dir );
@@ -13,6 +13,12 @@ ItemStack::ItemStack( Item *item, int currentSize )
: ItemStack( item, currentSize, item->getMaxStackSize() )
+ItemStack::~ItemStack()
+ if( item )
+ item->release();
void ItemStack::setMaxSize( int size )
maxSize = size;
@@ -12,6 +12,7 @@ private:
ItemStack( Item *item, int currentSize, int maxSize );
ItemStack( Item *item, int currentSize );
+ ~ItemStack();
void setMaxSize( int size );
ItemStack *split( int size );