Merge pull request #3665 from Quezler/patch-72

Fix configuring buildings with blocks
This commit is contained in:
Anuken
2020-11-30 12:32:46 -05:00
committed by GitHub

View File

@@ -929,6 +929,8 @@ 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 Block) type = Block.class;
if(builder != null && builder.isPlayer()){
lastAccessed = builder.getPlayer().name;
}