use of mekanism.common.integration.computer.ComputerException in project Mekanism by mekanism.
the class TileEntityTeleporter method setFrequency.
@ComputerMethod
private void setFrequency(String name) throws ComputerException {
validateSecurityIsPublic();
TeleporterFrequency frequency = FrequencyType.TELEPORTER.getManagerWrapper().getPublicManager().getFrequency(name);
if (frequency == null) {
throw new ComputerException("No public teleporter frequency with name '%s' found.", name);
}
setFrequency(FrequencyType.TELEPORTER, frequency.getIdentity(), getOwnerUUID());
}
use of mekanism.common.integration.computer.ComputerException in project Mekanism by mekanism.
the class TileEntityQuantumEntangloporter method createFrequency.
@ComputerMethod
private void createFrequency(String name) throws ComputerException {
validateSecurityIsPublic();
InventoryFrequency frequency = FrequencyType.INVENTORY.getManagerWrapper().getPublicManager().getFrequency(name);
if (frequency != null) {
throw new ComputerException("Unable to create public inventory frequency with name '%s' as one already exists.", name);
}
setFrequency(FrequencyType.INVENTORY, new FrequencyIdentity(name, true), getOwnerUUID());
}
use of mekanism.common.integration.computer.ComputerException in project Mekanism by mekanism.
the class TileEntityQuantumEntangloporter method setFrequency.
@ComputerMethod
private void setFrequency(String name) throws ComputerException {
validateSecurityIsPublic();
InventoryFrequency frequency = FrequencyType.INVENTORY.getManagerWrapper().getPublicManager().getFrequency(name);
if (frequency == null) {
throw new ComputerException("No public inventory frequency with name '%s' found.", name);
}
setFrequency(FrequencyType.INVENTORY, frequency.getIdentity(), getOwnerUUID());
}
use of mekanism.common.integration.computer.ComputerException in project Mekanism by mekanism.
the class TileEntityQIORedstoneAdapter method setTargetItem.
@ComputerMethod
private void setTargetItem(ResourceLocation itemName) throws ComputerException {
validateSecurityIsPublic();
Item item = ForgeRegistries.ITEMS.getValue(itemName);
if (item == null || item == Items.AIR) {
throw new ComputerException("Target item '%s' could not be found. If you are trying to clear it consider using clearTargetItem instead.", itemName);
}
handleStackChange(new ItemStack(item));
}
use of mekanism.common.integration.computer.ComputerException in project Mekanism by mekanism.
the class TileEntityQIOComponent method setFrequency.
@ComputerMethod
private void setFrequency(String name) throws ComputerException {
validateSecurityIsPublic();
QIOFrequency frequency = FrequencyType.QIO.getManagerWrapper().getPublicManager().getFrequency(name);
if (frequency == null) {
throw new ComputerException("No public QIO frequency with name '%s' found.", name);
}
setFrequency(FrequencyType.QIO, frequency.getIdentity(), getOwnerUUID());
}
Aggregations