mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
resolve conflicts
This commit is contained in:
@@ -19,8 +19,6 @@ import com.dfsek.terra.api.tectonic.LoaderRegistrar;
|
|||||||
* Represents a Terra mod/plugin instance.
|
* Represents a Terra mod/plugin instance.
|
||||||
*/
|
*/
|
||||||
public interface Platform extends LoaderRegistrar {
|
public interface Platform extends LoaderRegistrar {
|
||||||
Logger logger();
|
|
||||||
|
|
||||||
boolean reload();
|
boolean reload();
|
||||||
|
|
||||||
String platformName();
|
String platformName();
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ public final class LangUtil {
|
|||||||
private LangUtil() { }
|
private LangUtil() { }
|
||||||
|
|
||||||
public static void load(String langID, Platform platform) {
|
public static void load(String langID, Platform platform) {
|
||||||
Logger logger = platform.logger();
|
|
||||||
File file = new File(platform.getDataFolder(), "lang");
|
File file = new File(platform.getDataFolder(), "lang");
|
||||||
try {
|
try {
|
||||||
File file1 = new File(file, langID + ".yml");
|
File file1 = new File(file, langID + ".yml");
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ public class ConfigPackImpl implements ConfigPack {
|
|||||||
ConfigPackPostTemplate packPostTemplate = new ConfigPackPostTemplate();
|
ConfigPackPostTemplate packPostTemplate = new ConfigPackPostTemplate();
|
||||||
selfLoader.load(packPostTemplate, configuration);
|
selfLoader.load(packPostTemplate, configuration);
|
||||||
seededBiomeProvider = packPostTemplate.getProviderBuilder();
|
seededBiomeProvider = packPostTemplate.getProviderBuilder();
|
||||||
checkDeadEntries(platform);
|
checkDeadEntries();
|
||||||
} catch(FileNotFoundException e) {
|
} catch(FileNotFoundException e) {
|
||||||
throw new LoadException("No pack.yml file found in " + folder.getAbsolutePath(), e);
|
throw new LoadException("No pack.yml file found in " + folder.getAbsolutePath(), e);
|
||||||
}
|
}
|
||||||
@@ -189,7 +189,7 @@ public class ConfigPackImpl implements ConfigPack {
|
|||||||
|
|
||||||
selfLoader.load(packPostTemplate, configuration);
|
selfLoader.load(packPostTemplate, configuration);
|
||||||
seededBiomeProvider = packPostTemplate.getProviderBuilder();
|
seededBiomeProvider = packPostTemplate.getProviderBuilder();
|
||||||
checkDeadEntries(platform);
|
checkDeadEntries();
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new LoadException("Unable to load pack.yml from ZIP file", e);
|
throw new LoadException("Unable to load pack.yml from ZIP file", e);
|
||||||
}
|
}
|
||||||
@@ -362,7 +362,7 @@ public class ConfigPackImpl implements ConfigPack {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkDeadEntries(TerraPlugin main) {
|
private void checkDeadEntries() {
|
||||||
registryMap.forEach((clazz, pair) -> ((OpenRegistryImpl<?>) pair.getLeft())
|
registryMap.forEach((clazz, pair) -> ((OpenRegistryImpl<?>) pair.getLeft())
|
||||||
.getDeadEntries()
|
.getDeadEntries()
|
||||||
.forEach((id, value) -> logger.warn("Dead entry in '{}' registry: '{}'", ReflectionUtil.typeToString(clazz), id)));
|
.forEach((id, value) -> logger.warn("Dead entry in '{}' registry: '{}'", ReflectionUtil.typeToString(clazz), id)));
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import java.util.Locale;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import com.dfsek.terra.AbstractPlatform;
|
import com.dfsek.terra.AbstractPlatform;
|
||||||
import com.dfsek.terra.api.util.Logger;
|
|
||||||
import com.dfsek.terra.api.addon.TerraAddon;
|
import com.dfsek.terra.api.addon.TerraAddon;
|
||||||
import com.dfsek.terra.api.block.state.BlockState;
|
import com.dfsek.terra.api.block.state.BlockState;
|
||||||
import com.dfsek.terra.api.handle.ItemHandle;
|
import com.dfsek.terra.api.handle.ItemHandle;
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ public class FabricEntryPoint implements ModInitializer {
|
|||||||
public static final ConfiguredFeature<?, ?> POPULATOR_CONFIGURED_FEATURE = POPULATOR_FEATURE.configure(FeatureConfig.DEFAULT).decorate(
|
public static final ConfiguredFeature<?, ?> POPULATOR_CONFIGURED_FEATURE = POPULATOR_FEATURE.configure(FeatureConfig.DEFAULT).decorate(
|
||||||
Decorator.NOPE.configure(NopeDecoratorConfig.INSTANCE));
|
Decorator.NOPE.configure(NopeDecoratorConfig.INSTANCE));
|
||||||
private static final PlatformImpl TERRA_PLUGIN = new PlatformImpl();
|
private static final PlatformImpl TERRA_PLUGIN = new PlatformImpl();
|
||||||
.decorate(Decorator.NOPE.configure(
|
|
||||||
NopeDecoratorConfig.INSTANCE));
|
|
||||||
public static PlatformImpl getTerraPlugin() {
|
public static PlatformImpl getTerraPlugin() {
|
||||||
return TERRA_PLUGIN;
|
return TERRA_PLUGIN;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user