diff --git a/.classpath b/.classpath
deleted file mode 100644
index ac21377c..00000000
--- a/.classpath
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index 412eeda7..00000000
--- a/.gitattributes
+++ /dev/null
@@ -1,22 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-
-# Custom for Visual Studio
-*.cs diff=csharp
-*.sln merge=union
-*.csproj merge=union
-*.vbproj merge=union
-*.fsproj merge=union
-*.dbproj merge=union
-
-# Standard to msysgit
-*.doc diff=astextplain
-*.DOC diff=astextplain
-*.docx diff=astextplain
-*.DOCX diff=astextplain
-*.dot diff=astextplain
-*.DOT diff=astextplain
-*.pdf diff=astextplain
-*.PDF diff=astextplain
-*.rtf diff=astextplain
-*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
index 9cf427c9..38c1b377 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,175 @@
+#################
+## Eclipse
+#################
+
+*.pydevproject
+.project
+.metadata
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
+
+# External tool builders
+.externalToolBuilders/
+
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# CDT-specific
+.cproject
+
+# PDT-specific
+.buildpath
+
+
+#################
+## Visual Studio
+#################
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug/
+[Rr]elease/
+x64/
+build/
+[Bb]in/
+[Oo]bj/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.log
+*.scc
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.Publish.xml
+*.pubxml
+*.publishproj
+
+# NuGet Packages Directory
+## TODO: If you have NuGet Package Restore enabled, uncomment the next line
+#packages/
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.[Pp]ublish.xml
+*.pfx
+*.publishsettings
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+App_Data/*.mdf
+App_Data/*.ldf
+
+#############
+## Windows detritus
+#############
+
# Windows image file caches
Thumbs.db
ehthumbs.db
@@ -8,39 +180,37 @@ Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
-# Windows Installer files
-*.cab
-*.msi
-*.msm
-*.msp
+# Mac crap
+.DS_Store
-.classpath
-# =========================
-# Operating System Files
-# =========================
+#############
+## Python
+#############
-# OSX
-# =========================
+*.py[cod]
-.DS_Store
-.AppleDouble
-.LSOverride
-
-# Icon must ends with two \r.
-Icon
-
-# Thumbnails
-._*
-
-# Files that might appear on external disk
-.Spotlight-V100
-.Trashes
+# Packages
+*.egg
+*.egg-info
+dist/
+build/
+eggs/
+parts/
+var/
+sdist/
+develop-eggs/
+.installed.cfg
-bin/
-*.classpath
-.idea/.name
-*.xml
-*.class
-*.class
-ProjectKorra.iml
\ No newline at end of file
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
diff --git a/.project b/.project
deleted file mode 100644
index f5ce84d0..00000000
--- a/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- ProjectKorra
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
-
-
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 7341ab16..00000000
--- a/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/out/production/ProjectKorra/plugin.yml b/out/production/ProjectKorra/plugin.yml
deleted file mode 100644
index 37e8afeb..00000000
--- a/out/production/ProjectKorra/plugin.yml
+++ /dev/null
@@ -1,156 +0,0 @@
-name: ProjectKorra
-author: ProjectKorra
-version: 1.6.0 BETA 14
-main: com.projectkorra.ProjectKorra.ProjectKorra
-softdepend: [PreciousStones, WorldGuard, WorldEdit, Factions, MassiveCore, GriefPrevention, Towny, NoCheatPlus, LWC]
-commands:
- projectkorra:
- aliases: [b,bending,mtla,tla,korra,pk,bend]
- usage: /
-permissions:
- bending.admin:
- default: op
- description: Grants access to all commands and abilities.
- children:
- bending.player: true
- bending.command.reload: true
- bending.admin.permaremove: true
- bending.command.avatar: true
- bending.command.add.others: true
- bending.command.add: true
- bending.command.rechoose: true
- bending.admin.choose: true
- bending.ability.AvatarState: true
- bending.ability.Bloodbending: true
- bending.ability.Flight: true
- bending.command.import: true
- bending.command.toggle.all: true
- bending.command.give: true
- bending.command.invincible: true
- bending.admin.debug: true
- bending.admin.remove: true
- bending.player:
- default: true
- description: Grants access to most abilities and basic commands.
- children:
- bending.command.bind: true
- bending.command.display: true
- bending.command.toggle: true
- bending.command.choose: true
- bending.command.version: true
- bending.command.help: true
- bending.command.clear: true
- bending.command.who: true
- bending.command.preset.list: true
- bending.command.preset.create.2: true
- bending.command.preset.create: true
- bending.command.preset.bind: true
- bending.command.preset.delete: true
- bending.air: true
- bending.water: true
- bending.earth: true
- bending.fire: true
- bending.chi: true
- bending.air:
- default: true
- description: Grants access to all airbending abilities.
- children:
- bending.ability.AirBlast: true
- bending.ability.AirBubble: true
- bending.ability.AirBurst: true
- bending.ability.AirScooter: true
- bending.ability.AirShield: true
- bending.ability.AirSpout: true
- bending.ability.AirSuction: true
- bending.ability.AirSwipe: true
- bending.ability.Suffocate: true
- bending.ability.Tornado: true
- bending.ability.AirCombo: true
- bending.air.passive: true
- bending.air.flight: true
- bending.water:
- default: true
- description: Grants access to most waterbending abilities.
- children:
- bending.ability.HealingWaters: true
- bending.ability.IceBlast: true
- bending.ability.IceSpike: true
- bending.ability.OctopusForm: true
- bending.ability.PhaseChange: true
- bending.ability.Surge: true
- bending.ability.Torrent: true
- bending.ability.WaterBubble: true
- bending.ability.WaterManipulation: true
- bending.ability.WaterSpout: true
- bending.ability.WaterSpout.Wave: true
- bending.ability.WaterCombo: true
- bending.water.plantbending: true
- bending.message.nightmessage: true
- bending.water.passive: true
- bending.water.icebending: true
- bending.water.healing: true
- bending.earth:
- default: true
- description: Grants access to all Earthbending abilities.
- children:
- bending.ability.Catapult: true
- bending.ability.Collapse: true
- bending.ability.EarthArmor: true
- bending.ability.EarthBlast: true
- bending.ability.EarthGrab: true
- bending.ability.EarthTunnel: true
- bending.ability.RaiseEarth: true
- bending.ability.Shockwave: true
- bending.ability.Tremorsense: true
- bending.ability.Extraction: true
- bending.ability.MetalClips: true
- bending.ability.MetalClips.loot: false
- bending.ability.MetalClips.4clips: false
- bending.earth.passive: true
- bending.earth.metalbending: true
- bending.earth.lavabending: true
- bending.earth.sandbending: true
- bending.earth.grapplinghook: true
- bending.ability.LavaSurge: true
- bending.ability.LavaFlow: true
- bending.ability.EarthSmash: true
- bending.fire:
- default: true
- description: Grants access to all firebending abilities.
- children:
- bending.ability.Blaze: true
- bending.ability.FireBlast: true
- bending.ability.FireBurst: true
- bending.ability.FireJet: true
- bending.ability.FireShield: true
- bending.ability.HeatControl: true
- bending.ability.Illumination: true
- bending.ability.Lightning: true
- bending.ability.WallOfFire: true
- bending.ability.Combustion: true
- bending.ability.FireCombo: true
- bending.message.daymessage: true
- bending.fire.passive: true
- bending.fire.lightningbending: true
- bending.fire.combustionbending: true
- bending.chi:
- default: true
- description: Grants access to all ChiBlocking abilities.
- children:
- bending.ability.HighJump: true
- bending.ability.Paralyze: true
- bending.ability.RapidPunch: true
- bending.ability.Smokescreen: true
- bending.ability.WarriorStance: true
- bending.ability.AcrobatStance: true
- bending.ability.QuickStrike: true
- bending.ability.SwiftKick: true
- bending.ability.ChiCombo: true
- bending.chi.passive: true
- bending.chi.grapplinghook: true
- bending.avatar:
- default: false
- description: Grants the Avatar Color.
- bending.ability.MetalClips.loot:
- default: false
- description: Lets a Metalbender loot a player's inventory of its iron.
\ No newline at end of file
diff --git a/src/com/projectkorra/ProjectKorra/ConfigManager.java b/src/com/projectkorra/ProjectKorra/ConfigManager.java
index c61fbeb6..d610a0fa 100644
--- a/src/com/projectkorra/ProjectKorra/ConfigManager.java
+++ b/src/com/projectkorra/ProjectKorra/ConfigManager.java
@@ -645,6 +645,9 @@ public class ConfigManager {
+ " will instead melt blocks in that area. Finally, sneaking with this ability will cook any food in your hand.");
config.addDefault("Abilities.Fire.HeatControl.Extinguish.Range", 20);
config.addDefault("Abilities.Fire.HeatControl.Extinguish.Radius", 7);
+ config.addDefault("Abilities.Fire.HeatControl.Solidify.Range", 10);
+ config.addDefault("Abilities.Fire.HeatControl.Solidify.Radius", 5);
+ config.addDefault("Abilities.Fire.HeatControl.Solidify.RevertTime", 20000);
config.addDefault("Abilities.Fire.HeatControl.Melt.Range", 15);
config.addDefault("Abilities.Fire.HeatControl.Melt.Radius", 5);
diff --git a/src/com/projectkorra/ProjectKorra/Methods.java b/src/com/projectkorra/ProjectKorra/Methods.java
index 751183ba..0993ea80 100644
--- a/src/com/projectkorra/ProjectKorra/Methods.java
+++ b/src/com/projectkorra/ProjectKorra/Methods.java
@@ -87,7 +87,7 @@ public class Methods {
public static Integer[] transparentToEarthbending = {0, 6, 8, 9, 10, 11, 30, 31, 32, 37, 38, 39, 40, 50, 51, 59, 78, 83, 106, 175};
public static Integer[] nonOpaque = {0, 6, 8, 9, 10, 11, 27, 28, 30, 31, 32, 37, 38, 39, 40, 50, 51, 55, 59, 66, 68, 69, 70, 72,
- 75, 76, 77, 78, 83, 90, 93, 94, 104, 105, 106, 111, 115, 119, 127, 131, 132};
+ 75, 76, 77, 78, 83, 90, 93, 94, 104, 105, 106, 111, 115, 119, 127, 131, 132, 175};
/**
* Checks to see if an AbilityExists. Uses method {@link #getAbility(String)} to check if it exists.
@@ -2275,6 +2275,12 @@ public class Methods {
for (AbilityModule ab: abilities) {
ab.stop();
}
+
+ ArrayList combos = ComboManager.comboAbilityList;
+ for(ComboManager.ComboAbility c : combos)
+ if(c.getComboType() instanceof ComboAbilityModule)
+ ((ComboAbilityModule) c.getComboType()).stop();
+
AirBlast.removeAll();
AirBubble.removeAll();
AirShield.instances.clear();
diff --git a/src/com/projectkorra/ProjectKorra/PKListener.java b/src/com/projectkorra/ProjectKorra/PKListener.java
index ca11ba8e..3caf3a98 100644
--- a/src/com/projectkorra/ProjectKorra/PKListener.java
+++ b/src/com/projectkorra/ProjectKorra/PKListener.java
@@ -458,7 +458,7 @@ public class PKListener implements Listener {
new Fireball(player);
}
if (abil.equalsIgnoreCase("HeatControl")) {
- new Cook(player);
+ new HeatControl(player);
}
if (abil.equalsIgnoreCase("FireBurst")) {
new FireBurst(player);
diff --git a/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java b/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java
index e57078a9..a0a884c9 100644
--- a/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java
+++ b/src/com/projectkorra/ProjectKorra/firebending/Extinguish.java
@@ -35,8 +35,8 @@ public class Extinguish {
Material mat = block.getType();
if(mat != Material.FIRE
- && mat != Material.STATIONARY_LAVA
- && mat != Material.LAVA)
+ /*&& mat != Material.STATIONARY_LAVA
+ && mat != Material.LAVA*/)
continue;
if (Methods.isRegionProtectedFromBuild(player, "Blaze",
block.getLocation()))
@@ -44,7 +44,7 @@ public class Extinguish {
if (block.getType() == Material.FIRE) {
block.setType(Material.AIR);
block.getWorld().playEffect(block.getLocation(), Effect.EXTINGUISH, 0);
- } else if (block.getType() == Material.STATIONARY_LAVA) {
+ } /*else if (block.getType() == Material.STATIONARY_LAVA) {
block.setType(Material.OBSIDIAN);
block.getWorld().playEffect(block.getLocation(), Effect.EXTINGUISH, 0);
} else if (block.getType() == Material.LAVA) {
@@ -54,7 +54,7 @@ public class Extinguish {
block.setType(Material.COBBLESTONE);
}
block.getWorld().playEffect(block.getLocation(), Effect.EXTINGUISH, 0);
- }
+ }*/
}
bPlayer.addCooldown("HeatControl", Methods.getGlobalCooldown());
diff --git a/src/com/projectkorra/ProjectKorra/firebending/FirebendingManager.java b/src/com/projectkorra/ProjectKorra/firebending/FirebendingManager.java
index 656d114b..e2db0e44 100644
--- a/src/com/projectkorra/ProjectKorra/firebending/FirebendingManager.java
+++ b/src/com/projectkorra/ProjectKorra/firebending/FirebendingManager.java
@@ -31,6 +31,7 @@ public class FirebendingManager implements Runnable {
FireStream.ignitedblocks.remove(block);
}
}
+ HeatControl.progressAll();
FireStream.dissipateAll();
FireStream.progressAll();
FireCombo.progressAll();
diff --git a/src/com/projectkorra/ProjectKorra/firebending/HeatControl.java b/src/com/projectkorra/ProjectKorra/firebending/HeatControl.java
new file mode 100644
index 00000000..f58c240a
--- /dev/null
+++ b/src/com/projectkorra/ProjectKorra/firebending/HeatControl.java
@@ -0,0 +1,238 @@
+package com.projectkorra.ProjectKorra.firebending;
+
+import com.projectkorra.ProjectKorra.Methods;
+import com.projectkorra.ProjectKorra.ProjectKorra;
+import com.projectkorra.ProjectKorra.TempBlock;
+import com.projectkorra.ProjectKorra.Utilities.ParticleEffect;
+import org.bukkit.Location;
+import org.bukkit.Material;
+import org.bukkit.block.Block;
+import org.bukkit.entity.Player;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Created by Carbogen on 11/02/15.
+ */
+public class HeatControl
+{
+ public static ConcurrentHashMap instances = new ConcurrentHashMap();
+
+ public final double RANGE = ProjectKorra.plugin.getConfig().getDouble("Abilities.Fire.HeatControl.Solidify.Range");
+ public final int RADIUS = ProjectKorra.plugin.getConfig().getInt("Abilities.Fire.HeatControl.Solidify.Radius");
+ public final int REVERT_TIME = ProjectKorra.plugin.getConfig().getInt("Abilities.Fire.HeatControl.Solidify.RevertTime");
+
+ public static int ID = 1;
+
+ private Player player;
+ private int id;
+ private int currentRadius = 1;
+ private long delay = 50;
+ private long lastBlockTime = 0;
+ private long lastParticleTime = 0;
+ private Location center;
+ private List tblocks = new ArrayList();
+
+ public double range = RANGE;
+ public int radius = RADIUS;
+ public long revertTime = REVERT_TIME;
+
+ public HeatControl(Player player)
+ {
+
+ if (!isEligible(player))
+ return;
+
+
+ if(Methods.getLavaSourceBlock(player, getRange()) == null)
+ {
+ new Cook(player);
+ return;
+ }
+
+ this.player = player;
+
+ if(ID == Integer.MAX_VALUE - 1)
+ ID = 0;
+
+ this.id = ID;
+
+ ID++;
+
+ lastBlockTime = System.currentTimeMillis();
+
+ instances.put(id, this);
+ }
+
+ public boolean isEligible(Player player)
+ {
+ if (!Methods.canBend(player.getName(), "HeatControl"))
+ return false;
+
+ if (Methods.getBoundAbility(player) == null)
+ return false;
+
+ if (!Methods.getBoundAbility(player).equalsIgnoreCase("HeatControl"))
+ return false;
+
+ return true;
+ }
+
+ public void freeze(List area)
+ {
+ if(System.currentTimeMillis() < lastBlockTime + delay)
+ return;
+
+ List lava = new ArrayList();
+
+ for(Location l : area)
+ if(Methods.isLava(l.getBlock()))
+ lava.add(l.getBlock());
+
+ lastBlockTime = System.currentTimeMillis();
+
+ if(lava.size() == 0)
+ {
+ currentRadius ++;
+ return;
+ }
+
+ Block b = lava.get(Methods.rand.nextInt(lava.size()));
+
+ TempBlock tb;
+
+ if(TempBlock.isTempBlock(b))
+ {
+ tb = TempBlock.get(b);
+ tb.setType(Material.STONE);
+ }
+
+ else tb = new TempBlock(b, Material.STONE, b.getData());
+
+ if(!tblocks.contains(tb))
+ tblocks.add(tb);
+
+ }
+
+ public void particles(List area)
+ {
+ if(System.currentTimeMillis() < lastParticleTime + 300)
+ return;
+
+ lastParticleTime = System.currentTimeMillis();
+
+ for(Location l : area)
+ {
+ if(Methods.isLava(l.getBlock()))
+ ParticleEffect.SMOKE.display(l, 0, 0, 0, 0.1f, 2);
+ }
+ }
+
+ public void resetLocation(Location loc)
+ {
+ if(center == null)
+ {
+ center = loc;
+ return;
+ }
+
+ if(!loc.equals(center))
+ {
+ currentRadius = 1;
+ center = loc;
+ }
+ }
+
+ public void progress()
+ {
+ if(!player.isOnline() || player.isDead() || !isEligible(player) || !player.isSneaking())
+ {
+ stop();
+ return;
+ }
+
+ if(currentRadius >= getRadius())
+ {
+ stop();
+ return;
+ }
+
+ Location targetlocation = Methods.getTargetedLocation(player, range);
+
+ resetLocation(targetlocation);
+
+ List area = Methods.getCircle(center, currentRadius, 3, true, true, 0);
+
+ particles(area);
+ freeze(area);
+ }
+
+ public static void progressAll()
+ {
+ for(Integer id : instances.keySet())
+ {
+ instances.get(id).progress();
+ }
+ }
+
+ public void stop()
+ {
+ ProjectKorra.plugin.getServer().getScheduler().scheduleSyncDelayedTask(ProjectKorra.plugin, new Runnable()
+ {
+ public void run()
+ {
+ revertAll();
+ if(instances.containsKey(id))
+ instances.remove(id);
+ }
+ }, getRevertTime());
+
+ }
+
+ public void revertAll()
+ {
+ for(TempBlock tb : tblocks)
+ {
+ tb.revertBlock();
+ }
+
+ tblocks.clear();
+ }
+
+ public Player getPlayer()
+ {
+ return player;
+ }
+
+ public double getRange()
+ {
+ return range;
+ }
+
+ public int getRadius()
+ {
+ return radius;
+ }
+
+ public long getRevertTime()
+ {
+ return revertTime;
+ }
+
+ public void setRange(double value)
+ {
+ range = value;
+ }
+
+ public void setRadius(int value)
+ {
+ radius = value;
+ }
+
+ public void setRevertTime(long value)
+ {
+ revertTime = value;
+ }
+}