mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-13 22:18:12 +00:00
refactor: remove the last AABB::newTemp
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user