refactor: remove the last AABB::newTemp

This commit is contained in:
orng
2026-03-28 00:50:56 -05:00
parent ddfe9b3d48
commit e48a05bb8f
4 changed files with 15 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
#include "../Headers/net.minecraft.world.item.h"
#include "../Entities/Entity.h"
#include "WeightedPressurePlateTile.h"
#include "Util/AABB.h"
WeightedPressurePlateTile::WeightedPressurePlateTile(int id,
const std::wstring& tex,
@@ -19,8 +20,9 @@ WeightedPressurePlateTile::WeightedPressurePlateTile(int id,
int WeightedPressurePlateTile::getSignalStrength(Level* level, int x, int y,
int z) {
AABB at_bb = getSensitiveAABB(x, y, z);
int weightOfEntities =
level->getEntitiesOfClass(typeid(Entity), getSensitiveAABB(x, y, z))
level->getEntitiesOfClass(typeid(Entity), &at_bb)
->size();
int count = std::min(weightOfEntities, maxWeight);
@@ -38,4 +40,4 @@ int WeightedPressurePlateTile::getDataForSignal(int signal) { return signal; }
int WeightedPressurePlateTile::getTickDelay(Level* level) {
return SharedConstants::TICKS_PER_SECOND / 2;
}
}