bukkit pass 2

This commit is contained in:
dfsek
2021-06-23 15:56:41 -07:00
parent 2906a4f891
commit 918ff28ed4
34 changed files with 111 additions and 70 deletions

View File

@@ -38,4 +38,6 @@ public interface ConfigPack extends LoaderRegistrar {
Map<String, String> getLocatable();
boolean doBetaCarvers();
boolean vanillaFlora();
}

View File

@@ -1,10 +1,12 @@
package com.dfsek.terra.api.config;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.util.ProbabilityCollection;
import com.dfsek.terra.api.world.TerraWorld;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
import com.dfsek.terra.api.world.generator.SamplerCache;
import java.util.Map;
import java.util.Set;
public interface WorldConfig {
@@ -34,4 +36,8 @@ public interface WorldConfig {
String getAuthor();
String getVersion();
Map<String, String> getLocatable();
boolean isDisableSaplings();
}

View File

@@ -2,12 +2,15 @@ package com.dfsek.terra.api.entity;
import com.dfsek.terra.api.vector.Location;
import com.dfsek.terra.api.Handle;
import com.dfsek.terra.api.vector.Vector3;
import com.dfsek.terra.api.world.World;
public interface Entity extends Handle, CommandSender {
Location getLocation();
Vector3 position();
void setLocation(Location location);
void position(Vector3 position);
World getWorld();
void world(World world);
World world();
}

View File

@@ -4,6 +4,7 @@ import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.event.events.PackEvent;
import com.dfsek.terra.api.entity.Entity;
import com.dfsek.terra.api.vector.Location;
import com.dfsek.terra.api.vector.Vector3;
/**
* Called when an entity is spawned.
@@ -11,12 +12,10 @@ import com.dfsek.terra.api.vector.Location;
public class EntitySpawnEvent implements PackEvent {
private final ConfigPack pack;
private final Entity entity;
private final Location location;
public EntitySpawnEvent(ConfigPack pack, Entity entity, Location location) {
public EntitySpawnEvent(ConfigPack pack, Entity entity) {
this.pack = pack;
this.entity = entity;
this.location = location;
}
@Override
@@ -32,13 +31,4 @@ public class EntitySpawnEvent implements PackEvent {
public Entity getEntity() {
return entity;
}
/**
* Get the location of the entity.
*
* @return Location of the entity.
*/
public Location getLocation() {
return location;
}
}