|
@@ -4,6 +4,7 @@
|
|
#include "BlockType.h"
|
|
#include "BlockType.h"
|
|
#include "ItemSkill.h"
|
|
#include "ItemSkill.h"
|
|
#include "EntityRemovedUpdate.h"
|
|
#include "EntityRemovedUpdate.h"
|
|
|
|
+#include "NoBlock.h"
|
|
|
|
|
|
|
|
|
|
ActionTarget::ActionTarget(Vec3<int> blockPos, Direction blockSide)
|
|
ActionTarget::ActionTarget(Vec3<int> blockPos, Direction blockSide)
|
|
@@ -44,7 +45,7 @@ void ActionTarget::placeBlock(Entity* zActor, Item* zItem)
|
|
{
|
|
{
|
|
// TODO: check stamina of actor
|
|
// TODO: check stamina of actor
|
|
auto zB = Game::INSTANCE->zBlockAt(blockPos + getDirection(targetBlockSide), zActor->getCurrentDimensionId());
|
|
auto zB = Game::INSTANCE->zBlockAt(blockPos + getDirection(targetBlockSide), zActor->getCurrentDimensionId());
|
|
- if ((zB.isA() && zB.getA()->isPassable()) || (zB.isB() && StaticRegistry<BlockType>::INSTANCE.zElement(zB.getB())->zDefault()->isPassable()))
|
|
|
|
|
|
+ if ((zB.isA() && zB.getA()->zBlockType()->getId() == AirBlockBlockType::ID) || (zB.isB() && zB.isB() == AirBlockBlockType::ID))
|
|
{
|
|
{
|
|
Block* block = zItem->zPlacedBlockType()->createBlockAt(blockPos + getDirection(targetBlockSide), zItem);
|
|
Block* block = zItem->zPlacedBlockType()->createBlockAt(blockPos + getDirection(targetBlockSide), zItem);
|
|
if (block)
|
|
if (block)
|