diff --git a/src/main/java/cr0s/warpdrive/block/ItemBlockAbstractBase.java b/src/main/java/cr0s/warpdrive/block/ItemBlockAbstractBase.java index 29edc994..ae77c8a7 100644 --- a/src/main/java/cr0s/warpdrive/block/ItemBlockAbstractBase.java +++ b/src/main/java/cr0s/warpdrive/block/ItemBlockAbstractBase.java @@ -55,9 +55,8 @@ public class ItemBlockAbstractBase extends ItemBlock implements IItemBase { @Nonnull @Override - public String getTranslationKey(final ItemStack itemStack) { + public String getTranslationKey(@Nonnull final ItemStack itemStack) { if ( hasUniqueName - || itemStack == null || !(block instanceof BlockAbstractContainer) || !((BlockAbstractContainer) block).hasSubBlocks ) { return getTranslationKey(); diff --git a/src/main/java/cr0s/warpdrive/block/decoration/ItemBlockDecorative.java b/src/main/java/cr0s/warpdrive/block/decoration/ItemBlockDecorative.java index cf1aa017..861dc1b2 100644 --- a/src/main/java/cr0s/warpdrive/block/decoration/ItemBlockDecorative.java +++ b/src/main/java/cr0s/warpdrive/block/decoration/ItemBlockDecorative.java @@ -15,10 +15,7 @@ public class ItemBlockDecorative extends ItemBlockAbstractBase { @Nonnull @Override - public String getTranslationKey(final ItemStack itemStack) { - if (itemStack == null) { - return getTranslationKey(); - } + public String getTranslationKey(@Nonnull final ItemStack itemStack) { return getTranslationKey() + EnumDecorativeType.byMetadata(itemStack.getItemDamage()).getName(); } } diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/ItemBlockForceFieldProjector.java b/src/main/java/cr0s/warpdrive/block/forcefield/ItemBlockForceFieldProjector.java index 53d48cca..e1fc6e69 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/ItemBlockForceFieldProjector.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/ItemBlockForceFieldProjector.java @@ -30,10 +30,7 @@ public class ItemBlockForceFieldProjector extends ItemBlockAbstractBase { @Nonnull @Override - public String getTranslationKey(final ItemStack itemStack) { - if (itemStack == null) { - return getTranslationKey(); - } + public String getTranslationKey(@Nonnull final ItemStack itemStack) { return getTranslationKey() + (itemStack.getItemDamage() == 1 ? ".double" : ".single"); } } diff --git a/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHull.java b/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHull.java index d1374814..8f4ccf0b 100644 --- a/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHull.java +++ b/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHull.java @@ -33,8 +33,8 @@ public class ItemBlockHull extends ItemBlockAbstractBase { @Nonnull @Override - public String getTranslationKey(final ItemStack itemStack) { - if (itemStack == null || block instanceof BlockHullStairs) { + public String getTranslationKey(@Nonnull final ItemStack itemStack) { + if (block instanceof BlockHullStairs) { return getTranslationKey(); } return getTranslationKey() + EnumDyeColor.byMetadata( itemStack.getItemDamage() ).getTranslationKey(); diff --git a/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHullSlab.java b/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHullSlab.java index 492f4cb0..079b38e6 100644 --- a/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHullSlab.java +++ b/src/main/java/cr0s/warpdrive/block/hull/ItemBlockHullSlab.java @@ -29,7 +29,7 @@ public class ItemBlockHullSlab extends ItemBlockHull { @Nonnull @Override - public String getTranslationKey(final ItemStack itemstack) { + public String getTranslationKey(@Nonnull final ItemStack itemstack) { return getTranslationKey(); } diff --git a/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java b/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java index b01f0a15..42b22440 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java +++ b/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java @@ -167,7 +167,7 @@ public class TileEntityTransporterCore extends TileEntityAbstractEnergyCoreOrCon } // frequency status - isConnected = beamFrequency > 0 && beamFrequency <= IBeamFrequency.BEAM_FREQUENCY_MAX; + isConnected = IBeamFrequency.isValid(beamFrequency); // always cool down if (tickCooldown > 0) {