Add compatible with new FurnitureLib

This commit is contained in:
Ste3et_C0st 2020-12-11 19:39:22 +01:00
parent 93be9590cf
commit 2b33bba202
6 changed files with 8 additions and 12 deletions

View File

@ -105,7 +105,7 @@
<dependency>
<groupId>com.github.Ste3et</groupId>
<artifactId>FurnitureLib</artifactId>
<version>9d4941bc50</version>
<version>115d27f400</version>
</dependency>
</dependencies>
</project>

View File

@ -6,10 +6,8 @@ import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import java.util.UUID;
@ -32,7 +30,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.util.EulerAngle;
import org.bukkit.util.io.BukkitObjectInputStream;
import org.bukkit.util.io.BukkitObjectOutputStream;
import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder;
@ -42,7 +39,6 @@ import de.Ste3et_C0st.Furniture.Objects.garden.config;
import de.Ste3et_C0st.FurnitureLib.main.Furniture;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
import de.Ste3et_C0st.FurnitureLib.main.entity.fEntity;
public class AdventCalender extends Furniture implements Listener{

View File

@ -10,6 +10,7 @@ import org.bukkit.map.MapView;
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass;
import de.Ste3et_C0st.Furniture.Camera.Utils.RenderClass.ScaleMode;
import de.Ste3et_C0st.Furniture.Main.FurnitureHook;
import de.Ste3et_C0st.FurnitureLib.Utilitis.LocationUtil;
import de.Ste3et_C0st.FurnitureLib.Utilitis.Relative;
import de.Ste3et_C0st.FurnitureLib.main.Furniture;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
@ -80,7 +81,7 @@ public class camera extends Furniture{
Location locCopy = getLocation().getBlock().getLocation().clone();
pLocation.setYaw(locCopy.getYaw());
if(pLocation.equals(locCopy)){
if(getLutil().yawToFace(player.getLocation().getYaw()).getOppositeFace().equals(getBlockFace())){
if(LocationUtil.yawToFace(player.getLocation().getYaw()).getOppositeFace().equals(getBlockFace())){
if(canBuild(player)){
if(!player.getInventory().getItemInMainHand().getType().equals(Material.valueOf(FurnitureHook.isNewVersion() ? "FILLED_MAP" : "MAP"))){
if(entity == null || entity2 == null)return;

View File

@ -2,10 +2,8 @@ package de.Ste3et_C0st.Furniture.Objects.electric;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;

View File

@ -13,6 +13,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.util.EulerAngle;
import de.Ste3et_C0st.Furniture.Main.FurnitureHook;
import de.Ste3et_C0st.FurnitureLib.Utilitis.LocationUtil;
import de.Ste3et_C0st.FurnitureLib.main.Furniture;
import de.Ste3et_C0st.FurnitureLib.main.ObjectID;
import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
@ -48,7 +49,7 @@ public class TFlowerPot extends Furniture{
List<fArmorStand> packetList = new ArrayList<fArmorStand>();
float yaw = 90;
for(int i = 0; i<=3;i++){
Location location = getLutil().getRelative(getCenter(), getLutil().yawToFace(yaw), .53, .08);
Location location = getLutil().getRelative(getCenter(), LocationUtil.yawToFace(yaw), .53, .08);
location.add(0,-1.7,0);
location.setYaw(90+yaw);

View File

@ -36,7 +36,7 @@ public class largeTable extends Furniture{
public void setTeller(HashMap<Integer, ItemStack> itemList){
int i = 0;
for(Integer id : tellerIDs){
fEntity as = getManager().getfArmorStandByID(id);
fEntity as = getManager().getByArmorStandID(getWorld(), id);
as.getInventory().setItemInMainHand(itemList.get(i));
i++;
}
@ -49,7 +49,7 @@ public class largeTable extends Furniture{
if(player == null) return;
if(canBuild(player)) {
for(Integer id : tellerIDs){
fEntity asp = getManager().getfArmorStandByID(id);
fEntity asp = getManager().getByArmorStandID(getWorld(), id);
if(asp!=null&&asp.getInventory().getItemInMainHand()!=null){
if(asp.getName().startsWith("#TELLER")){
fEntity packet = asp;
@ -118,7 +118,7 @@ public class largeTable extends Furniture{
HashMap<Integer, ItemStack> teller = new HashMap<Integer, ItemStack>();
for(Integer id : tellerIDs){
try{
fEntity as = getManager().getfArmorStandByID(id);
fEntity as = getManager().getByArmorStandID(getWorld(), id);
teller.put(teller.size(), as.getInventory().getItemInMainHand());
}catch(Exception e){
teller.put(teller.size(), new ItemStack(Material.AIR));