simplified some ItemBlock tooltip code, added tooltips

This commit is contained in:
Boblet 2021-12-03 14:47:56 +01:00
parent 1b18c5d810
commit 608023ee4c
21 changed files with 250 additions and 222 deletions

View File

@ -0,0 +1,16 @@
package com.hbm.blocks;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
public interface ITooltipProvider {
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext);
public default EnumRarity getRarity(ItemStack stack) {
return EnumRarity.common;
}
}

View File

@ -1476,7 +1476,7 @@ public class ModBlocks {
lamp_tritium_green_off = new ReinforcedLamp(Material.redstoneLight, false).setBlockName("lamp_tritium_green_off").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_green_off");
lamp_tritium_green_on = new ReinforcedLamp(Material.redstoneLight, true).setBlockName("lamp_tritium_green_on").setStepSound(Block.soundTypeGlass).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_green_on");
lamp_tritium_blue_off = new ReinforcedLamp(Material.redstoneLight, false).setBlockName("lamp_tritium_blue_off").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_blue_off");
lamp_tritium_blue_on = new ReinforcedLamp(Material.redstoneLight, true).setBlockName("lamp_tritium_blue_on").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.blockTab).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_blue_on");
lamp_tritium_blue_on = new ReinforcedLamp(Material.redstoneLight, true).setBlockName("lamp_tritium_blue_on").setStepSound(Block.soundTypeGlass).setHardness(3.0F).setBlockTextureName(RefStrings.MODID + ":lamp_tritium_blue_on");
lamp_uv_off = new UVLamp(false).setBlockName("lamp_uv_off").setCreativeTab(MainRegistry.blockTab);
lamp_uv_on = new UVLamp(true).setBlockName("lamp_uv_on").setCreativeTab(null);
@ -2258,9 +2258,9 @@ public class ModBlocks {
GameRegistry.registerBlock(ore_coltan, ore_coltan.getUnlocalizedName());
//Stone clusters
GameRegistry.registerBlock(cluster_iron, ItemBlockCluster.class, cluster_iron.getUnlocalizedName());
GameRegistry.registerBlock(cluster_titanium, ItemBlockCluster.class, cluster_titanium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_aluminium, ItemBlockCluster.class, cluster_aluminium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_iron, ItemBlockBase.class, cluster_iron.getUnlocalizedName());
GameRegistry.registerBlock(cluster_titanium, ItemBlockBase.class, cluster_titanium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_aluminium, ItemBlockBase.class, cluster_aluminium.getUnlocalizedName());
//Bedrock ores
GameRegistry.registerBlock(ore_bedrock_coltan, ore_bedrock_coltan.getUnlocalizedName());
@ -2307,20 +2307,20 @@ public class ModBlocks {
GameRegistry.registerBlock(ore_gneiss_gas, ore_gneiss_gas.getUnlocalizedName());
//Depth ores
GameRegistry.registerBlock(ore_depth_cinnebar, ItemBlockDepth.class, ore_depth_cinnebar.getUnlocalizedName());
GameRegistry.registerBlock(ore_depth_zirconium, ItemBlockDepth.class, ore_depth_zirconium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_depth_iron, ItemBlockDepth.class, cluster_depth_iron.getUnlocalizedName());
GameRegistry.registerBlock(cluster_depth_titanium, ItemBlockDepth.class, cluster_depth_titanium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_depth_tungsten, ItemBlockDepth.class, cluster_depth_tungsten.getUnlocalizedName());
GameRegistry.registerBlock(ore_depth_cinnebar, ItemBlockBase.class, ore_depth_cinnebar.getUnlocalizedName());
GameRegistry.registerBlock(ore_depth_zirconium, ItemBlockBase.class, ore_depth_zirconium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_depth_iron, ItemBlockBase.class, cluster_depth_iron.getUnlocalizedName());
GameRegistry.registerBlock(cluster_depth_titanium, ItemBlockBase.class, cluster_depth_titanium.getUnlocalizedName());
GameRegistry.registerBlock(cluster_depth_tungsten, ItemBlockBase.class, cluster_depth_tungsten.getUnlocalizedName());
//Nether depth ores
GameRegistry.registerBlock(ore_depth_nether_neodymium, ItemBlockDepth.class, ore_depth_nether_neodymium.getUnlocalizedName());
GameRegistry.registerBlock(ore_depth_nether_neodymium, ItemBlockBase.class, ore_depth_nether_neodymium.getUnlocalizedName());
//Basalt ores
GameRegistry.registerBlock(basalt_sulfur, basalt_sulfur.getUnlocalizedName());
GameRegistry.registerBlock(basalt_fluorite, basalt_fluorite.getUnlocalizedName());
GameRegistry.registerBlock(basalt_asbestos, basalt_asbestos.getUnlocalizedName());
GameRegistry.registerBlock(basalt_gem, ItemBlockCluster.class, basalt_gem.getUnlocalizedName());
GameRegistry.registerBlock(basalt_gem, ItemBlockBase.class, basalt_gem.getUnlocalizedName());
//End Ores
GameRegistry.registerBlock(ore_tikite, ore_tikite.getUnlocalizedName());
@ -2337,13 +2337,13 @@ public class ModBlocks {
GameRegistry.registerBlock(gneiss_brick, gneiss_brick.getUnlocalizedName());
GameRegistry.registerBlock(gneiss_tile, gneiss_tile.getUnlocalizedName());
GameRegistry.registerBlock(gneiss_chiseled, gneiss_chiseled.getUnlocalizedName());
GameRegistry.registerBlock(stone_depth, ItemBlockDepth.class, stone_depth.getUnlocalizedName());
GameRegistry.registerBlock(depth_brick, ItemBlockDepth.class, depth_brick.getUnlocalizedName());
GameRegistry.registerBlock(depth_tiles, ItemBlockDepth.class, depth_tiles.getUnlocalizedName());
GameRegistry.registerBlock(stone_depth_nether, ItemBlockDepth.class, stone_depth_nether.getUnlocalizedName());
GameRegistry.registerBlock(depth_nether_brick, ItemBlockDepth.class, depth_nether_brick.getUnlocalizedName());
GameRegistry.registerBlock(depth_nether_tiles, ItemBlockDepth.class, depth_nether_tiles.getUnlocalizedName());
GameRegistry.registerBlock(depth_dnt, ItemBlockDepth.class, depth_dnt.getUnlocalizedName());
GameRegistry.registerBlock(stone_depth, ItemBlockBase.class, stone_depth.getUnlocalizedName());
GameRegistry.registerBlock(depth_brick, ItemBlockBase.class, depth_brick.getUnlocalizedName());
GameRegistry.registerBlock(depth_tiles, ItemBlockBase.class, depth_tiles.getUnlocalizedName());
GameRegistry.registerBlock(stone_depth_nether, ItemBlockBase.class, stone_depth_nether.getUnlocalizedName());
GameRegistry.registerBlock(depth_nether_brick, ItemBlockBase.class, depth_nether_brick.getUnlocalizedName());
GameRegistry.registerBlock(depth_nether_tiles, ItemBlockBase.class, depth_nether_tiles.getUnlocalizedName());
GameRegistry.registerBlock(depth_dnt, ItemBlockBase.class, depth_dnt.getUnlocalizedName());
GameRegistry.registerBlock(basalt, basalt.getUnlocalizedName());
GameRegistry.registerBlock(basalt_smooth, basalt_smooth.getUnlocalizedName());
GameRegistry.registerBlock(basalt_brick, basalt_brick.getUnlocalizedName());
@ -2411,13 +2411,13 @@ public class ModBlocks {
GameRegistry.registerBlock(ancient_scrap, ItemBlockHazard.class, ancient_scrap.getUnlocalizedName());
GameRegistry.registerBlock(block_corium, ItemBlockHazard.class, block_corium.getUnlocalizedName());
GameRegistry.registerBlock(block_corium_cobble, ItemBlockHazard.class, block_corium_cobble.getUnlocalizedName());
GameRegistry.registerBlock(block_schraranium, ItemBlockSchrabidium.class, block_schraranium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidium, ItemBlockSchrabidium.class, block_schrabidium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidate, ItemBlockSchrabidium.class, block_schrabidate.getUnlocalizedName());
GameRegistry.registerBlock(block_solinium, ItemBlockSchrabidium.class, block_solinium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidium_fuel, ItemBlockSchrabidium.class, block_schrabidium_fuel.getUnlocalizedName());
GameRegistry.registerBlock(block_schraranium, ItemBlockBase.class, block_schraranium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidium, ItemBlockBase.class, block_schrabidium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidate, ItemBlockBase.class, block_schrabidate.getUnlocalizedName());
GameRegistry.registerBlock(block_solinium, ItemBlockBase.class, block_solinium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidium_fuel, ItemBlockBase.class, block_schrabidium_fuel.getUnlocalizedName());
GameRegistry.registerBlock(block_euphemium, ItemBlockLore.class, block_euphemium.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidium_cluster, ItemBlockSchrabidium.class, block_schrabidium_cluster.getUnlocalizedName());
GameRegistry.registerBlock(block_schrabidium_cluster, ItemBlockBase.class, block_schrabidium_cluster.getUnlocalizedName());
GameRegistry.registerBlock(block_euphemium_cluster, ItemBlockLore.class, block_euphemium_cluster.getUnlocalizedName());
GameRegistry.registerBlock(block_dineutronium, block_dineutronium.getUnlocalizedName());
GameRegistry.registerBlock(block_magnetized_tungsten, block_magnetized_tungsten.getUnlocalizedName());
@ -2489,7 +2489,7 @@ public class ModBlocks {
GameRegistry.registerBlock(reinforced_stone, ItemBlockBlastInfo.class, reinforced_stone.getUnlocalizedName());
GameRegistry.registerBlock(reinforced_ducrete, ItemBlockBlastInfo.class, reinforced_ducrete.getUnlocalizedName());
GameRegistry.registerBlock(concrete_smooth, ItemBlockBlastInfo.class, concrete_smooth.getUnlocalizedName());
GameRegistry.registerBlock(concrete_colored, ItemBlockColored.class, concrete_colored.getUnlocalizedName());
GameRegistry.registerBlock(concrete_colored, ItemBlockColoredConcrete.class, concrete_colored.getUnlocalizedName());
GameRegistry.registerBlock(concrete, ItemBlockBlastInfo.class, concrete.getUnlocalizedName());
GameRegistry.registerBlock(concrete_asbestos, ItemBlockBlastInfo.class, concrete_asbestos.getUnlocalizedName());
GameRegistry.registerBlock(ducrete_smooth, ItemBlockBlastInfo.class, ducrete_smooth.getUnlocalizedName());
@ -2570,30 +2570,30 @@ public class ModBlocks {
GameRegistry.registerBlock(steel_beam, steel_beam.getUnlocalizedName());
GameRegistry.registerBlock(steel_scaffold, steel_scaffold.getUnlocalizedName());
GameRegistry.registerBlock(steel_grate, steel_grate.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe, ItemBlockDecoPipe.class, deco_pipe.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rusted, ItemBlockDecoPipe.class, deco_pipe_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_green, ItemBlockDecoPipe.class, deco_pipe_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_green_rusted, ItemBlockDecoPipe.class, deco_pipe_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_red, ItemBlockDecoPipe.class, deco_pipe_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_marked, ItemBlockDecoPipe.class, deco_pipe_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim, ItemBlockDecoPipe.class, deco_pipe_rim.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_rusted, ItemBlockDecoPipe.class, deco_pipe_rim_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_green, ItemBlockDecoPipe.class, deco_pipe_rim_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_green_rusted, ItemBlockDecoPipe.class, deco_pipe_rim_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_red, ItemBlockDecoPipe.class, deco_pipe_rim_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_marked, ItemBlockDecoPipe.class, deco_pipe_rim_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed, ItemBlockDecoPipe.class, deco_pipe_framed.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_rusted, ItemBlockDecoPipe.class, deco_pipe_framed_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_green, ItemBlockDecoPipe.class, deco_pipe_framed_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_green_rusted, ItemBlockDecoPipe.class, deco_pipe_framed_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_red, ItemBlockDecoPipe.class, deco_pipe_framed_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_marked, ItemBlockDecoPipe.class, deco_pipe_framed_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad, ItemBlockDecoPipe.class, deco_pipe_quad.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_rusted, ItemBlockDecoPipe.class, deco_pipe_quad_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_green, ItemBlockDecoPipe.class, deco_pipe_quad_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_green_rusted, ItemBlockDecoPipe.class, deco_pipe_quad_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_red, ItemBlockDecoPipe.class, deco_pipe_quad_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_marked, ItemBlockDecoPipe.class, deco_pipe_quad_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe, ItemBlockBase.class, deco_pipe.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rusted, ItemBlockBase.class, deco_pipe_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_green, ItemBlockBase.class, deco_pipe_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_green_rusted, ItemBlockBase.class, deco_pipe_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_red, ItemBlockBase.class, deco_pipe_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_marked, ItemBlockBase.class, deco_pipe_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim, ItemBlockBase.class, deco_pipe_rim.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_rusted, ItemBlockBase.class, deco_pipe_rim_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_green, ItemBlockBase.class, deco_pipe_rim_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_green_rusted, ItemBlockBase.class, deco_pipe_rim_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_red, ItemBlockBase.class, deco_pipe_rim_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_rim_marked, ItemBlockBase.class, deco_pipe_rim_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed, ItemBlockBase.class, deco_pipe_framed.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_rusted, ItemBlockBase.class, deco_pipe_framed_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_green, ItemBlockBase.class, deco_pipe_framed_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_green_rusted, ItemBlockBase.class, deco_pipe_framed_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_red, ItemBlockBase.class, deco_pipe_framed_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_framed_marked, ItemBlockBase.class, deco_pipe_framed_marked.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad, ItemBlockBase.class, deco_pipe_quad.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_rusted, ItemBlockBase.class, deco_pipe_quad_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_green, ItemBlockBase.class, deco_pipe_quad_green.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_green_rusted, ItemBlockBase.class, deco_pipe_quad_green_rusted.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_red, ItemBlockBase.class, deco_pipe_quad_red.getUnlocalizedName());
GameRegistry.registerBlock(deco_pipe_quad_marked, ItemBlockBase.class, deco_pipe_quad_marked.getUnlocalizedName());
GameRegistry.registerBlock(mush, mush.getUnlocalizedName());
GameRegistry.registerBlock(mush_block, mush_block.getUnlocalizedName());
GameRegistry.registerBlock(mush_block_stem, mush_block_stem.getUnlocalizedName());
@ -2767,16 +2767,16 @@ public class ModBlocks {
GameRegistry.registerBlock(bomber, bomber.getUnlocalizedName());
//Machines
GameRegistry.registerBlock(anvil_iron, ItemBlockAnvil.class, anvil_iron.getUnlocalizedName());
GameRegistry.registerBlock(anvil_lead, ItemBlockAnvil.class, anvil_lead.getUnlocalizedName());
GameRegistry.registerBlock(anvil_steel, ItemBlockAnvil.class, anvil_steel.getUnlocalizedName());
GameRegistry.registerBlock(anvil_meteorite, ItemBlockAnvil.class, anvil_meteorite.getUnlocalizedName());
GameRegistry.registerBlock(anvil_starmetal, ItemBlockAnvil.class, anvil_starmetal.getUnlocalizedName());
GameRegistry.registerBlock(anvil_ferrouranium, ItemBlockAnvil.class, anvil_ferrouranium.getUnlocalizedName());
GameRegistry.registerBlock(anvil_bismuth, ItemBlockAnvil.class, anvil_bismuth.getUnlocalizedName());
GameRegistry.registerBlock(anvil_schrabidate, ItemBlockAnvil.class, anvil_schrabidate.getUnlocalizedName());
GameRegistry.registerBlock(anvil_dnt, ItemBlockAnvil.class, anvil_dnt.getUnlocalizedName());
GameRegistry.registerBlock(anvil_murky, ItemBlockAnvil.class, anvil_murky.getUnlocalizedName());
GameRegistry.registerBlock(anvil_iron, ItemBlockBase.class, anvil_iron.getUnlocalizedName());
GameRegistry.registerBlock(anvil_lead, ItemBlockBase.class, anvil_lead.getUnlocalizedName());
GameRegistry.registerBlock(anvil_steel, ItemBlockBase.class, anvil_steel.getUnlocalizedName());
GameRegistry.registerBlock(anvil_meteorite, ItemBlockBase.class, anvil_meteorite.getUnlocalizedName());
GameRegistry.registerBlock(anvil_starmetal, ItemBlockBase.class, anvil_starmetal.getUnlocalizedName());
GameRegistry.registerBlock(anvil_ferrouranium, ItemBlockBase.class, anvil_ferrouranium.getUnlocalizedName());
GameRegistry.registerBlock(anvil_bismuth, ItemBlockBase.class, anvil_bismuth.getUnlocalizedName());
GameRegistry.registerBlock(anvil_schrabidate, ItemBlockBase.class, anvil_schrabidate.getUnlocalizedName());
GameRegistry.registerBlock(anvil_dnt, ItemBlockBase.class, anvil_dnt.getUnlocalizedName());
GameRegistry.registerBlock(anvil_murky, ItemBlockBase.class, anvil_murky.getUnlocalizedName());
GameRegistry.registerBlock(machine_press, machine_press.getUnlocalizedName());
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
@ -2824,15 +2824,15 @@ public class ModBlocks {
GameRegistry.registerBlock(hadron_plating_striped, hadron_plating_striped.getUnlocalizedName());
GameRegistry.registerBlock(hadron_plating_glass, hadron_plating_glass.getUnlocalizedName());
GameRegistry.registerBlock(hadron_plating_voltz, hadron_plating_voltz.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_alloy, ItemHadronCoil.class, hadron_coil_alloy.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_gold, ItemHadronCoil.class, hadron_coil_gold.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_neodymium, ItemHadronCoil.class, hadron_coil_neodymium.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_magtung, ItemHadronCoil.class, hadron_coil_magtung.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_schrabidium, ItemHadronCoil.class, hadron_coil_schrabidium.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_schrabidate, ItemHadronCoil.class, hadron_coil_schrabidate.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_starmetal, ItemHadronCoil.class, hadron_coil_starmetal.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemHadronCoil.class, hadron_coil_chlorophyte.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_mese, ItemHadronCoil.class, hadron_coil_mese.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_alloy, ItemBlockBase.class, hadron_coil_alloy.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_gold, ItemBlockBase.class, hadron_coil_gold.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_neodymium, ItemBlockBase.class, hadron_coil_neodymium.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_magtung, ItemBlockBase.class, hadron_coil_magtung.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_schrabidium, ItemBlockBase.class, hadron_coil_schrabidium.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_schrabidate, ItemBlockBase.class, hadron_coil_schrabidate.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_starmetal, ItemBlockBase.class, hadron_coil_starmetal.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemBlockBase.class, hadron_coil_chlorophyte.getUnlocalizedName());
GameRegistry.registerBlock(hadron_coil_mese, ItemBlockBase.class, hadron_coil_mese.getUnlocalizedName());
GameRegistry.registerBlock(hadron_power, hadron_power.getUnlocalizedName());
GameRegistry.registerBlock(hadron_power_10m, hadron_power_10m.getUnlocalizedName());
GameRegistry.registerBlock(hadron_power_100m, hadron_power_100m.getUnlocalizedName());
@ -2871,8 +2871,8 @@ public class ModBlocks {
GameRegistry.registerBlock(red_cable, red_cable.getUnlocalizedName());
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
GameRegistry.registerBlock(red_connector, red_connector.getUnlocalizedName());
GameRegistry.registerBlock(red_pylon, red_pylon.getUnlocalizedName());
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
GameRegistry.registerBlock(cable_switch, cable_switch.getUnlocalizedName());
GameRegistry.registerBlock(machine_detector, machine_detector.getUnlocalizedName());
GameRegistry.registerBlock(rf_cable, rf_cable.getUnlocalizedName());

View File

@ -1,9 +1,12 @@
package com.hbm.blocks.generic;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.util.I18nUtil;
import api.hbm.block.IDrillInteraction;
import api.hbm.block.IMiningDrill;
@ -13,10 +16,11 @@ import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
public class BlockCluster extends Block implements IDrillInteraction {
public class BlockCluster extends Block implements IDrillInteraction, ITooltipProvider {
public BlockCluster(Material mat) {
super(mat);
@ -80,4 +84,9 @@ public class BlockCluster extends Block implements IDrillInteraction {
public float getRelativeHardness(World world, int x, int y, int z, int meta, IMiningDrill drill) {
return this.getBlockHardness(world, x, y, z);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.cluster"));
}
}

View File

@ -1,12 +1,19 @@
package com.hbm.blocks.generic;
import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.util.I18nUtil;
import api.hbm.item.IDepthRockTool;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
public class BlockDepth extends Block {
public class BlockDepth extends Block implements ITooltipProvider {
public BlockDepth() {
super(Material.rock);
@ -25,4 +32,9 @@ public class BlockDepth extends Block {
return super.getPlayerRelativeBlockHardness(player, world, x, y, z);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.depth"));
}
}

View File

@ -1,7 +1,10 @@
package com.hbm.blocks.generic;
import java.util.List;
import java.util.Random;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.ModBlocks;
import com.hbm.handler.radiation.ChunkRadiationManager;
import com.hbm.interfaces.IItemHazard;
import com.hbm.main.MainRegistry;
@ -11,12 +14,15 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class BlockHazard extends Block implements IItemHazard {
public class BlockHazard extends Block implements IItemHazard, ITooltipProvider {
ItemHazardModule module;
@ -160,4 +166,20 @@ public class BlockHazard extends Block implements IItemHazard {
FLAMES,
LAVAPOP
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
@Override
public EnumRarity getRarity(ItemStack stack) {
if(this == ModBlocks.block_schraranium
|| this == ModBlocks.block_schraranium
|| this == ModBlocks.block_schrabidate
|| this == ModBlocks.block_solinium
|| this == ModBlocks.block_schrabidium_fuel)
return EnumRarity.rare;
return EnumRarity.common;
}
}

View File

@ -1,5 +1,8 @@
package com.hbm.blocks.generic;
import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.lib.RefStrings;
import cpw.mods.fml.client.registry.RenderingRegistry;
@ -8,10 +11,12 @@ import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockPipe extends Block {
public class BlockPipe extends Block implements ITooltipProvider {
@SideOnly(Side.CLIENT)
private IIcon sideIcon;
@ -82,4 +87,9 @@ public class BlockPipe extends Block {
return j1 | b0;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add("Purely decorative");
}
}

View File

@ -1,13 +1,21 @@
package com.hbm.blocks.generic;
import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.ModBlocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockRotatedPillar;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
public class BlockRotatablePillar extends BlockRotatedPillar {
public class BlockRotatablePillar extends BlockRotatedPillar implements ITooltipProvider {
@SideOnly(Side.CLIENT)
protected IIcon iconSide;
@ -31,4 +39,15 @@ public class BlockRotatablePillar extends BlockRotatedPillar {
return iconSide;
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { }
@Override
public EnumRarity getRarity(ItemStack stack) {
if(this == ModBlocks.block_schrabidium_cluster)
return EnumRarity.rare;
return EnumRarity.common;
}
}

View File

@ -1,18 +1,24 @@
package com.hbm.blocks.machine;
import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.render.block.ct.CT;
import com.hbm.render.block.ct.CTStitchReceiver;
import com.hbm.render.block.ct.IBlockCT;
import com.hbm.util.I18nUtil;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
public class BlockHadronCoil extends Block implements IBlockCT {
public class BlockHadronCoil extends Block implements IBlockCT, ITooltipProvider {
public int factor;
@ -44,4 +50,9 @@ public class BlockHadronCoil extends Block implements IBlockCT {
public boolean canConnect(IBlockAccess world, int x, int y, int z, IBlockCT block) {
return block instanceof BlockHadronCoil;
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(I18nUtil.resolveKey("info.coil") + ": " + factor);
}
}

View File

@ -1,5 +1,8 @@
package com.hbm.blocks.machine;
import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.blocks.ModBlocks;
import com.hbm.lib.RefStrings;
import com.hbm.main.MainRegistry;
@ -16,12 +19,13 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class NTMAnvil extends BlockFalling {
public class NTMAnvil extends BlockFalling implements ITooltipProvider {
public final int tier;
@ -130,4 +134,9 @@ public class NTMAnvil extends BlockFalling {
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.GOLD + "Tier " + tier + " Anvil");
}
}

View File

@ -1,11 +1,16 @@
package com.hbm.blocks.network;
import java.util.List;
import com.hbm.lib.Library;
import com.hbm.tileentity.network.TileEntityConnector;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@ -54,4 +59,10 @@ public class ConnectorRedWire extends PylonBase {
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "10m");
}
}

View File

@ -1,5 +1,6 @@
package com.hbm.blocks.network;
import com.hbm.blocks.ITooltipProvider;
import com.hbm.tileentity.network.TileEntityPylonBase;
import net.minecraft.block.Block;
@ -8,7 +9,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public abstract class PylonBase extends BlockContainer {
public abstract class PylonBase extends BlockContainer implements ITooltipProvider {
protected PylonBase(Material p_i45386_1_) {
super(p_i45386_1_);

View File

@ -1,10 +1,15 @@
package com.hbm.blocks.network;
import java.util.List;
import com.hbm.tileentity.network.TileEntityPylon;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
public class PylonRedWire extends PylonBase {
@ -17,4 +22,10 @@ public class PylonRedWire extends PylonBase {
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityPylon();
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "25m");
}
}

View File

@ -1,29 +0,0 @@
package com.hbm.items.block;
import java.util.List;
import com.hbm.blocks.machine.NTMAnvil;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemBlockAnvil extends ItemBlock {
public ItemBlockAnvil(Block block) {
super(block);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
if(this.field_150939_a instanceof NTMAnvil) {
list.add(EnumChatFormatting.GOLD + "Tier " + ((NTMAnvil)this.field_150939_a).tier + " Anvil");
} else {
list.add("can someone wake bob up and tell him he used ItemBlockAnvil.class on a non-anvil block? thanks.");
}
}
}

View File

@ -0,0 +1,36 @@
package com.hbm.items.block;
import java.util.List;
import com.hbm.blocks.ITooltipProvider;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBlockBase extends ItemBlock {
public ItemBlockBase(Block block) {
super(block);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
if(field_150939_a instanceof ITooltipProvider) {
((ITooltipProvider) field_150939_a).addInformation(itemstack, player, list, bool);
}
}
@Override
public EnumRarity getRarity(ItemStack stack) {
if(field_150939_a instanceof ITooltipProvider) {
return ((ITooltipProvider) field_150939_a).getRarity(stack);
}
return EnumRarity.common;
}
}

View File

@ -9,7 +9,7 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemBlockBlastInfo extends ItemBlock {
public class ItemBlockBlastInfo extends ItemBlockBase {
public ItemBlockBlastInfo(Block block) {
super(block);
@ -18,6 +18,8 @@ public class ItemBlockBlastInfo extends ItemBlock {
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
Item item = stack.getItem();
Block block = Block.getBlockFromItem(item);

View File

@ -1,25 +0,0 @@
package com.hbm.items.block;
import java.util.List;
import com.hbm.util.I18nUtil;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemBlockCluster extends ItemBlock {
public ItemBlockCluster(Block block) {
super(block);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.cluster"));
}
}

View File

@ -6,9 +6,9 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemDye;
import net.minecraft.item.ItemStack;
public class ItemBlockColored extends ItemBlockBlastInfo {
public class ItemBlockColoredConcrete extends ItemBlockBlastInfo {
public ItemBlockColored(Block block) {
public ItemBlockColoredConcrete(Block block) {
super(block);
this.setMaxDamage(0);
this.setHasSubtypes(true);

View File

@ -1,22 +0,0 @@
package com.hbm.items.block;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBlockDecoPipe extends ItemBlock {
public ItemBlockDecoPipe(Block block) {
super(block);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add("Purely decorative");
}
}

View File

@ -1,25 +0,0 @@
package com.hbm.items.block;
import java.util.List;
import com.hbm.util.I18nUtil;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemBlockDepth extends ItemBlock {
public ItemBlockDepth(Block block) {
super(block);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
super.addInformation(stack, player, list, bool);
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.depth"));
}
}

View File

@ -1,17 +0,0 @@
package com.hbm.items.block;
import net.minecraft.block.Block;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
public class ItemBlockSchrabidium extends ItemBlockHazard {
public ItemBlockSchrabidium(Block block) {
super(block);
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.rare;
}
}

View File

@ -1,23 +0,0 @@
package com.hbm.items.block;
import java.util.List;
import com.hbm.blocks.machine.BlockHadronCoil;
import com.hbm.util.I18nUtil;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemHadronCoil extends ItemBlock {
public ItemHadronCoil(Block block) {
super(block);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(I18nUtil.resolveKey("info.coil") + ": " + ((BlockHadronCoil)field_150939_a).factor);
}
}