diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-08-13 21:12:11 +0100 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-08-13 21:12:11 +0100 |
| commit | 0ef6a00aa79f022e5bd56b3f77e6861bbecf6d94 (patch) | |
| tree | 03966c83cd16d1912ec1596d83f89f251cc35f83 /src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java | |
| parent | 921f1ba6f30e66c80c803618ebff496778e78970 (diff) | |
Added a new structure, a new curse, achievements, challenges, curses
entry in the guide; reworked liquids to be tile entities, cleaned the
structures code, potion code and... you know what? I improved and
changed so much stuff that I literally forgot what I did...
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java')
| -rw-r--r-- | src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java | 87 |
1 files changed, 45 insertions, 42 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java index 7eac88f..9cb60e4 100644 --- a/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/TileEntityCrystal.java @@ -1,42 +1,45 @@ -/** - * - */ -package darkknight.jewelrycraft.tileentity; - -import darkknight.jewelrycraft.config.ConfigHandler; -import net.minecraft.tileentity.TileEntity; - -/** - * @author Sorin - */ -public class TileEntityCrystal extends TileEntity -{ - public int shine = 120; - boolean descent = false; - int timer = 0; - - @Override - public void updateEntity() - { - if (ConfigHandler.CRYSTAL_GLOW){ - timer++; - if (timer > 20){ - if (shine < 230 && !descent){ - shine += 2; - if (shine >= 230) descent = true; - }else if (shine > 100 && descent){ - shine -= 2; - if (shine <= 100) descent = false; - } - this.worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord); - timer = 0; - } - } - } - - public boolean canUpdate() - { - return ConfigHandler.CRYSTAL_GLOW; - } - -} +/**
+ *
+ */
+package darkknight.jewelrycraft.tileentity;
+
+import org.lwjgl.opengl.GL11;
+import darkknight.jewelrycraft.config.ConfigHandler;
+import net.minecraft.tileentity.TileEntity;
+
+/**
+ * @author Sorin
+ */
+public class TileEntityCrystal extends TileEntity
+{
+ public int shine = 120;
+ boolean descent = false;
+ int timer = 0;
+
+ @Override
+ public void updateEntity()
+ {
+ if (ConfigHandler.CRYSTAL_GLOW){
+ timer++;
+ if (timer > 20){
+ if (shine < 230 && !descent){
+ shine += 2;
+ if (shine >= 230) descent = true;
+ }else if (shine > 100 && descent){
+ shine -= 2;
+ if (shine <= 100) descent = false;
+ }
+ this.worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord, yCoord, zCoord);
+ timer = 0;
+ }
+ }
+ if(ConfigHandler.CRYSTAL_PARTICLES)
+ worldObj.spawnParticle("instantSpell", xCoord + worldObj.rand.nextFloat(), yCoord + worldObj.rand.nextFloat(), zCoord + worldObj.rand.nextFloat(), 0.0D, -1.0D, 0.0D);
+ }
+
+ public boolean canUpdate()
+ {
+ return ConfigHandler.CRYSTAL_GLOW || ConfigHandler.CRYSTAL_PARTICLES;
+ }
+
+}
|
