mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
commit
1df34a3fa3
10
src/main/java/api/hbm/block/IBlowable.java
Normal file
10
src/main/java/api/hbm/block/IBlowable.java
Normal file
@ -0,0 +1,10 @@
|
||||
package api.hbm.block;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IBlowable { //sloppy toppy
|
||||
|
||||
/** Called server-side when a fan blows on an IBlowable in range every tick. */
|
||||
public void applyFan(World world, int x, int y, int z, ForgeDirection dir, int dist);
|
||||
}
|
||||
10
src/main/java/api/hbm/block/IInsertable.java
Normal file
10
src/main/java/api/hbm/block/IInsertable.java
Normal file
@ -0,0 +1,10 @@
|
||||
package api.hbm.block;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface IInsertable { //uwu
|
||||
|
||||
public boolean insertItem(World world, int x, int y, int z, ForgeDirection dir, ItemStack stack);
|
||||
}
|
||||
@ -786,6 +786,8 @@ public class ModBlocks {
|
||||
public static Block crane_splitter;
|
||||
|
||||
public static Block fan;
|
||||
|
||||
public static Block piston_inserter;
|
||||
|
||||
public static Block chain;
|
||||
|
||||
@ -1913,6 +1915,8 @@ public class ModBlocks {
|
||||
crane_splitter = new CraneSplitter().setBlockName("crane_splitter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":crane_side");
|
||||
fan = new MachineFan().setBlockName("fan").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
piston_inserter = new PistonInserter().setBlockName("piston_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
chain = new BlockChain(Material.iron).setBlockName("dungeon_chain").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":chain");
|
||||
|
||||
ladder_sturdy = new BlockNTMLadder().setBlockName("ladder_sturdy").setHardness(0.25F).setResistance(2.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":ladder_sturdy");
|
||||
@ -3122,6 +3126,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(crane_splitter, crane_splitter.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(fan, fan.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(piston_inserter, piston_inserter.getUnlocalizedName());
|
||||
|
||||
GameRegistry.registerBlock(chain, chain.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(ladder_sturdy, ladder_sturdy.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(ladder_iron, ladder_iron.getUnlocalizedName());
|
||||
|
||||
@ -2,9 +2,11 @@ package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import api.hbm.block.IBlowable;
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
@ -79,7 +81,13 @@ public class MachineFan extends BlockContainer implements IToolable {
|
||||
double push = 0.1;
|
||||
|
||||
for(int i = 1; i <= range; i++) {
|
||||
if(worldObj.getBlock(xCoord + dir.offsetX * i, yCoord + dir.offsetY * i, zCoord + dir.offsetZ * i).isNormalCube()) {
|
||||
Block block = worldObj.getBlock(xCoord + dir.offsetX * i, yCoord + dir.offsetY * i, zCoord + dir.offsetZ * i);
|
||||
boolean blowable = block instanceof IBlowable;
|
||||
|
||||
if(block.isNormalCube() || blowable) {
|
||||
if(!worldObj.isRemote && blowable)
|
||||
((IBlowable) block).applyFan(worldObj, xCoord + dir.offsetX * i, yCoord + dir.offsetY * i, zCoord + dir.offsetZ * i, dir, i);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
386
src/main/java/com/hbm/blocks/machine/PistonInserter.java
Normal file
386
src/main/java/com/hbm/blocks/machine/PistonInserter.java
Normal file
@ -0,0 +1,386 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import com.hbm.blocks.BlockContainerBase;
|
||||
import com.hbm.tileentity.INBTPacketReceiver;
|
||||
|
||||
import api.hbm.block.IInsertable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class PistonInserter extends BlockContainerBase {
|
||||
|
||||
public PistonInserter() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityPistonInserter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block neighbor) {
|
||||
this.updateState(world, x, y, z);
|
||||
}
|
||||
|
||||
protected void updateState(World world, int x, int y, int z) {
|
||||
if(!world.isRemote) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||
|
||||
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).isNormalCube())
|
||||
return; //no obstructions allowed!
|
||||
|
||||
boolean flag = checkRedstone(world, x, y, z);
|
||||
TileEntityPistonInserter piston = (TileEntityPistonInserter)world.getTileEntity(x, y, z);
|
||||
|
||||
if(flag && !piston.lastState && piston.extend <= 0)
|
||||
piston.isRetracting = false;
|
||||
|
||||
piston.lastState = flag;
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean checkRedstone(World world, int x, int y, int z) {
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if(world.getIndirectPowerOutput(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, dir.ordinal()))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
if(side != world.getBlockMetadata(x, y, z)) return false;
|
||||
|
||||
if(player.isSneaking()) {
|
||||
if(!world.isRemote) {
|
||||
TileEntityPistonInserter piston = (TileEntityPistonInserter)world.getTileEntity(x, y, z);
|
||||
|
||||
if(piston.slot != null && piston.isRetracting) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(piston.getBlockMetadata());
|
||||
|
||||
EntityItem dust = new EntityItem(world, x + 0.5D + dir.offsetX * 0.75D, y + 0.5D + dir.offsetY * 0.75D, z + 0.5D + dir.offsetZ * 0.75D, piston.slot);
|
||||
piston.slot = null;
|
||||
|
||||
dust.motionX = dir.offsetX * 0.25;
|
||||
dust.motionY = dir.offsetY * 0.25;
|
||||
dust.motionZ = dir.offsetZ * 0.25;
|
||||
world.spawnEntityInWorld(dust);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else if(player.getHeldItem() != null) {
|
||||
if(!world.isRemote) {
|
||||
TileEntityPistonInserter piston = (TileEntityPistonInserter)world.getTileEntity(x, y, z);
|
||||
|
||||
if(piston.slot == null) {
|
||||
piston.slot = player.inventory.decrStackSize(player.inventory.currentItem, 1);
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
return meta != side.ordinal() && meta != side.getOpposite().ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
IInventory tileentityfurnace = (IInventory) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tileentityfurnace != null) {
|
||||
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(0);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = world.rand.nextInt(21) + 10;
|
||||
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) world.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) world.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) world.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
|
||||
world.func_147453_f(x, y, z, block);
|
||||
}
|
||||
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// $%&#$&
|
||||
// %$&&@$%%#%
|
||||
//______ $%@--$@@%&$%$
|
||||
// | %/ *--$#@&&$$
|
||||
// | / --__ %$%@$&
|
||||
// | (----^`--- $@##%
|
||||
// | /___\ `-----*#@$
|
||||
// | /(()_) / /___\ /__
|
||||
// | / \___// (()_) //-,|
|
||||
// | /____|_ / \___// )_/
|
||||
// | \____/ `^-___|___/ |
|
||||
// | \/ \____/ /_-^-.
|
||||
// | / _-' |___. \_
|
||||
// | / _-' / `\ \\___
|
||||
// | `'\____~~+~^/ _)/ \____
|
||||
// | \`----' | __/ _)
|
||||
// | /( /~-' ,-' |
|
||||
// | / `| | / |
|
||||
// | / ( ) / `)
|
||||
// | / `-==-' | |
|
||||
// | / /| | |
|
||||
// | / / \ | |
|
||||
// | / / | | |
|
||||
// | / / \ _____,.____| |
|
||||
// | / _ / |<`____, ____,| |
|
||||
// | / / \_ / _ | <_____/ | )
|
||||
// | / / ^/,^=-~---~' `z---..._______/ |
|
||||
// |--' / /| |/ .^ ,^\ \ )
|
||||
// | |_|| || |(_( ) | |
|
||||
// | \_/`-``-`----'___/_____ |
|
||||
// |___..---' _|____`-----..-----'\
|
||||
// |_____________________| @ | )
|
||||
// average coding session involving tile entities
|
||||
public static class TileEntityPistonInserter extends TileEntity implements IInventory, INBTPacketReceiver {
|
||||
|
||||
public ItemStack slot;
|
||||
|
||||
public int extend; //why don't we just make all these ones serverside? we're never using them on the client anyway
|
||||
public static final int maxExtend = 25;
|
||||
public boolean isRetracting = true;
|
||||
public int delay;
|
||||
|
||||
//prevents funkies from happening with block updates or loading into a server
|
||||
private boolean lastState;
|
||||
|
||||
//when a fake animatorcel gives you something so 20fps you gotta hit him with the true interpolation stare
|
||||
@SideOnly(Side.CLIENT) public double renderExtend;
|
||||
@SideOnly(Side.CLIENT) public double lastExtend;
|
||||
@SideOnly(Side.CLIENT) private int syncExtend; //what are these for?
|
||||
@SideOnly(Side.CLIENT) private int turnProgress;
|
||||
|
||||
public TileEntityPistonInserter() { }
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(delay <= 0) {
|
||||
|
||||
if(this.isRetracting && this.extend > 0) {
|
||||
this.extend--;
|
||||
} else if(!this.isRetracting) {
|
||||
this.extend++;
|
||||
|
||||
if(this.extend >= this.maxExtend) {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "hbm:block.pressOperate", 1.0F, 1.5F);
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
Block b = worldObj.getBlock(xCoord + dir.offsetX * 2, yCoord + dir.offsetY * 2, zCoord + dir.offsetZ * 2);
|
||||
|
||||
if(b instanceof IInsertable && ((IInsertable) b).insertItem(worldObj, xCoord + dir.offsetX * 2, yCoord + dir.offsetY * 2, zCoord + dir.offsetZ * 2, dir, slot)) {
|
||||
this.decrStackSize(0, 1);
|
||||
}
|
||||
|
||||
this.isRetracting = true;
|
||||
this.delay = 5;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
delay--;
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setInteger("extend", extend);
|
||||
if(this.slot != null) {
|
||||
NBTTagCompound stack = new NBTTagCompound();
|
||||
slot.writeToNBT(stack);
|
||||
data.setTag("stack", stack);
|
||||
}
|
||||
|
||||
INBTPacketReceiver.networkPack(this, data, 25);
|
||||
|
||||
} else {
|
||||
this.lastExtend = this.renderExtend;
|
||||
|
||||
if(this.turnProgress > 0) {
|
||||
this.renderExtend += (this.syncExtend - this.renderExtend) / (double) this.turnProgress;
|
||||
this.turnProgress--;
|
||||
} else {
|
||||
this.renderExtend = this.syncExtend;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.syncExtend = nbt.getInteger("extend");
|
||||
|
||||
if(nbt.hasKey("stack")) {
|
||||
NBTTagCompound stack = nbt.getCompoundTag("stack");
|
||||
this.slot = ItemStack.loadItemStackFromNBT(stack);
|
||||
} else
|
||||
this.slot = null;
|
||||
|
||||
this.turnProgress = 2;
|
||||
}
|
||||
|
||||
/* :3 NBT stuff */
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setInteger("extend", extend);
|
||||
nbt.setBoolean("retract", isRetracting);
|
||||
nbt.setBoolean("state", lastState); //saved so loading into a world doesn't cause issues
|
||||
if(this.slot != null) {
|
||||
NBTTagCompound stack = new NBTTagCompound();
|
||||
slot.writeToNBT(stack);
|
||||
nbt.setTag("stack", stack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
this.extend = nbt.getInteger("extend");
|
||||
this.isRetracting = nbt.getBoolean("retract");
|
||||
this.lastState = nbt.getBoolean("state");
|
||||
if(nbt.hasKey("stack")) {
|
||||
NBTTagCompound stack = nbt.getCompoundTag("stack");
|
||||
this.slot = ItemStack.loadItemStackFromNBT(stack);
|
||||
} else {
|
||||
this.slot = null;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private AxisAlignedBB aabb;
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
if(aabb != null)
|
||||
return aabb;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata());
|
||||
aabb = AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1).addCoord(dir.offsetX, dir.offsetY, dir.offsetZ);
|
||||
return aabb;
|
||||
}
|
||||
|
||||
/* BS inventory stuff */
|
||||
|
||||
@Override public int getSizeInventory() { return 1; }
|
||||
|
||||
@Override public ItemStack getStackInSlot(int slot) { return this.slot; }
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slot, int amount) {
|
||||
if(this.slot != null) {
|
||||
if(this.slot.stackSize <= amount) {
|
||||
ItemStack stack = this.slot;
|
||||
this.slot = null;
|
||||
return stack;
|
||||
}
|
||||
|
||||
ItemStack stack = this.slot.splitStack(amount);
|
||||
if(this.slot.stackSize == 0)
|
||||
this.slot = null;
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int slot) { return null; }
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack stack) {
|
||||
this.slot = stack;
|
||||
if(stack != null && stack.stackSize > this.getInventoryStackLimit())
|
||||
stack.stackSize = this.getInventoryStackLimit();
|
||||
}
|
||||
|
||||
@Override public String getInventoryName() { return null; }
|
||||
|
||||
@Override public boolean hasCustomInventoryName() { return false; }
|
||||
|
||||
@Override public int getInventoryStackLimit() { return 1; }
|
||||
|
||||
@Override public boolean isUseableByPlayer(EntityPlayer player) { return false; }
|
||||
|
||||
@Override public void openInventory() {}
|
||||
|
||||
@Override public void closeInventory() {}
|
||||
|
||||
@Override public boolean isItemValidForSlot(int slot, ItemStack stack) { return true; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -64,4 +64,5 @@ public class BlockGraphiteBreedingFuel extends BlockGraphiteDrilledTE implements
|
||||
protected Item getInsertedItem() {
|
||||
return ModItems.pile_rod_lithium;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -5,9 +5,11 @@ import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockFlammable;
|
||||
import com.hbm.inventory.RecipesCommon.MetaBlock;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import api.hbm.block.IInsertable;
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -17,11 +19,13 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements IToolable {
|
||||
public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements IToolable, IInsertable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon sideIcon;
|
||||
@ -89,7 +93,7 @@ public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements
|
||||
|
||||
if(side == cfg * 2 || side == cfg * 2 + 1) {
|
||||
world.setBlock(x, y, z, ModBlocks.block_graphite_drilled, meta & 7, 3);
|
||||
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(getInsertedItem()));
|
||||
this.ejectItem(world, x, y, z, ForgeDirection.getOrientation(side), new ItemStack(getInsertedItem(meta)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,4 +119,115 @@ public abstract class BlockGraphiteDrilledBase extends BlockFlammable implements
|
||||
drops.add(new ItemStack(getInsertedItem(meta), 1));
|
||||
return drops;
|
||||
}
|
||||
|
||||
//Checks the relationship between specific items and placement.
|
||||
//kinda cringe but anything other than hardcoding would be overengineering this for no reason so
|
||||
//all of this is destined to be changed most likely anyway
|
||||
protected MetaBlock checkInteractions(ItemStack stack) {
|
||||
Item item = stack.getItem(); //temp
|
||||
if(item == ModItems.pile_rod_uranium) return new MetaBlock(ModBlocks.block_graphite_fuel);
|
||||
if(item == ModItems.pile_rod_pu239) return new MetaBlock(ModBlocks.block_graphite_fuel, 0b1000);
|
||||
if(item == ModItems.pile_rod_plutonium) return new MetaBlock(ModBlocks.block_graphite_plutonium);
|
||||
if(item == ModItems.pile_rod_source) return new MetaBlock(ModBlocks.block_graphite_source);
|
||||
if(item == ModItems.pile_rod_boron) return new MetaBlock(ModBlocks.block_graphite_rod);
|
||||
if(item == ModItems.pile_rod_lithium) return new MetaBlock(ModBlocks.block_graphite_lithium);
|
||||
if(item == ModItems.cell_tritium) return new MetaBlock(ModBlocks.block_graphite_tritium);
|
||||
if(item == ModItems.pile_rod_detector) return new MetaBlock(ModBlocks.block_graphite_detector);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertItem(World world, int x, int y, int z, ForgeDirection dir, ItemStack stack) {
|
||||
|
||||
if(stack == null) return false;
|
||||
|
||||
MetaBlock baseBlock = checkInteractions(stack);
|
||||
if(baseBlock == null) return false;
|
||||
|
||||
final int side = dir.ordinal();
|
||||
final int pureMeta = world.getBlockMetadata(x, y, z) & 3; //in case it's shrouded in aluminum
|
||||
|
||||
if(side == pureMeta * 2 || side == pureMeta * 2 + 1) {
|
||||
//first, make sure we can even push rods out
|
||||
for(int i = 0; i <= 3; i++) { //limited to 3 boyos
|
||||
int ix = x + dir.offsetX * i;
|
||||
int iy = y + dir.offsetY * i;
|
||||
int iz = z + dir.offsetZ * i;
|
||||
|
||||
Block b = world.getBlock(ix, iy, iz);
|
||||
|
||||
if(b instanceof BlockGraphiteDrilledBase) {
|
||||
int baseMeta = world.getBlockMetadata(ix, iy, iz);
|
||||
if((baseMeta & 3) != pureMeta) //wrong orientation
|
||||
return false;
|
||||
|
||||
if(((BlockGraphiteDrilledBase)b).getInsertedItem(baseMeta) == null) //if there's nothing to push
|
||||
break;
|
||||
else if(i >= 3) //if there is stuff to push and we reach our limit
|
||||
return false;
|
||||
} else {
|
||||
if(b.isNormalCube()) //obstructions
|
||||
return false;
|
||||
else //empty space? no need to search
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//TODO convert old methods to use itemstack for flexibility
|
||||
int oldMeta = pureMeta | baseBlock.meta; //metablocks are kinda inconvenient to work with so
|
||||
Block oldBlock = baseBlock.block;
|
||||
NBTTagCompound oldTag = new NBTTagCompound(); //In case of TEs
|
||||
oldTag.setInteger("x", x); //giving tags prevents issues and resets any lingering tes.
|
||||
oldTag.setInteger("y", y);
|
||||
oldTag.setInteger("z", z);
|
||||
|
||||
//now actually make the change
|
||||
for(int i = 0; i <= 3; i++) { //yeah yeah we know it's safe but let's be *extra cautious* of infinite loops
|
||||
int ix = x + dir.offsetX * i;
|
||||
int iy = y + dir.offsetY * i;
|
||||
int iz = z + dir.offsetZ * i;
|
||||
|
||||
Block newBlock = world.getBlock(ix, iy, iz);
|
||||
|
||||
if(newBlock instanceof BlockGraphiteDrilledBase) {
|
||||
int newMeta = world.getBlockMetadata(ix, iy, iz);
|
||||
NBTTagCompound newTag = new NBTTagCompound();
|
||||
|
||||
if(newBlock instanceof BlockGraphiteDrilledTE) {
|
||||
TileEntity te = world.getTileEntity(ix, iy, iz);
|
||||
te.writeToNBT(newTag);
|
||||
newTag.setInteger("x", te.xCoord + dir.offsetX); //malformed positions is very very bad and prevents the pile TEs from ticking
|
||||
newTag.setInteger("y", te.yCoord + dir.offsetY);
|
||||
newTag.setInteger("z", te.zCoord + dir.offsetZ);
|
||||
}
|
||||
|
||||
world.setBlock(ix, iy, iz, oldBlock, (oldMeta & ~0b100) | (newMeta & 0b100), 0);
|
||||
|
||||
if(oldBlock instanceof BlockGraphiteDrilledTE && !oldTag.hasNoTags()) { //safety first
|
||||
TileEntity te = world.getTileEntity(ix, iy, iz);
|
||||
te.readFromNBT(oldTag);
|
||||
}
|
||||
|
||||
world.markAndNotifyBlock(ix, iy, iz, world.getChunkFromBlockCoords(ix, iz), newBlock, oldBlock, 3); //in case setBlock returns false due to = meta / block
|
||||
|
||||
oldMeta = newMeta;
|
||||
oldBlock = newBlock;
|
||||
oldTag = newTag;
|
||||
|
||||
if(oldBlock instanceof BlockGraphiteDrilled) //if there's no need to eject an item
|
||||
break;
|
||||
} else {
|
||||
Item eject = ((BlockGraphiteDrilledBase) oldBlock).getInsertedItem(oldMeta); //TODO old methods to itemstack
|
||||
this.ejectItem(world, ix - dir.offsetX, iy - dir.offsetY, iz - dir.offsetZ, dir, new ItemStack(eject));
|
||||
world.playSoundEffect(ix + 0.5, iy + 0.5, iz + 0.5, "hbm:item.upgradePlug", 1.25F, 1.0F);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.pile.TileEntityPileFuel;
|
||||
|
||||
import api.hbm.block.IBlowable;
|
||||
import api.hbm.block.IToolable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -16,14 +17,19 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolable {
|
||||
public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolable, IBlowable {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int mets) {
|
||||
return new TileEntityPileFuel();
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
TileEntityPileFuel pile = new TileEntityPileFuel();
|
||||
if((meta & 8) != 0)
|
||||
pile.progress = pile.maxProgress - 1000; // pu239 rods cringe :(
|
||||
|
||||
return pile;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -33,6 +39,17 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
||||
this.blockIconAluminum = iconRegister.registerIcon(RefStrings.MODID + ":block_graphite_fuel_aluminum");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||
TileEntityPileFuel pile = (TileEntityPileFuel)world.getTileEntity(x, y, z);
|
||||
return MathHelper.clamp_int((pile.progress * 16) / pile.maxProgress, 0, 15); //potentially wip
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
@ -68,4 +85,10 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
|
||||
protected Item getInsertedItem(int meta) {
|
||||
return (meta & 8) == 8 ? ModItems.pile_rod_pu239 : ModItems.pile_rod_uranium;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyFan(World world, int x, int y, int z, ForgeDirection dir, int dist) {
|
||||
TileEntityPileFuel pile = (TileEntityPileFuel) world.getTileEntity(x, y, z);
|
||||
pile.heat -= pile.heat * 0.025;
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,6 +48,7 @@ import com.hbm.blocks.generic.BlockEmitter.TileEntityEmitter;
|
||||
import com.hbm.blocks.generic.BlockLoot.TileEntityLoot;
|
||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
|
||||
import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
|
||||
import com.hbm.entity.cart.*;
|
||||
import com.hbm.entity.effect.*;
|
||||
@ -279,6 +280,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCatalyticReformer.class, new RenderCatalyticReformer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineCoker.class, new RenderCoker());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFan.class, new RenderFan());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityPistonInserter.class, new RenderPistonInserter());
|
||||
//Foundry
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryBasin.class, new RenderFoundry());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFoundryMold.class, new RenderFoundry());
|
||||
|
||||
@ -308,7 +308,8 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.furnace_iron), new Object[] { "III", "IFI", "BBB", 'I', IRON.ingot(), 'F', Blocks.furnace, 'B', Blocks.stonebrick });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_mixer), new Object[] { "PIP", "GCG", "PMP", 'P', STEEL.plate(), 'I', DURA.ingot(), 'G', KEY_ANYPANE, 'C', ModItems.circuit_copper, 'M', ModItems.motor });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.fan), new Object[] { "BPB", "PRP", "BPB", 'B', ModItems.bolt_tungsten, 'P', IRON.plate(), 'R', REDSTONE.dust() });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.piston_inserter), new Object[] { "ITI", "TPT", "ITI", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', IRON.plate(), 'T', ModItems.bolt_tungsten });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.muffler, 1), new Object[] { "III", "IWI", "III", 'I', ModItems.plate_polymer, 'W', Blocks.wool });
|
||||
|
||||
addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.factory_titanium_hull), 8), new Object[] { "PIP", "I I", "PIP", 'P', TI.plate(), 'I', TI.ingot() });
|
||||
|
||||
@ -192,6 +192,9 @@ public class ResourceManager {
|
||||
//Fan
|
||||
public static final IModelCustom fan = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/fan.obj"));
|
||||
|
||||
//Piston Inserter
|
||||
public static final IModelCustom piston_inserter = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/piston_inserter.obj"));
|
||||
|
||||
//Sphere
|
||||
public static final IModelCustom sphere_ruv = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sphere_ruv.obj"));
|
||||
public static final IModelCustom sphere_iuv = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/sphere_iuv.obj"));
|
||||
@ -540,6 +543,9 @@ public class ResourceManager {
|
||||
//Fan
|
||||
public static final ResourceLocation fan_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/fan.png");
|
||||
|
||||
//Piston_Inserter
|
||||
public static final ResourceLocation piston_inserter_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/piston_inserter.png");
|
||||
|
||||
//Radgen
|
||||
public static final ResourceLocation radgen_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/radgen.png");
|
||||
|
||||
|
||||
@ -0,0 +1,100 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
import com.hbm.render.util.RenderDecoItem;
|
||||
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderPistonInserter extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata()) {
|
||||
case 0: GL11.glRotatef(180, 1F, 0F, 0F); break;
|
||||
case 1: break;
|
||||
case 2: GL11.glRotatef(-90, 1F, 0F, 0F);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(90, 0F, 0F, 1F);
|
||||
GL11.glRotatef(-90, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(90, 1F, 0F, 0F); break;
|
||||
case 5: GL11.glRotatef(-90, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(0D, -0.5, 0D);
|
||||
|
||||
bindTexture(ResourceManager.piston_inserter_tex);
|
||||
ResourceManager.piston_inserter.renderPart("Frame");
|
||||
|
||||
TileEntityPistonInserter piston = (TileEntityPistonInserter)tile;
|
||||
double e = (piston.lastExtend + (piston.renderExtend - piston.lastExtend) * interp) / (double) piston.maxExtend;
|
||||
GL11.glTranslated(0, e * 0.9375D, 0);
|
||||
ResourceManager.piston_inserter.renderPart("Piston");
|
||||
|
||||
RenderItem itemRenderer = new RenderDecoItem(this);
|
||||
itemRenderer.setRenderManager(RenderManager.instance);
|
||||
|
||||
if(piston.slot != null) {
|
||||
ItemStack stack = piston.slot.copy();
|
||||
|
||||
EntityItem item = new EntityItem(null, 0.0D, 0.0D, 0.0D, stack);
|
||||
item.getEntityItem().stackSize = 1;
|
||||
item.hoverStart = 0.0F;
|
||||
|
||||
if(stack.getItem() instanceof ItemBlock) {
|
||||
GL11.glTranslated(0.0D, 1.125D, 0.0D);
|
||||
} else {
|
||||
GL11.glTranslated(0.0D, 1.0625D, 0.1D);
|
||||
if(!RenderManager.instance.options.fancyGraphics)
|
||||
GL11.glTranslated(0.0D, 0.01D, 0.0D);
|
||||
|
||||
GL11.glRotated(90, -1, 0, 0);
|
||||
}
|
||||
|
||||
RenderItem.renderInFrame = true;
|
||||
itemRenderer.doRender(item, 0.0D, 0.0D, 0.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
}
|
||||
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.piston_inserter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -2.5, 0);
|
||||
double scale = 5;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glScaled(2, 2, 2);
|
||||
bindTexture(ResourceManager.piston_inserter_tex);
|
||||
ResourceManager.piston_inserter.renderAll();
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -13,6 +13,7 @@ import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||
import com.hbm.blocks.generic.BlockSnowglobe.TileEntitySnowglobe;
|
||||
import com.hbm.blocks.generic.PartEmitter.TileEntityPartEmitter;
|
||||
import com.hbm.blocks.machine.MachineFan.TileEntityFan;
|
||||
import com.hbm.blocks.machine.PistonInserter.TileEntityPistonInserter;
|
||||
import com.hbm.blocks.machine.WatzPump.TileEntityWatzPump;
|
||||
import com.hbm.blocks.network.BlockCablePaintable.TileEntityCablePaintable;
|
||||
import com.hbm.blocks.network.CableDiode.TileEntityDiode;
|
||||
@ -361,6 +362,7 @@ public class TileMappings {
|
||||
put(TileEntityCraneRouter.class, "tileentity_router");
|
||||
put(TileEntityCraneSplitter.class, "tileentity_splitter");
|
||||
put(TileEntityFan.class, "tileentity_fan");
|
||||
put(TileEntityPistonInserter.class, "tileentity_piston_inserter");
|
||||
|
||||
put(TileEntityRadioTorchSender.class, "tileentity_rtty_sender");
|
||||
put(TileEntityRadioTorchReceiver.class, "tileentity_rtty_rec");
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
@ -11,6 +12,7 @@ import com.hbm.util.ContaminationUtil.HazardType;
|
||||
import api.hbm.block.IPileNeutronReceiver;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Vec3;
|
||||
@ -21,11 +23,8 @@ public abstract class TileEntityPileBase extends TileEntity {
|
||||
public abstract void updateEntity();
|
||||
|
||||
protected void castRay(int flux, int range) {
|
||||
|
||||
Random rand = worldObj.rand;
|
||||
int[] vecVals = { 0, 0, 0,};
|
||||
vecVals[rand.nextInt(3)] = 1;
|
||||
Vec3 vec = Vec3.createVectorHelper(vecVals[0], vecVals[1], vecVals[2]);
|
||||
Vec3 vec = Vec3.createVectorHelper(1, 0, 0);
|
||||
vec.rotateAroundZ((float)(rand.nextDouble() * Math.PI * 2D));
|
||||
vec.rotateAroundY((float)(rand.nextDouble() * Math.PI * 2D));
|
||||
vec.rotateAroundX((float)(rand.nextDouble() * Math.PI * 2D));
|
||||
@ -47,13 +46,14 @@ public abstract class TileEntityPileBase extends TileEntity {
|
||||
prevY = y;
|
||||
prevZ = z;
|
||||
|
||||
/*if(i == range) {
|
||||
/*if(i == range || i == 1) {
|
||||
NBTTagCompound data2 = new NBTTagCompound();
|
||||
data2.setString("type", "vanillaExt");
|
||||
data2.setString("mode", "greendust");
|
||||
data2.setDouble("posX", xCoord + 0.5 + vec.xCoord * range);
|
||||
data2.setDouble("posY", yCoord + 0.5 + vec.yCoord * range);
|
||||
data2.setDouble("posZ", zCoord + 0.5 + vec.zCoord * range);
|
||||
data2.setString("mode", i == range ? "greendust" :
|
||||
i == 1 ? "reddust" : "bluedust");
|
||||
data2.setDouble("posX", xCoord + 0.5 + vec.xCoord * i);
|
||||
data2.setDouble("posY", yCoord + 0.5 + vec.yCoord * i);
|
||||
data2.setDouble("posZ", zCoord + 0.5 + vec.zCoord * i);
|
||||
MainRegistry.proxy.effectNT(data2);
|
||||
}*/
|
||||
|
||||
@ -91,7 +91,7 @@ public abstract class TileEntityPileBase extends TileEntity {
|
||||
if(entities != null)
|
||||
for(EntityLivingBase e : entities) {
|
||||
|
||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, flux / 2);
|
||||
ContaminationUtil.contaminate(e, HazardType.RADIATION, ContaminationType.CREATIVE, flux / 4F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,9 +2,14 @@ package com.hbm.tileentity.machine.pile;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxParticlePacketNT;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import api.hbm.block.IPileNeutronReceiver;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutronReceiver {
|
||||
|
||||
@ -13,14 +18,14 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
||||
public int neutrons;
|
||||
public int lastNeutrons;
|
||||
public int progress;
|
||||
public static final int maxProgress = GeneralConfig.enable528 ? 75000 : 50000;
|
||||
public static final int maxProgress = GeneralConfig.enable528 ? 75000 : 50000; //might double to reduce compact setup's effectiveness
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
dissipateHeat();
|
||||
react();
|
||||
checkRedstone(react());
|
||||
transmute();
|
||||
|
||||
if(this.heat >= this.maxHeat) {
|
||||
@ -28,32 +33,54 @@ public class TileEntityPileFuel extends TileEntityPileBase implements IPileNeutr
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.gas_radon_dense);
|
||||
}
|
||||
|
||||
if(worldObj.rand.nextFloat() * 2F <= this.heat / (float)this.maxHeat) {
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setString("type", "vanillaExt");
|
||||
data.setString("mode", "smoke");
|
||||
data.setDouble("mY", 0.05);
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxParticlePacketNT(data, xCoord + 0.25 + worldObj.rand.nextDouble() * 0.5, yCoord + 1, zCoord + 0.25 + worldObj.rand.nextDouble() * 0.5),
|
||||
new TargetPoint(worldObj.provider.dimensionId, xCoord + 0.5, yCoord + 1, zCoord + 0.5, 20));
|
||||
MainRegistry.proxy.effectNT(data);
|
||||
}
|
||||
|
||||
if(this.progress >= this.maxProgress) {
|
||||
worldObj.setBlock(xCoord, yCoord, zCoord, ModBlocks.block_graphite_plutonium, this.getBlockMetadata() & 7, 3);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void dissipateHeat() {
|
||||
this.heat -= (this.getBlockMetadata() & 4) == 4 ? heat * 0.065 : heat * 0.05; //remove 5% of the stored heat per tick; 6.5% for windscale
|
||||
}
|
||||
|
||||
private void react() {
|
||||
private int react() {
|
||||
|
||||
int reaction = (int) (this.neutrons * (1D - ((double)this.heat / (double)this.maxHeat) * 0.5D)); //max heat reduces reaction by 50% due to thermal expansion
|
||||
|
||||
this.lastNeutrons = this.neutrons;
|
||||
this.neutrons = 0;
|
||||
|
||||
int lastProgress = this.progress;
|
||||
|
||||
this.progress += reaction;
|
||||
|
||||
if(reaction <= 0)
|
||||
return;
|
||||
return lastProgress;
|
||||
|
||||
this.heat += reaction;
|
||||
|
||||
for(int i = 0; i < 12; i++)
|
||||
this.castRay((int) Math.max(reaction * 0.25, 1), 5);
|
||||
|
||||
return lastProgress;
|
||||
}
|
||||
|
||||
private void checkRedstone(int lastProgress) {
|
||||
int lastLevel = MathHelper.clamp_int((lastProgress * 16) / maxProgress, 0, 15);
|
||||
int newLevel = MathHelper.clamp_int((progress * 16) / maxProgress, 0, 15);
|
||||
if(lastLevel != newLevel)
|
||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, this.getBlockType());
|
||||
}
|
||||
|
||||
private void transmute() {
|
||||
|
||||
@ -4462,6 +4462,7 @@ tile.deco_beryllium.name=Beryllium Deco Block
|
||||
tile.deco_computer.ibm_300pl.name=IBM Personal Computer 300PL
|
||||
tile.deco_emitter.name=Deco Light Emitter
|
||||
tile.part_emitter.name=Deco Particle Emitter
|
||||
tile.piston_inserter.name=Inserter
|
||||
tile.deco_lead.name=Lead Deco Block
|
||||
tile.deco_rbmk.name=RBMK Deco Block
|
||||
tile.deco_rbmk_smooth.name=Smooth RBMK Deco Block
|
||||
|
||||
@ -0,0 +1,507 @@
|
||||
# Blender v3.2.0 OBJ File: 'piston_inserter.blend'
|
||||
# www.blender.org
|
||||
mtllib piston_inserter.mtl
|
||||
o Frame
|
||||
v -0.125000 0.000000 0.125000
|
||||
v -0.125000 1.000000 0.125000
|
||||
v -0.125000 0.000000 -0.125000
|
||||
v -0.125000 1.000000 -0.125000
|
||||
v 0.125000 0.000000 0.125000
|
||||
v 0.125000 1.000000 0.125000
|
||||
v 0.125000 0.000000 -0.125000
|
||||
v 0.125000 1.000000 -0.125000
|
||||
v -0.500000 1.000000 0.500000
|
||||
v -0.500000 1.000000 -0.500000
|
||||
v 0.500000 1.000000 -0.500000
|
||||
v 0.500000 1.000000 0.500000
|
||||
v -0.500000 0.000000 -0.500000
|
||||
v -0.500000 0.000000 0.500000
|
||||
v 0.500000 0.000000 -0.500000
|
||||
v 0.500000 0.000000 0.500000
|
||||
v -0.375000 1.000000 0.375000
|
||||
v -0.375000 1.000000 -0.375000
|
||||
v 0.375000 1.000000 -0.375000
|
||||
v 0.375000 1.000000 0.375000
|
||||
v -0.375000 0.000000 -0.375000
|
||||
v -0.375000 0.000000 0.375000
|
||||
v 0.375000 0.000000 -0.375000
|
||||
v 0.375000 0.000000 0.375000
|
||||
v 0.312500 0.937500 0.375000
|
||||
v 0.375000 0.937500 0.375000
|
||||
v 0.125000 0.937500 0.125000
|
||||
v 0.375000 0.937500 0.312500
|
||||
v 0.004327 0.858644 -0.020544
|
||||
v 0.062500 0.937500 0.125000
|
||||
v 0.125000 0.937500 0.062500
|
||||
v -0.312500 0.937500 -0.375000
|
||||
v -0.375000 0.937500 -0.375000
|
||||
v -0.125000 0.937500 -0.125000
|
||||
v -0.375000 0.937500 -0.312500
|
||||
v -0.062500 0.937500 -0.125000
|
||||
v -0.125000 0.937500 -0.062500
|
||||
v 0.375000 0.937500 -0.312500
|
||||
v 0.375000 0.937500 -0.375000
|
||||
v 0.125000 0.937500 -0.125000
|
||||
v 0.312500 0.937500 -0.375000
|
||||
v 0.125000 0.937500 -0.062500
|
||||
v 0.062500 0.937500 -0.125000
|
||||
v -0.375000 0.937500 0.312500
|
||||
v -0.375000 0.937500 0.375000
|
||||
v -0.125000 0.937500 0.125000
|
||||
v -0.312500 0.937500 0.375000
|
||||
v -0.125000 0.937500 0.062500
|
||||
v -0.062500 0.937500 0.125000
|
||||
v 0.312500 0.062500 0.375000
|
||||
v 0.375000 0.062500 0.375000
|
||||
v 0.125000 0.062500 0.125000
|
||||
v 0.375000 0.062500 0.312500
|
||||
v 0.062500 0.062500 0.125000
|
||||
v 0.125000 0.062500 0.062500
|
||||
v -0.312500 0.062500 -0.375000
|
||||
v -0.375000 0.062500 -0.375000
|
||||
v -0.125000 0.062500 -0.125000
|
||||
v -0.375000 0.062500 -0.312500
|
||||
v -0.062500 0.062500 -0.125000
|
||||
v -0.125000 0.062500 -0.062500
|
||||
v 0.375000 0.062500 -0.312500
|
||||
v 0.375000 0.062500 -0.375000
|
||||
v 0.125000 0.062500 -0.125000
|
||||
v 0.312500 0.062500 -0.375000
|
||||
v 0.125000 0.062500 -0.062500
|
||||
v 0.062500 0.062500 -0.125000
|
||||
v -0.375000 0.062500 0.312500
|
||||
v -0.375000 0.062500 0.375000
|
||||
v -0.125000 0.062500 0.125000
|
||||
v -0.312500 0.062500 0.375000
|
||||
v -0.125000 0.062500 0.062500
|
||||
v -0.062500 0.062500 0.125000
|
||||
v 0.312500 0.062500 -0.375000
|
||||
v 0.375000 0.062500 -0.375000
|
||||
v 0.125000 0.062500 -0.125000
|
||||
v 0.375000 0.062500 -0.312500
|
||||
v 0.062500 0.062500 -0.125000
|
||||
v 0.125000 0.062500 -0.062500
|
||||
v -0.312500 0.062500 0.375000
|
||||
v -0.375000 0.062500 0.375000
|
||||
v -0.125000 0.062500 0.125000
|
||||
v -0.375000 0.062500 0.312500
|
||||
v -0.062500 0.062500 0.125000
|
||||
v -0.125000 0.062500 0.062500
|
||||
v 0.375000 0.062500 0.312500
|
||||
v 0.375000 0.062500 0.375000
|
||||
v 0.125000 0.062500 0.125000
|
||||
v 0.312500 0.062500 0.375000
|
||||
v 0.125000 0.062500 0.062500
|
||||
v 0.062500 0.062500 0.125000
|
||||
v -0.375000 0.062500 -0.312500
|
||||
v -0.375000 0.062500 -0.375000
|
||||
v -0.125000 0.062500 -0.125000
|
||||
v -0.312500 0.062500 -0.375000
|
||||
v -0.125000 0.062500 -0.062500
|
||||
v -0.062500 0.062500 -0.125000
|
||||
v 0.312500 0.937500 -0.375000
|
||||
v 0.375000 0.937500 -0.375000
|
||||
v 0.125000 0.937500 -0.125000
|
||||
v 0.375000 0.937500 -0.312500
|
||||
v 0.062500 0.937500 -0.125000
|
||||
v 0.125000 0.937500 -0.062500
|
||||
v -0.312500 0.937500 0.375000
|
||||
v -0.375000 0.937500 0.375000
|
||||
v -0.125000 0.937500 0.125000
|
||||
v -0.375000 0.937500 0.312500
|
||||
v -0.062500 0.937500 0.125000
|
||||
v -0.125000 0.937500 0.062500
|
||||
v 0.375000 0.937500 0.312500
|
||||
v 0.375000 0.937500 0.375000
|
||||
v 0.125000 0.937500 0.125000
|
||||
v 0.312500 0.937500 0.375000
|
||||
v 0.125000 0.937500 0.062500
|
||||
v 0.062500 0.937500 0.125000
|
||||
v -0.375000 0.937500 -0.312500
|
||||
v -0.375000 0.937500 -0.375000
|
||||
v -0.125000 0.937500 -0.125000
|
||||
v -0.312500 0.937500 -0.375000
|
||||
v -0.125000 0.937500 -0.062500
|
||||
v -0.062500 0.937500 -0.125000
|
||||
vt 0.571429 0.666667
|
||||
vt 0.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.571429 0.666667
|
||||
vt -0.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.571429 0.666667
|
||||
vt -0.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.571429 0.666667
|
||||
vt -0.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.714286 0.416667
|
||||
vt 0.571429 0.333333
|
||||
vt 0.714286 0.333333
|
||||
vt 0.714286 0.750000
|
||||
vt 0.571429 0.833333
|
||||
vt 0.571429 0.750000
|
||||
vt 0.071429 0.708333
|
||||
vt 0.500000 0.708333
|
||||
vt 0.071429 0.958333
|
||||
vt 0.000000 0.666667
|
||||
vt 0.500000 0.958333
|
||||
vt 0.000000 1.000000
|
||||
vt 0.571429 1.000000
|
||||
vt 0.500000 0.041667
|
||||
vt 0.500000 0.291667
|
||||
vt 0.071429 0.291667
|
||||
vt 0.000000 0.000000
|
||||
vt 0.071429 0.041667
|
||||
vt 0.571429 0.000000
|
||||
vt 0.714286 0.416667
|
||||
vt 0.571429 0.750000
|
||||
vt 0.571429 0.416667
|
||||
vt 0.714286 0.416667
|
||||
vt 0.571429 0.750000
|
||||
vt 0.571429 0.416667
|
||||
vt 0.714286 0.416667
|
||||
vt 0.571429 0.750000
|
||||
vt 0.571429 0.416667
|
||||
vt 0.714286 0.416667
|
||||
vt 0.571429 0.750000
|
||||
vt 0.571429 0.416667
|
||||
vt 0.571429 -0.000000
|
||||
vt 1.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.571429 0.000000
|
||||
vt 1.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.571429 0.000000
|
||||
vt 1.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.571429 0.000000
|
||||
vt 1.000000 0.333333
|
||||
vt 0.571429 0.333333
|
||||
vt 0.214286 0.125000
|
||||
vt 0.071429 0.062500
|
||||
vt 0.107143 0.041667
|
||||
vt 0.357143 0.208333
|
||||
vt 0.500000 0.270833
|
||||
vt 0.464286 0.291667
|
||||
vt 0.214286 0.208333
|
||||
vt 0.107143 0.291667
|
||||
vt 0.071429 0.270833
|
||||
vt 0.357143 0.125000
|
||||
vt 0.464286 0.041667
|
||||
vt 0.500000 0.062500
|
||||
vt 0.214286 0.125000
|
||||
vt 0.071429 0.062500
|
||||
vt 0.107143 0.041667
|
||||
vt 0.357143 0.208333
|
||||
vt 0.500000 0.270833
|
||||
vt 0.464286 0.291667
|
||||
vt 0.214286 0.208333
|
||||
vt 0.107143 0.291667
|
||||
vt 0.071429 0.270833
|
||||
vt 0.357143 0.125000
|
||||
vt 0.464286 0.041667
|
||||
vt 0.500000 0.062500
|
||||
vt 0.214286 0.125000
|
||||
vt 0.071429 0.062500
|
||||
vt 0.107143 0.041667
|
||||
vt 0.357143 0.208333
|
||||
vt 0.500000 0.270833
|
||||
vt 0.464286 0.291667
|
||||
vt 0.214286 0.208333
|
||||
vt 0.107143 0.291667
|
||||
vt 0.071429 0.270833
|
||||
vt 0.357143 0.125000
|
||||
vt 0.464286 0.041667
|
||||
vt 0.500000 0.062500
|
||||
vt 0.214286 0.125000
|
||||
vt 0.071429 0.062500
|
||||
vt 0.107143 0.041667
|
||||
vt 0.357143 0.208333
|
||||
vt 0.500000 0.270833
|
||||
vt 0.464286 0.291667
|
||||
vt 0.214286 0.208333
|
||||
vt 0.107143 0.291667
|
||||
vt 0.071429 0.270833
|
||||
vt 0.357143 0.125000
|
||||
vt 0.464286 0.041667
|
||||
vt 0.500000 0.062500
|
||||
vt -0.000000 0.666667
|
||||
vt 0.000000 0.666667
|
||||
vt 0.000000 0.666667
|
||||
vt 0.571429 0.416667
|
||||
vt 0.714286 0.833333
|
||||
vt 0.714286 0.750000
|
||||
vt 0.714286 0.750000
|
||||
vt 0.714286 0.750000
|
||||
vt 0.714286 0.750000
|
||||
vt 1.000000 -0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt 1.000000 -0.000000
|
||||
vt 0.250000 0.125000
|
||||
vt 0.214286 0.145833
|
||||
vt 0.071429 0.041667
|
||||
vt 0.321429 0.208333
|
||||
vt 0.357143 0.187500
|
||||
vt 0.500000 0.291667
|
||||
vt 0.214286 0.187500
|
||||
vt 0.250000 0.208333
|
||||
vt 0.071429 0.291667
|
||||
vt 0.357143 0.145833
|
||||
vt 0.321429 0.125000
|
||||
vt 0.500000 0.041667
|
||||
vt 0.250000 0.125000
|
||||
vt 0.214286 0.145833
|
||||
vt 0.071429 0.041667
|
||||
vt 0.321429 0.208333
|
||||
vt 0.357143 0.187500
|
||||
vt 0.500000 0.291667
|
||||
vt 0.214286 0.187500
|
||||
vt 0.250000 0.208333
|
||||
vt 0.071429 0.291667
|
||||
vt 0.357143 0.145833
|
||||
vt 0.321429 0.125000
|
||||
vt 0.500000 0.041667
|
||||
vt 0.250000 0.125000
|
||||
vt 0.214286 0.145833
|
||||
vt 0.071429 0.041667
|
||||
vt 0.321429 0.208333
|
||||
vt 0.357143 0.187500
|
||||
vt 0.500000 0.291667
|
||||
vt 0.214286 0.187500
|
||||
vt 0.250000 0.208333
|
||||
vt 0.071429 0.291667
|
||||
vt 0.357143 0.145833
|
||||
vt 0.321429 0.125000
|
||||
vt 0.500000 0.041667
|
||||
vt 0.250000 0.125000
|
||||
vt 0.214286 0.145833
|
||||
vt 0.071429 0.041667
|
||||
vt 0.321429 0.208333
|
||||
vt 0.357143 0.187500
|
||||
vt 0.500000 0.291667
|
||||
vt 0.214286 0.187500
|
||||
vt 0.250000 0.208333
|
||||
vt 0.071429 0.291667
|
||||
vt 0.357143 0.145833
|
||||
vt 0.321429 0.125000
|
||||
vt 0.500000 0.041667
|
||||
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 9/1/1 13/2/1 14/3/1
|
||||
f 10/4/2 15/5/2 13/6/2
|
||||
f 11/7/3 16/8/3 15/9/3
|
||||
f 12/10/4 14/11/4 16/12/4
|
||||
f 7/13/5 1/14/5 3/15/5
|
||||
f 4/16/6 6/17/6 8/18/6
|
||||
f 18/19/6 9/1/6 17/20/6
|
||||
f 19/21/6 10/22/6 18/19/6
|
||||
f 20/23/6 11/24/6 19/21/6
|
||||
f 17/20/6 12/25/6 20/23/6
|
||||
f 22/26/5 13/6/5 21/27/5
|
||||
f 21/27/5 15/5/5 23/28/5
|
||||
f 23/28/5 16/29/5 24/30/5
|
||||
f 24/30/5 14/31/5 22/26/5
|
||||
f 8/32/2 3/33/2 4/34/2
|
||||
f 6/35/3 7/36/3 8/37/3
|
||||
f 2/38/4 5/39/4 6/40/4
|
||||
f 4/41/1 1/42/1 2/43/1
|
||||
f 23/44/1 20/45/1 19/46/1
|
||||
f 24/47/2 17/48/2 20/49/2
|
||||
f 22/50/3 18/51/3 17/52/3
|
||||
f 21/53/4 19/54/4 18/55/4
|
||||
f 27/56/5 28/57/5 25/58/5
|
||||
f 34/59/5 35/60/5 32/61/5
|
||||
f 40/62/5 41/63/5 38/64/5
|
||||
f 46/65/5 47/66/5 44/67/5
|
||||
f 52/68/5 53/69/5 50/70/5
|
||||
f 58/71/5 59/72/5 56/73/5
|
||||
f 64/74/5 65/75/5 62/76/5
|
||||
f 70/77/5 71/78/5 68/79/5
|
||||
f 76/80/6 77/81/6 74/82/6
|
||||
f 82/83/6 83/84/6 80/85/6
|
||||
f 88/86/6 89/87/6 86/88/6
|
||||
f 94/89/6 95/90/6 92/91/6
|
||||
f 100/92/6 101/93/6 98/94/6
|
||||
f 106/95/6 107/96/6 104/97/6
|
||||
f 112/98/6 113/99/6 110/100/6
|
||||
f 118/101/6 119/102/6 116/103/6
|
||||
f 9/1/1 10/22/1 13/2/1
|
||||
f 10/4/2 11/104/2 15/5/2
|
||||
f 11/7/3 12/105/3 16/8/3
|
||||
f 12/10/4 9/106/4 14/11/4
|
||||
f 7/13/5 5/107/5 1/14/5
|
||||
f 4/16/6 2/108/6 6/17/6
|
||||
f 18/19/6 10/22/6 9/1/6
|
||||
f 19/21/6 11/24/6 10/22/6
|
||||
f 20/23/6 12/25/6 11/24/6
|
||||
f 17/20/6 9/1/6 12/25/6
|
||||
f 22/26/5 14/31/5 13/6/5
|
||||
f 21/27/5 13/6/5 15/5/5
|
||||
f 23/28/5 15/5/5 16/29/5
|
||||
f 24/30/5 16/29/5 14/31/5
|
||||
f 8/32/2 7/109/2 3/33/2
|
||||
f 6/35/3 5/110/3 7/36/3
|
||||
f 2/38/4 1/111/4 5/39/4
|
||||
f 4/41/1 3/112/1 1/42/1
|
||||
f 23/44/1 24/113/1 20/45/1
|
||||
f 24/47/2 22/114/2 17/48/2
|
||||
f 22/50/3 21/115/3 18/51/3
|
||||
f 21/53/4 23/116/4 19/54/4
|
||||
f 25/58/5 30/117/5 27/56/5
|
||||
f 27/56/5 31/118/5 28/57/5
|
||||
f 28/57/5 26/119/5 25/58/5
|
||||
f 32/61/5 36/120/5 34/59/5
|
||||
f 34/59/5 37/121/5 35/60/5
|
||||
f 35/60/5 33/122/5 32/61/5
|
||||
f 38/64/5 42/123/5 40/62/5
|
||||
f 40/62/5 43/124/5 41/63/5
|
||||
f 41/63/5 39/125/5 38/64/5
|
||||
f 44/67/5 48/126/5 46/65/5
|
||||
f 46/65/5 49/127/5 47/66/5
|
||||
f 47/66/5 45/128/5 44/67/5
|
||||
f 50/70/5 54/129/5 52/68/5
|
||||
f 52/68/5 55/130/5 53/69/5
|
||||
f 53/69/5 51/131/5 50/70/5
|
||||
f 56/73/5 60/132/5 58/71/5
|
||||
f 58/71/5 61/133/5 59/72/5
|
||||
f 59/72/5 57/134/5 56/73/5
|
||||
f 62/76/5 66/135/5 64/74/5
|
||||
f 64/74/5 67/136/5 65/75/5
|
||||
f 65/75/5 63/137/5 62/76/5
|
||||
f 68/79/5 72/138/5 70/77/5
|
||||
f 70/77/5 73/139/5 71/78/5
|
||||
f 71/78/5 69/140/5 68/79/5
|
||||
f 74/82/6 78/141/6 76/80/6
|
||||
f 76/80/6 79/142/6 77/81/6
|
||||
f 77/81/6 75/143/6 74/82/6
|
||||
f 80/85/6 84/144/6 82/83/6
|
||||
f 82/83/6 85/145/6 83/84/6
|
||||
f 83/84/6 81/146/6 80/85/6
|
||||
f 86/88/6 90/147/6 88/86/6
|
||||
f 88/86/6 91/148/6 89/87/6
|
||||
f 89/87/6 87/149/6 86/88/6
|
||||
f 92/91/6 96/150/6 94/89/6
|
||||
f 94/89/6 97/151/6 95/90/6
|
||||
f 95/90/6 93/152/6 92/91/6
|
||||
f 98/94/6 102/153/6 100/92/6
|
||||
f 100/92/6 103/154/6 101/93/6
|
||||
f 101/93/6 99/155/6 98/94/6
|
||||
f 104/97/6 108/156/6 106/95/6
|
||||
f 106/95/6 109/157/6 107/96/6
|
||||
f 107/96/6 105/158/6 104/97/6
|
||||
f 110/100/6 114/159/6 112/98/6
|
||||
f 112/98/6 115/160/6 113/99/6
|
||||
f 113/99/6 111/161/6 110/100/6
|
||||
f 116/103/6 120/162/6 118/101/6
|
||||
f 118/101/6 121/163/6 119/102/6
|
||||
f 119/102/6 117/164/6 116/103/6
|
||||
l 27 29
|
||||
o Piston
|
||||
v -0.062500 1.000000 0.062500
|
||||
v -0.125000 1.062500 0.125000
|
||||
v -0.062500 1.000000 -0.062500
|
||||
v -0.125000 1.062500 -0.125000
|
||||
v 0.062500 1.000000 0.062500
|
||||
v 0.125000 1.062500 0.125000
|
||||
v 0.062500 1.000000 -0.062500
|
||||
v 0.125000 1.062500 -0.125000
|
||||
v -0.125000 1.000000 -0.125000
|
||||
v -0.125000 1.000000 0.125000
|
||||
v 0.125000 1.000000 -0.125000
|
||||
v 0.125000 1.000000 0.125000
|
||||
v -0.062500 0.062500 -0.062500
|
||||
v -0.062500 0.062500 0.062500
|
||||
v 0.062500 0.062500 -0.062500
|
||||
v 0.062500 0.062500 0.062500
|
||||
vt 0.857143 0.708333
|
||||
vt 0.714286 0.687500
|
||||
vt 0.857143 0.687500
|
||||
vt 0.857143 0.708333
|
||||
vt 0.714286 0.687500
|
||||
vt 0.857143 0.687500
|
||||
vt 0.857143 0.708333
|
||||
vt 0.714286 0.687500
|
||||
vt 0.857143 0.687500
|
||||
vt 0.857143 0.708333
|
||||
vt 0.714286 0.687500
|
||||
vt 0.857143 0.687500
|
||||
vt 0.821429 0.375000
|
||||
vt 0.750000 0.687500
|
||||
vt 0.750000 0.375000
|
||||
vt 0.857143 0.791667
|
||||
vt 0.714286 0.875000
|
||||
vt 0.714286 0.791667
|
||||
vt 0.821429 0.770833
|
||||
vt 0.714286 0.791667
|
||||
vt 0.750000 0.770833
|
||||
vt 0.714286 0.708333
|
||||
vt 0.750000 0.729167
|
||||
vt 0.857143 0.708333
|
||||
vt 0.821429 0.729167
|
||||
vt 0.857143 0.791667
|
||||
vt 0.821429 0.333333
|
||||
vt 0.750000 0.375000
|
||||
vt 0.750000 0.333333
|
||||
vt 0.821429 0.375000
|
||||
vt 0.750000 0.687500
|
||||
vt 0.750000 0.375000
|
||||
vt 0.821429 0.375000
|
||||
vt 0.750000 0.687500
|
||||
vt 0.750000 0.375000
|
||||
vt 0.821429 0.375000
|
||||
vt 0.750000 0.687500
|
||||
vt 0.750000 0.375000
|
||||
vt 0.714286 0.708333
|
||||
vt 0.714286 0.708333
|
||||
vt 0.714286 0.708333
|
||||
vt 0.714286 0.708333
|
||||
vt 0.821429 0.687500
|
||||
vt 0.857143 0.875000
|
||||
vt 0.821429 0.375000
|
||||
vt 0.821429 0.687500
|
||||
vt 0.821429 0.687500
|
||||
vt 0.821429 0.687500
|
||||
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 123/165/7 130/166/7 131/167/7
|
||||
f 125/168/8 132/169/8 130/170/8
|
||||
f 129/171/9 133/172/9 132/173/9
|
||||
f 127/174/10 131/175/10 133/176/10
|
||||
f 126/177/9 136/178/9 128/179/9
|
||||
f 125/180/11 127/181/11 129/182/11
|
||||
f 122/183/12 130/184/12 124/185/12
|
||||
f 124/185/12 132/186/12 128/187/12
|
||||
f 128/187/12 133/188/12 126/189/12
|
||||
f 126/189/12 131/190/12 122/183/12
|
||||
f 136/191/12 135/192/12 134/193/12
|
||||
f 124/194/7 135/195/7 122/196/7
|
||||
f 122/197/10 137/198/10 126/199/10
|
||||
f 128/200/8 134/201/8 124/202/8
|
||||
f 123/165/7 125/203/7 130/166/7
|
||||
f 125/168/8 129/204/8 132/169/8
|
||||
f 129/171/9 127/205/9 133/172/9
|
||||
f 127/174/10 123/206/10 131/175/10
|
||||
f 126/177/9 137/207/9 136/178/9
|
||||
f 125/180/11 123/208/11 127/181/11
|
||||
f 122/183/12 131/190/12 130/184/12
|
||||
f 124/185/12 130/184/12 132/186/12
|
||||
f 128/187/12 132/186/12 133/188/12
|
||||
f 126/189/12 133/188/12 131/190/12
|
||||
f 136/191/12 137/209/12 135/192/12
|
||||
f 124/194/7 134/210/7 135/195/7
|
||||
f 122/197/10 135/211/10 137/198/10
|
||||
f 128/200/8 136/212/8 134/201/8
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 544 B |
Loading…
x
Reference in New Issue
Block a user