resonance freqency of a cow

This commit is contained in:
ZeroEpoch1969
2019-07-17 12:35:36 -07:00
parent 4a91c8129b
commit c7e0a7a288
18 changed files with 98 additions and 42 deletions

View File

@ -464,7 +464,7 @@ public class FrontDoor extends FreedomService
continue;
}
block.setType(Material.SIGN);
block.setType(Material.OAK_SIGN);
org.bukkit.block.Sign sign = (org.bukkit.block.Sign)block.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)sign.getData();

View File

@ -5,11 +5,11 @@ import ca.momothereal.mojangson.value.MojangsonCompound;
import ca.momothereal.mojangson.value.MojangsonValue;
import java.util.List;
import java.util.Objects;
import net.minecraft.server.v1_13_R2.NBTTagCompound;
import net.minecraft.server.v1_13_R2.NBTTagList;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import net.minecraft.server.v1_14_R1.NBTTagList;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -128,7 +128,7 @@ public class MovementValidator extends FreedomService
private Boolean exploitItem(ItemStack item)
{
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
net.minecraft.server.v1_14_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
NBTTagList modifiers = getAttributeList(nmsStack);
MojangsonCompound compound = new MojangsonCompound();
boolean foundNegative = false;
@ -165,7 +165,7 @@ public class MovementValidator extends FreedomService
}
private NBTTagList getAttributeList(net.minecraft.server.v1_13_R2.ItemStack stack)
private NBTTagList getAttributeList(net.minecraft.server.v1_14_R1.ItemStack stack)
{
if (stack.getTag() == null)
{

View File

@ -4,16 +4,15 @@ import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.minecraft.server.v1_13_R2.EntityPlayer;
import net.minecraft.server.v1_13_R2.MinecraftServer;
import net.minecraft.server.v1_13_R2.PropertyManager;
import net.minecraft.server.v1_14_R1.EntityPlayer;
import net.minecraft.server.v1_14_R1.MinecraftServer;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_13_R2.CraftServer;
import org.bukkit.craftbukkit.v1_14_R1.CraftServer;
public class ServerInterface extends FreedomService
{
public static final String COMPILE_NMS_VERSION = "v1_13_R2";
public static final String COMPILE_NMS_VERSION = "v1_14_R1";
public ServerInterface(TotalFreedomMod plugin)
{
@ -43,9 +42,7 @@ public class ServerInterface extends FreedomService
public void setOnlineMode(boolean mode)
{
final PropertyManager manager = getServer().getPropertyManager();
manager.setProperty("online-mode", mode);
manager.savePropertiesFile();
getServer().setOnlineMode(mode);
}
public int purgeWhitelist()

View File

@ -5,7 +5,6 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.util.Groups;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -97,6 +96,13 @@ public class BlockBlocker extends FreedomService
event.setCancelled(true);
break;
}
case JIGSAW:
{
player.sendMessage(ChatColor.GRAY + "Jigsaws are disabled.");
player.getInventory().setItem(player.getInventory().getHeldItemSlot(), new ItemStack(Material.COOKIE, 1));
event.setCancelled(true);
break;
}
}
}

View File

@ -55,10 +55,13 @@ public class InteractBlocker extends FreedomService
{
final Player player = event.getPlayer();
if (event.getClickedBlock() != null && event.getClickedBlock().getType().equals(Material.STRUCTURE_BLOCK))
if (event.getClickedBlock() != null)
{
event.setCancelled(true);
event.getPlayer().closeInventory();
if (event.getClickedBlock().getType().equals(Material.STRUCTURE_BLOCK) || event.getClickedBlock().getType().equals(Material.JIGSAW))
{
event.setCancelled(true);
event.getPlayer().closeInventory();
}
}
switch (event.getMaterial())

View File

@ -59,7 +59,7 @@ public class PotionBlocker extends FreedomService
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
public void onThrowLingeringPotion(LingeringPotionSplashEvent event)
{
LingeringPotion potion = event.getEntity();
ThrownPotion potion = event.getEntity();
ProjectileSource projectileSource = potion.getShooter();
Player player = null;
if (projectileSource instanceof Player)

View File

@ -2,10 +2,11 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import net.minecraft.server.v1_13_R2.NBTTagCompound;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
import org.bukkit.Tag;
import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -37,11 +38,11 @@ public class SignBlocker extends FreedomService
{
final Player player = event.getPlayer();
if (event.getBlock().getType().equals(Material.SIGN) || event.getBlock().getType().equals(Material.WALL_SIGN))
if (event.getBlock().getType().equals(Tag.SIGNS.getValues()))
{
ItemStack sign = event.getItemInHand();
net.minecraft.server.v1_13_R2.ItemStack nmsSign = CraftItemStack.asNMSCopy(sign);
net.minecraft.server.v1_14_R1.ItemStack nmsSign = CraftItemStack.asNMSCopy(sign);
NBTTagCompound compound = (nmsSign.hasTag()) ? nmsSign.getTag() : new NBTTagCompound();
NBTTagCompound bet = compound.getCompound("BlockEntityTag");
String line1 = bet.getString("Text1");
@ -64,7 +65,7 @@ public class SignBlocker extends FreedomService
return;
}
if (event.getClickedBlock() != null && event.getClickedBlock().getType().equals(Material.SIGN) || event.getClickedBlock().getType().equals(Material.WALL_SIGN))
if (event.getClickedBlock() != null && Tag.SIGNS.getValues().contains(event.getClickedBlock().getType()))
{
event.setCancelled(true);
}

View File

@ -4,15 +4,15 @@ import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.minecraft.server.v1_13_R2.NBTTagCompound;
import net.minecraft.server.v1_13_R2.NBTTagInt;
import net.minecraft.server.v1_13_R2.NBTTagList;
import net.minecraft.server.v1_13_R2.NBTTagString;
import net.minecraft.server.v1_14_R1.NBTTagCompound;
import net.minecraft.server.v1_14_R1.NBTTagInt;
import net.minecraft.server.v1_14_R1.NBTTagList;
import net.minecraft.server.v1_14_R1.NBTTagString;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.v1_13_R2.inventory.CraftItemStack;
import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@ -149,7 +149,7 @@ public class Command_modifyitem extends FreedomCommand
{
return false;
}
net.minecraft.server.v1_13_R2.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
net.minecraft.server.v1_14_R1.ItemStack nmsStack = CraftItemStack.asNMSCopy(item);
NBTTagCompound compound = (nmsStack.hasTag()) ? nmsStack.getTag() : new NBTTagCompound();
NBTTagList modifiers = getAttributeList(nmsStack);
NBTTagCompound cmpnd = new NBTTagCompound();
@ -188,7 +188,7 @@ public class Command_modifyitem extends FreedomCommand
return true;
}
private NBTTagList getAttributeList(net.minecraft.server.v1_13_R2.ItemStack stack)
private NBTTagList getAttributeList(net.minecraft.server.v1_14_R1.ItemStack stack)
{
if (stack.getTag() == null)
{

View File

@ -190,9 +190,9 @@ public class Module_schematic extends HTTPDModule
throw new SchematicTransferException("Can't resolve original file name.");
}
if (tempFile.length() > FileUtils.ONE_KB * 64L)
if (tempFile.length() > FileUtils.ONE_MB )
{
throw new SchematicTransferException("Schematic is too big (64kb max).");
throw new SchematicTransferException("Schematic is too big (1mb max).");
}
if (!SCHEMATIC_FILENAME_LC.matcher(origFileName.toLowerCase()).find())

View File

@ -48,6 +48,7 @@ public class Groups
EntityType.BLAZE,
EntityType.CAVE_SPIDER,
EntityType.CHICKEN,
EntityType.CAT,
EntityType.COD,
EntityType.COW,
EntityType.CREEPER,
@ -56,6 +57,7 @@ public class Groups
EntityType.ENDER_DRAGON,
EntityType.ENDERMAN,
EntityType.EVOKER,
EntityType.FOX,
EntityType.GHAST,
EntityType.GIANT,
EntityType.HUSK,
@ -66,12 +68,15 @@ public class Groups
EntityType.MAGMA_CUBE,
EntityType.MUSHROOM_COW,
EntityType.OCELOT,
EntityType.PANDA,
EntityType.PARROT,
EntityType.PILLAGER,
EntityType.PHANTOM,
EntityType.PIG,
EntityType.PIG_ZOMBIE,
EntityType.POLAR_BEAR,
EntityType.PUFFERFISH,
EntityType.RAVAGER,
EntityType.SHEEP,
EntityType.SHULKER,
EntityType.SILVERFISH,
@ -82,6 +87,7 @@ public class Groups
EntityType.SQUID,
EntityType.STRAY,
EntityType.TROPICAL_FISH,
EntityType.TRADER_LLAMA,
EntityType.TURTLE,
EntityType.VEX,
EntityType.VILLAGER,
@ -89,6 +95,7 @@ public class Groups
EntityType.WITHER,
EntityType.WITHER_SKELETON,
EntityType.VINDICATOR,
EntityType.WANDERING_TRADER,
EntityType.WOLF,
EntityType.ZOMBIE);
}

View File

@ -67,7 +67,7 @@ public final class AdminWorld extends CustomWorld
world.setSpawnLocation(0, 50, 0);
final Block welcomeSignBlock = world.getBlockAt(0, 50, 0);
welcomeSignBlock.setType(Material.SIGN);
welcomeSignBlock.setType(Material.OAK_SIGN);
org.bukkit.block.Sign welcomeSign = (org.bukkit.block.Sign)welcomeSignBlock.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)welcomeSign.getData();

View File

@ -45,7 +45,7 @@ public class Flatlands extends CustomWorld
world.setSpawnLocation(0, 50, 0);
final Block welcomeSignBlock = world.getBlockAt(0, 50, 0);
welcomeSignBlock.setType(Material.SIGN);
welcomeSignBlock.setType(Material.OAK_SIGN);
org.bukkit.block.Sign welcomeSign = (org.bukkit.block.Sign)welcomeSignBlock.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)welcomeSign.getData();

View File

@ -44,7 +44,7 @@ public final class MasterBuilderWorld extends CustomWorld
world.setSpawnLocation(0, 50, 0);
final Block welcomeSignBlock = world.getBlockAt(0, 50, 0);
welcomeSignBlock.setType(Material.SIGN);
welcomeSignBlock.setType(Material.OAK_SIGN);
org.bukkit.block.Sign welcomeSign = (org.bukkit.block.Sign)welcomeSignBlock.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)welcomeSign.getData();