mirror of
https://github.com/GTNewHorizons/Avaritia.git
synced 2026-11-20 12:19:39 +00:00
Record breaking ender puns
This commit is contained in:
1 parent
f82d4326df
commit
00306fcc07
16 files changed
+330
-90
No files matched your search
@@ -66,6 +66,7 @@ public class Avaritia {
|
||||
public void endGame(FMLPostInitializationEvent event){
|
||||
Compat.compatify();
|
||||
Mincer.countThoseCalories();
|
||||
Grinder.lastMinuteChanges();
|
||||
Achievements.achieve();
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(LudicrousItems.resource, shiny);
|
||||
MinecraftForgeClient.registerItemRenderer(LudicrousItems.singularity, shiny);
|
||||
MinecraftForgeClient.registerItemRenderer(LudicrousItems.endest_pearl, shiny);
|
||||
|
||||
CosmicItemRenderer sparkly = new CosmicItemRenderer();
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ public class Compat {
|
||||
public static boolean bigReactors = false;
|
||||
public static boolean ticon = false;
|
||||
public static boolean pe = false;
|
||||
public static boolean mfr = false;
|
||||
|
||||
public static void census(){
|
||||
nei = Loader.isModLoaded("NotEnoughItems");
|
||||
@@ -42,6 +43,7 @@ public class Compat {
|
||||
bigReactors = Loader.isModLoaded("BigReactors");
|
||||
ticon = Loader.isModLoaded("TConstruct");
|
||||
pe = Loader.isModLoaded("ProjectE");
|
||||
mfr = Loader.isModLoaded("MineFactoryReloaded");
|
||||
}
|
||||
|
||||
public static void compatify(){
|
||||
@@ -219,6 +221,19 @@ public class Compat {
|
||||
pe = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(mfr){
|
||||
try {
|
||||
Item ponk = getItem("MineFactoryReloaded", "mfr.pinkslime");
|
||||
ItemStack pank = new ItemStack(ponk, 1, 1);
|
||||
Grinder.catalyst.getInput().add(pank);
|
||||
}
|
||||
catch (Throwable e){
|
||||
Lumberjack.log(Level.INFO, "Avaritia walked into the laser drill.");
|
||||
e.printStackTrace();
|
||||
mfr = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Block getBlock(String mod, String block) throws ItemNotFoundException {
|
||||
|
||||
@@ -2,11 +2,14 @@ package fox.spiteful.avaritia.crafting;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.avaritia.blocks.LudicrousBlocks;
|
||||
import fox.spiteful.avaritia.compat.Compat;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
@@ -61,7 +64,7 @@ public class Grinder {
|
||||
new ItemStack(LudicrousItems.singularity, 1, 0), new ItemStack(LudicrousItems.singularity, 1, 1),
|
||||
new ItemStack(LudicrousItems.singularity, 1, 2), new ItemStack(LudicrousItems.singularity, 1, 3),
|
||||
new ItemStack(LudicrousItems.singularity, 1, 4), new ItemStack(LudicrousItems.ultimate_stew),
|
||||
new ItemStack(LudicrousItems.cosmic_meatballs)});
|
||||
new ItemStack(LudicrousItems.cosmic_meatballs), new ItemStack(LudicrousItems.endest_pearl)});
|
||||
|
||||
ItemStack result = new ItemStack(LudicrousItems.infinity_pickaxe, 1);
|
||||
result.addEnchantment(Enchantment.fortune, 10);
|
||||
@@ -134,5 +137,35 @@ public class Grinder {
|
||||
if(!OreDictionary.getOres("blockPlatinum").isEmpty()){
|
||||
catalyst.getInput().add(OreDictionary.getOres("blockPlatinum"));
|
||||
}
|
||||
|
||||
ExtremeCraftingManager.getInstance().addExtremeShapedOreRecipe(new ItemStack(LudicrousItems.endest_pearl), new Object[]{
|
||||
" EEE ",
|
||||
" EEPPPEE ",
|
||||
" EPPPPPE ",
|
||||
"EPPPNPPPE",
|
||||
"EPPNSNPPE",
|
||||
"EPPPNPPPE",
|
||||
" EPPPPPE ",
|
||||
" EEPPPEE ",
|
||||
" EEE ",
|
||||
'E', new ItemStack(Blocks.end_stone),
|
||||
'P', new ItemStack(Items.ender_pearl),
|
||||
'S', new ItemStack(Items.nether_star),
|
||||
'N', new ItemStack(LudicrousItems.resource, 1, 4)});
|
||||
}
|
||||
|
||||
public static void lastMinuteChanges(){
|
||||
if (Compat.mfr) {
|
||||
catalyst.getInput().add(OreDictionary.getOres("record"));
|
||||
} else {
|
||||
catalyst.getInput().add(new ItemStack(LudicrousItems.resource, 1, 7));
|
||||
IRecipe smashysmashy;
|
||||
//if (Compat.botan) {
|
||||
// smashysmashy = new ShapelessOreRecipe(new ItemStack(LudicrousItems.resource, 4, 7), "record");
|
||||
//} else {
|
||||
smashysmashy = new ShapelessOreRecipe(new ItemStack(LudicrousItems.resource, 8, 7), "record");
|
||||
//}
|
||||
GameRegistry.addRecipe(smashysmashy);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package fox.spiteful.avaritia.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.render.IHaloRenderItem;
|
||||
import net.minecraft.entity.item.EntityEnderPearl;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemEnderPearl;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemEndestPearl extends ItemEnderPearl implements IHaloRenderItem {
|
||||
|
||||
public ItemEndestPearl() {
|
||||
this.setUnlocalizedName("avaritia_endest_pearl");
|
||||
this.setTextureName("avaritia:endestpearl");
|
||||
this.maxStackSize = 16;
|
||||
this.setCreativeTab(Avaritia.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (player.capabilities.isCreativeMode)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
else
|
||||
{
|
||||
--stack.stackSize;
|
||||
world.playSoundAtEntity(player, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
world.spawnEntityInWorld(new EntityEnderPearl(world, player));
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
return ((ItemResource)LudicrousItems.resource).halo[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
return 0xFF000000;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
package fox.spiteful.avaritia.items;
|
||||
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.render.IHaloRenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -15,10 +17,10 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemResource extends Item {
|
||||
public class ItemResource extends Item implements IHaloRenderItem {
|
||||
|
||||
private static final String[] types = new String[]{"diamond_lattice", "crystal_matrix_ingot", "neutron_pile",
|
||||
"neutron_nugget", "neutronium_ingot", "infinity_catalyst", "infinity_ingot"};
|
||||
"neutron_nugget", "neutronium_ingot", "infinity_catalyst", "infinity_ingot", "record_fragment"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
@@ -45,20 +47,14 @@ public class ItemResource extends Item {
|
||||
halo[1] = ir.registerIcon("avaritia:halonoise");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void addInformation(ItemStack item, EntityPlayer player, List tooltip, boolean wut) {
|
||||
|
||||
switch(item.getItemDamage()) {
|
||||
case 1:
|
||||
tooltip.add(StatCollector.translateToLocal("tooltip.crystal_matrix.desc"));
|
||||
break;
|
||||
case 2:
|
||||
tooltip.add(StatCollector.translateToLocal("tooltip.neutron_pile.desc"));
|
||||
break;
|
||||
case 4:
|
||||
tooltip.add(StatCollector.translateToLocal("tooltip.neutronium.desc"));
|
||||
break;
|
||||
}
|
||||
int meta = item.getItemDamage();
|
||||
if (meta != 0) {
|
||||
tooltip.add(EnumChatFormatting.DARK_GRAY +""+ EnumChatFormatting.ITALIC + StatCollector.translateToLocal("tooltip."+types[meta]+".desc"));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -72,7 +68,8 @@ public class ItemResource extends Item {
|
||||
return super.getUnlocalizedName() + "." + types[i];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (int j = 0; j < types.length; ++j) {
|
||||
@@ -99,4 +96,56 @@ public class ItemResource extends Item {
|
||||
return EnumRarity.common;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
return (meta >= 2 && meta <= 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta == 2 || meta == 3 || meta == 4) {
|
||||
return halo[1];
|
||||
}
|
||||
return halo[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
switch(meta) {
|
||||
case 5:
|
||||
case 6:
|
||||
return 10;
|
||||
}
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
return meta == 5 || meta == 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta == 2) {
|
||||
return 0x33FFFFFF;
|
||||
}
|
||||
if (meta == 3) {
|
||||
return 0x4DFFFFFF;
|
||||
}
|
||||
if (meta == 4) {
|
||||
return 0x99FFFFFF;
|
||||
}
|
||||
return 0xFF000000;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package fox.spiteful.avaritia.items;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.avaritia.Avaritia;
|
||||
import fox.spiteful.avaritia.render.IHaloRenderItem;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
@@ -13,7 +14,7 @@ import net.minecraft.util.MathHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSingularity extends Item {
|
||||
public class ItemSingularity extends Item implements IHaloRenderItem {
|
||||
|
||||
public static final String[] types = new String[]{"iron", "gold", "lapis", "redstone", "quartz", "copper",
|
||||
"tin", "lead", "silver"};
|
||||
@@ -46,7 +47,8 @@ public class ItemSingularity extends Item {
|
||||
return "item.singularity_" + types[i];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (int j = 0; j < types.length; ++j) {
|
||||
@@ -80,4 +82,34 @@ public class ItemSingularity extends Item {
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack) {
|
||||
return ((ItemResource)LudicrousItems.resource).halo[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack) {
|
||||
return 0xFF000000;
|
||||
}
|
||||
}
|
||||
@@ -22,12 +22,14 @@ public class LudicrousItems {
|
||||
public static Item infinity_pickaxe;
|
||||
public static Item infinity_sword;
|
||||
public static Item skull_sword;
|
||||
public static Item ultimate_stew;
|
||||
public static Item cosmic_meatballs;
|
||||
public static Item endest_pearl;
|
||||
|
||||
public static Item akashic_record;
|
||||
public static Item armok_orb;
|
||||
|
||||
public static Item ultimate_stew;
|
||||
public static Item cosmic_meatballs;
|
||||
|
||||
|
||||
public static EnumRarity cosmic = EnumHelper.addRarity("COSMIC", EnumChatFormatting.RED, "Cosmic");
|
||||
|
||||
@@ -42,10 +44,11 @@ public class LudicrousItems {
|
||||
GameRegistry.registerItem(infinity_sword, "Infinity_Sword");
|
||||
skull_sword = new ItemSwordSkulls();
|
||||
GameRegistry.registerItem(skull_sword, "Skull_Sword");
|
||||
|
||||
ultimate_stew = new ItemFood(20,20.0f,false).setPotionEffect(Potion.regeneration.getId(), 300, 1, 1.0f).setTextureName("avaritia:stew").setUnlocalizedName("avaritia_stew").setCreativeTab(Avaritia.tab);
|
||||
GameRegistry.registerItem(ultimate_stew, "Ultimate_Stew");
|
||||
cosmic_meatballs = new ItemFood(20,20.0f,false).setPotionEffect(Potion.damageBoost.getId(), 300, 1, 1.0f).setTextureName("avaritia:meatballs").setUnlocalizedName("avaritia_meatballs").setCreativeTab(Avaritia.tab);
|
||||
GameRegistry.registerItem(cosmic_meatballs, "Cosmic_Meatballs");
|
||||
endest_pearl = new ItemEndestPearl();
|
||||
GameRegistry.registerItem(endest_pearl, "Endest_Pearl");
|
||||
}
|
||||
}
|
||||
@@ -1,21 +1,11 @@
|
||||
package fox.spiteful.avaritia.render;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.ARBShaderObjects;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import org.lwjgl.opengl.GL13;
|
||||
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
@@ -27,7 +17,6 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class CosmicItemRenderer implements IItemRenderer {
|
||||
@@ -174,7 +163,6 @@ public class CosmicItemRenderer implements IItemRenderer {
|
||||
}
|
||||
|
||||
public void render(ItemStack item) {
|
||||
int dmg = item.getItemDamage();
|
||||
int passes = 1;
|
||||
if (item.getItem().requiresMultipleRenderPasses())
|
||||
{
|
||||
|
||||
@@ -5,9 +5,6 @@ import java.util.Random;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import fox.spiteful.avaritia.items.ItemResource;
|
||||
import fox.spiteful.avaritia.items.LudicrousItems;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -23,14 +20,13 @@ public class FancyHaloRenderer implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
int meta = item.getItemDamage();
|
||||
Item itype = item.getItem();
|
||||
if (itype == LudicrousItems.resource) {
|
||||
if (meta < 2) { return false; }
|
||||
} else if (itype == LudicrousItems.singularity) {
|
||||
if (itype instanceof IHaloRenderItem) {
|
||||
IHaloRenderItem ihri = (IHaloRenderItem)itype;
|
||||
|
||||
} else {
|
||||
return false;
|
||||
if (!(ihri.drawHalo(item) || ihri.drawPulseEffect(item))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
switch(type) {
|
||||
@@ -48,42 +44,28 @@ public class FancyHaloRenderer implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
boolean renderHalo = false;
|
||||
boolean renderPulse = false;
|
||||
|
||||
int spread = 0;
|
||||
IIcon halo = null;
|
||||
int haloColour = 0;
|
||||
|
||||
Item itype = item.getItem();
|
||||
if (itype instanceof IHaloRenderItem) {
|
||||
IHaloRenderItem ihri = (IHaloRenderItem)itype;
|
||||
|
||||
spread = ihri.getHaloSize(item);
|
||||
halo = ihri.getHaloTexture(item);
|
||||
haloColour = ihri.getHaloColour(item);
|
||||
|
||||
renderHalo = ihri.drawHalo(item);
|
||||
renderPulse = ihri.drawPulseEffect(item);
|
||||
}
|
||||
|
||||
RenderItem r = RenderItem.getInstance();
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Tessellator t = Tessellator.instance;
|
||||
IIcon[] halos = ((ItemResource)LudicrousItems.resource).halo;
|
||||
IIcon halo = halos[1];
|
||||
int spread = 8;
|
||||
int meta = item.getItemDamage();
|
||||
Item itype = item.getItem();
|
||||
|
||||
if (itype == LudicrousItems.resource) {
|
||||
switch(meta) {
|
||||
case 2:
|
||||
GL11.glColor4d(1.0, 1.0, 1.0, 0.2);
|
||||
spread = 8;
|
||||
break;
|
||||
case 3:
|
||||
GL11.glColor4d(1.0, 1.0, 1.0, 0.3);
|
||||
spread = 8;
|
||||
break;
|
||||
case 4:
|
||||
GL11.glColor4d(1.0, 1.0, 1.0, 0.6);
|
||||
spread = 8;
|
||||
break;
|
||||
case 5:
|
||||
case 6:
|
||||
GL11.glColor4d(0, 0, 0, 1.0);
|
||||
spread = 10;
|
||||
break;
|
||||
default:
|
||||
GL11.glColor4d(1.0, 1.0, 1.0, 1.0);
|
||||
spread = 5;
|
||||
}
|
||||
} else if (itype == LudicrousItems.singularity) {
|
||||
GL11.glColor4d(0, 0, 0, 1.0);
|
||||
spread = 4;
|
||||
}
|
||||
|
||||
switch(type) {
|
||||
case ENTITY:
|
||||
@@ -97,14 +79,22 @@ public class FancyHaloRenderer implements IItemRenderer {
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
t.startDrawingQuads();
|
||||
t.addVertexWithUV(0-spread, 0-spread, 0, halo.getMinU(), halo.getMinV());
|
||||
t.addVertexWithUV(0-spread, 16+spread, 0, halo.getMinU(), halo.getMaxV());
|
||||
t.addVertexWithUV(16+spread, 16+spread, 0, halo.getMaxU(), halo.getMaxV());
|
||||
t.addVertexWithUV(16+spread, 0-spread, 0, halo.getMaxU(), halo.getMinV());
|
||||
t.draw();
|
||||
if (renderHalo) {
|
||||
float ca = (float)(haloColour >> 24 & 255) / 255.0F;
|
||||
float cr = (float)(haloColour >> 16 & 255) / 255.0F;
|
||||
float cg = (float)(haloColour >> 8 & 255) / 255.0F;
|
||||
float cb = (float)(haloColour & 255) / 255.0F;
|
||||
GL11.glColor4f(cr, cg, cb, ca);
|
||||
|
||||
t.startDrawingQuads();
|
||||
t.addVertexWithUV(0-spread, 0-spread, 0, halo.getMinU(), halo.getMinV());
|
||||
t.addVertexWithUV(0-spread, 16+spread, 0, halo.getMinU(), halo.getMaxV());
|
||||
t.addVertexWithUV(16+spread, 16+spread, 0, halo.getMaxU(), halo.getMaxV());
|
||||
t.addVertexWithUV(16+spread, 0-spread, 0, halo.getMaxU(), halo.getMinV());
|
||||
t.draw();
|
||||
}
|
||||
|
||||
if (itype == LudicrousItems.resource && (meta == 5 || meta == 6)) {
|
||||
if (renderPulse) {
|
||||
GL11.glPushMatrix();
|
||||
double xs = (rand.nextGaussian() * 0.15) + 0.95;
|
||||
double ox = (1-xs)/2.0;
|
||||
@@ -112,8 +102,6 @@ public class FancyHaloRenderer implements IItemRenderer {
|
||||
GL11.glTranslated(ox*16.0, ox*16.0, 1.0);
|
||||
GL11.glScaled(xs, xs, 1.0);
|
||||
|
||||
//GL11.glColor4d(1.0, 1.0, 1.0, 0.3);
|
||||
|
||||
IIcon icon = item.getItem().getIcon(item, 0);
|
||||
|
||||
t.startDrawingQuads();
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package fox.spiteful.avaritia.render;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public interface IHaloRenderItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawHalo(ItemStack stack);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getHaloTexture(ItemStack stack);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloSize(ItemStack stack);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean drawPulseEffect(ItemStack stack);
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getHaloColour(ItemStack stack);
|
||||
}
|
||||
@@ -2,15 +2,11 @@ package fox.spiteful.avaritia.render;
|
||||
|
||||
import java.nio.FloatBuffer;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.lwjgl.BufferUtils;
|
||||
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent;
|
||||
import fox.spiteful.avaritia.Lumberjack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
|
||||
|
||||
Reference in new issue
Block a user