From bbee3ae9cd69bf217567997789c258200575ad9e Mon Sep 17 00:00:00 2001 From: Patrick 'Quezler' Mounier Date: Mon, 30 Nov 2020 18:36:57 +0100 Subject: [PATCH] Update BuildingComp.java --- core/src/mindustry/entities/comp/BuildingComp.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index 37f9b59ec9..eea9d45374 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -929,7 +929,9 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, //null is of type void.class; anonymous classes use their superclass. Class type = value == null ? void.class : value.getClass().isAnonymousClass() || value.getClass().getSimpleName().startsWith("adapter") ? value.getClass().getSuperclass() : value.getClass(); + if(value instanceof Item) type = Item.class; if(value instanceof Block) type = Block.class; + if(value instanceof Liquid) type = Liquid.class; if(builder != null && builder.isPlayer()){ lastAccessed = builder.getPlayer().name;