Compare commits

..
2 changed files with 13 additions and 15 deletions

No files matched your search

@@ -98,20 +98,18 @@ public class SolarPanelNetwork {
private static int getCapacity(TileEntitySolarPanel panel, int panelsCount) {
int capacity = ENERGY_PER;
int meta = panel.getBlockMetadata();
if (panel != null && panel.hasWorldObj()) {
int meta = panel.getBlockMetadata();
switch (meta) {
case 0: // Default
capacity = Config.photovoltaicCellCapacityRF;
break;
case 1: // Advanced
capacity = Config.photovoltaicAdvancedCellCapacityRF;
break;
case 2: // Vibrant
capacity = Config.photovoltaicVibrantCellCapacityRF;
break;
}
switch (meta) {
case 0: // Default
capacity = Config.photovoltaicCellCapacityRF;
break;
case 1: // Advanced
capacity = Config.photovoltaicAdvancedCellCapacityRF;
break;
case 2: // Vibrant
capacity = Config.photovoltaicVibrantCellCapacityRF;
break;
}
capacity = capacity * panelsCount;
@@ -554,8 +554,8 @@ public class TravelController {
return null;
}
ItemStack equipped = ep.getCurrentEquippedItem();
if (equipped.getItem() instanceof ItemTeleportStaff) {
if (((ItemTeleportStaff) equipped.getItem()).isActive(ep, equipped)) {
if (equipped.getItem() instanceof ItemTravelStaff) {
if (((ItemTravelStaff) equipped.getItem()).isActive(ep, equipped)) {
return TravelSource.TELEPORT_STAFF;
}
} else if (equipped.getItem() instanceof IItemOfTravel) {