Removed reliance on PartType from code outside of Bootstrapping,

and restored ability to group different supported items on
Upgrade Card tooltips.
This commit is contained in:
Sebastian Hartte
2020-07-01 00:33:15 +02:00
parent 400fcdb633
commit c67dba2f13
18 changed files with 368 additions and 596 deletions
@@ -31,7 +31,6 @@ import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
@@ -67,8 +66,6 @@ import appeng.api.util.DimensionalCoord;
import appeng.api.util.IConfigManager;
import appeng.helpers.ICustomNameObject;
import appeng.helpers.IPriorityHost;
import appeng.items.parts.PartItem;
import appeng.items.parts.PartType;
import appeng.me.helpers.AENetworkProxy;
import appeng.me.helpers.IGridProxyable;
import appeng.parts.networking.CablePart;
@@ -96,15 +93,6 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
return this.host;
}
public PartType getType() {
Item item = this.is.getItem();
if (!(item instanceof PartItem)) {
return PartType.INVALID_TYPE;
}
return ((PartItem<?>) item).getType();
}
@Override
public IGridNode getGridNode(final AEPartLocation dir) {
return this.proxy.getNode();