Fix campfire#2 tent#1 tent#3

This commit is contained in:
Ste3et_C0st 2020-03-26 16:35:27 +01:00
parent df7f296631
commit b4c7ed693b
3 changed files with 25 additions and 4 deletions

View File

@ -88,7 +88,27 @@ public class campfire_2 extends Furniture {
setfire(false); setfire(false);
} else if (itemStack.getType().equals(Material.FLINT_AND_STEEL) && !packet.isFire()) { } else if (itemStack.getType().equals(Material.FLINT_AND_STEEL) && !packet.isFire()) {
setfire(true); setfire(true);
} else if (items.contains(itemStack.getType()) && packet.isFire() && armorS == null) { }
}
if(canInteract(player)) {
final ItemStack itemStack = player.getInventory().getItemInMainHand();
fArmorStand packet = null;
List<fEntity> aspList = getManager().getfArmorStandByObjectID(getObjID());
for (fEntity pack : aspList) {
if (pack instanceof fArmorStand) {
fArmorStand stand = (fArmorStand) pack;
if (stand.isSmall() && pack.isInvisible()) {
packet = stand;
if (packet.isFire()) {
break;
}
}
}
}
if(Objects.isNull(packet)) return;
if (items.contains(itemStack.getType()) && packet.isFire() && armorS == null) {
is = itemStack.clone(); is = itemStack.clone();
is.setAmount(1); is.setAmount(1);

View File

@ -33,9 +33,8 @@ public class tent_1 extends Furniture{
return; return;
} }
} }
player.openWorkbench(null, true);
} }
player.openWorkbench(null, true);
} }
@Override @Override

View File

@ -46,7 +46,9 @@ public class tent_3 extends Furniture{
return; return;
} }
} }
}
if(canInteract(player)) {
for(fEntity packet : getManager().getfArmorStandByObjectID(getObjID())){ for(fEntity packet : getManager().getfArmorStandByObjectID(getObjID())){
if(packet.getName().equalsIgnoreCase("#SITZ#")){ if(packet.getName().equalsIgnoreCase("#SITZ#")){
packet.setPassenger(player); packet.setPassenger(player);