Last active
August 29, 2015 14:24
-
-
Save ElvishJerricco/e68b9abf561f6b14da08 to your computer and use it in GitHub Desktop.
Part Factory for Peripherals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sided peripheral parts | |
public enum PartFactoryPeripherals implements IEnumPartFactory { | |
Storage("storage") { | |
@Override | |
public TMultiPart createPart(ForgeDirection direction) { | |
return new StoragePart(direction); // Get to this in a minute | |
} | |
}; | |
private final String type; | |
PartFactoryPeripherals(String type) { | |
this.type = type; | |
} | |
@Override | |
public String getPartType() { | |
return "cctransport.peripheralparts." + type; | |
} | |
@Override | |
public TMultiPart createPart(NBTTagCompound nbt) { | |
return createPart(ForgeDirection.UNKNOWN); | |
} | |
public abstract TMultiPart createPart(ForgeDirection direction); | |
@Override | |
public TMultiPart createPart(MCDataInput packet) { | |
return createPart(ForgeDirection.UNKNOWN); | |
} | |
@Override | |
public ItemStack getItem() { | |
return ItemsModule.itemPeripherals.getPartItemStack(this); // Get to this later | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment