This commit is contained in:
Jeremy Diamond committed 2015-07-29 01:33:18 -07:00
1 parent c61d4abc0b
commit 774852d26e
3 files changed
+16 -3

No files matched your search

@@ -43,7 +43,7 @@ public class BlockInfinitato extends BlockContainer implements ILexiconable {
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
TileEntity tile = par1World.getTileEntity(par2, par3, par4);
if(tile instanceof TileInfinitato) {
((TileInfinitato) tile).jump();
((TileInfinitato) tile).interact();
par1World.spawnParticle("heart", par2 + minX + Math.random() * (maxX - minX), par3 + maxY, par4 + minZ + Math.random() * (maxZ - minZ), 0, 0 ,0);
par1World.spawnParticle("heart", par2 + minX + Math.random() * (maxX - minX), par3 + maxY, par4 + minZ + Math.random() * (maxZ - minZ), 0, 0 ,0);
par1World.spawnParticle("heart", par2 + minX + Math.random() * (maxX - minX), par3 + maxY, par4 + minZ + Math.random() * (maxZ - minZ), 0, 0 ,0);
@@ -1,5 +1,6 @@
package fox.spiteful.avaritia.compat.botania;
import net.minecraft.util.MovingObjectPosition;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@@ -108,7 +109,8 @@ public class RenderTileInfinitato extends TileEntitySpecialRenderer {
GL11.glColor3f(1F, 1F, 1F);
GL11.glScalef(1F, -1F, -1F);
if(!potato.name.isEmpty()) {
MovingObjectPosition pos = mc.objectMouseOver;
if(!potato.name.isEmpty() && pos != null && pos.blockX == potato.xCoord && pos.blockY == potato.yCoord && pos.blockZ == potato.zCoord) {
GL11.glPushMatrix();
GL11.glTranslatef(0F, -0.6F, 0F);
GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
@@ -10,8 +10,17 @@ public class TileInfinitato extends TileLudicrous {
public int jumpTicks = 0;
public String name = "";
public int nextDoIt = 0;
public void jump() {
public void interact() {
jump();
if(name.equalsIgnoreCase("shia labeouf") && !worldObj.isRemote && nextDoIt == 0) {
nextDoIt = 40;
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "botania:doit", 2.5F, 0.7F);
}
}
public void jump() {
if(jumpTicks == 0)
jumpTicks = 40;
}
@@ -27,6 +36,8 @@ public class TileInfinitato extends TileLudicrous {
this.worldObj.createExplosion(null, this.xCoord+0.5, this.yCoord, this.zCoord+0.5, 0.0f, true);
}
}
if(nextDoIt > 0)
nextDoIt--;
}
@Override