@Override public void getProbeConfig( IProbeConfig config, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data ) { if( world.getTileEntity( data.getPos() ) instanceof AEBaseTile ) { config.setRFMode( 0 ); } }
@Override public ConfigMode getAnimalOwnerSetting() { return original.getAnimalOwnerSetting(); }
@Override public ConfigMode getHorseStatSetting() { return original.getHorseStatSetting(); }
private IProbeConfig realCopy() { if (!dirty) { dirty = true; original = new ProbeConfig() .setRFMode(original.getRFMode()) .setTankMode(original.getTankMode()) .showModName(original.getShowModName()) .showChestContents(original.getShowChestContents()) .showChestContentsDetailed(original.getShowChestContentsDetailed()) .showCropPercentage(original.getShowCropPercentage()) .showHarvestLevel(original.getShowHarvestLevel()) .showCanBeHarvested(original.getShowCanBeHarvested()) .showMobHealth(original.getShowMobHealth()) .showMobGrowth(original.getShowMobGrowth()) .showMobPotionEffects(original.getShowMobPotionEffects()) .showRedstone(original.getShowRedstone()) .showLeverSetting(original.getShowLeverSetting()) .showTankSetting(original.getShowTankSetting()) .showBrewStandSetting(original.getShowBrewStandSetting()) .showMobSpawnerSetting(original.getShowMobSpawnerSetting()) .showAnimalOwnerSetting(original.getAnimalOwnerSetting()) .showHorseStatSetting(original.getHorseStatSetting()) .showSilverfish(original.getShowSilverfish()); } return original; }
@Override public void getProbeConfig(IProbeConfig config, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) { TileEntity tile = world.getTileEntity(data.getPos()); if (tile instanceof ISecurable && !((ISecurable) tile).canPlayerAccess(player)) { config.showChestContents(ConfigMode.NOT); config.showRedstone(ConfigMode.NOT); config.showTankSetting(ConfigMode.NOT); config.setRFMode(0); config.setTankMode(0); } } });
EntityLivingBase livingBase = (EntityLivingBase) entity; if (Tools.show(mode, config.getShowMobHealth())) { int health = (int) livingBase.getHealth(); int maxHealth = (int) livingBase.getMaxHealth(); if (Tools.show(mode, config.getShowMobGrowth()) && entity instanceof EntityAgeable) { int age = ((EntityAgeable) entity).getGrowingAge(); if (age < 0) { if (Tools.show(mode, config.getShowMobPotionEffects())) { Collection<PotionEffect> effects = livingBase.getActivePotionEffects(); if (!effects.isEmpty()) { if (Tools.show(mode, config.getAnimalOwnerSetting())) { UUID ownerId = null; if (entity instanceof IEntityOwnable) { if (Tools.show(mode, config.getHorseStatSetting())) { if (entity instanceof EntityHorse) { double jumpStrength = ((EntityHorse) entity).getHorseJumpStrength();
@Override public IProbeConfig showRedstone(ConfigMode mode) { realCopy().showRedstone(mode); return this; }
@Override public IProbeConfig showTankSetting(ConfigMode mode) { realCopy().showTankSetting(mode); return this; }
@Override public IProbeConfig showChestContents(ConfigMode mode) { realCopy().showChestContents(mode); return this; }
@Override public IProbeConfig setTankMode(int mode) { realCopy().setTankMode(mode); return this; }
@Override public void getProbeConfig(IProbeConfig config, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) { if (config != null && blockState != null && blockState.getBlock() instanceof BlockEio) { config.setRFMode(0); } }
@Override public IProbeConfig setRFMode(int showRF) { realCopy().setRFMode(showRF); return this; }