diff options
author | Bond-009 <bond.009@outlook.com> | 2017-09-07 10:25:34 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-09-07 10:25:34 +0200 |
commit | 104f9e127b259731836c2b88d74a8d731f3ad535 (patch) | |
tree | 0aa333690caf9480f38e2ec1a88265b84544aeb5 /src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h | |
parent | Add cWorld::RemoveEntity and use in cEntity (#4003) (diff) | |
download | cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.tar cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.tar.gz cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.tar.bz2 cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.tar.lz cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.tar.xz cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.tar.zst cuberite-104f9e127b259731836c2b88d74a8d731f3ad535.zip |
Diffstat (limited to 'src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h')
-rw-r--r-- | src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h index 40e7da96a..6cea4501f 100644 --- a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h +++ b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h @@ -12,7 +12,7 @@ class cTNTHandler : public cRedstoneHandler typedef cRedstoneHandler super; public: - virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, const Vector3i & a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, const Vector3i & a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override + virtual unsigned char GetPowerDeliveredToPosition(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, Vector3i a_QueryPosition, BLOCKTYPE a_QueryBlockType) const override { UNUSED(a_World); UNUSED(a_Position); @@ -23,7 +23,7 @@ public: return 0; } - virtual unsigned char GetPowerLevel(cWorld & a_World, const Vector3i & a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const override + virtual unsigned char GetPowerLevel(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const override { UNUSED(a_World); UNUSED(a_Position); @@ -32,19 +32,19 @@ public: return 0; } - virtual cVector3iArray Update(cWorld & a_World, const Vector3i & a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, PoweringData a_PoweringData) const override + virtual cVector3iArray Update(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta, PoweringData a_PoweringData) const override { // LOGD("Evaluating explodinator the trinitrotoluene (%d %d %d)", a_Position.x, a_Position.y, a_Position.z); if (a_PoweringData.PowerLevel != 0) { a_World.BroadcastSoundEffect("entity.tnt.primed", static_cast<double>(a_Position.x), static_cast<double>(a_Position.y), static_cast<double>(a_Position.z), 0.5f, 0.6f); a_World.SetBlock(a_Position.x, a_Position.y, a_Position.z, E_BLOCK_AIR, 0); - a_World.SpawnPrimedTNT(a_Position.x + 0.5, a_Position.y + 0.5, a_Position.z + 0.5); // 80 ticks to boom + a_World.SpawnPrimedTNT(a_Position + Vector3d(0.5, 0.5, 0.5)); // 80 ticks to boom } return {}; } - virtual cVector3iArray GetValidSourcePositions(cWorld & a_World, const Vector3i & a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const override + virtual cVector3iArray GetValidSourcePositions(cWorld & a_World, Vector3i a_Position, BLOCKTYPE a_BlockType, NIBBLETYPE a_Meta) const override { UNUSED(a_World); UNUSED(a_BlockType); |