mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-11-01 09:59:18 +00:00
fix CME in densityshift, allow kelp to be cooked with heatcontrol, fix earthgrab on tridents
This commit is contained in:
parent
8aa84fc23c
commit
a7fd485308
|
@ -292,8 +292,11 @@ public class EarthGrab extends EarthAbility {
|
|||
if (!isEarth(entity.getLocation().clone().subtract(0, 1, 0).getBlock()) && (this.bPlayer.canSandbend() && !isSand(entity.getLocation().clone().subtract(0, 1, 0).getBlock())) && entity.getLocation().clone().subtract(0, 1, 0).getBlock().getType() != Material.FARMLAND) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (entity instanceof Arrow) {
|
||||
if (entity instanceof Trident) {
|
||||
final Location l = entity.getLocation();
|
||||
entity.remove();
|
||||
entity = l.getWorld().dropItem(l, new ItemStack(Material.TRIDENT, 1));
|
||||
} else if (entity instanceof Arrow) {
|
||||
final Location l = entity.getLocation();
|
||||
entity.remove();
|
||||
entity = l.getWorld().dropItem(l, new ItemStack(Material.ARROW, 1));
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
package com.projectkorra.projectkorra.earthbending.passive;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.projectkorra.projectkorra.BendingPlayer;
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ability.EarthAbility;
|
||||
|
@ -18,6 +9,14 @@ import com.projectkorra.projectkorra.command.Commands;
|
|||
import com.projectkorra.projectkorra.configuration.ConfigManager;
|
||||
import com.projectkorra.projectkorra.util.TempBlock;
|
||||
import com.projectkorra.projectkorra.util.TempBlock.RevertTask;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class DensityShift extends EarthAbility implements PassiveAbility {
|
||||
private static final Set<TempBlock> SAND_BLOCKS = new HashSet<>();
|
||||
|
@ -86,7 +85,8 @@ public class DensityShift extends EarthAbility implements PassiveAbility {
|
|||
}
|
||||
|
||||
public static void revertAllSand() {
|
||||
for (final TempBlock block : SAND_BLOCKS) {
|
||||
Set<TempBlock> sandtoremove = new HashSet<>(SAND_BLOCKS);
|
||||
for (final TempBlock block : sandtoremove) {
|
||||
block.revertBlock();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,26 +1,5 @@
|
|||
package com.projectkorra.projectkorra.firebending;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.Levelled;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import com.projectkorra.projectkorra.BendingPlayer;
|
||||
import com.projectkorra.projectkorra.GeneralMethods;
|
||||
import com.projectkorra.projectkorra.ProjectKorra;
|
||||
|
@ -36,6 +15,18 @@ import com.projectkorra.projectkorra.waterbending.WaterSpoutWave;
|
|||
import com.projectkorra.projectkorra.waterbending.combo.IceWave;
|
||||
import com.projectkorra.projectkorra.waterbending.ice.PhaseChange;
|
||||
import com.projectkorra.projectkorra.waterbending.multiabilities.WaterArmsSpear;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.Levelled;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class HeatControl extends FireAbility {
|
||||
|
||||
|
@ -43,7 +34,7 @@ public class HeatControl extends FireAbility {
|
|||
COOK, EXTINGUISH, MELT, SOLIDIFY
|
||||
}
|
||||
|
||||
private static final Material[] COOKABLE_MATERIALS = { Material.BEEF, Material.CHICKEN, Material.COD, Material.PORKCHOP, Material.POTATO, Material.RABBIT, Material.MUTTON, Material.SALMON };
|
||||
private static final Material[] COOKABLE_MATERIALS = { Material.BEEF, Material.CHICKEN, Material.COD, Material.PORKCHOP, Material.POTATO, Material.RABBIT, Material.MUTTON, Material.SALMON, Material.KELP };
|
||||
|
||||
private HeatControlType heatControlType;
|
||||
|
||||
|
@ -270,6 +261,9 @@ public class HeatControl extends FireAbility {
|
|||
case SALMON:
|
||||
cooked = new ItemStack(Material.COOKED_SALMON);
|
||||
break;
|
||||
case KELP:
|
||||
cooked = new ItemStack(Material.DRIED_KELP);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue