mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
new conveyor wand item that masquerades as a conveyor block, performing autoplacement! (from downstream spacefork)
This commit is contained in:
parent
54d2314496
commit
e02142d255
@ -1921,12 +1921,12 @@ public class ModBlocks {
|
|||||||
radio_torch_logic = new RadioTorchLogic().setBlockName("radio_torch_logic").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
radio_torch_logic = new RadioTorchLogic().setBlockName("radio_torch_logic").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
radio_telex = new RadioTelex().setBlockName("radio_telex").setHardness(3F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radio_telex");
|
radio_telex = new RadioTelex().setBlockName("radio_telex").setHardness(3F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radio_telex");
|
||||||
|
|
||||||
conveyor = new BlockConveyor().setBlockName("conveyor").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
conveyor = new BlockConveyor().setBlockName("conveyor").setHardness(2.0F).setResistance(2.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||||
conveyor_express = new BlockConveyorExpress().setBlockName("conveyor_express").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor_express");
|
conveyor_express = new BlockConveyorExpress().setBlockName("conveyor_express").setHardness(2.0F).setResistance(2.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":conveyor_express");
|
||||||
conveyor_double = new BlockConveyorDouble().setBlockName("conveyor_double").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor_double");
|
conveyor_double = new BlockConveyorDouble().setBlockName("conveyor_double").setHardness(2.0F).setResistance(2.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":conveyor_double");
|
||||||
conveyor_triple = new BlockConveyorTriple().setBlockName("conveyor_triple").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor_triple");
|
conveyor_triple = new BlockConveyorTriple().setBlockName("conveyor_triple").setHardness(2.0F).setResistance(2.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":conveyor_triple");
|
||||||
conveyor_chute = new BlockConveyorChute().setBlockName("conveyor_chute").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
conveyor_chute = new BlockConveyorChute().setBlockName("conveyor_chute").setHardness(2.0F).setResistance(2.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||||
conveyor_lift = new BlockConveyorLift().setBlockName("conveyor_lift").setHardness(2.0F).setResistance(2.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
conveyor_lift = new BlockConveyorLift().setBlockName("conveyor_lift").setHardness(2.0F).setResistance(2.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":conveyor");
|
||||||
crane_extractor = new CraneExtractor().setBlockName("crane_extractor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
crane_extractor = new CraneExtractor().setBlockName("crane_extractor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
crane_inserter = new CraneInserter().setBlockName("crane_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
crane_inserter = new CraneInserter().setBlockName("crane_inserter").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
crane_grabber = new CraneGrabber().setBlockName("crane_grabber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
crane_grabber = new CraneGrabber().setBlockName("crane_grabber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
|||||||
@ -1,8 +1,56 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class BlockConveyor extends BlockConveyorBendable {
|
public class BlockConveyor extends BlockConveyorBendable {
|
||||||
|
|
||||||
public BlockConveyor() {
|
public BlockConveyor() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
return ModItems.conveyor_wand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
|
if(tool != ToolType.SCREWDRIVER)
|
||||||
|
return false;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int newMeta = meta;
|
||||||
|
|
||||||
|
int dir = getPathDirection(meta);
|
||||||
|
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
if(meta > 9) meta -= 8;
|
||||||
|
if(meta > 5) meta -= 4;
|
||||||
|
newMeta = ForgeDirection.getOrientation(meta).getRotation(ForgeDirection.UP).ordinal() + dir * 4;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(dir < 2) {
|
||||||
|
newMeta += 4;
|
||||||
|
} else {
|
||||||
|
newMeta -= 8;
|
||||||
|
|
||||||
|
// switcheroo
|
||||||
|
world.setBlock(x, y, z, ModBlocks.conveyor_lift, newMeta, 3);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -74,6 +74,14 @@ public abstract class BlockConveyorBase extends Block implements IConveyorBelt,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ForgeDirection getInputDirection(World world, int x, int y, int z) {
|
||||||
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
public ForgeDirection getOutputDirection(World world, int x, int y, int z) {
|
||||||
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z)).getOpposite();
|
||||||
|
}
|
||||||
|
|
||||||
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
}
|
}
|
||||||
@ -167,4 +175,4 @@ public abstract class BlockConveyorBase extends Block implements IConveyorBelt,
|
|||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
this.addStandardInfo(stack, player, list, ext);
|
this.addStandardInfo(stack, player, list, ext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -14,7 +14,7 @@ public abstract class BlockConveyorBendable extends BlockConveyorBase implements
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT) protected IIcon curveLeft;
|
@SideOnly(Side.CLIENT) protected IIcon curveLeft;
|
||||||
@SideOnly(Side.CLIENT) protected IIcon curveRight;
|
@SideOnly(Side.CLIENT) protected IIcon curveRight;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
@ -22,20 +22,20 @@ public abstract class BlockConveyorBendable extends BlockConveyorBase implements
|
|||||||
this.curveLeft = iconRegister.registerIcon(this.getTextureName() + "_curve_left");
|
this.curveLeft = iconRegister.registerIcon(this.getTextureName() + "_curve_left");
|
||||||
this.curveRight = iconRegister.registerIcon(this.getTextureName() + "_curve_right");
|
this.curveRight = iconRegister.registerIcon(this.getTextureName() + "_curve_right");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getPathDirection(int meta) {
|
protected int getPathDirection(int meta) {
|
||||||
|
|
||||||
if(meta >= 6 && meta <= 9) return 1;
|
if(meta >= 6 && meta <= 9) return 1;
|
||||||
if(meta >= 10 && meta <= 13) return 2;
|
if(meta >= 10 && meta <= 13) return 2;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata) {
|
public IIcon getIcon(int side, int metadata) {
|
||||||
|
|
||||||
int dir = getPathDirection(metadata);
|
int dir = getPathDirection(metadata);
|
||||||
|
|
||||||
if(dir > 0 && side > 1)
|
if(dir > 0 && side > 1)
|
||||||
return this.sideIcon;
|
return this.sideIcon;
|
||||||
|
|
||||||
@ -43,22 +43,42 @@ public abstract class BlockConveyorBendable extends BlockConveyorBase implements
|
|||||||
return this.sideIcon;
|
return this.sideIcon;
|
||||||
if((metadata == 4 || metadata == 5) && (side == 2 || side == 3))
|
if((metadata == 4 || metadata == 5) && (side == 2 || side == 3))
|
||||||
return this.sideIcon;
|
return this.sideIcon;
|
||||||
|
|
||||||
if(dir == 1) return this.curveLeft;
|
if(dir == 1) return this.curveLeft;
|
||||||
if(dir == 2) return this.curveRight;
|
if(dir == 2) return this.curveRight;
|
||||||
|
|
||||||
return super.getIcon(side, metadata);
|
return super.getIcon(side, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
public ForgeDirection getInputDirection(World world, int x, int y, int z) {
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int dir = getPathDirection(meta);
|
||||||
|
return ForgeDirection.getOrientation(meta - dir * 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForgeDirection getOutputDirection(World world, int x, int y, int z) {
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
int dir = getPathDirection(meta);
|
int dir = getPathDirection(meta);
|
||||||
meta -= dir * 4;
|
meta -= dir * 4;
|
||||||
|
|
||||||
|
ForgeDirection primary = ForgeDirection.getOrientation(meta).getOpposite();
|
||||||
|
|
||||||
|
if(dir == 2) return primary.getRotation(ForgeDirection.UP);
|
||||||
|
if(dir == 1) return primary.getRotation(ForgeDirection.DOWN);
|
||||||
|
return primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int dir = getPathDirection(meta);
|
||||||
|
meta -= dir * 4;
|
||||||
|
|
||||||
ForgeDirection primary = ForgeDirection.getOrientation(meta);
|
ForgeDirection primary = ForgeDirection.getOrientation(meta);
|
||||||
|
|
||||||
if(dir > 0) {
|
if(dir > 0) {
|
||||||
dir--;
|
dir--;
|
||||||
double ix = x + 0.5;
|
double ix = x + 0.5;
|
||||||
@ -70,43 +90,43 @@ public abstract class BlockConveyorBendable extends BlockConveyorBase implements
|
|||||||
|
|
||||||
double dX = Math.abs(itemPos.xCoord - ix);
|
double dX = Math.abs(itemPos.xCoord - ix);
|
||||||
double dZ = Math.abs(itemPos.zCoord - iz);
|
double dZ = Math.abs(itemPos.zCoord - iz);
|
||||||
|
|
||||||
if(dX + dZ >= 1) {
|
if(dX + dZ >= 1) {
|
||||||
|
|
||||||
if(dir == 0)
|
if(dir == 0)
|
||||||
return secondary.getOpposite();
|
return secondary.getOpposite();
|
||||||
else
|
else
|
||||||
return secondary;
|
return secondary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return primary;
|
return primary;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
if(tool != ToolType.SCREWDRIVER)
|
if(tool != ToolType.SCREWDRIVER)
|
||||||
return false;
|
return false;
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
int newMeta = meta;
|
int newMeta = meta;
|
||||||
|
|
||||||
int dir = getPathDirection(meta);
|
int dir = getPathDirection(meta);
|
||||||
|
|
||||||
if(!player.isSneaking()) {
|
if(!player.isSneaking()) {
|
||||||
if(meta > 9) meta -= 8;
|
if(meta > 9) meta -= 8;
|
||||||
if(meta > 5) meta -= 4;
|
if(meta > 5) meta -= 4;
|
||||||
newMeta = ForgeDirection.getOrientation(meta).getRotation(ForgeDirection.UP).ordinal() + dir * 4;
|
newMeta = ForgeDirection.getOrientation(meta).getRotation(ForgeDirection.UP).ordinal() + dir * 4;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if(dir < 2)
|
if(dir < 2)
|
||||||
newMeta += 4;
|
newMeta += 4;
|
||||||
else
|
else
|
||||||
newMeta -= 8;
|
newMeta -= 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,32 +1,40 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable;
|
||||||
import api.hbm.conveyor.IConveyorBelt;
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
import api.hbm.conveyor.IEnterableBlock;
|
import api.hbm.conveyor.IEnterableBlock;
|
||||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class BlockConveyorChute extends BlockConveyorBase {
|
public class BlockConveyorChute extends BlockConveyorBase implements IToolable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
|
|
||||||
Block below = world.getBlock(x, y - 1, z);
|
Block below = world.getBlock(x, y - 1, z);
|
||||||
if(below instanceof IConveyorBelt || below instanceof IEnterableBlock) {
|
if(below instanceof IConveyorBelt || below instanceof IEnterableBlock) {
|
||||||
speed *= 5;
|
speed *= 5;
|
||||||
} else if(itemPos.yCoord > y + 0.25) {
|
} else if(itemPos.yCoord > y + 0.25) {
|
||||||
speed *= 3;
|
speed *= 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.getTravelLocation(world, x, y, z, itemPos, speed);
|
return super.getTravelLocation(world, x, y, z, itemPos, speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
@ -34,13 +42,13 @@ public class BlockConveyorChute extends BlockConveyorBase {
|
|||||||
if(below instanceof IConveyorBelt || below instanceof IEnterableBlock || itemPos.yCoord > y + 0.25) {
|
if(below instanceof IConveyorBelt || below instanceof IEnterableBlock || itemPos.yCoord > y + 0.25) {
|
||||||
return ForgeDirection.UP;
|
return ForgeDirection.UP;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
Block below = world.getBlock(x, y - 1, z);
|
Block below = world.getBlock(x, y - 1, z);
|
||||||
if(below instanceof IConveyorBelt || below instanceof IEnterableBlock || itemPos.yCoord > y + 0.25) {
|
if(below instanceof IConveyorBelt || below instanceof IEnterableBlock || itemPos.yCoord > y + 0.25) {
|
||||||
return Vec3.createVectorHelper(x + 0.5, itemPos.yCoord, z + 0.5);
|
return Vec3.createVectorHelper(x + 0.5, itemPos.yCoord, z + 0.5);
|
||||||
@ -63,10 +71,36 @@ public class BlockConveyorChute extends BlockConveyorBase {
|
|||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
return ModItems.conveyor_wand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
|
if(tool != ToolType.SCREWDRIVER)
|
||||||
|
return false;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int newMeta = meta;
|
||||||
|
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
if(meta > 9) meta -= 8;
|
||||||
|
if(meta > 5) meta -= 4;
|
||||||
|
newMeta = ForgeDirection.getOrientation(meta).getRotation(ForgeDirection.UP).ordinal();
|
||||||
|
|
||||||
|
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||||
|
} else {
|
||||||
|
world.setBlock(x, y, z, ModBlocks.conveyor, newMeta, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,10 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -11,10 +16,10 @@ public class BlockConveyorDouble extends BlockConveyorBendable {
|
|||||||
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
ForgeDirection dir = this.getTravelDirection(world, x, y, z, itemPos);
|
ForgeDirection dir = this.getTravelDirection(world, x, y, z, itemPos);
|
||||||
|
|
||||||
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
|
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
|
||||||
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
|
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
|
||||||
|
|
||||||
double posX = x + 0.5;
|
double posX = x + 0.5;
|
||||||
double posZ = z + 0.5;
|
double posZ = z + 0.5;
|
||||||
|
|
||||||
@ -26,7 +31,18 @@ public class BlockConveyorDouble extends BlockConveyorBendable {
|
|||||||
posZ = itemPos.zCoord;
|
posZ = itemPos.zCoord;
|
||||||
posX += itemPos.xCoord > posX ? 0.25 : -0.25;
|
posX += itemPos.xCoord > posX ? 0.25 : -0.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
|
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
return ModItems.conveyor_wand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped(int meta) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,5 +1,10 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -9,4 +14,15 @@ public class BlockConveyorExpress extends BlockConveyorBendable {
|
|||||||
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
public Vec3 getTravelLocation(World world, int x, int y, int z, Vec3 itemPos, double speed) {
|
||||||
return super.getTravelLocation(world, x, y, z, itemPos, speed * 3);
|
return super.getTravelLocation(world, x, y, z, itemPos, speed * 3);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
return ModItems.conveyor_wand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped(int meta) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,28 +1,36 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import api.hbm.block.IToolable;
|
||||||
import api.hbm.conveyor.IConveyorBelt;
|
import api.hbm.conveyor.IConveyorBelt;
|
||||||
import api.hbm.conveyor.IEnterableBlock;
|
import api.hbm.conveyor.IEnterableBlock;
|
||||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class BlockConveyorLift extends BlockConveyorBase {
|
public class BlockConveyorLift extends BlockConveyorBase implements IToolable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||||
|
|
||||||
if(!top) {
|
if(!top) {
|
||||||
return ForgeDirection.DOWN;
|
return ForgeDirection.DOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
return ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +52,7 @@ public class BlockConveyorLift extends BlockConveyorBase {
|
|||||||
|
|
||||||
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||||
|
|
||||||
if(top)
|
if(top)
|
||||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||||
else
|
else
|
||||||
@ -69,10 +77,36 @@ public class BlockConveyorLift extends BlockConveyorBase {
|
|||||||
public int getRenderType() {
|
public int getRenderType() {
|
||||||
return renderID;
|
return renderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
return ModItems.conveyor_wand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
|
if(tool != ToolType.SCREWDRIVER)
|
||||||
|
return false;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
int newMeta = meta;
|
||||||
|
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
if(meta > 9) meta -= 8;
|
||||||
|
if(meta > 5) meta -= 4;
|
||||||
|
newMeta = ForgeDirection.getOrientation(meta).getRotation(ForgeDirection.UP).ordinal();
|
||||||
|
|
||||||
|
world.setBlockMetadataWithNotify(x, y, z, newMeta, 3);
|
||||||
|
} else {
|
||||||
|
world.setBlock(x, y, z, ModBlocks.conveyor_chute, newMeta, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,10 @@
|
|||||||
package com.hbm.blocks.network;
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -11,10 +16,10 @@ public class BlockConveyorTriple extends BlockConveyorBendable {
|
|||||||
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||||
|
|
||||||
ForgeDirection dir = this.getTravelDirection(world, x, y, z, itemPos);
|
ForgeDirection dir = this.getTravelDirection(world, x, y, z, itemPos);
|
||||||
|
|
||||||
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
|
itemPos.xCoord = MathHelper.clamp_double(itemPos.xCoord, x, x + 1);
|
||||||
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
|
itemPos.zCoord = MathHelper.clamp_double(itemPos.zCoord, z, z + 1);
|
||||||
|
|
||||||
double posX = x + 0.5;
|
double posX = x + 0.5;
|
||||||
double posZ = z + 0.5;
|
double posZ = z + 0.5;
|
||||||
|
|
||||||
@ -26,7 +31,18 @@ public class BlockConveyorTriple extends BlockConveyorBendable {
|
|||||||
posZ = itemPos.zCoord;
|
posZ = itemPos.zCoord;
|
||||||
posX += (itemPos.xCoord > posX + 0.15 ? 0.3125 : itemPos.xCoord < posX - 0.15 ? -0.3125 : 0);
|
posX += (itemPos.xCoord > posX + 0.15 ? 0.3125 : itemPos.xCoord < posX - 0.15 ? -0.3125 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
|
return Vec3.createVectorHelper(posX, y + 0.25, posZ);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(int meta, Random rand, int fortune) {
|
||||||
|
return ModItems.conveyor_wand;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped(int meta) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ package com.hbm.blocks.network;
|
|||||||
import api.hbm.block.IToolable;
|
import api.hbm.block.IToolable;
|
||||||
import com.hbm.blocks.IBlockSideRotation;
|
import com.hbm.blocks.IBlockSideRotation;
|
||||||
import com.hbm.blocks.ITooltipProvider;
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.items.tool.ItemConveyorWand;
|
||||||
import com.hbm.items.tool.ItemTooling;
|
import com.hbm.items.tool.ItemTooling;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
@ -71,11 +72,13 @@ public abstract class BlockCraneBase extends BlockContainer implements IBlockSid
|
|||||||
this.iconOut = iconRegister.registerIcon(RefStrings.MODID + ":crane_out");
|
this.iconOut = iconRegister.registerIcon(RefStrings.MODID + ":crane_out");
|
||||||
this.iconSideOut = iconRegister.registerIcon(RefStrings.MODID + ":crane_side_out");
|
this.iconSideOut = iconRegister.registerIcon(RefStrings.MODID + ":crane_side_out");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTooling) {
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTooling) {
|
||||||
return false;
|
return false;
|
||||||
|
} else if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemConveyorWand) {
|
||||||
|
return false;
|
||||||
} else if(world.isRemote) {
|
} else if(world.isRemote) {
|
||||||
return true;
|
return true;
|
||||||
} else if(!player.isSneaking()) {
|
} else if(!player.isSneaking()) {
|
||||||
@ -85,7 +88,7 @@ public abstract class BlockCraneBase extends BlockContainer implements IBlockSid
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||||
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
int l = BlockPistonBase.determineOrientation(world, x, y, z, player);
|
||||||
@ -170,7 +173,7 @@ public abstract class BlockCraneBase extends BlockContainer implements IBlockSid
|
|||||||
|
|
||||||
return this.blockIcon;
|
return this.blockIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(side == outputSide.ordinal()) {
|
if(side == outputSide.ordinal()) {
|
||||||
return this.iconSideOut;
|
return this.iconSideOut;
|
||||||
}
|
}
|
||||||
@ -256,7 +259,7 @@ public abstract class BlockCraneBase extends BlockContainer implements IBlockSid
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int renderIDClassic = RenderingRegistry.getNextAvailableRenderId();
|
public static int renderIDClassic = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -269,7 +272,7 @@ public abstract class BlockCraneBase extends BlockContainer implements IBlockSid
|
|||||||
ISidedInventory tileentityfurnace = (ISidedInventory) world.getTileEntity(x, y, z);
|
ISidedInventory tileentityfurnace = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(tileentityfurnace != null) {
|
if(tileentityfurnace != null) {
|
||||||
|
|
||||||
for(int i1 = start; i1 < end; ++i1) {
|
for(int i1 = start; i1 < end; ++i1) {
|
||||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||||
|
|
||||||
|
|||||||
@ -2250,6 +2250,8 @@ public class ModItems {
|
|||||||
public static Item mysteryshovel;
|
public static Item mysteryshovel;
|
||||||
public static Item memory;
|
public static Item memory;
|
||||||
|
|
||||||
|
public static Item conveyor_wand;
|
||||||
|
|
||||||
public static void initializeItem()
|
public static void initializeItem()
|
||||||
{
|
{
|
||||||
redstone_sword = new RedstoneSword(ToolMaterial.STONE).setUnlocalizedName("redstone_sword").setCreativeTab(CreativeTabs.tabCombat).setTextureName(RefStrings.MODID + ":redstone_sword");
|
redstone_sword = new RedstoneSword(ToolMaterial.STONE).setUnlocalizedName("redstone_sword").setCreativeTab(CreativeTabs.tabCombat).setTextureName(RefStrings.MODID + ":redstone_sword");
|
||||||
@ -5029,6 +5031,8 @@ public class ModItems {
|
|||||||
mysteryshovel = new ItemMS().setUnlocalizedName("mysteryshovel").setFull3D().setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cursed_shovel");
|
mysteryshovel = new ItemMS().setUnlocalizedName("mysteryshovel").setFull3D().setMaxStackSize(1).setTextureName(RefStrings.MODID + ":cursed_shovel");
|
||||||
memory = new ItemBattery(Long.MAX_VALUE / 100L, 100000000000000L, 100000000000000L).setUnlocalizedName("memory").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mo8_anim");
|
memory = new ItemBattery(Long.MAX_VALUE / 100L, 100000000000000L, 100000000000000L).setUnlocalizedName("memory").setMaxStackSize(1).setTextureName(RefStrings.MODID + ":mo8_anim");
|
||||||
|
|
||||||
|
conveyor_wand = new ItemConveyorWand().setUnlocalizedName("conveyor_wand").setCreativeTab(MainRegistry.machineTab).setFull3D().setTextureName(RefStrings.MODID + ":wand_s");
|
||||||
|
|
||||||
GunFactory.init();
|
GunFactory.init();
|
||||||
|
|
||||||
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.mud_fluid, 1000), new ItemStack(ModItems.bucket_mud), new ItemStack(Items.bucket));
|
FluidContainerRegistry.registerFluidContainer(new FluidStack(ModBlocks.mud_fluid, 1000), new ItemStack(ModItems.bucket_mud), new ItemStack(Items.bucket));
|
||||||
@ -7237,6 +7241,7 @@ public class ModItems {
|
|||||||
GameRegistry.registerItem(bob_nuclear, bob_nuclear.getUnlocalizedName());
|
GameRegistry.registerItem(bob_nuclear, bob_nuclear.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(mysteryshovel, mysteryshovel.getUnlocalizedName());
|
GameRegistry.registerItem(mysteryshovel, mysteryshovel.getUnlocalizedName());
|
||||||
GameRegistry.registerItem(memory, memory.getUnlocalizedName());
|
GameRegistry.registerItem(memory, memory.getUnlocalizedName());
|
||||||
|
GameRegistry.registerItem(conveyor_wand, conveyor_wand.getUnlocalizedName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addRemap(String unloc, Item item, Enum sub) {
|
public static void addRemap(String unloc, Item item, Enum sub) {
|
||||||
|
|||||||
495
src/main/java/com/hbm/items/tool/ItemConveyorWand.java
Normal file
495
src/main/java/com/hbm/items/tool/ItemConveyorWand.java
Normal file
@ -0,0 +1,495 @@
|
|||||||
|
package com.hbm.items.tool;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.network.BlockConveyorBase;
|
||||||
|
import com.hbm.blocks.network.BlockConveyorBendable;
|
||||||
|
import com.hbm.blocks.network.BlockCraneBase;
|
||||||
|
import com.hbm.render.util.RenderOverhead;
|
||||||
|
import com.hbm.util.I18nUtil;
|
||||||
|
import com.hbm.wiaj.WorldInAJar;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||||
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ForgeHooks;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
import net.minecraftforge.event.world.BlockEvent;
|
||||||
|
|
||||||
|
public class ItemConveyorWand extends Item {
|
||||||
|
|
||||||
|
public ItemConveyorWand() {
|
||||||
|
setHasSubtypes(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static enum ConveyorType {
|
||||||
|
REGULAR,
|
||||||
|
EXPRESS,
|
||||||
|
DOUBLE,
|
||||||
|
TRIPLE
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ConveyorType getType(ItemStack stack) {
|
||||||
|
if(stack == null) return ConveyorType.REGULAR;
|
||||||
|
return ConveyorType.values()[stack.getItemDamage()];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Block getConveyorBlock(ConveyorType type) {
|
||||||
|
switch(type) {
|
||||||
|
case EXPRESS: return ModBlocks.conveyor_express;
|
||||||
|
case DOUBLE: return ModBlocks.conveyor_double;
|
||||||
|
case TRIPLE: return ModBlocks.conveyor_triple;
|
||||||
|
default: return ModBlocks.conveyor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean hasSnakesAndLadders(ConveyorType type) {
|
||||||
|
return type == ConveyorType.REGULAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||||
|
for(ConveyorType type : ConveyorType.values()) {
|
||||||
|
list.add(new ItemStack(item, 1, type.ordinal()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
|
return super.getUnlocalizedName() + "." + getType(stack).name().toLowerCase(Locale.US);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
|
||||||
|
if(Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||||
|
for(String s : I18nUtil.resolveKeyArray(super.getUnlocalizedName(stack) + ".desc")) {
|
||||||
|
list.add(EnumChatFormatting.YELLOW + s);
|
||||||
|
}
|
||||||
|
if(hasSnakesAndLadders(getType(stack))) {
|
||||||
|
list.add(EnumChatFormatting.AQUA + I18nUtil.resolveKey(super.getUnlocalizedName(stack) + ".vertical.desc"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
list.add(EnumChatFormatting.DARK_GRAY + "" + EnumChatFormatting.ITALIC + "Hold <" + EnumChatFormatting.YELLOW + "" + EnumChatFormatting.ITALIC + "LSHIFT" + EnumChatFormatting.DARK_GRAY
|
||||||
|
+ "" + EnumChatFormatting.ITALIC + "> to display more info");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float fx, float fy, float fz) {
|
||||||
|
if(player.isSneaking() && !stack.hasTagCompound()) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(side);
|
||||||
|
Block onBlock = world.getBlock(x, y, z);
|
||||||
|
int onMeta = world.getBlockMetadata(x, y, z);
|
||||||
|
ConveyorType type = getType(stack);
|
||||||
|
|
||||||
|
if(hasSnakesAndLadders(type) && onBlock == ModBlocks.conveyor && onMeta < 6) {
|
||||||
|
if(dir == ForgeDirection.UP) {
|
||||||
|
onBlock = ModBlocks.conveyor_lift;
|
||||||
|
world.setBlock(x, y, z, onBlock, onMeta, 3);
|
||||||
|
} else if(dir == ForgeDirection.DOWN) {
|
||||||
|
onBlock = ModBlocks.conveyor_chute;
|
||||||
|
world.setBlock(x, y, z, onBlock, onMeta, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Block toPlace = getConveyorBlock(type);
|
||||||
|
if(hasSnakesAndLadders(type)) {
|
||||||
|
if(onBlock == ModBlocks.conveyor_lift && dir == ForgeDirection.UP) toPlace = ModBlocks.conveyor_lift;
|
||||||
|
if(onBlock == ModBlocks.conveyor_chute && dir == ForgeDirection.DOWN) toPlace = ModBlocks.conveyor_chute;
|
||||||
|
}
|
||||||
|
|
||||||
|
x += dir.offsetX;
|
||||||
|
y += dir.offsetY;
|
||||||
|
z += dir.offsetZ;
|
||||||
|
|
||||||
|
if(world.getBlock(x, y, z).isReplaceable(world, x, y, z)) {
|
||||||
|
world.setBlock(x, y, z, toPlace);
|
||||||
|
toPlace.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||||
|
stack.stackSize--;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// If placing on top of a conveyor block, auto-snap to edge if possible
|
||||||
|
// this makes it easier to connect without having to click the small edge of a conveyor
|
||||||
|
Block onBlock = world.getBlock(x, y, z);
|
||||||
|
if(onBlock instanceof BlockConveyorBendable) {
|
||||||
|
BlockConveyorBase bendable = (BlockConveyorBase) onBlock;
|
||||||
|
ForgeDirection moveDir = stack.hasTagCompound() ? bendable.getInputDirection(world, x, y, z) : bendable.getOutputDirection(world, x, y, z);
|
||||||
|
|
||||||
|
int ox = x + moveDir.offsetX;
|
||||||
|
int oy = y + moveDir.offsetY;
|
||||||
|
int oz = z + moveDir.offsetZ;
|
||||||
|
|
||||||
|
if(world.getBlock(ox, oy, oz).isReplaceable(world, ox, oy, oz)) {
|
||||||
|
side = moveDir.ordinal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!stack.hasTagCompound()) {
|
||||||
|
// Starting placement
|
||||||
|
NBTTagCompound nbt = stack.stackTagCompound = new NBTTagCompound();
|
||||||
|
|
||||||
|
nbt.setInteger("x", x);
|
||||||
|
nbt.setInteger("y", y);
|
||||||
|
nbt.setInteger("z", z);
|
||||||
|
nbt.setInteger("side", side);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
if(player.capabilities.isCreativeMode) {
|
||||||
|
count = 256;
|
||||||
|
} else {
|
||||||
|
for(ItemStack inventoryStack : player.inventory.mainInventory) {
|
||||||
|
if(inventoryStack != null && inventoryStack.getItem() == this && inventoryStack.getItemDamage() == stack.getItemDamage()) {
|
||||||
|
count += inventoryStack.stackSize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nbt.setInteger("count", count);
|
||||||
|
} else {
|
||||||
|
// Constructing conveyor
|
||||||
|
NBTTagCompound nbt = stack.stackTagCompound;
|
||||||
|
|
||||||
|
int sx = nbt.getInteger("x");
|
||||||
|
int sy = nbt.getInteger("y");
|
||||||
|
int sz = nbt.getInteger("z");
|
||||||
|
int sSide = nbt.getInteger("side");
|
||||||
|
int count = nbt.getInteger("count");
|
||||||
|
|
||||||
|
if(!world.isRemote) {
|
||||||
|
ConveyorType type = getType(stack);
|
||||||
|
|
||||||
|
// pretend to construct, if it doesn't fail, actually construct
|
||||||
|
int constructCount = construct(world, null, type, player, sx, sy, sz, sSide, x, y, z, side, 0, 0, 0, count);
|
||||||
|
if(constructCount > 0) {
|
||||||
|
int toRemove = construct(world, world, type, player, sx, sy, sz, sSide, x, y, z, side, 0, 0, 0, count);
|
||||||
|
|
||||||
|
if(!player.capabilities.isCreativeMode) {
|
||||||
|
for(ItemStack inventoryStack : player.inventory.mainInventory) {
|
||||||
|
if(inventoryStack != null && inventoryStack.getItem() == this && inventoryStack.getItemDamage() == stack.getItemDamage()) {
|
||||||
|
int removing = Math.min(toRemove, inventoryStack.stackSize);
|
||||||
|
inventoryStack.stackSize -= removing;
|
||||||
|
toRemove -= removing;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(toRemove <= 0) break;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.inventoryContainer.detectAndSendChanges();
|
||||||
|
}
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText("Conveyor built!"));
|
||||||
|
} else if(constructCount == 0) {
|
||||||
|
player.addChatMessage(new ChatComponentText("Not enough conveyors, build cancelled"));
|
||||||
|
} else {
|
||||||
|
player.addChatMessage(new ChatComponentText("Conveyor obstructed, build cancelled"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
RenderOverhead.clearActionPreview();
|
||||||
|
lastMop = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.stackTagCompound = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true; // always eat interactions
|
||||||
|
}
|
||||||
|
|
||||||
|
private static MovingObjectPosition lastMop;
|
||||||
|
private static int lastSide;
|
||||||
|
private static float lastYaw;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean inHand) {
|
||||||
|
if(!(entity instanceof EntityPlayer)) return;
|
||||||
|
EntityPlayer player = (EntityPlayer) entity;
|
||||||
|
|
||||||
|
if(!inHand && stack.hasTagCompound()) {
|
||||||
|
ItemStack held = player.getHeldItem();
|
||||||
|
if(held == null || held.getItem() != this || held.getItemDamage() != stack.getItemDamage()) {
|
||||||
|
stack.stackTagCompound = null;
|
||||||
|
if(!world.isRemote) {
|
||||||
|
RenderOverhead.clearActionPreview();
|
||||||
|
lastMop = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// clientside prediction only
|
||||||
|
if(!world.isRemote && inHand) {
|
||||||
|
if(!stack.hasTagCompound()) {
|
||||||
|
RenderOverhead.clearActionPreview();
|
||||||
|
lastMop = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MovingObjectPosition mop = Minecraft.getMinecraft().objectMouseOver;
|
||||||
|
if(mop == null || mop.typeOfHit != MovingObjectType.BLOCK) {
|
||||||
|
RenderOverhead.clearActionPreview();
|
||||||
|
lastMop = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int x = mop.blockX;
|
||||||
|
int y = mop.blockY;
|
||||||
|
int z = mop.blockZ;
|
||||||
|
int side = mop.sideHit;
|
||||||
|
|
||||||
|
Block onBlock = world.getBlock(x, y, z);
|
||||||
|
if(onBlock instanceof BlockConveyorBendable) {
|
||||||
|
BlockConveyorBase bendable = (BlockConveyorBase) onBlock;
|
||||||
|
ForgeDirection moveDir = bendable.getInputDirection(world, x, y, z);
|
||||||
|
|
||||||
|
int ox = x + moveDir.offsetX;
|
||||||
|
int oy = y + moveDir.offsetY;
|
||||||
|
int oz = z + moveDir.offsetZ;
|
||||||
|
|
||||||
|
if(world.getBlock(ox, oy, oz).isReplaceable(world, ox, oy, oz)) {
|
||||||
|
side = moveDir.ordinal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lastMop != null && mop.blockX == lastMop.blockX && mop.blockY == lastMop.blockY && mop.blockZ == lastMop.blockZ && side == lastSide && Math.abs(lastYaw - player.rotationYaw) < 15) return;
|
||||||
|
lastMop = mop;
|
||||||
|
lastYaw = player.rotationYaw;
|
||||||
|
lastSide = side;
|
||||||
|
|
||||||
|
NBTTagCompound nbt = stack.stackTagCompound;
|
||||||
|
|
||||||
|
int sx = nbt.getInteger("x");
|
||||||
|
int sy = nbt.getInteger("y");
|
||||||
|
int sz = nbt.getInteger("z");
|
||||||
|
int sSide = nbt.getInteger("side");
|
||||||
|
int count = nbt.getInteger("count");
|
||||||
|
|
||||||
|
// Size has a one block buffer on both sides, for overshooting conveyors
|
||||||
|
int sizeX = Math.abs(sx - x) + 3;
|
||||||
|
int sizeY = Math.abs(sy - y) + 3;
|
||||||
|
int sizeZ = Math.abs(sz - z) + 3;
|
||||||
|
|
||||||
|
int minX = Math.min(sx, x) - 1;
|
||||||
|
int minY = Math.min(sy, y) - 1;
|
||||||
|
int minZ = Math.min(sz, z) - 1;
|
||||||
|
|
||||||
|
WorldInAJar wiaj = new WorldInAJar(sizeX, sizeY, sizeZ);
|
||||||
|
boolean pathSuccess = construct(world, wiaj, getType(stack), player, sx, sy, sz, sSide, x, y, z, side, minX, minY, minZ, count) > 0;
|
||||||
|
|
||||||
|
RenderOverhead.setActionPreview(wiaj, minX, minY, minZ, pathSuccess);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// In creative, auto delete connected conveyors
|
||||||
|
@Override
|
||||||
|
public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer playerEntity) {
|
||||||
|
World world = playerEntity.worldObj;
|
||||||
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
|
if(!playerEntity.capabilities.isCreativeMode) return false;
|
||||||
|
if(!(playerEntity instanceof EntityPlayerMP)) return false;
|
||||||
|
|
||||||
|
EntityPlayerMP player = (EntityPlayerMP) playerEntity;
|
||||||
|
|
||||||
|
if(!world.isRemote && block instanceof BlockConveyorBase) {
|
||||||
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
breakExtra(world, player, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, 32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void breakExtra(World world, EntityPlayerMP player, int x, int y, int z, int depth) {
|
||||||
|
depth--;
|
||||||
|
if(depth <= 0) return;
|
||||||
|
|
||||||
|
Block block = world.getBlock(x, y, z);
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
if(!(block instanceof BlockConveyorBase)) return;
|
||||||
|
|
||||||
|
BlockEvent.BreakEvent event = ForgeHooks.onBlockBreakEvent(world, player.theItemInWorldManager.getGameType(), player, x, y, z);
|
||||||
|
if(event.isCanceled())
|
||||||
|
return;
|
||||||
|
|
||||||
|
block.onBlockHarvested(world, x, y, z, meta, player);
|
||||||
|
if(block.removedByPlayer(world, player, x, y, z, false)) {
|
||||||
|
block.onBlockDestroyedByPlayer(world, x, y, z, meta);
|
||||||
|
}
|
||||||
|
|
||||||
|
player.playerNetServerHandler.sendPacket(new S23PacketBlockChange(x, y, z, world));
|
||||||
|
|
||||||
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||||
|
breakExtra(world, player, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, depth);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// attempts to construct a conveyor between two points, including bends, lifts, and chutes
|
||||||
|
private static int construct(World routeWorld, IBlockAccess buildWorld, ConveyorType type, EntityPlayer player, int x1, int y1, int z1, int side1, int x2, int y2, int z2, int side2, int box, int boy, int boz, int max) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(side1);
|
||||||
|
ForgeDirection targetDir = ForgeDirection.getOrientation(side2);
|
||||||
|
|
||||||
|
// if placing within a single block, we have to handle rotation specially, treating it like a manual placement with player facing
|
||||||
|
if(x1 == x2 && y1 == y2 && z1 == z2 && side1 == side2 && (dir == ForgeDirection.UP || dir == ForgeDirection.DOWN)) {
|
||||||
|
int meta = getFacingMeta(player);
|
||||||
|
|
||||||
|
y1 += dir.offsetY;
|
||||||
|
|
||||||
|
if(!routeWorld.getBlock(x1, y1, z1).isReplaceable(routeWorld, x1, y1, z1)) return -1;
|
||||||
|
|
||||||
|
Block block = getConveyorBlock(type);
|
||||||
|
if(buildWorld instanceof World) {
|
||||||
|
((World) buildWorld).setBlock(x1 - box, y1 - boy, z1 - boz, block, meta, 3);
|
||||||
|
} else if(buildWorld instanceof WorldInAJar) {
|
||||||
|
((WorldInAJar) buildWorld).setBlock(x1 - box, y1 - boy, z1 - boz, block, meta);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean hasVertical = hasSnakesAndLadders(type);
|
||||||
|
|
||||||
|
int tx = x2 + targetDir.offsetX;
|
||||||
|
int ty = y2 + targetDir.offsetY;
|
||||||
|
int tz = z2 + targetDir.offsetZ;
|
||||||
|
|
||||||
|
int x = x1 + dir.offsetX;
|
||||||
|
int y = y1 + dir.offsetY;
|
||||||
|
int z = z1 + dir.offsetZ;
|
||||||
|
|
||||||
|
if(dir == ForgeDirection.UP || dir == ForgeDirection.DOWN) {
|
||||||
|
dir = getTargetDirection(x, y, z, x2, y2, z2, hasVertical);
|
||||||
|
}
|
||||||
|
|
||||||
|
Block targetBlock = routeWorld.getBlock(x2, y2, z2);
|
||||||
|
boolean isTargetHorizontal = targetDir != ForgeDirection.UP && targetDir != ForgeDirection.DOWN;
|
||||||
|
boolean shouldTurnToTarget = isTargetHorizontal || targetBlock instanceof BlockCraneBase || targetBlock == ModBlocks.conveyor_lift || targetBlock == ModBlocks.conveyor_chute;
|
||||||
|
|
||||||
|
ForgeDirection horDir = dir == ForgeDirection.UP || dir == ForgeDirection.DOWN ? ForgeDirection.getOrientation(getFacingMeta(player)).getOpposite() : dir;
|
||||||
|
|
||||||
|
// Initial dropdown to floor level, if possible
|
||||||
|
if(y > ty) {
|
||||||
|
if(routeWorld.getBlock(x, y - 1, z).isReplaceable(routeWorld, x, y - 1, z)) {
|
||||||
|
dir = ForgeDirection.DOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int loopDepth = 1; loopDepth <= max; loopDepth++) {
|
||||||
|
if(!routeWorld.getBlock(x, y, z).isReplaceable(routeWorld, x, y, z)) return -1;
|
||||||
|
|
||||||
|
Block block = getConveyorForDirection(type, dir);
|
||||||
|
int meta = getConveyorMetaForDirection(block, dir, targetDir, horDir);
|
||||||
|
|
||||||
|
int ox = x + dir.offsetX;
|
||||||
|
int oy = y + dir.offsetY;
|
||||||
|
int oz = z + dir.offsetZ;
|
||||||
|
|
||||||
|
// check if we should turn before continuing
|
||||||
|
int fromDistance = taxiDistance(x, y, z, tx, ty, tz);
|
||||||
|
int toDistance = taxiDistance(ox, oy, oz, tx, ty, tz);
|
||||||
|
int finalDistance = taxiDistance(ox, oy, oz, x2, y2, z2);
|
||||||
|
boolean notAtTarget = (shouldTurnToTarget ? finalDistance : fromDistance) > 0;
|
||||||
|
boolean willBeObstructed = notAtTarget && !routeWorld.getBlock(ox, oy, oz).isReplaceable(routeWorld, ox, oy, oz);
|
||||||
|
boolean shouldTurn = (toDistance >= fromDistance && notAtTarget) || willBeObstructed;
|
||||||
|
|
||||||
|
if(shouldTurn) {
|
||||||
|
ForgeDirection newDir = getTargetDirection(x, y, z, shouldTurnToTarget ? x2 : tx, shouldTurnToTarget ? y2 : ty, shouldTurnToTarget ? z2 : tz, tx, ty, tz, dir, willBeObstructed, hasVertical);
|
||||||
|
|
||||||
|
if(newDir == ForgeDirection.UP) {
|
||||||
|
block = ModBlocks.conveyor_lift;
|
||||||
|
} else if(newDir == ForgeDirection.DOWN) {
|
||||||
|
block = ModBlocks.conveyor_chute;
|
||||||
|
} else if(dir.getRotation(ForgeDirection.UP) == newDir) {
|
||||||
|
meta += 8;
|
||||||
|
} else if(dir.getRotation(ForgeDirection.DOWN) == newDir) {
|
||||||
|
meta += 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
dir = newDir;
|
||||||
|
if(dir != ForgeDirection.UP && dir != ForgeDirection.DOWN) horDir = dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buildWorld instanceof World) {
|
||||||
|
((World) buildWorld).setBlock(x - box, y - boy, z - boz, block, meta, 3);
|
||||||
|
} else if(buildWorld instanceof WorldInAJar) {
|
||||||
|
((WorldInAJar) buildWorld).setBlock(x - box, y - boy, z - boz, block, meta);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(x == tx && y == ty && z == tz) return loopDepth;
|
||||||
|
|
||||||
|
x += dir.offsetX;
|
||||||
|
y += dir.offsetY;
|
||||||
|
z += dir.offsetZ;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getFacingMeta(EntityPlayer player) {
|
||||||
|
int meta = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||||
|
switch(meta) {
|
||||||
|
case 0: return 2;
|
||||||
|
case 1: return 5;
|
||||||
|
case 2: return 3;
|
||||||
|
case 3: return 4;
|
||||||
|
}
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getConveyorMetaForDirection(Block block, ForgeDirection dir, ForgeDirection targetDir, ForgeDirection horDir) {
|
||||||
|
if(block != ModBlocks.conveyor_chute && block != ModBlocks.conveyor_lift) return dir.getOpposite().ordinal();
|
||||||
|
if(targetDir == ForgeDirection.UP || targetDir == ForgeDirection.DOWN) return horDir.getOpposite().ordinal();
|
||||||
|
return targetDir.ordinal();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Block getConveyorForDirection(ConveyorType type, ForgeDirection dir) {
|
||||||
|
if(dir == ForgeDirection.UP) return ModBlocks.conveyor_lift;
|
||||||
|
if(dir == ForgeDirection.DOWN) return ModBlocks.conveyor_chute;
|
||||||
|
return getConveyorBlock(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ForgeDirection getTargetDirection(int x1, int y1, int z1, int x2, int y2, int z2, boolean hasVertical) {
|
||||||
|
return getTargetDirection(x1, y1, z1, x2, y2, z2, x2, y2, z2, null, false, hasVertical);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ForgeDirection getTargetDirection(int x1, int y1, int z1, int x2, int y2, int z2, int tx, int ty, int tz, ForgeDirection heading, boolean willBeObstructed, boolean hasVertical) {
|
||||||
|
if(hasVertical && (y1 != y2 || y1 != ty) && (willBeObstructed || (x1 == x2 && z1 == z2) || (x1 == tx && z1 == tz))) return y1 > y2 ? ForgeDirection.DOWN : ForgeDirection.UP;
|
||||||
|
|
||||||
|
if(Math.abs(x1 - x2) > Math.abs(z1 - z2)) {
|
||||||
|
if(heading == ForgeDirection.EAST || heading == ForgeDirection.WEST) return z1 > z2 ? ForgeDirection.NORTH : ForgeDirection.SOUTH;
|
||||||
|
return x1 > x2 ? ForgeDirection.WEST : ForgeDirection.EAST;
|
||||||
|
} else {
|
||||||
|
if(heading == ForgeDirection.NORTH || heading == ForgeDirection.SOUTH) return x1 > x2 ? ForgeDirection.WEST : ForgeDirection.EAST;
|
||||||
|
return z1 > z2 ? ForgeDirection.NORTH : ForgeDirection.SOUTH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int taxiDistance(int x1, int y1, int z1, int x2, int y2, int z2) {
|
||||||
|
return Math.abs(x1 - x2) + Math.abs(y1 - y2) + Math.abs(z1 - z2);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -66,7 +66,8 @@ import com.hbm.render.anim.BusAnimation;
|
|||||||
import com.hbm.render.entity.rocket.*;
|
import com.hbm.render.entity.rocket.*;
|
||||||
import com.hbm.render.item.*;
|
import com.hbm.render.item.*;
|
||||||
import com.hbm.render.item.ItemRenderMissileGeneric.RenderMissileType;
|
import com.hbm.render.item.ItemRenderMissileGeneric.RenderMissileType;
|
||||||
import com.hbm.render.item.block.ItemRenderDecoBlock;
|
import com.hbm.render.item.block.ItemRenderBlock;
|
||||||
|
import com.hbm.render.item.block.ItemRenderDecoBlock;
|
||||||
import com.hbm.render.item.weapon.*;
|
import com.hbm.render.item.weapon.*;
|
||||||
import com.hbm.render.loader.HmfModelLoader;
|
import com.hbm.render.loader.HmfModelLoader;
|
||||||
import com.hbm.render.model.ModelPigeon;
|
import com.hbm.render.model.ModelPigeon;
|
||||||
@ -559,6 +560,7 @@ public class ClientProxy extends ServerProxy {
|
|||||||
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_decon, new ItemRenderMultitool());
|
MinecraftForgeClient.registerItemRenderer(ModItems.multitool_decon, new ItemRenderMultitool());
|
||||||
//blocks
|
//blocks
|
||||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.steel_roof), new ItemRenderDecoBlock());
|
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.steel_roof), new ItemRenderDecoBlock());
|
||||||
|
MinecraftForgeClient.registerItemRenderer(ModItems.conveyor_wand, new ItemRenderBlock(ModBlocks.conveyor, ModBlocks.conveyor_express, ModBlocks.conveyor_double, ModBlocks.conveyor_triple));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -31,6 +31,7 @@ import com.hbm.items.machine.ItemCircuit.EnumCircuitType;
|
|||||||
import com.hbm.items.special.ItemCircuitStarComponent.CircuitComponentType;
|
import com.hbm.items.special.ItemCircuitStarComponent.CircuitComponentType;
|
||||||
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
import com.hbm.items.special.ItemHolotapeImage.EnumHoloImage;
|
||||||
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
|
import com.hbm.items.special.ItemPlasticScrap.ScrapType;
|
||||||
|
import com.hbm.items.tool.ItemConveyorWand.ConveyorType;
|
||||||
import com.hbm.items.tool.ItemDrone.EnumDroneType;
|
import com.hbm.items.tool.ItemDrone.EnumDroneType;
|
||||||
import com.hbm.items.tool.ItemGuideBook.BookType;
|
import com.hbm.items.tool.ItemGuideBook.BookType;
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
@ -220,14 +221,12 @@ public class CraftingManager {
|
|||||||
addRecipeAuto(new ItemStack(ModBlocks.radio_torch_counter, 4), new Object[] { "G", "R", "I", 'G', "dustGlowstone", 'R', Blocks.redstone_torch, 'I', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
|
addRecipeAuto(new ItemStack(ModBlocks.radio_torch_counter, 4), new Object[] { "G", "R", "I", 'G', "dustGlowstone", 'R', Blocks.redstone_torch, 'I', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.radio_telex, 2), new Object[] { "SCR", "W#W", "WWW", 'S', ModBlocks.radio_torch_sender, 'C', ModItems.crt_display, 'R', ModBlocks.radio_torch_receiver, 'W', KEY_PLANKS, '#', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG) });
|
addRecipeAuto(new ItemStack(ModBlocks.radio_telex, 2), new Object[] { "SCR", "W#W", "WWW", 'S', ModBlocks.radio_torch_sender, 'C', ModItems.crt_display, 'R', ModBlocks.radio_torch_receiver, 'W', KEY_PLANKS, '#', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.ANALOG) });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 16), new Object[] { "LLL", "I I", "LLL", 'L', Items.leather, 'I', IRON.ingot() });
|
addRecipeAuto(DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR, 16), new Object[] { "LLL", "I I", "LLL", 'L', Items.leather, 'I', IRON.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 16), new Object[] { "RSR", "I I", "RSR", 'I', IRON.ingot(), 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE), 'S', IRON.plate() });
|
addRecipeAuto(DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR, 16), new Object[] { "RSR", "I I", "RSR", 'I', IRON.ingot(), 'R', DictFrame.fromOne(ModItems.plant_item, EnumPlantType.ROPE), 'S', IRON.plate() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor, 64), new Object[] { "LLL", "I I", "LLL", 'L', ANY_RUBBER.ingot(), 'I', IRON.ingot() });
|
addRecipeAuto(DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR, 64), new Object[] { "LLL", "I I", "LLL", 'L', ANY_RUBBER.ingot(), 'I', IRON.ingot() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor_express, 8), new Object[] { "CCC", "CLC", "CCC", 'C', ModBlocks.conveyor, 'L', Fluids.LUBRICANT.getDict(1_000) });
|
addRecipeAuto(DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.EXPRESS, 8), new Object[] { "CCC", "CLC", "CCC", 'C', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR), 'L', Fluids.LUBRICANT.getDict(1_000) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor_double, 3), new Object[] { "CPC", "CPC", "CPC", 'C', ModBlocks.conveyor, 'P', IRON.plate() });
|
addRecipeAuto(DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.DOUBLE), new Object[] { "CPC", 'C', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR), 'P', IRON.plate() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor_triple, 3), new Object[] { "CPC", "CPC", "CPC", 'C', ModBlocks.conveyor_double, 'P', STEEL.plate() });
|
addRecipeAuto(DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.TRIPLE), new Object[] { "DPC", 'C', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR), 'D', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.DOUBLE), 'P', STEEL.plate() });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor_chute, 3), new Object[] { "IGI", "IGI", "ICI" , 'I', IRON.ingot(), 'G', ModBlocks.steel_grate, 'C', ModBlocks.conveyor });
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.conveyor_lift, 3), new Object[] { "IGI", "IGI", "ICI" , 'I', IRON.ingot(), 'G', ModBlocks.chain, 'C', ModBlocks.conveyor });
|
|
||||||
|
|
||||||
//addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 1), new Object[] { "T T", "PHP", "TFT", 'T', W.ingot(), 'P', ModItems.board_copper, 'H', Blocks.hopper, 'F', Blocks.furnace });
|
//addRecipeAuto(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 1), new Object[] { "T T", "PHP", "TFT", 'T', W.ingot(), 'P', ModItems.board_copper, 'H', Blocks.hopper, 'F', Blocks.furnace });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.machine_difurnace_extension, 1), new Object[] { " C ", "BGB", "BGB", 'C', CU.plate(), 'B', ModItems.ingot_firebrick, 'G', ModBlocks.steel_grate });
|
addRecipeAuto(new ItemStack(ModBlocks.machine_difurnace_extension, 1), new Object[] { " C ", "BGB", "BGB", 'C', CU.plate(), 'B', ModItems.ingot_firebrick, 'G', ModBlocks.steel_grate });
|
||||||
@ -938,18 +937,18 @@ public class CraftingManager {
|
|||||||
for(int i = 0; i < craneCasing.length / 2; i++) {
|
for(int i = 0; i < craneCasing.length / 2; i++) {
|
||||||
Object casing = craneCasing[i * 2];
|
Object casing = craneCasing[i * 2];
|
||||||
int amount = (int) craneCasing[i * 2 + 1];
|
int amount = (int) craneCasing[i * 2 + 1];
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_inserter, amount), new Object[] { "CCC", "C C", "CBC", 'C', casing, 'B', ModBlocks.conveyor });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_inserter, amount), new Object[] { "CCC", "C C", "CBC", 'C', casing, 'B', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_extractor, amount), new Object[] { "CCC", "CPC", "CBC", 'C', casing, 'B', ModBlocks.conveyor, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC) });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_extractor, amount), new Object[] { "CCC", "CPC", "CBC", 'C', casing, 'B', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_grabber, amount), new Object[] { "C C", "P P", "CBC", 'C', casing, 'B', ModBlocks.conveyor, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC) });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_grabber, amount), new Object[] { "C C", "P P", "CBC", 'C', casing, 'B', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR), 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC) });
|
||||||
}
|
}
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_boxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_PLANKS, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'C', ModBlocks.conveyor });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_boxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_PLANKS, 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'C', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_unboxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_STICK, 'P', Items.shears, 'C', ModBlocks.conveyor });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_unboxer), new Object[] { "WWW", "WPW", "CCC", 'W', KEY_STICK, 'P', Items.shears, 'C', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_router), new Object[] { "PIP", "ICI", "PIP", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', ModItems.plate_polymer, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_router), new Object[] { "PIP", "ICI", "PIP", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', ModItems.plate_polymer, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_splitter), new Object[] { "III", "PCP", "III", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', STEEL.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_splitter), new Object[] { "III", "PCP", "III", 'P', DictFrame.fromOne(ModItems.part_generic, EnumPartType.PISTON_PNEUMATIC), 'I', STEEL.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.VACUUM_TUBE) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.crane_partitioner), new Object[] { " M ", "BCB", 'M', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'B', ModBlocks.conveyor, 'C', ModBlocks.crate_steel });
|
addRecipeAuto(new ItemStack(ModBlocks.crane_partitioner), new Object[] { " M ", "BCB", 'M', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.CHIP), 'B', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR), 'C', ModBlocks.crate_steel });
|
||||||
|
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.machine_conveyor_press), new Object[] { "CPC", "CBC", "CCC", 'C', CU.plate(), 'P', ModBlocks.machine_epress, 'B', ModBlocks.conveyor });
|
addRecipeAuto(new ItemStack(ModBlocks.machine_conveyor_press), new Object[] { "CPC", "CBC", "CCC", 'C', CU.plate(), 'P', ModBlocks.machine_epress, 'B', DictFrame.fromOne(ModItems.conveyor_wand, ConveyorType.REGULAR) });
|
||||||
addRecipeAuto(new ItemStack(ModBlocks.radar_screen), new Object[] { "PCP", "SRS", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'S', STEEL.plate(), 'R', ModItems.crt_display });
|
addRecipeAuto(new ItemStack(ModBlocks.radar_screen), new Object[] { "PCP", "SRS", "PCP", 'P', ANY_PLASTIC.ingot(), 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'S', STEEL.plate(), 'R', ModItems.crt_display });
|
||||||
addRecipeAuto(new ItemStack(ModItems.radar_linker), new Object[] { "S", "C", "P", 'S', ModItems.crt_display, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'P', STEEL.plate() });
|
addRecipeAuto(new ItemStack(ModItems.radar_linker), new Object[] { "S", "C", "P", 'S', ModItems.crt_display, 'C', DictFrame.fromOne(ModItems.circuit, EnumCircuitType.BASIC), 'P', STEEL.plate() });
|
||||||
|
|
||||||
|
|||||||
@ -64,9 +64,6 @@ import com.hbm.util.ArmorRegistry.HazardClass;
|
|||||||
import com.hbm.wiaj.GuiWorldInAJar;
|
import com.hbm.wiaj.GuiWorldInAJar;
|
||||||
import com.hbm.wiaj.cannery.CanneryBase;
|
import com.hbm.wiaj.cannery.CanneryBase;
|
||||||
import com.hbm.wiaj.cannery.Jars;
|
import com.hbm.wiaj.cannery.Jars;
|
||||||
import com.hbm.util.ArmorRegistry;
|
|
||||||
import com.hbm.util.ArmorUtil;
|
|
||||||
import com.hbm.util.DamageResistanceHandler;
|
|
||||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
|
import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type;
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
@ -160,7 +157,7 @@ public class ModEventHandlerClient {
|
|||||||
GL11.glDepthMask(true);
|
GL11.glDepthMask(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if(event.type == ElementType.CROSSHAIRS && player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_aberrator) {
|
/*if(event.type == ElementType.CROSSHAIRS && player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.gun_aberrator) {
|
||||||
int width = event.resolution.getScaledWidth();
|
int width = event.resolution.getScaledWidth();
|
||||||
int height = event.resolution.getScaledHeight();
|
int height = event.resolution.getScaledHeight();
|
||||||
@ -367,7 +364,7 @@ public class ModEventHandlerClient {
|
|||||||
RenderScreenOverlay.renderScope(resolution, cfg.getScopeTexture(held));
|
RenderScreenOverlay.renderScope(resolution, cfg.getScopeTexture(held));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//prevents NBT changes (read: every fucking tick) on guns from bringing up the item's name over the hotbar
|
//prevents NBT changes (read: every fucking tick) on guns from bringing up the item's name over the hotbar
|
||||||
if(held != null && held.getItem() instanceof ItemGunBaseNT && Minecraft.getMinecraft().ingameGUI.highlightingItemStack != null && Minecraft.getMinecraft().ingameGUI.highlightingItemStack.getItem() == held.getItem()) {
|
if(held != null && held.getItem() instanceof ItemGunBaseNT && Minecraft.getMinecraft().ingameGUI.highlightingItemStack != null && Minecraft.getMinecraft().ingameGUI.highlightingItemStack.getItem() == held.getItem()) {
|
||||||
Minecraft.getMinecraft().ingameGUI.highlightingItemStack = held;
|
Minecraft.getMinecraft().ingameGUI.highlightingItemStack = held;
|
||||||
@ -1088,7 +1085,7 @@ public class ModEventHandlerClient {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderLodeStar = false; // GENUINELY shut the fuck up i'm not kidding
|
public static boolean renderLodeStar = false; // GENUINELY shut the fuck up i'm not kidding
|
||||||
public static long lastStarCheck = 0L;
|
public static long lastStarCheck = 0L;
|
||||||
|
|
||||||
@ -1121,14 +1118,14 @@ public class ModEventHandlerClient {
|
|||||||
world.provider.setSkyRenderer(new RenderNTMSkyboxChainloader(sky));
|
world.provider.setSkyRenderer(new RenderNTMSkyboxChainloader(sky));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
long millis = System.currentTimeMillis();
|
long millis = System.currentTimeMillis();
|
||||||
|
|
||||||
if(lastStarCheck + 200 < millis) {
|
if(lastStarCheck + 200 < millis) {
|
||||||
renderLodeStar = false; // GENUINELY shut the fuck up i'm not kidding
|
renderLodeStar = false; // GENUINELY shut the fuck up i'm not kidding
|
||||||
lastStarCheck = millis;
|
lastStarCheck = millis;
|
||||||
|
|
||||||
if(player != null) { // GENUINELY shut the fuck up i'm not kidding
|
if(player != null) { // GENUINELY shut the fuck up i'm not kidding
|
||||||
Vec3NT pos = new Vec3NT(player.posX, player.posY, player.posZ); // GENUINELY shut the fuck up i'm not kidding
|
Vec3NT pos = new Vec3NT(player.posX, player.posY, player.posZ); // GENUINELY shut the fuck up i'm not kidding
|
||||||
Vec3NT lodestarHeading = new Vec3NT(0, 0, -1D).rotateAroundXDeg(-15).multiply(25); // GENUINELY shut the fuck up i'm not kidding
|
Vec3NT lodestarHeading = new Vec3NT(0, 0, -1D).rotateAroundXDeg(-15).multiply(25); // GENUINELY shut the fuck up i'm not kidding
|
||||||
@ -1320,6 +1317,8 @@ public class ModEventHandlerClient {
|
|||||||
RenderOverhead.renderThermalSight(event.partialTicks);
|
RenderOverhead.renderThermalSight(event.partialTicks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RenderOverhead.renderActionPreview(event.partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
@SubscribeEvent(priority = EventPriority.HIGHEST)
|
||||||
@ -1437,7 +1436,7 @@ public class ModEventHandlerClient {
|
|||||||
client.sendQueue.addToSendQueue(new C0CPacketInput(client.moveStrafing, client.moveForward, client.movementInput.jump, client.movementInput.sneak));
|
client.sendQueue.addToSendQueue(new C0CPacketInput(client.moveStrafing, client.moveForward, client.movementInput.jump, client.movementInput.sneak));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event.phase == event.phase.END) {
|
if(event.phase == event.phase.END) {
|
||||||
ItemCustomLore.updateSystem();
|
ItemCustomLore.updateSystem();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,6 +84,13 @@ public class NEIConfig implements IConfigureNEI {
|
|||||||
API.hideItem(new ItemStack(ModBlocks.spotlight_halogen_off));
|
API.hideItem(new ItemStack(ModBlocks.spotlight_halogen_off));
|
||||||
API.hideItem(new ItemStack(ModBlocks.spotlight_beam));
|
API.hideItem(new ItemStack(ModBlocks.spotlight_beam));
|
||||||
|
|
||||||
|
API.hideItem(new ItemStack(ModBlocks.conveyor));
|
||||||
|
API.hideItem(new ItemStack(ModBlocks.conveyor_chute));
|
||||||
|
API.hideItem(new ItemStack(ModBlocks.conveyor_lift));
|
||||||
|
API.hideItem(new ItemStack(ModBlocks.conveyor_express));
|
||||||
|
API.hideItem(new ItemStack(ModBlocks.conveyor_double));
|
||||||
|
API.hideItem(new ItemStack(ModBlocks.conveyor_triple));
|
||||||
|
|
||||||
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
API.registerHighlightIdentifier(ModBlocks.plushie, new IHighlightHandler() {
|
||||||
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
@Override public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||||
int x = mop.blockX;
|
int x = mop.blockX;
|
||||||
|
|||||||
42
src/main/java/com/hbm/render/item/block/ItemRenderBlock.java
Normal file
42
src/main/java/com/hbm/render/item/block/ItemRenderBlock.java
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
package com.hbm.render.item.block;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureManager;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.client.IItemRenderer;
|
||||||
|
|
||||||
|
public class ItemRenderBlock implements IItemRenderer {
|
||||||
|
|
||||||
|
private final Block[] blocks;
|
||||||
|
private RenderBlocks renderBlocks = new RenderBlocks();
|
||||||
|
|
||||||
|
public ItemRenderBlock(Block... blocks) {
|
||||||
|
this.blocks = blocks;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||||
|
if(type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||||
|
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||||
|
}
|
||||||
|
|
||||||
|
TextureManager textureManager = Minecraft.getMinecraft().getTextureManager();
|
||||||
|
textureManager.bindTexture(textureManager.getResourceLocation(0));
|
||||||
|
renderBlocks.renderBlockAsItem(blocks[item.getItemDamage()], 0, 1.0F);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -9,13 +9,17 @@ import java.util.Map.Entry;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||||
|
import com.hbm.wiaj.WorldInAJar;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.client.renderer.entity.RenderManager;
|
import net.minecraft.client.renderer.entity.RenderManager;
|
||||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
@ -107,9 +111,9 @@ public class RenderOverhead {
|
|||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void renderThermalSight(float partialTicks) {
|
public static void renderThermalSight(float partialTicks) {
|
||||||
|
|
||||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
double x = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
double x = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
||||||
double y = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
double y = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
||||||
@ -123,20 +127,20 @@ public class RenderOverhead {
|
|||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
Tessellator tess = Tessellator.instance;
|
Tessellator tess = Tessellator.instance;
|
||||||
tess.startDrawing(GL11.GL_LINES);
|
tess.startDrawing(GL11.GL_LINES);
|
||||||
|
|
||||||
for(Object o : player.worldObj.loadedEntityList) {
|
for(Object o : player.worldObj.loadedEntityList) {
|
||||||
|
|
||||||
Entity ent = (Entity) o;
|
Entity ent = (Entity) o;
|
||||||
|
|
||||||
if(ent == player)
|
if(ent == player)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(ent.getDistanceSqToEntity(player) > 4096)
|
if(ent.getDistanceSqToEntity(player) > 4096)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(ent instanceof IBossDisplayData)
|
if(ent instanceof IBossDisplayData)
|
||||||
tess.setColorOpaque_F(1F, 0.5F, 0F);
|
tess.setColorOpaque_F(1F, 0.5F, 0F);
|
||||||
else if(ent instanceof IMob)
|
else if(ent instanceof IMob)
|
||||||
@ -154,7 +158,7 @@ public class RenderOverhead {
|
|||||||
tess.setColorOpaque_F(0.5F, 1F, 0.5F);
|
tess.setColorOpaque_F(0.5F, 1F, 0.5F);
|
||||||
} else
|
} else
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
AxisAlignedBB bb = ent.boundingBox;
|
AxisAlignedBB bb = ent.boundingBox;
|
||||||
tess.addVertex(bb.minX - x, bb.maxY - y, bb.minZ - z);
|
tess.addVertex(bb.minX - x, bb.maxY - y, bb.minZ - z);
|
||||||
tess.addVertex(bb.minX - x, bb.minY - y, bb.minZ - z);
|
tess.addVertex(bb.minX - x, bb.minY - y, bb.minZ - z);
|
||||||
@ -181,11 +185,11 @@ public class RenderOverhead {
|
|||||||
tess.addVertex(bb.minX - x, bb.minY - y, bb.minZ - z);
|
tess.addVertex(bb.minX - x, bb.minY - y, bb.minZ - z);
|
||||||
tess.addVertex(bb.minX - x, bb.minY - y, bb.maxZ - z);
|
tess.addVertex(bb.minX - x, bb.minY - y, bb.maxZ - z);
|
||||||
}
|
}
|
||||||
|
|
||||||
tess.draw();
|
tess.draw();
|
||||||
|
|
||||||
tess.setColorOpaque_F(1F, 1F, 1F);
|
tess.setColorOpaque_F(1F, 1F, 1F);
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
||||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||||
GL11.glDisable(GL11.GL_POINT_SMOOTH);
|
GL11.glDisable(GL11.GL_POINT_SMOOTH);
|
||||||
@ -196,15 +200,15 @@ public class RenderOverhead {
|
|||||||
|
|
||||||
public static final HashMap<BlockPos, Marker> queuedMarkers = new HashMap();
|
public static final HashMap<BlockPos, Marker> queuedMarkers = new HashMap();
|
||||||
private static final HashMap<BlockPos, Marker> markers = new HashMap();
|
private static final HashMap<BlockPos, Marker> markers = new HashMap();
|
||||||
|
|
||||||
public static void renderMarkers(float partialTicks) {
|
public static void renderMarkers(float partialTicks) {
|
||||||
|
|
||||||
markers.putAll(queuedMarkers);
|
markers.putAll(queuedMarkers);
|
||||||
queuedMarkers.clear();
|
queuedMarkers.clear();
|
||||||
|
|
||||||
if(markers.isEmpty())
|
if(markers.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
double x = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
double x = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
||||||
double y = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
double y = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
||||||
@ -218,10 +222,10 @@ public class RenderOverhead {
|
|||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA,GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
Tessellator tess = Tessellator.instance;
|
Tessellator tess = Tessellator.instance;
|
||||||
tess.startDrawing(GL11.GL_LINES);
|
tess.startDrawing(GL11.GL_LINES);
|
||||||
|
|
||||||
Iterator<Entry<BlockPos, Marker>> it = markers.entrySet().iterator();
|
Iterator<Entry<BlockPos, Marker>> it = markers.entrySet().iterator();
|
||||||
List<Entry<BlockPos, Marker>> tagList = new ArrayList();
|
List<Entry<BlockPos, Marker>> tagList = new ArrayList();
|
||||||
while(it.hasNext()) {
|
while(it.hasNext()) {
|
||||||
@ -232,14 +236,14 @@ public class RenderOverhead {
|
|||||||
int pX = pos.getX();
|
int pX = pos.getX();
|
||||||
int pY = pos.getY();
|
int pY = pos.getY();
|
||||||
int pZ = pos.getZ();
|
int pZ = pos.getZ();
|
||||||
|
|
||||||
double minX = marker.minX;
|
double minX = marker.minX;
|
||||||
double minY = marker.minY;
|
double minY = marker.minY;
|
||||||
double minZ = marker.minZ;
|
double minZ = marker.minZ;
|
||||||
double maxX = marker.maxX;
|
double maxX = marker.maxX;
|
||||||
double maxY = marker.maxY;
|
double maxY = marker.maxY;
|
||||||
double maxZ = marker.maxZ;
|
double maxZ = marker.maxZ;
|
||||||
|
|
||||||
tess.setColorOpaque_I(marker.color);
|
tess.setColorOpaque_I(marker.color);
|
||||||
tess.addVertex(pX + minX - x, pY + maxY - y, pZ + minZ - z);
|
tess.addVertex(pX + minX - x, pY + maxY - y, pZ + minZ - z);
|
||||||
tess.addVertex(pX + minX - x, pY + minY - y, pZ + minZ - z);
|
tess.addVertex(pX + minX - x, pY + minY - y, pZ + minZ - z);
|
||||||
@ -265,9 +269,9 @@ public class RenderOverhead {
|
|||||||
tess.addVertex(pX + maxX - x, pY + minY - y, pZ + maxZ - z);
|
tess.addVertex(pX + maxX - x, pY + minY - y, pZ + maxZ - z);
|
||||||
tess.addVertex(pX + minX - x, pY + minY - y, pZ + minZ - z);
|
tess.addVertex(pX + minX - x, pY + minY - y, pZ + minZ - z);
|
||||||
tess.addVertex(pX + minX - x, pY + minY - y, pZ + maxZ - z);
|
tess.addVertex(pX + minX - x, pY + minY - y, pZ + maxZ - z);
|
||||||
|
|
||||||
tagList.add(entry);
|
tagList.add(entry);
|
||||||
|
|
||||||
if(marker.expire > 0 && System.currentTimeMillis() > marker.expire) {
|
if(marker.expire > 0 && System.currentTimeMillis() > marker.expire) {
|
||||||
it.remove();
|
it.remove();
|
||||||
} else if(marker.maxDist > 0) {
|
} else if(marker.maxDist > 0) {
|
||||||
@ -280,17 +284,17 @@ public class RenderOverhead {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tess.draw();
|
tess.draw();
|
||||||
|
|
||||||
tess.setColorOpaque_F(1F, 1F, 1F);
|
tess.setColorOpaque_F(1F, 1F, 1F);
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
||||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||||
GL11.glDisable(GL11.GL_POINT_SMOOTH);
|
GL11.glDisable(GL11.GL_POINT_SMOOTH);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
|
||||||
for(Entry<BlockPos, Marker> entry : tagList) {
|
for(Entry<BlockPos, Marker> entry : tagList) {
|
||||||
|
|
||||||
BlockPos pos = entry.getKey();
|
BlockPos pos = entry.getKey();
|
||||||
@ -299,14 +303,14 @@ public class RenderOverhead {
|
|||||||
int pX = pos.getX();
|
int pX = pos.getX();
|
||||||
int pY = pos.getY();
|
int pY = pos.getY();
|
||||||
int pZ = pos.getZ();
|
int pZ = pos.getZ();
|
||||||
|
|
||||||
double minX = marker.minX;
|
double minX = marker.minX;
|
||||||
double minY = marker.minY;
|
double minY = marker.minY;
|
||||||
double minZ = marker.minZ;
|
double minZ = marker.minZ;
|
||||||
double maxX = marker.maxX;
|
double maxX = marker.maxX;
|
||||||
double maxY = marker.maxY;
|
double maxY = marker.maxY;
|
||||||
double maxZ = marker.maxZ;
|
double maxZ = marker.maxZ;
|
||||||
|
|
||||||
double aX = pX + (maxX - minX) / 2D;
|
double aX = pX + (maxX - minX) / 2D;
|
||||||
double aY = pY + (maxY - minY) / 2D;
|
double aY = pY + (maxY - minY) / 2D;
|
||||||
double aZ = pZ + (maxZ - minZ) / 2D;
|
double aZ = pZ + (maxZ - minZ) / 2D;
|
||||||
@ -323,16 +327,16 @@ public class RenderOverhead {
|
|||||||
if(label == null) {
|
if(label == null) {
|
||||||
label = "";
|
label = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Math.abs(look.xCoord - diff.xCoord) + Math.abs(look.yCoord - diff.yCoord) + Math.abs(look.zCoord - diff.zCoord) < 0.15) {
|
if(Math.abs(look.xCoord - diff.xCoord) + Math.abs(look.yCoord - diff.yCoord) + Math.abs(look.zCoord - diff.zCoord) < 0.15) {
|
||||||
label += (!label.isEmpty() ? " " : "") + ((int) sqrt) + "m";
|
label += (!label.isEmpty() ? " " : "") + ((int) sqrt) + "m";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!label.isEmpty()) drawTag(1F, len, label, vec.xCoord, vec.yCoord, vec.zCoord, 100, true, marker.color, marker.color);
|
if(!label.isEmpty()) drawTag(1F, len, label, vec.xCoord, vec.yCoord, vec.zCoord, 100, true, marker.color, marker.color);
|
||||||
}
|
}
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Marker {
|
public static class Marker {
|
||||||
double minX = 0;
|
double minX = 0;
|
||||||
double minY = 0;
|
double minY = 0;
|
||||||
@ -340,30 +344,103 @@ public class RenderOverhead {
|
|||||||
double maxX = 1;
|
double maxX = 1;
|
||||||
double maxY = 1;
|
double maxY = 1;
|
||||||
double maxZ = 1;
|
double maxZ = 1;
|
||||||
|
|
||||||
int color;
|
int color;
|
||||||
String label;
|
String label;
|
||||||
|
|
||||||
long expire;
|
long expire;
|
||||||
double maxDist;
|
double maxDist;
|
||||||
|
|
||||||
public Marker(int color) {
|
public Marker(int color) {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Marker setExpire(long expire) {
|
public Marker setExpire(long expire) {
|
||||||
this.expire = expire;
|
this.expire = expire;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Marker setDist(double maxDist) {
|
public Marker setDist(double maxDist) {
|
||||||
this.maxDist = maxDist;
|
this.maxDist = maxDist;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Marker withLabel(String label) {
|
public Marker withLabel(String label) {
|
||||||
this.label = label;
|
this.label = label;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static WorldInAJar actionPreviewWorld;
|
||||||
|
private static int offsetX;
|
||||||
|
private static int offsetY;
|
||||||
|
private static int offsetZ;
|
||||||
|
private static boolean actionPreviewSuccess;
|
||||||
|
|
||||||
|
private static boolean clearPreview;
|
||||||
|
|
||||||
|
public static void setActionPreview(WorldInAJar wiaj, int x, int y, int z, boolean canAction) {
|
||||||
|
actionPreviewWorld = wiaj;
|
||||||
|
offsetX = x;
|
||||||
|
offsetY = y;
|
||||||
|
offsetZ = z;
|
||||||
|
actionPreviewSuccess = canAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prevents thread unsafe null exception
|
||||||
|
public static void clearActionPreview() {
|
||||||
|
clearPreview = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void renderActionPreview(float partialTicks) {
|
||||||
|
if(clearPreview) {
|
||||||
|
actionPreviewWorld = null;
|
||||||
|
clearPreview = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(actionPreviewWorld == null) return;
|
||||||
|
|
||||||
|
RenderBlocks renderer = new RenderBlocks(actionPreviewWorld);
|
||||||
|
|
||||||
|
renderer.enableAO = true;
|
||||||
|
actionPreviewWorld.lightlevel = 15;
|
||||||
|
|
||||||
|
RenderHelper.disableStandardItemLighting();
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
{
|
||||||
|
|
||||||
|
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||||
|
double x = player.prevPosX + (player.posX - player.prevPosX) * partialTicks;
|
||||||
|
double y = player.prevPosY + (player.posY - player.prevPosY) * partialTicks;
|
||||||
|
double z = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTicks;
|
||||||
|
|
||||||
|
GL11.glTranslated(offsetX - x, offsetY - y, offsetZ - z);
|
||||||
|
|
||||||
|
Minecraft.getMinecraft().getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
Tessellator.instance.startDrawingQuads();
|
||||||
|
|
||||||
|
Tessellator.instance.disableColor();
|
||||||
|
if(actionPreviewSuccess) {
|
||||||
|
GL11.glColor3f(0, 1, 1);
|
||||||
|
} else {
|
||||||
|
GL11.glColor3f(1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int ix = 0; ix < actionPreviewWorld.sizeX; ix++) {
|
||||||
|
for(int iy = 0; iy < actionPreviewWorld.sizeY; iy++) {
|
||||||
|
for(int iz = 0; iz < actionPreviewWorld.sizeZ; iz++) {
|
||||||
|
try { renderer.renderBlockByRenderType(actionPreviewWorld.getBlock(ix, iy, iz), ix, iy, iz); } catch(Exception ex) { }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Tessellator.instance.draw();
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
|
||||||
|
}
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1897,6 +1897,10 @@ item.combine_scrap.name=CMB Schrott
|
|||||||
item.component_emitter.name=Emitterkomponente
|
item.component_emitter.name=Emitterkomponente
|
||||||
item.component_limiter.name=Stabilisatorkomponente
|
item.component_limiter.name=Stabilisatorkomponente
|
||||||
item.containment_box.name=Sicherheitsbehälter
|
item.containment_box.name=Sicherheitsbehälter
|
||||||
|
item.conveyor_wand.regular.name=Förderband
|
||||||
|
item.conveyor_wand.express.name=Expressförderband
|
||||||
|
item.conveyor_wand.double.name=Zweispuriges Förderband
|
||||||
|
item.conveyor_wand.triple.name=Dreispuriges Förderband
|
||||||
item.cordite.name=Kordit
|
item.cordite.name=Kordit
|
||||||
item.cotton_candy.name=Radioaktive Zuckerwatte
|
item.cotton_candy.name=Radioaktive Zuckerwatte
|
||||||
item.crackpipe.name=Gesundheitspfeife
|
item.crackpipe.name=Gesundheitspfeife
|
||||||
@ -4119,7 +4123,7 @@ tile.concrete_colored.orange.name=Oranger Beton
|
|||||||
tile.concrete_colored.pink.name=Rosa Beton
|
tile.concrete_colored.pink.name=Rosa Beton
|
||||||
tile.concrete_colored.purple.name=Lila Beton
|
tile.concrete_colored.purple.name=Lila Beton
|
||||||
tile.concrete_colored.red.name=Roter Beton
|
tile.concrete_colored.red.name=Roter Beton
|
||||||
tile.concrete_colored.silver.name=Hellgrauer Beton
|
tile.concrete_colored.silver.name=Hellgrauer Beton
|
||||||
tile.concrete_colored.white.name=Weißer Beton
|
tile.concrete_colored.white.name=Weißer Beton
|
||||||
tile.concrete_colored.yellow.name=Gelber Beton
|
tile.concrete_colored.yellow.name=Gelber Beton
|
||||||
tile.concrete_colored_ext.bronze.name=Builder's Choice Concrete - Bronzeplatten
|
tile.concrete_colored_ext.bronze.name=Builder's Choice Concrete - Bronzeplatten
|
||||||
|
|||||||
@ -2672,6 +2672,12 @@ item.combine_scrap.name=CMB Scrap Metal
|
|||||||
item.component_emitter.name=Emitter Component
|
item.component_emitter.name=Emitter Component
|
||||||
item.component_limiter.name=Stabilizer Component
|
item.component_limiter.name=Stabilizer Component
|
||||||
item.containment_box.name=Containment Box
|
item.containment_box.name=Containment Box
|
||||||
|
item.conveyor_wand.regular.name=Conveyor Belt
|
||||||
|
item.conveyor_wand.express.name=Express Conveyor Belt
|
||||||
|
item.conveyor_wand.double.name=Double-Lane Conveyor Belt
|
||||||
|
item.conveyor_wand.triple.name=Triple-Lane Conveyor Belt
|
||||||
|
item.conveyor_wand.desc=Moves items dropped on it$Click two points to create a conveyor$Crouch click to manually place$Click with a screwdriver to rotate$Crouch click with a screwdriver to change types
|
||||||
|
item.conveyor_wand.vertical.desc=Is capable of placing lifts & chutes to move items vertically
|
||||||
item.cordite.name=Cordite
|
item.cordite.name=Cordite
|
||||||
item.cotton_candy.name=Radioactive Cotton Candy
|
item.cotton_candy.name=Radioactive Cotton Candy
|
||||||
item.crackpipe.name=Health Pipe
|
item.crackpipe.name=Health Pipe
|
||||||
|
|||||||
@ -118,7 +118,7 @@ achievement.sulfuric.desc=
|
|||||||
achievement.sulfuric=я не должен был окунать свои яйца в серную кислоту.
|
achievement.sulfuric=я не должен был окунать свои яйца в серную кислоту.
|
||||||
achievement.tantalum.desc=Неуловимый, но всегда необходимый элемент.
|
achievement.tantalum.desc=Неуловимый, но всегда необходимый элемент.
|
||||||
achievement.tantalum="Тантал"
|
achievement.tantalum="Тантал"
|
||||||
achievement.tasteofblood.desc=Это не было частью протокола тестирования.
|
achievement.tasteofblood.desc=Это не было частью протокола тестирования.
|
||||||
achievement.tasteofblood=Вкус крови
|
achievement.tasteofblood=Вкус крови
|
||||||
achievement.technetium.desc=Это целебно, это целебно!
|
achievement.technetium.desc=Это целебно, это целебно!
|
||||||
achievement.technetium=Большой Человек, Человек-Свинья
|
achievement.technetium=Большой Человек, Человек-Свинья
|
||||||
@ -833,7 +833,7 @@ container.reactorBreeding=Реактор-размножитель
|
|||||||
container.reactorControl=Блок удалённого доступа к реактору
|
container.reactorControl=Блок удалённого доступа к реактору
|
||||||
container.reactorLarge=Большой ядерный реактор
|
container.reactorLarge=Большой ядерный реактор
|
||||||
container.reactorResearch=Исследовательский реактор
|
container.reactorResearch=Исследовательский реактор
|
||||||
container.reix=Мэйнфрейм Rei-X
|
container.reix=Мэйнфрейм Rei-X
|
||||||
container.rtg=РИТЭГ-генератор
|
container.rtg=РИТЭГ-генератор
|
||||||
container.rtgFurnace=РИТЭГ-печь
|
container.rtgFurnace=РИТЭГ-печь
|
||||||
container.rttyCounter=Редстоун-радио счётчик предметов
|
container.rttyCounter=Редстоун-радио счётчик предметов
|
||||||
@ -862,7 +862,7 @@ container.turretMaxwell=Максвелл
|
|||||||
container.turretRichard=Ричард
|
container.turretRichard=Ричард
|
||||||
container.turretSentry=Браун
|
container.turretSentry=Браун
|
||||||
container.turretTauon=Тауон
|
container.turretTauon=Тауон
|
||||||
container.uf6_tank=Бочка UF6
|
container.uf6_tank=Бочка UF6
|
||||||
container.vacuumDistill=Вакуумный нефтеперерабатывающий завод
|
container.vacuumDistill=Вакуумный нефтеперерабатывающий завод
|
||||||
container.wasteDrum=Бочка с отработанным топливом
|
container.wasteDrum=Бочка с отработанным топливом
|
||||||
container.watzPowerplant=Реактор Ватцза
|
container.watzPowerplant=Реактор Ватцза
|
||||||
@ -1265,7 +1265,7 @@ gun.make.WGW=Wilhelm-Gustloff-Werke
|
|||||||
gun.make.WINCHESTER=Winchester Repeating Arms Company
|
gun.make.WINCHESTER=Winchester Repeating Arms Company
|
||||||
gun.make.WINCHESTER_BIGMT=Winchester Repeating Arms Company / Большая Гора
|
gun.make.WINCHESTER_BIGMT=Winchester Repeating Arms Company / Большая Гора
|
||||||
|
|
||||||
gun.name.ar15_50=Модификация AR-15 под .50 BMG
|
gun.name.ar15_50=Модификация AR-15 под .50 BMG
|
||||||
gun.name.baeAR=Стандартная винтовка британнской армии
|
gun.name.baeAR=Стандартная винтовка британнской армии
|
||||||
gun.name.bel=Катапульта для жар-яиц
|
gun.name.bel=Катапульта для жар-яиц
|
||||||
gun.name.benelli=Benelli M4 Super 90
|
gun.name.benelli=Benelli M4 Super 90
|
||||||
@ -1327,7 +1327,7 @@ gun.name.spiw=H&R SPIW
|
|||||||
gun.name.stinger=FIM-92 Stinger man-portable air-defense system
|
gun.name.stinger=FIM-92 Stinger man-portable air-defense system
|
||||||
gun.name.stingerOneSky=The One Sky Stinger
|
gun.name.stingerOneSky=The One Sky Stinger
|
||||||
gun.name.supershotty=Двуствольный дробовик
|
gun.name.supershotty=Двуствольный дробовик
|
||||||
gun.name.tau=Тау-пушка XVL1456
|
gun.name.tau=Тау-пушка XVL1456
|
||||||
gun.name.tommy9=Модификация пистолета-пулемёта M1A1 под 9мм
|
gun.name.tommy9=Модификация пистолета-пулемёта M1A1 под 9мм
|
||||||
gun.name.tommy=Пистолет-пулемёт M1A1
|
gun.name.tommy=Пистолет-пулемёт M1A1
|
||||||
gun.name.topaz=Тяжёлый огнемёт
|
gun.name.topaz=Тяжёлый огнемёт
|
||||||
@ -1489,7 +1489,7 @@ hbmfluid.naphtha=Нафта
|
|||||||
hbmfluid.naphtha_coker=Коксовая нафта
|
hbmfluid.naphtha_coker=Коксовая нафта
|
||||||
hbmfluid.naphtha_crack=Крекированная нафта
|
hbmfluid.naphtha_crack=Крекированная нафта
|
||||||
hbmfluid.naphtha_ds=Десульфуризованная нафта
|
hbmfluid.naphtha_ds=Десульфуризованная нафта
|
||||||
hbmfluid.nitan=100-октановое сверхтопливо NITAN©
|
hbmfluid.nitan=100-октановое сверхтопливо NITAN©
|
||||||
hbmfluid.nitric_acid=Азотная кислота
|
hbmfluid.nitric_acid=Азотная кислота
|
||||||
hbmfluid.nitroglycerin=Нитроглицерин
|
hbmfluid.nitroglycerin=Нитроглицерин
|
||||||
hbmfluid.none=Ничего
|
hbmfluid.none=Ничего
|
||||||
@ -2137,14 +2137,14 @@ item.battery_schrabidium_cell.name=Шрабидиевая энергоячейк
|
|||||||
item.battery_schrabidium_cell_2.name=Сдвоенная шрабидиевая энергоячейка
|
item.battery_schrabidium_cell_2.name=Сдвоенная шрабидиевая энергоячейка
|
||||||
item.battery_schrabidium_cell_4.name=Счетверённая шрабидиевая энергоячейка
|
item.battery_schrabidium_cell_4.name=Счетверённая шрабидиевая энергоячейка
|
||||||
item.battery_spark.name=Спарк-батарея
|
item.battery_spark.name=Спарк-батарея
|
||||||
item.battery_spark_cell_100.name=Спарк-Магический массив хранения энергии
|
item.battery_spark_cell_100.name=Спарк-Магический массив хранения энергии
|
||||||
item.battery_spark_cell_1000.name=Спарк-Магическая масс-энергетическая пустота
|
item.battery_spark_cell_1000.name=Спарк-Магическая масс-энергетическая пустота
|
||||||
item.battery_spark_cell_10000.name=Устойчивый пространственно-временной спарк-кристалл
|
item.battery_spark_cell_10000.name=Устойчивый пространственно-временной спарк-кристалл
|
||||||
item.battery_spark_cell_25.name=Спарк-Магический аккумулятор
|
item.battery_spark_cell_25.name=Спарк-Магический аккумулятор
|
||||||
item.battery_spark_cell_2500.name=Спарк-Магическое море Дирака
|
item.battery_spark_cell_2500.name=Спарк-Магическое море Дирака
|
||||||
item.battery_spark_cell_6.name=Спарк-энергоячейка
|
item.battery_spark_cell_6.name=Спарк-энергоячейка
|
||||||
item.battery_spark_cell_power.name=Абсурдный физический спарк-блок накопления энергии
|
item.battery_spark_cell_power.name=Абсурдный физический спарк-блок накопления энергии
|
||||||
item.battery_steam.name=Паровой бак для хранения энергии
|
item.battery_steam.name=Паровой бак для хранения энергии
|
||||||
item.battery_steam_large.name=Большой паровой бак для хранения энергии
|
item.battery_steam_large.name=Большой паровой бак для хранения энергии
|
||||||
item.battery_su.name=Одноразовая батарейка
|
item.battery_su.name=Одноразовая батарейка
|
||||||
item.battery_su_l.name=Большая одноразовая батарейка
|
item.battery_su_l.name=Большая одноразовая батарейка
|
||||||
@ -2333,9 +2333,9 @@ item.can_luna.name=Черная Меза Луна - Темная Кола
|
|||||||
item.can_mrsugar.name=Безалкогольный напиток 'Доктор Сахар'
|
item.can_mrsugar.name=Безалкогольный напиток 'Доктор Сахар'
|
||||||
item.can_mug.name=MUG Root Beer
|
item.can_mug.name=MUG Root Beer
|
||||||
item.can_overcharge.name=Перезарядка Delirium XT
|
item.can_overcharge.name=Перезарядка Delirium XT
|
||||||
item.can_redbomb.name=Энергетический напиток "Красная Бомба"
|
item.can_redbomb.name=Энергетический напиток "Красная Бомба"
|
||||||
item.can_smart.name=Энергетический напиток “Смарт”
|
item.can_smart.name=Энергетический напиток “Смарт”
|
||||||
item.canister_NITAN.name=100-октановое сверхтопливо NITAN© (LEGACY)
|
item.canister_NITAN.name=100-октановое сверхтопливо NITAN© (LEGACY)
|
||||||
item.canister_biofuel.name=Канистра с биотопливом (LEGACY)
|
item.canister_biofuel.name=Канистра с биотопливом (LEGACY)
|
||||||
item.canister_bitumen.name=Канистра с битумом (LEGACY)
|
item.canister_bitumen.name=Канистра с битумом (LEGACY)
|
||||||
item.canister_canola.name=Машинная смазка (LEGACY)
|
item.canister_canola.name=Машинная смазка (LEGACY)
|
||||||
@ -2598,7 +2598,7 @@ item.clip_mirv.name=Три-в-одном пакет мини-МИРВов
|
|||||||
item.clip_mp.name=Британский военный стандарт магазина штурмовой винтовки
|
item.clip_mp.name=Британский военный стандарт магазина штурмовой винтовки
|
||||||
item.clip_mp40.name=Обойма полуавтомата 9мм
|
item.clip_mp40.name=Обойма полуавтомата 9мм
|
||||||
item.clip_osipr.name=Обойма AR2
|
item.clip_osipr.name=Обойма AR2
|
||||||
item.clip_revolver.name=Коробочка патронов калибра .357
|
item.clip_revolver.name=Коробочка патронов калибра .357
|
||||||
item.clip_revolver_cursed.name=Британский военный стандарт пистолетной обоймы
|
item.clip_revolver_cursed.name=Британский военный стандарт пистолетной обоймы
|
||||||
item.clip_revolver_gold.name=Маленький сундучок с золотыми пулями
|
item.clip_revolver_gold.name=Маленький сундучок с золотыми пулями
|
||||||
item.clip_revolver_iron.name=Коробка с железными патронами
|
item.clip_revolver_iron.name=Коробка с железными патронами
|
||||||
@ -2611,7 +2611,7 @@ item.clip_revolver_schrabidium.name=Контейнер для шрабидиев
|
|||||||
item.clip_rpg.name=Контейнер с ракетами
|
item.clip_rpg.name=Контейнер с ракетами
|
||||||
item.clip_spark.name=Большой Электромагнитный Картридж
|
item.clip_spark.name=Большой Электромагнитный Картридж
|
||||||
item.clip_stinger.name=Упаковка ракет "Стингер"
|
item.clip_stinger.name=Упаковка ракет "Стингер"
|
||||||
item.clip_uboinik.name=Коробка патронов картечи 12x70
|
item.clip_uboinik.name=Коробка патронов картечи 12x70
|
||||||
item.clip_uzi.name=Обойма .22 LR Патронов
|
item.clip_uzi.name=Обойма .22 LR Патронов
|
||||||
item.clip_xvl1456.name=Большая Коробка с изотопами
|
item.clip_xvl1456.name=Большая Коробка с изотопами
|
||||||
item.cmb_axe.name=Топор из стали Альянса
|
item.cmb_axe.name=Топор из стали Альянса
|
||||||
@ -2662,6 +2662,10 @@ item.combine_scrap.name=Металлолом Альянса
|
|||||||
item.component_emitter.name=Компонент излучателя
|
item.component_emitter.name=Компонент излучателя
|
||||||
item.component_limiter.name=Компонент стабилизатора
|
item.component_limiter.name=Компонент стабилизатора
|
||||||
item.containment_box.name=Защитная коробка
|
item.containment_box.name=Защитная коробка
|
||||||
|
item.conveyor_wand.regular.name=Конвейер
|
||||||
|
item.conveyor_wand.express.name=Быстрый конвейер
|
||||||
|
item.conveyor_wand.double.name=Двухполосный конвейер
|
||||||
|
item.conveyor_wand.triple.name=Трёхполосный конвейер
|
||||||
item.cordite.name=Кордит
|
item.cordite.name=Кордит
|
||||||
item.cotton_candy.name=Радиоактивная сахарная вата
|
item.cotton_candy.name=Радиоактивная сахарная вата
|
||||||
item.crackpipe.name=Оздоровительная трубка
|
item.crackpipe.name=Оздоровительная трубка
|
||||||
@ -2693,7 +2697,7 @@ item.crystal_coal.name=Кристаллизованный уголь
|
|||||||
item.crystal_cobalt.name=Кристализованный кобальт
|
item.crystal_cobalt.name=Кристализованный кобальт
|
||||||
item.crystal_copper.name=Кристаллизованная медь
|
item.crystal_copper.name=Кристаллизованная медь
|
||||||
item.crystal_cinnebar.name=Кристаллизованная киноварь
|
item.crystal_cinnebar.name=Кристаллизованная киноварь
|
||||||
item.crystal_diamond.name=Кристализованный алмаз
|
item.crystal_diamond.name=Кристализованный алмаз
|
||||||
item.crystal_energy.name=Энергетический кристалл
|
item.crystal_energy.name=Энергетический кристалл
|
||||||
item.crystal_fluorite.name=Кристаллизованный флюорит
|
item.crystal_fluorite.name=Кристаллизованный флюорит
|
||||||
item.crystal_gold.name=Кристаллизованное золото
|
item.crystal_gold.name=Кристаллизованное золото
|
||||||
@ -2874,7 +2878,7 @@ item.flame_politics.desc=Дональд Дак построит стену!
|
|||||||
item.flame_pony.name=Картинка цветной лошади
|
item.flame_pony.name=Картинка цветной лошади
|
||||||
item.flame_pony.desc=Желтая лошадь побеждает синюю лошадь, это доказанный факт!
|
item.flame_pony.desc=Желтая лошадь побеждает синюю лошадь, это доказанный факт!
|
||||||
item.flask_infusion.shield.name=Эликсир защиты
|
item.flask_infusion.shield.name=Эликсир защиты
|
||||||
item.fleija_core.name=Заряд Ф.Л.Е.И из урана 235
|
item.fleija_core.name=Заряд Ф.Л.Е.И из урана 235
|
||||||
item.fleija_igniter.name=Импульсный воспламенитель
|
item.fleija_igniter.name=Импульсный воспламенитель
|
||||||
item.fleija_kit.name=Комплект Ф.Л.Е.Я
|
item.fleija_kit.name=Комплект Ф.Л.Е.Я
|
||||||
item.fleija_propellant.name=Шрабидиевая взрывчатка
|
item.fleija_propellant.name=Шрабидиевая взрывчатка
|
||||||
@ -2921,7 +2925,7 @@ item.fuse.name=Предохранитель
|
|||||||
item.fusion_core.name=Ядерный блок
|
item.fusion_core.name=Ядерный блок
|
||||||
item.fusion_core_infinite.name=Бесконечный ядерный блок
|
item.fusion_core_infinite.name=Бесконечный ядерный блок
|
||||||
item.fusion_shield_chlorophyte.name=Хлорофитовый защитный слой термоядерного реактора
|
item.fusion_shield_chlorophyte.name=Хлорофитовый защитный слой термоядерного реактора
|
||||||
item.fusion_shield_desh.name=Деш-Защитный слой термоядерного реактора
|
item.fusion_shield_desh.name=Деш-Защитный слой термоядерного реактора
|
||||||
item.fusion_shield_tungsten.name=Вольфрамовый защитный слой термоядерного реактора
|
item.fusion_shield_tungsten.name=Вольфрамовый защитный слой термоядерного реактора
|
||||||
item.fusion_shield_vaporwave.name=Вапорвейвный защитный слой термоядерного реактора
|
item.fusion_shield_vaporwave.name=Вапорвейвный защитный слой термоядерного реактора
|
||||||
item.gadget_core.name=Плутониевое ядро
|
item.gadget_core.name=Плутониевое ядро
|
||||||
@ -3304,7 +3308,7 @@ item.ingot_pvc.name=ПВХ
|
|||||||
item.ingot_ra226.name=Слиток радия-226
|
item.ingot_ra226.name=Слиток радия-226
|
||||||
item.ingot_raw.name=%s Ingot
|
item.ingot_raw.name=%s Ingot
|
||||||
item.ingot_red_copper.name=Слиток красной меди
|
item.ingot_red_copper.name=Слиток красной меди
|
||||||
item.ingot_reiium.name=Реиевый слиток
|
item.ingot_reiium.name=Реиевый слиток
|
||||||
item.ingot_rubber.name=Резина
|
item.ingot_rubber.name=Резина
|
||||||
item.ingot_saturnite.name=Сатурнитовый слиток
|
item.ingot_saturnite.name=Сатурнитовый слиток
|
||||||
item.ingot_schrabidate.name=Слиток шрабидата железа
|
item.ingot_schrabidate.name=Слиток шрабидата железа
|
||||||
@ -4108,7 +4112,7 @@ item.powder_verticium.name=Вертициевый порошок
|
|||||||
item.powder_weidanium.name=Вейдановый порошок
|
item.powder_weidanium.name=Вейдановый порошок
|
||||||
item.powder_xe135.name=Порошок ксенона-135
|
item.powder_xe135.name=Порошок ксенона-135
|
||||||
item.powder_xe135_tiny.name=Кучка порошка ксенона-135
|
item.powder_xe135_tiny.name=Кучка порошка ксенона-135
|
||||||
item.powder_yellowcake.name=Йеллоукейк
|
item.powder_yellowcake.name=Йеллоукейк
|
||||||
item.powder_zirconium.name=Циркониевый порошок
|
item.powder_zirconium.name=Циркониевый порошок
|
||||||
item.power_net_tool.name=Анализатор энергосети
|
item.power_net_tool.name=Анализатор энергосети
|
||||||
item.pipette.name=Пипетка
|
item.pipette.name=Пипетка
|
||||||
@ -4206,7 +4210,7 @@ item.rbmk_fuel_pu238be.name=Плутоний-238-Бериллевый источ
|
|||||||
item.rbmk_fuel_ra226be.name=Радий-226-Бериллевый источник нейтронов РБМК
|
item.rbmk_fuel_ra226be.name=Радий-226-Бериллевый источник нейтронов РБМК
|
||||||
item.rbmk_fuel_thmeu.name=Ториево-урановый среднеобогащённый топливный стержень РБМК
|
item.rbmk_fuel_thmeu.name=Ториево-урановый среднеобогащённый топливный стержень РБМК
|
||||||
item.rbmk_fuel_ueu.name=Необогащенный урановый топливный стержень РБМК
|
item.rbmk_fuel_ueu.name=Необогащенный урановый топливный стержень РБМК
|
||||||
item.rbmk_fuel_zfb_am_mix.name=Америций реакторного качества ЦТС стержень РБМК
|
item.rbmk_fuel_zfb_am_mix.name=Америций реакторного качества ЦТС стержень РБМК
|
||||||
item.rbmk_fuel_zfb_bismuth.name=Висмутовый ЦТС стержень РБМК
|
item.rbmk_fuel_zfb_bismuth.name=Висмутовый ЦТС стержень РБМК
|
||||||
item.rbmk_fuel_zfb_pu241.name=Плутоний-241 ЦТС стержень РБМК
|
item.rbmk_fuel_zfb_pu241.name=Плутоний-241 ЦТС стержень РБМК
|
||||||
item.rbmk_lid.name=Покрывающая панель РБМК
|
item.rbmk_lid.name=Покрывающая панель РБМК
|
||||||
@ -4359,7 +4363,7 @@ item.rod_euphemium.name=Euphemium Rod
|
|||||||
item.rod_lead.name=Lead Rod
|
item.rod_lead.name=Lead Rod
|
||||||
item.rod_lithium.name=Lithium Rod
|
item.rod_lithium.name=Lithium Rod
|
||||||
item.rod_mox_fuel.name=МОКС-топливный стержень
|
item.rod_mox_fuel.name=МОКС-топливный стержень
|
||||||
item.rod_mox_fuel_depleted.name=Обеднённый МОКС-топливный стержень
|
item.rod_mox_fuel_depleted.name=Обеднённый МОКС-топливный стержень
|
||||||
item.rod_neptunium.name=Neptunium Rod
|
item.rod_neptunium.name=Neptunium Rod
|
||||||
item.rod_of_discord.name=Жезл раздора
|
item.rod_of_discord.name=Жезл раздора
|
||||||
item.rod_plutonium.name=Plutonium Rod
|
item.rod_plutonium.name=Plutonium Rod
|
||||||
@ -4662,7 +4666,7 @@ item.thermo_unit_endo.name=Устройство для распределени
|
|||||||
item.thermo_unit_exo.name=Устройство для распределения тепла
|
item.thermo_unit_exo.name=Устройство для распределения тепла
|
||||||
item.thruster_large.name=Большой двигатель
|
item.thruster_large.name=Большой двигатель
|
||||||
item.thruster_medium.name=Средний двигатель
|
item.thruster_medium.name=Средний двигатель
|
||||||
item.thruster_nuclear.name=Ядерный ракетный двигатель LV-N
|
item.thruster_nuclear.name=Ядерный ракетный двигатель LV-N
|
||||||
item.thruster_small.name=Малый двигатель
|
item.thruster_small.name=Малый двигатель
|
||||||
item.titanium_axe.name=Титановый топор
|
item.titanium_axe.name=Титановый топор
|
||||||
item.titanium_boots.name=Титановые ботинки
|
item.titanium_boots.name=Титановые ботинки
|
||||||
@ -4699,7 +4703,7 @@ item.turret_rocket_ammo.name=Боекомплект ракетной турел
|
|||||||
item.turret_spitfire_ammo.name=AA-Снаряд
|
item.turret_spitfire_ammo.name=AA-Снаряд
|
||||||
item.turret_tau_ammo.name=Урановые боеприпасы Тау-турели
|
item.turret_tau_ammo.name=Урановые боеприпасы Тау-турели
|
||||||
item.twinkie.name=Твинки
|
item.twinkie.name=Твинки
|
||||||
item.ullapool_caber.name=Аллапульское бревно
|
item.ullapool_caber.name=Аллапульское бревно
|
||||||
item.undefined.name=Undefined
|
item.undefined.name=Undefined
|
||||||
item.upgrade_5g.name=Улучшение "5G излучение"
|
item.upgrade_5g.name=Улучшение "5G излучение"
|
||||||
item.upgrade_afterburn_1.name=Улучшение механизма "Форсаж" уровня I
|
item.upgrade_afterburn_1.name=Улучшение механизма "Форсаж" уровня I
|
||||||
@ -4762,7 +4766,7 @@ item.warhead_thermo_endo.name=Эндотермическая боеголовк
|
|||||||
item.warhead_thermo_exo.name=Экзотермическая боеголовка
|
item.warhead_thermo_exo.name=Экзотермическая боеголовка
|
||||||
item.warhead_volcano.name=Тектоническая боеголовка
|
item.warhead_volcano.name=Тектоническая боеголовка
|
||||||
item.waste_mox.name=Обедненное МОКС-топливо
|
item.waste_mox.name=Обедненное МОКС-топливо
|
||||||
item.waste_natural_uranium.name=Обедненное природное урановое топливо
|
item.waste_natural_uranium.name=Обедненное природное урановое топливо
|
||||||
item.waste_plate_mox.name=Обеднённая МОКС-топливная пластина
|
item.waste_plate_mox.name=Обеднённая МОКС-топливная пластина
|
||||||
item.waste_plate_pu238be.name=Обеднённая плутоний-238-бериллевая топливная пластина
|
item.waste_plate_pu238be.name=Обеднённая плутоний-238-бериллевая топливная пластина
|
||||||
item.waste_plate_pu239.name=Обеднённая высокообогащенная плутониевая-239 топливная пластина
|
item.waste_plate_pu239.name=Обеднённая высокообогащенная плутониевая-239 топливная пластина
|
||||||
@ -4803,7 +4807,7 @@ item.watz_pellet_depleted.nqd.name=Ватцз-пеллета из обогаще
|
|||||||
item.watz_pellet_depleted.nqr.name=Ватцз-пеллета из наквадрии (Обедненная)
|
item.watz_pellet_depleted.nqr.name=Ватцз-пеллета из наквадрии (Обедненная)
|
||||||
item.watz_pellet_depleted.hen.name=Ватцз-пеллета из высокообогащенного нептуния (Обедненная)
|
item.watz_pellet_depleted.hen.name=Ватцз-пеллета из высокообогащенного нептуния (Обедненная)
|
||||||
item.watz_pellet_depleted.schrabidium.name=Ватцз-пеллета из чистого шрабидия (Обедненная)
|
item.watz_pellet_depleted.schrabidium.name=Ватцз-пеллета из чистого шрабидия (Обедненная)
|
||||||
item.weapon_bat.name=Любимица Ричарда
|
item.weapon_bat.name=Любимица Ричарда
|
||||||
item.weapon_bat_nail.name=Клише
|
item.weapon_bat_nail.name=Клише
|
||||||
item.weapon_golf_club.name=Клюшка русского бандита
|
item.weapon_golf_club.name=Клюшка русского бандита
|
||||||
item.weapon_pipe_lead.name=Ручное управление
|
item.weapon_pipe_lead.name=Ручное управление
|
||||||
@ -5094,7 +5098,7 @@ tile.block_pu240.name=Блок плутония-240
|
|||||||
tile.block_ra226.name=Блок радия-226
|
tile.block_ra226.name=Блок радия-226
|
||||||
tile.block_red_copper.name=Блок красной меди
|
tile.block_red_copper.name=Блок красной меди
|
||||||
tile.block_red_phosphorus.name=Блок красного фосфора
|
tile.block_red_phosphorus.name=Блок красного фосфора
|
||||||
tile.block_reiium.name=Реиевый блок
|
tile.block_reiium.name=Реиевый блок
|
||||||
tile.block_rubber.name=Блок резины
|
tile.block_rubber.name=Блок резины
|
||||||
tile.block_schrabidate.name=Блок шрабидата железа
|
tile.block_schrabidate.name=Блок шрабидата железа
|
||||||
tile.block_schrabidium.name=Блок шрабидия
|
tile.block_schrabidium.name=Блок шрабидия
|
||||||
@ -5111,7 +5115,7 @@ tile.block_steel.name=Стальной блок
|
|||||||
tile.block_sulfur.name=Блок серы
|
tile.block_sulfur.name=Блок серы
|
||||||
tile.block_tantalium.name=Блок тантала
|
tile.block_tantalium.name=Блок тантала
|
||||||
tile.block_tcalloy.name=Блок технециевой стали
|
tile.block_tcalloy.name=Блок технециевой стали
|
||||||
tile.block_thorium.name=Ториевый блок
|
tile.block_thorium.name=Ториевый блок
|
||||||
tile.block_thorium_fuel.name=Блок ториевого топлива
|
tile.block_thorium_fuel.name=Блок ториевого топлива
|
||||||
tile.block_titanium.name=Титановый блок
|
tile.block_titanium.name=Титановый блок
|
||||||
tile.block_trinitite.name=Тринититовый блок
|
tile.block_trinitite.name=Тринититовый блок
|
||||||
@ -5413,7 +5417,7 @@ tile.dummy_port.name=Блок-пустышка (Розетка)
|
|||||||
tile.dungeon_chain.name=Металлическая цепь
|
tile.dungeon_chain.name=Металлическая цепь
|
||||||
tile.dynamite.name=Динамит
|
tile.dynamite.name=Динамит
|
||||||
tile.emp_bomb.name=ЭМИ-бомба
|
tile.emp_bomb.name=ЭМИ-бомба
|
||||||
tile.factory_advanced_conductor.name=Порт электричества усовершенствованной фабрики
|
tile.factory_advanced_conductor.name=Порт электричества усовершенствованной фабрики
|
||||||
tile.factory_advanced_core.name=Ядро усовершенствованной фабрики
|
tile.factory_advanced_core.name=Ядро усовершенствованной фабрики
|
||||||
tile.factory_advanced_furnace.name=Люк доступа усовершенствованной фабрики
|
tile.factory_advanced_furnace.name=Люк доступа усовершенствованной фабрики
|
||||||
tile.factory_advanced_hull.name=Корпус усовершенствованной фабрики
|
tile.factory_advanced_hull.name=Корпус усовершенствованной фабрики
|
||||||
@ -5783,7 +5787,7 @@ tile.nuke_fstbmb.name=Жар-бомба
|
|||||||
tile.nuke_gadget.name=Гаджет
|
tile.nuke_gadget.name=Гаджет
|
||||||
tile.nuke_man.name=Толстяк
|
tile.nuke_man.name=Толстяк
|
||||||
tile.nuke_mike.name=Иви Майк
|
tile.nuke_mike.name=Иви Майк
|
||||||
tile.nuke_n2.name=N²-мина
|
tile.nuke_n2.name=N²-мина
|
||||||
tile.nuke_n45.name=Морская мина N45
|
tile.nuke_n45.name=Морская мина N45
|
||||||
tile.nuke_prototype.name=Прототип
|
tile.nuke_prototype.name=Прототип
|
||||||
tile.nuke_solinium.name=Синий Ополаскиватель
|
tile.nuke_solinium.name=Синий Ополаскиватель
|
||||||
@ -5998,7 +6002,7 @@ tile.rbmk_steam_inlet.desc=Подает воду в колонны RBMK, есл
|
|||||||
tile.rbmk_steam_outlet.name=Порт вывода пара РБМК РеаСим
|
tile.rbmk_steam_outlet.name=Порт вывода пара РБМК РеаСим
|
||||||
tile.rbmk_steam_outlet.desc=Извлекает перегретый пар из колонн РБМК, если включены ReaSim бойлеры$Подключается к колоннам RBMK сбоку
|
tile.rbmk_steam_outlet.desc=Извлекает перегретый пар из колонн РБМК, если включены ReaSim бойлеры$Подключается к колоннам RBMK сбоку
|
||||||
tile.rbmk_storage.name=Колонна-хранилище РБМК
|
tile.rbmk_storage.name=Колонна-хранилище РБМК
|
||||||
tile.reactor_computer.name=Контроллер реактора
|
tile.reactor_computer.name=Контроллер реактора
|
||||||
tile.reactor_conductor.name=Бойлер реактора
|
tile.reactor_conductor.name=Бойлер реактора
|
||||||
tile.reactor_control.name=Регулирующие стержни
|
tile.reactor_control.name=Регулирующие стержни
|
||||||
tile.reactor_ejector.name=Выталкиватель отходов реактора
|
tile.reactor_ejector.name=Выталкиватель отходов реактора
|
||||||
|
|||||||
@ -2548,6 +2548,10 @@ item.combine_scrap.name=CMB钢废料
|
|||||||
item.component_emitter.name=发射器组件
|
item.component_emitter.name=发射器组件
|
||||||
item.component_limiter.name=稳定器组件
|
item.component_limiter.name=稳定器组件
|
||||||
item.containment_box.name=安全盒
|
item.containment_box.name=安全盒
|
||||||
|
item.conveyor_wand.regular.name=输送带
|
||||||
|
item.conveyor_wand.express.name=快速输送带
|
||||||
|
item.conveyor_wand.double.name=双轨道输送带
|
||||||
|
item.conveyor_wand.triple.name=三轨道输送带
|
||||||
item.cordite.name=无烟线状火药
|
item.cordite.name=无烟线状火药
|
||||||
item.cotton_candy.name=放射性棉花糖
|
item.cotton_candy.name=放射性棉花糖
|
||||||
item.crackpipe.name=健康烟壶
|
item.crackpipe.name=健康烟壶
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user