mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-05 23:36:12 +00:00
Starcast is 60+% faster
This commit is contained in:
@@ -113,8 +113,7 @@ public class IrisEntitySpawn implements IRare {
|
||||
World world = gen.getWorld().realWorld();
|
||||
if (spawns > 0) {
|
||||
|
||||
if(referenceMarker != null)
|
||||
{
|
||||
if (referenceMarker != null) {
|
||||
gen.getMantle().getMantle().remove(c.getX(), c.getY(), c.getZ(), MatterMarker.class);
|
||||
}
|
||||
|
||||
@@ -158,7 +157,7 @@ public class IrisEntitySpawn implements IRare {
|
||||
return spawn100(g, at, false);
|
||||
}
|
||||
|
||||
private Entity spawn100(Engine g, Location at, boolean ignoreSurfaces) {
|
||||
private Entity spawn100(Engine g, Location at, boolean ignoreSurfaces) {
|
||||
try {
|
||||
IrisEntity irisEntity = getRealEntity(g);
|
||||
|
||||
|
||||
@@ -53,8 +53,7 @@ public class IrisMarker extends IrisRegistrant {
|
||||
@Desc("If this marker is used, what is the chance it removes itself. For example 25% (0.25) would mean that on average 4 uses will remove a specific marker. Set this below 0 (-1) to never exhaust & set this to 1 or higher to always exhaust on first use.")
|
||||
private double exhaustionChance = 0.33;
|
||||
|
||||
public boolean shouldExhaust()
|
||||
{
|
||||
public boolean shouldExhaust() {
|
||||
return RNG.r.chance(exhaustionChance);
|
||||
}
|
||||
|
||||
|
||||
@@ -658,32 +658,26 @@ public class IrisObject extends IrisRegistrant {
|
||||
KMap<BlockVector, String> markers = null;
|
||||
|
||||
try {
|
||||
if(config.getMarkers().isNotEmpty() && placer.getEngine() != null)
|
||||
{
|
||||
if (config.getMarkers().isNotEmpty() && placer.getEngine() != null) {
|
||||
markers = new KMap<>();
|
||||
for(IrisObjectMarker j : config.getMarkers())
|
||||
{
|
||||
for (IrisObjectMarker j : config.getMarkers()) {
|
||||
IrisMarker marker = getLoader().getMarkerLoader().load(j.getMarker());
|
||||
|
||||
if(marker == null)
|
||||
{
|
||||
if (marker == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int max = j.getMaximumMarkers();
|
||||
|
||||
for(BlockVector i : getBlocks().k().shuffle())
|
||||
{
|
||||
if(max <= 0)
|
||||
{
|
||||
for (BlockVector i : getBlocks().k().shuffle()) {
|
||||
if (max <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
BlockData data = getBlocks().get(i);
|
||||
|
||||
for (BlockData k : j.getMark(rdata)) {
|
||||
if(max <= 0)
|
||||
{
|
||||
if (max <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -691,8 +685,7 @@ public class IrisObject extends IrisRegistrant {
|
||||
boolean a = !blocks.containsKey(new BlockVector(i.clone().add(new BlockVector(0, 1, 0))));
|
||||
boolean fff = !blocks.containsKey(new BlockVector(i.clone().add(new BlockVector(0, 2, 0))));
|
||||
|
||||
if((marker.isEmptyAbove() && a && fff) || !marker.isEmptyAbove())
|
||||
{
|
||||
if ((marker.isEmptyAbove() && a && fff) || !marker.isEmptyAbove()) {
|
||||
markers.put(i, j.getMarker());
|
||||
max--;
|
||||
}
|
||||
@@ -787,9 +780,8 @@ public class IrisObject extends IrisRegistrant {
|
||||
listener.accept(new BlockPosition(xx, yy, zz));
|
||||
}
|
||||
|
||||
if(markers != null && markers.containsKey(g))
|
||||
{
|
||||
placer.getEngine().getMantle().getMantle().set(xx,yy,zz,new MatterMarker(markers.get(g)));
|
||||
if (markers != null && markers.containsKey(g)) {
|
||||
placer.getEngine().getMantle().getMantle().set(xx, yy, zz, new MatterMarker(markers.get(g)));
|
||||
}
|
||||
|
||||
if (!data.getMaterial().equals(Material.AIR) && !data.getMaterial().equals(Material.CAVE_AIR)) {
|
||||
|
||||
@@ -82,7 +82,7 @@ public class IrisObjectPlacement {
|
||||
@MinNumber(0)
|
||||
@Desc("When bore is enabled, expand max-y of the cuboid it removes")
|
||||
private int boreExtendMaxY = 0;
|
||||
@ArrayType(min = 1,type = IrisObjectMarker.class)
|
||||
@ArrayType(min = 1, type = IrisObjectMarker.class)
|
||||
@Desc("Add markers to blocks in this object")
|
||||
private KList<IrisObjectMarker> markers = new KList<>();
|
||||
@MaxNumber(64)
|
||||
|
||||
Reference in New Issue
Block a user