mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-12 18:56:04 +00:00
split most fabric and quilt code into common project
This commit is contained in:
@@ -47,16 +47,16 @@ public class ForgeEntryPoint {
|
||||
|
||||
static {
|
||||
AwfulForgeHacks.loadAllTerraClasses();
|
||||
TERRA_PLUGIN = new PlatformImpl();
|
||||
TERRA_PLUGIN = new ForgePlatform();
|
||||
}
|
||||
|
||||
public static final String MODID = "terra";
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ForgeEntryPoint.class);
|
||||
|
||||
private static final PlatformImpl TERRA_PLUGIN;
|
||||
private static final ForgePlatform TERRA_PLUGIN;
|
||||
|
||||
public static PlatformImpl getPlatform() {
|
||||
public static ForgePlatform getPlatform() {
|
||||
return TERRA_PLUGIN;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,23 +34,17 @@ import java.util.List;
|
||||
|
||||
import com.dfsek.terra.addon.EphemeralAddon;
|
||||
import com.dfsek.terra.api.addon.BaseAddon;
|
||||
import com.dfsek.terra.api.handle.ItemHandle;
|
||||
import com.dfsek.terra.api.handle.WorldHandle;
|
||||
import com.dfsek.terra.api.util.generic.Lazy;
|
||||
import com.dfsek.terra.mod.CommonPlatform;
|
||||
import com.dfsek.terra.mod.ModPlatform;
|
||||
import com.dfsek.terra.mod.generation.MinecraftChunkGeneratorWrapper;
|
||||
import com.dfsek.terra.mod.handle.MinecraftItemHandle;
|
||||
import com.dfsek.terra.mod.handle.MinecraftWorldHandle;
|
||||
|
||||
|
||||
public class PlatformImpl extends ModPlatform {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PlatformImpl.class);
|
||||
private final ItemHandle itemHandle = new MinecraftItemHandle();
|
||||
private final WorldHandle worldHandle = new MinecraftWorldHandle();
|
||||
public class ForgePlatform extends ModPlatform {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(ForgePlatform.class);
|
||||
private final Lazy<File> dataFolder = Lazy.lazy(() -> new File("./config/Terra"));
|
||||
|
||||
public PlatformImpl() {
|
||||
public ForgePlatform() {
|
||||
CommonPlatform.initialize(this);
|
||||
load();
|
||||
}
|
||||
@@ -117,23 +111,12 @@ public class PlatformImpl extends ModPlatform {
|
||||
public @NotNull String platformName() {
|
||||
return "Forge";
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull WorldHandle getWorldHandle() {
|
||||
return worldHandle;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public @NotNull File getDataFolder() {
|
||||
return dataFolder.value();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull ItemHandle getItemHandle() {
|
||||
return itemHandle;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BaseAddon getPlatformAddon() {
|
||||
return new ForgeAddon(this);
|
||||
Reference in New Issue
Block a user