Merge remote-tracking branch 'origin/TFM-1.13' into TFM-1.13

This commit is contained in:
Lemon
2019-02-09 14:45:56 +05:00
38 changed files with 833 additions and 116 deletions

View File

@ -7,7 +7,7 @@ import lombok.Getter;
import lombok.Setter;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.MaterialGroup;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -72,7 +72,7 @@ public class Jumppads extends FreedomService
{
canPush = true;
}
if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType()))
if (Groups.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType()))
{
if (canPush)
{
@ -88,29 +88,29 @@ public class Jumppads extends FreedomService
}
else
{
if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType()))
if (Groups.WOOL_COLORS.contains(block.getRelative(0, -1, 0).getType()))
{
velocity.add(new Vector(0.0, strength, 0.0));
}
if (players.get(event.getPlayer()) == JumpPadMode.NORMAL_AND_SIDEWAYS)
{
if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(1, 0, 0).getType()))
if (Groups.WOOL_COLORS.contains(block.getRelative(1, 0, 0).getType()))
{
velocity.add(new Vector(-DAMPING_COEFFICIENT * strength, 0.0, 0.0));
}
if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(-1, 0, 0).getType()))
if (Groups.WOOL_COLORS.contains(block.getRelative(-1, 0, 0).getType()))
{
velocity.add(new Vector(DAMPING_COEFFICIENT * strength, 0.0, 0.0));
}
if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, 0, 1).getType()))
if (Groups.WOOL_COLORS.contains(block.getRelative(0, 0, 1).getType()))
{
velocity.add(new Vector(0.0, 0.0, -DAMPING_COEFFICIENT * strength));
}
if (MaterialGroup.WOOL_COLORS.contains(block.getRelative(0, 0, -1).getType()))
if (Groups.WOOL_COLORS.contains(block.getRelative(0, 0, -1).getType()))
{
velocity.add(new Vector(0.0, 0.0, DAMPING_COEFFICIENT * strength));
}

View File

@ -5,7 +5,7 @@ import java.util.Random;
import java.util.Set;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.MaterialGroup;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
@ -65,7 +65,7 @@ public class Trailer extends FreedomService
return;
}
fromBlock.setType(MaterialGroup.WOOL_COLORS.get(random.nextInt(MaterialGroup.WOOL_COLORS.size())));
fromBlock.setType(Groups.WOOL_COLORS.get(random.nextInt(Groups.WOOL_COLORS.size())));
BlockData data = fromBlock.getBlockData();
Material material = Material.getMaterial(String.valueOf(fromBlock.getType()));
for (int x = -1; x <= 1; x++)