First shot at starting.
This commit is contained in:
+15
-2
@@ -61,8 +61,21 @@ sourceSets {
|
|||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
include 'appeng/core/AppEng.java'
|
include 'appeng/core/AppEng.java'
|
||||||
include 'appeng/client/ClientHelper.java'
|
include 'appeng/core/crash/CrashInfo.java'
|
||||||
include 'appeng/server/ServerHelper.java'
|
include 'appeng/core/CommonHelper.java'
|
||||||
|
include 'appeng/core/crash/**'
|
||||||
|
include 'appeng/core/AEConfig.java'
|
||||||
|
include 'appeng/core/features/AEFeature.java'
|
||||||
|
include 'appeng/core/settings/**'
|
||||||
|
include 'appeng/util/ConfigManager.java'
|
||||||
|
include 'appeng/core/settings/TickRates.java'
|
||||||
|
include 'appeng/util/IConfigManagerHost.java'
|
||||||
|
include 'appeng/services/export/ExportConfig.java'
|
||||||
|
include 'appeng/client/ActionKey.java'
|
||||||
|
include 'appeng/client/EffectType.java'
|
||||||
|
include 'appeng/core/AELog.java'
|
||||||
|
// include 'appeng/client/ClientHelper.java'
|
||||||
|
// include 'appeng/server/ServerHelper.java'
|
||||||
include 'appeng/block/AEBaseBlock.java'
|
include 'appeng/block/AEBaseBlock.java'
|
||||||
include 'appeng/helpers/ICustomCollision.java'
|
include 'appeng/helpers/ICustomCollision.java'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import appeng.core.features.AEFeature;
|
|||||||
import appeng.core.settings.TickRates;
|
import appeng.core.settings.TickRates;
|
||||||
import appeng.util.ConfigManager;
|
import appeng.util.ConfigManager;
|
||||||
import appeng.util.IConfigManagerHost;
|
import appeng.util.IConfigManagerHost;
|
||||||
import appeng.util.Platform;
|
import com.google.common.base.Strings;
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
import net.minecraftforge.common.ForgeConfigSpec;
|
import net.minecraftforge.common.ForgeConfigSpec;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
@@ -34,7 +34,6 @@ import net.minecraftforge.fml.common.Mod;
|
|||||||
import net.minecraftforge.fml.config.ModConfig;
|
import net.minecraftforge.fml.config.ModConfig;
|
||||||
import org.apache.commons.lang3.tuple.Pair;
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
@@ -48,6 +47,16 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
public static final ClientConfig CLIENT;
|
public static final ClientConfig CLIENT;
|
||||||
public static final ForgeConfigSpec CLIENT_SPEC;
|
public static final ForgeConfigSpec CLIENT_SPEC;
|
||||||
|
|
||||||
|
// Default Grindstone ores
|
||||||
|
private static final String[] ORES_VANILLA = { "Obsidian", "Ender", "EnderPearl", "Coal", "Iron", "Gold", "Charcoal", "NetherQuartz" };
|
||||||
|
private static final String[] ORES_AE = { "CertusQuartz", "Wheat", "Fluix" };
|
||||||
|
private static final String[] ORES_COMMON = { "Copper", "Tin", "Silver", "Lead", "Bronze" };
|
||||||
|
private static final String[] ORES_MISC = { "Brass", "Platinum", "Nickel", "Invar", "Aluminium", "Electrum", "Osmium", "Zinc" };
|
||||||
|
|
||||||
|
// Default Energy Conversion Rates
|
||||||
|
private static final double DEFAULT_IC2_EXCHANGE = 2.0;
|
||||||
|
private static final double DEFAULT_RF_EXCHANGE = 0.5;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
final Pair<ClientConfig, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(ClientConfig::new);
|
final Pair<ClientConfig, ForgeConfigSpec> specPair = new ForgeConfigSpec.Builder().configure(ClientConfig::new);
|
||||||
CLIENT_SPEC = specPair.getRight();
|
CLIENT_SPEC = specPair.getRight();
|
||||||
@@ -61,16 +70,6 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
// Config instance
|
// Config instance
|
||||||
private static AEConfig instance;
|
private static AEConfig instance;
|
||||||
|
|
||||||
// Default Grindstone ores
|
|
||||||
private static final String[] ORES_VANILLA = { "Obsidian", "Ender", "EnderPearl", "Coal", "Iron", "Gold", "Charcoal", "NetherQuartz" };
|
|
||||||
private static final String[] ORES_AE = { "CertusQuartz", "Wheat", "Fluix" };
|
|
||||||
private static final String[] ORES_COMMON = { "Copper", "Tin", "Silver", "Lead", "Bronze" };
|
|
||||||
private static final String[] ORES_MISC = { "Brass", "Platinum", "Nickel", "Invar", "Aluminium", "Electrum", "Osmium", "Zinc" };
|
|
||||||
|
|
||||||
// Default Energy Conversion Rates
|
|
||||||
private static final double DEFAULT_IC2_EXCHANGE = 2.0;
|
|
||||||
private static final double DEFAULT_RF_EXCHANGE = 0.5;
|
|
||||||
|
|
||||||
private final IConfigManager settings = new ConfigManager( this );
|
private final IConfigManager settings = new ConfigManager( this );
|
||||||
|
|
||||||
private final EnumSet<AEFeature> featureFlags = EnumSet.noneOf( AEFeature.class );
|
private final EnumSet<AEFeature> featureFlags = EnumSet.noneOf( AEFeature.class );
|
||||||
@@ -139,7 +138,10 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onModConfigEvent(final ModConfig.ModConfigEvent configEvent) {
|
public static void onModConfigEvent(final ModConfig.ModConfigEvent configEvent) {
|
||||||
if (configEvent.getConfig().getSpec() == CLIENT_SPEC) {
|
if (configEvent.getConfig().getSpec() == CLIENT_SPEC) {
|
||||||
AEConfig.instance().syncConfig(CLIENT);
|
if (instance == null) {
|
||||||
|
instance = new AEConfig();
|
||||||
|
}
|
||||||
|
instance.syncConfig(CLIENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,11 +219,12 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
|
|
||||||
for( final TickRates tr : TickRates.values() )
|
for( final TickRates tr : TickRates.values() )
|
||||||
{
|
{
|
||||||
tr.Load( this );
|
tr.setMin(config.tickRateMin.get(tr).get());
|
||||||
|
tr.setMax(config.tickRateMin.get(tr).get());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.storageProviderID = config.storageProviderID.get();
|
this.storageProviderID = Strings.emptyToNull(config.storageProviderID.get());
|
||||||
this.storageDimensionID = config.storageDimensionID.get();
|
this.storageDimensionID = Strings.emptyToNull(config.storageDimensionID.get());
|
||||||
this.spatialPowerMultiplier = config.spatialPowerMultiplier.get();
|
this.spatialPowerMultiplier = config.spatialPowerMultiplier.get();
|
||||||
this.spatialPowerExponent = config.spatialPowerExponent.get();
|
this.spatialPowerExponent = config.spatialPowerExponent.get();
|
||||||
|
|
||||||
@@ -341,8 +344,8 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
{
|
{
|
||||||
if( this.isFeatureEnabled( AEFeature.SPATIAL_IO ) )
|
if( this.isFeatureEnabled( AEFeature.SPATIAL_IO ) )
|
||||||
{
|
{
|
||||||
CLIENT.storageProviderID.set(this.storageProviderID);
|
CLIENT.storageProviderID.set(Strings.nullToEmpty(this.storageProviderID));
|
||||||
CLIENT.storageDimensionID.set(this.storageDimensionID);
|
CLIENT.storageDimensionID.set(Strings.nullToEmpty(this.storageDimensionID));
|
||||||
}
|
}
|
||||||
|
|
||||||
CLIENT.selectedPowerUnit.set(this.selectedPowerUnit);
|
CLIENT.selectedPowerUnit.set(this.selectedPowerUnit);
|
||||||
@@ -431,7 +434,7 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
|
|
||||||
public void nextPowerUnit( final boolean backwards )
|
public void nextPowerUnit( final boolean backwards )
|
||||||
{
|
{
|
||||||
this.selectedPowerUnit = Platform.rotateEnum( this.selectedPowerUnit, backwards, Settings.POWER_UNITS.getPossibleValues() );
|
// FIXME this.selectedPowerUnit = Platform.rotateEnum( this.selectedPowerUnit, backwards, Settings.POWER_UNITS.getPossibleValues() );
|
||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -711,6 +714,9 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
public final ConfigValue<Integer> condenserMatterBallsPower;
|
public final ConfigValue<Integer> condenserMatterBallsPower;
|
||||||
public final ConfigValue<Integer> condenserSingularityPower;
|
public final ConfigValue<Integer> condenserSingularityPower;
|
||||||
|
|
||||||
|
public final Map<TickRates, ConfigValue<Integer>> tickRateMin = new HashMap<>();
|
||||||
|
public final Map<TickRates, ConfigValue<Integer>> tickRateMax = new HashMap<>();
|
||||||
|
|
||||||
public ClientConfig(ForgeConfigSpec.Builder builder) {
|
public ClientConfig(ForgeConfigSpec.Builder builder) {
|
||||||
|
|
||||||
// Feature switches
|
// Feature switches
|
||||||
@@ -731,7 +737,7 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
for (AEFeature feature : featuresInGroup)
|
for (AEFeature feature : featuresInGroup)
|
||||||
{
|
{
|
||||||
enabledFeatures.put(feature, builder
|
enabledFeatures.put(feature, builder
|
||||||
.comment(feature.comment())
|
.comment(Strings.nullToEmpty(feature.comment()))
|
||||||
.define(feature.key(), feature.isEnabled()));
|
.define(feature.key(), feature.isEnabled()));
|
||||||
}
|
}
|
||||||
builder.pop();
|
builder.pop();
|
||||||
@@ -783,8 +789,8 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
builder.pop();
|
builder.pop();
|
||||||
|
|
||||||
builder.push("spatialio");
|
builder.push("spatialio");
|
||||||
this.storageProviderID = builder.define("storageProviderID", (String) null);
|
this.storageProviderID = builder.define("storageProviderID", "");
|
||||||
this.storageDimensionID = builder.define("storageDimensionID", (String) null);
|
this.storageDimensionID = builder.define("storageDimensionID", "");
|
||||||
this.spatialPowerMultiplier = builder.define("spatialPowerMultiplier", 1250.0);
|
this.spatialPowerMultiplier = builder.define("spatialPowerMultiplier", 1250.0);
|
||||||
this.spatialPowerExponent = builder.define("spatialPowerExponent", 1.35);
|
this.spatialPowerExponent = builder.define("spatialPowerExponent", 1.35);
|
||||||
builder.pop();
|
builder.pop();
|
||||||
@@ -793,7 +799,7 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
.comment("Creates recipe of the following pattern automatically: '1 oreTYPE => 2 dustTYPE' and '(1 ingotTYPE or 1 crystalTYPE or 1 gemTYPE) => 1 dustTYPE'")
|
.comment("Creates recipe of the following pattern automatically: '1 oreTYPE => 2 dustTYPE' and '(1 ingotTYPE or 1 crystalTYPE or 1 gemTYPE) => 1 dustTYPE'")
|
||||||
.push("GrindStone");
|
.push("GrindStone");
|
||||||
|
|
||||||
List<String> defaultGrinderOres = Stream.of( ORES_VANILLA, ORES_AE, ORES_COMMON, ORES_MISC ).flatMap( Stream::of ).collect(Collectors.toList());
|
List<String> defaultGrinderOres = Stream.of( ORES_VANILLA, ORES_AE, ORES_COMMON, ORES_MISC ).flatMap( Arrays::stream ).collect(Collectors.toList());
|
||||||
this.grinderOres = builder
|
this.grinderOres = builder
|
||||||
.comment("The list of types to handle. Specify without a prefix like ore or dust.")
|
.comment("The list of types to handle. Specify without a prefix like ore or dust.")
|
||||||
.defineList("grinderOres", defaultGrinderOres, obj -> true); // FIXME: tag validation, is that even possible???
|
.defineList("grinderOres", defaultGrinderOres, obj -> true); // FIXME: tag validation, is that even possible???
|
||||||
@@ -849,6 +855,14 @@ public final class AEConfig implements IConfigurableObject, IConfigManagerHost
|
|||||||
condenserSingularityPower = builder.define("Singularity", 256000);
|
condenserSingularityPower = builder.define("Singularity", 256000);
|
||||||
builder.pop();
|
builder.pop();
|
||||||
|
|
||||||
|
builder
|
||||||
|
.comment(" Min / Max Tickrates for dynamic ticking, most of these components also use sleeping, to prevent constant ticking, adjust with care, non standard rates are not supported or tested.")
|
||||||
|
.push("tickRates");
|
||||||
|
for (TickRates tickRate : TickRates.values()) {
|
||||||
|
tickRateMin.put(tickRate, builder.define(tickRate.name() + "Min", tickRate.getDefaultMin()));
|
||||||
|
tickRateMax.put(tickRate, builder.define(tickRate.name() + "Max", tickRate.getDefaultMax()));
|
||||||
|
}
|
||||||
|
builder.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ import org.apache.logging.log4j.message.ParameterizedMessage;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.tile.AEBaseTile;
|
|
||||||
import appeng.util.Platform;
|
|
||||||
|
|
||||||
|
|
||||||
public final class AELog
|
public final class AELog
|
||||||
@@ -57,7 +55,8 @@ public final class AELog
|
|||||||
*/
|
*/
|
||||||
private static Logger getLogger()
|
private static Logger getLogger()
|
||||||
{
|
{
|
||||||
return Platform.isServer() ? SERVER : CLIENT;
|
// FIXME return Platform.isServer() ? SERVER : CLIENT;
|
||||||
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -320,13 +319,13 @@ public final class AELog
|
|||||||
* @param pos
|
* @param pos
|
||||||
* @param aeBaseTile
|
* @param aeBaseTile
|
||||||
*/
|
*/
|
||||||
public static void blockUpdate( @Nonnull final BlockPos pos, @Nonnull final AEBaseTile aeBaseTile )
|
// FIXME public static void blockUpdate( @Nonnull final BlockPos pos, @Nonnull final AEBaseTile aeBaseTile )
|
||||||
{
|
// FIXME {
|
||||||
if( AEConfig.instance().isFeatureEnabled( AEFeature.UPDATE_LOGGING ) )
|
// FIXME if( AEConfig.instance().isFeatureEnabled( AEFeature.UPDATE_LOGGING ) )
|
||||||
{
|
// FIXME {
|
||||||
info( BLOCK_UPDATE, aeBaseTile.getClass().getName(), pos );
|
// FIXME info( BLOCK_UPDATE, aeBaseTile.getClass().getName(), pos );
|
||||||
}
|
// FIXME }
|
||||||
}
|
// FIXME }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use to check for an enabled crafting log.
|
* Use to check for an enabled crafting log.
|
||||||
|
|||||||
@@ -21,17 +21,13 @@ package appeng.core;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import appeng.client.ClientHelper;
|
|
||||||
import appeng.server.ServerHelper;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.CrashReportExtender;
|
import net.minecraftforge.fml.CrashReportExtender;
|
||||||
import net.minecraftforge.fml.DistExecutor;
|
|
||||||
import net.minecraftforge.fml.ModLoadingContext;
|
import net.minecraftforge.fml.ModLoadingContext;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
|
||||||
import net.minecraftforge.fml.config.ModConfig;
|
import net.minecraftforge.fml.config.ModConfig;
|
||||||
|
|
||||||
import appeng.core.crash.CrashInfo;
|
|
||||||
import appeng.core.crash.ModCrashEnhancement;
|
import appeng.core.crash.ModCrashEnhancement;
|
||||||
import appeng.services.export.ExportConfig;
|
import appeng.services.export.ExportConfig;
|
||||||
|
|
||||||
@@ -52,7 +48,7 @@ public final class AppEng
|
|||||||
|
|
||||||
private static AppEng INSTANCE;
|
private static AppEng INSTANCE;
|
||||||
|
|
||||||
private final Registration registration;
|
//FIXME private final Registration registration;
|
||||||
|
|
||||||
private File configDirectory;
|
private File configDirectory;
|
||||||
|
|
||||||
@@ -69,12 +65,12 @@ public final class AppEng
|
|||||||
|
|
||||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, AEConfig.CLIENT_SPEC);
|
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, AEConfig.CLIENT_SPEC);
|
||||||
|
|
||||||
proxy = DistExecutor.runForDist(() -> ClientHelper::new, () -> ServerHelper::new);
|
// proxy = DistExecutor.runForDist(() -> ClientHelper::new, () -> ServerHelper::new);
|
||||||
|
|
||||||
CrashReportExtender.registerCrashCallable( new ModCrashEnhancement( CrashInfo.MOD_VERSION ) );
|
CrashReportExtender.registerCrashCallable( new ModCrashEnhancement() );
|
||||||
|
|
||||||
this.registration = new Registration();
|
//FIXMEthis.registration = new Registration();
|
||||||
MinecraftForge.EVENT_BUS.register( this.registration );
|
//FIXMEMinecraftForge.EVENT_BUS.register( this.registration );
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Nonnull
|
// @Nonnull
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ import appeng.api.parts.CableRenderMode;
|
|||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.client.ActionKey;
|
import appeng.client.ActionKey;
|
||||||
import appeng.client.EffectType;
|
import appeng.client.EffectType;
|
||||||
import appeng.core.sync.AppEngPacket;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class CommonHelper
|
public abstract class CommonHelper
|
||||||
@@ -48,7 +47,7 @@ public abstract class CommonHelper
|
|||||||
|
|
||||||
public abstract List<? extends PlayerEntity> getPlayers();
|
public abstract List<? extends PlayerEntity> getPlayers();
|
||||||
|
|
||||||
public abstract void sendToAllNearExcept( PlayerEntity p, double x, double y, double z, double dist, World w, AppEngPacket packet );
|
// FIXME public abstract void sendToAllNearExcept( PlayerEntity p, double x, double y, double z, double dist, World w, AppEngPacket packet );
|
||||||
|
|
||||||
public abstract void spawnEffect( EffectType effect, World world, double posX, double posY, double posZ, Object extra );
|
public abstract void spawnEffect( EffectType effect, World world, double posX, double posY, double posZ, Object extra );
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 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 Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.core.crash;
|
|
||||||
|
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.ICrashCallable;
|
|
||||||
|
|
||||||
|
|
||||||
abstract class BaseCrashEnhancement implements ICrashCallable
|
|
||||||
{
|
|
||||||
private final String name;
|
|
||||||
private final String value;
|
|
||||||
|
|
||||||
public BaseCrashEnhancement( final String name, final String value )
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
this.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final String call() throws Exception
|
|
||||||
{
|
|
||||||
return this.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public final String getLabel()
|
|
||||||
{
|
|
||||||
return this.name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 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 Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.core.crash;
|
|
||||||
|
|
||||||
|
|
||||||
public enum CrashInfo
|
|
||||||
{
|
|
||||||
MOD_VERSION, INTEGRATION
|
|
||||||
}
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 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 Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.core.crash;
|
|
||||||
|
|
||||||
|
|
||||||
import appeng.integration.IntegrationRegistry;
|
|
||||||
|
|
||||||
|
|
||||||
public class IntegrationCrashEnhancement extends BaseCrashEnhancement
|
|
||||||
{
|
|
||||||
public IntegrationCrashEnhancement()
|
|
||||||
{
|
|
||||||
super( "AE2 Integration", IntegrationRegistry.INSTANCE.getStatus() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -20,18 +20,21 @@ package appeng.core.crash;
|
|||||||
|
|
||||||
|
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
|
import net.minecraftforge.fml.common.ICrashCallable;
|
||||||
|
import net.minecraftforge.versions.forge.ForgeVersion;
|
||||||
|
|
||||||
|
|
||||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
public class ModCrashEnhancement implements ICrashCallable {
|
||||||
{
|
|
||||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
@Override
|
||||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
public String getLabel() {
|
||||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
return "AE2 Version";
|
||||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
}
|
||||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
|
||||||
|
@Override
|
||||||
|
public String call() throws Exception {
|
||||||
|
return AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " +
|
||||||
|
ForgeVersion.getVersion();
|
||||||
|
}
|
||||||
|
|
||||||
public ModCrashEnhancement( final CrashInfo output )
|
|
||||||
{
|
|
||||||
super( "AE2 Version", MOD_VERSION );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,10 +18,6 @@
|
|||||||
|
|
||||||
package appeng.core.settings;
|
package appeng.core.settings;
|
||||||
|
|
||||||
|
|
||||||
import appeng.core.AEConfig;
|
|
||||||
|
|
||||||
|
|
||||||
public enum TickRates
|
public enum TickRates
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -59,21 +55,25 @@ public enum TickRates
|
|||||||
|
|
||||||
PressureTunnel( 1, 120 );
|
PressureTunnel( 1, 120 );
|
||||||
|
|
||||||
|
private final int defaultMin;
|
||||||
|
private final int defaultMax;
|
||||||
private int min;
|
private int min;
|
||||||
private int max;
|
private int max;
|
||||||
|
|
||||||
TickRates( final int min, final int max )
|
TickRates( final int min, final int max )
|
||||||
{
|
{
|
||||||
this.setMin( min );
|
this.defaultMin = min;
|
||||||
this.setMax( max );
|
this.defaultMax = max;
|
||||||
|
this.min = min;
|
||||||
|
this.max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Load( final AEConfig config )
|
public int getDefaultMin() {
|
||||||
{
|
return defaultMin;
|
||||||
config.addCustomCategoryComment( "TickRates",
|
}
|
||||||
" Min / Max Tickrates for dynamic ticking, most of these components also use sleeping, to prevent constant ticking, adjust with care, non standard rates are not supported or tested." );
|
|
||||||
this.setMin( config.get( "TickRates", this.name() + ".min", this.getMin() ).getInt( this.getMin() ) );
|
public int getDefaultMax() {
|
||||||
this.setMax( config.get( "TickRates", this.name() + ".max", this.getMax() ).getInt( this.getMax() ) );
|
return defaultMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMax()
|
public int getMax()
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ import net.minecraft.entity.player.PlayerEntity;
|
|||||||
import net.minecraft.network.INetHandler;
|
import net.minecraft.network.INetHandler;
|
||||||
import net.minecraft.network.IPacket;
|
import net.minecraft.network.IPacket;
|
||||||
import net.minecraft.network.PacketBuffer;
|
import net.minecraft.network.PacketBuffer;
|
||||||
import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
|
|
||||||
|
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.AELog;
|
import appeng.core.AELog;
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ import appeng.core.sync.GuiBridge;
|
|||||||
import appeng.core.sync.GuiHostType;
|
import appeng.core.sync.GuiHostType;
|
||||||
import appeng.fluids.util.AEFluidStack;
|
import appeng.fluids.util.AEFluidStack;
|
||||||
import appeng.hooks.TickHandler;
|
import appeng.hooks.TickHandler;
|
||||||
import appeng.integration.Integrations;
|
|
||||||
import appeng.me.GridAccessException;
|
import appeng.me.GridAccessException;
|
||||||
import appeng.me.GridNode;
|
import appeng.me.GridNode;
|
||||||
import appeng.me.helpers.AENetworkProxy;
|
import appeng.me.helpers.AENetworkProxy;
|
||||||
|
|||||||
@@ -1,28 +1,55 @@
|
|||||||
modLoader="javafml"
|
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
||||||
loaderVersion="[31,)"
|
# The overall format is standard TOML format, v0.5.0.
|
||||||
issueTrackerURL="https://github.com/AppliedEnergistics/Applied-Energistics-2/issues"
|
# Note that there are a couple of TOML lists in this file.
|
||||||
showAsResourcePack=false
|
# Find more information on toml format here: https://github.com/toml-lang/toml
|
||||||
|
|
||||||
[[mods]]
|
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
||||||
modId="appliedenergistics2"
|
modLoader="javafml" #mandatory
|
||||||
version="rev7"
|
|
||||||
displayName="Example ModApplied Energistics 2"
|
|
||||||
displayURL="https://ae-mod.info/"
|
|
||||||
logoFile="assets/appliedenergistics2/meta/logo.png"
|
|
||||||
description='''
|
|
||||||
A Mod about Matter, Energy and using them to conquer the world..
|
|
||||||
'''
|
|
||||||
|
|
||||||
# [[dependencies.examplemod]]
|
# A version range to match for said mod loader - for regular FML @Mod it will be the minecraft version (without the 1.)
|
||||||
# modId="forge"
|
loaderVersion="[31,)" #mandatory
|
||||||
# mandatory=true
|
|
||||||
# versionRange="[28,)"
|
# A URL to query for updates for this mod. See the JSON update specification <here>
|
||||||
# ordering="NONE"
|
#updateJSONURL="" #optional
|
||||||
# side="BOTH"
|
|
||||||
#
|
# A URL to refer people to when problems occur with this mod
|
||||||
# [[dependencies.examplemod]]
|
issueTrackerURL="https://github.com/AppliedEnergistics/Applied-Energistics-2/issues" #optional
|
||||||
# modId="minecraft"
|
|
||||||
# mandatory=true
|
# A URL for the "homepage" for this mod, displayed in the mod UI
|
||||||
# versionRange="[1.14.4]"
|
displayURL="https://github.com/AppliedEnergistics/Applied-Energistics-2" #optional
|
||||||
# ordering="NONE"
|
|
||||||
# side="BOTH"
|
# A file name (in the root of the mod JAR) containing a logo for display
|
||||||
|
logoFile="logo.png"
|
||||||
|
|
||||||
|
# A text field displayed in the mod UI
|
||||||
|
#credits="Thanks for this example mod goes to Java" #optional
|
||||||
|
|
||||||
|
# A text field displayed in the mod UI
|
||||||
|
authors="TeamAppliedEnergistics" #optional
|
||||||
|
|
||||||
|
# A list of mods - how many allowed here is determined by the individual mod loader
|
||||||
|
[[mods]] #mandatory
|
||||||
|
|
||||||
|
# The modid of the mod
|
||||||
|
modId="appliedenergistics2" #mandatory
|
||||||
|
|
||||||
|
# The version number of the mod
|
||||||
|
version="${file.jarVersion}" #mandatory
|
||||||
|
|
||||||
|
# A display name for the mod
|
||||||
|
displayName="Applied Energistics 2" #mandatory
|
||||||
|
|
||||||
|
# The description text for the mod (multi line!) (#mandatory)
|
||||||
|
description='''
|
||||||
|
A Mod about Matter, Energy and using them to conquer the world..
|
||||||
|
'''
|
||||||
|
|
||||||
|
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
||||||
|
[[dependencies.jei]]
|
||||||
|
modId="forge" #mandatory
|
||||||
|
mandatory=true #mandatory
|
||||||
|
versionRange="[31.0.0,)" #mandatory
|
||||||
|
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
||||||
|
ordering="NONE"
|
||||||
|
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
||||||
|
side="BOTH"
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
|
|
||||||
# The overall format is standard TOML format, v0.5.0.
|
|
||||||
# Note that there are a couple of TOML lists in this file.
|
|
||||||
# Find more information on toml format here: https://github.com/toml-lang/toml
|
|
||||||
|
|
||||||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
|
|
||||||
modLoader="javafml" #mandatory
|
|
||||||
|
|
||||||
# A version range to match for said mod loader - for regular FML @Mod it will be the minecraft version (without the 1.)
|
|
||||||
loaderVersion="[31,)" #mandatory
|
|
||||||
|
|
||||||
# A URL to query for updates for this mod. See the JSON update specification <here>
|
|
||||||
#updateJSONURL="" #optional
|
|
||||||
|
|
||||||
# A URL to refer people to when problems occur with this mod
|
|
||||||
issueTrackerURL="https://github.com/AppliedEnergistics/Applied-Energistics-2/issues" #optional
|
|
||||||
|
|
||||||
# A URL for the "homepage" for this mod, displayed in the mod UI
|
|
||||||
displayURL="https://github.com/AppliedEnergistics/Applied-Energistics-2" #optional
|
|
||||||
|
|
||||||
# A file name (in the root of the mod JAR) containing a logo for display
|
|
||||||
#logoFile="examplemod.png" #optional
|
|
||||||
|
|
||||||
# A text field displayed in the mod UI
|
|
||||||
#credits="Thanks for this example mod goes to Java" #optional
|
|
||||||
|
|
||||||
# A text field displayed in the mod UI
|
|
||||||
authors="TeamAppliedEnergistics" #optional
|
|
||||||
|
|
||||||
# A list of mods - how many allowed here is determined by the individual mod loader
|
|
||||||
[[mods]] #mandatory
|
|
||||||
|
|
||||||
# The modid of the mod
|
|
||||||
modId="appliedenergistics2" #mandatory
|
|
||||||
|
|
||||||
# The version number of the mod
|
|
||||||
version="${file.jarVersion}" #mandatory
|
|
||||||
|
|
||||||
# A display name for the mod
|
|
||||||
displayName="Applied Energistics 2" #mandatory
|
|
||||||
|
|
||||||
# The description text for the mod (multi line!) (#mandatory)
|
|
||||||
description='''
|
|
||||||
A Mod about Matter, Energy and using them to conquer the world..
|
|
||||||
'''
|
|
||||||
|
|
||||||
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
|
|
||||||
[[dependencies.jei]]
|
|
||||||
modId="forge" #mandatory
|
|
||||||
mandatory=true #mandatory
|
|
||||||
versionRange="[31.0.0,)" #mandatory
|
|
||||||
# An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
|
|
||||||
ordering="NONE"
|
|
||||||
# Side this dependency is applied on - BOTH, CLIENT or SERVER
|
|
||||||
side="BOTH"
|
|
||||||
|
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 229 KiB |
@@ -1,17 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"modid":"appliedenergistics2",
|
|
||||||
"name":"Applied Energistics 2",
|
|
||||||
"description":"A Mod about Matter, Energy and using them to conquer the world..",
|
|
||||||
"version":"${version}",
|
|
||||||
"mcversion":"${mcversion}",
|
|
||||||
"url":"http://ae2.ae-mod.info",
|
|
||||||
"updateUrl":"",
|
|
||||||
"authorList":[
|
|
||||||
"AlgorithmX2"
|
|
||||||
],
|
|
||||||
"credits":"AlgorithmX2",
|
|
||||||
"logoFile":"assets/appliedenergistics2/meta/logo.png",
|
|
||||||
"screenshots":[]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
Reference in New Issue
Block a user