mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Cleaaanup~
This commit is contained in:
1 parent
bc6c9e37f1
commit
24b401ac63
20 files changed
+96
-108
No files matched your search
@@ -17,11 +17,11 @@ import vazkii.botania.api.mana.IManaReceiver;
|
||||
public interface ISparkAttachable extends IManaReceiver {
|
||||
|
||||
public boolean canAttachSpark(ItemStack stack);
|
||||
|
||||
|
||||
public void attachSpark(ISparkEntity entity);
|
||||
|
||||
|
||||
public ISparkEntity getAttachedSpark();
|
||||
|
||||
|
||||
public boolean areIncomingTranfersDone();
|
||||
|
||||
|
||||
}
|
||||
@@ -12,22 +12,19 @@
|
||||
package vazkii.botania.api.mana.spark;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ISparkEntity {
|
||||
|
||||
|
||||
public ISparkAttachable getAttachedTile();
|
||||
|
||||
public Collection<ISparkEntity> getTransfers();
|
||||
|
||||
|
||||
public void registerTransfer(ISparkEntity entity);
|
||||
|
||||
|
||||
public int getUpgrade();
|
||||
|
||||
|
||||
public void setUpgrade(int upgrade);
|
||||
|
||||
|
||||
public boolean areIncomingTransfersDone();
|
||||
|
||||
}
|
||||
@@ -13,22 +13,21 @@ package vazkii.botania.api.mana.spark;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public final class SparkHelper {
|
||||
|
||||
public static final int SPARK_SCAN_RANGE = 12;
|
||||
|
||||
|
||||
public static List<ISparkEntity> getSparksAround(World world, double x, double y, double z) {
|
||||
return SparkHelper.getEntitiesAround(ISparkEntity.class, world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
public static <T> List<T> getEntitiesAround(Class<? extends T> clazz, World world, double x, double y, double z) {
|
||||
int r = SPARK_SCAN_RANGE;
|
||||
List<T> entities = world.getEntitiesWithinAABB(clazz, AxisAlignedBB.getBoundingBox(x - r, y - r, z - r, x + r, y + r, z + r));
|
||||
return entities;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -22,7 +22,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.api.mana.TileSignature;
|
||||
import vazkii.botania.client.core.handler.LightningHandler.LightningBolt;
|
||||
import vazkii.botania.client.core.proxy.ClientProxy;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
import vazkii.botania.common.core.handler.ManaNetworkHandler;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
|
||||
@@ -44,22 +44,22 @@ public class RenderSpark extends RenderEntity {
|
||||
|
||||
int time = ClientTickHandler.ticksInGame;
|
||||
time += new Random(par1Entity.getEntityId()).nextInt();
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.7F + (0.3F * (float) (Math.sin((double) time / 5.0) + 0.5) * 2));
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.7F + 0.3F * (float) (Math.sin(time / 5.0) + 0.5) * 2);
|
||||
|
||||
float scale = 0.75F + 0.1F * (float) (Math.sin((double) time / 10));
|
||||
float scale = 0.75F + 0.1F * (float) Math.sin((double) time / 10);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
this.bindEntityTexture(par1Entity);
|
||||
bindEntityTexture(par1Entity);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
float r = 180.0F - this.renderManager.playerViewY;
|
||||
float r = 180.0F - renderManager.playerViewY;
|
||||
GL11.glRotatef(r, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(25F * (float) (Math.sin((double) time / 15)), 1F, 0F, 0F);
|
||||
this.func_77026_a(tessellator, iicon);
|
||||
GL11.glRotatef(25F * (float) Math.sin((double) time / 15), 1F, 0F, 0F);
|
||||
func_77026_a(tessellator, iicon);
|
||||
int upgrade = spark.getUpgrade() - 1;
|
||||
if(upgrade >= 0 && upgrade < ItemSparkUpgrade.worldIcons.length) {
|
||||
GL11.glTranslatef(-0.02F + (float) (Math.sin((double) time / 20)) * 0.2F, 0.24F + (float) (Math.cos((double) time / 20)) * 0.2F, 0.005F);
|
||||
GL11.glTranslatef(-0.02F + (float) Math.sin((double) time / 20) * 0.2F, 0.24F + (float) Math.cos((double) time / 20) * 0.2F, 0.005F);
|
||||
GL11.glScalef(0.2F, 0.2F, 0.2F);
|
||||
this.func_77026_a(tessellator, ItemSparkUpgrade.worldIcons[upgrade]);
|
||||
func_77026_a(tessellator, ItemSparkUpgrade.worldIcons[upgrade]);
|
||||
}
|
||||
GL11.glRotatef(-r, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
@@ -86,12 +86,12 @@ public class RenderSpark extends RenderEntity {
|
||||
p_77026_1_.startDrawingQuads();
|
||||
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
p_77026_1_.setBrightness(240);
|
||||
p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(0.0F - f6), 0.0D, (double)f, (double)f3);
|
||||
p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(0.0F - f6), 0.0D, (double)f1, (double)f3);
|
||||
p_77026_1_.addVertexWithUV((double)(f4 - f5), (double)(f4 - f6), 0.0D, (double)f1, (double)f2);
|
||||
p_77026_1_.addVertexWithUV((double)(0.0F - f5), (double)(f4 - f6), 0.0D, (double)f, (double)f2);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, 0.0F - f6, 0.0D, f, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, 0.0F - f6, 0.0D, f1, f3);
|
||||
p_77026_1_.addVertexWithUV(f4 - f5, f4 - f6, 0.0D, f1, f2);
|
||||
p_77026_1_.addVertexWithUV(0.0F - f5, f4 - f6, 0.0D, f, f2);
|
||||
p_77026_1_.draw();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
boolean inf = tileentity.getWorldObj() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1;
|
||||
boolean dil = tileentity.getWorldObj() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2;
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture);
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
@@ -123,7 +123,7 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
forceMeta = 0;
|
||||
forceMana = false;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@ import vazkii.botania.common.item.ItemWaterRod;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
|
||||
@@ -105,14 +104,14 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private boolean isValidWaterContainer(ItemStack stack) {
|
||||
if(stack.stackSize != 1)
|
||||
return false;
|
||||
FluidStack fluidStack = FluidContainerRegistry.getFluidForFilledItem(stack);
|
||||
return fluidStack != null && fluidStack.getFluid() == FluidRegistry.WATER && fluidStack.amount >= FluidContainerRegistry.BUCKET_VOLUME;
|
||||
return fluidStack != null && fluidStack.getFluid() == FluidRegistry.WATER && fluidStack.amount >= FluidContainerRegistry.BUCKET_VOLUME;
|
||||
}
|
||||
|
||||
|
||||
private ItemStack getContainer(ItemStack stack) {
|
||||
if(stack.getItem().hasContainerItem(stack))
|
||||
return stack.getItem().getContainerItem(stack);
|
||||
|
||||
@@ -175,7 +175,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
|
||||
public static WorldData get(World world) {
|
||||
if(world.mapStorage == null)
|
||||
return null;
|
||||
|
||||
|
||||
WorldData data = (WorldData) world.mapStorage.loadData(WorldData.class, ID);
|
||||
|
||||
if (data == null) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
|
||||
private static final String TAG_MANA = "mana";
|
||||
private static final String TAG_ITEM = "item";
|
||||
private static final String TAG_ENCHANTS = "enchantsToApply";
|
||||
|
||||
|
||||
public int stage = 0;
|
||||
public int stageTicks = 0;
|
||||
|
||||
@@ -181,30 +181,30 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
|
||||
for(ISparkEntity otherSpark : sparkEntities) {
|
||||
if(spark == otherSpark)
|
||||
continue;
|
||||
|
||||
|
||||
if(otherSpark.getAttachedTile() != null && otherSpark.getAttachedTile() instanceof IManaPool)
|
||||
otherSpark.registerTransfer(spark);
|
||||
}
|
||||
}
|
||||
// getManaFromPools : {
|
||||
// int range = 8;
|
||||
// for(int i = -range; i < range + 1; i++)
|
||||
// for(int j = -range; j < range + 1; j++) {
|
||||
// TileEntity tile = worldObj.getTileEntity(xCoord + i, yCoord, zCoord + j);
|
||||
// if(tile instanceof IManaPool) {
|
||||
// IManaPool pool = (IManaPool) tile;
|
||||
// int manaToRemove = Math.min(pool.getCurrentMana(), Math.min(1000, manaRequired - mana + 1));
|
||||
// if(!worldObj.isRemote) {
|
||||
// pool.recieveMana(-manaToRemove);
|
||||
// recieveMana((int) (manaToRemove * 0.9));
|
||||
// sync();
|
||||
// }
|
||||
//
|
||||
// if(mana >= manaRequired)
|
||||
// break getManaFromPools;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// getManaFromPools : {
|
||||
// int range = 8;
|
||||
// for(int i = -range; i < range + 1; i++)
|
||||
// for(int j = -range; j < range + 1; j++) {
|
||||
// TileEntity tile = worldObj.getTileEntity(xCoord + i, yCoord, zCoord + j);
|
||||
// if(tile instanceof IManaPool) {
|
||||
// IManaPool pool = (IManaPool) tile;
|
||||
// int manaToRemove = Math.min(pool.getCurrentMana(), Math.min(1000, manaRequired - mana + 1));
|
||||
// if(!worldObj.isRemote) {
|
||||
// pool.recieveMana(-manaToRemove);
|
||||
// recieveMana((int) (manaToRemove * 0.9));
|
||||
// sync();
|
||||
// }
|
||||
//
|
||||
// if(mana >= manaRequired)
|
||||
// break getManaFromPools;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
public int color = 0;
|
||||
int mana;
|
||||
int knownMana = -1;
|
||||
|
||||
|
||||
public int manaCap = -1;
|
||||
int soundTicks = 0;
|
||||
boolean canAccept = true;
|
||||
@@ -175,7 +175,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
public void updateEntity() {
|
||||
if(manaCap == -1)
|
||||
manaCap = getBlockMetadata() == 2 ? MAX_MANA_DILLUTED : MAX_MANA;
|
||||
|
||||
|
||||
if(!ManaNetworkHandler.instance.isPoolIn(this))
|
||||
ManaNetworkEvent.addPool(this);
|
||||
|
||||
|
||||
@@ -1175,19 +1175,19 @@ public final class ModCrafingRecipes {
|
||||
|
||||
// Spark Recipe
|
||||
for(int i = 0; i < 16; i++)
|
||||
addOreDictRecipe(new ItemStack(ModItems.spark),
|
||||
"BPB", "BNB", "BPB",
|
||||
'B', new ItemStack(Items.blaze_powder),
|
||||
'P', LibOreDict.MANA_PETAL[i],
|
||||
'N', new ItemStack(Items.gold_nugget));
|
||||
addOreDictRecipe(new ItemStack(ModItems.spark),
|
||||
"BPB", "BNB", "BPB",
|
||||
'B', new ItemStack(Items.blaze_powder),
|
||||
'P', LibOreDict.MANA_PETAL[i],
|
||||
'N', new ItemStack(Items.gold_nugget));
|
||||
recipesSpark = BotaniaAPI.getLatestAddedRecipes(16);
|
||||
|
||||
|
||||
// Spark Augment Recipes
|
||||
for(int i = 0; i < 4; i++)
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.sparkUpgrade, 1, i),
|
||||
LibOreDict.PIXIE_DUST, LibOreDict.MANA_STEEL, LibOreDict.RUNE[i]);
|
||||
LibOreDict.PIXIE_DUST, LibOreDict.MANA_STEEL, LibOreDict.RUNE[i]);
|
||||
recipesSparkUpgrades = BotaniaAPI.getLatestAddedRecipes(4);
|
||||
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -26,7 +26,7 @@ import vazkii.botania.common.lib.LibOreDict;
|
||||
public final class ModManaInfusionRecipes {
|
||||
|
||||
public static RecipeManaInfusion poolRecipe;
|
||||
|
||||
|
||||
public static List<RecipeManaInfusion> manaPetalRecipes;
|
||||
public static List<RecipeManaInfusion> manasteelRecipes;
|
||||
public static RecipeManaInfusion manaPearlRecipe;
|
||||
@@ -41,7 +41,7 @@ public final class ModManaInfusionRecipes {
|
||||
|
||||
public static void init() {
|
||||
poolRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.pool), new ItemStack(ModBlocks.pool, 1, 2), 320);
|
||||
|
||||
|
||||
manaPetalRecipes = new ArrayList();
|
||||
for(int i = 0; i < 16; i++)
|
||||
manaPetalRecipes.add(BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaPetal, 1, i), LibOreDict.PETAL[i], 1000));
|
||||
|
||||
@@ -15,8 +15,6 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.ILens;
|
||||
import vazkii.botania.common.item.ItemManaGun;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.ItemTerraPick;
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
}
|
||||
|
||||
Collection<ISparkEntity> transfers = getTransfers();
|
||||
|
||||
|
||||
int upgrade = getUpgrade();
|
||||
if(upgrade != 0) {
|
||||
List<ISparkEntity> sparks = SparkHelper.getSparksAround(worldObj, posX, posY, posZ);
|
||||
@@ -129,7 +129,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
continue;
|
||||
|
||||
int upgrade_ = spark.getUpgrade();
|
||||
if(upgrade_ == 0)
|
||||
if(upgrade_ == 0)
|
||||
spark.registerTransfer(this);
|
||||
}
|
||||
break;
|
||||
@@ -140,7 +140,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
continue;
|
||||
|
||||
int upgrade_ = spark.getUpgrade();
|
||||
if(upgrade_ != 2 && upgrade_ != 3 && upgrade_ != 4)
|
||||
if(upgrade_ != 2 && upgrade_ != 3 && upgrade_ != 4)
|
||||
transfers.add(spark);
|
||||
}
|
||||
break;
|
||||
@@ -161,7 +161,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
tile.recieveMana(-manaTotal);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(removeTransferants > 0)
|
||||
removeTransferants--;
|
||||
}
|
||||
@@ -191,15 +191,15 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
|
||||
@Override
|
||||
public boolean interactFirst(EntityPlayer player) {
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
if(stack != null) {
|
||||
int upgrade = getUpgrade();
|
||||
if(stack.getItem() == ModItems.twigWand) {
|
||||
if(upgrade > 0) {
|
||||
if(upgrade > 0) {
|
||||
if(!worldObj.isRemote)
|
||||
entityDropItem(new ItemStack(ModItems.sparkUpgrade, 1, upgrade - 1), 0F);
|
||||
setUpgrade(0);
|
||||
|
||||
|
||||
dataWatcher.updateObject(29, "");
|
||||
removeTransferants = 2;
|
||||
} else setDead();
|
||||
@@ -242,9 +242,9 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
|
||||
@Override
|
||||
public ISparkAttachable getAttachedTile() {
|
||||
int x = (int) MathHelper.floor_double(posX);
|
||||
int y = (int) MathHelper.floor_double(posY) - 1;
|
||||
int z = (int) MathHelper.floor_double(posZ);
|
||||
int x = MathHelper.floor_double(posX);
|
||||
int y = MathHelper.floor_double(posY) - 1;
|
||||
int z = MathHelper.floor_double(posZ);
|
||||
TileEntity tile = worldObj.getTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof ISparkAttachable)
|
||||
return (ISparkAttachable) tile;
|
||||
@@ -269,7 +269,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
Entity e = worldObj.getEntityByID(id);
|
||||
if(e != null && e instanceof ISparkEntity) {
|
||||
ISparkEntity spark = (ISparkEntity) e;
|
||||
if(spark != this && !spark.areIncomingTransfersDone() && spark.getAttachedTile() != null && !spark.getAttachedTile().isFull() && spark.getUpgrade() != 4 && ((getUpgrade() != 4 || getUpgrade() != 3 || getUpgrade() != 1) || !(spark.getAttachedTile() instanceof IManaPool))) {
|
||||
if(spark != this && !spark.areIncomingTransfersDone() && spark.getAttachedTile() != null && !spark.getAttachedTile().isFull() && spark.getUpgrade() != 4 && (getUpgrade() != 4 || getUpgrade() != 3 || getUpgrade() != 1 || !(spark.getAttachedTile() instanceof IManaPool))) {
|
||||
entities.add((ISparkEntity) e);
|
||||
added = true;
|
||||
}
|
||||
@@ -298,7 +298,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
return;
|
||||
|
||||
String transfers = dataWatcher.getWatchableObjectString(29);
|
||||
dataWatcher.updateObject(29, transfers + (transfers.isEmpty() ? "" : ";") + ((Entity) entity).getEntityId());
|
||||
dataWatcher.updateObject(29, transfers + (transfers.isEmpty() ? "" : ";") + ((Entity) entity).getEntityId());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -316,8 +316,8 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
ISparkAttachable tile = getAttachedTile();
|
||||
if(tile instanceof IManaPool)
|
||||
return removeTransferants > 0;
|
||||
|
||||
return tile != null && tile.areIncomingTranfersDone();
|
||||
|
||||
return tile != null && tile.areIncomingTranfersDone();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,10 +11,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -28,11 +25,11 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
public class ItemSpark extends ItemMod {
|
||||
|
||||
public static IIcon invIcon, worldIcon;
|
||||
|
||||
|
||||
public ItemSpark() {
|
||||
setUnlocalizedName(LibItemNames.SPARK);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float xv, float yv, float zv) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
@@ -52,16 +49,16 @@ public class ItemSpark extends ItemMod {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -24,15 +24,15 @@ 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];
|
||||
@@ -42,18 +42,18 @@ public class ItemSparkUpgrade extends ItemMod {
|
||||
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();
|
||||
|
||||
@@ -19,7 +19,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -174,7 +173,7 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
int ticks = getTicksSinceSpreaderUse(par1ItemStack);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ItemElementiumPick extends ItemManasteelPick {
|
||||
public void onHarvestDrops(HarvestDropsEvent event) {
|
||||
if(event.harvester != null) {
|
||||
ItemStack stack = event.harvester.getCurrentEquippedItem();
|
||||
if(stack != null && (stack.getItem() == this || (stack.getItem() == ModItems.terraPick && ItemTerraPick.isTipped(stack))))
|
||||
if(stack != null && (stack.getItem() == this || stack.getItem() == ModItems.terraPick && ItemTerraPick.isTipped(stack)))
|
||||
for(int i = 0; i < event.drops.size(); i++) {
|
||||
ItemStack drop = event.drops.get(i);
|
||||
if(drop != null) {
|
||||
@@ -46,7 +46,7 @@ public class ItemElementiumPick extends ItemManasteelPick {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static boolean isDisposable(Block block) {
|
||||
return validBlocks.contains(block);
|
||||
}
|
||||
|
||||
@@ -231,10 +231,10 @@ public final class LexiconData {
|
||||
|
||||
sparks = new BLexiconEntry(LibLexicon.MANA_SPARKS, categoryMana);
|
||||
sparks.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesSpark));
|
||||
|
||||
|
||||
sparkUpgrades = new ALexiconEntry(LibLexicon.MANA_SPARK_UPGRADES, categoryMana);
|
||||
sparkUpgrades.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageCraftingRecipe("5", ModCrafingRecipes.recipesSparkUpgrades));
|
||||
|
||||
|
||||
lenses = new BLexiconEntry(LibLexicon.MANA_LENSES, categoryMana);
|
||||
lenses.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeManaLens), new PageCraftingRecipe("2", ModCrafingRecipes.recipesLensDying), new PageCraftingRecipe("3", ModCrafingRecipes.recipeRainbowLens), new PageText("4"), new PageText("5"),
|
||||
new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipeLensVelocity),
|
||||
|
||||
@@ -76,9 +76,9 @@ public class PageManaInfusionRecipe extends PageRecipe {
|
||||
|
||||
RenderTilePool.forceMana = true;
|
||||
renderItemAtGridPos(gui, 2, 1, new ItemStack(ModBlocks.pool, 1, recipe.getOutput().getItem() == Item.getItemFromBlock(ModBlocks.pool) ? 2 : 0), false);
|
||||
|
||||
|
||||
renderItemAtGridPos(gui, 3, 1, recipe.getOutput(), false);
|
||||
|
||||
|
||||
if(recipe.isAlchemy())
|
||||
renderItemAtGridPos(gui, 1, 2, new ItemStack(ModBlocks.alchemyCatalyst), false);
|
||||
else if(recipe.isConjuration())
|
||||
|
||||
Reference in new issue
Block a user