Progress on the jacobs ladders:
added models for the small and normal sized versions made them rotatable fixed sound energy storage is saved to NBT now
This commit is contained in:
parent
2edc831d19
commit
8a12144490
|
@ -19,8 +19,8 @@
|
|||
package malte0811.industrialWires.blocks;
|
||||
|
||||
import blusunrize.immersiveengineering.api.IEProperties;
|
||||
import blusunrize.immersiveengineering.common.blocks.IEBlockInterfaces;
|
||||
import malte0811.industrialWires.IndustrialWires;
|
||||
import malte0811.industrialWires.blocks.TileEntityJacobsLadder.LadderSize;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
|
@ -28,100 +28,207 @@ import net.minecraft.block.properties.PropertyEnum;
|
|||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumFacing.AxisDirection;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockJacobsLadder extends Block implements IMetaEnum {
|
||||
static PropertyEnum<TileEntityJacobsLadder.LadderSize> size_property = PropertyEnum.create("size", TileEntityJacobsLadder.LadderSize.class);
|
||||
public BlockJacobsLadder() {
|
||||
super(Material.IRON);
|
||||
setHardness(3.0F);
|
||||
setResistance(15.0F);
|
||||
String name = "jacobs_ladder";
|
||||
GameRegistry.register(this, new ResourceLocation(IndustrialWires.MODID, name));
|
||||
GameRegistry.register(new ItemBlockIW(this), new ResourceLocation(IndustrialWires.MODID, name));
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(IndustrialWires.creativeTab);
|
||||
}
|
||||
static PropertyEnum<LadderSize> size_property = PropertyEnum.create("size", LadderSize.class);
|
||||
|
||||
@Override
|
||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
|
||||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof IEBlockInterfaces.IHasDummyBlocks) {
|
||||
((IEBlockInterfaces.IHasDummyBlocks) te).breakDummies(pos, state);
|
||||
}
|
||||
super.breakBlock(worldIn, pos, state);
|
||||
worldIn.removeTileEntity(pos);
|
||||
}
|
||||
public BlockJacobsLadder() {
|
||||
super(Material.IRON);
|
||||
setHardness(3.0F);
|
||||
setResistance(15.0F);
|
||||
String name = "jacobs_ladder";
|
||||
GameRegistry.register(this, new ResourceLocation(IndustrialWires.MODID, name));
|
||||
GameRegistry.register(new ItemBlockIW(this), new ResourceLocation(IndustrialWires.MODID, name));
|
||||
setUnlocalizedName(name);
|
||||
setCreativeTab(IndustrialWires.creativeTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
BlockStateContainer cont = super.createBlockState();
|
||||
IProperty[] props = cont.getProperties().toArray(new IProperty[0]);
|
||||
props = Arrays.copyOf(props, props.length+2);
|
||||
props[props.length-2] = size_property;
|
||||
props[props.length-1] = IEProperties.MULTIBLOCKSLAVE;
|
||||
return new BlockStateContainer(this, props);
|
||||
}
|
||||
@Override
|
||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
|
||||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof IHasDummyBlocksIW) {
|
||||
((IHasDummyBlocksIW) te).breakDummies();
|
||||
}
|
||||
super.breakBlock(worldIn, pos, state);
|
||||
worldIn.removeTileEntity(pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) {
|
||||
TileEntity tile = worldIn.getTileEntity(pos);
|
||||
if(tile instanceof IEBlockInterfaces.IHasDummyBlocks) {
|
||||
state = applyProperty(state, IEProperties.MULTIBLOCKSLAVE, ((IEBlockInterfaces.IHasDummyBlocks)tile).isDummy());
|
||||
}
|
||||
if (tile instanceof TileEntityJacobsLadder) {
|
||||
state = applyProperty(state, size_property, ((TileEntityJacobsLadder) tile).size);
|
||||
}
|
||||
return super.getActualState(state, worldIn, pos);
|
||||
}
|
||||
private <V extends Comparable<V>> IBlockState applyProperty(IBlockState in, IProperty<V> prop, V val) {
|
||||
return in.withProperty(prop, val);
|
||||
}
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
BlockStateContainer cont = super.createBlockState();
|
||||
IProperty[] props = cont.getProperties().toArray(new IProperty[0]);
|
||||
props = Arrays.copyOf(props, props.length + 3);
|
||||
props[props.length - 3] = size_property;
|
||||
props[props.length - 2] = IEProperties.MULTIBLOCKSLAVE;
|
||||
props[props.length - 1] = IEProperties.FACING_HORIZONTAL;
|
||||
return new BlockStateContainer(this, props);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return state.getValue(size_property).ordinal();
|
||||
}
|
||||
@Override
|
||||
public IBlockState getActualState(IBlockState state, IBlockAccess worldIn, BlockPos pos) {
|
||||
TileEntity tile = worldIn.getTileEntity(pos);
|
||||
if (tile instanceof IHasDummyBlocksIW) {
|
||||
state = applyProperty(state, IEProperties.MULTIBLOCKSLAVE, ((IHasDummyBlocksIW) tile).isDummy());
|
||||
}
|
||||
if (tile instanceof TileEntityJacobsLadder) {
|
||||
state = applyProperty(state, size_property, ((TileEntityJacobsLadder) tile).size);
|
||||
state = applyProperty(state, IEProperties.FACING_HORIZONTAL, ((TileEntityJacobsLadder) tile).facing);
|
||||
}
|
||||
return super.getActualState(state, worldIn, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return super.getStateFromMeta(meta).withProperty(size_property, TileEntityJacobsLadder.LadderSize.values()[meta]);
|
||||
}
|
||||
private <V extends Comparable<V>> IBlockState applyProperty(IBlockState in, IProperty<V> prop, V val) {
|
||||
return in.withProperty(prop, val);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int i = 0;i< TileEntityJacobsLadder.LadderSize.values().length;i++) {
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return state.getValue(size_property).ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getValues() {
|
||||
return TileEntityJacobsLadder.LadderSize.values();
|
||||
}
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return super.getStateFromMeta(meta).withProperty(size_property, LadderSize.values()[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int i = 0; i < LadderSize.values().length; i++) {
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileEntityJacobsLadder(state.getValue(size_property));
|
||||
}
|
||||
@Override
|
||||
public Object[] getValues() {
|
||||
return LadderSize.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisuallyOpaque() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileEntityJacobsLadder(state.getValue(size_property));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullyOpaque(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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, ItemStack stack) {
|
||||
EnumFacing f = facing;
|
||||
if (facing.getAxis() == EnumFacing.Axis.Y) {
|
||||
double dX = hitX - .5;
|
||||
double dZ = hitZ - .5;
|
||||
if (Math.abs(dX) > Math.abs(dZ)) {
|
||||
f = EnumFacing.getFacingFromAxis(dX > 0 ? AxisDirection.NEGATIVE : AxisDirection.POSITIVE, EnumFacing.Axis.X);
|
||||
} else {
|
||||
f = EnumFacing.getFacingFromAxis(dZ > 0 ? AxisDirection.NEGATIVE : AxisDirection.POSITIVE, EnumFacing.Axis.Z);
|
||||
}
|
||||
}
|
||||
return super.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, meta, placer, stack).withProperty(IEProperties.FACING_HORIZONTAL, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
|
||||
TileEntity te = worldIn.getTileEntity(pos);
|
||||
if (te instanceof TileEntityJacobsLadder) {
|
||||
((TileEntityJacobsLadder) te).facing = state.getValue(IEProperties.FACING_HORIZONTAL);
|
||||
}
|
||||
if (te instanceof IHasDummyBlocksIW) {
|
||||
((IHasDummyBlocksIW) te).placeDummies(state);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) {
|
||||
TileEntity te = source.getTileEntity(pos);
|
||||
if (!(te instanceof TileEntityJacobsLadder)) {
|
||||
return FULL_BLOCK_AABB;
|
||||
}
|
||||
TileEntityJacobsLadder tile = (TileEntityJacobsLadder) te;
|
||||
if (!tile.isDummy()) {
|
||||
//transformer
|
||||
return FULL_BLOCK_AABB;
|
||||
} else {
|
||||
Vec3d min;
|
||||
Vec3d max;
|
||||
LadderSize size = tile.size;
|
||||
double distX = (1 - size.topDistance) / 2;
|
||||
double distZ = .5 - .0625 * (size.ordinal() + 1);
|
||||
double h = Math.min(1, 1 + size.height - tile.dummy);
|
||||
if (tile.facing.getAxis() == EnumFacing.Axis.Z) {
|
||||
min = new Vec3d(distX, 0, distZ);
|
||||
max = new Vec3d(1 - distX, h, 1 - distZ);
|
||||
} else {
|
||||
min = new Vec3d(distZ, 0, distX);
|
||||
max = new Vec3d(1 - distZ, h, 1 - distX);
|
||||
}
|
||||
return new AxisAlignedBB(min, max);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) {
|
||||
return getBoundingBox(blockState, worldIn, pos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) {
|
||||
AxisAlignedBB axisalignedbb = getBoundingBox(state, worldIn, pos).offset(pos);
|
||||
if (entityBox.intersectsWith(axisalignedbb)) {
|
||||
collidingBoxes.add(axisalignedbb);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
return new ItemStack(this, 1, getMetaFromState(state));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) {
|
||||
super.onEntityCollidedWithBlock(worldIn, pos, state, entityIn);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public interface IHasDummyBlocksIW {
|
||||
void placeDummies(IBlockState state);
|
||||
void breakDummies();
|
||||
boolean isDummy();
|
||||
}
|
|
@ -45,16 +45,4 @@ public class ItemBlockIW extends ItemBlock {
|
|||
public int getMetadata(int damage) {
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, IBlockState newState) {
|
||||
boolean ret = super.placeBlockAt(stack, player, world, pos, side, hitX, hitY, hitZ, newState);
|
||||
if(ret) {
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te instanceof IEBlockInterfaces.IHasDummyBlocks) {
|
||||
((IEBlockInterfaces.IHasDummyBlocks) te).placeDummies(pos, newState, side, hitX, hitY, hitZ);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
@ -44,11 +45,9 @@ import net.minecraftforge.energy.IEnergyStorage;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
//TODO facing!
|
||||
public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickable, IEBlockInterfaces.IHasDummyBlocks, ISyncReceiver, IEnergySink {
|
||||
|
||||
public static final SoundEvent sound = new SoundEvent(new ResourceLocation("industrialwires:jacobs_ladder"));
|
||||
DualEnergyStorage energy;
|
||||
public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickable, IHasDummyBlocksIW, ISyncReceiver, IEnergySink {
|
||||
public EnumFacing facing = EnumFacing.NORTH;
|
||||
private DualEnergyStorage energy;
|
||||
public LadderSize size;
|
||||
|
||||
public Vec3d[] controls;
|
||||
|
@ -57,7 +56,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
// movement of the controls in blocks/tick
|
||||
public Vec3d[] controlMovement;
|
||||
private double t = 0;
|
||||
private int dummy = 0;
|
||||
public int dummy = 0;
|
||||
public int timeTillActive = -1;
|
||||
private double tStep = 0;
|
||||
private double consumtionEU;
|
||||
|
@ -81,7 +80,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
controlMovement = new Vec3d[size.arcPoints];
|
||||
int sizeId = size.ordinal();
|
||||
consumtionEU = IWConfig.HVStuff.jacobsUsageEU[sizeId];
|
||||
energy = new DualEnergyStorage(20*consumtionEU, 2*consumtionEU);
|
||||
energy = new DualEnergyStorage(20 * consumtionEU, 2 * consumtionEU);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,14 +93,14 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
MinecraftForge.EVENT_BUS.post(new EnergyTileLoadEvent(this));
|
||||
addedToIC2Net = true;
|
||||
}
|
||||
if ((controlControls[0][0] == null || timeTillActive==-1 || t >= 1)&&energy.getEnergyStoredEU()>=2*consumtionEU) {
|
||||
if ((controlControls[0][0] == null || timeTillActive == -1 || t >= 1) && energy.getEnergyStoredEU() >= 2 * consumtionEU) {
|
||||
for (int j = 0; j < size.movementPoints; j++) {
|
||||
double y = j * (size.height + size.extraHeight) / (double) (size.movementPoints - 1) + size.innerPointOffset;
|
||||
double width = widthFromHeight(y);
|
||||
for (int i = 0; i < size.arcPoints - 2; i++) {
|
||||
double z = size.zMax * 2 * (worldObj.rand.nextDouble() - .5);
|
||||
double xMin = width * i / (double) (size.arcPoints - 1) - width / 4;
|
||||
double xDiff = width / (double) (size.arcPoints - 1);
|
||||
double xMin = width * i / (double) (size.arcPoints - 2) - width / 2 + size.bottomDistance / 2;
|
||||
double xDiff = width / (double) (size.arcPoints - 2);
|
||||
double x = worldObj.rand.nextDouble() * xDiff + xMin;
|
||||
controlControls[i][j] = new Vec3d(x, y, z);
|
||||
}
|
||||
|
@ -110,62 +109,69 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
timeTillActive = size.delay;
|
||||
tStep = 1D / (int) (.875 * size.tickToTop + worldObj.rand.nextInt(size.tickToTop / 4));
|
||||
IndustrialWires.packetHandler.sendToAll(new MessageTileSyncIW(this, writeArcStarter()));
|
||||
} else if (timeTillActive==0&&t<1) {
|
||||
} else if (timeTillActive == 0 && t < 1) {
|
||||
double extracted = energy.extractEU(consumtionEU, false);
|
||||
if (extracted>=consumtionEU) {
|
||||
if (extracted >= consumtionEU) {
|
||||
energy.extractEU(consumtionEU, true);
|
||||
} else {
|
||||
timeTillActive = -1-size.delay;
|
||||
timeTillActive = -1 - size.delay;
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
nbt.setBoolean("cancel", true);
|
||||
IndustrialWires.packetHandler.sendToAll(new MessageTileSyncIW(this, nbt));
|
||||
}
|
||||
} else if (timeTillActive<-1) {
|
||||
} else if (timeTillActive < -1) {
|
||||
//delay after energy was cut
|
||||
timeTillActive++;
|
||||
}
|
||||
} else {
|
||||
if (timeTillActive==0&&t<1) {
|
||||
} else {
|
||||
if (timeTillActive == 0 && t < 1) {
|
||||
for (int i = 0; i < size.arcPoints; i++) {
|
||||
controls[i] = controls[i].add(controlMovement[i]);
|
||||
}
|
||||
for (int i = 1; i < size.arcPoints - 1; i++) {
|
||||
controlMovement[i] = Beziers.getPoint(t, controlControls[i - 1]).subtract(controls[i]);
|
||||
}
|
||||
if (t>=7*tStep&&soundPhase==0) {
|
||||
if (soundPhase<0) {
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, 0, soundPos);
|
||||
soundPhase = 0;
|
||||
}
|
||||
if (t >= 7 * tStep && soundPhase == 0) {
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, 1, soundPos);
|
||||
soundPhase = 1;
|
||||
} else if (t>=1-(4*tStep)&&soundPhase==1) {
|
||||
} else if (t >= 1 - (4 * tStep) && soundPhase == 1) {
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, 2, soundPos);
|
||||
soundPhase = 2;
|
||||
}
|
||||
} else if (t>1) {
|
||||
} else if (t > 1) {
|
||||
timeTillActive = -1;
|
||||
}
|
||||
}
|
||||
if (timeTillActive > 0) {
|
||||
timeTillActive--;
|
||||
} else if (timeTillActive==0&&t<1) {
|
||||
} else if (timeTillActive == 0 && t < 1) {
|
||||
t += tStep;
|
||||
}
|
||||
}
|
||||
|
||||
private void initArc() {
|
||||
private void initArc(int delay) {
|
||||
controls[0] = new Vec3d(0, 0, 0);
|
||||
controls[size.arcPoints - 1] = new Vec3d(size.bottomDistance, 0, 0);
|
||||
controlMovement[0] = new Vec3d(-(size.topDistance - size.bottomDistance) / (2*size.height * size.tickToTop), size.height / size.tickToTop, 0);
|
||||
controlMovement[size.arcPoints - 1] = new Vec3d((size.topDistance - size.bottomDistance) / (2*size.height * size.tickToTop), size.height / size.tickToTop, 0);
|
||||
controlMovement[0] = new Vec3d(-(size.topDistance - size.bottomDistance) / (2 * size.tickToTop), size.height / size.tickToTop, 0);
|
||||
controlMovement[size.arcPoints - 1] = new Vec3d((size.topDistance - size.bottomDistance) / (2 * size.tickToTop), size.height / size.tickToTop, 0);
|
||||
t = 0;
|
||||
for (int i = 1; i < size.arcPoints - 1; i++) {
|
||||
controls[i] = Beziers.getPoint(0, controlControls[i - 1]);
|
||||
controlMovement[i] = Beziers.getPoint(tStep, controlControls[i - 1]).subtract(controls[i]);
|
||||
}
|
||||
double soundX = pos.getX()+.5;
|
||||
double soundY = pos.getY()+.5*size.dummyCount+size.heightOffset;
|
||||
double soundZ = pos.getZ()+.5;
|
||||
double soundX = pos.getX() + .5;
|
||||
double soundY = pos.getY() + .5 * size.dummyCount + size.heightOffset;
|
||||
double soundZ = pos.getZ() + .5;
|
||||
soundPos = new Vec3d(soundX, soundY, soundZ);
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, 0, soundPos);
|
||||
soundPhase = 0;
|
||||
soundPhase = -1;
|
||||
timeTillActive = delay;
|
||||
if (controlMovement==null) {
|
||||
initControl();
|
||||
}
|
||||
}
|
||||
|
||||
private double widthFromHeight(double h) {
|
||||
|
@ -180,13 +186,18 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
initControl();
|
||||
}
|
||||
dummy = nbt.getInteger("dummy");
|
||||
energy = DualEnergyStorage.readFromNBT(nbt.getCompoundTag("energy"));
|
||||
facing = EnumFacing.HORIZONTALS[nbt.getInteger("facing")];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound nbt, boolean descPacket) {
|
||||
nbt.setInteger("size", size.ordinal());
|
||||
nbt.setInteger("dummy", dummy);
|
||||
energy.writeToNbt(nbt, "energy");
|
||||
nbt.setInteger("facing", facing.getHorizontalIndex());
|
||||
}
|
||||
|
||||
private NBTTagCompound writeArcStarter() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
NBTTagList ctrlCtrl = write2DVecArray(controlControls);
|
||||
|
@ -195,26 +206,24 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
nbt.setDouble("tStep", tStep);
|
||||
return nbt;
|
||||
}
|
||||
|
||||
private void readArcStarter(NBTTagCompound nbt) {
|
||||
controlControls = read2DVecArray(nbt.getTagList("ctrlCtrl", 9));
|
||||
timeTillActive = nbt.getInteger("timeTillActive");
|
||||
if (timeTillActive<=0) {
|
||||
timeTillActive = 1;
|
||||
}
|
||||
tStep = nbt.getDouble("tStep");
|
||||
Minecraft.getMinecraft().addScheduledTask(this::initArc);
|
||||
Minecraft.getMinecraft().addScheduledTask(()->initArc(nbt.getInteger("timeTillActive")));
|
||||
}
|
||||
|
||||
private Vec3d[][] read2DVecArray(NBTTagList nbt) {
|
||||
Vec3d[][] ret = new Vec3d[nbt.tagCount()][];
|
||||
for (int i = 0;i<ret.length;i++) {
|
||||
ret[i] = readVecArray((NBTTagList)nbt.get(i));
|
||||
for (int i = 0; i < ret.length; i++) {
|
||||
ret[i] = readVecArray((NBTTagList) nbt.get(i));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private Vec3d[] readVecArray(NBTTagList nbt) {
|
||||
Vec3d[] ret = new Vec3d[nbt.tagCount()];
|
||||
for (int i = 0;i<ret.length;i++) {
|
||||
for (int i = 0; i < ret.length; i++) {
|
||||
NBTTagCompound vec = nbt.getCompoundTagAt(i);
|
||||
ret[i] = new Vec3d(vec.getDouble("x"), vec.getDouble("y"), vec.getDouble("z"));
|
||||
}
|
||||
|
@ -223,14 +232,15 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
|
||||
private NBTTagList write2DVecArray(Vec3d[][] array) {
|
||||
NBTTagList ret = new NBTTagList();
|
||||
for (Vec3d[] subArray:array) {
|
||||
for (Vec3d[] subArray : array) {
|
||||
ret.appendTag(writeVecArray(subArray));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
private NBTTagList writeVecArray(Vec3d[] array) {
|
||||
NBTTagList ret = new NBTTagList();
|
||||
for (Vec3d point:array) {
|
||||
for (Vec3d point : array) {
|
||||
NBTTagCompound vec = new NBTTagCompound();
|
||||
vec.setDouble("x", point.xCoord);
|
||||
vec.setDouble("y", point.yCoord);
|
||||
|
@ -239,13 +249,14 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDummy() {
|
||||
return dummy != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void placeDummies(BlockPos pos, IBlockState state, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
public void placeDummies(IBlockState state) {
|
||||
for (int i = 1; i <= size.dummyCount; i++) {
|
||||
BlockPos pos2 = pos.offset(EnumFacing.UP, i);
|
||||
worldObj.setBlockState(pos2, state);
|
||||
|
@ -253,16 +264,16 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
if (te instanceof TileEntityJacobsLadder) {
|
||||
((TileEntityJacobsLadder) te).size = size;
|
||||
((TileEntityJacobsLadder) te).dummy = i;
|
||||
//TODO facing ((TileEntityJacobsLadder)te).size = size;
|
||||
((TileEntityJacobsLadder) te).facing = facing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakDummies(BlockPos pos, IBlockState state) {
|
||||
public void breakDummies() {
|
||||
for (int i = 0; i <= size.dummyCount; i++) {
|
||||
if (i!=dummy&&worldObj.getTileEntity(pos.offset(EnumFacing.UP, i-dummy)) instanceof TileEntityJacobsLadder) {
|
||||
worldObj.setBlockToAir(pos.offset(EnumFacing.UP, i-dummy));
|
||||
if (i != dummy && worldObj.getTileEntity(pos.offset(EnumFacing.UP, i - dummy)) instanceof TileEntityJacobsLadder) {
|
||||
worldObj.setBlockToAir(pos.offset(EnumFacing.UP, i - dummy));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -271,10 +282,12 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
public void onSync(NBTTagCompound nbt) {
|
||||
if (nbt.getBoolean("cancel")) {
|
||||
timeTillActive = -1;
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, -1, soundPos);
|
||||
} else {
|
||||
readArcStarter(nbt);
|
||||
}
|
||||
}
|
||||
|
||||
//ENERGY
|
||||
@Override
|
||||
public double getDemandedEnergy() {
|
||||
|
@ -288,12 +301,12 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
|
||||
@Override
|
||||
public double injectEnergy(EnumFacing dir, double amount, double voltage) {
|
||||
return amount-energy.insertEU(amount, true);
|
||||
return amount - energy.insertEU(amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsEnergyFrom(IEnergyEmitter iEnergyEmitter, EnumFacing enumFacing) {
|
||||
return !isDummy()&&enumFacing!=EnumFacing.UP;
|
||||
return !isDummy() && enumFacing != EnumFacing.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -301,17 +314,17 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
if (isDummy()) {
|
||||
return false;
|
||||
}
|
||||
if (facing==EnumFacing.UP) {
|
||||
if (facing == EnumFacing.UP) {
|
||||
return false;
|
||||
}
|
||||
return capability== CapabilityEnergy.ENERGY;
|
||||
return capability == CapabilityEnergy.ENERGY;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getCapability(Capability<T> capability, @Nullable EnumFacing facing) {
|
||||
if (hasCapability(capability, facing)) {
|
||||
if (capability==CapabilityEnergy.ENERGY) {
|
||||
if (capability == CapabilityEnergy.ENERGY) {
|
||||
return (T) new EnergyCap();
|
||||
}
|
||||
}
|
||||
|
@ -320,7 +333,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
|
||||
@Override
|
||||
public void onChunkUnload() {
|
||||
if (!worldObj.isRemote&&addedToIC2Net)
|
||||
if (!worldObj.isRemote && addedToIC2Net)
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
addedToIC2Net = false;
|
||||
super.onChunkUnload();
|
||||
|
@ -328,20 +341,32 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
if (!worldObj.isRemote&&addedToIC2Net) {
|
||||
if (!worldObj.isRemote && addedToIC2Net) {
|
||||
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent(this));
|
||||
} else if (worldObj.isRemote) {
|
||||
//stop sound
|
||||
IndustrialWires.proxy.playJacobsLadderSound(this, -1, soundPos);
|
||||
}
|
||||
addedToIC2Net = false;
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
return new AxisAlignedBB(pos, pos.add(1, 2, 1));
|
||||
}
|
||||
|
||||
public enum LadderSize implements IStringSerializable {
|
||||
SMALL(4, 4, .5, .375, .1, 20, .05, .2, .05, .5, 0, 5, 5, .03725),
|
||||
NORMAL(4, 4, 1.8, 1.125, .25, 30, .2, .5, .3, 1, 1, 5, 10, .075),
|
||||
HUGE(4, 5, 1.8, 2.25, .25, 30, .2, .5, .3, 1, 2, 5, 10, .125);
|
||||
/*
|
||||
all on a block (HV transformer)
|
||||
small: height = .5 bottomDist = .15 topDist = .375
|
||||
normal: height = .95 bottomDist = .2 topDist = .75
|
||||
huge: height = 1.8 bottomDist = .25 topDist = 1
|
||||
|
||||
*/
|
||||
SMALL(4, 4, .5, .375, .15, 20, .05, .2, .05, 1, 1, 5, 8, .03725, 1),
|
||||
NORMAL(4, 4, .95, .75, .2, 25, .15, .3, .15, 1, 1, 5, 9, .075, 2),
|
||||
HUGE(4, 5, 1.8, 1, .25, 30, .2, .5, .3, 1, 2, 5, 10, .125, 3);
|
||||
public final int arcPoints;
|
||||
public final int movementPoints;
|
||||
// height of the electrodes
|
||||
|
@ -364,12 +389,13 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
public final int renderPoints;
|
||||
public final int dummyCount;
|
||||
public final double renderDiameter;
|
||||
public final float soundVolume;
|
||||
|
||||
private LadderSize(int arcP, int movP, double h, double topD, double bottomD, int ttTop, double zMax, double extraH,
|
||||
double iOff, double hOff, int dummies, int delay, int points, double renderDia) {
|
||||
LadderSize(int arcP, int movP, double height, double topD, double bottomD, int ttTop, double zMax, double extraH,
|
||||
double iOff, double hOff, int dummies, int delay, int points, double renderDia, float volume) {
|
||||
arcPoints = arcP;
|
||||
movementPoints = movP;
|
||||
height = h;
|
||||
this.height = height;
|
||||
topDistance = topD;
|
||||
bottomDistance = bottomD;
|
||||
tickToTop = ttTop;
|
||||
|
@ -381,6 +407,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
this.delay = delay;
|
||||
renderPoints = points;
|
||||
renderDiameter = renderDia;
|
||||
soundVolume = volume;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -388,6 +415,7 @@ public class TileEntityJacobsLadder extends TileEntityIEBase implements ITickabl
|
|||
return name().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
public class EnergyCap implements IEnergyStorage {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
/*
|
||||
* This file is part of Industrial Wires.
|
||||
* Copyright (C) 2016 malte0811
|
||||
* 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
|
||||
|
@ -14,7 +14,7 @@
|
|||
*
|
||||
* 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.converter;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -70,11 +70,7 @@ public class BlockMechanicalConverter extends Block implements IMetaEnum, ITileE
|
|||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
type = PropertyEnum.create("type", MechanicalBlockType.class);
|
||||
BlockStateContainer container = new BlockStateContainer(this,
|
||||
new IProperty[]{
|
||||
type,
|
||||
IEProperties.FACING_ALL
|
||||
});
|
||||
BlockStateContainer container = new BlockStateContainer(this, type, IEProperties.FACING_ALL);
|
||||
return container;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
|
@ -175,15 +176,15 @@ public class ClientProxy extends CommonProxy {
|
|||
return Minecraft.getMinecraft().theWorld;
|
||||
}
|
||||
|
||||
private WeakHashMap<TileEntityJacobsLadder, ISound> playingSounds = new WeakHashMap<>();
|
||||
private WeakHashMap<BlockPos, ISound> playingSounds = new WeakHashMap<>();
|
||||
private static ResourceLocation jacobsStart = new ResourceLocation(IndustrialWires.MODID, "jacobs_ladder_start");//~470 ms ~=9 ticks
|
||||
private static ResourceLocation jacobsMiddle = new ResourceLocation(IndustrialWires.MODID, "jacobs_ladder_middle");
|
||||
private static ResourceLocation jacobsEnd = new ResourceLocation(IndustrialWires.MODID, "jacobs_ladder_end");//~210 ms ~= 4 ticks
|
||||
@Override
|
||||
public void playJacobsLadderSound(TileEntityJacobsLadder te, int phase, Vec3d soundPos) {
|
||||
if (playingSounds.containsKey(te)) {
|
||||
Minecraft.getMinecraft().getSoundHandler().stopSound(playingSounds.get(te));
|
||||
playingSounds.remove(te);
|
||||
if (playingSounds.containsKey(te.getPos())) {
|
||||
Minecraft.getMinecraft().getSoundHandler().stopSound(playingSounds.get(te.getPos()));
|
||||
playingSounds.remove(te.getPos());
|
||||
}
|
||||
ResourceLocation event;
|
||||
switch (phase) {
|
||||
|
@ -199,8 +200,8 @@ public class ClientProxy extends CommonProxy {
|
|||
default:
|
||||
return;
|
||||
}
|
||||
PositionedSoundRecord sound = new PositionedSoundRecord(event, SoundCategory.BLOCKS, 1, 1, false, 0, ISound.AttenuationType.LINEAR, (float)soundPos.xCoord, (float)soundPos.yCoord, (float) soundPos.zCoord);
|
||||
PositionedSoundRecord sound = new PositionedSoundRecord(event, SoundCategory.BLOCKS, te.size.soundVolume, 1, false, 0, ISound.AttenuationType.LINEAR, (float)soundPos.xCoord, (float)soundPos.yCoord, (float) soundPos.zCoord);
|
||||
ClientUtils.mc().getSoundHandler().playSound(sound);
|
||||
playingSounds.put(te, sound);
|
||||
playingSounds.put(te.getPos(), sound);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@ public class TileRenderJacobsLadder extends TileEntitySpecialRenderer<TileEntity
|
|||
public void renderTileEntityAt(TileEntityJacobsLadder tile, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
super.renderTileEntityAt(tile, x, y, z, partialTicks, destroyStage);
|
||||
if (!tile.isDummy()&&tile.timeTillActive==0&&tile.controls[0] != null) {
|
||||
//TODO move to size
|
||||
final int steps = 10;
|
||||
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + .5 - tile.size.bottomDistance / 2, y + tile.size.heightOffset, z + .5);
|
||||
GlStateManager.translate(x + .5, y + tile.size.heightOffset, z + .5);
|
||||
GlStateManager.rotate(tile.facing.getHorizontalAngle(), 0, 1, 0);
|
||||
GlStateManager.translate( - tile.size.bottomDistance / 2, 0, 0);
|
||||
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.disableLighting();
|
||||
|
@ -54,10 +54,21 @@ public class TileRenderJacobsLadder extends TileEntitySpecialRenderer<TileEntity
|
|||
Vec3d speed = tile.controlMovement[i];
|
||||
controls[i] = tile.controls[i].addVector(speed.xCoord * partialTicks, speed.yCoord * partialTicks, speed.zCoord * partialTicks);
|
||||
}
|
||||
drawBezier(controls, tile.size.renderDiameter, steps);
|
||||
drawBezier(controls, tile.size.renderDiameter, tile.size.renderPoints);
|
||||
//DEBUG CODE
|
||||
/*for (Vec3d[] c:tile.controlControls) {
|
||||
drawBezier(c, .05, steps);
|
||||
}*/
|
||||
}
|
||||
Vec3d topA = tile.controlMovement[0].scale(tile.size.tickToTop);
|
||||
Vec3d topB = tile.controlMovement[tile.controlMovement.length-1].scale(tile.size.tickToTop).add(new Vec3d(tile.size.bottomDistance, 0, 0));
|
||||
|
||||
Tessellator tes = Tessellator.getInstance();
|
||||
VertexBuffer vertBuffer = tes.getBuffer();
|
||||
vertBuffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION);
|
||||
drawQuad(Vec3d.ZERO, topA, new Vec3d(.005, 0, 0), vertBuffer);
|
||||
drawQuad(new Vec3d(tile.size.bottomDistance, 0, 0), topB, new Vec3d(.005, 0, 0), vertBuffer);
|
||||
tes.draw();*/
|
||||
//END OF DEBUG CODE
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, oldBX, oldBY);
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
package malte0811.industrialWires.util;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class DualEnergyStorage {
|
||||
double storedEU;
|
||||
double maxEU;
|
||||
|
@ -25,9 +27,13 @@ public class DualEnergyStorage {
|
|||
double maxInEU;
|
||||
|
||||
public DualEnergyStorage(double maxEU, double maxInEU, double maxOutEU) {
|
||||
this(0, maxEU, maxInEU, maxOutEU);
|
||||
}
|
||||
public DualEnergyStorage(double storedEU, double maxEU, double maxInEU, double maxOutEU) {
|
||||
this.maxEU = maxEU;
|
||||
this.maxInEU = maxInEU;
|
||||
this.maxOutEU = maxOutEU;
|
||||
this.storedEU = storedEU;
|
||||
}
|
||||
|
||||
public DualEnergyStorage(double maxEU, double maxIoEU) {
|
||||
|
@ -95,4 +101,18 @@ public class DualEnergyStorage {
|
|||
public double getEURequested() {
|
||||
return Math.min(maxInEU, maxEU - storedEU);
|
||||
}
|
||||
|
||||
public void writeToNbt(NBTTagCompound nbtOuter, String key) {
|
||||
NBTTagCompound nbt = key==null?nbtOuter:new NBTTagCompound();
|
||||
nbt.setDouble("stored", storedEU);
|
||||
nbt.setDouble("maxStored", maxEU);
|
||||
nbt.setDouble("maxIn", maxInEU);
|
||||
nbt.setDouble("maxOut", maxOutEU);
|
||||
if (key!=null) {
|
||||
nbtOuter.setTag(key, nbt);
|
||||
}
|
||||
}
|
||||
public static DualEnergyStorage readFromNBT(NBTTagCompound nbt) {
|
||||
return new DualEnergyStorage(nbt.getDouble("stored"), nbt.getDouble("maxStored"), nbt.getDouble("maxIn"), nbt.getDouble("maxOut"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,55 +12,55 @@
|
|||
"variants": {
|
||||
"inventory,type=small": [
|
||||
{
|
||||
"model": "industrialwires:jacobs_ladder.obj",
|
||||
"model": "industrialwires:jacobs_small.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 ] }
|
||||
"scale": [ 0.25, 0.25, 0.25 ],
|
||||
"firstperson_righthand": { "scale": [ 0.9, 0.9, 0.9 ], "rotation": [{ "y": 180 }] },
|
||||
"firstperson_lefthand": { "scale": [ 0.9, 0.9, 0.9 ], "rotation": [{ "y": 180 }] },
|
||||
"thirdperson_righthand": { "translation": [ 0, 0.09375, -0.171875 ], "rotation": [{ "x": 70 }, { "y": 70 }] },
|
||||
"thirdperson_lefthand": { "translation": [ 0, 0.09375, -0.171875 ], "rotation": [{ "x": 70 }, { "y": 70 }] },
|
||||
"fixed": {"scale": [ 2,2,2 ], "translation": [ 0, 0, 0 ], "rotation": [{ "y": 0 }]},
|
||||
"gui": { "translation": [ 0, -0.0625, 0 ], "rotation": [{ "x": 30 },{ "y": 135 }], "scale": [ 2.25, 2.25, 2.25 ] }
|
||||
}
|
||||
}
|
||||
],
|
||||
"inventory,type=normal": [
|
||||
{
|
||||
"model": "industrialwires:jacobs_ladder.obj",
|
||||
"model": "industrialwires:jacobs_normal.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 ] }
|
||||
"scale": [ 0.25, 0.25, 0.25 ],
|
||||
"firstperson_righthand": { "scale": [ 0.75, 0.75, 0.75 ], "rotation": [{ "y": 180 }] },
|
||||
"firstperson_lefthand": { "scale": [ 0.75, 0.75, 0.75 ], "rotation": [{ "y": 180 }] },
|
||||
"thirdperson_righthand": { "translation": [ 0, 0.09375, -0.171875 ], "rotation": [{ "x": 70 }, { "y": 70 }] },
|
||||
"thirdperson_lefthand": { "translation": [ 0, 0.09375, -0.171875 ], "rotation": [{ "x": 70 }, { "y": 70 }] },
|
||||
"fixed": {"scale": [ 2,2,2 ], "translation": [ 0, -0.25, 0 ], "rotation": [{ "y": 0 }]},
|
||||
"gui": { "translation": [ 0, -0.1875, 0 ], "rotation": [{ "x": 30 },{ "y": 135 }], "scale": [ 1.6, 1.6, 1.6 ] }
|
||||
}
|
||||
}
|
||||
],
|
||||
"inventory,type=huge": [
|
||||
{
|
||||
"model": "industrialwires:jacobs_ladder.obj",
|
||||
"model": "industrialwires:jacobs_huge.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 ] }
|
||||
"scale": [ 0.25, 0.25, 0.25 ],
|
||||
"firstperson_righthand": { "scale": [ 0.75, 0.75, 0.75 ], "rotation": [{ "y": 180 }] },
|
||||
"firstperson_lefthand": { "scale": [ 0.75, 0.75, 0.75 ], "rotation": [{ "y": 180 }] },
|
||||
"thirdperson_righthand": { "translation": [ 0, 0.09375, -0.171875 ], "rotation": [{ "x": 70 }, { "y": 70 }] },
|
||||
"thirdperson_lefthand": { "translation": [ 0, 0.09375, -0.171875 ], "rotation": [{ "x": 70 }, { "y": 70 }] },
|
||||
"fixed": {"scale": [ 2,2,2 ], "translation": [ 0, -0.25, 0 ], "rotation": [{ "y": 0 }]},
|
||||
"gui": { "translation": [ 0, -0.25, 0 ], "rotation": [{ "x": 30 },{ "y": 135 }], "scale": [ 1.2, 1.2, 1.2 ] }
|
||||
}
|
||||
}
|
||||
],
|
||||
"size": {
|
||||
"small": {
|
||||
"model": "builtin/generated"
|
||||
"model": "industrialwires:jacobs_small.obj"
|
||||
},
|
||||
"normal": {
|
||||
"model": "builtin/generated"
|
||||
"model": "industrialwires:jacobs_normal.obj"
|
||||
},
|
||||
"huge": {
|
||||
"model": "industrialwires:jacobs_ladder.obj"
|
||||
"model": "industrialwires:jacobs_huge.obj"
|
||||
}
|
||||
},
|
||||
"_0multiblockslave":
|
||||
|
@ -69,6 +69,21 @@
|
|||
"true":{
|
||||
"model": "builtin/generated"
|
||||
}
|
||||
},
|
||||
"facing":
|
||||
{
|
||||
"north": { "transform": {
|
||||
"rotation": {"y": 0 }
|
||||
}},
|
||||
"south": { "transform": {
|
||||
"rotation": {"y": 180 }
|
||||
}},
|
||||
"west": { "transform": {
|
||||
"rotation": {"y": 90 }
|
||||
}},
|
||||
"east": { "transform": {
|
||||
"rotation": {"y": -90 }
|
||||
}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Blender MTL File: 'None'
|
||||
# Blender MTL File: 'jacobsSmall.blend'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
|
@ -0,0 +1,118 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'jacobsSmall.blend'
|
||||
# www.blender.org
|
||||
mtllib jacobs_huge.mtl
|
||||
o Cube.011_Cube.019
|
||||
v 0.969407 2.806373 0.593750
|
||||
v 1.007648 2.989932 0.593750
|
||||
v 0.969407 2.806373 0.406250
|
||||
v 1.007648 2.989932 0.406250
|
||||
v 1.152966 2.768132 0.593750
|
||||
v 1.191207 2.951691 0.593750
|
||||
v 1.152966 2.768132 0.406250
|
||||
v 1.191207 2.951691 0.406250
|
||||
vn -0.9790 0.2040 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.9790 -0.2040 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.2040 -0.9790 0.0000
|
||||
vn 0.2040 0.9790 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 1//1 2//1 4//1 3//1
|
||||
f 3//2 4//2 8//2 7//2
|
||||
f 7//3 8//3 6//3 5//3
|
||||
f 5//4 6//4 2//4 1//4
|
||||
f 3//5 7//5 5//5 1//5
|
||||
f 8//6 4//6 2//6 6//6
|
||||
o Cube.010_Cube.018
|
||||
v 0.625000 1.000000 0.562500
|
||||
v 1.000000 2.800000 0.562500
|
||||
v 0.625000 1.000000 0.437500
|
||||
v 1.000000 2.800000 0.437500
|
||||
v 0.747373 0.974506 0.562500
|
||||
v 1.122373 2.774506 0.562500
|
||||
v 0.747373 0.974506 0.437500
|
||||
v 1.122373 2.774506 0.437500
|
||||
vn -0.9790 0.2040 0.0000
|
||||
vn -0.0000 0.0000 -1.0000
|
||||
vn 0.9790 -0.2040 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.2040 -0.9790 0.0000
|
||||
vn 0.2040 0.9790 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 9//7 10//7 12//7 11//7
|
||||
f 11//8 12//8 16//8 15//8
|
||||
f 15//9 16//9 14//9 13//9
|
||||
f 13//10 14//10 10//10 9//10
|
||||
f 11//11 15//11 13//11 9//11
|
||||
f 16//12 12//12 10//12 14//12
|
||||
o Cube.009_Cube.017
|
||||
v 0.000000 0.000000 1.000000
|
||||
v 0.000000 1.000000 1.000000
|
||||
v 0.000000 0.000000 0.000000
|
||||
v 0.000000 1.000000 0.000000
|
||||
v 1.000000 0.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 0.000000 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
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 None
|
||||
s off
|
||||
f 17//13 18//13 20//13 19//13
|
||||
f 19//14 20//14 24//14 23//14
|
||||
f 23//15 24//15 22//15 21//15
|
||||
f 21//16 22//16 18//16 17//16
|
||||
f 19//17 23//17 21//17 17//17
|
||||
f 24//18 20//18 18//18 22//18
|
||||
o Cube.012_Cube.020
|
||||
v 0.375000 1.000000 0.437500
|
||||
v 0.000000 2.800000 0.437500
|
||||
v 0.375000 1.000000 0.562500
|
||||
v 0.000000 2.800000 0.562500
|
||||
v 0.252627 0.974506 0.437500
|
||||
v -0.122373 2.774506 0.437500
|
||||
v 0.252627 0.974506 0.562500
|
||||
v -0.122373 2.774506 0.562500
|
||||
vn 0.9790 0.2040 0.0000
|
||||
vn -0.0000 0.0000 1.0000
|
||||
vn -0.9790 -0.2040 0.0000
|
||||
vn -0.0000 -0.0000 -1.0000
|
||||
vn 0.2040 -0.9790 0.0000
|
||||
vn -0.2040 0.9790 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 25//19 26//19 28//19 27//19
|
||||
f 27//20 28//20 32//20 31//20
|
||||
f 31//21 32//21 30//21 29//21
|
||||
f 29//22 30//22 26//22 25//22
|
||||
f 27//23 31//23 29//23 25//23
|
||||
f 32//24 28//24 26//24 30//24
|
||||
o Cube.013_Cube.021
|
||||
v 0.030593 2.806373 0.406250
|
||||
v -0.007648 2.989932 0.406250
|
||||
v 0.030593 2.806373 0.593750
|
||||
v -0.007648 2.989932 0.593750
|
||||
v -0.152966 2.768132 0.406250
|
||||
v -0.191207 2.951691 0.406250
|
||||
v -0.152966 2.768132 0.593750
|
||||
v -0.191207 2.951691 0.593750
|
||||
vn 0.9790 0.2040 0.0000
|
||||
vn -0.0000 0.0000 1.0000
|
||||
vn -0.9790 -0.2040 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.2040 -0.9790 -0.0000
|
||||
vn -0.2040 0.9790 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 33//25 34//25 36//25 35//25
|
||||
f 35//26 36//26 40//26 39//26
|
||||
f 39//27 40//27 38//27 37//27
|
||||
f 37//28 38//28 34//28 33//28
|
||||
f 35//29 39//29 37//29 33//29
|
||||
f 40//30 36//30 34//30 38//30
|
|
@ -1,84 +0,0 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: ''
|
||||
# www.blender.org
|
||||
o Cube_Cube.003
|
||||
v -0.218750 2.906250 0.593750
|
||||
v -0.218750 3.093750 0.593750
|
||||
v -0.218750 2.906250 0.406250
|
||||
v -0.218750 3.093750 0.406250
|
||||
v -0.031250 2.906250 0.593750
|
||||
v -0.031250 3.093750 0.593750
|
||||
v -0.031250 2.906250 0.406250
|
||||
v -0.031250 3.093750 0.406250
|
||||
v 0.000000 0.000000 1.000000
|
||||
v 0.000000 1.000000 1.000000
|
||||
v 0.000000 0.000000 0.000000
|
||||
v 0.000000 1.000000 0.000000
|
||||
v 1.000000 0.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 0.000000 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
v 0.587500 0.984049 0.562500
|
||||
v 1.037500 2.984049 0.562500
|
||||
v 0.587500 0.984049 0.437500
|
||||
v 1.037500 2.984049 0.437500
|
||||
v 0.712500 0.984049 0.562500
|
||||
v 1.162500 2.984049 0.562500
|
||||
v 0.712500 0.984049 0.437500
|
||||
v 1.162500 2.984049 0.437500
|
||||
v 0.412500 0.984049 0.437500
|
||||
v -0.037500 2.984049 0.437500
|
||||
v 0.412500 0.984049 0.562500
|
||||
v -0.037500 2.984049 0.562500
|
||||
v 0.287500 0.984049 0.437500
|
||||
v -0.162500 2.984049 0.437500
|
||||
v 0.287500 0.984049 0.562500
|
||||
v -0.162500 2.984049 0.562500
|
||||
v 1.031250 2.906250 0.593750
|
||||
v 1.031250 3.093750 0.593750
|
||||
v 1.031250 2.906250 0.406250
|
||||
v 1.031250 3.093750 0.406250
|
||||
v 1.218750 2.906250 0.593750
|
||||
v 1.218750 3.093750 0.593750
|
||||
v 1.218750 2.906250 0.406250
|
||||
v 1.218750 3.093750 0.406250
|
||||
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
|
||||
vn -0.9756 0.2195 0.0000
|
||||
vn 0.9756 -0.2195 0.0000
|
||||
vn 0.9756 0.2195 -0.0000
|
||||
vn -0.9756 -0.2195 0.0000
|
||||
s off
|
||||
f 1//1 2//1 4//1 3//1
|
||||
f 3//2 4//2 8//2 7//2
|
||||
f 7//3 8//3 6//3 5//3
|
||||
f 5//4 6//4 2//4 1//4
|
||||
f 3//5 7//5 5//5 1//5
|
||||
f 8//6 4//6 2//6 6//6
|
||||
f 9//1 10//1 12//1 11//1
|
||||
f 11//2 12//2 16//2 15//2
|
||||
f 15//3 16//3 14//3 13//3
|
||||
f 13//4 14//4 10//4 9//4
|
||||
f 11//5 15//5 13//5 9//5
|
||||
f 16//6 12//6 10//6 14//6
|
||||
f 17//7 18//7 20//7 19//7
|
||||
f 19//2 20//2 24//2 23//2
|
||||
f 23//8 24//8 22//8 21//8
|
||||
f 21//4 22//4 18//4 17//4
|
||||
f 19//5 23//5 21//5 17//5
|
||||
f 24//6 20//6 18//6 22//6
|
||||
f 25//9 26//9 28//9 27//9
|
||||
f 27//4 28//4 32//4 31//4
|
||||
f 31//10 32//10 30//10 29//10
|
||||
f 29//2 30//2 26//2 25//2
|
||||
f 27//5 31//5 29//5 25//5
|
||||
f 32//6 28//6 26//6 30//6
|
||||
f 33//1 34//1 36//1 35//1
|
||||
f 35//2 36//2 40//2 39//2
|
||||
f 39//3 40//3 38//3 37//3
|
||||
f 37//4 38//4 34//4 33//4
|
||||
f 35//5 39//5 37//5 33//5
|
||||
f 40//6 36//6 34//6 38//6
|
|
@ -0,0 +1,10 @@
|
|||
# Blender MTL File: 'jacobsSmall.blend'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl None
|
||||
Ns 0
|
||||
Ka 0.000000 0.000000 0.000000
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
d 1
|
||||
illum 2
|
|
@ -0,0 +1,118 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'jacobsSmall.blend'
|
||||
# www.blender.org
|
||||
mtllib jacobs_normal.mtl
|
||||
o Cube.007_Cube.015
|
||||
v 0.844979 1.958689 0.562500
|
||||
v 0.879736 2.078760 0.562500
|
||||
v 0.844979 1.958689 0.437500
|
||||
v 0.879736 2.078760 0.437500
|
||||
v 0.965050 1.923932 0.562500
|
||||
v 0.999807 2.044003 0.562500
|
||||
v 0.965050 1.923932 0.437500
|
||||
v 0.999807 2.044003 0.437500
|
||||
vn -0.9606 0.2781 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.9606 -0.2781 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.2781 -0.9606 0.0000
|
||||
vn 0.2781 0.9606 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 1//1 2//1 4//1 3//1
|
||||
f 3//2 4//2 8//2 7//2
|
||||
f 7//3 8//3 6//3 5//3
|
||||
f 5//4 6//4 2//4 1//4
|
||||
f 3//5 7//5 5//5 1//5
|
||||
f 8//6 4//6 2//6 6//6
|
||||
o Cube.005_Cube.013
|
||||
v 0.599997 1.000000 0.531250
|
||||
v 0.874997 1.950000 0.531250
|
||||
v 0.599997 1.000000 0.468750
|
||||
v 0.874997 1.950000 0.468750
|
||||
v 0.660032 0.982621 0.531250
|
||||
v 0.935032 1.932621 0.531250
|
||||
v 0.660032 0.982621 0.468750
|
||||
v 0.935032 1.932621 0.468750
|
||||
vn -0.9606 0.2781 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.9606 -0.2781 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.2781 -0.9606 0.0000
|
||||
vn 0.2781 0.9606 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 9//7 10//7 12//7 11//7
|
||||
f 11//8 12//8 16//8 15//8
|
||||
f 15//9 16//9 14//9 13//9
|
||||
f 13//10 14//10 10//10 9//10
|
||||
f 11//11 15//11 13//11 9//11
|
||||
f 16//12 12//12 10//12 14//12
|
||||
o Cube.001_Cube.005
|
||||
v 0.000000 0.000000 1.000000
|
||||
v 0.000000 1.000000 1.000000
|
||||
v 0.000000 0.000000 0.000000
|
||||
v 0.000000 1.000000 0.000000
|
||||
v 1.000000 0.000000 1.000000
|
||||
v 1.000000 1.000000 1.000000
|
||||
v 1.000000 0.000000 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
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 None
|
||||
s off
|
||||
f 17//13 18//13 20//13 19//13
|
||||
f 19//14 20//14 24//14 23//14
|
||||
f 23//15 24//15 22//15 21//15
|
||||
f 21//16 22//16 18//16 17//16
|
||||
f 19//17 23//17 21//17 17//17
|
||||
f 24//18 20//18 18//18 22//18
|
||||
o Cube.006_Cube.014
|
||||
v 0.399997 1.000000 0.468750
|
||||
v 0.124997 1.950000 0.468750
|
||||
v 0.399997 1.000000 0.531250
|
||||
v 0.124997 1.950000 0.531250
|
||||
v 0.339962 0.982621 0.468750
|
||||
v 0.064962 1.932621 0.468750
|
||||
v 0.339962 0.982621 0.531250
|
||||
v 0.064962 1.932621 0.531250
|
||||
vn 0.9606 0.2781 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.9606 -0.2781 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.2781 -0.9606 0.0000
|
||||
vn -0.2781 0.9606 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 25//19 26//19 28//19 27//19
|
||||
f 27//20 28//20 32//20 31//20
|
||||
f 31//21 32//21 30//21 29//21
|
||||
f 29//22 30//22 26//22 25//22
|
||||
f 27//23 31//23 29//23 25//23
|
||||
f 32//24 28//24 26//24 30//24
|
||||
o Cube.008_Cube.016
|
||||
v 0.155015 1.958689 0.437500
|
||||
v 0.120257 2.078760 0.437500
|
||||
v 0.155015 1.958689 0.562500
|
||||
v 0.120257 2.078760 0.562500
|
||||
v 0.034944 1.923932 0.437500
|
||||
v 0.000187 2.044003 0.437500
|
||||
v 0.034944 1.923932 0.562500
|
||||
v 0.000187 2.044003 0.562500
|
||||
vn 0.9606 0.2781 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.9606 -0.2781 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.2781 -0.9606 -0.0000
|
||||
vn -0.2781 0.9606 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 33//25 34//25 36//25 35//25
|
||||
f 35//26 36//26 40//26 39//26
|
||||
f 39//27 40//27 38//27 37//27
|
||||
f 37//28 38//28 34//28 33//28
|
||||
f 35//29 39//29 37//29 33//29
|
||||
f 40//30 36//30 34//30 38//30
|
|
@ -0,0 +1,20 @@
|
|||
# Blender MTL File: 'jacobsSmall.blend'
|
||||
# Material Count: 2
|
||||
|
||||
newmtl Material
|
||||
Ns 96.078431
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.640000 0.640000 0.640000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.000000
|
||||
d 1.000000
|
||||
illum 2
|
||||
|
||||
newmtl None
|
||||
Ns 0
|
||||
Ka 0.000000 0.000000 0.000000
|
||||
Kd 0.8 0.8 0.8
|
||||
Ks 0.8 0.8 0.8
|
||||
d 1
|
||||
illum 2
|
|
@ -0,0 +1,118 @@
|
|||
# Blender v2.78 (sub 0) OBJ File: 'jacobsSmall.blend'
|
||||
# www.blender.org
|
||||
mtllib jacobs_small.mtl
|
||||
o Cube_Cube.011
|
||||
v 0.734761 1.425304 0.531250
|
||||
v 0.748480 1.486280 0.531250
|
||||
v 0.734761 1.425304 0.468750
|
||||
v 0.748480 1.486280 0.468750
|
||||
v 0.795736 1.411585 0.531250
|
||||
v 0.809456 1.472560 0.531250
|
||||
v 0.795736 1.411585 0.468750
|
||||
v 0.809456 1.472560 0.468750
|
||||
vn -0.9756 0.2195 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.9756 -0.2195 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.2195 -0.9756 0.0000
|
||||
vn 0.2195 0.9756 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 1//1 2//1 4//1 3//1
|
||||
f 3//2 4//2 8//2 7//2
|
||||
f 7//3 8//3 6//3 5//3
|
||||
f 5//4 6//4 2//4 1//4
|
||||
f 3//5 7//5 5//5 1//5
|
||||
f 8//6 4//6 2//6 6//6
|
||||
o Cube.004_Cube.008
|
||||
v 0.999999 0.000000 0.000000
|
||||
v 0.999999 0.000000 1.000000
|
||||
v -0.000000 0.000000 1.000000
|
||||
v 0.000000 0.000000 0.000000
|
||||
v 1.000000 1.000000 0.000000
|
||||
v 0.999999 1.000000 1.000000
|
||||
v -0.000000 1.000000 1.000000
|
||||
v -0.000000 1.000000 0.000000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 -0.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
|
||||
usemtl Material
|
||||
s off
|
||||
f 9//7 10//7 11//7 12//7
|
||||
f 13//8 16//8 15//8 14//8
|
||||
f 9//9 13//9 14//9 10//9
|
||||
f 10//10 14//10 15//10 11//10
|
||||
f 11//11 15//11 16//11 12//11
|
||||
f 13//12 9//12 12//12 16//12
|
||||
o Cube.000_Cube.009
|
||||
v 0.425005 1.000000 0.468750
|
||||
v 0.312505 1.500000 0.468750
|
||||
v 0.425005 1.000000 0.531250
|
||||
v 0.312505 1.500000 0.531250
|
||||
v 0.364029 0.986280 0.468750
|
||||
v 0.251529 1.486280 0.468750
|
||||
v 0.364029 0.986280 0.531250
|
||||
v 0.251529 1.486280 0.531250
|
||||
vn 0.9756 0.2195 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.9756 -0.2195 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.2195 -0.9756 0.0000
|
||||
vn -0.2195 0.9756 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 17//13 18//13 20//13 19//13
|
||||
f 19//14 20//14 24//14 23//14
|
||||
f 23//15 24//15 22//15 21//15
|
||||
f 21//16 22//16 18//16 17//16
|
||||
f 19//17 23//17 21//17 17//17
|
||||
f 24//18 20//18 18//18 22//18
|
||||
o Cube.002_Cube.010
|
||||
v 0.575005 1.000000 0.531250
|
||||
v 0.687505 1.500000 0.531250
|
||||
v 0.575005 1.000000 0.468750
|
||||
v 0.687505 1.500000 0.468750
|
||||
v 0.635980 0.986280 0.531250
|
||||
v 0.748480 1.486280 0.531250
|
||||
v 0.635980 0.986280 0.468750
|
||||
v 0.748480 1.486280 0.468750
|
||||
vn -0.9756 0.2195 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.9756 -0.2195 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.2195 -0.9756 0.0000
|
||||
vn 0.2195 0.9756 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 25//19 26//19 28//19 27//19
|
||||
f 27//20 28//20 32//20 31//20
|
||||
f 31//21 32//21 30//21 29//21
|
||||
f 29//22 30//22 26//22 25//22
|
||||
f 27//23 31//23 29//23 25//23
|
||||
f 32//24 28//24 26//24 30//24
|
||||
o Cube.003_Cube.012
|
||||
v 0.265249 1.425304 0.468750
|
||||
v 0.251529 1.486280 0.468750
|
||||
v 0.265249 1.425304 0.531250
|
||||
v 0.251529 1.486280 0.531250
|
||||
v 0.204273 1.411585 0.468750
|
||||
v 0.190554 1.472560 0.468750
|
||||
v 0.204273 1.411585 0.531250
|
||||
v 0.190554 1.472560 0.531250
|
||||
vn 0.9756 0.2195 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn -0.9756 -0.2195 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 0.2195 -0.9756 0.0000
|
||||
vn -0.2195 0.9756 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 33//25 34//25 36//25 35//25
|
||||
f 35//26 36//26 40//26 39//26
|
||||
f 39//27 40//27 38//27 37//27
|
||||
f 37//28 38//28 34//28 33//28
|
||||
f 35//29 39//29 37//29 33//29
|
||||
f 40//30 36//30 34//30 38//30
|
Loading…
Reference in a new issue