Added a discharge meter, a device that can measure the energy in a Marx discharge
Also some experimental stuff for wire coils
This commit is contained in:
parent
534f844d0e
commit
ff3c391ac5
|
@ -34,7 +34,7 @@ minecraft {
|
|||
runDir = "run"
|
||||
|
||||
replace '${version}', project.version
|
||||
mappings = "snapshot_20170628"
|
||||
mappings = "snapshot_20171003"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
|
69
src/main/java/malte0811/industrialWires/EventHandler.java
Normal file
69
src/main/java/malte0811/industrialWires/EventHandler.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016-2017 malte0811
|
||||
* Industrial Wires is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Industrial Wires 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 General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package malte0811.industrialWires;
|
||||
|
||||
import malte0811.industrialWires.items.ItemIC2Coil;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
public class EventHandler {
|
||||
@SubscribeEvent
|
||||
public static void onItemPickup(EntityItemPickupEvent ev) {
|
||||
if (ev.getItem().getItem().getItem()==IndustrialWires.coil) {
|
||||
ItemStack stack = ev.getItem().getItem();
|
||||
InventoryPlayer playerInv = ev.getEntityPlayer().inventory;
|
||||
boolean changed = false;
|
||||
int lengthOnEntity = ItemIC2Coil.getLength(stack);
|
||||
IndustrialWires.logger.info(lengthOnEntity+", "+stack);
|
||||
final int lengthPerCoilOrig = lengthOnEntity/stack.getCount();
|
||||
for (int i = 0;i<playerInv.getSizeInventory();i++) {
|
||||
ItemStack inInv = playerInv.getStackInSlot(i);
|
||||
if (ItemStack.areItemsEqual(stack, inInv)) {
|
||||
int oldLength = ItemIC2Coil.getLength(inInv);
|
||||
int newLength = Math.min(oldLength+lengthOnEntity, ItemIC2Coil.getMaxWireLength(inInv));
|
||||
ItemIC2Coil.setLength(inInv, newLength);
|
||||
lengthOnEntity -= newLength-oldLength;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if (changed) {
|
||||
ev.getEntityPlayer().onItemPickup(ev.getItem(), 1);
|
||||
}
|
||||
if (lengthOnEntity==0) {
|
||||
ev.getItem().setDead();
|
||||
ev.setCanceled(true);
|
||||
} else if (stack.getCount()>1) {
|
||||
int coilsRemaining = lengthOnEntity/lengthPerCoilOrig;
|
||||
stack.setCount(coilsRemaining);
|
||||
int leftover = lengthOnEntity-lengthPerCoilOrig*coilsRemaining;
|
||||
if (leftover>0) {
|
||||
EntityItem old = ev.getItem();
|
||||
ItemStack leftoverItem = new ItemStack(stack.getItem(), 1, stack.getMetadata());
|
||||
ItemIC2Coil.setLength(leftoverItem, leftover);
|
||||
EntityItem newCoil = new EntityItem(old.world, old.posX, old.posY, old.posZ, leftoverItem);
|
||||
old.world.spawnEntity(newCoil);
|
||||
}
|
||||
} else if (stack.getCount()==1) {
|
||||
ItemIC2Coil.setLength(stack, lengthOnEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -25,10 +25,7 @@ import malte0811.industrialWires.blocks.converter.BlockMechanicalConverter;
|
|||
import malte0811.industrialWires.blocks.converter.TileEntityIEMotor;
|
||||
import malte0811.industrialWires.blocks.converter.TileEntityMechICtoIE;
|
||||
import malte0811.industrialWires.blocks.converter.TileEntityMechIEtoIC;
|
||||
import malte0811.industrialWires.blocks.hv.BlockHVMultiblocks;
|
||||
import malte0811.industrialWires.blocks.hv.BlockJacobsLadder;
|
||||
import malte0811.industrialWires.blocks.hv.TileEntityJacobsLadder;
|
||||
import malte0811.industrialWires.blocks.hv.TileEntityMarx;
|
||||
import malte0811.industrialWires.blocks.hv.*;
|
||||
import malte0811.industrialWires.blocks.wire.*;
|
||||
import malte0811.industrialWires.compat.Compat;
|
||||
import malte0811.industrialWires.controlpanel.PanelComponent;
|
||||
|
@ -89,6 +86,8 @@ public class IndustrialWires {
|
|||
public static BlockPanel panel = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+BlockHVMultiblocks.NAME)
|
||||
public static BlockHVMultiblocks hvMultiblocks = null;
|
||||
@GameRegistry.ObjectHolder(MODID+":"+ BlockGeneralHV.NAME)
|
||||
public static BlockGeneralHV generalHV = null;
|
||||
|
||||
@GameRegistry.ObjectHolder(MODID+":"+ItemIC2Coil.NAME)
|
||||
public static ItemIC2Coil coil = null;
|
||||
|
@ -161,6 +160,7 @@ public class IndustrialWires {
|
|||
GameRegistry.registerTileEntity(TileEntityPanelCreator.class, MODID + ":panel_creator");
|
||||
GameRegistry.registerTileEntity(TileEntityUnfinishedPanel.class, MODID + ":unfinished_panel");
|
||||
GameRegistry.registerTileEntity(TileEntityComponentPanel.class, MODID + ":single_component_panel");
|
||||
GameRegistry.registerTileEntity(TileEntityDischargeMeter.class, MODID + ":discharge_meter");
|
||||
|
||||
proxy.preInit();
|
||||
Compat.preInit();
|
||||
|
@ -179,6 +179,7 @@ public class IndustrialWires {
|
|||
event.getRegistry().register(new BlockJacobsLadder());
|
||||
event.getRegistry().register(new BlockPanel());
|
||||
event.getRegistry().register(new BlockHVMultiblocks());
|
||||
event.getRegistry().register(new BlockGeneralHV());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
package malte0811.industrialWires.blocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||
|
@ -62,6 +63,12 @@ public abstract class TileEntityIWBase extends TileEntity {
|
|||
readNBT(pkt.getNbtCompound(), true);
|
||||
}
|
||||
|
||||
public void triggerRenderUpdate() {
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
world.notifyBlockUpdate(pos, state, state, 3);
|
||||
world.addBlockEvent(pos, state.getBlock(), 255, 0);
|
||||
}
|
||||
|
||||
public abstract void writeNBT(NBTTagCompound out, boolean updatePacket);
|
||||
|
||||
public abstract void readNBT(NBTTagCompound in, boolean updatePacket);
|
||||
|
|
|
@ -285,12 +285,6 @@ public class TileEntityPanel extends TileEntityIWBase implements IDirectionalTil
|
|||
}
|
||||
}
|
||||
|
||||
public void triggerRenderUpdate() {
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
world.notifyBlockUpdate(pos, state, state, 3);
|
||||
world.addBlockEvent(pos, state.getBlock(), 255, 0);
|
||||
}
|
||||
|
||||
public void registerRS(TileEntityRSPanelConn te) {
|
||||
rsPorts.add(te);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016-2017 malte0811
|
||||
* Industrial Wires is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Industrial Wires 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 General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package malte0811.industrialWires.blocks.hv;
|
||||
|
||||
import blusunrize.immersiveengineering.api.IEProperties;
|
||||
import malte0811.industrialWires.blocks.BlockIWBase;
|
||||
import malte0811.industrialWires.blocks.IMetaEnum;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BlockGeneralHV extends BlockIWBase implements IMetaEnum {
|
||||
public static final PropertyEnum<BlockTypes_GeneralHV> PROPERTY = PropertyEnum.create("type",
|
||||
BlockTypes_GeneralHV.class);
|
||||
public static final String NAME = "general_hv";
|
||||
|
||||
public BlockGeneralHV() {
|
||||
super(Material.IRON, NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IProperty[] getProperties() {
|
||||
return new IProperty[] {
|
||||
IEProperties.BOOLEANS[0], PROPERTY, IEProperties.FACING_HORIZONTAL
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTopSolid(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullBlock(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getActualState(@Nonnull IBlockState state, IBlockAccess worldIn, BlockPos pos) {
|
||||
state = super.getActualState(state, worldIn, pos);
|
||||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof TileEntityDischargeMeter)
|
||||
state = state.withProperty(IEProperties.BOOLEANS[0], ((TileEntityDischargeMeter) te).hasWire);
|
||||
return state;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public TileEntity createTileEntity(@Nonnull World world, @Nonnull IBlockState state) {
|
||||
switch (state.getValue(PROPERTY)) {
|
||||
case DISCHARGE_METER:
|
||||
return new TileEntityDischargeMeter();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockTypes_GeneralHV[] getValues() {
|
||||
return BlockTypes_GeneralHV.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return state.getValue(PROPERTY).ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState().withProperty(PROPERTY, getValues()[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -155,15 +155,6 @@ public class BlockJacobsLadder extends BlockIWBase implements IMetaEnum, IPlacem
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof TileEntityJacobsLadder) {
|
||||
return ((TileEntityJacobsLadder) te).onActivated(playerIn, hand);
|
||||
}
|
||||
return super.onBlockActivated(worldIn, pos, state, playerIn, hand, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World w, BlockPos pos, ItemStack stack) {
|
||||
int dummyCount = LadderSize.values()[stack.getMetadata()].dummyCount;
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016-2017 malte0811
|
||||
* Industrial Wires is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Industrial Wires 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 General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package malte0811.industrialWires.blocks.hv;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public enum BlockTypes_GeneralHV implements IStringSerializable{
|
||||
DISCHARGE_METER;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016-2017 malte0811
|
||||
* Industrial Wires is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Industrial Wires 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 General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package malte0811.industrialWires.blocks.hv;
|
||||
|
||||
import blusunrize.immersiveengineering.api.ApiUtils;
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IDirectionalTile;
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IPlayerInteraction;
|
||||
import blusunrize.immersiveengineering.common.util.chickenbones.Matrix4;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.IBlockBoundsIW;
|
||||
import malte0811.industrialWires.blocks.TileEntityIWBase;
|
||||
import malte0811.industrialWires.hv.IMarxTarget;
|
||||
import malte0811.industrialWires.util.MiscUtils;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class TileEntityDischargeMeter extends TileEntityIWBase implements IPlayerInteraction, IMarxTarget,
|
||||
IBlockBoundsIW, IDirectionalTile {
|
||||
private static final String HAS_WIRE = "hasWire";
|
||||
private static final String FACING = "facing";
|
||||
private static final String LAST_DISCHARGE = "last";
|
||||
boolean hasWire;
|
||||
EnumFacing facing = EnumFacing.NORTH;
|
||||
double lastDischarge = -1;
|
||||
|
||||
@Override
|
||||
public void writeNBT(NBTTagCompound out, boolean updatePacket) {
|
||||
out.setByte(FACING, (byte) facing.getHorizontalIndex());
|
||||
out.setBoolean(HAS_WIRE, hasWire);
|
||||
out.setDouble(LAST_DISCHARGE, lastDischarge);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readNBT(NBTTagCompound in, boolean updatePacket) {
|
||||
hasWire = in.getBoolean(HAS_WIRE);
|
||||
facing = EnumFacing.getHorizontal(in.getByte(FACING));
|
||||
lastDischarge = in.getDouble(LAST_DISCHARGE);
|
||||
aabb = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean interact(@Nonnull EnumFacing side, @Nonnull EntityPlayer player, @Nonnull EnumHand hand,
|
||||
@Nonnull ItemStack heldItem, float hitX, float hitY, float hitZ) {
|
||||
if (!world.isRemote) {
|
||||
if (hasWire)
|
||||
return false;
|
||||
if (ApiUtils.compareToOreName(heldItem, "wireAluminum")) {
|
||||
hasWire = true;
|
||||
heldItem.shrink(1);
|
||||
triggerRenderUpdate();
|
||||
} else if (lastDischarge > 0) {
|
||||
player.sendMessage(new TextComponentTranslation(IndustrialWires.MODID + ".chat.marxEnergy",
|
||||
String.format("%.1f", lastDischarge/1e3)));
|
||||
lastDischarge = -1;
|
||||
}
|
||||
markDirty();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onHit(double energy, TileEntityMarx master) {
|
||||
if (hasWire) {
|
||||
hasWire = false;
|
||||
lastDischarge = energy;
|
||||
triggerRenderUpdate();
|
||||
markDirty();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
AxisAlignedBB aabb = null;
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox() {
|
||||
//if (aabb==null)
|
||||
{
|
||||
Matrix4 mat = new Matrix4();
|
||||
mat.translate(.5, 0, .5);
|
||||
mat.rotate((-facing.getHorizontalAngle()+180)*Math.PI/180, 0, 1, 0);
|
||||
mat.translate(-.5, 0, -.5);
|
||||
aabb = MiscUtils.apply(mat, new AxisAlignedBB(1F/16, 0, 5F/16,
|
||||
10F/16, (hasWire?15F:14F)/16, 11F/16));
|
||||
}
|
||||
return aabb;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
package malte0811.industrialWires.blocks.hv;
|
||||
|
||||
import blusunrize.immersiveengineering.api.ApiUtils;
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces;
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces.IDirectionalTile;
|
||||
import blusunrize.immersiveengineering.common.blocks.TileEntityIEBase;
|
||||
import com.elytradev.mirage.lighting.IColoredLight;
|
||||
|
@ -73,18 +74,18 @@ import static malte0811.industrialWires.util.MiscUtils.interpolate;
|
|||
@Optional.Interface(modid = "mirage", iface = "com.elytradev.mirage.lighting.IColoredLight")
|
||||
})
|
||||
public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickable, IHasDummyBlocksIW, ISyncReceiver,
|
||||
IEnergySink, IBlockBoundsIW, IDirectionalTile, IColoredLight {
|
||||
IEnergySink, IBlockBoundsIW, IDirectionalTile, IColoredLight, IEBlockInterfaces.IPlayerInteraction {
|
||||
public EnumFacing facing = EnumFacing.NORTH;
|
||||
private DualEnergyStorage energy;
|
||||
public LadderSize size;
|
||||
|
||||
public Vec3d[] controls;
|
||||
//first and last move along the "rails", only the middle points move in bezier curves
|
||||
public Vec3d[][] controlControls;
|
||||
private Vec3d[][] controlControls;
|
||||
// movement of the controls in blocks/tick
|
||||
public Vec3d[] controlMovement;
|
||||
private double t = 0;
|
||||
public int dummy = 0;
|
||||
private int dummy = 0;
|
||||
public int timeTillActive = -1;
|
||||
private double tStep = 0;
|
||||
private double consumtionEU;
|
||||
|
@ -93,7 +94,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
private Vec3d soundPos;
|
||||
public double salt;
|
||||
|
||||
public TileEntityJacobsLadder(LadderSize s) {
|
||||
TileEntityJacobsLadder(LadderSize s) {
|
||||
size = s;
|
||||
initControl();
|
||||
}
|
||||
|
@ -334,7 +335,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
private boolean isActive() {
|
||||
if (isDummy()) {
|
||||
TileEntity master = world.getTileEntity(pos.down(dummy));
|
||||
return master instanceof TileEntityJacobsLadder && ((TileEntityJacobsLadder) master).isActive();
|
||||
|
@ -355,8 +356,9 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
e.attackEntityFrom(IWDamageSources.dmg_jacobs, IWConfig.HVStuff.jacobsBaseDmg * (size.ordinal() + 1));
|
||||
}
|
||||
|
||||
public boolean onActivated(EntityPlayer player, EnumHand hand) {
|
||||
ItemStack heldItem = player.getHeldItem(hand);
|
||||
@Override
|
||||
public boolean interact(@Nonnull EnumFacing side, @Nonnull EntityPlayer player,@Nonnull EnumHand hand,
|
||||
@Nonnull ItemStack heldItem, float hitX, float hitY, float hitZ) {
|
||||
TileEntity masterTE = dummy == 0 ? this : world.getTileEntity(pos.down(dummy));
|
||||
if (masterTE instanceof TileEntityJacobsLadder) {
|
||||
TileEntityJacobsLadder master = (TileEntityJacobsLadder) masterTE;
|
||||
|
@ -545,8 +547,8 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
return false;
|
||||
}
|
||||
|
||||
public static final float[] saltColor = {1, 190 / 255F, 50 / 255F};
|
||||
public static final float[] airColor = {1, .85F, 1};
|
||||
private static final float[] saltColor = {1, 190 / 255F, 50 / 255F};
|
||||
private static final float[] airColor = {1, .85F, 1};
|
||||
|
||||
private static final int factor = 20;
|
||||
private static final double smallMin = Math.exp(-.5);
|
||||
|
|
|
@ -38,6 +38,7 @@ import malte0811.industrialWires.blocks.IBlockBoundsIW;
|
|||
import malte0811.industrialWires.blocks.ISyncReceiver;
|
||||
import malte0811.industrialWires.blocks.IWProperties;
|
||||
import malte0811.industrialWires.blocks.TileEntityIWMultiblock;
|
||||
import malte0811.industrialWires.hv.IMarxTarget;
|
||||
import malte0811.industrialWires.hv.MarxOreHandler;
|
||||
import malte0811.industrialWires.network.MessageTileSyncIW;
|
||||
import malte0811.industrialWires.util.DualEnergyStorage;
|
||||
|
@ -55,6 +56,7 @@ import net.minecraft.nbt.NBTTagDouble;
|
|||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
@ -286,7 +288,6 @@ public class TileEntityMarx extends TileEntityIWMultiblock implements ITickable,
|
|||
|
||||
private void handleOreProcessing(double energyStored) {
|
||||
BlockPos bottom = getBottomElectrode();
|
||||
Vec3d origin = new Vec3d(bottom).addVector(.5, 1, .5);
|
||||
Set<BlockPos> toBreak = new HashSet<>(stageCount-2);
|
||||
int ores = 0;
|
||||
for (int i = 1;i<stageCount-1;i++) {
|
||||
|
@ -304,6 +305,12 @@ public class TileEntityMarx extends TileEntityIWMultiblock implements ITickable,
|
|||
continue;
|
||||
}
|
||||
if (!world.isAirBlock(here)) {
|
||||
TileEntity te = world.getTileEntity(here);
|
||||
if (te instanceof IMarxTarget) {
|
||||
if (((IMarxTarget) te).onHit(energyPerOre, this)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
ItemStack[] out = MarxOreHandler.getYield(world, here, energyPerOre);
|
||||
for (ItemStack stack : out) {
|
||||
EntityItem item = new EntityItem(world, here.getX() + .5, here.getY() + .5, here.getZ() + .5, stack);
|
||||
|
|
|
@ -108,8 +108,9 @@ public class RecipeComponentCopy extends IForgeRegistryEntry.Impl<IRecipe> imple
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isHidden() {
|
||||
public boolean isDynamic() {
|
||||
return true;
|
||||
}
|
||||
}
|
26
src/main/java/malte0811/industrialWires/hv/IMarxTarget.java
Normal file
26
src/main/java/malte0811/industrialWires/hv/IMarxTarget.java
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016-2017 malte0811
|
||||
* Industrial Wires is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Industrial Wires 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 General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Industrial Wires. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package malte0811.industrialWires.hv;
|
||||
|
||||
import malte0811.industrialWires.blocks.hv.TileEntityMarx;
|
||||
|
||||
public interface IMarxTarget {
|
||||
/**
|
||||
* called when the block with this TE is hit by a Marx discharge.
|
||||
* Return true to prevent the block from being destroyed.
|
||||
*/
|
||||
boolean onHit(double energy, TileEntityMarx master);
|
||||
}
|
|
@ -27,7 +27,6 @@ import blusunrize.immersiveengineering.api.energy.wires.WireType;
|
|||
import blusunrize.immersiveengineering.common.IESaveData;
|
||||
import blusunrize.immersiveengineering.common.util.ItemNBTHelper;
|
||||
import blusunrize.immersiveengineering.common.util.Utils;
|
||||
import ic2.api.item.IC2Items;
|
||||
import malte0811.industrialWires.IWConfig;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.wires.IC2Wiretype;
|
||||
|
@ -61,7 +60,7 @@ public class ItemIC2Coil extends Item implements IWireCoil {
|
|||
setUnlocalizedName(IndustrialWires.MODID + "."+NAME);
|
||||
setHasSubtypes(true);
|
||||
this.setCreativeTab(IndustrialWires.creativeTab);
|
||||
setMaxStackSize(64);
|
||||
setMaxStackSize(1);
|
||||
setRegistryName(new ResourceLocation(IndustrialWires.MODID, NAME));
|
||||
IndustrialWires.items.add(this);
|
||||
}
|
||||
|
@ -223,7 +222,7 @@ public class ItemIC2Coil extends Item implements IWireCoil {
|
|||
if (i.getTagCompound() == null) {
|
||||
setLength(i, 4);
|
||||
}
|
||||
return i.getTagCompound().getInteger(lengthKey);
|
||||
return i.getTagCompound().getInteger(lengthKey)*i.getCount();
|
||||
}
|
||||
|
||||
public static int getMaxWireLength(ItemStack i) {
|
||||
|
|
|
@ -29,12 +29,12 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class IC2Wiretype extends WireType {
|
||||
final int type;
|
||||
final int[] ic2Rates = {32 * 8, 128 * 8, 512 * 8, 2048 * 8, 8192 * 8};
|
||||
final int[] ic2Colors = {0xa5bcc7, 0xbc7945, 0xfeff73, 0xb9d6d9, 0xf1f1f1};
|
||||
final String[] ic2Names = {"ic2Tin", "ic2Copper", "ic2Gold", "ic2Hv", "ic2Glass"};
|
||||
final double[] lossPerBlock = {.2, .2, .4, .8, .025};
|
||||
final double[] ic2RenderDiameter = {.03125, .03125, .046875, .0625, .75 * .03125};
|
||||
private final int type;
|
||||
private final int[] ic2Rates = {32 * 8, 128 * 8, 512 * 8, 2048 * 8, 8192 * 8};
|
||||
private final int[] ic2Colors = {0xa5bcc7, 0xbc7945, 0xfeff73, 0xb9d6d9, 0xf1f1f1};
|
||||
private final String[] ic2Names = {"ic2Tin", "ic2Copper", "ic2Gold", "ic2Hv", "ic2Glass"};
|
||||
private final double[] lossPerBlock = {.2, .2, .4, .8, .025};
|
||||
private final double[] ic2RenderDiameter = {.03125, .03125, .046875, .0625, .75 * .03125};
|
||||
public static final IC2Wiretype[] IC2_TYPES = {new IC2Wiretype(0), new IC2Wiretype(1), new IC2Wiretype(2), new IC2Wiretype(3), new IC2Wiretype(4)};
|
||||
|
||||
public IC2Wiretype(int ordinal) {
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"transform": "forge:default-block",
|
||||
"textures": {
|
||||
|
||||
},
|
||||
"custom": {
|
||||
"flip-v": true
|
||||
}
|
||||
},
|
||||
"variants": {
|
||||
"inventory,type=discharge_meter": [
|
||||
{
|
||||
"model": "industrialwires:discharge_meter.obj",
|
||||
"transform": {
|
||||
"scale": [ 0.5, 0.5, 0.5 ],
|
||||
"firstperson_righthand": { "translation": [ 0, 0.25, 0.125 ]},
|
||||
"firstperson_lefthand": { "translation": [ 0, 0.25, 0.125 ]},
|
||||
"thirdperson_righthand": { "translation": [ -0.0625, 0.125, 0.1875 ], "rotation": [{ "x": 70 }, { "y": 70 }]},
|
||||
"thirdperson_lefthand": { "translation": [ -0.0625, 0.125, 0.1875 ], "rotation": [{ "x": 70 }, { "y": 70 }]},
|
||||
"fixed": {"scale": [ 2,2,2 ], "translation": [ 0, 0, 0 ], "rotation": [{ "y": -90 }]},
|
||||
"gui": { "translation": [ 0, 0.125, 0 ], "rotation": [{ "x": 30 },{ "y": 135 },{ "z": 0 }], "scale": [ 1.5, 1.5, 1.5 ] }
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"discharge_meter": {
|
||||
"model": "industrialwires:discharge_meter.obj"
|
||||
}
|
||||
},
|
||||
"boolean0":
|
||||
{
|
||||
"false":{},
|
||||
"true":{
|
||||
"model": "industrialwires:discharge_meter_wire.obj"
|
||||
}
|
||||
},
|
||||
"facing":
|
||||
{
|
||||
"north": { "transform": {
|
||||
"rotation": {"y": 0 }
|
||||
}},
|
||||
"south": { "transform": {
|
||||
"rotation": {"y": 180 }
|
||||
}},
|
||||
"west": { "transform": {
|
||||
"rotation": {"y": 90 }
|
||||
}},
|
||||
"east": { "transform": {
|
||||
"rotation": {"y": -90 }
|
||||
}}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -101,6 +101,7 @@ industrialwires.tooltip.input_rate=%s EU/t per connector
|
|||
|
||||
industrialwires.chat.tooLong=This coil does not contain enough wire for this connection
|
||||
industrialwires.chat.stackSize=Linking is only possible with a stack of size 1
|
||||
industrialwires.chat.marxEnergy=Last discharge was %s kJ per block
|
||||
|
||||
death.attack.industrialwires.jacobs_ladder=%1$s was electrocuted by a Jacob's Ladder
|
||||
death.attack.industrialwires.marx=%1$s was struck by lightning produced by a Marx generator
|
||||
|
@ -132,7 +133,7 @@ ie.manual.entry.industrialwires.jacobs1=These are the required power values in E
|
|||
|
||||
ie.manual.entry.industrialwires.marx.name=Marx Generator
|
||||
ie.manual.entry.industrialwires.marx.subtext=I'm Erwin-Otto, not Karl!
|
||||
ie.manual.entry.industrialwires.marx=A Marx Generator is a device use to produce high-voltage high-energy pulses. These pulses are visible as lightning between the output terminals and can be used to process ores. Each type of ore has an ideal amount of processing energy (see <link;industrialwires.marx;§oAppendix B§r;7>). The precise values are unknown, estimate values with 10%% accuracy can be found at the end of this entry. The factor between the actual value and the estimate is the same for all types of ore.<br>§lConstruction§r<&0><br>The above plan shows a 5-stage generator capable of producing 3 block lightning. An arbitrary amount of stages can be added by increasing the number of "middle" layers. Power (either IF or EU) is connected to the HV connector, the redstone wire for the control signals is connected to the redstone connector<br>§lEnergy§r<br>Each stage of the Marx generator consists of a 1.6μF capacitor that is charged to up to 250kV (see <link;industrialwires.marx;§oAppendix A§r;6>). When the generator is fully charged the voltage of each capacitor is roughly equal to the charging voltage. The total energy is the sum of the energy stored in the individual capacitors and is split equally between the ores to be processed.<br>§lControl signals§r<br>Voltages are represented by 2 signals: The first signal is simply proportional to the voltage to represent. The second signal is proportional to the voltage in the "gap" between 2 values of the first signal, thus allowing more precise control/measurements. Panel components capable of interacting with analog signals usually support this dual-channel setup. The charging voltage is controlled by the white and yellow signals. The voltages of the top and bottom capacitor are output to the magenta and pink resp. the orange and lime signals. The light blue signal is a firing control. If it is high the generator will attempt to fire. If the voltage of the bottom capacitor is lower than 125 kV or the total voltage is lower than 30%% of the maximum output voltage the generator will misfire, discharging the capacitors without actually producing lightning.<br>§lSafety§r<br>Due to the high voltages and energies involved in firing a Marx generator a safe distance should be maintained to avoid injury or death. Even outside of this area hearing protection (As provided by Immersive Engineering) is obligatory. Formulas to calculate the safe distances can be found in <link;industrialwires.marx;§oAppendix A§r;6>.<np>§lAppendix A: Formulas§r<br>Energy stored in a capacitor:<br>E=0.5*C*U^2<br>E: Energy, C: Capacitance, U: Voltage<br><br>Voltage from redstone signals:<br>U=250/255*(16*a+b)<br>U: Voltage, a: First signal, b: Second signal<br><br>Safe distance (Physical damage):<br>r=sqrt(e/50,000)<br>r: Safe distance, e: Energy stored<br><br>Safe distance (Ear damage):<br>r=sqrt(e)/50<br>r: Safe distance, e: Energy stored<np>§lAppendix B: Ore Energy Values§r<br>
|
||||
ie.manual.entry.industrialwires.marx=A Marx Generator is a device use to produce high-voltage high-energy pulses. These pulses are visible as lightning between the output terminals and can be used to process ores. Each type of ore has an ideal amount of processing energy (see <link;industrialwires.marx;§oAppendix B§r;7>). The precise values are unknown, estimate values with 10%% accuracy can be found at the end of this entry. The factor between the actual value and the estimate is the same for all types of ore.<br>§lConstruction§r<&0><br>The above plan shows a 5-stage generator capable of producing 3 block lightning. An arbitrary amount of stages can be added by increasing the number of "middle" layers. Power (either IF or EU) is connected to the HV connector, the redstone wire for the control signals is connected to the redstone connector<br>§lEnergy§r<br>Each stage of the Marx generator consists of a 1.6μF capacitor that is charged to up to 250kV (see <link;industrialwires.marx;§oAppendix A§r;6>). When the generator is fully charged the voltage of each capacitor is roughly equal to the charging voltage. The total energy is the sum of the energy stored in the individual capacitors and is split equally between the ores to be processed.<br>§lControl signals§r<br>Voltages are represented by 2 signals: The first signal is simply proportional to the voltage to represent. The second signal is proportional to the voltage in the "gap" between 2 values of the first signal, thus allowing more precise control/measurements. Panel components capable of interacting with analog signals usually support this dual-channel setup. The charging voltage is controlled by the white and yellow signals. The voltages of the top and bottom capacitor are output to the magenta and pink resp. the orange and lime signals. The light blue signal is a firing control. If it is high the generator will attempt to fire. If the voltage of the bottom capacitor is lower than 125 kV or the total voltage is lower than 30%% of the maximum output voltage the generator will misfire, discharging the capacitors without actually producing lightning.<br>§lSafety§r<br>Due to the high voltages and energies involved in firing a Marx generator a safe distance should be maintained to avoid injury or death. Even outside of this area hearing protection (As provided by Immersive Engineering) is obligatory. Formulas to calculate the safe distances can be found in <link;industrialwires.marx;§oAppendix A§r;6>.<np>§lAppendix A: Formulas§r<br>Energy stored in a capacitor:<br>E=0.5*C*U^2<br>E: Energy, C: Capacitance, U: Voltage<br><br>Voltage from redstone signals:<br>U=250/255*(16*a+b)<br>U: Voltage (kV), a: First signal, b: Second signal<br><br>Safe distance (Physical damage):<br>r=sqrt(e/50,000)<br>r: Safe distance, e: Energy stored<br><br>Safe distance (Ear damage):<br>r=sqrt(e)/50<br>r: Safe distance, e: Energy stored<np>§lAppendix B: Ore Energy Values§r<br>
|
||||
|
||||
ie.manual.entry.industrialwires.intro.name=Introduction
|
||||
ie.manual.entry.industrialwires.intro.subtext=
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
newmtl discharge_meter
|
||||
map_Ka industrialwires:blocks/discharge_meter
|
|
@ -0,0 +1,268 @@
|
|||
mtllib discharge_meter.mtl
|
||||
o insulator
|
||||
v 0.375000 0.125000 0.562500
|
||||
v 0.375000 0.187500 0.562500
|
||||
v 0.375000 0.125000 0.437500
|
||||
v 0.375000 0.187500 0.437500
|
||||
v 0.625000 0.125000 0.562500
|
||||
v 0.625000 0.187500 0.562500
|
||||
v 0.625000 0.125000 0.437500
|
||||
v 0.625000 0.187500 0.437500
|
||||
v 0.125000 0.875000 0.625000
|
||||
v 0.125000 0.125000 0.625000
|
||||
v 0.375000 0.125000 0.625000
|
||||
v 0.375000 0.875000 0.625000
|
||||
v 0.375000 0.875000 0.375000
|
||||
v 0.375000 0.125000 0.375000
|
||||
v 0.125000 0.125000 0.375000
|
||||
v 0.125000 0.875000 0.375000
|
||||
v 0.062500 0.375000 0.687500
|
||||
v 0.062500 0.250000 0.687500
|
||||
v 0.437500 0.250000 0.687500
|
||||
v 0.437500 0.375000 0.687500
|
||||
v 0.437500 0.375000 0.312500
|
||||
v 0.437500 0.250000 0.312500
|
||||
v 0.062500 0.250000 0.312500
|
||||
v 0.062500 0.375000 0.312500
|
||||
v 0.062500 0.562500 0.687500
|
||||
v 0.062500 0.437500 0.687500
|
||||
v 0.437500 0.437500 0.687500
|
||||
v 0.437500 0.562500 0.687500
|
||||
v 0.437500 0.562500 0.312500
|
||||
v 0.437500 0.437500 0.312500
|
||||
v 0.062500 0.437500 0.312500
|
||||
v 0.062500 0.562500 0.312500
|
||||
v 0.062500 0.750000 0.687500
|
||||
v 0.062500 0.625000 0.687500
|
||||
v 0.437500 0.625000 0.687500
|
||||
v 0.437500 0.750000 0.687500
|
||||
v 0.437500 0.750000 0.312500
|
||||
v 0.437500 0.625000 0.312500
|
||||
v 0.062500 0.625000 0.312500
|
||||
v 0.062500 0.750000 0.312500
|
||||
v 0.062500 0.125000 0.687500
|
||||
v 0.062500 -0.000000 0.687500
|
||||
v 0.437500 -0.000000 0.687500
|
||||
v 0.437500 0.125000 0.687500
|
||||
v 0.437500 0.125000 0.312500
|
||||
v 0.437500 -0.000000 0.312500
|
||||
v 0.062500 -0.000000 0.312500
|
||||
v 0.062500 0.125000 0.312500
|
||||
v 0.375000 0.812500 0.562500
|
||||
v 0.375000 0.875000 0.562500
|
||||
v 0.375000 0.812500 0.437500
|
||||
v 0.375000 0.875000 0.437500
|
||||
v 0.625000 0.812500 0.562500
|
||||
v 0.625000 0.875000 0.562500
|
||||
v 0.625000 0.812500 0.437500
|
||||
v 0.625000 0.875000 0.437500
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.5000 0.8125
|
||||
vt 0.5000 0.7500
|
||||
vt 0.7500 0.7500
|
||||
vt 0.7500 0.8125
|
||||
vt 0.6875 0.8750
|
||||
vt 0.6875 0.8125
|
||||
vt 0.5625 0.8125
|
||||
vt 0.5625 0.8750
|
||||
vt 0.5000 0.8125
|
||||
vt 0.5000 0.7500
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 0.8125
|
||||
vt 0.6875 1.0000
|
||||
vt 0.6875 0.7500
|
||||
vt 0.8125 0.7500
|
||||
vt 0.8125 1.0000
|
||||
vt 0.8125 1.0000
|
||||
vt 0.5625 1.0000
|
||||
vt 0.5625 0.8750
|
||||
vt 0.8125 0.8750
|
||||
vt -0.0000 1.0000
|
||||
vt 0.0000 0.1875
|
||||
vt 0.2500 0.1875
|
||||
vt 0.2500 1.0000
|
||||
vt 0.0000 0.9375
|
||||
vt -0.0000 0.0625
|
||||
vt 0.2500 0.0625
|
||||
vt 0.2500 0.9375
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.7500
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 1.0000
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.7500
|
||||
vt 0.2500 0.9375
|
||||
vt -0.0000 0.9375
|
||||
vt -0.0000 0.0625
|
||||
vt 0.2500 0.0625
|
||||
vt 0.0000 0.1875
|
||||
vt 0.2500 0.1875
|
||||
vt 0.2500 1.0000
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 1.0000 0.3750
|
||||
vt 1.0000 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.3750
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 1.0000 0.3750
|
||||
vt 1.0000 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.3750
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 1.0000 0.3750
|
||||
vt 1.0000 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.3750
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.4375 1.0000
|
||||
vt 0.4375 0.8750
|
||||
vt 0.6875 0.8750
|
||||
vt 0.6875 1.0000
|
||||
vt 0.4375 0.8750
|
||||
vt 0.4375 0.7500
|
||||
vt 0.8125 0.7500
|
||||
vt 0.8125 0.8750
|
||||
vt 0.2500 0.8125
|
||||
vt 0.2500 0.4375
|
||||
vt 0.6250 0.4375
|
||||
vt 0.6250 0.8125
|
||||
vt 0.6250 0.2500
|
||||
vt 0.6250 0.6250
|
||||
vt 0.2500 0.6250
|
||||
vt 0.2500 0.2500
|
||||
vt 0.8125 0.8750
|
||||
vt 0.4375 0.8750
|
||||
vt 0.4375 0.7500
|
||||
vt 0.8125 0.7500
|
||||
vt 0.4375 1.0000
|
||||
vt 0.4375 0.8750
|
||||
vt 0.8125 0.8750
|
||||
vt 0.8125 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.6875 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 1.0000
|
||||
vt 0.6875 1.0000
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 0.8125
|
||||
vt 0.3750 0.8125
|
||||
vt 0.3750 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 0.7500 0.7500
|
||||
vt 0.7500 0.8125
|
||||
vt 1.0000 0.8125
|
||||
vt 0.5000 0.8125
|
||||
vt 0.7500 0.8125
|
||||
vt 0.7500 0.9375
|
||||
vt 0.5000 0.9375
|
||||
vt 0.4375 1.0000
|
||||
vt 0.4375 0.7500
|
||||
vt 0.5625 0.7500
|
||||
vt 0.5625 1.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl discharge_meter
|
||||
f 1/1/1 2/2/1 4/3/1 3/4/1
|
||||
f 3/5/2 4/6/2 8/7/2 7/8/2
|
||||
f 7/9/3 8/10/3 6/11/3 5/12/3
|
||||
f 5/13/4 6/14/4 2/15/4 1/16/4
|
||||
f 3/17/5 7/18/5 5/19/5 1/20/5
|
||||
f 8/21/6 4/22/6 2/23/6 6/24/6
|
||||
f 9/25/4 10/26/4 11/27/4 12/28/4
|
||||
f 13/29/2 14/30/2 15/31/2 16/32/2
|
||||
f 16/33/6 9/34/6 12/35/6 13/36/6
|
||||
f 10/37/5 15/38/5 14/39/5 11/40/5
|
||||
f 13/41/3 12/42/3 11/43/3 14/44/3
|
||||
f 16/33/1 15/45/1 10/46/1 9/47/1
|
||||
f 17/48/4 18/49/4 19/50/4 20/51/4
|
||||
f 21/52/2 22/53/2 23/54/2 24/55/2
|
||||
f 24/56/6 17/48/6 20/51/6 21/57/6
|
||||
f 18/58/5 23/59/5 22/60/5 19/61/5
|
||||
f 21/62/3 20/63/3 19/64/3 22/65/3
|
||||
f 24/66/1 23/67/1 18/68/1 17/69/1
|
||||
f 25/70/4 26/71/4 27/72/4 28/73/4
|
||||
f 29/74/2 30/75/2 31/76/2 32/77/2
|
||||
f 32/78/6 25/70/6 28/73/6 29/79/6
|
||||
f 26/80/5 31/81/5 30/82/5 27/83/5
|
||||
f 29/84/3 28/85/3 27/86/3 30/87/3
|
||||
f 32/88/1 31/89/1 26/90/1 25/91/1
|
||||
f 33/92/4 34/93/4 35/94/4 36/95/4
|
||||
f 37/96/2 38/97/2 39/98/2 40/99/2
|
||||
f 40/100/6 33/92/6 36/95/6 37/101/6
|
||||
f 34/102/5 39/103/5 38/104/5 35/105/5
|
||||
f 37/106/3 36/107/3 35/108/3 38/109/3
|
||||
f 40/110/1 39/111/1 34/112/1 33/113/1
|
||||
f 41/114/4 42/115/4 43/116/4 44/117/4
|
||||
f 45/118/2 46/119/2 47/120/2 48/121/2
|
||||
f 48/122/6 41/123/6 44/124/6 45/125/6
|
||||
f 42/126/5 47/127/5 46/128/5 43/129/5
|
||||
f 45/130/3 44/131/3 43/132/3 46/133/3
|
||||
f 48/134/1 47/135/1 42/136/1 41/137/1
|
||||
f 49/138/1 50/139/1 52/140/1 51/141/1
|
||||
f 51/142/2 52/143/2 56/144/2 55/145/2
|
||||
f 55/146/3 56/147/3 54/148/3 53/149/3
|
||||
f 53/150/4 54/151/4 50/152/4 49/153/4
|
||||
f 51/154/5 55/155/5 53/156/5 49/157/5
|
||||
f 56/158/6 52/159/6 50/160/6 54/161/6
|
|
@ -0,0 +1,2 @@
|
|||
newmtl discharge_meter
|
||||
map_Ka industrialwires:blocks/discharge_meter
|
|
@ -0,0 +1,316 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
mtllib discharge_meter_wire.mtl
|
||||
o Wire
|
||||
v 0.531250 0.062500 0.531250
|
||||
v 0.531250 0.937500 0.531250
|
||||
v 0.531250 0.937500 0.468750
|
||||
v 0.531250 0.062500 0.468750
|
||||
v 0.593750 0.937500 0.468750
|
||||
v 0.593750 0.062500 0.468750
|
||||
v 0.593750 0.937500 0.531250
|
||||
v 0.593750 0.062500 0.531250
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 0.0625
|
||||
vt -0.0000 0.0625
|
||||
vt 1.0000 0.0625
|
||||
vt 0.0000 0.0625
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 1.0000 0.0625
|
||||
vt -0.0000 0.0625
|
||||
vt 1.0000 0.0625
|
||||
vt 0.0000 0.0625
|
||||
vt 0.0000 0.0000
|
||||
vt 1.0000 0.0000
|
||||
vt 0.7500 0.0000
|
||||
vt 0.8125 -0.0000
|
||||
vt 0.8125 0.0625
|
||||
vt 0.7500 0.0625
|
||||
vt 0.2500 0.0000
|
||||
vt 0.3125 0.0000
|
||||
vt 0.3125 0.0625
|
||||
vt 0.2500 0.0625
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 -0.0000 0.0000
|
||||
vn 0.0000 -0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl discharge_meter
|
||||
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||
f 4/5/2 3/6/2 5/7/2 6/8/2
|
||||
f 6/9/3 5/10/3 7/11/3 8/12/3
|
||||
f 8/13/4 7/14/4 2/15/4 1/16/4
|
||||
f 4/17/5 6/18/5 8/19/5 1/20/5
|
||||
f 5/21/6 3/22/6 2/23/6 7/24/6
|
||||
o Insulator
|
||||
v 0.375000 0.125000 0.562500
|
||||
v 0.375000 0.187500 0.562500
|
||||
v 0.375000 0.187500 0.437500
|
||||
v 0.375000 0.125000 0.437500
|
||||
v 0.625000 0.187500 0.437500
|
||||
v 0.625000 0.125000 0.437500
|
||||
v 0.625000 0.187500 0.562500
|
||||
v 0.625000 0.125000 0.562500
|
||||
v 0.125000 0.875000 0.625000
|
||||
v 0.125000 0.125000 0.625000
|
||||
v 0.375000 0.125000 0.625000
|
||||
v 0.375000 0.875000 0.625000
|
||||
v 0.375000 0.875000 0.375000
|
||||
v 0.375000 0.125000 0.375000
|
||||
v 0.125000 0.125000 0.375000
|
||||
v 0.125000 0.875000 0.375000
|
||||
v 0.062500 0.375000 0.687500
|
||||
v 0.062500 0.250000 0.687500
|
||||
v 0.437500 0.250000 0.687500
|
||||
v 0.437500 0.375000 0.687500
|
||||
v 0.437500 0.375000 0.312500
|
||||
v 0.437500 0.250000 0.312500
|
||||
v 0.062500 0.250000 0.312500
|
||||
v 0.062500 0.375000 0.312500
|
||||
v 0.062500 0.562500 0.687500
|
||||
v 0.062500 0.437500 0.687500
|
||||
v 0.437500 0.437500 0.687500
|
||||
v 0.437500 0.562500 0.687500
|
||||
v 0.437500 0.562500 0.312500
|
||||
v 0.437500 0.437500 0.312500
|
||||
v 0.062500 0.437500 0.312500
|
||||
v 0.062500 0.562500 0.312500
|
||||
v 0.062500 0.750000 0.687500
|
||||
v 0.062500 0.625000 0.687500
|
||||
v 0.437500 0.625000 0.687500
|
||||
v 0.437500 0.750000 0.687500
|
||||
v 0.437500 0.750000 0.312500
|
||||
v 0.437500 0.625000 0.312500
|
||||
v 0.062500 0.625000 0.312500
|
||||
v 0.062500 0.750000 0.312500
|
||||
v 0.062500 0.125000 0.687500
|
||||
v 0.062500 -0.000000 0.687500
|
||||
v 0.437500 -0.000000 0.687500
|
||||
v 0.437500 0.125000 0.687500
|
||||
v 0.437500 0.125000 0.312500
|
||||
v 0.437500 -0.000000 0.312500
|
||||
v 0.062500 -0.000000 0.312500
|
||||
v 0.062500 0.125000 0.312500
|
||||
v 0.375000 0.812500 0.562500
|
||||
v 0.375000 0.875000 0.562500
|
||||
v 0.375000 0.875000 0.437500
|
||||
v 0.375000 0.812500 0.437500
|
||||
v 0.625000 0.875000 0.437500
|
||||
v 0.625000 0.812500 0.437500
|
||||
v 0.625000 0.875000 0.562500
|
||||
v 0.625000 0.812500 0.562500
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.5000 0.8125
|
||||
vt 0.5000 0.7500
|
||||
vt 0.7500 0.7500
|
||||
vt 0.7500 0.8125
|
||||
vt 0.6875 0.8750
|
||||
vt 0.6875 0.8125
|
||||
vt 0.5625 0.8125
|
||||
vt 0.5625 0.8750
|
||||
vt 0.5000 0.8125
|
||||
vt 0.5000 0.7500
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 0.8125
|
||||
vt 0.6875 1.0000
|
||||
vt 0.6875 0.7500
|
||||
vt 0.8125 0.7500
|
||||
vt 0.8125 1.0000
|
||||
vt 0.8125 1.0000
|
||||
vt 0.5625 1.0000
|
||||
vt 0.5625 0.8750
|
||||
vt 0.8125 0.8750
|
||||
vt -0.0000 1.0000
|
||||
vt 0.0000 0.1875
|
||||
vt 0.2500 0.1875
|
||||
vt 0.2500 1.0000
|
||||
vt 0.0000 0.9375
|
||||
vt -0.0000 0.0625
|
||||
vt 0.2500 0.0625
|
||||
vt 0.2500 0.9375
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.7500
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 1.0000
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 1.0000
|
||||
vt 0.0000 1.0000
|
||||
vt 0.0000 0.7500
|
||||
vt 0.2500 0.9375
|
||||
vt -0.0000 0.9375
|
||||
vt -0.0000 0.0625
|
||||
vt 0.2500 0.0625
|
||||
vt 0.0000 0.1875
|
||||
vt 0.2500 0.1875
|
||||
vt 0.2500 1.0000
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 1.0000 0.3750
|
||||
vt 1.0000 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.3750
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 1.0000 0.3750
|
||||
vt 1.0000 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.3750
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 1.0000 0.3750
|
||||
vt 1.0000 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 0.3750
|
||||
vt 1.0000 0.3750
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 0.6250 0.3750
|
||||
vt 0.6250 0.2500
|
||||
vt 1.0000 0.2500
|
||||
vt 1.0000 0.3750
|
||||
vt 0.4375 1.0000
|
||||
vt 0.4375 0.8750
|
||||
vt 0.6875 0.8750
|
||||
vt 0.6875 1.0000
|
||||
vt 0.4375 0.8750
|
||||
vt 0.4375 0.7500
|
||||
vt 0.8125 0.7500
|
||||
vt 0.8125 0.8750
|
||||
vt 0.2500 0.8125
|
||||
vt 0.2500 0.4375
|
||||
vt 0.6250 0.4375
|
||||
vt 0.6250 0.8125
|
||||
vt 0.6250 0.2500
|
||||
vt 0.6250 0.6250
|
||||
vt 0.2500 0.6250
|
||||
vt 0.2500 0.2500
|
||||
vt 0.8125 0.8750
|
||||
vt 0.4375 0.8750
|
||||
vt 0.4375 0.7500
|
||||
vt 0.8125 0.7500
|
||||
vt 0.4375 1.0000
|
||||
vt 0.4375 0.8750
|
||||
vt 0.8125 0.8750
|
||||
vt 0.8125 1.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.0000 0.0000
|
||||
vt 0.6875 0.7500
|
||||
vt 0.6250 0.7500
|
||||
vt 0.6250 1.0000
|
||||
vt 0.6875 1.0000
|
||||
vt 0.2500 0.7500
|
||||
vt 0.2500 0.8125
|
||||
vt 0.3750 0.8125
|
||||
vt 0.3750 0.7500
|
||||
vt 1.0000 0.7500
|
||||
vt 0.7500 0.7500
|
||||
vt 0.7500 0.8125
|
||||
vt 1.0000 0.8125
|
||||
vt 0.5000 0.8125
|
||||
vt 0.7500 0.8125
|
||||
vt 0.7500 0.9375
|
||||
vt 0.5000 0.9375
|
||||
vt 0.4375 1.0000
|
||||
vt 0.4375 0.7500
|
||||
vt 0.5625 0.7500
|
||||
vt 0.5625 1.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
usemtl discharge_meter
|
||||
f 9/25/7 10/26/7 11/27/7 12/28/7
|
||||
f 12/29/8 11/30/8 13/31/8 14/32/8
|
||||
f 14/33/9 13/34/9 15/35/9 16/36/9
|
||||
f 16/37/10 15/38/10 10/39/10 9/40/10
|
||||
f 12/41/11 14/42/11 16/43/11 9/44/11
|
||||
f 13/45/12 11/46/12 10/47/12 15/48/12
|
||||
f 17/49/10 18/50/10 19/51/10 20/52/10
|
||||
f 21/53/8 22/54/8 23/55/8 24/56/8
|
||||
f 24/57/12 17/58/12 20/59/12 21/60/12
|
||||
f 18/61/11 23/62/11 22/63/11 19/64/11
|
||||
f 21/65/9 20/66/9 19/67/9 22/68/9
|
||||
f 24/57/7 23/69/7 18/70/7 17/71/7
|
||||
f 25/72/10 26/73/10 27/74/10 28/75/10
|
||||
f 29/76/8 30/77/8 31/78/8 32/79/8
|
||||
f 32/80/12 25/72/12 28/75/12 29/81/12
|
||||
f 26/82/11 31/83/11 30/84/11 27/85/11
|
||||
f 29/86/9 28/87/9 27/88/9 30/89/9
|
||||
f 32/90/7 31/91/7 26/92/7 25/93/7
|
||||
f 33/94/10 34/95/10 35/96/10 36/97/10
|
||||
f 37/98/8 38/99/8 39/100/8 40/101/8
|
||||
f 40/102/12 33/94/12 36/97/12 37/103/12
|
||||
f 34/104/11 39/105/11 38/106/11 35/107/11
|
||||
f 37/108/9 36/109/9 35/110/9 38/111/9
|
||||
f 40/112/7 39/113/7 34/114/7 33/115/7
|
||||
f 41/116/10 42/117/10 43/118/10 44/119/10
|
||||
f 45/120/8 46/121/8 47/122/8 48/123/8
|
||||
f 48/124/12 41/116/12 44/119/12 45/125/12
|
||||
f 42/126/11 47/127/11 46/128/11 43/129/11
|
||||
f 45/130/9 44/131/9 43/132/9 46/133/9
|
||||
f 48/134/7 47/135/7 42/136/7 41/137/7
|
||||
f 49/138/10 50/139/10 51/140/10 52/141/10
|
||||
f 53/142/8 54/143/8 55/144/8 56/145/8
|
||||
f 56/146/12 49/147/12 52/148/12 53/149/12
|
||||
f 50/150/11 55/151/11 54/152/11 51/153/11
|
||||
f 53/154/9 52/155/9 51/156/9 54/157/9
|
||||
f 56/158/7 55/159/7 50/160/7 49/161/7
|
||||
f 57/162/7 58/163/7 59/164/7 60/165/7
|
||||
f 60/166/8 59/167/8 61/168/8 62/169/8
|
||||
f 62/170/9 61/171/9 63/172/9 64/173/9
|
||||
f 64/174/10 63/175/10 58/176/10 57/177/10
|
||||
f 60/178/11 62/179/11 64/180/11 57/181/11
|
||||
f 61/182/12 59/183/12 58/184/12 63/185/12
|
Binary file not shown.
After Width: | Height: | Size: 555 B |
Loading…
Reference in a new issue