mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Added config options for TelePad
This commit is contained in:
1 parent
da3b08abad
commit
69c930eea4
2 files changed
+33
-26
No files matched your search
@@ -116,7 +116,7 @@ public final class Config {
|
||||
public static boolean useSneakMouseWheelYetaWrench = true;
|
||||
public static boolean useSneakRightClickYetaWrench = false;
|
||||
public static int yetaWrenchOverlayMode = 0;
|
||||
|
||||
|
||||
public static boolean itemConduitUsePhyscialDistance = false;
|
||||
|
||||
public static int enderFluidConduitExtractRate = 200;
|
||||
@@ -333,7 +333,7 @@ public final class Config {
|
||||
public static boolean magnetAllowInBaublesSlot = true;
|
||||
public static boolean magnetAllowDeactivatedInBaublesSlot = false;
|
||||
public static String magnetBaublesType = "AMULET";
|
||||
|
||||
|
||||
public static boolean useCombustionGenModel = false;
|
||||
|
||||
public static int crafterRfPerCraft = 2500;
|
||||
@@ -493,6 +493,8 @@ public final class Config {
|
||||
public static boolean telepadLockCoords = true;
|
||||
public static int telepadPowerCoefficient = 100000;
|
||||
public static int telepadPowerInterdimensional = 100000;
|
||||
public static int telepadPowerPerTickRF = 1000;
|
||||
public static int telepadPowerStorageRF = 100000;
|
||||
|
||||
public static boolean inventoryPanelFree = false;;
|
||||
public static float inventoryPanelPowerPerMB = 800.0f;
|
||||
@@ -500,7 +502,7 @@ public final class Config {
|
||||
public static float inventoryPanelExtractCostPerItem = 12.0f;
|
||||
public static float inventoryPanelExtractCostPerOperation = 32.0f;
|
||||
|
||||
|
||||
|
||||
public static void load(FMLPreInitializationEvent event) {
|
||||
PacketHandler.INSTANCE.registerMessage(PacketConfigSync.class, PacketConfigSync.class, PacketHandler.nextID(), Side.CLIENT);
|
||||
|
||||
@@ -1092,7 +1094,7 @@ public final class Config {
|
||||
"The amount of saplings the farm has to have in reserve to switch to shearing all leaves. If there are less " +
|
||||
"saplings in store, it will only shear part the leaves and break the others for spalings. Set this to 0 to " +
|
||||
"always shear all leaves.").getInt(farmSaplingReserveAmount);
|
||||
|
||||
|
||||
combustionGeneratorUseOpaqueModel = config.get(sectionAesthetic.name, "combustionGeneratorUseOpaqueModel", combustionGeneratorUseOpaqueModel,
|
||||
"If set to true: fluid will not be shown in combustion generator tanks. Improves FPS. ").getBoolean(combustionGeneratorUseOpaqueModel);
|
||||
|
||||
@@ -1110,15 +1112,15 @@ public final class Config {
|
||||
|
||||
magnetAllowInMainInventory = config.get(sectionMagnet.name, "magnetAllowInMainInventory", magnetAllowInMainInventory,
|
||||
"If true the magnet will also work in the main inventory, not just the hotbar").getBoolean(magnetAllowInMainInventory);
|
||||
|
||||
|
||||
magnetAllowInBaublesSlot = config.get(sectionMagnet.name, "magnetAllowInBaublesSlot", magnetAllowInBaublesSlot,
|
||||
"If true the magnet can be put into the 'amulet' Baubles slot (requires Baubles to be installed)").getBoolean(magnetAllowInBaublesSlot);
|
||||
magnetAllowDeactivatedInBaublesSlot = config.get(sectionMagnet.name, "magnetAllowDeactivatedInBaublesSlot", magnetAllowDeactivatedInBaublesSlot,
|
||||
"If true the magnet can be put into the 'amulet' Baubles slot even if switched off (requires Baubles to be installed and magnetAllowInBaublesSlot to be on)").getBoolean(magnetAllowDeactivatedInBaublesSlot);
|
||||
|
||||
|
||||
magnetBaublesType = config.get(sectionMagnet.name, "magnetBaublesType", magnetBaublesType,
|
||||
"The BaublesType the magnet should be, 'AMULET', 'RING' or 'BELT' (requires Baubles to be installed and magnetAllowInBaublesSlot to be on)").getString();
|
||||
|
||||
|
||||
useCombustionGenModel = config.get(sectionAesthetic.name, "useCombustionGenModel", useCombustionGenModel,
|
||||
"If set to true: WIP Combustion Generator model will be used").getBoolean(useCombustionGenModel);
|
||||
|
||||
@@ -1198,7 +1200,7 @@ public final class Config {
|
||||
"Allows OC conduits. Only has an effect with OpenComputers installed.");
|
||||
enableOCConduitsAnimatedTexture = config.getBoolean("enableOCConduitsAnimatedTexture", sectionItems.name,
|
||||
enableOCConduitsAnimatedTexture, "Use the animated texture for OC conduits.");
|
||||
|
||||
|
||||
soulVesselBlackList = config.getStringList("soulVesselBlackList", sectionSoulBinder.name, soulVesselBlackList,
|
||||
"Entities listed here will can not be captured in a Soul Vial");
|
||||
|
||||
@@ -1338,6 +1340,10 @@ public final class Config {
|
||||
"Power for a teleport is calculated by the formula:\npower = [this value] * ln(0.005*distance + 1)").getInt();
|
||||
telepadPowerInterdimensional = config.get(sectionTelepad.name, "powerInterdimensional", telepadPowerInterdimensional,
|
||||
"The amount of RF required for an interdimensional teleport.").getInt();
|
||||
telepadPowerPerTickRF = config.get(sectionTelepad.name, "telepadPowerPerTickRF", telepadPowerPerTickRF,
|
||||
"The number of RF/t consumed by a telepad.").getInt();
|
||||
telepadPowerStorageRF = config.get(sectionTelepad.name, "telepadPowerStorageRF", telepadPowerStorageRF,
|
||||
"The amount of RF a telepad can store.").getInt();
|
||||
|
||||
inventoryPanelFree = config.getBoolean("inventoryPanelFree", sectionInventoryPanel.name, inventoryPanelFree, "If true, the inv panel will not accept fluids and will be active permanently.");
|
||||
inventoryPanelPowerPerMB = config.getFloat("powerPerMB", sectionInventoryPanel.name, inventoryPanelPowerPerMB, 1.0f, 10000.0f,
|
||||
|
||||
@@ -49,11 +49,12 @@ import crazypants.enderio.teleport.packet.PacketTravelEvent;
|
||||
import crazypants.enderio.teleport.telepad.PacketTeleport.Type;
|
||||
|
||||
public class TileTelePad extends TileTravelAnchor implements IInternalPowerReceiver, ITelePad, IProgressTile {
|
||||
|
||||
|
||||
private boolean inNetwork;
|
||||
private boolean isMaster;
|
||||
|
||||
private EnergyStorage energy = new EnergyStorage(100000, 1000, 1000);
|
||||
private EnergyStorage energy = new EnergyStorage(Config.telepadPowerStorageRF, Config.telepadPowerPerTickRF,
|
||||
Config.telepadPowerPerTickRF);
|
||||
|
||||
private TileTelePad master = null;
|
||||
|
||||
@@ -63,7 +64,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
|
||||
private BlockCoord target = new BlockCoord();
|
||||
private int targetDim = Integer.MIN_VALUE;
|
||||
|
||||
|
||||
private int lastSyncPowerStored;
|
||||
|
||||
private Queue<Entity> toTeleport = Queues.newArrayDeque();
|
||||
@@ -72,28 +73,28 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
|
||||
private static final ResourceLocation activeRes = AbstractMachineEntity.getSoundFor("telepad.active");
|
||||
private MachineSound activeSound = null;
|
||||
|
||||
|
||||
private boolean redstoneActivePrev;
|
||||
|
||||
|
||||
public static final String TELEPORTING_KEY = "eio:teleporting";
|
||||
public static final String PROGRESS_KEY = "teleportprogress";
|
||||
|
||||
|
||||
boolean wasBlocked = false;
|
||||
|
||||
|
||||
// Clientside rendering data
|
||||
public float[] bladeRots = new float[3];
|
||||
public float spinSpeed = 0;
|
||||
public float speedMult = 2.5f;
|
||||
|
||||
|
||||
@Override
|
||||
public void doUpdate() {
|
||||
super.doUpdate();
|
||||
|
||||
|
||||
// my master is gone!
|
||||
if(master != null && master.isInvalid()) {
|
||||
master.breakNetwork();
|
||||
}
|
||||
|
||||
|
||||
if(autoUpdate) {
|
||||
updateConnectedState(true);
|
||||
autoUpdate = false;
|
||||
@@ -102,7 +103,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
if(targetDim == Integer.MIN_VALUE) {
|
||||
targetDim = worldObj.provider.dimensionId;
|
||||
}
|
||||
|
||||
|
||||
if(worldObj.isRemote && isMaster()) {
|
||||
updateRotations();
|
||||
if(activeSound != null) {
|
||||
@@ -225,7 +226,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
|
||||
private boolean formNetwork() {
|
||||
List<TileTelePad> temp = Lists.newArrayList();
|
||||
|
||||
|
||||
for (BlockCoord c : getSurroundingCoords()) {
|
||||
TileEntity te = c.getTileEntity(worldObj);
|
||||
if (!(te instanceof TileTelePad) || ((TileTelePad)te).inNetwork()) {
|
||||
@@ -233,7 +234,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
}
|
||||
temp.add((TileTelePad) te);
|
||||
}
|
||||
|
||||
|
||||
for (TileTelePad te : temp) {
|
||||
te.master = this;
|
||||
te.inNetwork = true;
|
||||
@@ -320,7 +321,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
super.onDataPacket(net, pkt);
|
||||
// this.inNetwork = pkt.func_148857_g().getBoolean("inNetwork");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
@@ -328,7 +329,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
stopPlayingSound();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
super.onChunkUnload();
|
||||
@@ -389,7 +390,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
} else {
|
||||
spinSpeed = Math.max(0, spinSpeed - 0.025f);
|
||||
}
|
||||
|
||||
|
||||
for (int i = 0; i < bladeRots.length; i++) {
|
||||
bladeRots[i] += spinSpeed * ((i * 2) + 20);
|
||||
bladeRots[i] %= 360;
|
||||
@@ -402,7 +403,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
public float getProgress() {
|
||||
return ((float) powerUsed) / ((float) maxPower);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected int getProgressUpdateFreq() {
|
||||
return 1;
|
||||
@@ -458,7 +459,7 @@ public class TileTelePad extends TileTravelAnchor implements IInternalPowerRecei
|
||||
}
|
||||
return target.z;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getTargetDim() {
|
||||
if(inNetwork()) {
|
||||
|
||||
Reference in new issue
Block a user