More TMP commits
This commit is contained in:
parent
6c60b4562b
commit
d3508e42fe
|
@ -70,20 +70,12 @@ repositories {
|
|||
|
||||
dependencies {
|
||||
deobfCompile 'net.industrial-craft:industrialcraft-2:2.8.+'
|
||||
<<<<<<< HEAD
|
||||
deobfCompile "blusunrize:ImmersiveEngineering:0.12-+:deobf"
|
||||
=======
|
||||
//TODO readd when the wirechanges are on master deobfCompile "blusunrize:ImmersiveEngineering:0.12-+:deobf"
|
||||
>>>>>>> MC1.12
|
||||
compileOnly "TechReborn:TechReborn-1.12:2.6.+:dev"
|
||||
compileOnly "RebornCore:RebornCore-1.12:3.2.+:dev"
|
||||
deobfCompile 'com.elytradev:mirage:2.0.1-SNAPSHOT'
|
||||
compileOnly "mezz.jei:jei_1.12:4.+"
|
||||
<<<<<<< HEAD
|
||||
compileOnly "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.0.10.306"
|
||||
=======
|
||||
compileOnly "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.+"
|
||||
>>>>>>> MC1.12
|
||||
}
|
||||
|
||||
jar {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
package malte0811.industrialWires;
|
||||
|
||||
import blusunrize.immersiveengineering.common.Config.IEConfig;
|
||||
import net.minecraftforge.common.config.Config;
|
||||
import net.minecraftforge.common.config.Config.Comment;
|
||||
|
||||
|
@ -54,6 +55,9 @@ public class IWConfig {
|
|||
public static int maxKinToRot = 600;
|
||||
@Comment({"The efficiency of the conversion from IC2 kinetic energy to IE rotational energy"})
|
||||
public static double kinToRotEfficiency = .8;
|
||||
@Comment({"The conversion factor between Joules (the SI unit) and RF. Used for the Marx generator and the rotary converters"})
|
||||
//Default value assumes the IE diesel generator is 2000kW
|
||||
public static double joulesPerRF = 2000e3/(20*IEConfig.Machines.dieselGen_output);
|
||||
}
|
||||
|
||||
public static HVStuff hv;
|
||||
|
|
|
@ -18,9 +18,11 @@
|
|||
|
||||
package malte0811.industrialWires.blocks;
|
||||
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IDirectionalTile;
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IGeneralMultiblock;
|
||||
import malte0811.industrialWires.util.MiscUtils;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -34,7 +36,8 @@ import javax.annotation.Nonnull;
|
|||
import javax.annotation.Nullable;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
public abstract class TileEntityIWMultiblock extends TileEntityIWBase implements IGeneralMultiblock {
|
||||
public abstract class TileEntityIWMultiblock extends TileEntityIWBase implements IGeneralMultiblock,
|
||||
IDirectionalTile {
|
||||
protected final static String OFFSET = "offset";
|
||||
protected final static String FORMED = "formed";
|
||||
protected final static String MIRRORED = "mirrored";
|
||||
|
@ -136,4 +139,36 @@ public abstract class TileEntityIWMultiblock extends TileEntityIWBase implements
|
|||
protected int dot(Vec3i a, Vec3i b) {
|
||||
return a.getX()*b.getX()+a.getY()*b.getY()+a.getZ()*b.getZ();
|
||||
}
|
||||
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public EnumFacing getFacing() {
|
||||
return facing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFacing(@Nonnull EnumFacing facing) {
|
||||
this.facing = facing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFacingLimitation() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mirrorFacingOnPlacement(@Nonnull EntityLivingBase placer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHammerRotate(@Nonnull EnumFacing side, float hitX, float hitY, float hitZ, @Nonnull EntityLivingBase entity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRotate(@Nonnull EnumFacing axis) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import malte0811.industrialWires.converter.MechMBPart;
|
|||
import malte0811.industrialWires.network.MessageTileSyncIW;
|
||||
import malte0811.industrialWires.util.MiscUtils;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
|
@ -28,8 +29,8 @@ import static malte0811.industrialWires.util.NBTKeys.SPEED;
|
|||
|
||||
public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implements ITickable, ISyncReceiver {
|
||||
private static final double DECAY_BASE = .99;
|
||||
public static final double TICK_ANGLE_PER_SPEED = 180/1e3;
|
||||
private static final double SYNC_THRESHOLD = .999;
|
||||
public static final double TICK_ANGLE_PER_SPEED = 180/20/Math.PI;
|
||||
private static final double SYNC_THRESHOLD = 1-1e-9;
|
||||
public MechMBPart[] mechanical;
|
||||
public MechEnergy energyState;
|
||||
private double lastSyncedSpeed = 0;
|
||||
|
@ -103,6 +104,7 @@ public class TileEntityMultiblockConverter extends TileEntityIWMultiblock implem
|
|||
}
|
||||
|
||||
public void setMechanical(MechMBPart[] mech, double speed) {
|
||||
Minecraft.getMinecraft().mouseHelper.ungrabMouseCursor();
|
||||
mechanical = mech;
|
||||
double weight = 0;
|
||||
for (int i = 0; i < mech.length; i++) {
|
||||
|
|
|
@ -93,7 +93,6 @@ public class BlockHVMultiblocks extends BlockIWMultiblock implements IMetaEnum {
|
|||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof TileEntityMarx) {
|
||||
ret = ret.withProperty(IWProperties.MARX_TYPE, ((TileEntityMarx) te).type);
|
||||
ret = ret.withProperty(IEProperties.FACING_HORIZONTAL, ((TileEntityMarx)te).facing);
|
||||
ret = ret.withProperty(IEProperties.BOOLEANS[0], ((TileEntityMarx)te).mirrored);
|
||||
}
|
||||
return ret;
|
||||
|
|
|
@ -34,11 +34,13 @@ public enum Material {
|
|||
ELECTRUM((SILVER.density + GOLD.density) / 2, 1e3),
|
||||
STEEL(7.874, 1e4),
|
||||
IRON(7.874, 1e3);
|
||||
//in kg/m^3
|
||||
public double density;
|
||||
public double maxSpeed;
|
||||
|
||||
//density as parameter: g/cm^3
|
||||
Material(double density, double maxSpeed) {
|
||||
this.density = density;
|
||||
this.density = density*1e3;
|
||||
this.maxSpeed = maxSpeed;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import net.minecraft.util.ResourceLocation;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class MechPartFlywheel extends MechMBPart {
|
||||
private static final double VOLUME = 7e6;//~7 cubic meters
|
||||
private static final double VOLUME = 7;//~7 cubic meters
|
||||
private Material material;
|
||||
//A flywheel simply adds mass (lots of mass!), it doesn't actively change speeds/energy
|
||||
@Override
|
||||
|
@ -39,7 +39,7 @@ public class MechPartFlywheel extends MechMBPart {
|
|||
|
||||
@Override
|
||||
public double getWeight() {
|
||||
return material.density*VOLUME;
|
||||
return .5*material.density*VOLUME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,6 +19,7 @@ import blusunrize.immersiveengineering.common.IEContent;
|
|||
import blusunrize.immersiveengineering.common.blocks.metal.BlockTypes_MetalDecoration0;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.converter.MechanicalMBBlockType;
|
||||
import malte0811.industrialWires.util.ConversionUtil;
|
||||
import malte0811.industrialWires.util.LocalSidedWorld;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
@ -52,7 +53,8 @@ public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
|
|||
|
||||
@Override
|
||||
public void produceRotation(MechEnergy e) {
|
||||
e.addEnergy(1e11);
|
||||
double rf = 4e3;
|
||||
e.addEnergy(rf* ConversionUtil.joulesPerIf());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,7 +69,7 @@ public class MechPartSingleCoil extends MechMBPart implements IMBPartElectric {
|
|||
|
||||
@Override
|
||||
public double getWeight() {
|
||||
return Material.IRON.density*1e6+Material.COPPER.density*1e5;
|
||||
return Material.IRON.density+Material.COPPER.density;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ConversionUtil {
|
|||
}
|
||||
|
||||
public static double euPerKin() {
|
||||
return 1 / euPerKin();
|
||||
return 1 / kinPerEu();
|
||||
}
|
||||
|
||||
public static double kinPerEu() {
|
||||
|
@ -55,4 +55,12 @@ public class ConversionUtil {
|
|||
public static double rotPerKin() {
|
||||
return 1 / kinPerRot();
|
||||
}
|
||||
|
||||
public static double joulesPerIf() {
|
||||
return MechConversion.joulesPerRF;
|
||||
}
|
||||
|
||||
public static double ifPerJoule() {
|
||||
return 1/joulesPerIf();
|
||||
}
|
||||
}
|
|
@ -29,16 +29,16 @@
|
|||
"facing":
|
||||
{
|
||||
"north": { "transform": {
|
||||
"rotation": {"y": 0 }
|
||||
}},
|
||||
"south": { "transform": {
|
||||
"rotation": {"y": 180 }
|
||||
}},
|
||||
"south": { "transform": {
|
||||
"rotation": {"y": 0 }
|
||||
}},
|
||||
"west": { "transform": {
|
||||
"rotation": {"y": 90 }
|
||||
"rotation": {"y": -90 }
|
||||
}},
|
||||
"east": { "transform": {
|
||||
"rotation": {"y": -90 }
|
||||
"rotation": {"y": 90 }
|
||||
}}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue