mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Getting started on the Sparks.
This commit is contained in:
1 parent
b947b9c052
commit
3e445083b2
8 files changed
+120
-3
No files matched your search
@@ -47,7 +47,7 @@ import vazkii.botania.client.render.block.RenderSpreader;
|
||||
import vazkii.botania.client.render.block.RenderTinyPotato;
|
||||
import vazkii.botania.client.render.entity.RenderDoppleganger;
|
||||
import vazkii.botania.client.render.entity.RenderPixie;
|
||||
import vazkii.botania.client.render.item.RenderGlassPick;
|
||||
import vazkii.botania.client.render.item.RenderTransparentItem;
|
||||
import vazkii.botania.client.render.item.RenderLens;
|
||||
import vazkii.botania.client.render.item.RenderLexicon;
|
||||
import vazkii.botania.client.render.tile.RenderTileAlfPortal;
|
||||
@@ -130,7 +130,8 @@ public class ClientProxy extends CommonProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.lens, new RenderLens());
|
||||
if(ConfigHandler.lexicon3dModel)
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.lexicon, new RenderLexicon());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.glassPick, new RenderGlassPick());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.glassPick, new RenderTransparentItem());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.spark, new RenderTransparentItem());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileAltar.class, new RenderTileAltar());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileSpreader.class, new RenderTileSpreader());
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class RenderGlassPick implements IItemRenderer {
|
||||
public class RenderTransparentItem implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
@@ -229,6 +229,8 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModBlocks.manaDetector);
|
||||
addBlock(ModBlocks.spreader);
|
||||
addBlock(ModBlocks.turntable);
|
||||
addItem(ModItems.spark);
|
||||
addItem(ModItems.sparkUpgrade);
|
||||
addItem(ModItems.manaGun);
|
||||
addItem(ModItems.lens);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Aug 21, 2014, 5:24:55 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemSpark extends ItemMod {
|
||||
|
||||
public static IIcon invIcon, worldIcon;
|
||||
|
||||
public ItemSpark() {
|
||||
setUnlocalizedName(LibItemNames.SPARK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
invIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
worldIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int p_77617_1_) {
|
||||
return invIcon;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Aug 21, 2014, 5:32:06 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemSparkUpgrade extends ItemMod {
|
||||
|
||||
private static final int VARIANTS = 4;
|
||||
|
||||
public static IIcon[] worldIcons;
|
||||
IIcon[] invIcons;
|
||||
|
||||
public ItemSparkUpgrade() {
|
||||
setUnlocalizedName(LibItemNames.SPARK_UPGRADE);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
worldIcons = new IIcon[VARIANTS];
|
||||
invIcons = new IIcon[VARIANTS];
|
||||
for(int i = 0; i < VARIANTS; i++) {
|
||||
worldIcons[i] = IconHelper.forItem(par1IconRegister, this, "L" + i);
|
||||
invIcons[i] = IconHelper.forItem(par1IconRegister, this, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return invIcons[Math.min(invIcons.length - 1, meta)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < VARIANTS; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return getUnlocalizedNameLazy(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
}
|
||||
|
||||
String getUnlocalizedNameLazy(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack);
|
||||
}
|
||||
}
|
||||
@@ -149,6 +149,8 @@ public final class ModItems {
|
||||
public static Item superLavaPendant;
|
||||
public static Item enderHand;
|
||||
public static Item glassPick;
|
||||
public static Item spark;
|
||||
public static Item sparkUpgrade;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -233,6 +235,8 @@ public final class ModItems {
|
||||
superLavaPendant = new ItemSuperLavaPendant();
|
||||
enderHand = new ItemEnderHand();
|
||||
glassPick = new ItemGlassPick();
|
||||
spark = new ItemSpark();
|
||||
sparkUpgrade = new ItemSparkUpgrade();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -95,6 +95,8 @@ public final class LibItemNames {
|
||||
public static final String SUPER_LAVA_PENDANT = "superLavaPendant";
|
||||
public static final String ENDER_HAND = "enderHand";
|
||||
public static final String GLASS_PICK = "glassPick";
|
||||
public static final String SPARK = "spark";
|
||||
public static final String SPARK_UPGRADE = "sparkUpgrade";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
@@ -686,6 +686,11 @@ item.botania:itemFinder.name=The Spectator
|
||||
item.botania:superLavaPendant.name=Crimson Pendant
|
||||
item.botania:enderHand.name=Hand of Ender
|
||||
item.botania:glassPick.name=Vitreous Pickaxe
|
||||
item.botania:spark.name=Spark
|
||||
item.botania:sparkUpgrade0.name=Spark Augment: Dispersive
|
||||
item.botania:sparkUpgrade1.name=Spark Augment: Dominant
|
||||
item.botania:sparkUpgrade2.name=Spark Augment: Recessive
|
||||
item.botania:sparkUpgrade3.name=Spark Augment: Isolated
|
||||
|
||||
# GUI TEXT
|
||||
botania.gui.lexicon.header=Lexica Botania, %s Edition Table of Contents
|
||||
|
||||
Reference in new issue
Block a user