mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Only check for entities to damage if the structure is valid (#161)
Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com>
This commit is contained in:
1 parent
760594f040
commit
8a2d2b6373
1 file changed
+3
-4
@@ -325,7 +325,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
}
|
||||
|
||||
void detectEntities() {
|
||||
if (minPos == null || maxPos == null) return;
|
||||
if (!validStructure || minPos == null || maxPos == null) return;
|
||||
|
||||
AxisAlignedBB box = AxisAlignedBB
|
||||
.getBoundingBox(minPos.x, minPos.y, minPos.z, maxPos.x + 1, minPos.y + layers, maxPos.z + 1);
|
||||
@@ -334,13 +334,12 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
|
||||
for (Entity o : list) {
|
||||
if (o.isDead) return;
|
||||
|
||||
if (moltenMetal.size() >= 1) {
|
||||
if (!moltenMetal.isEmpty()) {
|
||||
Fluid fluid = null;
|
||||
int amount = 0;
|
||||
float damage = 5;
|
||||
|
||||
if (o instanceof EntityVillager && PHConstruct.meltableVillagers) {
|
||||
EntityVillager villager = (EntityVillager) o;
|
||||
if (o instanceof EntityVillager villager && PHConstruct.meltableVillagers) {
|
||||
fluid = TinkerSmeltery.moltenEmeraldFluid;
|
||||
amount = villager.isChild() ? 5 : 40;
|
||||
} else if (o instanceof EntityEnderman) {
|
||||
|
||||
Reference in new issue
Block a user