mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Build 12.
This commit is contained in:
1 parent
12cbb3c269
commit
74a5cee47f
53 files changed
+350
-320
No files matched your search
@@ -42,12 +42,12 @@ public final class BotaniaAPI {
|
||||
public static List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<RecipeManaInfusion>();
|
||||
|
||||
private static BiMap<String, Class<? extends SubTileEntity>> subTiles = HashBiMap.<String, Class<? extends SubTileEntity>> create();
|
||||
|
||||
|
||||
public static Map<String, Integer> oreWeights = new HashMap<String, Integer>();
|
||||
|
||||
|
||||
static {
|
||||
registerSubTile("", DummySubTile.class);
|
||||
|
||||
|
||||
addOreWeight("oreAluminum", 3940); // Tinkers' Construct
|
||||
addOreWeight("oreAmber", 2075); // Thaumcraft
|
||||
addOreWeight("oreApatite", 1595); // Forestry
|
||||
@@ -163,7 +163,7 @@ public final class BotaniaAPI {
|
||||
allEntries.add(entry);
|
||||
category.entries.add(entry);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Maps an ore (ore dictionary key) to it's weight on the world generation. This
|
||||
* is used for the Orechid flower. Check the static block in the BotaniaAPI class
|
||||
@@ -178,7 +178,7 @@ public final class BotaniaAPI {
|
||||
public static int getOreWeight(String ore) {
|
||||
return oreWeights.get(ore);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the last recipe to have been added to the recipe list.
|
||||
*/
|
||||
|
||||
@@ -20,5 +20,5 @@ import net.minecraft.item.ItemStack;
|
||||
public interface IRecipeKeyProvider {
|
||||
|
||||
public String getKey(ItemStack stack);
|
||||
|
||||
|
||||
}
|
||||
@@ -49,18 +49,18 @@ public interface ILens {
|
||||
* do any particles.
|
||||
*/
|
||||
public boolean doParticles(IManaBurst burst, ItemStack stack);
|
||||
|
||||
|
||||
/**
|
||||
* Can the source lens be combined with the composite lens? This is called
|
||||
* for both the ILens instance of ItemStack.getItem() of sourceLens and compositeLens.
|
||||
*/
|
||||
public boolean canCombineLenses(ItemStack sourceLens, ItemStack compositeLens);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the composite lens in the stack passed in, return null for none.
|
||||
*/
|
||||
public ItemStack getCompositeLens(ItemStack stack);
|
||||
|
||||
|
||||
/**
|
||||
* Sets the composite lens for the sourceLens as the compositeLens, returns
|
||||
* the ItemStack with the combination.
|
||||
|
||||
@@ -18,5 +18,5 @@ package vazkii.botania.api.mana;
|
||||
public interface IManaCollisionGhost {
|
||||
|
||||
public boolean isGhost();
|
||||
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public final class ManaItemHandler {
|
||||
|
||||
/**
|
||||
* Requests mana from items in a given player's inventory. Note that stack.getItem()
|
||||
* must be instanceof IManaItem.
|
||||
* must be instanceof IManaItem.
|
||||
* @param manaToGet How much mana is to be requested, if less mana exists than this amount,
|
||||
* the amount of mana existent will be returned instead, if you want exact values use requestManaExact.
|
||||
* @param remove If true, the mana will be removed from the target item. Set to false to just check.
|
||||
@@ -27,33 +27,33 @@ public final class ManaItemHandler {
|
||||
public static int requestMana(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
|
||||
if(stack == null)
|
||||
return 0;
|
||||
|
||||
|
||||
for(ItemStack stackInSlot : player.inventory.mainInventory) {
|
||||
if(stackInSlot == stack)
|
||||
continue;
|
||||
|
||||
|
||||
if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) {
|
||||
IManaItem manaItem = (IManaItem) stackInSlot.getItem();
|
||||
if(manaItem.canExportManaToItem(stackInSlot, stack) && manaItem.getMana(stackInSlot) > 0) {
|
||||
if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canReceiveManaFromItem(stack, stackInSlot))
|
||||
continue;
|
||||
|
||||
|
||||
int mana = Math.min(manaToGet, manaItem.getMana(stackInSlot));
|
||||
|
||||
|
||||
if(remove)
|
||||
manaItem.addMana(stackInSlot, -mana);
|
||||
|
||||
|
||||
return mana;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Requests an exact amount of mana from items in a given player's inventory.
|
||||
* Note that stack.getItem() must be instanceof IManaItem.
|
||||
* Requests an exact amount of mana from items in a given player's inventory.
|
||||
* Note that stack.getItem() must be instanceof IManaItem.
|
||||
* @param manaToGet How much mana is to be requested, if less mana exists than this amount,
|
||||
* false will be returned instead, and nothing will happen.
|
||||
* @param remove If true, the mana will be removed from the target item. Set to false to just check.
|
||||
@@ -62,26 +62,26 @@ public final class ManaItemHandler {
|
||||
public static boolean requestManaExact(ItemStack stack, EntityPlayer player, int manaToGet, boolean remove) {
|
||||
if(stack == null)
|
||||
return false;
|
||||
|
||||
|
||||
for(ItemStack stackInSlot : player.inventory.mainInventory) {
|
||||
if(stackInSlot == stack)
|
||||
continue;
|
||||
|
||||
|
||||
if(stackInSlot != null && stackInSlot.getItem() instanceof IManaItem) {
|
||||
IManaItem manaItemSlot = (IManaItem) stackInSlot.getItem();
|
||||
if(manaItemSlot.canExportManaToItem(stackInSlot, stack) && manaItemSlot.getMana(stackInSlot) > manaToGet) {
|
||||
if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canReceiveManaFromItem(stack, stackInSlot))
|
||||
continue;
|
||||
|
||||
|
||||
if(remove)
|
||||
manaItemSlot.addMana(stackInSlot, -manaToGet);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -13,7 +13,6 @@ package vazkii.botania.api.subtile;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -25,6 +24,7 @@ import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
/**
|
||||
* The basic class for a Generating Flower.
|
||||
@@ -53,7 +53,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
super.onUpdate();
|
||||
|
||||
linkCollector();
|
||||
|
||||
|
||||
if(canGeneratePassively()) {
|
||||
int delay = getDelayBetweenPassiveGeneration();
|
||||
if(delay > 0 && supertile.worldObj.getWorldTime() % delay == 0) {
|
||||
@@ -111,7 +111,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean shouldSyncPassiveGeneration() {
|
||||
return false;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
public boolean onWanded(EntityPlayer player, ItemStack wand) {
|
||||
if(!player.worldObj.isRemote)
|
||||
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
|
||||
|
||||
|
||||
knownMana = mana;
|
||||
player.worldObj.playSoundAtEntity(player, "random.orb", 0.1F, 1F);
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ package vazkii.botania.client.core.proxy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
@@ -54,7 +53,6 @@ import vazkii.botania.common.core.handler.ManaNetworkHandler;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.core.proxy.CommonProxy;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibBlockIDs;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
|
||||
@@ -100,7 +100,7 @@ public class FXSparkle extends EntityFX {
|
||||
|
||||
motionY -= 0.04D * particleGravity;
|
||||
|
||||
if (!noClip && !fake)
|
||||
if (!noClip && !fake)
|
||||
pushOutOfBlocks(posX, (boundingBox.minY + boundingBox.maxY) / 2.0D, posZ);
|
||||
|
||||
posX += motionX;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class FXWisp extends EntityFX {
|
||||
|
||||
if(distanceLimit) {
|
||||
int visibleDistance = 50;
|
||||
if (!FMLClientHandler.instance().getClient().gameSettings.fancyGraphics)
|
||||
if (!FMLClientHandler.instance().getClient().gameSettings.fancyGraphics)
|
||||
visibleDistance = 25;
|
||||
|
||||
if (renderentity == null || renderentity.getDistance(posX, posY, posZ) > visibleDistance)
|
||||
@@ -62,7 +62,7 @@ public class FXWisp extends EntityFX {
|
||||
public void renderParticle(Tessellator tessellator, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
float agescale = 0;
|
||||
agescale = (float)particleAge / (float) moteHalfLife;
|
||||
if (agescale > 1F)
|
||||
if (agescale > 1F)
|
||||
agescale = 2 - agescale;
|
||||
|
||||
particleScale = moteParticleScale * agescale;
|
||||
|
||||
@@ -25,11 +25,11 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
public class RenderSpecialFlower implements ISimpleBlockRenderingHandler {
|
||||
|
||||
int id;
|
||||
|
||||
|
||||
public RenderSpecialFlower(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
// NO-OP
|
||||
@@ -65,15 +65,15 @@ public class RenderSpecialFlower implements ISimpleBlockRenderingHandler {
|
||||
double d2 = par4;
|
||||
|
||||
drawCrossedSquares(blockAccess, par1Block, par2, par3, par4, d0, d1, d2, 1.0F, render);
|
||||
|
||||
|
||||
if(ConfigHandler.overrideVanillaBlocks) {
|
||||
int snow = -1;
|
||||
boolean foundSnow = false;
|
||||
|
||||
|
||||
ForgeDirection[] directions = new ForgeDirection[] {
|
||||
ForgeDirection.NORTH, ForgeDirection.SOUTH, ForgeDirection.EAST, ForgeDirection.WEST
|
||||
};
|
||||
|
||||
|
||||
for(ForgeDirection dir : directions)
|
||||
if(blockAccess.getBlockId(par2 + dir.offsetX, par3 + dir.offsetY, par4 + dir.offsetZ) == Block.snow.blockID) {
|
||||
int meta = blockAccess.getBlockMetadata(par2 + dir.offsetX, par3 + dir.offsetY, par4 + dir.offsetZ);
|
||||
@@ -84,9 +84,9 @@ public class RenderSpecialFlower implements ISimpleBlockRenderingHandler {
|
||||
if(snow >= 0) {
|
||||
BlockSnowOverride.forcedMeta = snow;
|
||||
render.renderBlockByRenderType(Block.blocksList[Block.snow.blockID], par2, par3, par4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,28 +36,28 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {
|
||||
TileEnchanter enchanter = (TileEnchanter) tileentity;
|
||||
float alphaMod = 0F;
|
||||
|
||||
|
||||
if(enchanter.stage == 2)
|
||||
alphaMod = (float) Math.min(20, enchanter.stageTicks) / 20F;
|
||||
alphaMod = Math.min(20, enchanter.stageTicks) / 20F;
|
||||
else if(enchanter.stage == 4)
|
||||
alphaMod = (float) (20 - enchanter.stageTicks) / 20F;
|
||||
alphaMod = (20 - enchanter.stageTicks) / 20F;
|
||||
else if(enchanter.stage > 2)
|
||||
alphaMod = 1F;
|
||||
|
||||
|
||||
if(enchanter.itemToEnchant != null) {
|
||||
if(item == null)
|
||||
item = new EntityItem(enchanter.worldObj, enchanter.xCoord, enchanter.yCoord + 1, enchanter.zCoord, enchanter.itemToEnchant);
|
||||
|
||||
|
||||
item.age = (int) tileentity.worldObj.getTotalWorldTime();
|
||||
item.setEntityItemStack(enchanter.itemToEnchant);
|
||||
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslatef(0.5F, 1.25F, 0.5F);
|
||||
((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(item, d0, d1, d2, 1F, f);
|
||||
GL11.glTranslatef(-0.5F, -1.25F, -0.5F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
|
||||
@@ -67,22 +67,22 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glColor4f(0.6F + (float) ((Math.cos((double) enchanter.worldObj.getTotalWorldTime() / 6D) + 1D) / 5D), 0.1F, 0.9F, (float) ((Math.sin((double) enchanter.worldObj.getTotalWorldTime() / 8D) + 1D) / 5D + 0.4D) * alphaMod);
|
||||
|
||||
GL11.glColor4f(0.6F + (float) ((Math.cos(enchanter.worldObj.getTotalWorldTime() / 6D) + 1D) / 5D), 0.1F, 0.9F, (float) ((Math.sin(enchanter.worldObj.getTotalWorldTime() / 8D) + 1D) / 5D + 0.4D) * alphaMod);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
|
||||
if(enchanter.stage == 3 || enchanter.stage == 4) {
|
||||
int ticks = enchanter.stageTicks + enchanter.stage3EndTicks;
|
||||
int angle = ticks * 2;
|
||||
float yTranslation = (float) Math.min(20, ticks) / 20F * 1.15F;
|
||||
float scale = ticks < 10 ? 1F : 1F - (float) Math.min(20, ticks - 10) / 20F * 0.75F;
|
||||
|
||||
float yTranslation = Math.min(20, ticks) / 20F * 1.15F;
|
||||
float scale = ticks < 10 ? 1F : 1F - Math.min(20, ticks - 10) / 20F * 0.75F;
|
||||
|
||||
GL11.glTranslatef(2.5F, 2.5F, -yTranslation);
|
||||
GL11.glScalef(scale, scale, 1F);
|
||||
GL11.glRotatef(angle, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-2.5F, -2.5F, 0F);
|
||||
}
|
||||
|
||||
|
||||
renderIcon(0, 0, BlockEnchanter.overlay, 5, 5, 240);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
@@ -95,10 +95,10 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setBrightness(brightness);
|
||||
tessellator.addVertexWithUV((double)(par1 + 0), (double)(par2 + par5), (double)0, (double)par3Icon.getMinU(), (double)par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV((double)(par1 + par4), (double)(par2 + par5), (double)0, (double)par3Icon.getMaxU(), (double)par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV((double)(par1 + par4), (double)(par2 + 0), (double)0, (double)par3Icon.getMaxU(), (double)par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV((double)(par1 + 0), (double)(par2 + 0), (double)0, (double)par3Icon.getMinU(), (double)par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
|
||||
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
|
||||
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ import vazkii.botania.api.IWandable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.tile.TileEnchanter;
|
||||
import vazkii.botania.common.block.tile.TileSimpleInventory;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockIDs;
|
||||
|
||||
@@ -35,7 +35,7 @@ import vazkii.botania.common.lib.LibBlockNames;
|
||||
public class BlockManaDetector extends BlockModContainer implements ILexiconable {
|
||||
|
||||
Icon[] icons;
|
||||
|
||||
|
||||
protected BlockManaDetector() {
|
||||
super(LibBlockIDs.idManaDetector, Material.rock);
|
||||
setHardness(2.0F);
|
||||
@@ -43,29 +43,29 @@ public class BlockManaDetector extends BlockModContainer implements ILexiconable
|
||||
setStepSound(soundStoneFootstep);
|
||||
setUnlocalizedName(LibBlockNames.MANA_DETECTOR);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
icons = new Icon[2];
|
||||
for(int i = 0; i < icons.length; i++)
|
||||
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return icons[Math.min(icons.length - 1, par2)];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int isProvidingWeakPower(IBlockAccess par1iBlockAccess, int par2, int par3, int par4, int par5) {
|
||||
return par1iBlockAccess.getBlockMetadata(par2, par3, par4) != 0 ? 15 : 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) {
|
||||
if(par7Entity != null && !(par7Entity instanceof IManaBurst))
|
||||
|
||||
@@ -79,7 +79,7 @@ public class BlockModFlower extends BlockFlower implements ILexiconable {
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return icons[par2];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idSpecialFlower;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class BlockSpecialFlower extends BlockFlower implements ITileEntityProvid
|
||||
LibBlockNames.SUBTILE_PUREDAISY,
|
||||
|
||||
// Generating
|
||||
LibBlockNames.SUBTILE_DAYBLOOM,
|
||||
LibBlockNames.SUBTILE_DAYBLOOM,
|
||||
LibBlockNames.SUBTILE_NIGHTSHADE,
|
||||
LibBlockNames.SUBTILE_ENDOFLAME,
|
||||
LibBlockNames.SUBTILE_HYDROANGEAS,
|
||||
|
||||
@@ -33,21 +33,21 @@ import vazkii.botania.common.lib.LibBlockNames;
|
||||
public class BlockTurntable extends BlockModContainer implements IWandable, IWandHUD, ILexiconable {
|
||||
|
||||
Icon[] icons;
|
||||
|
||||
|
||||
protected BlockTurntable() {
|
||||
super(LibBlockIDs.idTurntable, Material.wood);
|
||||
setHardness(2.0F);
|
||||
setStepSound(soundWoodFootstep);
|
||||
setUnlocalizedName(LibBlockNames.TURNTABLE);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
icons = new Icon[2];
|
||||
for(int i = 0; i < icons.length; i++)
|
||||
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return par1 == 1 ? icons[0] : icons[1];
|
||||
|
||||
@@ -20,18 +20,18 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
if(supertile.worldObj.getTotalWorldTime() % 3 == 0) {
|
||||
int range = 5;
|
||||
int x = supertile.xCoord + supertile.worldObj.rand.nextInt(range * 2 + 1) - range;
|
||||
int z = supertile.zCoord + supertile.worldObj.rand.nextInt(range * 2 + 1) - range;
|
||||
|
||||
|
||||
for(int i = 4; i > -2; i--) {
|
||||
int y = supertile.yCoord + i;
|
||||
|
||||
|
||||
if(supertile.worldObj.isAirBlock(x, y, z))
|
||||
continue;
|
||||
|
||||
|
||||
if(isPlant(x, y, z) && mana > 5) {
|
||||
int id = supertile.worldObj.getBlockId(x, y, z);
|
||||
mana -= 5;
|
||||
@@ -40,24 +40,24 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
boolean isPlant(int x, int y, int z) {
|
||||
int id = supertile.worldObj.getBlockId(x, y, z);
|
||||
if(id == Block.grass.blockID || id == Block.leaves.blockID || id == Block.tallGrass.blockID)
|
||||
return false;
|
||||
|
||||
|
||||
Material mat = supertile.worldObj.getBlockMaterial(x, y, z);
|
||||
return mat != null && (mat == Material.plants || mat == Material.cactus || mat == Material.grass || mat == Material.leaves || mat == Material.vine || mat == Material.wood || mat == Material.pumpkin);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x8EF828;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 200;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -17,17 +17,16 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class SubTileExoflame extends SubTileFunctional {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
int range = 5;
|
||||
int rangeY = 2;
|
||||
|
||||
|
||||
fireFurnaces : {
|
||||
for(int i = -range + 1; i < range; i++)
|
||||
for(int j = -rangeY; j < rangeY; j++)
|
||||
@@ -35,7 +34,7 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
int x = supertile.xCoord + i;
|
||||
int y = supertile.yCoord + j;
|
||||
int z = supertile.zCoord + k;
|
||||
|
||||
|
||||
TileEntity tile = supertile.worldObj.getBlockTileEntity(x, y, z);
|
||||
if(tile != null && tile instanceof TileEntityFurnace) {
|
||||
TileEntityFurnace furnace = (TileEntityFurnace) tile;
|
||||
@@ -48,9 +47,9 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
}
|
||||
if(supertile.worldObj.getTotalWorldTime() % 2 == 0)
|
||||
furnace.furnaceCookTime = Math.min(199, furnace.furnaceCookTime + 1);
|
||||
|
||||
|
||||
mana -= 2;
|
||||
|
||||
|
||||
if(mana == 0)
|
||||
break fireFurnaces;
|
||||
}
|
||||
@@ -58,36 +57,36 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canFurnaceSmelt(TileEntityFurnace furnace){
|
||||
if(furnace.getStackInSlot(0) == null)
|
||||
return false;
|
||||
else {
|
||||
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(furnace.getStackInSlot(0));
|
||||
|
||||
if(itemstack == null)
|
||||
return false;
|
||||
|
||||
if(furnace.getStackInSlot(2) == null)
|
||||
return true;
|
||||
|
||||
if(!furnace.getStackInSlot(2).isItemEqual(itemstack))
|
||||
return false;
|
||||
|
||||
int result = furnace.getStackInSlot(2).stackSize + itemstack.stackSize;
|
||||
return result <= 64 && result <= itemstack.getMaxStackSize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean canFurnaceSmelt(TileEntityFurnace furnace){
|
||||
if(furnace.getStackInSlot(0) == null)
|
||||
return false;
|
||||
else {
|
||||
ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(furnace.getStackInSlot(0));
|
||||
|
||||
if(itemstack == null)
|
||||
return false;
|
||||
|
||||
if(furnace.getStackInSlot(2) == null)
|
||||
return true;
|
||||
|
||||
if(!furnace.getStackInSlot(2).isItemEqual(itemstack))
|
||||
return false;
|
||||
|
||||
int result = furnace.getStackInSlot(2).stackSize + itemstack.stackSize;
|
||||
return result <= 64 && result <= itemstack.getMaxStackSize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 300;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x661600;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -13,7 +13,6 @@ package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
@@ -21,16 +20,17 @@ import net.minecraft.util.AxisAlignedBB;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class SubTileFallenKanade extends SubTileFunctional {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
final int range = 5;
|
||||
final int cost = 20;
|
||||
|
||||
|
||||
List<EntityPlayer> players = supertile.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + range, supertile.zCoord + range));
|
||||
for(EntityPlayer player : players) {
|
||||
if(player.getActivePotionEffect(Potion.regeneration) == null && mana >= cost) {
|
||||
@@ -40,20 +40,20 @@ public class SubTileFallenKanade extends SubTileFunctional {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0xFFFF00;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 60;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.fallenKanade;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -39,7 +39,7 @@ import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
public class SubTileHopperhock extends SubTileFunctional {
|
||||
|
||||
private static final String TAG_FILTER_TYPE = "filterType";
|
||||
|
||||
|
||||
int filterType = 0;
|
||||
|
||||
private static final ForgeDirection[] VALID_DIRS = new ForgeDirection[] {
|
||||
@@ -51,7 +51,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
super.onUpdate();
|
||||
|
||||
boolean pulledAny = false;
|
||||
int range = mana > 0 ? 6 : 3;
|
||||
int range = mana > 0 ? 6 : 3;
|
||||
|
||||
int x = supertile.xCoord;
|
||||
int y = supertile.yCoord;
|
||||
@@ -82,11 +82,11 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
|
||||
if(canAccept) {
|
||||
boolean priority = !filter.isEmpty();
|
||||
|
||||
|
||||
setInv : {
|
||||
if(priorityInv && !priority)
|
||||
break setInv;
|
||||
|
||||
|
||||
invToPutItemIn = inv;
|
||||
priorityInv = priority;
|
||||
sideToPutItemIn = dir.getOpposite();
|
||||
@@ -162,36 +162,36 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onWanded(EntityPlayer player, ItemStack wand) {
|
||||
if(player.isSneaking()) {
|
||||
filterType = filterType == 2 ? 0 : filterType + 1;
|
||||
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
else return super.onWanded(player, wand);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToPacketNBT(NBTTagCompound cmp) {
|
||||
super.writeToPacketNBT(cmp);
|
||||
|
||||
|
||||
cmp.setInteger(TAG_FILTER_TYPE, filterType);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromPacketNBT(NBTTagCompound cmp) {
|
||||
super.readFromPacketNBT(cmp);
|
||||
|
||||
|
||||
filterType = cmp.getInteger(TAG_FILTER_TYPE);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res) {
|
||||
super.renderHUD(mc, res);
|
||||
|
||||
|
||||
int color = 0x66000000 | getColor();
|
||||
String filter = StatCollector.translateToLocal("botaniamisc.filter" + filterType);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
@@ -26,48 +25,49 @@ import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class SubtileOrechid extends SubTileFunctional {
|
||||
|
||||
private static final int COST = 17500;
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
if(!supertile.worldObj.isRemote && mana >= COST && supertile.worldObj.getTotalWorldTime() % 100 == 0) {
|
||||
ChunkCoordinates coords = getCoordsToPut();
|
||||
if(coords != null) {
|
||||
ItemStack stack = getOreToPut();
|
||||
if(stack != null) {
|
||||
supertile.worldObj.setBlock(coords.posX, coords.posY, coords.posZ, stack.itemID, stack.getItemDamage(), 1 | 2);
|
||||
|
||||
|
||||
mana -= COST;
|
||||
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ItemStack getOreToPut() {
|
||||
Collection<WeightedRandomItem> values = new ArrayList();
|
||||
for(String s : BotaniaAPI.oreWeights.keySet())
|
||||
values.add(new StringRandomItem(BotaniaAPI.oreWeights.get(s), s));
|
||||
|
||||
|
||||
String ore = ((StringRandomItem) WeightedRandom.getRandomItem(supertile.worldObj.rand, values)).s;
|
||||
|
||||
|
||||
List<ItemStack> ores = OreDictionary.getOres(ore);
|
||||
if(ores.isEmpty())
|
||||
return getOreToPut();
|
||||
|
||||
|
||||
return ores.get(0);
|
||||
}
|
||||
|
||||
|
||||
public ChunkCoordinates getCoordsToPut() {
|
||||
List<ChunkCoordinates> possibleCoords = new ArrayList();
|
||||
int range = 5;
|
||||
int rangeY = 3;
|
||||
|
||||
|
||||
for(int i = -range; i < range; i++)
|
||||
for(int j = -rangeY; j < rangeY; j++)
|
||||
for(int k = -range; k < range; k++) {
|
||||
@@ -78,18 +78,18 @@ public class SubtileOrechid extends SubTileFunctional {
|
||||
Block block = Block.blocksList[id];
|
||||
if(block != null && block.isGenMineableReplaceable(supertile.worldObj, x, y, z, Block.stone.blockID))
|
||||
possibleCoords.add(new ChunkCoordinates(x, y, z));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(possibleCoords.isEmpty())
|
||||
return null;
|
||||
return possibleCoords.get(supertile.worldObj.rand.nextInt(possibleCoords.size()));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x818181;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return COST;
|
||||
@@ -99,15 +99,15 @@ public class SubtileOrechid extends SubTileFunctional {
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.orechid;
|
||||
}
|
||||
|
||||
|
||||
private static class StringRandomItem extends WeightedRandomItem {
|
||||
|
||||
public String s;
|
||||
|
||||
|
||||
public StringRandomItem(int par1, String s) {
|
||||
super(par1);
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,23 +13,23 @@ package vazkii.botania.common.block.subtile.generating;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.core.helper.ExperienceHelper;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class SubTileArcaneRose extends SubTileGenerating {
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
if(mana >= getMaxMana())
|
||||
return;
|
||||
|
||||
|
||||
List<EntityPlayer> players = supertile.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - 1, supertile.yCoord, supertile.zCoord - 1, supertile.xCoord + 2, supertile.yCoord + 1, supertile.zCoord + 2));
|
||||
for(EntityPlayer player : players)
|
||||
if(ExperienceHelper.getPlayerXP(player) >= 1 && player.onGround) {
|
||||
@@ -39,20 +39,20 @@ public class SubTileArcaneRose extends SubTileGenerating {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0xFF8EF8;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 200;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.arcaneRose;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public class SubTileDaybloom extends SubTileGenerating {
|
||||
public int getColor() {
|
||||
return 0xFFFF00;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldSyncPassiveGeneration() {
|
||||
return true;
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack.getItem().hasContainerItem())
|
||||
continue;
|
||||
|
||||
|
||||
int burnTime = stack == null || stack.itemID == ModBlocks.spreader.blockID ? 0 : TileEntityFurnace.getItemBurnTime(stack);
|
||||
if(burnTime > 0 && stack.stackSize > 0) {
|
||||
this.burnTime = burnTime / 2;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SubTileHydroangeas extends SubTileGenerating {
|
||||
burnTime--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void doBurnParticles() {
|
||||
Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.05F, 0.05F, 0.7F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class SubTileHydroangeas extends SubTileGenerating {
|
||||
public int getIdToSearchFor() {
|
||||
return Block.waterStill.blockID;
|
||||
}
|
||||
|
||||
|
||||
public int getBurnTime() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@@ -15,23 +15,23 @@ import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
public class SubTileNightshade extends SubTileDaybloom {
|
||||
|
||||
|
||||
@Override
|
||||
public int getDelayBetweenPassiveGeneration() {
|
||||
return super.getDelayBetweenPassiveGeneration() * 2;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canGeneratePassively() {
|
||||
System.out.println(!super.canGeneratePassively());
|
||||
return !super.canGeneratePassively();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0x3D2A90;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.nightshade;
|
||||
|
||||
@@ -27,35 +27,35 @@ public class SubTileThermalily extends SubTileHydroangeas {
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.thermalily;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doBurnParticles() {
|
||||
Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.9 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getIdToSearchFor() {
|
||||
return Block.lavaStill.blockID;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getDelayBetweenPassiveGeneration() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getBurnTime() {
|
||||
return 5000;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getValueForPassiveGeneration() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 250;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -20,7 +20,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.recipe.IFlowerComponent;
|
||||
import vazkii.botania.api.recipe.RecipePetals;
|
||||
@@ -38,7 +37,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack == null)
|
||||
return false;
|
||||
|
||||
|
||||
if(!hasWater) {
|
||||
if(stack.itemID == Item.bucketWater.itemID) {
|
||||
hasWater = true;
|
||||
@@ -46,7 +45,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory {
|
||||
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
|
||||
} else return false;
|
||||
}
|
||||
|
||||
|
||||
boolean didChange = false;
|
||||
|
||||
if(stack.getItem() instanceof IFlowerComponent) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
|
||||
public int stage = 0;
|
||||
public int stageTicks = 0;
|
||||
|
||||
|
||||
public int stage3EndTicks = 0;
|
||||
|
||||
int manaRequired = -1;
|
||||
@@ -61,13 +61,13 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
{ -2, -1, 0 }, { -2, -1, 1 }, { -2, -1, -1 }
|
||||
};
|
||||
|
||||
private static final int[][][] PYLON_LOCATIONS = new int[][][] {
|
||||
{ { -5, 1, 0 }, { 5, 1, 0 }, { -4, 1, 3 }, { 4, 1, 3 }, { -4, 1, -3 }, { 4, 1, -3 } },
|
||||
private static final int[][][] PYLON_LOCATIONS = new int[][][] {
|
||||
{ { -5, 1, 0 }, { 5, 1, 0 }, { -4, 1, 3 }, { 4, 1, 3 }, { -4, 1, -3 }, { 4, 1, -3 } },
|
||||
{ { 0, 1, -5 }, { 0, 1, 5 }, { 3, 1, -4 }, { 3, 1, 4 }, { -3, 1, -4 }, { -3, 1, 4 } }
|
||||
};
|
||||
|
||||
private static final int[][] FLOWER_LOCATIONS = new int[][] {
|
||||
{ -1, 0, -1 }, { 1, 0, -1 }, { -1, 0, 1 }, { 1, 0, 1 }
|
||||
{ -1, 0, -1 }, { 1, 0, -1 }, { -1, 0, 1 }, { 1, 0, 1 }
|
||||
};
|
||||
|
||||
public void onWanded(EntityPlayer player, ItemStack wand) {
|
||||
@@ -159,18 +159,18 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
pylonTile.centerZ = zCoord;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(manaRequired == -1) {
|
||||
manaRequired = 0;
|
||||
for(EnchantmentData data : enchants) {
|
||||
Enchantment ench = Enchantment.enchantmentsList[data.enchant];
|
||||
manaRequired += (int) (3000F * ((15 - ench.getWeight()) * 1.45F) * ((3F + (data.level * data.level)) * 0.25F) * (0.9F + enchants.size() * 0.05F));
|
||||
manaRequired += (int) (3000F * ((15 - ench.getWeight()) * 1.45F) * ((3F + data.level * data.level) * 0.25F) * (0.9F + enchants.size() * 0.05F));
|
||||
}
|
||||
} else if(mana >= manaRequired) {
|
||||
manaRequired = 0;
|
||||
for(int[] pylon : PYLON_LOCATIONS[getBlockMetadata()])
|
||||
((TilePylon) worldObj.getBlockTileEntity(xCoord + pylon[0], yCoord + pylon[1], zCoord + pylon[2])).activated = false;
|
||||
|
||||
|
||||
advanceStage();
|
||||
} else {
|
||||
getManaFromPools : {
|
||||
@@ -186,12 +186,12 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
PacketDispatcher.sendPacketToAllInDimension(tile.getDescriptionPacket(), worldObj.provider.dimensionId);
|
||||
sync();
|
||||
}
|
||||
|
||||
|
||||
if(mana >= manaRequired)
|
||||
break getManaFromPools;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -224,7 +224,7 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
|
||||
public void advanceStage() {
|
||||
stage++;
|
||||
|
||||
|
||||
if(stage == 4)
|
||||
stage3EndTicks = stageTicks;
|
||||
else if(stage == 5) {
|
||||
@@ -258,7 +258,7 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
|
||||
@Override
|
||||
public void recieveMana(int mana) {
|
||||
this.mana = Math.min(manaRequired, this.mana + mana);
|
||||
this.mana = Math.min(manaRequired, this.mana + mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -341,7 +341,7 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
|
||||
return false;
|
||||
|
||||
for(int[] pylon : PYLON_LOCATIONS[meta])
|
||||
if(world.getBlockId(pylon[0] + x, pylon[1] + y, pylon[2] + z) != ModBlocks.pylon.blockID ||
|
||||
if(world.getBlockId(pylon[0] + x, pylon[1] + y, pylon[2] + z) != ModBlocks.pylon.blockID ||
|
||||
world.getBlockId(pylon[0] + x, pylon[1] + y - 1, pylon[2] + z) != ModBlocks.flower.blockID)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public class TileManaDetector extends TileMod implements IManaCollisionGhost {
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, expectedMeta, 1 | 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isGhost() {
|
||||
return true;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class TilePylon extends TileEntity {
|
||||
activated = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Vector3 centerBlock = new Vector3(centerX + 0.5, centerY + 0.75 + (Math.random() - 0.5 * 0.25), centerZ + 0.5);
|
||||
|
||||
int id = worldObj.getBlockId(xCoord, yCoord - 1, zCoord);
|
||||
|
||||
@@ -94,7 +94,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
|
||||
}
|
||||
this.manaToGet = 0;
|
||||
}
|
||||
|
||||
|
||||
if(manaToGet != this.manaToGet) {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.orb", 1F, 1F);
|
||||
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
|
||||
@@ -144,7 +144,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
|
||||
craftingFanciness();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
updateRecipe();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector
|
||||
boolean added = false;
|
||||
|
||||
IManaReceiver receiver = null;
|
||||
|
||||
|
||||
public int lastBurstDeathTick = -1;
|
||||
public int burstParticleTick = 0;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFull() {
|
||||
return mana >= MAX_MANA;
|
||||
|
||||
@@ -11,12 +11,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.client.core.handler.HUDHandler;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -24,17 +18,20 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class TileTurntable extends TileMod {
|
||||
|
||||
private static final String TAG_SPEED = "speed";
|
||||
private static final String TAG_BACKWARDS = "backwards";
|
||||
|
||||
|
||||
int speed = 1;
|
||||
boolean backwards = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
boolean redstone = false;
|
||||
@@ -44,37 +41,37 @@ public class TileTurntable extends TileMod {
|
||||
if(redstoneSide > 0)
|
||||
redstone = true;
|
||||
}
|
||||
|
||||
|
||||
if(!redstone) {
|
||||
TileEntity tile = worldObj.getBlockTileEntity(xCoord, yCoord + 1, zCoord);
|
||||
if(tile instanceof TileSpreader) {
|
||||
TileSpreader spreader = (TileSpreader) tile;
|
||||
spreader.rotationX += (speed * (backwards ? -1 : 1));
|
||||
spreader.rotationX += speed * (backwards ? -1 : 1);
|
||||
if(spreader.rotationX >= 360F)
|
||||
spreader.rotationX -= 360F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_SPEED, speed);
|
||||
cmp.setBoolean(TAG_BACKWARDS, backwards);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
speed = cmp.getInteger(TAG_SPEED);
|
||||
backwards = cmp.getBoolean(TAG_BACKWARDS);
|
||||
}
|
||||
|
||||
|
||||
public void onWanded(EntityPlayer player, ItemStack wand) {
|
||||
if(player.isSneaking())
|
||||
backwards = !backwards;
|
||||
else speed = speed == 6 ? 1 : speed + 1;
|
||||
PacketDispatcher.sendPacketToAllInDimension(getDescriptionPacket(), worldObj.provider.dimensionId);
|
||||
}
|
||||
|
||||
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res) {
|
||||
int color = 0xAA006600;
|
||||
|
||||
@@ -82,7 +79,7 @@ public class TileTurntable extends TileMod {
|
||||
String speed = EnumChatFormatting.BOLD + "";
|
||||
for(int i = 0; i < this.speed; i++)
|
||||
speed = speed + motion;
|
||||
|
||||
|
||||
int x = res.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(speed) / 2;
|
||||
int y = res.getScaledHeight() / 2 - 15;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.vanilla;
|
||||
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
|
||||
public class BlockFlowerOverride extends BlockFlower {
|
||||
|
||||
public BlockFlowerOverride(int par1) {
|
||||
super(par1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idSpecialFlower;
|
||||
|
||||
@@ -17,13 +17,13 @@ import net.minecraft.world.IBlockAccess;
|
||||
public class BlockSnowOverride extends BlockSnow {
|
||||
|
||||
public static int forcedMeta = -1;
|
||||
|
||||
|
||||
public BlockSnowOverride(int par1) {
|
||||
super(par1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) {
|
||||
if(forcedMeta != -1) {
|
||||
setBlockBoundsForSnowDepth(forcedMeta);
|
||||
forcedMeta = -1;
|
||||
|
||||
@@ -41,11 +41,11 @@ public final class ConfigHandler {
|
||||
Property subtlePowerSystemProp = config.get(Configuration.CATEGORY_GENERAL, "powerSystem.subtle", false);
|
||||
subtlePowerSystemProp.comment = "Set to true to set the power system's particles to be a lot more subtle. Good for low-end systems, if the particles are causing lag.";
|
||||
subtlePowerSystem = subtlePowerSystemProp.getBoolean(false);
|
||||
|
||||
|
||||
Property staticWandBeamProp = config.get(Configuration.CATEGORY_GENERAL, "wandBeam.static", false);
|
||||
staticWandBeamProp.comment = "Set to true to use a static wand beam that shows every single position of the burst, similar to the way it used to work on old botania versions. Warning: Disabled by default because it may be laggy.";
|
||||
staticWandBeam = staticWandBeamProp.getBoolean(false);
|
||||
|
||||
|
||||
Property overrideVanillaBlocksProp = config.get(Configuration.CATEGORY_GENERAL, "override.vanillaBlocks", true);
|
||||
overrideVanillaBlocksProp.comment = "Set to false to remove the overriding of vanilla blocks (snow, red and yellow flowers). Setting this to false will remove the snow on flowers tweak.";
|
||||
overrideVanillaBlocks = overrideVanillaBlocksProp.getBoolean(true);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ExperienceHelper {
|
||||
public static int getExperienceForLevel(int level) {
|
||||
if (level == 0)
|
||||
return 0;
|
||||
|
||||
|
||||
if (level > 0 && level < 16)
|
||||
return level * 17;
|
||||
else if (level > 15 && level < 31)
|
||||
|
||||
@@ -111,24 +111,24 @@ public class InventoryHelper {
|
||||
}
|
||||
|
||||
public static int testInventoryInsertion(IInventory inventory, ItemStack item, ForgeDirection side) {
|
||||
if (item == null || item.stackSize == 0)
|
||||
if (item == null || item.stackSize == 0)
|
||||
return 0;
|
||||
item = item.copy();
|
||||
|
||||
if (inventory == null)
|
||||
|
||||
if (inventory == null)
|
||||
return 0;
|
||||
|
||||
|
||||
int slotCount = inventory.getSizeInventory();
|
||||
|
||||
int itemSizeCounter = item.stackSize;
|
||||
for (int i = 0; i < slotCount && itemSizeCounter > 0; i++) {
|
||||
if (!inventory.isItemValidForSlot(i, item))
|
||||
if (!inventory.isItemValidForSlot(i, item))
|
||||
continue;
|
||||
|
||||
|
||||
if(side != ForgeDirection.UNKNOWN && inventory instanceof ISidedInventory)
|
||||
if(!((ISidedInventory)inventory).canInsertItem(i, item, side.ordinal()))
|
||||
continue;
|
||||
|
||||
|
||||
ItemStack inventorySlot = inventory.getStackInSlot(i);
|
||||
if (inventorySlot == null)
|
||||
itemSizeCounter -= Math.min(Math.min(itemSizeCounter, inventory.getInventoryStackLimit()), item.getMaxStackSize());
|
||||
@@ -141,10 +141,10 @@ public class InventoryHelper {
|
||||
itemSizeCounter = Math.max(itemSizeCounter, 0);
|
||||
return item.stackSize - itemSizeCounter;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public static IInventory getInventory(World world, int x, int y, int z) {
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
if(tileEntity instanceof TileEntityChest) {
|
||||
|
||||
@@ -192,10 +192,10 @@ public final class ModCrafingRecipes {
|
||||
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 10), new ItemStack(ModItems.lens), "ingotIron", "ingotGold");
|
||||
recipeLensMagnet = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.lens, 1, 11), new ItemStack(ModItems.lens), LibOreDict.RUNE[14]);
|
||||
recipeLensExplosive = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Unstable Block Recipes
|
||||
for(int i = 0; i < 16; i++)
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.unstableBlock, 2, i),
|
||||
@@ -282,17 +282,17 @@ public final class ModCrafingRecipes {
|
||||
'S', LibOreDict.LIVING_ROCK,
|
||||
'D', LibOreDict.MANA_DIAMOND);
|
||||
recipesManaTablet = BotaniaAPI.getLatestAddedRecipes(2);
|
||||
|
||||
|
||||
// Mana Detector Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.manaDetector),
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.manaDetector),
|
||||
"RSR", "SCS", "RSR",
|
||||
'R', new ItemStack(Item.redstone),
|
||||
'C', new ItemStack(Item.comparator),
|
||||
'S', LibOreDict.LIVING_ROCK);
|
||||
recipeManaDetector = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Mana Blaster Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.manaGun),
|
||||
addOreDictRecipe(new ItemStack(ModItems.manaGun),
|
||||
"SMD", " WT", " W",
|
||||
'S', new ItemStack(ModBlocks.spreader),
|
||||
'M', LibOreDict.RUNE[8],
|
||||
@@ -300,9 +300,9 @@ public final class ModCrafingRecipes {
|
||||
'T', new ItemStack(Block.tnt),
|
||||
'W', LibOreDict.LIVING_WOOD);
|
||||
recipeManaBlaster = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Spreader Turntable Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.turntable),
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.turntable),
|
||||
"WWW", "WPW", "WWW",
|
||||
'W', LibOreDict.LIVING_WOOD,
|
||||
'P', Block.pistonStickyBase);
|
||||
|
||||
@@ -51,7 +51,7 @@ public final class ModPetalRecipes {
|
||||
hydroangeasRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HYDROANGEAS), blueMana, blue, pink, lightBlue);
|
||||
thermalilyRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_THERMALILY), red, orangeMana, orange, runeEarth, runeFire);
|
||||
arcaneRoseRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ARCANE_ROSE), pink, pinkMana, pinkMana, lime, purple, purpleMana, runeMana);
|
||||
|
||||
|
||||
jadedAmaranthusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JADED_AMARANTHUS), purpleMana, purpleMana, lime, purple, green, runeSpring);
|
||||
bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), redMana, redMana, cyan, cyan, red);
|
||||
heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), purpleMana, pinkMana, magentaMana, purple, pink, magenta, runeWrath);
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class ModRuneRecipes {
|
||||
|
||||
recipeWaterRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 0), costTier1, LibOreDict.MANA_STEEL, new ItemStack(Item.dyePowder, 1, 15), new ItemStack(Item.reed), new ItemStack(Item.fishingRod));
|
||||
recipeFireRune = BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 1), costTier1, LibOreDict.MANA_STEEL, new ItemStack(Item.blazeRod), new ItemStack(Item.gunpowder), new ItemStack(Item.netherStalkSeeds));
|
||||
|
||||
|
||||
recipesEarthRune = new ArrayList();
|
||||
recipesEarthRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 2), costTier1, LibOreDict.MANA_STEEL, "stone", new ItemStack(Block.dirt), new ItemStack(Block.mushroomBrown)));
|
||||
recipesEarthRune.add(BotaniaAPI.registerRuneAltarRecipe(new ItemStack(ModItems.rune, 1, 2), costTier1, LibOreDict.MANA_STEEL, "stone", new ItemStack(Block.dirt), new ItemStack(Block.mushroomRed)));
|
||||
|
||||
@@ -101,9 +101,9 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
setBurstSourceCoords(0, -1, 0);
|
||||
setLocationAndAngles(player.posX, player.posY + player.getEyeHeight(), player.posZ, player.rotationYaw + 180, -player.rotationPitch);
|
||||
|
||||
posX -= (double)(MathHelper.cos((rotationYaw + 180) / 180.0F * (float) Math.PI) * 0.16F);
|
||||
posX -= MathHelper.cos((rotationYaw + 180) / 180.0F * (float) Math.PI) * 0.16F;
|
||||
posY -= 0.10000000149011612D;
|
||||
posZ -= (double)(MathHelper.sin((rotationYaw + 180) / 180.0F * (float) Math.PI) * 0.16F);
|
||||
posZ -= MathHelper.sin((rotationYaw + 180) / 180.0F * (float) Math.PI) * 0.16F;
|
||||
|
||||
setPosition(posX, posY, posZ);
|
||||
yOffset = 0.0F;
|
||||
@@ -231,21 +231,21 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
double d2 = 999.0D;
|
||||
|
||||
if (i > l)
|
||||
d0 = (double)l + 1.0D;
|
||||
d0 = l + 1.0D;
|
||||
else if (i < l)
|
||||
d0 = (double)l + 0.0D;
|
||||
d0 = l + 0.0D;
|
||||
else flag2 = false;
|
||||
|
||||
if (j > i1)
|
||||
d1 = (double)i1 + 1.0D;
|
||||
d1 = i1 + 1.0D;
|
||||
else if (j < i1)
|
||||
d1 = (double)i1 + 0.0D;
|
||||
d1 = i1 + 0.0D;
|
||||
else flag3 = false;
|
||||
|
||||
if (k > j1)
|
||||
d2 = (double)j1 + 1.0D;
|
||||
d2 = j1 + 1.0D;
|
||||
else if (k < j1)
|
||||
d2 = (double)j1 + 0.0D;
|
||||
d2 = j1 + 0.0D;
|
||||
else flag4 = false;
|
||||
|
||||
double d3 = 999.0D;
|
||||
@@ -293,21 +293,21 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
}
|
||||
|
||||
Vec3 vec32 = new Vector3(par1Vec3.xCoord, par1Vec3.yCoord, par1Vec3.zCoord).toVec3D();
|
||||
l = (int)(vec32.xCoord = (double)MathHelper.floor_double(par1Vec3.xCoord));
|
||||
l = (int)(vec32.xCoord = MathHelper.floor_double(par1Vec3.xCoord));
|
||||
|
||||
if (b0 == 5) {
|
||||
--l;
|
||||
++vec32.xCoord;
|
||||
}
|
||||
|
||||
i1 = (int)(vec32.yCoord = (double)MathHelper.floor_double(par1Vec3.yCoord));
|
||||
i1 = (int)(vec32.yCoord = MathHelper.floor_double(par1Vec3.yCoord));
|
||||
|
||||
if (b0 == 1) {
|
||||
--i1;
|
||||
++vec32.yCoord;
|
||||
}
|
||||
|
||||
j1 = (int)(vec32.zCoord = (double)MathHelper.floor_double(par1Vec3.zCoord));
|
||||
j1 = (int)(vec32.zCoord = MathHelper.floor_double(par1Vec3.zCoord));
|
||||
|
||||
if (b0 == 3) {
|
||||
--j1;
|
||||
@@ -675,7 +675,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
|
||||
TileEntity tile = worldObj.getBlockTileEntity(coords.posX, coords.posY, coords.posZ);
|
||||
if(tile != null && tile instanceof TileSpreader)
|
||||
return (getMana() != getStartingMana() && fullManaLastTick) || Math.abs(((TileSpreader) tile).burstParticleTick - ticksExisted) < 4;
|
||||
return getMana() != getStartingMana() && fullManaLastTick || Math.abs(((TileSpreader) tile).burstParticleTick - ticksExisted) < 4;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
public class ItemLens extends ItemMod implements ILens {
|
||||
|
||||
private static final int NORMAL = 0, SPEED = 1, POWER = 2, TIME = 3, EFFICIENCY = 4,
|
||||
BOUNCE = 5, GRAVITY = 6, MINE = 7, DAMAGE = 8, PHANTOM = 9,
|
||||
BOUNCE = 5, GRAVITY = 6, MINE = 7, DAMAGE = 8, PHANTOM = 9,
|
||||
MAGNET = 10, EXPLOSIVE = 11;
|
||||
|
||||
private static final Map<Integer, List<Integer>> blacklist = new HashMap();
|
||||
private static final Map<Integer, List<Integer>> blacklist = new HashMap();
|
||||
|
||||
static {
|
||||
blacklistLenses(POWER, EXPLOSIVE);
|
||||
@@ -64,7 +64,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
blacklistLenses(PHANTOM, EXPLOSIVE);
|
||||
blacklistLenses(PHANTOM, BOUNCE);
|
||||
}
|
||||
|
||||
|
||||
private static final String TAG_COLOR = "color";
|
||||
private static final String TAG_COMPOSITE_LENS = "compositeLens";
|
||||
|
||||
@@ -128,12 +128,12 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
if(storedColor != -1)
|
||||
par3List.add(String.format(StatCollector.translateToLocal("botaniamisc.color"), StatCollector.translateToLocal("botania.color" + storedColor)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getItemShortTermName(ItemStack stack) {
|
||||
return StatCollector.translateToLocal(stack.getUnlocalizedName() + ".short");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack) {
|
||||
ItemStack compositeLens = getCompositeLens(stack);
|
||||
@@ -141,13 +141,13 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
return super.getItemDisplayName(stack);
|
||||
return String.format(StatCollector.translateToLocal("item.botania:compositeLens.name"), getItemShortTermName(stack), getItemShortTermName(compositeLens));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void apply(ItemStack stack, BurstProperties props) {
|
||||
int storedColor = getStoredColor(stack);
|
||||
if(storedColor != -1)
|
||||
props.color = getLensColor(stack);
|
||||
|
||||
|
||||
switch(stack.getItemDamage()) {
|
||||
case SPEED : {
|
||||
props.motionModifier *= 2F;
|
||||
@@ -178,7 +178,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ItemStack compositeLens = getCompositeLens(stack);
|
||||
if(compositeLens != null && compositeLens.getItem() instanceof ILens)
|
||||
((ILens) compositeLens.getItem()).apply(compositeLens, props);
|
||||
@@ -257,20 +257,20 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EXPLOSIVE : {
|
||||
case EXPLOSIVE : {
|
||||
if(!burst.isFake()) {
|
||||
ChunkCoordinates coords = burst.getBurstSourceChunkCoordinates();
|
||||
if(!entity.worldObj.isRemote && pos.entityHit == null && !isManaBlock && (pos.blockX != coords.posX || pos.blockY != coords.posY || pos.blockZ != coords.posZ))
|
||||
entity.worldObj.createExplosion(entity, entity.posX, entity.posY, entity.posZ, (float) burst.getMana() / 50F, true);
|
||||
entity.worldObj.createExplosion(entity, entity.posX, entity.posY, entity.posZ, burst.getMana() / 50F, true);
|
||||
} else dead = false;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
ItemStack compositeLens = getCompositeLens(stack);
|
||||
if(compositeLens != null && compositeLens.getItem() instanceof ILens)
|
||||
dead = ((ILens) compositeLens.getItem()).collideBurst(burst, pos, isManaBlock, dead, compositeLens);
|
||||
|
||||
|
||||
return dead;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
for(int k = -range; k < range; k++)
|
||||
if(entity.worldObj.getBlockTileEntity(i + x, j + y, k + z) instanceof IManaReceiver) {
|
||||
TileEntity tile = entity.worldObj.getBlockTileEntity(i + x, j + y, k + z);
|
||||
|
||||
|
||||
if(magnetized) {
|
||||
int magX = entity.getEntityData().getInteger("Botania:MagnetizedX");
|
||||
int magY = entity.getEntityData().getInteger("Botania:MagnetizedY");
|
||||
@@ -304,7 +304,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
if(tile.xCoord != magX || tile.yCoord != magY || tile.zCoord != magZ)
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
IManaReceiver receiver = (IManaReceiver) tile;
|
||||
|
||||
ChunkCoordinates srcCoords = burst.getBurstSourceChunkCoordinates();
|
||||
@@ -314,7 +314,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
Vector3 tileVec = Vector3.fromTileEntityCenter(tile).add(0, -0.1, 0);
|
||||
Vector3 motionVec = new Vector3(entity.motionX, entity.motionY, entity.motionZ);
|
||||
|
||||
Vector3 normalMotionVec = motionVec.copy().normalize();
|
||||
Vector3 normalMotionVec = motionVec.copy().normalize();
|
||||
Vector3 magnetVec = tileVec.sub(burstVec).normalize();
|
||||
Vector3 differenceVec = normalMotionVec.sub(magnetVec).multiply(motionVec.mag() * 0.1);
|
||||
|
||||
@@ -326,7 +326,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
entity.getEntityData().setInteger("Botania:MagnetizedY", tile.yCoord);
|
||||
entity.getEntityData().setInteger("Botania:MagnetizedZ", tile.zCoord);
|
||||
}
|
||||
|
||||
|
||||
burst.setMotion(finalMotionVec.x, finalMotionVec.y, finalMotionVec.z);
|
||||
break magnetize;
|
||||
}
|
||||
@@ -334,7 +334,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ItemStack compositeLens = getCompositeLens(stack);
|
||||
if(compositeLens != null && compositeLens.getItem() instanceof ILens)
|
||||
((ILens) compositeLens.getItem()).updateBurst(burst, compositeLens);
|
||||
@@ -371,24 +371,24 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static void blacklistLenses(int lens1, int lens2) {
|
||||
blacklistLenses(lens1, lens2, true);
|
||||
}
|
||||
|
||||
|
||||
public static void blacklistLenses(int lens1, int lens2, boolean recursive) {
|
||||
if(!blacklist.containsKey(lens1))
|
||||
blacklist.put(lens1, new ArrayList());
|
||||
blacklist.get(lens1).add(lens2);
|
||||
|
||||
|
||||
if(recursive)
|
||||
blacklistLenses(lens2, lens1, false);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isBlacklisted(int lens1, int lens2) {
|
||||
if(!blacklist.containsKey(lens1))
|
||||
return false;
|
||||
|
||||
|
||||
return blacklist.get(lens1).contains(lens2);
|
||||
}
|
||||
|
||||
@@ -396,16 +396,16 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
public boolean canCombineLenses(ItemStack sourceLens, ItemStack compositeLens) {
|
||||
if(sourceLens.getItemDamage() == compositeLens.getItemDamage())
|
||||
return false;
|
||||
|
||||
|
||||
if(sourceLens.getItemDamage() == NORMAL || compositeLens.getItemDamage() == NORMAL)
|
||||
return false;
|
||||
|
||||
|
||||
if(isBlacklisted(sourceLens.getItemDamage(), compositeLens.getItemDamage()))
|
||||
return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getCompositeLens(ItemStack stack) {
|
||||
NBTTagCompound cmp = ItemNBTHelper.getCompound(stack, TAG_COMPOSITE_LENS, false);
|
||||
@@ -418,7 +418,7 @@ public class ItemLens extends ItemMod implements ILens {
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
compositeLens.writeToNBT(cmp);
|
||||
ItemNBTHelper.setCompound(sourceLens, TAG_COMPOSITE_LENS, cmp);
|
||||
|
||||
|
||||
return sourceLens;
|
||||
}
|
||||
}
|
||||
@@ -33,14 +33,14 @@ public class ItemManaGun extends ItemMod {
|
||||
|
||||
private static final String TAG_LENS = "lens";
|
||||
private static final int COOLDOWN = 30;
|
||||
|
||||
|
||||
public ItemManaGun() {
|
||||
super(LibItemIDs.idManaGun);
|
||||
setMaxDamage(COOLDOWN);
|
||||
setMaxStackSize(1);
|
||||
setNoRepair();
|
||||
setUnlocalizedName(LibItemNames.MANA_GUN);
|
||||
|
||||
|
||||
GameRegistry.addRecipe(new ManaGunLensRecipe());
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ItemManaGun extends ItemMod {
|
||||
else setLens(par1ItemStack, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class ItemManaGun extends ItemMod {
|
||||
if(lens != null)
|
||||
((ILens) lens.getItem()).apply(lens, props);
|
||||
|
||||
|
||||
|
||||
burst.setSourceLens(lens);
|
||||
if(ManaItemHandler.requestManaExact(stack, player, props.maxMana, false)) {
|
||||
burst.setColor(props.color);
|
||||
@@ -101,7 +101,7 @@ public class ItemManaGun extends ItemMod {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
ItemStack lens = getLens(par1ItemStack);
|
||||
@@ -111,20 +111,20 @@ public class ItemManaGun extends ItemMod {
|
||||
par3List.addAll(tooltip.subList(1, tooltip.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack par1ItemStack) {
|
||||
ItemStack lens = getLens(par1ItemStack);
|
||||
return super.getItemDisplayName(par1ItemStack) + (lens == null ? "" : " (" + EnumChatFormatting.GREEN + lens.getDisplayName() + EnumChatFormatting.RESET + ")");
|
||||
}
|
||||
|
||||
|
||||
public static void setLens(ItemStack stack, ItemStack lens) {
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(lens != null)
|
||||
lens.writeToNBT(cmp);
|
||||
ItemNBTHelper.setCompound(stack, TAG_LENS, cmp);
|
||||
}
|
||||
|
||||
|
||||
public static ItemStack getLens(ItemStack stack) {
|
||||
NBTTagCompound cmp = ItemNBTHelper.getCompound(stack, TAG_LENS, true);
|
||||
if(cmp != null) {
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ItemManaTablet extends ItemMod implements IManaItem {
|
||||
Icon[] icons;
|
||||
|
||||
private static final int MAX_MANA = 500000;
|
||||
|
||||
|
||||
private static final String TAG_MANA = "mana";
|
||||
private static final String TAG_CREATIVE = "creative";
|
||||
|
||||
@@ -47,11 +47,11 @@ public class ItemManaTablet extends ItemMod implements IManaItem {
|
||||
@Override
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
par3List.add(new ItemStack(par1, 1, 10000));
|
||||
|
||||
|
||||
ItemStack fullPower = new ItemStack(par1, 1, 1);
|
||||
setMana(fullPower, MAX_MANA);
|
||||
par3List.add(fullPower);
|
||||
|
||||
|
||||
ItemStack creative = new ItemStack(par1, 1, 0);
|
||||
setMana(creative, MAX_MANA);
|
||||
setStackCreative(creative);
|
||||
@@ -92,12 +92,12 @@ public class ItemManaTablet extends ItemMod implements IManaItem {
|
||||
if(isStackCreative(par1ItemStack))
|
||||
par3List.add(StatCollector.translateToLocal("botaniamisc.creative"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getEntityLifespan(ItemStack itemStack, World world) {
|
||||
return Integer.MAX_VALUE;
|
||||
@@ -106,11 +106,11 @@ public class ItemManaTablet extends ItemMod implements IManaItem {
|
||||
public static void setMana(ItemStack stack, int mana) {
|
||||
ItemNBTHelper.setInt(stack, TAG_MANA, mana);
|
||||
}
|
||||
|
||||
|
||||
public static void setStackCreative(ItemStack stack) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_CREATIVE, true);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isStackCreative(ItemStack stack) {
|
||||
return ItemNBTHelper.getBoolean(stack, TAG_CREATIVE, false);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ItemTwigWand extends Item16Colors {
|
||||
meta = 0;
|
||||
else if(TileEnchanter.canEnchanterExist(par3World, par4, par5, par6, 1))
|
||||
meta = 1;
|
||||
|
||||
|
||||
if(meta != -1 && !par3World.isRemote) {
|
||||
par3World.setBlock(par4, par5, par6, ModBlocks.enchanter.blockID, meta, 1 | 2);
|
||||
par3World.playSoundEffect(par4, par5, par6, "random.levelup", 0.5F, 0.6F);
|
||||
@@ -63,11 +63,11 @@ public class ItemTwigWand extends Item16Colors {
|
||||
float red = (float) Math.random();
|
||||
float green = (float) Math.random();
|
||||
float blue = (float) Math.random();
|
||||
|
||||
|
||||
double x = (Math.random() - 0.5) * 6;
|
||||
double y = (Math.random() - 0.5) * 6;
|
||||
double z = (Math.random() - 0.5) * 6;
|
||||
|
||||
|
||||
float velMul = 0.07F;
|
||||
|
||||
Botania.proxy.wispFX(par3World, par4 + 0.5 + x, par5 + 0.5 + y, par6 + 0.5 + z, red, green, blue, (float) Math.random() * 0.15F + 0.15F, (float) -x * velMul, (float) -y * velMul, (float) -z * velMul);
|
||||
@@ -77,7 +77,7 @@ public class ItemTwigWand extends Item16Colors {
|
||||
boolean wanded = ((IWandable) Block.blocksList[id]).onUsedByWand(par2EntityPlayer, par1ItemStack, par3World, par4, par5, par6, par7);
|
||||
if(wanded && par3World.isRemote)
|
||||
par2EntityPlayer.swingItem();
|
||||
|
||||
|
||||
return wanded;
|
||||
|
||||
} else if(BlockPistonRelay.InternalTickHandler.playerPositions.containsKey(par2EntityPlayer.username)) {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class CompositeLensRecipe implements IRecipe {
|
||||
boolean foundLens = false;
|
||||
boolean foundSecondLens = false;
|
||||
boolean foundSlimeball = false;
|
||||
|
||||
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
@@ -48,7 +48,7 @@ public class CompositeLensRecipe implements IRecipe {
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
ItemStack lens = null;
|
||||
ItemStack secondLens = null;
|
||||
|
||||
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
@@ -63,10 +63,10 @@ public class CompositeLensRecipe implements IRecipe {
|
||||
ILens lensItem = (ILens) lens.getItem();
|
||||
if(secondLens == null || !lensItem.canCombineLenses(lens, secondLens) || lensItem.getCompositeLens(lens) != null || lensItem.getCompositeLens(secondLens) != null)
|
||||
return null;
|
||||
|
||||
|
||||
ItemStack lensCopy = lens.copy();
|
||||
((ItemLens) ModItems.lens).setCompositeLens(lensCopy, secondLens);
|
||||
|
||||
|
||||
return lensCopy;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public class ManaGunLensRecipe implements IRecipe {
|
||||
public boolean matches(InventoryCrafting var1, World var2) {
|
||||
boolean foundLens = false;
|
||||
boolean foundGun = false;
|
||||
|
||||
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
@@ -45,7 +45,7 @@ public class ManaGunLensRecipe implements IRecipe {
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
ItemStack lens = null;
|
||||
ItemStack gun = null;
|
||||
|
||||
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
@@ -58,10 +58,10 @@ public class ManaGunLensRecipe implements IRecipe {
|
||||
|
||||
if(lens == null || gun == null)
|
||||
return null;
|
||||
|
||||
|
||||
ItemStack gunCopy = gun.copy();
|
||||
ItemManaGun.setLens(gunCopy, lens);
|
||||
|
||||
|
||||
return gunCopy;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry manaTransport;
|
||||
public static LexiconEntry manaDetector;
|
||||
public static LexiconEntry compositeLens;
|
||||
|
||||
|
||||
public static LexiconEntry functionalIntro;
|
||||
public static LexiconEntry jadedAmaranthus;
|
||||
public static LexiconEntry bellethorne;
|
||||
@@ -167,13 +167,13 @@ public final class LexiconData {
|
||||
|
||||
lensPhantom = new BLexiconEntry(LibLexicon.MANA_LENS_PHANTOM, categoryMana);
|
||||
lensPhantom.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLensPhantom));
|
||||
|
||||
|
||||
lensMagnet = new BLexiconEntry(LibLexicon.MANA_LENS_MAGNET, categoryMana);
|
||||
lensMagnet.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLensMagnet));
|
||||
|
||||
|
||||
lensExplosive = new BLexiconEntry(LibLexicon.MANA_LENS_EXPLOSIVE, categoryMana);
|
||||
lensExplosive.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLensExplosive));
|
||||
|
||||
|
||||
manaVoid = new BLexiconEntry(LibLexicon.MANA_VOID, categoryMana);
|
||||
manaVoid.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeManaVoid));
|
||||
|
||||
@@ -182,10 +182,10 @@ public final class LexiconData {
|
||||
|
||||
manaDetector = new BLexiconEntry(LibLexicon.MANA_DETECTOR, categoryMana);
|
||||
manaDetector.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeManaDetector));
|
||||
|
||||
|
||||
compositeLens = new BLexiconEntry(LibLexicon.MANA_COMPOSITE_LENS, categoryMana);
|
||||
compositeLens.setLexiconPages(new PageText("0"));
|
||||
|
||||
|
||||
// FUNCTIONAL FLOWERS ENTRIES
|
||||
functionalIntro = new BLexiconEntry(LibLexicon.FFLOWER_INTRO, categoryFunctionalFlowers);
|
||||
functionalIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
|
||||
@@ -204,19 +204,19 @@ public final class LexiconData {
|
||||
|
||||
orechid = new BLexiconEntry(LibLexicon.FFLOWER_ORECHID, categoryFunctionalFlowers);
|
||||
orechid.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.orechidRecipe));
|
||||
|
||||
|
||||
fallenKanade = new BLexiconEntry(LibLexicon.FFLOWER_FALLEN_KANADE, categoryFunctionalFlowers);
|
||||
fallenKanade.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.fallenKanadeRecipe));
|
||||
|
||||
|
||||
exoflame = new BLexiconEntry(LibLexicon.FFLOWER_EXOFLAME, categoryFunctionalFlowers);
|
||||
exoflame.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.exoflameRecipe));
|
||||
|
||||
|
||||
agricarnation = new BLexiconEntry(LibLexicon.FFLOWER_AGRICARNATION, categoryFunctionalFlowers);
|
||||
agricarnation.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.agricarnationRecipe));
|
||||
|
||||
|
||||
hopperhock = new BLexiconEntry(LibLexicon.FFLOWER_HOPPERHOCK, categoryFunctionalFlowers);
|
||||
hopperhock.setLexiconPages(new PageText("0"), new PageText("1"), new PagePetalRecipe("2", ModPetalRecipes.hopperhockRecipe));
|
||||
|
||||
|
||||
// GENERATING FLOWERS ENTRIES
|
||||
generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers);
|
||||
generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
|
||||
@@ -226,7 +226,7 @@ public final class LexiconData {
|
||||
|
||||
nightshade = new BLexiconEntry(LibLexicon.GFLOWER_NIGHTSHADE, categoryGenerationFlowers);
|
||||
nightshade.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.nightshadeRecipe));
|
||||
|
||||
|
||||
endoflame = new BLexiconEntry(LibLexicon.GFLOWER_ENDOFLAME, categoryGenerationFlowers);
|
||||
endoflame.setLexiconPages(new PageText("0"), new PageText("1"), new PagePetalRecipe("2", ModPetalRecipes.endoflameRecipe));
|
||||
|
||||
@@ -235,10 +235,10 @@ public final class LexiconData {
|
||||
|
||||
thermalily = new BLexiconEntry(LibLexicon.GFLOWER_THERMALILY, categoryGenerationFlowers);
|
||||
thermalily.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.thermalilyRecipe));
|
||||
|
||||
|
||||
arcaneRose = new BLexiconEntry(LibLexicon.GFLOWER_ARCANE_ROSE, categoryGenerationFlowers);
|
||||
arcaneRose.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.arcaneRoseRecipe));
|
||||
|
||||
|
||||
// DEVICES ENTRIES
|
||||
pistonRelay = new BLexiconEntry(LibLexicon.DEVICE_PISTON_RELAY, categoryDevices);
|
||||
pistonRelay.setLexiconPages(new PageText("0"), new PageText("1"), new PageManaInfusionRecipe("2", ModManaInfusionRecipes.pistonRelayRecipe));
|
||||
@@ -247,17 +247,17 @@ public final class LexiconData {
|
||||
pylon.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipePylon));
|
||||
|
||||
manaEnchanting = new BLexiconEntry(LibLexicon.DEVICE_MANA_ENCHANTING, categoryDevices);
|
||||
manaEnchanting.setLexiconPages(new PageText("0"), new PageText("1"),
|
||||
manaEnchanting.setLexiconPages(new PageText("0"), new PageText("1"),
|
||||
new PageImage("2", LibResources.ENTRY_ENCHANTER0), new PageImage("3", LibResources.ENTRY_ENCHANTER1), new PageImage("4", LibResources.ENTRY_ENCHANTER2), new PageImage("5", LibResources.ENTRY_ENCHANTER3),
|
||||
new PageText("6"), new PageText("7"), new PageText("8"), new PageText("9"), new PageText("10"));
|
||||
|
||||
|
||||
turntable = new BLexiconEntry(LibLexicon.DEVICE_TURNTABLE, categoryDevices);
|
||||
turntable.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeTurntable));
|
||||
|
||||
|
||||
// TOOLS ENTRIES
|
||||
manaBlaster = new BLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools);
|
||||
manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCrafingRecipes.recipeManaBlaster));
|
||||
|
||||
|
||||
// MISCLENAEOUS ENTRIES
|
||||
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);
|
||||
unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks), new PageText("3"), new PageImage("4", LibResources.ENTRY_UNSTABLE_BEACON), new PageCraftingRecipe("5", ModCrafingRecipes.recipesManaBeacons), new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipesSignalFlares));
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class LibLexicon {
|
||||
public static final String DEVICE_TURNTABLE = "turntable";
|
||||
|
||||
public static final String TOOL_MANA_BLASTER = "manaBlaster";
|
||||
|
||||
|
||||
public static final String MISC_UNSTABLE_BLOCKS = "unstableBlocks";
|
||||
public static final String MISC_DECORATIVE_BLOCKS = "decorativeBlocks";
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Mon, 10 Mar 2014 15:43:25 +0000
|
||||
#Thu, 20 Mar 2014 23:30:16 +0000
|
||||
version=beta
|
||||
build_number=12
|
||||
build_number=13
|
||||
mc_version=1.6.4
|
||||
mod_name=Botania
|
||||
dir.repo=./
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
<html>
|
||||
<h2>Botania Changelog:</h2>
|
||||
<b>beta 12:</b><br>
|
||||
<li>Added Composite Lenses.</li>
|
||||
<li>Added Mana Tablet creative version.</li>
|
||||
<li>Added recipe for Earth Rune using a Red Mushroom</li>
|
||||
<li>Added some new functional flowers: Orechid, Fallen Kanade, Exoflame, Agricarnation and Hopperhock.</li>
|
||||
<li>Added some new generating flowers: Thermalily, Nightshade and Rosa Arcana.</li>
|
||||
<li>Added the Mana Blaster.</li>
|
||||
<li>Added the Mana Detector.</li>
|
||||
<li>Added the Mana Enchanter.</li>
|
||||
<li>Added the Mana Lenses: Phantom, Entropic and Magnetizing.</li>
|
||||
<li>Added the Spreader Turntable.</li>
|
||||
<li>Botania and vanilla flowers now have visual snow under them if there's snow on any side. Makes snow biomes much more pleasing.</li>
|
||||
<li>Changed quite a few things with the API.</li>
|
||||
<li>Changed the Hydroangeas and Endoflame textures.</li>
|
||||
<li>Changed the cost for the Jaded Amaranthus and the Hydroanges, crafting wise. They're more expensive now.</li>
|
||||
<li>Clipping checks for the Mana Burst entity are now handled internally, might fix some crashes.</li>
|
||||
<li>Endoflames will no longer absorb items with container item data (eg Lava Buckets)</li>
|
||||
<li>Fixed Dayblooms producing mana even at night.</li>
|
||||
<li>Fixed Mana Pools never getting removed from the mana network, causing functional flowers trying to bind to pools that don't exist and never getting any mana.</li>
|
||||
<li>Fixed Rune Altar pulling in mana even after the recipe has been concluded.</li>
|
||||
<li>Fixed bursts with a Gravity lens having different arcs in prevision and reality.</li>
|
||||
<li>Fixed crafting Mana Lenses outputting size 0 stacks.</li>
|
||||
<li>Fixed some ambiguity in the Lexica Botania regarding some items (Heisei Dream and Rune Altar).</li>
|
||||
<li>Fixed the Mana Spreader shooting a client only burst in singleplayer, having it shoot twice as much as it should.</li>
|
||||
<li>Fixed tpyos.</li>
|
||||
<li>Items in the petal and rune crafting pages of the Lexica Botania spin slower now, if enabled.</li>
|
||||
<li>Made the Damaging lens more powerful.</li>
|
||||
<li>Mana Lenses no longer display their dyed versions in the creative inventory, too much clutter.</li>
|
||||
<li>Mana Tablets dropped on the ground won't ever despawn.</li>
|
||||
<li>Normalized the sound for the functional flowers mana reading to be the same volume as other mana blocks.</li>
|
||||
<li>Rebalanced the cost for tier 3 runes.</li>
|
||||
<li>Redid the way flower generation works, it's much less sporadic and random and much more uniform over parts of the world.</li>
|
||||
<li>Right clicking on Force Relays now has a sound effect.</li>
|
||||
<li>The Mana Void now resists explosions as much as obsidian does.</li>
|
||||
<li>The Petal Apothecary can now get water from dropped water buckets in item form.</li>
|
||||
<li>The client prediction beam now has a larger than normal point that always displays, indicating where mana loss starts to happen.</li>
|
||||
<li>The client prediction beam with the Wand of the Forest is no longer continuous, but rather, a moving lance. This effectively removes the lag caused by it on a large scale. There's a config option to use the continuous beam instead.</li>
|
||||
<li>Tweaked the costs and power for some lenses.</li>
|
||||
<b>beta 11:</b><br>
|
||||
<li>Added some null checks to the client HUD for the Spreader, fixes a weird crash.</li>
|
||||
<li>Added functionaility to the Lexica Botania to redirect to other entries when clicking an item, in order to see it's recipe.</li>
|
||||
|
||||
Reference in new issue
Block a user