Much improve the StackInfoHUD and move it to RC
This commit is contained in:
parent
24455a148c
commit
467544ebfe
3 changed files with 85 additions and 185 deletions
|
@ -30,7 +30,6 @@ import techreborn.client.ClientMultiBlocks;
|
|||
import techreborn.client.IconSupplier;
|
||||
import techreborn.client.RegisterItemJsons;
|
||||
import techreborn.client.StackToolTipEvent;
|
||||
import techreborn.client.hud.ChargeHud;
|
||||
import techreborn.client.keybindings.KeyBindings;
|
||||
import techreborn.client.render.ModelDynamicCell;
|
||||
import techreborn.client.render.entitys.RenderNukePrimed;
|
||||
|
@ -45,6 +44,26 @@ public class ClientProxy extends CommonProxy {
|
|||
|
||||
public static MultiblockRenderEvent multiblockRenderEvent;
|
||||
|
||||
public static ResourceLocation getItemLocation(Item item) {
|
||||
Object o = item.getRegistryName();
|
||||
if (o == null) {
|
||||
return null;
|
||||
}
|
||||
return (ResourceLocation) o;
|
||||
}
|
||||
|
||||
private static ResourceLocation registerIt(Item item, final ResourceLocation location) {
|
||||
ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return new ModelResourceLocation(location, "inventory");
|
||||
}
|
||||
});
|
||||
ModelLoader.registerItemVariants(item, location);
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
super.preInit(event);
|
||||
|
@ -89,7 +108,6 @@ public class ClientProxy extends CommonProxy {
|
|||
public void init(FMLInitializationEvent event) {
|
||||
super.init(event);
|
||||
MinecraftForge.EVENT_BUS.register(new IconSupplier());
|
||||
MinecraftForge.EVENT_BUS.register(new ChargeHud());
|
||||
//MinecraftForge.EVENT_BUS.register(new VersionCheckerClient());
|
||||
MinecraftForge.EVENT_BUS.register(new StackToolTipEvent());
|
||||
multiblockRenderEvent = new MultiblockRenderEvent();
|
||||
|
@ -118,34 +136,6 @@ public class ClientProxy extends CommonProxy {
|
|||
return registerIt(item, itemLocation);
|
||||
}
|
||||
|
||||
public static ResourceLocation getItemLocation(Item item) {
|
||||
Object o = item.getRegistryName();
|
||||
if (o == null) {
|
||||
return null;
|
||||
}
|
||||
return (ResourceLocation) o;
|
||||
}
|
||||
|
||||
private static ResourceLocation registerIt(Item item, final ResourceLocation location) {
|
||||
ModelLoader.setCustomMeshDefinition(item, new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return new ModelResourceLocation(location, "inventory");
|
||||
}
|
||||
});
|
||||
ModelLoader.registerItemVariants(item, location);
|
||||
|
||||
return location;
|
||||
}
|
||||
|
||||
public class RenderManagerNuke implements IRenderFactory<EntityNukePrimed> {
|
||||
|
||||
@Override
|
||||
public Render<? super EntityNukePrimed> createRenderFor(RenderManager manager) {
|
||||
return new RenderNukePrimed(manager);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerFluidBlockRendering(Block block, String name) {
|
||||
name = name.toLowerCase();
|
||||
|
@ -202,4 +192,12 @@ public class ClientProxy extends CommonProxy {
|
|||
return isChiselAround;
|
||||
}
|
||||
|
||||
public class RenderManagerNuke implements IRenderFactory<EntityNukePrimed> {
|
||||
|
||||
@Override
|
||||
public Render<? super EntityNukePrimed> createRenderFor(RenderManager manager) {
|
||||
return new RenderNukePrimed(manager);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue