mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Add entity spawn location setting
Also prevents entities from spawning when a building was not spawned
This commit is contained in:
parent
24c4cbe901
commit
f3ceda1b3d
@ -50,6 +50,11 @@ public class IrisJigsawPieceConnector
|
||||
@Required
|
||||
private IrisPosition position = new IrisPosition(0,0,0);
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("The relative position to this connector to place entities at")
|
||||
@DependsOn({"spawnEntity"})
|
||||
private IrisPosition entityPosition = null;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("The direction this connector is facing. If the direction is set to UP, then pieces will place ABOVE the connector.")
|
||||
@Required
|
||||
|
@ -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())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user