From fdfc73195f3a66ef7705d81d7010cb2b064f7fac Mon Sep 17 00:00:00 2001 From: OEOTYAN Date: Fri, 3 Jan 2025 18:51:10 +0800 Subject: [PATCH] chore: remove some wrapper --- .../world/redstone/circuit/CircuitSceneGraph.h | 16 ++++++++-------- .../circuit/components/CircuitComponentList.h | 15 ++++++++------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/mc/world/redstone/circuit/CircuitSceneGraph.h b/src/mc/world/redstone/circuit/CircuitSceneGraph.h index 69290074a7..6043380d02 100644 --- a/src/mc/world/redstone/circuit/CircuitSceneGraph.h +++ b/src/mc/world/redstone/circuit/CircuitSceneGraph.h @@ -1,6 +1,7 @@ #pragma once #include "mc/_HeaderOutputPredefine.h" +#include "mc/world/level/BlockPos.h" // auto generated inclusion list #include "mc/world/redstone/circuit/components/CircuitComponentType.h" @@ -54,14 +55,13 @@ class CircuitSceneGraph { public: // member variables // NOLINTBEGIN - ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::unique_ptr<::BaseCircuitComponent>>> - mAllComponents; - ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::ChunkCircuitComponentList>> mActiveComponentsPerChunk; - ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::CircuitComponentList>> mPowerAssociationMap; - ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::CircuitSceneGraph::PendingEntry>> mPendingAdds; - ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::CircuitSceneGraph::PendingEntry>> mPendingUpdates; - ::ll::TypedStorage<8, 64, ::std::unordered_map<::BlockPos, ::std::vector<::BlockPos>>> mComponentsToReEvaluate; - ::ll::TypedStorage<8, 24, ::std::vector<::CircuitSceneGraph::PendingEntry>> mPendingRemoves; + ComponentMap mAllComponents; + ComponentsPerChunkMap mActiveComponentsPerChunk; + ComponentsPerPosMap mPowerAssociationMap; + ::std::unordered_map<::BlockPos, ::CircuitSceneGraph::PendingEntry> mPendingAdds; + ::std::unordered_map<::BlockPos, ::CircuitSceneGraph::PendingEntry> mPendingUpdates; + ::std::unordered_map<::BlockPos, ::std::vector<::BlockPos>> mComponentsToReEvaluate; + ::std::vector<::CircuitSceneGraph::PendingEntry> mPendingRemoves; // NOLINTEND public: diff --git a/src/mc/world/redstone/circuit/components/CircuitComponentList.h b/src/mc/world/redstone/circuit/components/CircuitComponentList.h index 8035be4a46..356c8dad95 100644 --- a/src/mc/world/redstone/circuit/components/CircuitComponentList.h +++ b/src/mc/world/redstone/circuit/components/CircuitComponentList.h @@ -1,6 +1,7 @@ #pragma once #include "mc/_HeaderOutputPredefine.h" +#include "mc/world/level/BlockPos.h" // auto generated forward declare list // clang-format off @@ -20,19 +21,19 @@ class CircuitComponentList { public: // member variables // NOLINTBEGIN - ::ll::TypedStorage<8, 8, ::BaseCircuitComponent*> mComponent; - ::ll::TypedStorage<4, 4, int> mDampening; - ::ll::TypedStorage<4, 12, ::BlockPos> mPos; - ::ll::TypedStorage<1, 1, uchar> mDirection; - ::ll::TypedStorage<1, 1, bool> mDirectlyPowered; - ::ll::TypedStorage<4, 4, int> mData; + ::BaseCircuitComponent* mComponent; + int mDampening; + ::BlockPos mPos; + uchar mDirection; + bool mDirectlyPowered; + int mData; // NOLINTEND }; public: // member variables // NOLINTBEGIN - ::ll::TypedStorage<8, 24, ::std::vector<::CircuitComponentList::Item>> mComponents; + ::std::vector<::CircuitComponentList::Item> mComponents; // NOLINTEND public: