Added WIP tool tip

This commit is contained in:
modmuss50 2016-03-23 18:59:39 +00:00
parent 1d9fe100b1
commit a1078a4951
3 changed files with 53 additions and 20 deletions

View file

@ -39,6 +39,7 @@ import techreborn.packets.PacketAesu;
import techreborn.packets.PacketIdsu;
import techreborn.proxies.CommonProxy;
import techreborn.tiles.idsu.IDSUManager;
import techreborn.utils.StackWIPHandler;
import techreborn.world.TechRebornWorldGen;
import java.io.File;
@ -139,6 +140,7 @@ public class Core {
MinecraftForge.EVENT_BUS.register(new TRTickHandler());
MinecraftForge.EVENT_BUS.register(new OreUnifier());
MinecraftForge.EVENT_BUS.register(worldGen.retroGen);
MinecraftForge.EVENT_BUS.register(new StackWIPHandler());
//Scrapbox
if (config.scrapboxDispenser) {
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.scrapBox, new BehaviorDispenseScrapbox());

View file

@ -111,8 +111,8 @@ public class ModItems {
GameRegistry.registerItem(nuggets, "nuggets");
crushedOre = new ItemCrushedOre();
GameRegistry.registerItem(crushedOre, "crushedore");
purifiedCrushedOre = new ItemPurifiedCrushedOre();
GameRegistry.registerItem(purifiedCrushedOre, "purifiedCrushedOre");
//purifiedCrushedOre = new ItemPurifiedCrushedOre();
//GameRegistry.registerItem(purifiedCrushedOre, "purifiedCrushedOre");
parts = new ItemParts();
GameRegistry.registerItem(parts, "part");
cells = new ItemCells();
@ -657,24 +657,24 @@ public class ModItems {
OreUnifier.registerOre("crushedTungsten", ItemCrushedOre.getCrushedOreByName("Tungsten"));
// Purified Crushed Ore
OreUnifier.registerOre("crushedPurifiedAluminum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
OreUnifier.registerOre("crushedPurifiedAluminium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
OreUnifier.registerOre("crushedPurifiedArdite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Ardite"));
OreUnifier.registerOre("crushedPurifiedBauxite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Bauxite"));
OreUnifier.registerOre("crushedPurifiedCadmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cadmium"));
OreUnifier.registerOre("crushedPurifiedCinnabar", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cinnabar"));
OreUnifier.registerOre("crushedPurifiedCobalt", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cobalt"));
OreUnifier.registerOre("crushedPurifiedDarkIron", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("DarkIron"));
OreUnifier.registerOre("crushedPurifiedGalena", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Galena"));
OreUnifier.registerOre("crushedPurifiedIndium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Indium"));
OreUnifier.registerOre("crushedPurifiedIridium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Iridium"));
OreUnifier.registerOre("crushedPurifiedNickel", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Nickel"));
OreUnifier.registerOre("crushedPurifiedOsmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Osmium"));
OreUnifier.registerOre("crushedPurifiedPlatinum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Platinum"));
OreUnifier.registerOre("crushedPurifiedPyrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Pyrite"));
OreUnifier.registerOre("crushedPurifiedSphalerite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Sphalerite"));
OreUnifier.registerOre("crushedPurifiedTetrahedrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tetrahedrite"));
OreUnifier.registerOre("crushedPurifiedTungsten", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tungsten"));
// OreUnifier.registerOre("crushedPurifiedAluminum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
// OreUnifier.registerOre("crushedPurifiedAluminium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
// OreUnifier.registerOre("crushedPurifiedArdite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Ardite"));
// OreUnifier.registerOre("crushedPurifiedBauxite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Bauxite"));
// OreUnifier.registerOre("crushedPurifiedCadmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cadmium"));
// OreUnifier.registerOre("crushedPurifiedCinnabar", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cinnabar"));
// OreUnifier.registerOre("crushedPurifiedCobalt", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cobalt"));
// OreUnifier.registerOre("crushedPurifiedDarkIron", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("DarkIron"));
// OreUnifier.registerOre("crushedPurifiedGalena", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Galena"));
// OreUnifier.registerOre("crushedPurifiedIndium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Indium"));
// OreUnifier.registerOre("crushedPurifiedIridium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Iridium"));
// OreUnifier.registerOre("crushedPurifiedNickel", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Nickel"));
// OreUnifier.registerOre("crushedPurifiedOsmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Osmium"));
// OreUnifier.registerOre("crushedPurifiedPlatinum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Platinum"));
// OreUnifier.registerOre("crushedPurifiedPyrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Pyrite"));
// OreUnifier.registerOre("crushedPurifiedSphalerite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Sphalerite"));
// OreUnifier.registerOre("crushedPurifiedTetrahedrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tetrahedrite"));
// OreUnifier.registerOre("crushedPurifiedTungsten", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tungsten"));
OreUnifier.registerOre("craftingGrinder", ItemParts.getPartByName("diamondGrindingHead"));
OreUnifier.registerOre("craftingGrinder", ItemParts.getPartByName("tungstenGrindingHead"));

View file

@ -0,0 +1,31 @@
package techreborn.utils;
import net.minecraft.block.Block;
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import techreborn.init.ModBlocks;
import java.util.ArrayList;
/**
* Created by Mark on 23/03/2016.
*/
public class StackWIPHandler {
ArrayList<Block> wipBlocks = new ArrayList<>();
public StackWIPHandler() {
wipBlocks.add(ModBlocks.LightningRod);
wipBlocks.add(ModBlocks.MagicalAbsorber);
wipBlocks.add(ModBlocks.ChunkLoader);
wipBlocks.add(ModBlocks.ElectricCraftingTable);
}
@SubscribeEvent
public void toolTip(ItemTooltipEvent event){
Block block = Block.getBlockFromItem(event.itemStack.getItem());
if(block != null && wipBlocks.contains(block)){
event.toolTip.add("WIP");
}
}
}