Added WIP tool tip
This commit is contained in:
parent
1d9fe100b1
commit
a1078a4951
3 changed files with 53 additions and 20 deletions
|
@ -39,6 +39,7 @@ import techreborn.packets.PacketAesu;
|
||||||
import techreborn.packets.PacketIdsu;
|
import techreborn.packets.PacketIdsu;
|
||||||
import techreborn.proxies.CommonProxy;
|
import techreborn.proxies.CommonProxy;
|
||||||
import techreborn.tiles.idsu.IDSUManager;
|
import techreborn.tiles.idsu.IDSUManager;
|
||||||
|
import techreborn.utils.StackWIPHandler;
|
||||||
import techreborn.world.TechRebornWorldGen;
|
import techreborn.world.TechRebornWorldGen;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -139,6 +140,7 @@ public class Core {
|
||||||
MinecraftForge.EVENT_BUS.register(new TRTickHandler());
|
MinecraftForge.EVENT_BUS.register(new TRTickHandler());
|
||||||
MinecraftForge.EVENT_BUS.register(new OreUnifier());
|
MinecraftForge.EVENT_BUS.register(new OreUnifier());
|
||||||
MinecraftForge.EVENT_BUS.register(worldGen.retroGen);
|
MinecraftForge.EVENT_BUS.register(worldGen.retroGen);
|
||||||
|
MinecraftForge.EVENT_BUS.register(new StackWIPHandler());
|
||||||
//Scrapbox
|
//Scrapbox
|
||||||
if (config.scrapboxDispenser) {
|
if (config.scrapboxDispenser) {
|
||||||
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.scrapBox, new BehaviorDispenseScrapbox());
|
BlockDispenser.dispenseBehaviorRegistry.putObject(ModItems.scrapBox, new BehaviorDispenseScrapbox());
|
||||||
|
|
|
@ -111,8 +111,8 @@ public class ModItems {
|
||||||
GameRegistry.registerItem(nuggets, "nuggets");
|
GameRegistry.registerItem(nuggets, "nuggets");
|
||||||
crushedOre = new ItemCrushedOre();
|
crushedOre = new ItemCrushedOre();
|
||||||
GameRegistry.registerItem(crushedOre, "crushedore");
|
GameRegistry.registerItem(crushedOre, "crushedore");
|
||||||
purifiedCrushedOre = new ItemPurifiedCrushedOre();
|
//purifiedCrushedOre = new ItemPurifiedCrushedOre();
|
||||||
GameRegistry.registerItem(purifiedCrushedOre, "purifiedCrushedOre");
|
//GameRegistry.registerItem(purifiedCrushedOre, "purifiedCrushedOre");
|
||||||
parts = new ItemParts();
|
parts = new ItemParts();
|
||||||
GameRegistry.registerItem(parts, "part");
|
GameRegistry.registerItem(parts, "part");
|
||||||
cells = new ItemCells();
|
cells = new ItemCells();
|
||||||
|
@ -657,24 +657,24 @@ public class ModItems {
|
||||||
OreUnifier.registerOre("crushedTungsten", ItemCrushedOre.getCrushedOreByName("Tungsten"));
|
OreUnifier.registerOre("crushedTungsten", ItemCrushedOre.getCrushedOreByName("Tungsten"));
|
||||||
|
|
||||||
// Purified Crushed Ore
|
// Purified Crushed Ore
|
||||||
OreUnifier.registerOre("crushedPurifiedAluminum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
|
// OreUnifier.registerOre("crushedPurifiedAluminum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
|
||||||
OreUnifier.registerOre("crushedPurifiedAluminium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
|
// OreUnifier.registerOre("crushedPurifiedAluminium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Aluminum"));
|
||||||
OreUnifier.registerOre("crushedPurifiedArdite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Ardite"));
|
// OreUnifier.registerOre("crushedPurifiedArdite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Ardite"));
|
||||||
OreUnifier.registerOre("crushedPurifiedBauxite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Bauxite"));
|
// OreUnifier.registerOre("crushedPurifiedBauxite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Bauxite"));
|
||||||
OreUnifier.registerOre("crushedPurifiedCadmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cadmium"));
|
// OreUnifier.registerOre("crushedPurifiedCadmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cadmium"));
|
||||||
OreUnifier.registerOre("crushedPurifiedCinnabar", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cinnabar"));
|
// OreUnifier.registerOre("crushedPurifiedCinnabar", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cinnabar"));
|
||||||
OreUnifier.registerOre("crushedPurifiedCobalt", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cobalt"));
|
// OreUnifier.registerOre("crushedPurifiedCobalt", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Cobalt"));
|
||||||
OreUnifier.registerOre("crushedPurifiedDarkIron", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("DarkIron"));
|
// OreUnifier.registerOre("crushedPurifiedDarkIron", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("DarkIron"));
|
||||||
OreUnifier.registerOre("crushedPurifiedGalena", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Galena"));
|
// OreUnifier.registerOre("crushedPurifiedGalena", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Galena"));
|
||||||
OreUnifier.registerOre("crushedPurifiedIndium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Indium"));
|
// OreUnifier.registerOre("crushedPurifiedIndium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Indium"));
|
||||||
OreUnifier.registerOre("crushedPurifiedIridium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Iridium"));
|
// OreUnifier.registerOre("crushedPurifiedIridium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Iridium"));
|
||||||
OreUnifier.registerOre("crushedPurifiedNickel", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Nickel"));
|
// OreUnifier.registerOre("crushedPurifiedNickel", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Nickel"));
|
||||||
OreUnifier.registerOre("crushedPurifiedOsmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Osmium"));
|
// OreUnifier.registerOre("crushedPurifiedOsmium", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Osmium"));
|
||||||
OreUnifier.registerOre("crushedPurifiedPlatinum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Platinum"));
|
// OreUnifier.registerOre("crushedPurifiedPlatinum", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Platinum"));
|
||||||
OreUnifier.registerOre("crushedPurifiedPyrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Pyrite"));
|
// OreUnifier.registerOre("crushedPurifiedPyrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Pyrite"));
|
||||||
OreUnifier.registerOre("crushedPurifiedSphalerite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Sphalerite"));
|
// OreUnifier.registerOre("crushedPurifiedSphalerite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Sphalerite"));
|
||||||
OreUnifier.registerOre("crushedPurifiedTetrahedrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tetrahedrite"));
|
// OreUnifier.registerOre("crushedPurifiedTetrahedrite", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tetrahedrite"));
|
||||||
OreUnifier.registerOre("crushedPurifiedTungsten", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tungsten"));
|
// OreUnifier.registerOre("crushedPurifiedTungsten", ItemPurifiedCrushedOre.getPurifiedCrushedOreByName("Tungsten"));
|
||||||
|
|
||||||
OreUnifier.registerOre("craftingGrinder", ItemParts.getPartByName("diamondGrindingHead"));
|
OreUnifier.registerOre("craftingGrinder", ItemParts.getPartByName("diamondGrindingHead"));
|
||||||
OreUnifier.registerOre("craftingGrinder", ItemParts.getPartByName("tungstenGrindingHead"));
|
OreUnifier.registerOre("craftingGrinder", ItemParts.getPartByName("tungstenGrindingHead"));
|
||||||
|
|
31
src/main/java/techreborn/utils/StackWIPHandler.java
Normal file
31
src/main/java/techreborn/utils/StackWIPHandler.java
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue