9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-30 04:29:05 +00:00

Add entity spawn location setting

Also prevents entities from spawning when a building was not spawned
This commit is contained in:
CocoTheOwner
2021-03-06 14:54:28 +01:00
parent 24c4cbe901
commit f3ceda1b3d
2 changed files with 12 additions and 2 deletions

View File

@@ -114,9 +114,14 @@ public class PlannedStructure {
for(IrisJigsawPieceConnector j : i.getAvailableConnectors())
{
if(j.getSpawnEntity() != null)
if(j.getSpawnEntity() != null && h != -1)
{
IrisPosition p = i.getWorldPosition(j).add(new IrisPosition(j.getDirection().toVector().multiply(2)));
IrisPosition p = null;
if (j.getEntityPosition() == null){
p = new IrisPosition(j.getDirection().toVector().multiply(2));
} else {
p = i.getWorldPosition(j).add(j.getEntityPosition());
}
if(options.getMode().equals(ObjectPlaceMode.PAINT) || options.isVacuum())
{