mirror of
https://github.com/Ste3et/furniture.git
synced 2024-06-25 22:24:56 +02:00
Pre-Test
This commit is contained in:
parent
20c0aa71af
commit
e8d6f6dee3
|
@ -95,7 +95,6 @@ public class Crossbow extends Furniture implements Listener {
|
|||
asList.add(stand);
|
||||
|
||||
for(fArmorStand asp : asList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,6 @@ public class HumanSkeleton extends Furniture implements Listener {
|
|||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(-90,13,-5)));
|
||||
asList.add(stand);
|
||||
for(fArmorStand asp : asList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
}
|
||||
|
@ -92,5 +91,4 @@ public class HumanSkeleton extends Furniture implements Listener {
|
|||
|
||||
@Override
|
||||
public void onFurnitureClick(FurnitureClickEvent paramFurnitureClickEvent) {}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@ import de.Ste3et_C0st.FurnitureLib.main.Type.SQLAction;
|
|||
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
|
||||
|
||||
public class catapult extends Furniture implements Listener {
|
||||
|
||||
public catapult(ObjectID id) {
|
||||
super(id);
|
||||
if(isFinish()){
|
||||
|
@ -68,7 +67,7 @@ public class catapult extends Furniture implements Listener {
|
|||
}
|
||||
|
||||
for(int i =0;i<4;i++){
|
||||
Location loc = getRelative(getCenter(), .9 , -.26-d).add(0, -.9+i*.44, 0);
|
||||
Location loc = getRelative(getCenter(), .9 , -.26-d).add(0, -.9+i*.43, 0);
|
||||
fArmorStand stand = spawnArmorStand(loc);
|
||||
stand.setHelmet(new ItemStack(Material.LOG));
|
||||
stand.setSmall(true);
|
||||
|
@ -76,7 +75,7 @@ public class catapult extends Furniture implements Listener {
|
|||
}
|
||||
|
||||
for(int i =0;i<4;i++){
|
||||
Location loc = getRelative(getCenter(), .9 , -2+.28+d).add(0, -.9+i*.44, 0);
|
||||
Location loc = getRelative(getCenter(), .9 , -2+.28+d).add(0, -.9+i*.43, 0);
|
||||
fArmorStand stand = spawnArmorStand(loc);
|
||||
stand.setHelmet(new ItemStack(Material.LOG));
|
||||
stand.setSmall(true);
|
||||
|
@ -135,7 +134,6 @@ public class catapult extends Furniture implements Listener {
|
|||
asList.add(stand);
|
||||
|
||||
for(fArmorStand asp : asList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
}
|
||||
|
||||
|
@ -240,5 +238,4 @@ public class catapult extends Furniture implements Listener {
|
|||
e.getPlayer().getInventory().setItem(i, is);
|
||||
e.getPlayer().updateInventory();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -75,7 +75,6 @@ public class flag extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand packet : asList){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
packet.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,13 +186,13 @@ public class guillotine extends Furniture implements Listener{
|
|||
Location loc6 = getLutil().getRelativ(center.clone(), getBlockFace(), 0d, -.75d).add(0, 4.2, 0);
|
||||
Location loc7 = getLutil().getRelativ(center.clone(), getBlockFace(), -.43d, 0d).add(0, 4.5, 0);
|
||||
|
||||
Location loc8 = getLutil().getRelativ(center.clone(), getBlockFace(), -.32d, -.22d).add(0, 3.6, 0);
|
||||
Location loc9 = getLutil().getRelativ(center.clone(), getBlockFace(), -.32d, -.75d).add(0, 3.6, 0);
|
||||
Location loc10 = getLutil().getRelativ(center.clone(), getBlockFace(), -.32d, -.33d).add(0, 3.5, 0);
|
||||
Location loc11 = getLutil().getRelativ(center.clone(), getBlockFace(), -.32d, -.82d).add(0, 3.3, 0);
|
||||
Location loc8 = getLutil().getRelativ(center.clone(), getBlockFace(), -.01d, -.22d).add(0, 3.6, 0);
|
||||
Location loc9 = getLutil().getRelativ(center.clone(), getBlockFace(), -.01d, -.75d).add(0, 3.6, 0);
|
||||
Location loc10 = getLutil().getRelativ(center.clone(), getBlockFace(), -.01d, -.33d).add(0, 3.5, 0);
|
||||
Location loc11 = getLutil().getRelativ(center.clone(), getBlockFace(), -.01d, -.82d).add(0, 3.3, 0);
|
||||
|
||||
loc1.setYaw(getLutil().FaceToYaw(getBlockFace().getOppositeFace()));
|
||||
loc2.setYaw(getLutil().FaceToYaw(getBlockFace()));
|
||||
loc1.setYaw(getYaw()+90);
|
||||
loc2.setYaw(getYaw()-90);
|
||||
loc3.setYaw(getLutil().FaceToYaw(getBlockFace().getOppositeFace()));
|
||||
loc4.setYaw(getLutil().FaceToYaw(getBlockFace()));
|
||||
loc5.setYaw(getLutil().FaceToYaw(getBlockFace().getOppositeFace()));
|
||||
|
@ -290,7 +290,6 @@ public class guillotine extends Furniture implements Listener{
|
|||
packList.add(packet3);
|
||||
|
||||
for(fArmorStand packets : packList){
|
||||
packets.setGravity(false);
|
||||
packets.setInvisible(true);
|
||||
packets.setBasePlate(false);
|
||||
}
|
||||
|
@ -658,5 +657,4 @@ public class guillotine extends Furniture implements Listener{
|
|||
invIII = inv;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -201,24 +201,24 @@ public class weaponStand extends Furniture {
|
|||
|
||||
Location center2 = center;
|
||||
Location center3 = center.clone();
|
||||
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), center2);
|
||||
double offsety = 0.4;
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), center2.add(0, offsety, 0));
|
||||
as.getInventory().setHelmet(new ItemStack(Material.WOOD_PLATE, 1, (short) 0));
|
||||
as.setPose(getLutil().degresstoRad(new EulerAngle(0, 45, 0)), BodyPart.HEAD);
|
||||
packList.add(as);
|
||||
|
||||
as = getManager().createArmorStand(getObjID(), center3.add(0, .2, 0));
|
||||
as = getManager().createArmorStand(getObjID(), center3.add(0, .2, 0).add(0, offsety, 0));
|
||||
as.getInventory().setHelmet(new ItemStack(Material.WOOD_PLATE, 1, (short) 0));
|
||||
as.setPose(getLutil().degresstoRad(new EulerAngle(0, 45, 0)), BodyPart.HEAD);
|
||||
packList.add(as);
|
||||
|
||||
Location location = center;
|
||||
location = location.add(0, 0, 0);
|
||||
location = location.add(0, -offsety, 0);
|
||||
|
||||
float yaw = 0;
|
||||
for(int i = 0; i<4;i++){
|
||||
BlockFace face = getLutil().yawToFace(yaw);
|
||||
Location locat = getLutil().getRelativ(location, face, .185D, .185D);
|
||||
Location locat = getLutil().getRelativ(location, face, -.0D, -.0D);
|
||||
|
||||
as = getManager().createArmorStand(getObjID(), locat.clone());
|
||||
as.getInventory().setHelmet(new ItemStack(Material.FENCE_GATE, 1, (short) 0));
|
||||
|
@ -259,11 +259,9 @@ public class weaponStand extends Furniture {
|
|||
packList.add(as);
|
||||
|
||||
for(fArmorStand asp : packList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,11 +45,16 @@ public class BlackBoard extends Furniture implements Listener {
|
|||
}
|
||||
d = -.235;
|
||||
for(int i = 0; i<6;i++){
|
||||
Location loc1 = getRelative(getCenter(), getBlockFace(), -.27, d).add(0, -2.5, 0);
|
||||
Location loc1 = getRelative(getCenter(), getBlockFace(), -.27, d).add(0, -2.2, 0);
|
||||
fArmorStand stand = spawnArmorStand(loc1.clone().add(0, .4, 0));
|
||||
stand.setHelmet(new ItemStack(Material.WOOD_PLATE));
|
||||
stand.setHeadPose(new EulerAngle(0, 0, 0));
|
||||
aspList.add(stand);
|
||||
|
||||
stand = spawnArmorStand(loc1.clone().add(0, .32, 0));
|
||||
stand.setHelmet(new ItemStack(Material.TRAP_DOOR));
|
||||
stand.setHeadPose(new EulerAngle(0, 0, 0));
|
||||
aspList.add(stand);
|
||||
d+=.49;
|
||||
}
|
||||
Location loc = getRelative(getCenter(), getBlockFace(),.25d, 1.2d).add(0, -1.63, 0);
|
||||
|
@ -62,7 +67,6 @@ public class BlackBoard extends Furniture implements Listener {
|
|||
aspList.add(stand);
|
||||
for(fArmorStand as : aspList){
|
||||
as.setInvisible(true);
|
||||
as.setGravity(false);
|
||||
}
|
||||
|
||||
send();
|
||||
|
|
|
@ -67,22 +67,21 @@ public class SchoolChair extends Furniture implements Listener {
|
|||
stand.setMarker(false);
|
||||
asList.add(stand);
|
||||
|
||||
stand = spawnArmorStand(getCenter().subtract(0, 1.6, 0));
|
||||
stand = spawnArmorStand(getCenter().subtract(0, 1.35, 0));
|
||||
stand.setHelmet(new ItemStack(Material.IRON_PLATE));
|
||||
asList.add(stand);
|
||||
|
||||
stand = spawnArmorStand(getCenter().subtract(0, 1.5, 0));
|
||||
stand = spawnArmorStand(getCenter().subtract(0, 1.3, 0));
|
||||
stand.setName("#SITZ#");
|
||||
asList.add(stand);
|
||||
|
||||
stand = spawnArmorStand(getCenter().subtract(0, 1, 0));
|
||||
stand = spawnArmorStand(getRelative(getCenter().subtract(0, 1.1, 0), getBlockFace(), .25, 0));
|
||||
stand.setHelmet(new ItemStack(Material.IRON_PLATE));
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(-100, 0, 0)));
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(-89, 0, 0)));
|
||||
asList.add(stand);
|
||||
|
||||
for(fArmorStand as : asList){
|
||||
as.setInvisible(true);
|
||||
as.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -98,7 +98,7 @@ public class SchoolTable extends Furniture implements Listener {
|
|||
Location loc4 = getRelative(getCenter(), getBlockFace(), .16+.41, .67-.36).subtract(0, 1.9, 0);
|
||||
loc4.setYaw(getYaw()+90);
|
||||
|
||||
Location loc5 = getRelative(getCenter(), getBlockFace(), .37, .33).subtract(0, .22, 0);
|
||||
Location loc5 = getRelative(getCenter(), getBlockFace(), .37, .33).subtract(0, .35, 0);
|
||||
loc5.setYaw(getYaw()+90);
|
||||
|
||||
fArmorStand stand = spawnArmorStand(loc1);
|
||||
|
@ -125,7 +125,7 @@ public class SchoolTable extends Furniture implements Listener {
|
|||
stand.setMarker(false);
|
||||
asList.add(stand);
|
||||
|
||||
stand = spawnArmorStand(getCenter().subtract(0, 1.2, 0));
|
||||
stand = spawnArmorStand(getCenter().subtract(0, .95, 0));
|
||||
stand.setHelmet(new ItemStack(Material.WOOD_PLATE));
|
||||
asList.add(stand);
|
||||
|
||||
|
@ -137,10 +137,8 @@ public class SchoolTable extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand as : asList){
|
||||
as.setInvisible(true);
|
||||
as.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -83,8 +83,8 @@ public class TrashCan extends Furniture implements Listener {
|
|||
|
||||
float yaw = 0;
|
||||
for(int i = 0; i<4;i++){
|
||||
Location location = getLutil().getRelativ(getCenter(), getLutil().yawToFace(yaw), .25, 0);
|
||||
location.add(0,-1.88,0);
|
||||
Location location = getLutil().getRelativ(getCenter(), getLutil().yawToFace(yaw), .43, 0);
|
||||
location.add(0,-2.45,0);
|
||||
location.setYaw(yaw);
|
||||
stand = spawnArmorStand(location);
|
||||
stand.setHelmet(new ItemStack(Material.IRON_FENCE));
|
||||
|
@ -102,10 +102,8 @@ public class TrashCan extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand as : asList){
|
||||
as.setInvisible(true);
|
||||
as.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -358,7 +358,6 @@ public class AdventCalender extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -150,6 +150,7 @@ public class AdventWreath extends Furniture implements Listener {
|
|||
stand.setHelmet(new ItemStack(Material.STAINED_CLAY, 1, (short) 13));
|
||||
asList.add(stand);
|
||||
|
||||
|
||||
stand = spawnArmorStand(loc.clone().add(0, .4, 0));
|
||||
stand.setRightArmPose(getLutil().degresstoRad(new EulerAngle(-41,-37.5f,18)));
|
||||
stand.setSmall(true);
|
||||
|
@ -191,7 +192,6 @@ public class AdventWreath extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
@ -204,12 +204,13 @@ public class AdventWreath extends Furniture implements Listener {
|
|||
double l = 0;
|
||||
double o = getDegress(j);
|
||||
loc = loc.add(0, -sub, 0);
|
||||
loc.subtract(0, .5, 0);
|
||||
|
||||
for(int i = 0; i<j;i++){
|
||||
loc.setYaw((float) l);
|
||||
fArmorStand stand = spawnArmorStand(loc);
|
||||
stand.setHelmet(stack);
|
||||
stand.setInvisible(true);
|
||||
stand.setGravity(false);
|
||||
stand.setBasePlate(false);
|
||||
l+=o;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,6 @@ public class CandyCane extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,6 @@ public class ChristmasTree extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,6 @@ public class FireworkLauncher extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,11 +80,11 @@ public class SnowGolem extends Furniture implements Listener{
|
|||
stand.setSmall(true);
|
||||
asList.add(stand);
|
||||
|
||||
Location loc = getRelative(getCenter().add(0, -.25, 0), -.18, -.54);
|
||||
Location loc = getRelative(getCenter().add(0, -.75, 0), -.18, -.54);
|
||||
loc.setYaw(getYaw()+90);
|
||||
stand = spawnArmorStand(loc);
|
||||
stand.setItemInMainHand(new ItemStack(Material.CARROT_ITEM));
|
||||
stand.setRightArmPose(getLutil().degresstoRad(new EulerAngle(90, 0, -40)));
|
||||
stand.setRightArmPose(getLutil().degresstoRad(new EulerAngle(90, 0, -150)));
|
||||
stand.setMarker(false);
|
||||
asList.add(stand);
|
||||
|
||||
|
@ -136,12 +136,10 @@ public class SnowGolem extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -85,7 +85,6 @@ public class billboard extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
send();
|
||||
|
|
|
@ -43,7 +43,7 @@ public class camera extends Furniture implements Listener{
|
|||
Location gehäuse = getLutil().getRelativ(center, b, 0D, 0D).add(0,-1.0,0);
|
||||
Location gehäuse2 = getLutil().getRelativ(center, b, 0D, 0D).add(0,-0.4,0);
|
||||
Location fokus = getLutil().getRelativ(center, b, .15D, 0D).add(0,-.24,0);
|
||||
Location search = getLutil().getRelativ(center, b, .15D, 0D).add(0,-.7,0);
|
||||
Location search = getLutil().getRelativ(center, b, .5D, 0D).add(0,-1.2,0);
|
||||
Location button = getLutil().getRelativ(center, b, -.15D, -.15D).add(0,.08,0);
|
||||
|
||||
Location feet1 = getLutil().getRelativ(center, b, .5D, .4D).add(0,-.9,0);
|
||||
|
@ -98,7 +98,6 @@ public class camera extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand asp : aspList){
|
||||
asp.setInvisible(true);
|
||||
asp.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
@ -146,5 +145,4 @@ public class camera extends Furniture implements Listener{
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@ public class streetlamp extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand pack : asList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
getManager().send(getObjID());
|
||||
|
|
|
@ -35,31 +35,31 @@ public class tv extends Furniture implements Listener{
|
|||
List<fArmorStand> aspList = new ArrayList<fArmorStand>();
|
||||
BlockFace b = getLutil().yawToFace(location.getYaw()).getOppositeFace();
|
||||
Location center = getLutil().getCenter(location);
|
||||
center.add(0, -1.38, 0);
|
||||
double d = .2;
|
||||
center.add(0, -1.38+d, 0);
|
||||
center.setYaw(getLutil().FaceToYaw(b));
|
||||
Location iron = center.clone();
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), iron);
|
||||
as.getInventory().setHelmet(new ItemStack(Material.IRON_PLATE));
|
||||
as.setSmall(true);
|
||||
aspList.add(as);
|
||||
center.add(0, -.45, 0);
|
||||
center.add(0, -1.0, 0);
|
||||
center.setYaw(getLutil().FaceToYaw(b));
|
||||
|
||||
as = getManager().createArmorStand(getObjID(), center);
|
||||
as = getManager().createArmorStand(getObjID(), getRelative(center, getBlockFace(), .3, 0).subtract(0, d, 0));
|
||||
as.getInventory().setHelmet(new ItemStack(Material.LEVER));
|
||||
aspList.add(as);
|
||||
|
||||
Location tv = getLutil().getRelativ(center.clone(), b, -.38, -.2);
|
||||
Location tv = getLutil().getRelativ(center.clone().add(0, .55, 0), b, -.38, -.2);
|
||||
tv.add(0, -.1, 0);
|
||||
tv.setYaw(getLutil().FaceToYaw(b));
|
||||
Double l = .63;
|
||||
Double l = .62-d;
|
||||
for(int i = 0;i<=1;i++){
|
||||
setRow(tv, .63, l, -.35,2,getLutil().degresstoRad(new EulerAngle(90, 0, 0)), aspList);
|
||||
l+=.63;
|
||||
setRow(tv, .62, l, -.35,2,getLutil().degresstoRad(new EulerAngle(90, 0, 0)), aspList);
|
||||
l+=.62;
|
||||
}
|
||||
|
||||
for(fArmorStand asp : aspList){
|
||||
asp.setGravity(false);
|
||||
asp.setBasePlate(false);
|
||||
asp.setInvisible(true);
|
||||
}
|
||||
|
|
|
@ -80,10 +80,8 @@ public class SleepingBag extends Furniture implements Listener {
|
|||
asList.add(stand);
|
||||
for(fArmorStand as : asList){
|
||||
as.setInvisible(true);
|
||||
as.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,7 +60,6 @@ public class TFlowerPot extends Furniture implements Listener {
|
|||
}
|
||||
|
||||
for(fArmorStand asp : packetList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
asp.setMarker(false);
|
||||
|
|
|
@ -110,11 +110,9 @@ public class Trunk extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand stand : asList){
|
||||
stand.setInvisible(true);
|
||||
stand.setGravity(false);
|
||||
}
|
||||
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -105,11 +105,11 @@ public class WaterBottle extends Furniture implements Listener {
|
|||
i-=.54;
|
||||
}
|
||||
List<fArmorStand> stand = new ArrayList<fArmorStand>();
|
||||
Location loc1 = getCenter().add(0, i-1.2, 0);
|
||||
loc1.setYaw(45);
|
||||
Location loc2 = getCenter().add(0, i-1.2, 0);
|
||||
loc2.setYaw(loc1.getYaw()+90);
|
||||
Location loc3 = getLutil().getRelativ(getCenter(), getBlockFace(), .15, 0).add(0, i-0.8, 0);
|
||||
Location loc1 = getRelative(getCenter(), getBlockFace(), .125, -.125).add(0, i-1.5, 0);
|
||||
loc1.setYaw(getYaw()+45);
|
||||
Location loc2 = getRelative(getCenter(), getBlockFace(), -.125, -.125).add(0, i-1.5, 0);
|
||||
loc2.setYaw(getYaw()*2+45);
|
||||
Location loc3 = getLutil().getRelativ(getCenter(), getBlockFace(), .45, 0).add(0, i-1, 0);
|
||||
loc3.setYaw(getYaw()+180);
|
||||
Location loc4 = getLutil().getRelativ(getCenter(), getBlockFace(), -.29, .2).add(0, i-0.88, 0);
|
||||
loc4.setYaw(getYaw());
|
||||
|
@ -158,7 +158,6 @@ public class WaterBottle extends Furniture implements Listener {
|
|||
stand.add(as);
|
||||
|
||||
for(fArmorStand asp : stand){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
}
|
||||
|
@ -166,7 +165,4 @@ public class WaterBottle extends Furniture implements Listener {
|
|||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -76,12 +76,12 @@ public class campchair extends Furniture implements Listener {
|
|||
aspList.add(packet);
|
||||
|
||||
l1 = middle.clone();
|
||||
l1.add(0, -.65, 0);
|
||||
l1.add(0, -.39, 0);
|
||||
packet = getManager().createArmorStand(getObjID(), l1);
|
||||
packet.getInventory().setHelmet(new ItemStack(Material.WOOD_PLATE));
|
||||
aspList.add(packet);
|
||||
|
||||
middle.add(0,-0.6,0);
|
||||
middle.add(0,-0.6-.26,0);
|
||||
middle.setYaw(getLutil().FaceToYaw(getBlockFace().getOppositeFace()));
|
||||
packet = getManager().createArmorStand(getObjID(), middle);
|
||||
packet.setName("#SITZ#");
|
||||
|
@ -90,11 +90,9 @@ public class campchair extends Furniture implements Listener {
|
|||
for(fArmorStand as : aspList){
|
||||
as.setInvisible(true);
|
||||
as.setBasePlate(false);
|
||||
as.setGravity(false);
|
||||
}
|
||||
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.bukkit.entity.Player;
|
|||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import de.Ste3et_C0st.Furniture.Main.main;
|
||||
import de.Ste3et_C0st.FurnitureLib.Events.FurnitureBlockBreakEvent;
|
||||
import de.Ste3et_C0st.FurnitureLib.Events.FurnitureBlockClickEvent;
|
||||
|
@ -57,11 +58,10 @@ public class fance extends Furniture implements Listener{
|
|||
Location loc = locat.clone();
|
||||
fArmorStand packet = getManager().createArmorStand(getObjID(), loc);
|
||||
packet.getInventory().setHelmet(new ItemStack(m,0,(short) 0));
|
||||
packet.setGravity(false);
|
||||
packet.setInvisible(true);
|
||||
packet.setBasePlate(false);
|
||||
packet.setSmall(true);
|
||||
locat.add(0, .44, 0);
|
||||
locat.add(0, .43, 0);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
@ -165,6 +165,4 @@ public class fance extends Furniture implements Listener{
|
|||
}
|
||||
getObjID().addBlock(Arrays.asList(this.block));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -96,26 +96,21 @@ public class graveStone extends Furniture implements Listener{
|
|||
|
||||
Double l = .3;
|
||||
for(int i = 0;i<=2;i++){
|
||||
setRow(center, .38, l, -.35,2,getLutil().degresstoRad(new EulerAngle(90, 0, 0)), aspList);
|
||||
if(i!=1){
|
||||
l+=.4;
|
||||
}else{
|
||||
l+=.35;
|
||||
}
|
||||
setRow(center, .38, l, -.15,2,getLutil().degresstoRad(new EulerAngle(90, 0, 0)), aspList);
|
||||
l+=.35;
|
||||
|
||||
}
|
||||
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), kreutz1);
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), kreutz1.add(0, -.15, 0));
|
||||
as.getInventory().setItemInMainHand(new ItemStack(Material.STICK));
|
||||
as.setPose(new EulerAngle(1.38,.0,.0), BodyPart.RIGHT_ARM);
|
||||
aspList.add(as);
|
||||
as = getManager().createArmorStand(getObjID(), kreutz2);
|
||||
as = getManager().createArmorStand(getObjID(), kreutz2.add(0, -.15, 0));
|
||||
as.getInventory().setItemInMainHand(new ItemStack(Material.STICK));
|
||||
as.setPose(new EulerAngle(1.38,1.57,1.57), BodyPart.RIGHT_ARM);
|
||||
aspList.add(as);
|
||||
|
||||
for(fArmorStand asp : aspList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
}
|
||||
|
@ -253,5 +248,4 @@ public class graveStone extends Furniture implements Listener{
|
|||
d+=x;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -112,7 +112,6 @@ public class log extends Furniture {
|
|||
lStand.add(stand);
|
||||
|
||||
for(fArmorStand asp : lStand){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
asp.setMarker(false);
|
||||
|
@ -327,5 +326,4 @@ public class log extends Furniture {
|
|||
b.setType(Material.AIR);
|
||||
b=null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -133,7 +133,6 @@ public class mailBox extends Furniture implements Listener {
|
|||
|
||||
|
||||
for(fArmorStand asp : aspList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
}
|
||||
|
|
|
@ -103,7 +103,6 @@ public class sunshade extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand packet : asList){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
packet.setBasePlate(false);
|
||||
}
|
||||
send();
|
||||
|
|
|
@ -37,15 +37,17 @@ public class chair extends Furniture implements Listener{
|
|||
BlockFace b = getLutil().yawToFace(loc.getYaw()).getOppositeFace();
|
||||
Location center = getLutil().getCenter(loc).add(0, -.05, 0);
|
||||
Location sitz = new Location(center.getWorld(), center.getX(), center.getY(), center.getZ());
|
||||
Location feet1 = new Location(center.getWorld(), center.getX(), center.getY(), center.getZ());
|
||||
Location feet2 = new Location(center.getWorld(), center.getX(), center.getY(), center.getZ());
|
||||
Location feet3 = new Location(center.getWorld(), center.getX(), center.getY(), center.getZ());
|
||||
Location feet4 = new Location(center.getWorld(), center.getX(), center.getY(), center.getZ());
|
||||
Location lehne = getLutil().getRelativ(center.add(0,-1.1,0), b, -.25, .0);
|
||||
feet1.add(-.25,-1.8,-.25);
|
||||
feet2.add(.25,-1.8,-.25);
|
||||
feet3.add(.25,-1.8,.25);
|
||||
feet4.add(-.25,-1.8,.25);
|
||||
double offsetX = -.25;
|
||||
Location feet1 = getRelative(center.clone(), getBlockFace(), -.24-offsetX, -.24).subtract(0, 1.2, 0);
|
||||
Location feet2 = getRelative(center.clone(), getBlockFace(), .24-offsetX, -.24).subtract(0, 1.2, 0);
|
||||
Location feet3 = getRelative(center.clone(), getBlockFace(), .24-offsetX, .24).subtract(0, 1.2, 0);
|
||||
Location feet4 = getRelative(center.clone(), getBlockFace(), -.24-offsetX, .24).subtract(0, 1.2, 0);
|
||||
|
||||
feet1.setYaw(getYaw());
|
||||
feet2.setYaw(getYaw());
|
||||
feet3.setYaw(getYaw());
|
||||
feet4.setYaw(getYaw());
|
||||
|
||||
sitz.add(0,-1.45,0);
|
||||
sitz.setYaw(getLutil().FaceToYaw(b));
|
||||
|
@ -82,7 +84,6 @@ public class chair extends Furniture implements Listener{
|
|||
aspList.add(as);
|
||||
|
||||
for(fArmorStand asp : aspList){
|
||||
asp.setGravity(false);
|
||||
asp.setInvisible(true);
|
||||
asp.setBasePlate(false);
|
||||
}
|
||||
|
|
|
@ -51,38 +51,43 @@ public class lantern extends Furniture implements Listener{
|
|||
Location obsidian = center;
|
||||
Location l = new Location(center.getWorld(), center.getX(), center.getY() -1.43, center.getZ());
|
||||
obsidian.add(0D, -2.2, 0D);
|
||||
Location left_down = new Location(obsidian.getWorld(), obsidian.getX()+.21, obsidian.getY() + .62, obsidian.getZ()+.21);
|
||||
Location left_upper = new Location(obsidian.getWorld(), obsidian.getX() -.21, obsidian.getY() + .62, obsidian.getZ() +.21);
|
||||
Location right_upper = new Location(obsidian.getWorld(), obsidian.getX()-.21, obsidian.getY()+.62, obsidian.getZ()-.21);
|
||||
Location right_down = new Location(obsidian.getWorld(), obsidian.getX()+.21, obsidian.getY() + .62, obsidian.getZ() -.21);
|
||||
Location l1 = getRelative(center, getBlockFace(), +.05, +.21).add(0, .11, 0);
|
||||
Location l2 = getRelative(center, getBlockFace(), +.5, +.21).add(0, .11, 0);
|
||||
Location l3 = getRelative(center, getBlockFace(), +.5, -.21).add(0, .11, 0);
|
||||
Location l4 = getRelative(center, getBlockFace(), +.05, -.21).add(0, .11, 0);
|
||||
|
||||
|
||||
l1.setYaw(getYaw());
|
||||
l2.setYaw(getYaw());
|
||||
l3.setYaw(getYaw());
|
||||
l4.setYaw(getYaw());
|
||||
|
||||
fArmorStand asp = getManager().createArmorStand(getObjID(), obsidian);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.OBSIDIAN));
|
||||
aspList.add(asp);
|
||||
|
||||
asp = getManager().createArmorStand(getObjID(), getLutil().getRelativ(l.clone(), getBlockFace(), 0D, 0.01D));
|
||||
asp = getManager().createArmorStand(getObjID(), getLutil().getRelativ(l.clone(), getBlockFace(), 0D, 0.01D).add(0, .23, 0));
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.WOOD_PLATE));
|
||||
aspList.add(asp);
|
||||
|
||||
asp = getManager().createArmorStand(getObjID(), left_down);
|
||||
asp = getManager().createArmorStand(getObjID(), l1);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.LEVER));
|
||||
aspList.add(asp);
|
||||
|
||||
asp = getManager().createArmorStand(getObjID(), left_upper);
|
||||
asp = getManager().createArmorStand(getObjID(), l2);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.LEVER));
|
||||
aspList.add(asp);
|
||||
|
||||
asp = getManager().createArmorStand(getObjID(), right_upper);
|
||||
asp = getManager().createArmorStand(getObjID(), l3);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.LEVER));
|
||||
aspList.add(asp);
|
||||
|
||||
asp = getManager().createArmorStand(getObjID(), right_down);
|
||||
asp = getManager().createArmorStand(getObjID(), l4);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.LEVER));
|
||||
aspList.add(asp);
|
||||
|
||||
for(fArmorStand packet : aspList){
|
||||
packet.setBasePlate(false);
|
||||
packet.setGravity(false);
|
||||
packet.setInvisible(true);
|
||||
}
|
||||
send();
|
||||
|
|
|
@ -52,9 +52,11 @@ public class largeTable extends Furniture implements Listener{
|
|||
location.add(0,.2,0);
|
||||
Double winkel = 1.57;
|
||||
ItemStack iTemStack_1 = new ItemStack(Material.STAINED_GLASS_PANE);
|
||||
double off = .46;
|
||||
double off2 = off*2+.1;
|
||||
for(int x=1; x<=3;x++){
|
||||
Location l = getLutil().getRelativ(location.clone(), getBlockFace(), 0.0, x*-.63);
|
||||
l.add(0,-1.2,0);
|
||||
Location l = getLutil().getRelativ(location.clone(), getBlockFace(), -off, x*-.62);
|
||||
l.add(0,-1.48,0);
|
||||
l.setYaw(yaw);
|
||||
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), l.clone());
|
||||
|
@ -64,8 +66,8 @@ public class largeTable extends Furniture implements Listener{
|
|||
}
|
||||
|
||||
for(int x=1; x<=3;x++){
|
||||
Location l = getLutil().getRelativ(location.clone(), getBlockFace(), 0.63, x*-.63);
|
||||
l.add(0,-1.2,0);
|
||||
Location l = getLutil().getRelativ(location.clone(), getBlockFace(), 0.62-off, x*-.62);
|
||||
l.add(0,-1.48,0);
|
||||
l.setYaw(yaw);
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), l.clone());
|
||||
as.setPose(new EulerAngle(winkel, 0, 0), BodyPart.HEAD);
|
||||
|
@ -74,8 +76,8 @@ public class largeTable extends Furniture implements Listener{
|
|||
}
|
||||
|
||||
for(int x=1; x<=3;x++){
|
||||
Location l = getLutil().getRelativ(location.clone(), getBlockFace(), 1.26, x*-.63);
|
||||
l.add(0,-1.2,0);
|
||||
Location l = getLutil().getRelativ(location.clone(), getBlockFace(), 1.24-off, x*-.62);
|
||||
l.add(0,-1.48,0);
|
||||
l.setYaw(yaw);
|
||||
fArmorStand as = getManager().createArmorStand(getObjID(), l.clone());
|
||||
as.setPose(new EulerAngle(winkel, 0, 0), BodyPart.HEAD);
|
||||
|
@ -94,10 +96,10 @@ public class largeTable extends Furniture implements Listener{
|
|||
|
||||
double hight = .67;
|
||||
|
||||
Location t1 = getLutil().getRelativ(mitteTisch, getBlockFace(), -.95, .4).add(0,hight,0);
|
||||
Location t2 = getLutil().getRelativ(mitteTisch, getBlockFace(), -.4, -.92).add(0,hight,0);
|
||||
Location t3 = getLutil().getRelativ(mitteTisch, getBlockFace(), .92, -.36).add(0,hight,0);
|
||||
Location t4 = getLutil().getRelativ(mitteTisch, getBlockFace(), .4, .92).add(0,hight,0);
|
||||
Location t1 = getLutil().getRelativ(mitteTisch, getBlockFace(), -.95+off2, .4).add(0,hight,0);
|
||||
Location t2 = getLutil().getRelativ(mitteTisch, getBlockFace(), -.4+off2, -.92).add(0,hight,0);
|
||||
Location t3 = getLutil().getRelativ(mitteTisch, getBlockFace(), .92+off2, -.36).add(0,hight,0);
|
||||
Location t4 = getLutil().getRelativ(mitteTisch, getBlockFace(), .4+off2, .92).add(0,hight,0);
|
||||
|
||||
float yaw1 = yaw;
|
||||
float yaw2 = yaw1-90;
|
||||
|
@ -158,7 +160,6 @@ public class largeTable extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand packet : armorlist){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -57,10 +57,10 @@ public class sofa extends Furniture implements Listener {
|
|||
if(b.equals(BlockFace.SOUTH)){loc = getLutil().getRelativ(loc, b, -1.0, -1.0);}
|
||||
if(b.equals(BlockFace.EAST)){loc = getLutil().getRelativ(loc, b, -1.0, .0);}
|
||||
Location looking = new Location(loc.getWorld(), loc.getBlockX(), loc.getBlockY() -1.4 , loc.getBlockZ());
|
||||
Location feet1 = getLutil().getRelativ(looking, b, place, .2D);
|
||||
Location feet2 = getLutil().getRelativ(looking, b, place, lengt.doubleValue()-.2D);
|
||||
Location feet3 = getLutil().getRelativ(looking, b, place + .5, .2D);
|
||||
Location feet4 = getLutil().getRelativ(looking, b, place + .5, lengt.doubleValue()-.2D);
|
||||
Location feet1 = getLutil().getRelativ(looking, b, place + .3, .2D).add(0, -.47, 0);
|
||||
Location feet2 = getLutil().getRelativ(looking, b, place + .3, lengt.doubleValue()-.2D).add(0, -.47, 0);
|
||||
Location feet3 = getLutil().getRelativ(looking, b, place + .8, .2D).add(0, -.47, 0);
|
||||
Location feet4 = getLutil().getRelativ(looking, b, place + .8, lengt.doubleValue()-.2D).add(0, -.47, 0);
|
||||
|
||||
fArmorStand asp = getManager().createArmorStand(getObjID(), feet1);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.LEVER));
|
||||
|
@ -143,7 +143,6 @@ public class sofa extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand asps : aspList){
|
||||
asps.setInvisible(true);
|
||||
asps.setGravity(false);
|
||||
asps.setBasePlate(false);
|
||||
}
|
||||
send();
|
||||
|
|
|
@ -39,7 +39,7 @@ public class table extends Furniture implements Listener {
|
|||
Location l = loc;
|
||||
l.setYaw(0);
|
||||
|
||||
fArmorStand asp = getManager().createArmorStand(getObjID(), middle1.add(0, -2.1, 0));
|
||||
fArmorStand asp = getManager().createArmorStand(getObjID(), middle1.add(0, -1.9, 0));
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.WOOD_PLATE));
|
||||
packetL.add(asp);
|
||||
asp = getManager().createArmorStand(getObjID(), middle2.add(0,-1.05,0));
|
||||
|
@ -58,7 +58,6 @@ public class table extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand packet : packetL){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -100,12 +100,10 @@ public class CactusPlant extends Furniture implements Listener {
|
|||
|
||||
for(fArmorStand as : aspList){
|
||||
as.setInvisible(true);
|
||||
as.setGravity(false);
|
||||
as.setBasePlate(false);
|
||||
}
|
||||
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -81,8 +81,7 @@ public class campfire_1 extends Furniture implements Listener{
|
|||
Location location = getLutil().getCenter(loc);
|
||||
location.add(0,-1.9,0);
|
||||
location.setYaw(i*60);
|
||||
fArmorStand packet = getManager().createArmorStand(getObjID(), location);
|
||||
packet.setGravity(false);
|
||||
getManager().createArmorStand(getObjID(), location);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -142,7 +142,6 @@ public class campfire_2 extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand packet : packetList){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
}
|
||||
getManager().send(getObjID());
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -297,7 +297,6 @@ public class hammock extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand pack : aspList){
|
||||
pack.setInvisible(true);
|
||||
pack.setGravity(false);
|
||||
pack.setBasePlate(false);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,35 +61,22 @@ public class tent_1 extends Furniture implements Listener{
|
|||
}
|
||||
getObjID().addBlock(Arrays.asList(block));
|
||||
}
|
||||
|
||||
|
||||
private Location getNew(Location loc, BlockFace b){
|
||||
if(b.equals(BlockFace.WEST)){loc=getLutil().getRelativ(loc, b, -1D, 0D);}
|
||||
if(b.equals(BlockFace.NORTH)){loc=getLutil().getRelativ(loc, b, -1D, -1D);}
|
||||
if(b.equals(BlockFace.EAST)){loc=getLutil().getRelativ(loc, b, 0D, -1D);}
|
||||
return loc;
|
||||
}
|
||||
|
||||
|
||||
public void spawn(Location loc){
|
||||
List<fArmorStand> aspList = new ArrayList<fArmorStand>();
|
||||
Location loc_1 = new Location(loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||
Location loc_2 = new Location(loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||
Location loc_3 = new Location(loc.getWorld(), loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
|
||||
|
||||
Location karabine1 = getNew(getLutil().getRelativ(loc, getBlockFace(), 0D, 0D), getBlockFace());
|
||||
Location karabine2 = getNew(getLutil().getRelativ(loc, getBlockFace(), 3D, 0D), getBlockFace());
|
||||
Location karabine3 = getNew(getLutil().getRelativ(loc, getBlockFace(), 3D, -4D), getBlockFace());
|
||||
Location karabine4 = getNew(getLutil().getRelativ(loc, getBlockFace(), 0D, -4D), getBlockFace());
|
||||
Location karabine1 = getLutil().getRelativ(loc, getBlockFace(), -.5D, -.7D);
|
||||
Location karabine2 = getLutil().getRelativ(loc, getBlockFace(), 2.5D, -.7D);
|
||||
Location karabine3 = getLutil().getRelativ(loc, getBlockFace(), 2.5D, -4.8D);
|
||||
Location karabine4 = getLutil().getRelativ(loc, getBlockFace(), -.5D, -4.8D);
|
||||
|
||||
|
||||
karabine1 = getLutil().getCenter(karabine1);
|
||||
karabine2 = getLutil().getCenter(karabine2);
|
||||
karabine3 = getLutil().getCenter(karabine3);
|
||||
karabine4 = getLutil().getCenter(karabine4);
|
||||
karabine1.setYaw(getLutil().FaceToYaw(getBlockFace())+90);
|
||||
karabine2.setYaw(getLutil().FaceToYaw(getBlockFace())+90);
|
||||
karabine3.setYaw(getLutil().FaceToYaw(getBlockFace())+90);
|
||||
karabine4.setYaw(getLutil().FaceToYaw(getBlockFace())+90);
|
||||
karabine1.setYaw(getYaw()+90);
|
||||
karabine2.setYaw(getYaw()+90);
|
||||
karabine3.setYaw(getYaw()+90);
|
||||
karabine4.setYaw(getYaw()+90);
|
||||
|
||||
Location saveLoc = getLutil().getRelativ(loc_1, getBlockFace(), -.55D, -0.6);
|
||||
saveLoc.add(0,-1.25,0);
|
||||
|
@ -106,6 +93,8 @@ public class tent_1 extends Furniture implements Listener{
|
|||
|
||||
setblock();
|
||||
|
||||
double offsetY = .02;
|
||||
|
||||
for(int i = 0; i<=5;i++){
|
||||
Location loc1= getLutil().getRelativ(saveLoc, getBlockFace(), d, 0D);
|
||||
Location loc2= getLutil().getRelativ(saveLoc, getBlockFace(), d, -.48).add(0,.3,0);
|
||||
|
@ -121,9 +110,9 @@ public class tent_1 extends Furniture implements Listener{
|
|||
|
||||
loc.add(loc1);
|
||||
loc.add(loc2);
|
||||
loc.add(loc3);
|
||||
loc.add(loc4);
|
||||
loc.add(loc5);
|
||||
loc.add(loc3.subtract(0,offsetY,0));
|
||||
loc.add(loc4.subtract(0,offsetY,0));
|
||||
loc.add(loc5.subtract(0,offsetY,0));
|
||||
|
||||
fArmorStand asp = getManager().createArmorStand(getObjID(), loc1);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.CARPET));
|
||||
|
@ -163,9 +152,9 @@ public class tent_1 extends Furniture implements Listener{
|
|||
|
||||
loc.add(loc1);
|
||||
loc.add(loc2);
|
||||
loc.add(loc3);
|
||||
loc.add(loc4);
|
||||
loc.add(loc5);
|
||||
loc.add(loc3.subtract(0,offsetY,0));
|
||||
loc.add(loc4.subtract(0,offsetY,0));
|
||||
loc.add(loc5.subtract(0,offsetY,0));
|
||||
|
||||
fArmorStand asp = getManager().createArmorStand(getObjID(), loc1);
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.CARPET));
|
||||
|
@ -216,8 +205,8 @@ public class tent_1 extends Furniture implements Listener{
|
|||
asp.getInventory().setHelmet(new ItemStack(Material.TRIPWIRE_HOOK));
|
||||
aspList.add(asp);
|
||||
|
||||
Location crafting = getLutil().getCenter(block.getLocation());
|
||||
crafting.setYaw(getLutil().FaceToYaw(getBlockFace())+90);
|
||||
Location crafting = getRelative(getLutil().getCenter(block.getLocation()), getBlockFace(), 0, -.27).add(0, -.5, 0);
|
||||
crafting.setYaw(getYaw()+90);
|
||||
|
||||
asp = getManager().createArmorStand(getObjID(), crafting.add(0,-1,0).clone());
|
||||
asp.getInventory().setHelmet(new ItemStack(Material.LADDER));
|
||||
|
@ -229,7 +218,6 @@ public class tent_1 extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand packet : aspList){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -117,7 +117,6 @@ public class tent_2 extends Furniture implements Listener{
|
|||
int i = 0;
|
||||
for(fArmorStand packet : aspl){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
if(i>44&&i<57){
|
||||
packet.setMarker(false);
|
||||
}
|
||||
|
|
|
@ -140,7 +140,6 @@ public class tent_3 extends Furniture implements Listener{
|
|||
|
||||
for(fArmorStand packet : aspL){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
|
|
@ -20,11 +20,12 @@ import de.Ste3et_C0st.FurnitureLib.Events.FurnitureClickEvent;
|
|||
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.Relative;
|
||||
import de.Ste3et_C0st.FurnitureLib.main.entity.fArmorStand;
|
||||
|
||||
public class BearTrap extends Furniture implements Listener{
|
||||
|
||||
fArmorStand stand1, stand2;
|
||||
fArmorStand stand1, stand2, stand3, stand4;
|
||||
boolean b;
|
||||
|
||||
public BearTrap(ObjectID id){
|
||||
|
@ -35,6 +36,10 @@ public class BearTrap extends Furniture implements Listener{
|
|||
stand1 = stand;
|
||||
}else if(stand.getName().equalsIgnoreCase("#IRON2#")){
|
||||
stand2 = stand;
|
||||
}else if(stand.getName().equalsIgnoreCase("#IRON3#")){
|
||||
stand2 = stand;
|
||||
}else if(stand.getName().equalsIgnoreCase("#IRON4#")){
|
||||
stand2 = stand;
|
||||
}
|
||||
}
|
||||
setStatus(false);
|
||||
|
@ -51,7 +56,8 @@ public class BearTrap extends Furniture implements Listener{
|
|||
stand.setHelmet(new ItemStack(Material.IRON_TRAPDOOR));
|
||||
asList.add(stand);
|
||||
|
||||
Location location = getRelative(getCenter(), 0, .04).add(0, -1.8, 0);
|
||||
double offset = .35;
|
||||
Location location = getRelative(getCenter(), 0, .04+offset).add(0, -2.1, 0);
|
||||
location.setYaw(getYaw()+90);
|
||||
stand = spawnArmorStand(location);
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(90, 0, 0)));
|
||||
|
@ -60,18 +66,38 @@ public class BearTrap extends Furniture implements Listener{
|
|||
stand1 = stand;
|
||||
asList.add(stand);
|
||||
|
||||
location = getRelative(getCenter(), 0, -.04).add(0, -1.8, 0);
|
||||
location.setYaw(getYaw()+90);
|
||||
location = getRelative(getCenter(), 0, -.04-offset).add(0, -2.1, 0);
|
||||
location.setYaw(getYaw()-90);
|
||||
stand = spawnArmorStand(location);
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(-90, 0, 0)));
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(90, 0, 0)));
|
||||
stand.setHelmet(new ItemStack(Material.IRON_FENCE));
|
||||
stand.setName("#IRON2#");
|
||||
stand2 = stand;
|
||||
asList.add(stand);
|
||||
offset = -.25;
|
||||
|
||||
location = getRelative(getCenter(), 0, .04+offset).add(0, -2.25, 0);
|
||||
location.setYaw(getYaw()+90);
|
||||
stand = spawnArmorStand(location);
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(0, 0, 0)));
|
||||
stand.setName("#IRON3#");
|
||||
stand3 = stand;
|
||||
asList.add(stand);
|
||||
|
||||
location = getRelative(getCenter(), 0, -.04-offset).add(0, -2.25, 0);
|
||||
location.setYaw(getYaw()-90);
|
||||
stand = spawnArmorStand(location);
|
||||
stand.setHeadPose(getLutil().degresstoRad(new EulerAngle(0, 0, 0)));
|
||||
stand.setName("#IRON4#");
|
||||
stand4 = stand;
|
||||
asList.add(stand);
|
||||
|
||||
fArmorStand testStand = stand.clone(new Relative(getCenter(), 0, 2, 0, getBlockFace()));
|
||||
testStand.setGlowing(true);
|
||||
asList.add(testStand);
|
||||
|
||||
for(fArmorStand packet : asList){
|
||||
packet.setInvisible(true);
|
||||
packet.setGravity(false);
|
||||
}
|
||||
send();
|
||||
Bukkit.getPluginManager().registerEvents(this, getPlugin());
|
||||
|
@ -103,13 +129,17 @@ public class BearTrap extends Furniture implements Listener{
|
|||
}
|
||||
|
||||
private void setStatus(boolean b){
|
||||
if(b){
|
||||
stand1.setHeadPose(getLutil().degresstoRad(new EulerAngle(0, 0, 0)));
|
||||
stand2.setHeadPose(getLutil().degresstoRad(new EulerAngle(0, 0, 0)));
|
||||
getWorld().playSound(getLocation(), Sound.ENTITY_ITEM_BREAK, 5, 1);
|
||||
if(!b){
|
||||
stand1.setHelmet(new ItemStack(Material.IRON_FENCE));
|
||||
stand2.setHelmet(new ItemStack(Material.IRON_FENCE));
|
||||
stand3.setHelmet(new ItemStack(Material.AIR));
|
||||
stand4.setHelmet(new ItemStack(Material.AIR));
|
||||
}else{
|
||||
stand1.setHeadPose(getLutil().degresstoRad(new EulerAngle(90, 0, 0)));
|
||||
stand2.setHeadPose(getLutil().degresstoRad(new EulerAngle(-90, 0, 0)));
|
||||
stand3.setHelmet(new ItemStack(Material.IRON_FENCE));
|
||||
stand4.setHelmet(new ItemStack(Material.IRON_FENCE));
|
||||
stand1.setHelmet(new ItemStack(Material.AIR));
|
||||
stand2.setHelmet(new ItemStack(Material.AIR));
|
||||
getWorld().playSound(getLocation(), Sound.ENTITY_ITEM_BREAK, 5, 1);
|
||||
}
|
||||
this.b = b;
|
||||
update();
|
||||
|
@ -137,5 +167,4 @@ public class BearTrap extends Furniture implements Listener{
|
|||
player.damage(main.damage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user