diff options
author | Mattes D <github@xoft.cz> | 2013-12-08 18:07:34 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-12-08 18:07:34 +0100 |
commit | 6f23d2ec94b30e355edc63c2de464d40ff3d0ed8 (patch) | |
tree | 3127fecd22be0f755e81c384c72a171e52987458 /src/Items | |
parent | Removed unused ToLua files. (diff) | |
parent | Fixed binding generation and VS2013 compile (diff) | |
download | cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.tar cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.tar.gz cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.tar.bz2 cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.tar.lz cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.tar.xz cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.tar.zst cuberite-6f23d2ec94b30e355edc63c2de464d40ff3d0ed8.zip |
Diffstat (limited to 'src/Items')
-rw-r--r-- | src/Items/ItemDye.h | 5 | ||||
-rw-r--r-- | src/Items/ItemSpawnEgg.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/Items/ItemDye.h b/src/Items/ItemDye.h index 99b8d2543..190cdc510 100644 --- a/src/Items/ItemDye.h +++ b/src/Items/ItemDye.h @@ -21,14 +21,13 @@ public: virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir) override { - // TODO: Handle coloring the sheep, too (OnItemUseOnEntity maybe) - // Handle growing the plants: if (a_Item.m_ItemDamage == E_META_DYE_WHITE) { if (a_World->GrowRipePlant(a_BlockX, a_BlockY, a_BlockZ, true)) { - if (a_Player->GetGameMode() != gmCreative) + // Particle effects are in GrowRipePlant + if (!a_Player->IsGameModeCreative()) { a_Player->GetInventory().RemoveOneEquippedItem(); return true; diff --git a/src/Items/ItemSpawnEgg.h b/src/Items/ItemSpawnEgg.h index 26dd15b7d..407d655de 100644 --- a/src/Items/ItemSpawnEgg.h +++ b/src/Items/ItemSpawnEgg.h @@ -28,14 +28,14 @@ public: AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace); - if (a_BlockFace == BLOCK_FACE_BOTTOM) + if (a_BlockFace == BLOCK_FACE_YM) { a_BlockY--; } if (a_World->SpawnMob(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5, (cMonster::eType)(a_Item.m_ItemDamage)) >= 0) { - if (a_Player->GetGameMode() != 1) + if (!a_Player->IsGameModeCreative()) { // The mob was spawned, "use" the item: a_Player->GetInventory().RemoveOneEquippedItem(); |