Added integrated help to Warp Isolation blocks

This commit is contained in:
Unknown 2018-05-06 21:09:27 +02:00 committed by unknown
parent 57075be540
commit 7b89fff017
10 changed files with 45 additions and 2 deletions

View file

@ -40,6 +40,7 @@ import cr0s.warpdrive.block.detection.BlockMonitor;
import cr0s.warpdrive.block.detection.BlockRadar;
import cr0s.warpdrive.block.detection.BlockSiren;
import cr0s.warpdrive.block.detection.BlockWarpIsolation;
import cr0s.warpdrive.block.detection.ItemBlockWarpIsolation;
import cr0s.warpdrive.block.detection.TileEntityCamera;
import cr0s.warpdrive.block.detection.TileEntityCloakingCore;
import cr0s.warpdrive.block.detection.TileEntityMonitor;
@ -356,7 +357,7 @@ public class WarpDrive {
// WARP ISOLATION
blockWarpIsolation = new BlockWarpIsolation();
GameRegistry.registerBlock(blockWarpIsolation, ItemBlockAbstractBase.class, "blockWarpIsolation");
GameRegistry.registerBlock(blockWarpIsolation, ItemBlockWarpIsolation.class, "blockWarpIsolation");
// AIR GENERATOR
blockAirGenerator = new BlockAirGenerator();

View file

@ -1,6 +1,7 @@
package cr0s.warpdrive.block.detection;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.block.BlockAbstractBase;
import java.util.Random;
@ -13,7 +14,7 @@ import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockWarpIsolation extends Block {
public class BlockWarpIsolation extends BlockAbstractBase {
@SideOnly(Side.CLIENT)
private IIcon[] iconBuffer;

View file

@ -0,0 +1,34 @@
package cr0s.warpdrive.block.detection;
import cr0s.warpdrive.Commons;
import cr0s.warpdrive.block.ItemBlockAbstractBase;
import cr0s.warpdrive.config.WarpDriveConfig;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
public class ItemBlockWarpIsolation extends ItemBlockAbstractBase {
public ItemBlockWarpIsolation(final Block block) {
super(block);
setMaxDamage(0);
}
// Item overrides
@Override
public void addInformation(final ItemStack itemStack, final EntityPlayer entityPlayer, final List list, final boolean advancedItemTooltips) {
Commons.addTooltip(list, StatCollector.translateToLocalFormatted(getUnlocalizedName(itemStack) + ".formatted_tooltip",
WarpDriveConfig.RADAR_MIN_ISOLATION_BLOCKS,
Math.round(WarpDriveConfig.RADAR_MIN_ISOLATION_EFFECT * 100.0D),
WarpDriveConfig.RADAR_MAX_ISOLATION_BLOCKS,
Math.round(WarpDriveConfig.RADAR_MAX_ISOLATION_EFFECT * 100.0D),
WarpDriveConfig.RADAR_MAX_ISOLATION_RANGE + 1));
super.addInformation(itemStack, entityPlayer, list, advancedItemTooltips);
}
}

View file

@ -249,6 +249,7 @@ tile.warpdrive.detection.cloaking_core.name=Tarnfeld Kern
tile.warpdrive.detection.monitor.name=Monitor
tile.warpdrive.detection.radar.name=Radar
tile.warpdrive.detection.warp_isolation.name=Warp-Feld Isolations Block
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Place up to %5$d m away from a ship core\nUsing %1$d to %3$d isolation blocks will absorb %2$d %% to %4$d %% of radar waves
tile.warpdrive.detection.siren.tooltip=Ausgelöst durch ein Redstone Signal.
tile.warpdrive.detection.siren0.name=Industrielle Sirene

View file

@ -246,6 +246,7 @@ tile.warpdrive.detection.cloaking_core.name=Cloaking Core
tile.warpdrive.detection.monitor.name=Monitor
tile.warpdrive.detection.radar.name=Radar
tile.warpdrive.detection.warp_isolation.name=Warp-field Isolation Block
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Place up to %5$d m away from a ship core\nUsing %1$d to %3$d isolation blocks will absorb %2$d %% to %4$d %% of radar waves
tile.warpdrive.detection.siren.tooltip=Triggered by redstone
tile.warpdrive.detection.siren0.name=Industrial Siren

View file

@ -246,6 +246,7 @@ tile.warpdrive.detection.cloaking_core.name=Noyau d'invisibilité
tile.warpdrive.detection.monitor.name=Moniteur
tile.warpdrive.detection.radar.name=Radar
tile.warpdrive.detection.warp_isolation.name=Bloc d'isolation de champ de Warp
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Placer jusqu'à %5$d m par rapport au coeur de vaisseau\nUtilise %1$d à %3$d blocs d'isolation pour absorber %2$d %% à %4$d %% des ondes radar
tile.warpdrive.detection.siren.tooltip=Déclenchement par redstone
tile.warpdrive.detection.siren0.name=Sirène industrielle

View file

@ -246,6 +246,7 @@ tile.warpdrive.detection.cloaking_core.name=Dekmantelveld-kern
tile.warpdrive.detection.monitor.name=Monitor
tile.warpdrive.detection.radar.name=Radar
tile.warpdrive.detection.warp_isolation.name=Warp-veld isolatieblok
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Place up to %5$d m away from a ship core\nUsing %1$d to %3$d isolation blocks will absorb %2$d %% to %4$d %% of radar waves
tile.warpdrive.detection.siren.tooltip=Aangezet door redstone
tile.warpdrive.detection.siren0.name=Industrieële Sirene

View file

@ -246,6 +246,7 @@ tile.warpdrive.detection.cloaking_core.name=Маскировщик
tile.warpdrive.detection.monitor.name=Монитор
tile.warpdrive.detection.radar.name=Варп-радар
tile.warpdrive.detection.warp_isolation.name=Блок изоляции варп-поля
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Place up to %5$d m away from a ship core\nUsing %1$d to %3$d isolation blocks will absorb %2$d %% to %4$d %% of radar waves
tile.warpdrive.detection.siren.tooltip=Triggered by redstone
tile.warpdrive.detection.siren0.name=Industrial Siren

View file

@ -246,6 +246,7 @@ tile.warpdrive.detection.cloaking_core.name=隐形核心
tile.warpdrive.detection.monitor.name=监控器
tile.warpdrive.detection.radar.name=雷达
tile.warpdrive.detection.warp_isolation.name=曲率领域隔离方块
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Place up to %5$d m away from a ship core\nUsing %1$d to %3$d isolation blocks will absorb %2$d %% to %4$d %% of radar waves
tile.warpdrive.detection.siren.tooltip=红石触发
tile.warpdrive.detection.siren0.name=工业警报器

View file

@ -166,6 +166,7 @@ tile.warpdrive.detection.cloaking_core.name=僞裝核心
tile.warpdrive.detection.monitor.name=監控
tile.warpdrive.detection.radar.name=雷達
tile.warpdrive.detection.warp_isolation.name=躍遷力場隔絕方塊
tile.warpdrive.detection.warp_isolation.formatted_tooltip=Place up to %5$d m away from a ship core\nUsing %1$d to %3$d isolation blocks will absorb %2$d %% to %4$d %% of radar waves
tile.warpdrive.detection.siren.tooltip=由紅石觸發
tile.warpdrive.detection.siren0.name=警報器