mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Carving package
This commit is contained in:
parent
9b93a5cd04
commit
b0bae93d06
@ -22,7 +22,7 @@ import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.object.biome.IrisBiome;
|
||||
import com.volmit.iris.engine.object.block.IrisBlockData;
|
||||
import com.volmit.iris.engine.object.cave.IrisCave;
|
||||
import com.volmit.iris.engine.object.carving.IrisCave;
|
||||
import com.volmit.iris.engine.object.common.IrisScript;
|
||||
import com.volmit.iris.engine.object.dimensional.IrisDimension;
|
||||
import com.volmit.iris.engine.object.entity.IrisEntity;
|
||||
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2021 Arcane Arts (Volmit Software)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.volmit.iris.engine.object.carving;
|
||||
|
||||
import com.volmit.iris.engine.mantle.MantleWriter;
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.documentation.BlockCoordinates;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Desc("Represents a carving configuration")
|
||||
@Data
|
||||
public class IrisCarving {
|
||||
@Desc("Define cave placers")
|
||||
private KList<IrisCavePlacer> caves = new KList<>();
|
||||
|
||||
@BlockCoordinates
|
||||
public void doCarving(MantleWriter writer, RNG rng, int x, int z) {
|
||||
if(caves.isNotEmpty())
|
||||
{
|
||||
for(IrisCavePlacer i : caves)
|
||||
{
|
||||
i.generateCave();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -16,7 +16,7 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.volmit.iris.engine.object.cave;
|
||||
package com.volmit.iris.engine.object.carving;
|
||||
|
||||
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
@ -16,11 +16,12 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.volmit.iris.engine.object.cave;
|
||||
package com.volmit.iris.engine.object.carving;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.loader.IrisData;
|
||||
import com.volmit.iris.engine.data.cache.AtomicCache;
|
||||
import com.volmit.iris.engine.mantle.MantleWriter;
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import com.volmit.iris.engine.object.annotations.MinNumber;
|
||||
import com.volmit.iris.engine.object.annotations.RegistryListResource;
|
||||
@ -68,7 +69,7 @@ public class IrisCavePlacer implements IRare {
|
||||
return caveCache.aquire(() -> data.getCaveLoader().load(getCave()));
|
||||
}
|
||||
|
||||
public void generateCave(Mantle mantle, RNG rng, IrisData data, int x, int y, int z) {
|
||||
public void generateCave(MantleWriter mantle, RNG rng, IrisData data, int x, int y, int z) {
|
||||
if (fail.get()) {
|
||||
return;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user