Cleanup...

This commit is contained in:
Vasco Lavos committed 2014-07-09 01:04:01 +01:00
1 parent ffba78011d
commit dce27b8bc5
34 files changed
+121 -128

No files matched your search

@@ -22,5 +22,5 @@ import net.minecraft.world.World;
public interface IPoolOverlayProvider {
public IIcon getIcon(World world, int x, int y, int z);
}
@@ -58,7 +58,7 @@ public class LightningHandler {
@SubscribeEvent
public void onRenderWorldLast(RenderWorldLastEvent event) {
ParticleRenderDispatcher.dispatch();
float frame = event.partialTicks;
Entity entity = Minecraft.getMinecraft().thePlayer;
+9 -10
View File
@@ -12,7 +12,6 @@
package vazkii.botania.client.fx;
import java.util.ArrayDeque;
import java.util.PriorityQueue;
import java.util.Queue;
import net.minecraft.client.Minecraft;
@@ -33,15 +32,15 @@ public class FXSparkle extends EntityFX {
public static final ResourceLocation particles = new ResourceLocation(LibResources.MISC_PARTICLES);
public static Queue<FXSparkle> queuedRenders = new ArrayDeque();
// Queue values
float f;
float f1;
float f2;
float f3;
float f4;
float f2;
float f3;
float f4;
float f5;
public FXSparkle(World world, double x, double y, double z, float size, float red, float green, float blue, int m) {
super(world, x, y, z, 0.0D, 0.0D, 0.0D);
@@ -59,16 +58,16 @@ public class FXSparkle extends EntityFX {
prevPosY = posY;
prevPosZ = posZ;
}
public static void dispatchQueuedRenders(Tessellator tessellator) {
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
Minecraft.getMinecraft().renderEngine.bindTexture(ConfigHandler.matrixMode ? ObfuscationHelper.getParticleTexture() : particles);
tessellator.startDrawingQuads();
for(FXSparkle sparkle : queuedRenders)
sparkle.renderQueued(tessellator);
tessellator.draw();
queuedRenders.clear();
}
@@ -95,7 +94,7 @@ public class FXSparkle extends EntityFX {
tessellator.addVertexWithUV(var13 + f1 * var12 - f4 * var12, var14 - f2 * var12, var15 + f3 * var12 - f5 * var12, var8, var11);
}
@Override
public void renderParticle(Tessellator tessellator, float f, float f1, float f2, float f3, float f4, float f5) {
this.f = f;
+4 -4
View File
@@ -37,9 +37,9 @@ public class FXWisp extends EntityFX {
// Queue values
float f;
float f1;
float f2;
float f3;
float f4;
float f2;
float f3;
float f4;
float f5;
public FXWisp(World world, double d, double d1, double d2, float size, float red, float green, float blue, boolean distanceLimit, float maxAgeMul) {
@@ -134,7 +134,7 @@ public class FXWisp extends EntityFX {
motionY *= 0.98000001907348633D;
motionZ *= 0.98000001907348633D;
}
public void setGravity(float value) {
particleGravity = value;
}
@@ -11,10 +11,9 @@
*/
package vazkii.botania.client.fx;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.renderer.Tessellator;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.opengl.GL11;
public final class ParticleRenderDispatcher {
@@ -22,16 +21,16 @@ public final class ParticleRenderDispatcher {
// already registered. /shrug
public static void dispatch() {
Tessellator tessellator = Tessellator.instance;
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569F);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569F);
FXSparkle.dispatchQueuedRenders(tessellator);
FXWisp.dispatchQueuedRenders(tessellator);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(true);
}
}
@@ -13,16 +13,15 @@ package vazkii.botania.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelMiniIsland extends ModelBase {
ModelRenderer island;
public ModelMiniIsland() {
textureWidth = 64;
textureHeight = 32;
setTextureOffset("island.Shape0", 0, 0);
setTextureOffset("island.Shape1-1", 8, 0);
setTextureOffset("island.Shape1-2", 16, 0);
@@ -51,7 +50,7 @@ public class ModelMiniIsland extends ModelBase {
island = new ModelRenderer(this, "island");
island.setRotationPoint(0F, 16F, 0F);
// island.mirror = true;
// island.mirror = true;
island.addBox("Shape0", -1F, 0F, -1F, 2, 5, 2);
island.addBox("Shape1-1", -1F, 0F, -3F, 2, 4, 2);
island.addBox("Shape1-2", 1F, 0F, -1F, 2, 4, 2);
@@ -85,7 +85,7 @@ public class ModelSpreader extends ModelBase {
cubeHole3.render(f);
cubeHole4.render(f);
}
public void renderCube() {
float f = 1F / 16F;
cubeInside.render(f);
@@ -20,9 +20,7 @@ import org.lwjgl.opengl.GL11;
import vazkii.botania.client.lib.LibRenderIDs;
import vazkii.botania.client.render.tile.RenderTileMiniIsland;
import vazkii.botania.client.render.tile.RenderTilePool;
import vazkii.botania.common.block.tile.TileMiniIsland;
import vazkii.botania.common.block.tile.mana.TilePool;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
public class RenderMiniIsland implements ISimpleBlockRenderingHandler {
@@ -16,7 +16,6 @@ import java.util.Random;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
@@ -24,7 +23,6 @@ import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.client.model.ModelMiniIsland;
@@ -34,7 +32,7 @@ public class RenderTileMiniIsland extends TileEntitySpecialRenderer {
private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_MINI_ISLAND);
private static final ModelMiniIsland model = new ModelMiniIsland();
public static int forcedMetadata = 0;
@Override
@@ -42,20 +40,20 @@ public class RenderTileMiniIsland extends TileEntitySpecialRenderer {
GL11.glPushMatrix();
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glTranslated(d0, d1, d2);
int worldTime = (int) (tile.getWorldObj() == null ? 0 : tile.getWorldObj().getTotalWorldTime());
if(tile.getWorldObj() != null)
worldTime += new Random(tile.xCoord ^ tile.yCoord ^ tile.zCoord).nextInt(360);
GL11.glTranslatef(0.5F, 0F, 0.5F);
GL11.glRotatef(-((float) worldTime * 0.5F), 0F, 1F, 0F);
GL11.glRotatef(-(worldTime * 0.5F), 0F, 1F, 0F);
GL11.glTranslatef(-0.5F, 0F, -0.5F);
if(tile.getWorldObj() != null) {
GL11.glTranslatef(0F, (float) Math.sin((double) worldTime * 0.05F) * 0.1F, 0F);
GL11.glRotatef(4F * (float) Math.sin((double) worldTime * 0.04F), 1F, 0F, 0F);
}
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
GL11.glPushMatrix();
GL11.glTranslatef(0.5F, 1.4F, 0.5F);
@@ -71,11 +71,11 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
waterLevel = 0.4F;
forceAllMana = false;
}
float s = 1F / 16F;
float v = 1F / 8F;
float w = -v * 3.5F;
if(pool.getWorldObj() != null) {
Block below = pool.getWorldObj().getBlock(pool.xCoord, pool.yCoord - 1, pool.zCoord);
if(below instanceof IPoolOverlayProvider) {
@@ -85,20 +85,20 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glColor4f(1F, 1F, 1F, (float) ((Math.sin((double) pool.getWorldObj().getTotalWorldTime() / 20.0) + 1) * 0.3 + 0.2));
GL11.glColor4f(1F, 1F, 1F, (float) ((Math.sin(pool.getWorldObj().getTotalWorldTime() / 20.0) + 1) * 0.3 + 0.2));
GL11.glTranslatef(-0.5F, -1F - 0.43F, -0.5F);
GL11.glRotatef(90F, 1F, 0F, 0F);
GL11.glScalef(s, s, s);
renderIcon(0, 0, overlay, 16, 16, 240);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
}
}
if(waterLevel > 0) {
s = 1F / 256F * 14F;
GL11.glPushMatrix();
@@ -109,20 +109,20 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
GL11.glTranslatef(w, -1F - (0.43F - waterLevel), w);
GL11.glRotatef(90F, 1F, 0F, 0F);
GL11.glScalef(s, s, s);
IIcon waterIcon = Blocks.water.getIcon(0, 0);
ShaderHelper.useShader(ShaderHelper.manaPool);
renderIcon(0, 0, waterIcon, 16, 16, 240);
ShaderHelper.releaseShader();
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}
GL11.glPopMatrix();
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
@@ -52,11 +52,11 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer {
Minecraft.getMinecraft().renderEngine.bindTexture(spreader.isRedstone() ? textureRs : spreader.isDreamwood() ? textureDw : texture);
GL11.glScalef(1F, -1F, -1F);
model.render();
GL11.glPushMatrix();
long worldTicks = tileentity.getWorldObj() == null ? 0 : tileentity.getWorldObj().getTotalWorldTime();
GL11.glRotatef(worldTicks % 360, 0F, 1F, 0F);
GL11.glTranslatef(0F, (float) Math.sin((double) worldTicks / 20.0) * 0.05F, 0F);
GL11.glTranslatef(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F);
model.renderCube();
GL11.glPopMatrix();
GL11.glScalef(1F, -1F, -1F);
@@ -30,7 +30,7 @@ import vazkii.botania.common.lib.LibBlockNames;
public class BlockManaVoid extends BlockModContainer implements ILexiconable, IPoolOverlayProvider {
IIcon overlay;
protected BlockManaVoid() {
super(Material.rock);
setHardness(2.0F);
@@ -38,7 +38,7 @@ public class BlockManaVoid extends BlockModContainer implements ILexiconable, IP
setStepSound(Block.soundTypeStone);
setBlockName(LibBlockNames.MANA_VOID);
}
@Override
public void registerBlockIcons(IIconRegister par1IconRegister) {
blockIcon = IconHelper.forBlock(par1IconRegister, this, 0);
@@ -46,7 +46,7 @@ public class BlockMiniIsland extends BlockModContainer implements ILexiconable {
setStepSound(soundTypeGravel);
setTickRandomly(true);
setLightLevel(1F);
float f = 0.1F;
setBlockBounds(f, f, f, 1F - f, 1F - f, 1F - f);
}
@@ -61,7 +61,7 @@ public class BlockMiniIsland extends BlockModContainer implements ILexiconable {
GameRegistry.registerBlock(this, ItemBlockWithMetadataAndName.class, par1Str);
return super.setBlockName(par1Str);
}
@Override
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
int meta = par1World.getBlockMetadata(par2, par3, par4);
@@ -81,7 +81,7 @@ public class BlockMiniIsland extends BlockModContainer implements ILexiconable {
for(int i = 0; i < 16; i++)
par3.add(new ItemStack(par1, 1, i));
}
@Override
public int damageDropped(int par1) {
return par1;
@@ -106,7 +106,7 @@ public class BlockMiniIsland extends BlockModContainer implements ILexiconable {
public int getRenderType() {
return LibRenderIDs.idMiniIsland;
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileMiniIsland();
@@ -44,7 +44,7 @@ public class BlockSolidVines extends BlockVine implements ILexiconable {
setBlockBoundsBasedOnState(w, x, y, z);
return AxisAlignedBB.getBoundingBox(x + minX, y + minY, z + minZ, x + maxX, y + maxY, z + maxZ);
}
@Override
public void updateTick(World p_149674_1_, int p_149674_2_, int p_149674_3_, int p_149674_4_, Random p_149674_5_) {
// NO-OP
@@ -48,11 +48,11 @@ public class SubTileDaybloom extends SubTileGenerating {
TileSpecialFlower flower = (TileSpecialFlower) tile;
if(flower.getSubTile() != null && flower.getSubTile().getClass() == getClass()) {
flowers++;
Color color = new Color(getColor());
float r = (float) color.getRed() / 255F;
float g = (float) color.getGreen() / 255F;
float b = (float) color.getBlue() / 255F;
float r = color.getRed() / 255F;
float g = color.getGreen() / 255F;
float b = color.getBlue() / 255F;
float m = 0.045F;
if(supertile.getWorldObj().getTotalWorldTime() % 10 == 0)
@@ -345,7 +345,7 @@ public class TileEnchanter extends TileMod implements IManaReceiver {
for(int[] pylon : PYLON_LOCATIONS[meta])
if(world.getBlock(pylon[0] + x, pylon[1] + y, pylon[2] + z) != ModBlocks.pylon ||
(world.getBlock(pylon[0] + x, pylon[1] + y - 1, pylon[2] + z) != ModBlocks.flower && world.getBlock(pylon[0] + x, pylon[1] + y - 1, pylon[2] + z) != ModBlocks.shinyFlower))
world.getBlock(pylon[0] + x, pylon[1] + y - 1, pylon[2] + z) != ModBlocks.flower && world.getBlock(pylon[0] + x, pylon[1] + y - 1, pylon[2] + z) != ModBlocks.shinyFlower)
return false;
for(int[] flower : FLOWER_LOCATIONS) {
@@ -19,5 +19,5 @@ public class TileMiniIsland extends TileEntity {
public boolean canUpdate() {
return false;
}
}
@@ -26,7 +26,7 @@ public class TileManaDetector extends TileMod implements IManaCollisionGhost {
int expectedMeta = worldObj.getEntitiesWithinAABB(IManaBurst.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1)).size() != 0 ? 1 : 0;
if(meta != expectedMeta)
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, expectedMeta, 1 | 2);
if(expectedMeta == 1)
for(int i = 0; i < 4; i++)
Botania.proxy.sparkleFX(getWorldObj(), xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), 1F, 0.2F, 0.2F, 0.7F + 0.5F * (float) Math.random(), 5);
@@ -11,10 +11,7 @@
*/
package vazkii.botania.common.block.tile.mana;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import vazkii.botania.api.mana.IClientManaHandler;
import vazkii.botania.api.mana.IPoolOverlayProvider;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.tile.TileMod;
@@ -151,7 +151,7 @@ public class TilePool extends TileMod implements IManaPool {
public void updateEntity() {
if(!ManaNetworkHandler.instance.isPoolIn(this))
ManaNetworkEvent.addPool(this);
if(worldObj.isRemote) {
double particleChance = 1F - (double) getCurrentMana() / (double) MAX_MANA * 0.1;
Color color = new Color(0x00C6FF);
@@ -223,7 +223,7 @@ public class TilePool extends TileMod implements IManaPool {
color = cmp.getInteger(TAG_COLOR);
if(cmp.hasKey(TAG_MANA_CAP))
manaCap = cmp.getInteger(TAG_MANA_CAP);
if(cmp.hasKey(TAG_KNOWN_MANA))
knownMana = cmp.getInteger(TAG_KNOWN_MANA);
}
@@ -84,7 +84,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
private float mmForcedManaLossPerTick = 4F;
private float mmForcedGravity = 0F;
private float mmForcedVelocityMultiplier = 1F;
public static boolean staticRedstone = false;
public static boolean staticDreamwood = false;
@@ -201,7 +201,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
cmp.setInteger(TAG_ROTATION_TICKS, rotationTicks);
cmp.setFloat(TAG_TICK_ROTATION_X, tickRotationX);
cmp.setFloat(TAG_TICK_ROTATION_Y, tickRotationY);
cmp.setBoolean(TAG_MAPMAKER_OVERRIDE, mapmakerOverride);
cmp.setInteger(TAG_FORCED_COLOR, mmForcedColor);
cmp.setInteger(TAG_FORCED_MANA_PAYLOAD, mmForcedManaPayload);
@@ -223,7 +223,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
rotationTicks = cmp.getInteger(TAG_ROTATION_TICKS);
tickRotationX = cmp.getFloat(TAG_TICK_ROTATION_X);
tickRotationY = cmp.getFloat(TAG_TICK_ROTATION_Y);
mapmakerOverride = cmp.getBoolean(TAG_MAPMAKER_OVERRIDE);
mmForcedColor = cmp.getInteger(TAG_FORCED_COLOR);
mmForcedManaPayload = cmp.getInteger(TAG_FORCED_MANA_PAYLOAD);
@@ -53,7 +53,7 @@ public final class ConfigHandler {
public static int shedRateGhast = 9001;
public static int shedRateSkeleton = 36000;
public static int shedRateSlime = 21000;
public static int flowerQuantity = 3;
public static int flowerDensity = 32;
@@ -101,10 +101,10 @@ public final class ConfigHandler {
desc = "Set to false to disable the particles in the elven portal.";
elfPortalParticlesEnabled = loadPropBool("elfPortal.particles.enabled", desc, elfPortalParticlesEnabled);
desc = "Set to true if you are the chosen one. For lovers of glitch art and just general mad people.";
matrixMode = loadPropBool("matrixMode.enabled", desc, matrixMode);
desc = "Set to false to disable the references in flower tooltips. (You monster D:)";
referencesEnabled = loadPropBool("references.enabled", desc, referencesEnabled);
@@ -125,28 +125,28 @@ public final class ConfigHandler {
desc = "The average amount of ticks between a chicken randomly dropping a feather. Set to -1 to disable this feature";
shedRateChicken = loadPropInt("shedRate.chicken", desc, shedRateChicken);
desc = "The average amount of ticks between a squid randomly dropping an ink sac. Set to -1 to disable this feature";
shedRateSquid = loadPropInt("shedRate.squid", desc, shedRateSquid);
desc = "The average amount of ticks between a villager randomly dropping an emerald. Set to -1 to disable this feature";
shedRateVillager = loadPropInt("shedRate.villager", desc, shedRateVillager);
desc = "The average amount of ticks between a spider randomly dropping a piece of string. Set to -1 to disable this feature";
shedRateSpider = loadPropInt("shedRate.spider", desc, shedRateSpider);
desc = "The average amount of ticks between a blaze randomly dropping a piece of blaze powder. Set to -1 to disable this feature";
shedRateBlaze = loadPropInt("shedRate.blaze", desc, shedRateBlaze);
desc = "The average amount of ticks between a ghast randomly dropping a ghast tear. Set to -1 to disable this feature";
shedRateGhast = loadPropInt("shedRate.ghast", desc, shedRateGhast);
desc = "The average amount of ticks between a skeleton randomly dropping a bone. Set to -1 to disable this feature";
shedRateSkeleton = loadPropInt("shedRate.skeleton", desc, shedRateSkeleton);
desc = "The average amount of ticks between a slime randomly dropping a slimeball. Set to -1 to disable this feature";
shedRateSlime = loadPropInt("shedRate.slime", desc, shedRateSlime);
desc = "The quanity of flower patches to generate in the world, defaults to 3, the lower the number the less patches geenrate.";
flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, 3);
@@ -61,24 +61,24 @@ public final class ManaNetworkHandler implements IManaNetwork {
return getClosest(manaCollectors.get(world), pos, world.isRemote, limit);
return null;
}
public boolean isCollectorIn(TileEntity tile) {
return isIn(tile, manaCollectors);
}
public boolean isPoolIn(TileEntity tile) {
return isIn(tile, manaPools);
}
private synchronized boolean isIn(TileEntity tile, Map<World, List<TileSignature>> map) {
List<TileSignature> list = map.get(tile.getWorldObj());
if(list == null)
return false;
for(TileSignature sig : list)
if(sig.tile == tile)
return true;
return false;
}
@@ -29,7 +29,7 @@ public final class SheddingHandler {
public void onLivingUpdate(LivingUpdateEvent event) {
if(event.entity.worldObj.isRemote)
return;
if(event.entity instanceof EntityChicken) {
if(ConfigHandler.shedRateChicken != -1 && event.entity.worldObj.rand.nextInt(ConfigHandler.shedRateChicken) == 0)
event.entity.dropItem(Items.feather, 1);
@@ -56,5 +56,5 @@ public final class SheddingHandler {
event.entity.dropItem(Items.slime_ball, 1);
}
}
}
@@ -48,7 +48,7 @@ public final class TerrasteelCraftingHandler {
int z = MathHelper.floor_double(item.posZ);
int range = 12;
for(int i = -range; i < range + 1; i++)
for(int j = -range; j < range + 1; j++)
for(int k = - range; k < range + 1; k++) {
@@ -937,38 +937,38 @@ public final class ModCrafingRecipes {
recipeSeaLamp = BotaniaAPI.getLatestAddedRecipe();
// Influence Lens Recipe
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 12),
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 12),
"PRP", "PLP", "PPP",
'P', LibOreDict.PRISMARINE_SHARD,
'R', LibOreDict.RUNE[3],
'L', new ItemStack(ModItems.lens));
recipeLensInfluence = BotaniaAPI.getLatestAddedRecipe();
// Weight Lens Recipe
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 13),
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 13),
"PPP", "PLP", "PRP",
'P', LibOreDict.PRISMARINE_SHARD,
'R', LibOreDict.RUNE[0],
'L', new ItemStack(ModItems.lens));
recipeLensWeight = BotaniaAPI.getLatestAddedRecipe();
// Paint Lens Recipe
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 14),
addOreDictRecipe(new ItemStack(ModItems.lens, 1, 14),
" E ", "WLW", " E ",
'E', LibOreDict.ELEMENTIUM,
'W', new ItemStack(Blocks.wool, 1, Short.MAX_VALUE),
'L', new ItemStack(ModItems.lens));
recipeLensPaint = BotaniaAPI.getLatestAddedRecipe();
// Mini Island Recipes
for(int i = 0; i < 16; i++)
GameRegistry.addRecipe(new ItemStack(ModBlocks.miniIsland, 1, i),
"F", "S", "D",
GameRegistry.addRecipe(new ItemStack(ModBlocks.miniIsland, 1, i),
"F", "S", "D",
'F', new ItemStack(ModBlocks.shinyFlower, 1, i),
'S', new ItemStack(ModItems.grassSeeds),
'D', new ItemStack(Blocks.dirt));
recipesMiniIsland = BotaniaAPI.getLatestAddedRecipes(16);
// Mana and Terrasteel Block Recipes
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
"III", "III", "III",
@@ -340,13 +340,13 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
@Override
public void onUpdate() {
superUpdate();
if(!fake && !isDead) {
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
if(tile != null && tile instanceof TileSpreader)
((TileSpreader) tile).canShootBurst = false;
}
}
ILensEffect lens = getLensInstance();
if(lens != null)
@@ -23,7 +23,7 @@ public class ItemDye extends Item16Colors {
public ItemDye() {
super(LibItemNames.DYE);
}
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
Block block = par3World.getBlock(par4, par5, par6);
@@ -357,7 +357,7 @@ public class ItemLens extends ItemMod implements ILens {
public void updateBurst(IManaBurst burst, ItemStack stack) {
EntityThrowable entity = (EntityThrowable) burst;
int storedColor = getStoredColor(stack);
if(storedColor == 16 && entity.worldObj.isRemote)
burst.setColor(getLensColor(stack));
@@ -480,10 +480,10 @@ public class ItemLens extends ItemMod implements ILens {
@Override
public boolean doParticles(IManaBurst burst, ItemStack stack) {
// int storedColor = getStoredColor(stack);
// if(storedColor == 16 && !burst.isFake())
// return ((EntityThrowable) burst).ticksExisted > 5;
// int storedColor = getStoredColor(stack);
// if(storedColor == 16 && !burst.isFake())
// return ((EntityThrowable) burst).ticksExisted > 5;
return true;
}
@@ -115,10 +115,10 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem {
EntityManaBurst burst = getBurst(Minecraft.getMinecraft().thePlayer, par1ItemStack, false);
Color color = new Color(burst == null ? 0x20FF20 : burst.getColor());
float mul = (float) (Math.sin((double) ClientTickHandler.ticksInGame / 5) * 0.15F);
int c = (int) (255 * mul);
return new Color(Math.max(0, Math.min(255, color.getRed() + c)), Math.max(0, Math.min(255, color.getGreen() + c)), Math.max(0, Math.min(255, color.getBlue() + c))).getRGB();
}
@@ -51,9 +51,9 @@ public class ItemIcePendant extends ItemBauble {
tickIceRemovers(player);
if(!player.isSneaking() && !player.isInsideOfMaterial(Material.water)) {
int x = (int) MathHelper.floor_double(player.posX);
int y = (int) MathHelper.floor_double(player.posY - (player.isInWater() ? 0 : 1) - (player.worldObj.isRemote ? 1 : 0));
int z = (int) MathHelper.floor_double(player.posZ);
int x = MathHelper.floor_double(player.posX);
int y = MathHelper.floor_double(player.posY - (player.isInWater() ? 0 : 1) - (player.worldObj.isRemote ? 1 : 0));
int z = MathHelper.floor_double(player.posZ);
int range = 3;
for(int i = -range - 1; i < range; i++)
@@ -247,7 +247,7 @@ public final class LexiconData {
paintLens = new ALexiconEntry(LibLexicon.MANA_PAINT_LENS, categoryMana);
paintLens.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLensPaint));
// FUNCTIONAL FLOWERS ENTRIES
functionalIntro = new BLexiconEntry(LibLexicon.FFLOWER_INTRO, categoryFunctionalFlowers);
functionalIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageCraftingRecipe("4", ModCrafingRecipes.recipeRedstoneRoot));
@@ -522,7 +522,7 @@ public final class LexiconData {
prismarine = new BLexiconEntry(LibLexicon.MISC_PRISMARINE, categoryMisc);
prismarine.setLexiconPages(new PageText("0"), new PageText("1"), new PageManaInfusionRecipe("2", ModManaAlchemyRecipes.prismarineRecipe), new PageCraftingRecipe("3", ModCrafingRecipes.recipePrismarine), new PageCraftingRecipe("4", ModCrafingRecipes.recipePrismarineBrick), new PageCraftingRecipe("5", ModCrafingRecipes.recipeDarkPrismarine), new PageCraftingRecipe("6", ModCrafingRecipes.recipeSeaLamp));
shedding = new BLexiconEntry(LibLexicon.MISC_SHEDDING, categoryMisc);
shedding.setLexiconPages(new PageText("0"));
}
+11 -13
View File
@@ -13,10 +13,10 @@ package vazkii.botania.test;
import java.util.Random;
import vazkii.botania.common.block.ModBlocks;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import vazkii.botania.common.block.ModBlocks;
public class MassiveAssTree extends WorldGenerator {
@@ -25,24 +25,22 @@ public class MassiveAssTree extends WorldGenerator {
for(int j = y; j <= y + height && y < 256; ++j)
for(int k = z - radius; k < z + radius; ++k) {
int y1 = height - (j - y) - rand.nextInt(radius / 2);
if((i - x) * (i - x) + (k - z) * (k - z) <= (radius * radius + y1))
if((i - x) * (i - x) + (k - z) * (k - z) <= radius * radius + y1)
world.setBlock(i, j, k, ModBlocks.livingwood);
}
}
public void generateCanopy(World world, Random rand, int x, int y, int z, int radius, int height) {
float uDiv = (radius * radius) / (height / 2);
float lDiv = (radius * radius) / (height / 2);
int groundHeight = 35;
float uDiv = radius * radius / (height / 2);
float lDiv = radius * radius / (height / 2);
for(int i = x - radius; i < x + radius; ++i)
for(float k = z - radius; k < z + radius; ++k)
for(float j = y + height; j >= 0 && j < 256; --j) {
float bx = (i - x);
float by = (j - y);
float bz = (k - z);
float bx = i - x;
float by = j - y;
float bz = k - z;
if (inCanopy(bx, by, bz, radius, height, lDiv, uDiv))
world.setBlock((int)i, (int)j, (int)k, Blocks.leaves, 3, 1 | 2);
world.setBlock(i, (int)j, (int)k, Blocks.leaves, 3, 1 | 2);
}
}
@@ -62,10 +60,10 @@ public class MassiveAssTree extends WorldGenerator {
@Override
public boolean generate(World world, Random rand, int x, int y, int z) {
float scale = (rand.nextFloat() * 0.5F + 1.0F);
float scale = rand.nextFloat() * 0.5F + 1.0F;
int height = (int)((30 + rand.nextInt(10)) * scale);
this.generateTrunk(world, rand, x, y, z, (int)(3 * scale), height);
this.generateCanopy(world, rand, x, y + height, z, (int)((30 + rand.nextInt(15)) ), (int)((10 + rand.nextInt(5)) ));
generateTrunk(world, rand, x, y, z, (int)(3 * scale), height);
generateCanopy(world, rand, x, y + height, z, 30 + rand.nextInt(15), 10 + rand.nextInt(5));
return true;
}
}
+5
View File
@@ -1,3 +1,8 @@
r1.1 75
*Added Fancy floating flowers.
*Fixed Rainbow Tinted lenses not rendering when there's a block above the spreader.
*Fixed the Force Relay being allowed to push bedrock and blocks of the like.
*Increased the range in which the terrasteel crafting process can pull mana from.
r1.1 74
*Added Shedding. All sorts of mobs now randomly drop components of their body (eg, feathers on chickens, bones on skeletons, ghast tears, etc). This feature duplicates the mod ChickenShed and adds variants to other mobs. It can be tweaked in the config.
*Fixed Glimmering Flowers working below pylons for the enchanter.