mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-03 00:15:35 +00:00
fix flora issue
This commit is contained in:
parent
9fa660409d
commit
ff4cbda294
@ -14,7 +14,7 @@ public class Cell implements BufferedItem {
|
||||
|
||||
@Override
|
||||
public void paste(Vector3 origin, World world) {
|
||||
items.forEach(item -> item.paste(origin, world));
|
||||
items.forEach(item -> item.paste(origin.clone(), world));
|
||||
}
|
||||
|
||||
public void add(BufferedItem item) {
|
||||
|
@ -35,7 +35,7 @@ public class StructureBuffer implements Buffer {
|
||||
|
||||
@Override
|
||||
public Buffer addItem(BufferedItem item, Vector3 location) {
|
||||
bufferedItemMap.computeIfAbsent(location, l -> new Cell()).add(item);
|
||||
bufferedItemMap.computeIfAbsent(location.clone(), l -> new Cell()).add(item);
|
||||
return this;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ public class StructureBuffer implements Buffer {
|
||||
|
||||
@Override
|
||||
public Buffer setMark(String mark, Vector3 location) {
|
||||
bufferedItemMap.computeIfAbsent(location, l -> new Cell()).setMark(mark);
|
||||
bufferedItemMap.computeIfAbsent(location.clone(), l -> new Cell()).setMark(mark);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class TerraFlora implements Flora {
|
||||
if(y > 255 || y < 0) continue;
|
||||
current = current.add(0, search.equals(Search.UP) ? 1 : -1, 0);
|
||||
if((spawnBlacklist != spawnable.contains(chunk.getBlockData(current.getBlockX(), current.getBlockY(), current.getBlockZ()).getBlockType())) && isIrrigated(current.add(0, irrigableOffset, 0), chunk) && valid(size, current.clone(), chunk)) {
|
||||
blocks.add(current);
|
||||
blocks.add(current.clone());
|
||||
if(maxPlacements > 0 && blocks.size() >= maxPlacements) break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user