summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/DropSpenserEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-22 12:08:12 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-23 15:34:15 +0200
commit71b96ab921bed0371d7c75ac4a2db99b94591de2 (patch)
tree618e9e37799cbf07a55f4a3950071e067358753f /src/BlockEntities/DropSpenserEntity.cpp
parentAdded dtEnvitonment to player damage text (#4925) (diff)
downloadcuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.tar
cuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.tar.gz
cuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.tar.bz2
cuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.tar.lz
cuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.tar.xz
cuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.tar.zst
cuberite-71b96ab921bed0371d7c75ac4a2db99b94591de2.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/DropSpenserEntity.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/BlockEntities/DropSpenserEntity.cpp b/src/BlockEntities/DropSpenserEntity.cpp
index 243ec8594..259cec7a3 100644
--- a/src/BlockEntities/DropSpenserEntity.cpp
+++ b/src/BlockEntities/DropSpenserEntity.cpp
@@ -79,9 +79,8 @@ void cDropSpenserEntity::DropSpense(cChunk & a_Chunk)
return;
}
- int RandomSlot = m_World->GetTickRandomNumber(SlotsCnt - 1);
-
- int SpenseSlot = OccupiedSlots[RandomSlot];
+ const int RandomSlot = m_World->GetTickRandomNumber(SlotsCnt - 1);
+ const int SpenseSlot = OccupiedSlots[RandomSlot];
if (cPluginManager::Get()->CallHookDropSpense(*m_World, *this, SpenseSlot))
{