From c5603ce064d7e4e897aa92d6f43d407802ae3687 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 12 Jan 2014 15:27:50 +0100 Subject: EmptyMinecarts should be able to get a block inside of them. --- src/Items/ItemMinecart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items') diff --git a/src/Items/ItemMinecart.h b/src/Items/ItemMinecart.h index f8eb31a49..b82779026 100644 --- a/src/Items/ItemMinecart.h +++ b/src/Items/ItemMinecart.h @@ -60,7 +60,7 @@ public: cMinecart * Minecart = NULL; switch (m_ItemType) { - case E_ITEM_MINECART: Minecart = new cEmptyMinecart (x, y, z); break; + case E_ITEM_MINECART: Minecart = new cEmptyMinecart (x, y, z, cItem(), 1); break; case E_ITEM_CHEST_MINECART: Minecart = new cMinecartWithChest (x, y, z); break; case E_ITEM_FURNACE_MINECART: Minecart = new cMinecartWithFurnace (x, y, z); break; case E_ITEM_MINECART_WITH_TNT: Minecart = new cMinecartWithTNT (x, y, z); break; -- cgit v1.2.3 From f11427e8cd5506204958eec68a8ac2a9152df108 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sun, 12 Jan 2014 18:04:41 +0100 Subject: Renamed cEmptyMinecart to cRideableMinecart --- src/Items/ItemMinecart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Items') diff --git a/src/Items/ItemMinecart.h b/src/Items/ItemMinecart.h index b82779026..4071f8c60 100644 --- a/src/Items/ItemMinecart.h +++ b/src/Items/ItemMinecart.h @@ -60,7 +60,7 @@ public: cMinecart * Minecart = NULL; switch (m_ItemType) { - case E_ITEM_MINECART: Minecart = new cEmptyMinecart (x, y, z, cItem(), 1); break; + case E_ITEM_MINECART: Minecart = new cRideableMinecart (x, y, z, cItem(), 1); break; case E_ITEM_CHEST_MINECART: Minecart = new cMinecartWithChest (x, y, z); break; case E_ITEM_FURNACE_MINECART: Minecart = new cMinecartWithFurnace (x, y, z); break; case E_ITEM_MINECART_WITH_TNT: Minecart = new cMinecartWithTNT (x, y, z); break; -- cgit v1.2.3 From 74645fdfaa892e460c1b5444fd35eca11343e570 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 16 Jan 2014 19:00:49 +0000 Subject: Removed obsoleted functions --- src/Items/ItemBed.h | 2 +- src/Items/ItemComparator.h | 2 +- src/Items/ItemRedstoneRepeater.h | 2 +- src/Items/ItemSign.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Items') diff --git a/src/Items/ItemBed.h b/src/Items/ItemBed.h index ab4182eea..18eec9421 100644 --- a/src/Items/ItemBed.h +++ b/src/Items/ItemBed.h @@ -37,7 +37,7 @@ public: return false; } - a_BlockMeta = cBlockBedHandler::RotationToMetaData(a_Player->GetRotation()); + a_BlockMeta = cBlockBedHandler::RotationToMetaData(a_Player->GetRot().x); // Check if there is empty space for the foot section: Vector3i Direction = cBlockBedHandler::MetaDataToDirection(a_BlockMeta); diff --git a/src/Items/ItemComparator.h b/src/Items/ItemComparator.h index 3fbb7603d..57a1eb9ac 100644 --- a/src/Items/ItemComparator.h +++ b/src/Items/ItemComparator.h @@ -30,7 +30,7 @@ public: ) override { a_BlockType = E_BLOCK_INACTIVE_COMPARATOR; - a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRotation()); + a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRot().x); return true; } } ; diff --git a/src/Items/ItemRedstoneRepeater.h b/src/Items/ItemRedstoneRepeater.h index f69f24eb8..b927f14d7 100644 --- a/src/Items/ItemRedstoneRepeater.h +++ b/src/Items/ItemRedstoneRepeater.h @@ -30,7 +30,7 @@ public: ) override { a_BlockType = E_BLOCK_REDSTONE_REPEATER_OFF; - a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRotation()); + a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRot().x); return true; } } ; diff --git a/src/Items/ItemSign.h b/src/Items/ItemSign.h index 5ccd79e29..058fe2c35 100644 --- a/src/Items/ItemSign.h +++ b/src/Items/ItemSign.h @@ -34,7 +34,7 @@ public: { if (a_BlockFace == BLOCK_FACE_TOP) { - a_BlockMeta = cBlockSignHandler::RotationToMetaData(a_Player->GetRotation()); + a_BlockMeta = cBlockSignHandler::RotationToMetaData(a_Player->GetRot().x); a_BlockType = E_BLOCK_SIGN_POST; } else -- cgit v1.2.3 From aec5200893e09f90cc43b61088b30364800b51c6 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 17 Jan 2014 11:11:17 +0100 Subject: Removed internal cEntity::GetRot() usage. --- src/Items/ItemBed.h | 2 +- src/Items/ItemComparator.h | 2 +- src/Items/ItemRedstoneRepeater.h | 2 +- src/Items/ItemSign.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Items') diff --git a/src/Items/ItemBed.h b/src/Items/ItemBed.h index 18eec9421..9b7c8bff8 100644 --- a/src/Items/ItemBed.h +++ b/src/Items/ItemBed.h @@ -37,7 +37,7 @@ public: return false; } - a_BlockMeta = cBlockBedHandler::RotationToMetaData(a_Player->GetRot().x); + a_BlockMeta = cBlockBedHandler::RotationToMetaData(a_Player->GetYaw()); // Check if there is empty space for the foot section: Vector3i Direction = cBlockBedHandler::MetaDataToDirection(a_BlockMeta); diff --git a/src/Items/ItemComparator.h b/src/Items/ItemComparator.h index 57a1eb9ac..3a5d1d200 100644 --- a/src/Items/ItemComparator.h +++ b/src/Items/ItemComparator.h @@ -30,7 +30,7 @@ public: ) override { a_BlockType = E_BLOCK_INACTIVE_COMPARATOR; - a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRot().x); + a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetYaw()); return true; } } ; diff --git a/src/Items/ItemRedstoneRepeater.h b/src/Items/ItemRedstoneRepeater.h index b927f14d7..e71c8e672 100644 --- a/src/Items/ItemRedstoneRepeater.h +++ b/src/Items/ItemRedstoneRepeater.h @@ -30,7 +30,7 @@ public: ) override { a_BlockType = E_BLOCK_REDSTONE_REPEATER_OFF; - a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetRot().x); + a_BlockMeta = cBlockRedstoneRepeaterHandler::RepeaterRotationToMetaData(a_Player->GetYaw()); return true; } } ; diff --git a/src/Items/ItemSign.h b/src/Items/ItemSign.h index 058fe2c35..8c134ab83 100644 --- a/src/Items/ItemSign.h +++ b/src/Items/ItemSign.h @@ -34,7 +34,7 @@ public: { if (a_BlockFace == BLOCK_FACE_TOP) { - a_BlockMeta = cBlockSignHandler::RotationToMetaData(a_Player->GetRot().x); + a_BlockMeta = cBlockSignHandler::RotationToMetaData(a_Player->GetYaw()); a_BlockType = E_BLOCK_SIGN_POST; } else -- cgit v1.2.3