Merge branch 'master' into caster-o'-strands
@ -1106,8 +1106,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block machine_waste_drum;
|
||||
public static Block machine_storage_drum;
|
||||
|
||||
|
||||
public static Block machine_autocrafter;
|
||||
public static Block machine_funnel;
|
||||
|
||||
public static Block anvil_iron;
|
||||
public static Block anvil_lead;
|
||||
@ -1172,7 +1173,9 @@ public class ModBlocks {
|
||||
public static Block rail_narrow_straight;
|
||||
public static Block rail_narrow_curve;
|
||||
public static Block rail_large_straight;
|
||||
public static Block rail_large_straight_short;
|
||||
public static Block rail_large_curve;
|
||||
public static Block rail_large_curve_wide;
|
||||
public static Block rail_large_ramp;
|
||||
public static Block rail_large_buffer;
|
||||
public static Block rail_large_switch;
|
||||
@ -2252,7 +2255,9 @@ public class ModBlocks {
|
||||
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_straight_short = new RailStandardStraightShort().setBlockName("rail_large_straight_short").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve = new RailStandardCurve().setBlockName("rail_large_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_curve_wide = new RailStandardCurveWide().setBlockName("rail_large_curve_wide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_ramp = new RailStandardRamp().setBlockName("rail_large_ramp").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
rail_large_buffer = new RailStandardBuffer().setBlockName("rail_large_buffer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_buffer");
|
||||
rail_large_switch = new RailStandardSwitch().setBlockName("rail_large_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||
@ -2342,6 +2347,7 @@ public class ModBlocks {
|
||||
machine_electrolyser = new MachineElectrolyser().setBlockName("machine_electrolyser").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||
|
||||
machine_autocrafter = new MachineAutocrafter().setBlockName("machine_autocrafter").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
machine_funnel = new MachineFunnel().setBlockName("machine_funnel").setHardness(10.0F).setResistance(20.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
|
||||
anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron");
|
||||
anvil_lead = new NTMAnvil(Material.iron, 1).setBlockName("anvil_lead").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_lead");
|
||||
@ -3120,7 +3126,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(boat, boat.getUnlocalizedName());
|
||||
|
||||
//Machines
|
||||
GameRegistry.registerBlock(machine_autocrafter, ItemBlockBase.class, machine_autocrafter.getUnlocalizedName());
|
||||
register(machine_autocrafter);
|
||||
register(machine_funnel);
|
||||
|
||||
GameRegistry.registerBlock(anvil_iron, ItemBlockBase.class, anvil_iron.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(anvil_lead, ItemBlockBase.class, anvil_lead.getUnlocalizedName());
|
||||
@ -3555,7 +3562,9 @@ public class ModBlocks {
|
||||
register(rail_narrow_straight);
|
||||
register(rail_narrow_curve);
|
||||
register(rail_large_straight);
|
||||
register(rail_large_straight_short);
|
||||
register(rail_large_curve);
|
||||
register(rail_large_curve_wide);
|
||||
register(rail_large_ramp);
|
||||
register(rail_large_buffer);
|
||||
register(rail_large_switch);
|
||||
|
||||
@ -24,10 +24,8 @@ import net.minecraft.world.World;
|
||||
|
||||
public class MachineAutocrafter extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT) private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT) private IIcon iconBottom;
|
||||
|
||||
public MachineAutocrafter() {
|
||||
super(Material.iron);
|
||||
@ -67,48 +65,48 @@ public class MachineAutocrafter extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private final Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
ISidedInventory tile = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||
|
||||
if(tileentityfurnace != null) {
|
||||
if(tile != null) {
|
||||
|
||||
for(int i1 = 10; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
for(int i1 = 10; i1 < tile.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tile.getStackInSlot(i1);
|
||||
|
||||
if(itemstack != null) {
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
int j1 = this.rand.nextInt(21) + 10;
|
||||
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
world.func_147453_f(x, y, z, block);
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
}
|
||||
|
||||
138
src/main/java/com/hbm/blocks/machine/MachineFunnel.java
Normal file
@ -0,0 +1,138 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.rail.IRenderBlock;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
|
||||
public class MachineFunnel extends BlockContainer implements ITooltipProvider, IRenderBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT) private IIcon iconBottom;
|
||||
|
||||
public MachineFunnel() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override public int getRenderType() { return renderID; }
|
||||
@Override public boolean isOpaqueCube() { return false; }
|
||||
@Override public boolean renderAsNormalBlock() { return false; }
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":machine_funnel_top");
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":machine_funnel_side");
|
||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":machine_funnel_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityMachineFunnel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntity entity = world.getTileEntity(x, y, z);
|
||||
if(entity instanceof TileEntityMachineFunnel) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private final Random rand = new Random();
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
ISidedInventory tile = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||
if(tile != null) {
|
||||
for(int i1 = 0; i1 < tile.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tile.getStackInSlot(i1);
|
||||
if(itemstack != null) {
|
||||
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.rand.nextInt(21) + 10;
|
||||
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
world.func_147453_f(x, y, z, block);
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glTranslatef(0F, -0.5F, 0F);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, false);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Top", block.getIcon(1, 0), tessellator, 0, true);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Bottom", block.getIcon(0, 0), tessellator, 0, true);
|
||||
ObjUtil.renderPartWithIcon((WavefrontObject) ResourceManager.funnel, "Side", block.getIcon(2, 0), tessellator, 0, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
@ -7,7 +7,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public interface IRenderRail {
|
||||
public interface IRenderBlock {
|
||||
|
||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailNarrowCurve extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailNarrowCurve() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailNarrowStraight extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailNarrowStraight() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -21,7 +21,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardBuffer extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardBuffer() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardCurve extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardCurve() {
|
||||
super(Material.iron);
|
||||
|
||||
239
src/main/java/com/hbm/blocks/rail/RailStandardCurveWide.java
Normal file
@ -0,0 +1,239 @@
|
||||
package com.hbm.blocks.rail;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardCurveWide extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardCurveWide() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getSnappingPos(World world, int x, int y, int z, double trainX, double trainY, double trainZ) {
|
||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, 0, 0, 0, 0, new RailContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) {
|
||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info);
|
||||
}
|
||||
|
||||
/* Very simple function determining the snapping position and adding the motion value to it, if desired. */
|
||||
public Vec3 snapAndMove(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
int cX = pos[0];
|
||||
int cY = pos[1];
|
||||
int cZ = pos[2];
|
||||
int meta = world.getBlockMetadata(cX, cY, cZ) - this.offset;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
double turnRadius = 6D;
|
||||
double axisDist = 6.5D;
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
double axisX = cX + 0.5 + dir.offsetX * 0.5 + rot.offsetX * axisDist;
|
||||
double axisZ = cZ + 0.5 + dir.offsetZ * 0.5 + rot.offsetZ * axisDist;
|
||||
|
||||
Vec3 dist = Vec3.createVectorHelper(vec.xCoord - axisX, 0, vec.zCoord - axisZ);
|
||||
dist = dist.normalize();
|
||||
dist.xCoord *= turnRadius;
|
||||
dist.zCoord *= turnRadius;
|
||||
|
||||
double moveAngle = Math.atan2(motionX, motionZ) * 180D / Math.PI + 90;
|
||||
|
||||
if(speed == 0) {
|
||||
info.dist(0).pos(new BlockPos(x, y, z)).yaw((float) moveAngle);
|
||||
return Vec3.createVectorHelper(axisX + dist.xCoord, y, axisZ + dist.zCoord);
|
||||
}
|
||||
|
||||
double angleDeg = Math.atan2(dist.xCoord, dist.zCoord) * 180D / Math.PI + 90;
|
||||
if(dir == Library.NEG_X) angleDeg -= 90;
|
||||
if(dir == Library.POS_X) angleDeg += 90;
|
||||
if(dir == Library.POS_Z) angleDeg += 180;
|
||||
angleDeg = MathHelper.wrapAngleTo180_double(angleDeg);
|
||||
double length90Deg = turnRadius * Math.PI / 2D;
|
||||
double angularChange = speed / length90Deg * 90D;
|
||||
|
||||
ForgeDirection moveDir = ForgeDirection.UNKNOWN;
|
||||
|
||||
if(Math.abs(motionX) > Math.abs(motionZ)) {
|
||||
moveDir = motionX > 0 ? Library.POS_X : Library.NEG_X;
|
||||
} else {
|
||||
moveDir = motionZ > 0 ? Library.POS_Z : Library.NEG_Z;
|
||||
}
|
||||
|
||||
if(moveDir == dir || moveDir == rot.getOpposite()) {
|
||||
angularChange *= -1;
|
||||
}
|
||||
|
||||
double effAngle = angleDeg + angularChange;
|
||||
moveAngle += angularChange;
|
||||
|
||||
if(effAngle > 90) {
|
||||
double angleOvershoot = effAngle - 90D;
|
||||
moveAngle -= angleOvershoot;
|
||||
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
||||
info.dist(lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX - dir.offsetX * 6 + rot.offsetX * 7, y, cZ - dir.offsetZ * 6 + rot.offsetZ * 7)).yaw((float) moveAngle);
|
||||
return Vec3.createVectorHelper(axisX - dir.offsetX * turnRadius, y + 0.1875, axisZ - dir.offsetZ * turnRadius);
|
||||
}
|
||||
|
||||
if(effAngle < 0) {
|
||||
double angleOvershoot = -effAngle;
|
||||
moveAngle -= angleOvershoot;
|
||||
double lengthOvershoot = angleOvershoot * length90Deg / 90D;
|
||||
info.dist(-lengthOvershoot * Math.signum(speed * angularChange)).pos(new BlockPos(cX + dir.offsetX , y, cZ + dir.offsetZ)).yaw((float) moveAngle);
|
||||
return Vec3.createVectorHelper(axisX - rot.offsetX * turnRadius, y + 0.1875, axisZ -rot.offsetZ * turnRadius);
|
||||
}
|
||||
|
||||
double radianChange = angularChange * Math.PI / 180D;
|
||||
dist.rotateAroundY((float) radianChange);
|
||||
|
||||
return Vec3.createVectorHelper(axisX + dist.xCoord, y + 0.1875, axisZ + dist.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackGauge getGauge(World world, int x, int y, int z) {
|
||||
return TrackGauge.STANDARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 6, 0, 6, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
return world.getBlock(x + dX, y, z + dZ).isReplaceable(world, x + dX, y, z + dZ) &&
|
||||
world.getBlock(x + rX, y, z + rZ).isReplaceable(world, x + rX, y, z + rZ) &&
|
||||
world.getBlock(x + dX + rX, y, z + dZ + rZ).isReplaceable(world, x + dX + rX, y, z + dZ + rZ) &&
|
||||
world.getBlock(x + dX + rX * 2, y, z + dZ + rZ * 2).isReplaceable(world, x + dX + rX * 2, y, z + dZ + rZ * 2) &&
|
||||
world.getBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ).isReplaceable(world, x + dX * 2 + rX, y, z + dZ * 2 + rZ) &&
|
||||
world.getBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2).isReplaceable(world, x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2) &&
|
||||
world.getBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ).isReplaceable(world, x + dX * 3 + rX, y, z + dZ * 3 + rZ) &&
|
||||
world.getBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2).isReplaceable(world, x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2) &&
|
||||
world.getBlock(x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3).isReplaceable(world, x + dX * 2 + rX * 3, y, z + dZ * 2 + rZ * 3) &&
|
||||
world.getBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3).isReplaceable(world, x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3) &&
|
||||
world.getBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3).isReplaceable(world, x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3) &&
|
||||
world.getBlock(x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4).isReplaceable(world, x + dX * 3 + rX * 4, y, z + dZ * 3 + rZ * 4) &&
|
||||
world.getBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4).isReplaceable(world, x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
|
||||
BlockDummyable.safeRem = true;
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
dir = dir.getOpposite();
|
||||
|
||||
int dX = dir.offsetX;
|
||||
int dZ = dir.offsetZ;
|
||||
int rX = rot.offsetX;
|
||||
int rZ = rot.offsetZ;
|
||||
|
||||
world.setBlock(x + dX, y, z + dZ, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 2, y, z + dZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + rX, y, z + rZ, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX + rX, y, z + dZ + rZ, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 2 + rX, y, z + dZ * 2 + rZ, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 3 + rX, y, z + dZ * 3 + rZ, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX, y, z + dZ * 4 + rZ, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 2 + rX * 2, y, z + dZ * 2 + rZ * 2, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 3 + rX * 2, y, z + dZ * 3 + rZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX * 2, y, z + dZ * 4 + rZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 2, y, z + dZ * 5 + rZ * 2, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 3 + rX * 3, y, z + dZ * 3 + rZ * 3, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX * 3, y, z + dZ * 4 + rZ * 3, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 3, y, z + dZ * 5 + rZ * 3, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 4 + rX * 4, y, z + dZ * 4 + rZ * 4, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 4, y, z + dZ * 5 + rZ * 4, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 6 + rX * 4, y, z + dZ * 6 + rZ * 4, this, dir.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 5, y, z + dZ * 5 + rZ * 5, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 5 + rX * 6, y, z + dZ * 5 + rZ * 6, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 6 + rX * 5, y, z + dZ * 6 + rZ * 5, this, rot.ordinal(), 3);
|
||||
world.setBlock(x + dX * 6 + rX * 6, y, z + dZ * 6 + rZ * 6, this, rot.ordinal(), 3);
|
||||
|
||||
BlockDummyable.safeRem = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glScaled(0.12, 0.12, 0.12);
|
||||
GL11.glTranslated(2.5, -0.0625, -3);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide, block.getIcon(1, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
if(meta < 12) return;
|
||||
float rotation = 0;
|
||||
if(meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(meta == 12) rotation = 180F / 180F * (float) Math.PI;
|
||||
if(meta == 14) rotation = 270F / 180F * (float) Math.PI;
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_curve_wide, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
}
|
||||
}
|
||||
@ -23,7 +23,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardRamp extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardRamp() {
|
||||
super(Material.iron);
|
||||
|
||||
@ -22,7 +22,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardStraight extends BlockDummyable implements IRailNTM, IRenderRail {
|
||||
public class RailStandardStraight extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardStraight() {
|
||||
super(Material.iron);
|
||||
|
||||
152
src/main/java/com/hbm/blocks/rail/RailStandardStraightShort.java
Normal file
@ -0,0 +1,152 @@
|
||||
package com.hbm.blocks.rail;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.util.ObjUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardStraightShort extends BlockDummyable implements IRailNTM, IRenderBlock {
|
||||
|
||||
public RailStandardStraightShort() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 0, 0, 1, 0};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
this.setBlockBounds(0F, 0F, 0F, 1F, 0.125F, 1F);
|
||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getSnappingPos(World world, int x, int y, int z, double trainX, double trainY, double trainZ) {
|
||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, 0, 0, 0, 0, new RailContext());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3 getTravelLocation(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info, MoveContext context) {
|
||||
return snapAndMove(world, x, y, z, trainX, trainY, trainZ, motionX, motionY, motionZ, speed, info);
|
||||
}
|
||||
|
||||
/* Very simple function determining the snapping position and adding the motion value to it, if desired. */
|
||||
public Vec3 snapAndMove(World world, int x, int y, int z, double trainX, double trainY, double trainZ, double motionX, double motionY, double motionZ, double speed, RailContext info) {
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
if(pos == null) return Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
int cX = pos[0];
|
||||
int cY = pos[1];
|
||||
int cZ = pos[2];
|
||||
int meta = world.getBlockMetadata(cX, cY, cZ) - this.offset;
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(meta);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||
|
||||
Vec3 vec = Vec3.createVectorHelper(trainX, trainY, trainZ);
|
||||
|
||||
if(dir == Library.POS_X || dir == Library.NEG_X) {
|
||||
double targetX = trainX;
|
||||
if(motionX > 0) {
|
||||
targetX += speed;
|
||||
info.yaw(-90F);
|
||||
} else {
|
||||
targetX -= speed;
|
||||
info.yaw(90F);
|
||||
}
|
||||
vec.xCoord = MathHelper.clamp_double(targetX, cX, cX + 1);
|
||||
vec.yCoord = y + 0.1875;
|
||||
vec.zCoord = cZ + 0.5 + rot.offsetZ * 0.5;
|
||||
info.dist(Math.abs(targetX - vec.xCoord) * Math.signum(speed));
|
||||
info.pos(new BlockPos(cX + (motionX * speed > 0 ? 1 : -1), y, cZ));
|
||||
} else {
|
||||
double targetZ = trainZ;
|
||||
if(motionZ > 0) {
|
||||
targetZ += speed;
|
||||
info.yaw(0F);
|
||||
} else {
|
||||
targetZ -= speed;
|
||||
info.yaw(180F);
|
||||
}
|
||||
vec.xCoord = cX + 0.5 + rot.offsetX * 0.5;
|
||||
vec.yCoord = y + 0.1875;
|
||||
vec.zCoord = MathHelper.clamp_double(targetZ, cZ,cZ + 1);
|
||||
info.dist(Math.abs(targetZ - vec.zCoord) * Math.signum(speed));
|
||||
info.pos(new BlockPos(cX, y, cZ + (motionZ * speed > 0 ? 1 : -1)));
|
||||
}
|
||||
|
||||
return vec;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrackGauge getGauge(World world, int x, int y, int z) {
|
||||
return TrackGauge.STANDARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(Tessellator tessellator, Block block, int metadata) {
|
||||
GL11.glTranslated(0, -0.0625, 0);
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GL11.glScaled(0.7, 0.7, 0.7);
|
||||
tessellator.startDrawingQuads();
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, 0, false);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderWorld(Tessellator tessellator, Block block, int meta, IBlockAccess world, int x, int y, int z) {
|
||||
if(meta < 12) return;
|
||||
float rotation = 0;
|
||||
if(meta == 14 || meta == 15) rotation = 90F / 180F * (float) Math.PI;
|
||||
if(meta == 12) tessellator.addTranslation(0.5F, 0F, 0F);
|
||||
if(meta == 13) tessellator.addTranslation(-0.5F, 0F, 0F);
|
||||
if(meta == 14) tessellator.addTranslation(0F, 0F, -0.5F);
|
||||
if(meta == 15) tessellator.addTranslation(0F, 0F, 0.5F);
|
||||
tessellator.addTranslation(x + 0.5F, y, z + 0.5F);
|
||||
ObjUtil.renderWithIcon((WavefrontObject) ResourceManager.rail_standard_straight_short, block.getIcon(1, 0), tessellator, rotation, true);
|
||||
tessellator.addTranslation(-x - 0.5F, -y, -z - 0.5F);
|
||||
if(meta == 12) tessellator.addTranslation(-0.5F, 0F, 0F);
|
||||
if(meta == 13) tessellator.addTranslation(0.5F, 0F, 0F);
|
||||
if(meta == 14) tessellator.addTranslation(0F, 0F, 0.5F);
|
||||
if(meta == 15) tessellator.addTranslation(0F, 0F, -0.5F);
|
||||
}
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.hbm.blocks.rail;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
@ -27,7 +28,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardSwitch extends BlockRailWaypointSystem implements IRenderRail {
|
||||
public class RailStandardSwitch extends BlockRailWaypointSystem implements IRenderBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconSign;
|
||||
|
||||
@ -128,6 +129,7 @@ public class RailStandardSwitch extends BlockRailWaypointSystem implements IRend
|
||||
|
||||
if(world.isRemote) return true;
|
||||
if(player.isSneaking()) return false;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.train) return false;
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.rail.RailStandardSwitch.TileEntityRailSwitch;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.ResourceManager;
|
||||
@ -24,7 +25,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.obj.WavefrontObject;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implements IRenderRail {
|
||||
public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implements IRenderBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT) private IIcon iconSign;
|
||||
|
||||
@ -125,6 +126,7 @@ public class RailStandardSwitchFlipped extends BlockRailWaypointSystem implement
|
||||
|
||||
if(world.isRemote) return true;
|
||||
if(player.isSneaking()) return false;
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.train) return false;
|
||||
|
||||
int[] pos = this.findCore(world, x, y, z);
|
||||
|
||||
|
||||
@ -47,14 +47,14 @@ public class Gun44MagnumFactory {
|
||||
config.roundsPerCycle = 1;
|
||||
config.gunMode = GunConfiguration.MODE_NORMAL;
|
||||
config.firingMode = GunConfiguration.FIRE_MANUAL;
|
||||
config.reloadDuration = 10;
|
||||
config.reloadDuration = 50;
|
||||
config.firingDuration = 0;
|
||||
config.ammoCap = 6;
|
||||
config.reloadType = GunConfiguration.RELOAD_FULL;
|
||||
config.allowsInfinity = true;
|
||||
config.crosshair = Crosshair.L_CLASSIC;
|
||||
config.reloadSound = GunConfiguration.RSOUND_REVOLVER;
|
||||
config.firingSound = "hbm:weapon.revolverShootAlt";
|
||||
config.firingSound = "hbm:weapon.44Shoot";
|
||||
config.reloadSoundEnd = false;
|
||||
|
||||
config.config.addAll(HbmCollection.m44Normal);
|
||||
|
||||
@ -362,7 +362,7 @@ public class OreDictManager {
|
||||
TCALLOY .ingot(ingot_tcalloy) .dust(powder_tcalloy) .block(block_tcalloy);
|
||||
CDALLOY .ingot(ingot_cdalloy) .block(block_cdalloy);
|
||||
PB .nugget(nugget_lead) .ingot(ingot_lead) .dust(powder_lead) .plate(plate_lead) .block(block_lead) .ore(ore_lead, ore_meteor_lead);
|
||||
BI .nugget(nugget_bismuth) .billet(billet_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth);
|
||||
BI .nugget(nugget_bismuth) .billet(billet_bismuth) .ingot(ingot_bismuth) .dust(powder_bismuth) .block(block_bismuth);
|
||||
AS .nugget(nugget_arsenic) .ingot(ingot_arsenic);
|
||||
CA .ingot(ingot_calcium) .dust(powder_calcium);
|
||||
CD .ingot(ingot_cadmium) .dust(powder_cadmium) .block(block_cadmium);
|
||||
|
||||
@ -0,0 +1,64 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotCraftingOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerFunnel extends Container {
|
||||
|
||||
private TileEntityMachineFunnel funnel;
|
||||
|
||||
public ContainerFunnel(InventoryPlayer playerInv, TileEntityMachineFunnel tile) {
|
||||
funnel = tile;
|
||||
|
||||
for(int i = 0; i < 9; i++) this.addSlotToContainer(new Slot(tile, i, 8 + 18 * i, 18));
|
||||
for(int i = 0; i < 9; i++) this.addSlotToContainer(new SlotCraftingOutput(playerInv.player, tile, i + 9, 8 + 18 * i, 54));
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, j + i * 9 + 9, 8 + j * 18, 86 + i * 18));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 144));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return funnel.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer player, int index) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(index);
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
|
||||
if(index <= 17) {
|
||||
if(!this.mergeItemStack(var5, 18, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(!this.mergeItemStack(var5, 0, 9, false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
42
src/main/java/com/hbm/inventory/gui/GUIFunnel.java
Normal file
@ -0,0 +1,42 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.container.ContainerFunnel;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFunnel;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUIFunnel extends GuiContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/processing/gui_funnel.png");
|
||||
private TileEntityMachineFunnel funnel;
|
||||
|
||||
public GUIFunnel(InventoryPlayer invPlayer, TileEntityMachineFunnel tedf) {
|
||||
super(new ContainerFunnel(invPlayer, tedf));
|
||||
funnel = tedf;
|
||||
|
||||
this.xSize = 176;
|
||||
this.ySize = 168;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
String name = this.funnel.hasCustomInventoryName() ? this.funnel.getInventoryName() : I18n.format(this.funnel.getInventoryName());
|
||||
|
||||
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
|
||||
this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
}
|
||||
}
|
||||
@ -4161,7 +4161,7 @@ public class ModItems {
|
||||
gun_revolver_cursed = new ItemGunBase(Gun357MagnumFactory.getRevolverCursedConfig()).setUnlocalizedName("gun_revolver_cursed").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_cursed");
|
||||
gun_revolver_nightmare = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmareConfig()).setUnlocalizedName("gun_revolver_nightmare").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare");
|
||||
gun_revolver_nightmare2 = new ItemGunBase(Gun357MagnumFactory.getRevolverNightmare2Config()).setUnlocalizedName("gun_revolver_nightmare2").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nightmare2");
|
||||
gun_revolver_pip = new ItemGunBase(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
||||
gun_revolver_pip = new ItemGunPip(Gun44MagnumFactory.getMacintoshConfig()).setUnlocalizedName("gun_revolver_pip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_pip");
|
||||
gun_revolver_nopip = new ItemGunBase(Gun44MagnumFactory.getNovacConfig()).setUnlocalizedName("gun_revolver_nopip").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_nopip");
|
||||
gun_revolver_blackjack = new ItemGunBase(Gun44MagnumFactory.getBlackjackConfig()).setUnlocalizedName("gun_revolver_blackjack").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_blackjack");
|
||||
gun_revolver_silver = new ItemGunBase(Gun44MagnumFactory.getSilverConfig()).setUnlocalizedName("gun_revolver_silver").setCreativeTab(MainRegistry.weaponTab).setTextureName(RefStrings.MODID + ":gun_revolver_silver");
|
||||
|
||||
@ -790,6 +790,8 @@ public class ItemGunBase extends Item implements IHoldableWeapon, IItemHUD, IEqu
|
||||
if(!mainConfig.equipSound.isEmpty() && !player.worldObj.isRemote) {
|
||||
player.worldObj.playSoundAtEntity(player, mainConfig.equipSound, 1, 1);
|
||||
}
|
||||
|
||||
if(player instanceof EntityPlayerMP) PacketDispatcher.wrapper.sendTo(new GunAnimationPacket(AnimType.EQUIP.ordinal()), (EntityPlayerMP) player);
|
||||
}
|
||||
|
||||
protected static void queueCasing(Entity entity, CasingEjector ejector, BulletConfiguration bullet, ItemStack stack) {
|
||||
|
||||
@ -22,7 +22,6 @@ public class ItemGunBio extends ItemGunBase {
|
||||
super(config);
|
||||
}
|
||||
|
||||
/* just a test */
|
||||
public static long lastShot;
|
||||
public static List<double[]> smokeNodes = new ArrayList();
|
||||
|
||||
@ -66,8 +65,6 @@ public class ItemGunBio extends ItemGunBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
|
||||
//GunConfiguration config = ((ItemGunBase) stack.getItem()).mainConfig;
|
||||
//return config.animations.get(type);
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
lastShot = System.currentTimeMillis();
|
||||
|
||||
138
src/main/java/com/hbm/items/weapon/ItemGunPip.java
Normal file
@ -0,0 +1,138 @@
|
||||
package com.hbm.items.weapon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.handler.GunConfiguration;
|
||||
import com.hbm.render.anim.BusAnimation;
|
||||
import com.hbm.render.anim.BusAnimationKeyframe;
|
||||
import com.hbm.render.anim.BusAnimationSequence;
|
||||
import com.hbm.render.anim.HbmAnimations.AnimType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemGunPip extends ItemGunBase {
|
||||
|
||||
public static long lastShot;
|
||||
public static List<double[]> smokeNodes = new ArrayList();
|
||||
|
||||
public ItemGunPip(GunConfiguration config) {
|
||||
super(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void updateClient(ItemStack stack, World world, EntityPlayer entity, int slot, boolean isCurrentItem) {
|
||||
super.updateClient(stack, world, entity, slot, isCurrentItem);
|
||||
|
||||
boolean smoking = lastShot + 2000 > System.currentTimeMillis();
|
||||
|
||||
if(!smoking && !smokeNodes.isEmpty()) {
|
||||
smokeNodes.clear();
|
||||
}
|
||||
|
||||
if(smoking) {
|
||||
Vec3 prev = Vec3.createVectorHelper(-entity.motionX, -entity.motionY, -entity.motionZ);
|
||||
prev.rotateAroundY((float) (entity.rotationYaw * Math.PI / 180D));
|
||||
double accel = 15D;
|
||||
double side = (entity.rotationYaw - entity.prevRotationYawHead) * 0.1D;
|
||||
double waggle = 0.025D;
|
||||
|
||||
for(double[] node : smokeNodes) {
|
||||
node[0] += -prev.zCoord * accel + world.rand.nextGaussian() * waggle;
|
||||
node[1] += prev.yCoord + 1.5D;
|
||||
node[2] += prev.xCoord * accel + world.rand.nextGaussian() * waggle + side;
|
||||
}
|
||||
|
||||
double alpha = (System.currentTimeMillis() - lastShot) / 2000D;
|
||||
alpha = (1 - alpha) * 0.5D;
|
||||
|
||||
if(this.getIsReloading(stack)) alpha = 0;
|
||||
|
||||
smokeNodes.add(new double[] {0, 0, 0, alpha});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BusAnimation getAnimation(ItemStack stack, AnimType type) {
|
||||
|
||||
if(type == AnimType.EQUIP) {
|
||||
return new BusAnimation()
|
||||
.addBus("ROTATE", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(-360, 0, 0, 350))
|
||||
);
|
||||
}
|
||||
|
||||
if(type == AnimType.CYCLE) {
|
||||
lastShot = System.currentTimeMillis();
|
||||
int s = 1;
|
||||
return new BusAnimation()
|
||||
.addBus("RECOIL", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 50 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, -3, 50 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 250 * s))
|
||||
)
|
||||
.addBus("HAMMER", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 50 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 300 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s))
|
||||
)
|
||||
.addBus("DRUM", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 1, 50 * s))
|
||||
);
|
||||
}
|
||||
|
||||
if(type == AnimType.RELOAD) {
|
||||
int s = 1;
|
||||
return new BusAnimation()
|
||||
.addBus("RELAOD_TILT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(-15, 0, 0, 100 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(65, 0, 0, 100 * s)) //200
|
||||
.addKeyframe(new BusAnimationKeyframe(45, 0, 0, 50 * s)) //250
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s)) //450
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 1450 * s)) //1900
|
||||
.addKeyframe(new BusAnimationKeyframe(-80, 0, 0, 100 * s)) //2000
|
||||
.addKeyframe(new BusAnimationKeyframe(-80, 0, 0, 100 * s)) //2100
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s)) //2300
|
||||
)
|
||||
.addBus("RELOAD_CYLINDER", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 200 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(90, 0, 0, 100 * s)) //300
|
||||
.addKeyframe(new BusAnimationKeyframe(90, 0, 0, 1700 * s)) //2000
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 70 * s)) //2100
|
||||
)
|
||||
.addBus("RELOAD_LIFT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 350 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(-45, 0, 0, 250 * s)) //600
|
||||
.addKeyframe(new BusAnimationKeyframe(-45, 0, 0, 350 * s)) //950
|
||||
.addKeyframe(new BusAnimationKeyframe(-15, 0, 0, 200 * s)) //1150
|
||||
.addKeyframe(new BusAnimationKeyframe(-15, 0, 0, 1050 * s)) //2200
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 100 * s)) //2300
|
||||
)
|
||||
.addBus("RELOAD_JOLT", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 600 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(2, 0, 0, 50 * s)) //650
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 100 * s)) //750
|
||||
)
|
||||
.addBus("RELOAD_BULLETS", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 650 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(10, 0, 0, 300 * s)) //950
|
||||
.addKeyframe(new BusAnimationKeyframe(10, 0, 0, 200 * s)) //1150
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 700 * s)) //1850
|
||||
)
|
||||
.addBus("RELOAD_BULLETS_CON", new BusAnimationSequence()
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 0 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(1, 0, 0, 950 * s))
|
||||
.addKeyframe(new BusAnimationKeyframe(0, 0, 0, 1 * s))
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -537,7 +537,7 @@ public class ClientProxy extends ServerProxy {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_chemthrower, new ItemRenderWeaponChemthrower());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_m2, new ItemRenderM2());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_nopip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_pip, new ItemRenderWeaponLilMac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_blackjack, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_silver, new ItemRenderWeaponNovac());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gun_revolver_red, new ItemRenderWeaponNovac());
|
||||
|
||||
@ -312,6 +312,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 2), new Object[] { "PCP", "PMP", "PPP", 'P', ANY_RESISTANTALLOY.ingot(), 'C', ModItems.circuit_gold, 'M', new ItemStack(ModBlocks.mass_storage, 1, 1) });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.mass_storage, 1, 3), new Object[] { "PPP", "PIP", "PPP", 'P', KEY_PLANKS, 'I', IRON.plate() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_autocrafter, 1), new Object[] { "SCS", "MWM", "SCS", 'S', STEEL.plate(), 'C', ModItems.circuit_copper, 'M', ModItems.motor, 'W', Blocks.crafting_table });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_funnel, 1), new Object[] { "S S", "SRS", " S ", 'S', STEEL.ingot(), 'R', REDSTONE.dust() });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_waste_drum, 1), new Object[] { "LRL", "BRB", "LRL", 'L', PB.ingot(), 'B', Blocks.iron_bars, 'R', ModItems.rod_quad_empty });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_press, 1), new Object[] { "IRI", "IPI", "IBI", 'I', IRON.ingot(), 'R', Blocks.furnace, 'B', IRON.block(), 'P', Blocks.piston });
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_siren, 1), new Object[] { "SIS", "ICI", "SRS", 'S', STEEL.plate(), 'I', ANY_RUBBER.ingot(), 'C', ModItems.circuit_copper, 'R', REDSTONE.dust() });
|
||||
|
||||
@ -241,7 +241,7 @@ public class ModEventHandlerClient {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons);
|
||||
}*/
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
/*List<String> text = new ArrayList();
|
||||
MovingObjectPosition pos = Library.rayTrace(player, 500, 1, false, true, false);
|
||||
|
||||
for(int i = 0; i < 2; i++) if(pos != null && pos.typeOfHit == pos.typeOfHit.BLOCK) {
|
||||
@ -309,7 +309,7 @@ public class ModEventHandlerClient {
|
||||
} while(distanceToCover != 0);
|
||||
|
||||
ILookOverlay.printGeneric(event, "DEBUG", 0xffff00, 0x4040000, text);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/// HANLDE ANIMATION BUSES ///
|
||||
|
||||
@ -257,7 +257,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom shredder = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/shredder.obj"));
|
||||
|
||||
//Bombs
|
||||
public static final IModelCustom bomb_gadget = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/TheGadget3.obj"));
|
||||
public static final IModelCustom bomb_gadget = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/gadget.obj")).asDisplayList();
|
||||
public static final IModelCustom bomb_boy = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/LilBoy1.obj"));
|
||||
public static final IModelCustom bomb_man = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/FatMan.obj")).asDisplayList();
|
||||
public static final IModelCustom bomb_mike = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/bombs/ivymike.obj"));
|
||||
@ -677,7 +677,7 @@ public class ResourceManager {
|
||||
public static final ResourceLocation shredder_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/shredder.png");
|
||||
|
||||
//Bombs
|
||||
public static final ResourceLocation bomb_gadget_tex = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_tex.png");
|
||||
public static final ResourceLocation bomb_gadget_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/gadget.png");
|
||||
public static final ResourceLocation bomb_boy_tex = new ResourceLocation(RefStrings.MODID, "textures/models/lilboy.png");
|
||||
public static final ResourceLocation bomb_man_tex = new ResourceLocation(RefStrings.MODID, "textures/models/FatMan.png");
|
||||
public static final ResourceLocation bomb_mike_tex = new ResourceLocation(RefStrings.MODID, "textures/models/bombs/ivymike.png");
|
||||
@ -834,6 +834,7 @@ public class ResourceManager {
|
||||
public static final IModelCustom cryocannon = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/cryo_cannon.obj")).asDisplayList();
|
||||
public static final IModelCustom uac_pistol = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/UAC pistol.obj")).asDisplayList();
|
||||
public static final IModelCustom congolake = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/congolake.obj")).asDisplayList();
|
||||
public static final IModelCustom lilmac = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lilmac.obj")).asDisplayList();
|
||||
|
||||
public static final IModelCustom lance = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/weapons/lance.obj"));
|
||||
|
||||
@ -931,6 +932,8 @@ public class ResourceManager {
|
||||
public static final ResourceLocation cryocannon_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/cryo_cannon.png");
|
||||
public static final ResourceLocation uac_pistol_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/pistol_texture.png");
|
||||
public static final ResourceLocation congolake_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/congolake.png");
|
||||
public static final ResourceLocation lilmac_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac.png");
|
||||
public static final ResourceLocation lilmac_scope_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_scope.png");
|
||||
|
||||
public static final ResourceLocation lance_tex = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lance.png");
|
||||
|
||||
@ -1470,12 +1473,15 @@ public class ResourceManager {
|
||||
public static final IModelCustom rail_narrow_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow.obj"));
|
||||
public static final IModelCustom rail_narrow_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_narrow_bend.obj"));
|
||||
public static final IModelCustom rail_standard_straight = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard.obj"));
|
||||
public static final IModelCustom rail_standard_straight_short = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_short.obj"));
|
||||
public static final IModelCustom rail_standard_curve = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend.obj"));
|
||||
public static final IModelCustom rail_standard_curve_wide = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_bend_wide.obj"));
|
||||
public static final IModelCustom rail_standard_ramp = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_ramp.obj"));
|
||||
public static final IModelCustom rail_standard_buffer = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_buffer.obj"));
|
||||
public static final IModelCustom rail_standard_switch = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_switch.obj"));
|
||||
public static final IModelCustom rail_standard_switch_flipped = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/rail_standard_switch_flipped.obj"));
|
||||
public static final IModelCustom capacitor = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/capacitor.obj"));
|
||||
public static final IModelCustom funnel = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/funnel.obj"));
|
||||
|
||||
public static final IModelCustom charge_dynamite = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_dynamite.obj"));
|
||||
public static final IModelCustom charge_c4 = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/blocks/charge_c4.obj"));
|
||||
|
||||
@ -20,7 +20,8 @@ public class HbmAnimations {
|
||||
CYCLE, //animation for every firing cycle
|
||||
ALT_CYCLE, //animation for alt fire cycles
|
||||
SPINUP, //animation for actionstart
|
||||
SPINDOWN //animation for actionend
|
||||
SPINDOWN, //animation for actionend
|
||||
EQUIP //animation for drawing the weapon
|
||||
}
|
||||
|
||||
public static class Animation {
|
||||
|
||||
@ -2,7 +2,7 @@ package com.hbm.render.block;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.rail.IRenderRail;
|
||||
import com.hbm.blocks.rail.IRenderBlock;
|
||||
import com.hbm.blocks.rail.RailStandardStraight;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@ -17,7 +17,7 @@ public class RenderRail implements ISimpleBlockRenderingHandler {
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
IRenderRail rail = (IRenderRail) block;
|
||||
IRenderBlock rail = (IRenderBlock) block;
|
||||
rail.renderInventory(tessellator, block, metadata);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@ -28,7 +28,7 @@ public class RenderRail implements ISimpleBlockRenderingHandler {
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
|
||||
tessellator.setColorOpaque_F(1, 1, 1);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
IRenderRail rail = (IRenderRail) block;
|
||||
IRenderBlock rail = (IRenderBlock) block;
|
||||
rail.renderWorld(tessellator, block, meta, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -411,17 +411,6 @@ public class ItemRenderLibrary {
|
||||
bindTexture(ResourceManager.duchessgambit_tex); ResourceManager.duchessgambit.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_gadget), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glTranslated(0.25, 0, 0);
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderAll();
|
||||
}});
|
||||
|
||||
renderers.put(Item.getItemFromBlock(ModBlocks.nuke_boy), new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(5, 5, 5);
|
||||
|
||||
@ -0,0 +1,256 @@
|
||||
package com.hbm.render.item.weapon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.weapon.ItemGunPip;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.anim.HbmAnimations;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class ItemRenderWeaponLilMac implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation lilmac_plume = new ResourceLocation(RefStrings.MODID, "textures/models/weapons/lilmac_plume.png");
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
switch(type) {
|
||||
case EQUIPPED:
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
case ENTITY:
|
||||
case INVENTORY:
|
||||
return true;
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return type == ItemRenderType.ENTITY && (helper == ItemRendererHelper.ENTITY_ROTATION || helper == ItemRendererHelper.ENTITY_BOBBING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
//prevent rendering when using scope
|
||||
if(item.getItem() == ModItems.gun_revolver_pip && type == ItemRenderType.EQUIPPED_FIRST_PERSON && MainRegistry.proxy.me().isSneaking()) return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED_FIRST_PERSON:
|
||||
|
||||
double s0 = 0.1D;
|
||||
GL11.glRotated(25, 0, 0, 1);
|
||||
GL11.glTranslated(1.0, 0.25, -0.25);
|
||||
GL11.glRotated(170, 0, 1, 0);
|
||||
GL11.glScaled(s0, s0, s0);
|
||||
double width = 0.5D;
|
||||
|
||||
double[] recoil = HbmAnimations.getRelevantTransformation("RECOIL");
|
||||
double[] reloadLift = HbmAnimations.getRelevantTransformation("RELOAD_LIFT");
|
||||
double[] reloadJolt = HbmAnimations.getRelevantTransformation("RELOAD_JOLT");
|
||||
double[] equipSpin = HbmAnimations.getRelevantTransformation("ROTATE");
|
||||
GL11.glTranslated(2, 0, 0);
|
||||
GL11.glRotated(equipSpin[0], 0, 0, 1);
|
||||
GL11.glTranslated(-2, 0, 0);
|
||||
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
GL11.glTranslated(-10, 2.25, 0);
|
||||
GL11.glTranslated(-recoil[2] * 3.5, -recoil[2] * 1.375, 0);
|
||||
|
||||
if(ItemGunPip.smokeNodes.size() > 1 && equipSpin[0] == 0) {
|
||||
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
|
||||
for(int i = 0; i < ItemGunPip.smokeNodes.size() - 1; i++) {
|
||||
double[] node = ItemGunPip.smokeNodes.get(i);
|
||||
double[] past = ItemGunPip.smokeNodes.get(i + 1);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
|
||||
tess.addVertex(node[0], node[1], node[2]);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(node[0], node[1], node[2] + width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(past[0], past[1], past[2] + width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
|
||||
tess.addVertex(past[0], past[1], past[2]);
|
||||
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) node[3]);
|
||||
tess.addVertex(node[0], node[1], node[2]);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(node[0], node[1], node[2] - width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 0F);
|
||||
tess.addVertex(past[0], past[1], past[2] - width);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, (float) past[3]);
|
||||
tess.addVertex(past[0], past[1], past[2]);
|
||||
}
|
||||
GL11.glDepthMask(false);
|
||||
tess.draw();
|
||||
GL11.glDepthMask(true);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.1F);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glTranslated(0, reloadLift[0] / -22D, 0);
|
||||
|
||||
GL11.glTranslated(recoil[0], recoil[1], recoil[2]);
|
||||
GL11.glRotated(recoil[2] * 10, 0, 0, 1);
|
||||
GL11.glRotated(reloadLift[0], 0, 0, 1);
|
||||
GL11.glTranslated(reloadJolt[0], 0, 0);
|
||||
|
||||
double[] reloadTilt = HbmAnimations.getRelevantTransformation("RELAOD_TILT");
|
||||
GL11.glRotated(reloadTilt[0], 1, 0, 0);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_scope_tex);
|
||||
ResourceManager.lilmac.renderPart("Scope");
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_tex);
|
||||
ResourceManager.lilmac.renderPart("Gun");
|
||||
|
||||
double[] cylinderFlip = HbmAnimations.getRelevantTransformation("RELOAD_CYLINDER");
|
||||
GL11.glPushMatrix(); /// DRUM PUSH ///
|
||||
GL11.glRotated(cylinderFlip[0], 1, 0, 0);
|
||||
ResourceManager.lilmac.renderPart("Pivot");
|
||||
GL11.glTranslated(0, 1.75, 0);
|
||||
GL11.glRotated(HbmAnimations.getRelevantTransformation("DRUM")[2] * -60, 1, 0, 0);
|
||||
GL11.glTranslated(0, -1.75, 0);
|
||||
ResourceManager.lilmac.renderPart("Cylinder");
|
||||
double[] reloadBullets = HbmAnimations.getRelevantTransformation("RELOAD_BULLETS");
|
||||
GL11.glTranslated(reloadBullets[0], reloadBullets[1], reloadBullets[2]);
|
||||
if(HbmAnimations.getRelevantTransformation("RELOAD_BULLETS_CON")[0] != 1)
|
||||
ResourceManager.lilmac.renderPart("Bullets");
|
||||
ResourceManager.lilmac.renderPart("Casings");
|
||||
GL11.glPopMatrix(); /// DRUM POP ///
|
||||
|
||||
GL11.glPushMatrix(); /// HAMMER ///
|
||||
GL11.glTranslated(4, 1.25, 0);
|
||||
GL11.glRotated(-30 + 30 * HbmAnimations.getRelevantTransformation("HAMMER")[2], 0, 0, 1);
|
||||
GL11.glTranslated(-4, -1.25, 0);
|
||||
ResourceManager.lilmac.renderPart("Hammer");
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
int flash = 75;
|
||||
if(System.currentTimeMillis() - ItemGunPip.lastShot < flash) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0.125, 2.25, 0);
|
||||
|
||||
double fire = (System.currentTimeMillis() - ItemGunPip.lastShot) / (double) flash;
|
||||
|
||||
double height = 4 * fire;
|
||||
double length = 15 * fire;
|
||||
double lift = 3 * fire;
|
||||
double offset = 1 * fire;
|
||||
double lengthOffset = 0.125;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(lilmac_plume);
|
||||
tess.startDrawingQuads();
|
||||
tess.setNormal(0F, 1F, 0F);
|
||||
tess.setColorRGBA_F(1F, 1F, 1F, 1F);
|
||||
|
||||
tess.addVertexWithUV(0, -height, -offset, 1, 1);
|
||||
tess.addVertexWithUV(0, height, -offset, 0, 1);
|
||||
tess.addVertexWithUV(0, height + lift, length - offset, 0 ,0);
|
||||
tess.addVertexWithUV(0, -height + lift, length - offset, 1, 0);
|
||||
|
||||
tess.addVertexWithUV(0, height, offset, 0, 1);
|
||||
tess.addVertexWithUV(0, -height, offset, 1, 1);
|
||||
tess.addVertexWithUV(0, -height + lift, -length + offset, 1, 0);
|
||||
tess.addVertexWithUV(0, height + lift, -length + offset, 0 ,0);
|
||||
|
||||
tess.addVertexWithUV(0, -height, -offset, 1, 1);
|
||||
tess.addVertexWithUV(0, height, -offset, 0, 1);
|
||||
tess.addVertexWithUV(lengthOffset, height, length - offset, 0 ,0);
|
||||
tess.addVertexWithUV(lengthOffset, -height, length - offset, 1, 0);
|
||||
|
||||
tess.addVertexWithUV(0, height, offset, 0, 1);
|
||||
tess.addVertexWithUV(0, -height, offset, 1, 1);
|
||||
tess.addVertexWithUV(lengthOffset, -height, -length + offset, 1, 0);
|
||||
tess.addVertexWithUV(lengthOffset, height, -length + offset, 0 ,0);
|
||||
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case EQUIPPED:
|
||||
|
||||
double scale = 0.1D;
|
||||
GL11.glScaled(scale, scale, scale);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(100, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-3F, 1F, 4F);
|
||||
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
|
||||
double s1 = 0.075D;
|
||||
GL11.glScaled(s1, s1, s1);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0F, 1F, 0F);
|
||||
|
||||
break;
|
||||
|
||||
case INVENTORY:
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
double s = 0.8D;
|
||||
GL11.glTranslated(8, 8, 0);
|
||||
GL11.glRotated(180, 0, 1, 0);
|
||||
GL11.glRotated(135, 0, 0, 1);
|
||||
GL11.glScaled(s, s, -s);
|
||||
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if(type != ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_scope_tex);
|
||||
ResourceManager.lilmac.renderPart("Scope");
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ResourceManager.lilmac_tex);
|
||||
ResourceManager.lilmac.renderPart("Gun");
|
||||
ResourceManager.lilmac.renderPart("Cylinder");
|
||||
ResourceManager.lilmac.renderPart("Bullets");
|
||||
ResourceManager.lilmac.renderPart("Casings");
|
||||
ResourceManager.lilmac.renderPart("Pivot");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -2,38 +2,66 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderNukeGadget extends TileEntitySpecialRenderer {
|
||||
public class RenderNukeGadget extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
switch(tileEntity.getBlockMetadata())
|
||||
{
|
||||
case 2:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 3:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tileEntity.getBlockMetadata()) {
|
||||
case 2: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 3: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderAll();
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderPart("Body");
|
||||
|
||||
if(Minecraft.getMinecraft().gameSettings.fancyGraphics)
|
||||
ResourceManager.bomb_gadget.renderPart("Wires");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.nuke_gadget);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase() {
|
||||
public void renderInventory() {
|
||||
GL11.glTranslated(0, -3, 0);
|
||||
GL11.glScaled(5, 5, 5);
|
||||
}
|
||||
public void renderCommon() {
|
||||
GL11.glRotatef(-90, 0F, 1F, 0F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.bomb_gadget_tex);
|
||||
ResourceManager.bomb_gadget.renderPart("Body");
|
||||
|
||||
if(Minecraft.getMinecraft().gameSettings.fancyGraphics)
|
||||
ResourceManager.bomb_gadget.renderPart("Wires");
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -298,8 +298,9 @@ public class TileMappings {
|
||||
put(TileEntityFoundrySlagtap.class, "tileentity_foundry_slagtap");
|
||||
put(TileEntitySlag.class, "tileentity_foundry_slag");
|
||||
put(TileEntityMachineStrandCaster.class, "tileentity_strand_caster");
|
||||
|
||||
|
||||
put(TileEntityMachineAutocrafter.class, "tileentity_autocrafter");
|
||||
put(TileEntityMachineFunnel.class, "tileentity_funnel");
|
||||
put(TileEntityDiFurnaceRTG.class, "tileentity_rtg_difurnace");
|
||||
put(TileEntityMachineRadiolysis.class, "tileentity_radiolysis");
|
||||
put(TileEntityUVLamp.class, "tileentity_uv_lamp");
|
||||
|
||||
@ -369,6 +369,10 @@ public class TileEntityMachineAutocrafter extends TileEntityMachineBase implemen
|
||||
}
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
for(int i = 0; i < this.getSizeInventory(); i++) this.setInventorySlotContents(i, null);
|
||||
}
|
||||
|
||||
public static class ContainerBlank extends Container {
|
||||
@Override public void onCraftMatrixChanged(IInventory inventory) { }
|
||||
@Override public boolean canInteractWith(EntityPlayer player) { return false; }
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.inventory.container.ContainerFunnel;
|
||||
import com.hbm.inventory.gui.GUIFunnel;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAutocrafter.InventoryCraftingAuto;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TileEntityMachineFunnel extends TileEntityMachineBase implements IGUIProvider {
|
||||
|
||||
public TileEntityMachineFunnel() {
|
||||
super(18);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.machineFunnel";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
|
||||
if(slots[i] != null) {
|
||||
int stacksize = 9;
|
||||
ItemStack compressed = slots[i].stackSize < 9 ? null : this.getFrom9(slots[i]);
|
||||
if(compressed == null) {
|
||||
compressed = slots[i].stackSize < 4 ? null : this.getFrom4(slots[i]);
|
||||
stacksize = 4;
|
||||
}
|
||||
|
||||
if(compressed != null && slots[i].stackSize >= stacksize) {
|
||||
if(slots[i + 9] == null) {
|
||||
slots[i + 9] = compressed.copy();
|
||||
this.decrStackSize(i, stacksize);
|
||||
} else if(slots[i + 9].getItem() == compressed.getItem() && slots[i + 9].getItemDamage() == compressed.getItemDamage() && slots[i + 9].stackSize + compressed.stackSize <= compressed.getMaxStackSize()) {
|
||||
slots[i + 9].stackSize += compressed.stackSize;
|
||||
this.decrStackSize(i, stacksize);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int[] topAccess = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
|
||||
public int[] bottomAccess = new int[] { 9, 10, 11, 12, 13, 14, 15, 16, 17 };
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == 0 ? bottomAccess : topAccess;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack stack, int j) {
|
||||
if(j == 0) return i > 8;
|
||||
return j != 1 && i < 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slot, ItemStack stack) {
|
||||
if(slot > 8) return false;
|
||||
return this.getFrom9(stack) != null || this.getFrom4(stack) != null;
|
||||
}
|
||||
|
||||
protected InventoryCraftingAuto craftingInventory = new InventoryCraftingAuto(3, 3);
|
||||
|
||||
public ItemStack getFrom4(ItemStack ingredient) {
|
||||
this.craftingInventory.clear();
|
||||
this.craftingInventory.setInventorySlotContents(0, ingredient.copy());
|
||||
this.craftingInventory.setInventorySlotContents(1, ingredient.copy());
|
||||
this.craftingInventory.setInventorySlotContents(3, ingredient.copy());
|
||||
this.craftingInventory.setInventorySlotContents(4, ingredient.copy());
|
||||
return getMatch(this.craftingInventory);
|
||||
}
|
||||
|
||||
public ItemStack getFrom9(ItemStack ingredient) {
|
||||
this.craftingInventory.clear();
|
||||
for(int i = 0; i < 9; i++) this.craftingInventory.setInventorySlotContents(i, ingredient.copy());
|
||||
return getMatch(this.craftingInventory);
|
||||
}
|
||||
|
||||
public ItemStack getMatch(InventoryCrafting grid) {
|
||||
for(Object o : CraftingManager.getInstance().getRecipeList()) {
|
||||
IRecipe recipe = (IRecipe) o;
|
||||
|
||||
if(recipe.matches(grid, worldObj)) {
|
||||
return recipe.getCraftingResult(grid);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new ContainerFunnel(player.inventory, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return new GUIFunnel(player.inventory, this);
|
||||
}
|
||||
}
|
||||
@ -352,6 +352,7 @@ container.machineDiesel=Dieselgenerator
|
||||
container.machineElectricBoiler=Elektrischer Ölwärmer
|
||||
container.machineElectrolyser=Electrolysegerät
|
||||
container.machineFEL=FEL
|
||||
container.machineFunnel=Kombinationstrichter
|
||||
container.machineITER=Kernfusionsreaktor
|
||||
container.machineLargeTurbine=Industrielle Dampfturbine
|
||||
container.machineLiquefactor=Verflüssiger
|
||||
@ -4129,6 +4130,8 @@ tile.machine_fluidtank.name=Tank
|
||||
tile.machine_forcefield.name=Kraftfeldgenerator
|
||||
tile.machine_fracking_tower.name=Hydraulischer Frackingturm
|
||||
tile.machine_fraction_tower.name=Fraktionierungsturm
|
||||
tile.machine_funnel.name=Kombinationstrichter
|
||||
tile.machine_funnel.desc=Verbindet Items in einem 2x2 oder 3x3 Craftingfeld$Oben: Input$Unten: Output$Seite: Output für Item-Eingang
|
||||
tile.machine_gascent.name=Gaszentrifuge
|
||||
tile.machine_generator.name=Atomreaktor (Alt)
|
||||
tile.machine_geo.name=Geothermiegenerator
|
||||
|
||||
@ -711,6 +711,7 @@ container.machineDiesel=Diesel Generator
|
||||
container.machineElectricBoiler=Electric Oil Heater
|
||||
container.machineElectrolyser=Electrolysis Machine
|
||||
container.machineFEL=FEL
|
||||
container.machineFunnel=Combinator Funnel
|
||||
container.machineITER=Fusion Reactor
|
||||
container.machineLargeTurbine=Industrial Steam Turbine
|
||||
container.machineLiquefactor=Liquefactor
|
||||
@ -5126,6 +5127,8 @@ tile.machine_fluidtank.name=Tank
|
||||
tile.machine_forcefield.name=Forcefield Emitter
|
||||
tile.machine_fraction_tower.name=Fractioning Tower
|
||||
tile.machine_fracking_tower.name=Hydraulic Fracking Tower
|
||||
tile.machine_funnel.name=Combinator Funnel
|
||||
tile.machine_funnel.desc=Automatically compresses items in a 2x2 or 3x3 crafting grid$Top: Input$Bottom: Output$Side: Output for clearing incredients
|
||||
tile.machine_gascent.name=Gas Centrifuge
|
||||
tile.machine_generator.name=Nuclear Reactor (Old)
|
||||
tile.machine_geo.name=Geothermal Electric Generator
|
||||
|
||||
90
src/main/resources/assets/hbm/models/blocks/funnel.obj
Normal file
@ -0,0 +1,90 @@
|
||||
# Blender v2.79 (sub 0) OBJ File: 'funnel.blend'
|
||||
# www.blender.org
|
||||
o Bottom
|
||||
v -0.250000 0.000000 0.250000
|
||||
v -0.250000 0.000000 -0.250000
|
||||
v 0.250000 0.000000 0.250000
|
||||
v 0.250000 0.000000 -0.250000
|
||||
vt 0.750000 0.750000
|
||||
vt 0.250000 0.250000
|
||||
vt 0.750000 0.250000
|
||||
vt 0.250000 0.750000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
s off
|
||||
f 4/1/1 1/2/1 2/3/1
|
||||
f 4/1/1 3/4/1 1/2/1
|
||||
o Top
|
||||
v -0.500000 1.000000 0.500000
|
||||
v -0.500000 1.000000 -0.500000
|
||||
v 0.500000 1.000000 0.500000
|
||||
v 0.500000 1.000000 -0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 1.000000 0.000000
|
||||
vt -0.000000 1.000000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
s off
|
||||
f 6/5/2 7/6/2 8/7/2
|
||||
f 6/5/2 5/8/2 7/6/2
|
||||
o Side
|
||||
v -0.250000 0.000000 0.250000
|
||||
v -0.500000 1.000000 0.500000
|
||||
v -0.250000 0.000000 -0.250000
|
||||
v -0.500000 1.000000 -0.500000
|
||||
v 0.250000 0.000000 0.250000
|
||||
v 0.500000 1.000000 0.500000
|
||||
v 0.250000 0.000000 -0.250000
|
||||
v 0.500000 1.000000 -0.500000
|
||||
v -0.500000 0.500000 0.500000
|
||||
v -0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 -0.500000
|
||||
v 0.500000 0.500000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt 0.000000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 1.000000 1.000000
|
||||
vt -0.000000 0.500000
|
||||
vt 1.000000 0.500000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 0.000000
|
||||
vt 0.250000 0.000000
|
||||
vt 0.750000 -0.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000000 1.000000
|
||||
vt 0.000097 0.999903
|
||||
vt 0.000097 0.999903
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -0.4472 0.8944
|
||||
vn 0.8944 -0.4472 0.0000
|
||||
vn 0.0000 -0.4472 -0.8944
|
||||
vn -0.8944 -0.4472 0.0000
|
||||
s off
|
||||
f 10/9/3 18/10/3 17/11/3
|
||||
f 12/12/4 19/13/4 18/14/4
|
||||
f 16/15/5 20/16/5 19/17/5
|
||||
f 14/18/6 17/19/6 20/20/6
|
||||
f 20/20/7 9/21/7 13/22/7
|
||||
f 19/17/8 13/23/8 15/24/8
|
||||
f 18/14/9 15/25/9 11/26/9
|
||||
f 17/11/10 11/27/10 9/28/10
|
||||
f 10/9/3 12/29/3 18/10/3
|
||||
f 12/12/4 16/30/4 19/13/4
|
||||
f 16/15/5 14/31/5 20/16/5
|
||||
f 14/18/6 10/32/6 17/19/6
|
||||
f 20/20/7 17/19/7 9/21/7
|
||||
f 19/17/8 20/16/8 13/23/8
|
||||
f 18/14/9 19/13/9 15/25/9
|
||||
f 17/11/10 18/10/10 11/27/10
|
||||
@ -0,0 +1,185 @@
|
||||
# Blender v2.79 (sub 0) OBJ File: 'rail_standard_straight_short.blend'
|
||||
# www.blender.org
|
||||
o Plane.001
|
||||
v -1.000000 0.000000 0.187500
|
||||
v 1.000000 0.000000 0.187500
|
||||
v -1.000000 0.000000 -0.187500
|
||||
v 1.000000 0.000000 -0.187500
|
||||
v -1.000000 0.062500 -0.187500
|
||||
v -1.000000 0.062500 0.187500
|
||||
v 1.000000 0.062500 0.187500
|
||||
v 1.000000 0.062500 -0.187500
|
||||
v -0.812500 0.062500 0.500000
|
||||
v 0.812500 0.062500 0.500000
|
||||
v -0.812500 0.187500 0.500000
|
||||
v 0.812500 0.187500 0.500000
|
||||
v 0.750000 0.062500 0.500000
|
||||
v 0.750000 0.187500 0.500000
|
||||
v -0.750000 0.062500 0.500000
|
||||
v -0.750000 0.187500 0.500000
|
||||
v 0.625000 0.062500 0.062500
|
||||
v 0.937500 0.062500 0.062500
|
||||
v 0.625000 0.062500 -0.062500
|
||||
v 0.937500 0.062500 -0.062500
|
||||
v 0.625000 0.125000 0.062500
|
||||
v 0.937500 0.125000 0.062500
|
||||
v 0.625000 0.125000 -0.062500
|
||||
v 0.937500 0.125000 -0.062500
|
||||
v -0.937500 0.062500 0.062500
|
||||
v -0.625000 0.062500 0.062500
|
||||
v -0.937500 0.062500 -0.062500
|
||||
v -0.625000 0.062500 -0.062500
|
||||
v -0.937500 0.125000 0.062500
|
||||
v -0.625000 0.125000 0.062500
|
||||
v -0.937500 0.125000 -0.062500
|
||||
v -0.625000 0.125000 -0.062500
|
||||
v -0.812500 0.062500 -0.500000
|
||||
v 0.812500 0.062500 -0.500000
|
||||
v -0.812500 0.187500 -0.500000
|
||||
v 0.812500 0.187500 -0.500000
|
||||
v 0.750000 0.062500 -0.500000
|
||||
v 0.750000 0.187500 -0.500000
|
||||
v -0.750000 0.062500 -0.500000
|
||||
v -0.750000 0.187500 -0.500000
|
||||
vt 0.218750 1.000000
|
||||
vt 0.406250 0.000000
|
||||
vt 0.406250 1.000000
|
||||
vt -0.000000 0.000000
|
||||
vt 0.187500 1.000000
|
||||
vt -0.000000 1.000000
|
||||
vt 0.406250 0.031250
|
||||
vt 0.593750 -0.000000
|
||||
vt 0.593750 0.031250
|
||||
vt 0.218750 1.000000
|
||||
vt 0.187500 -0.000000
|
||||
vt 0.218750 -0.000000
|
||||
vt 0.593750 -0.000000
|
||||
vt 0.406250 0.031250
|
||||
vt 0.187500 0.000000
|
||||
vt 0.218750 0.000000
|
||||
vt 0.500000 0.156250
|
||||
vt 0.437500 0.656250
|
||||
vt 0.437500 0.156250
|
||||
vt 0.593750 0.656250
|
||||
vt 0.531250 0.156250
|
||||
vt 0.593750 0.156250
|
||||
vt 0.531250 0.718750
|
||||
vt 0.500000 0.656250
|
||||
vt 0.531250 0.656250
|
||||
vt 0.406250 0.156250
|
||||
vt 0.531250 0.656250
|
||||
vt 0.500000 0.156250
|
||||
vt 0.531250 0.156250
|
||||
vt 0.500000 0.656250
|
||||
vt 0.531250 0.718750
|
||||
vt 0.500000 0.718750
|
||||
vt 0.437500 0.062500
|
||||
vt 0.406250 0.125000
|
||||
vt 0.406250 0.062500
|
||||
vt 0.437500 0.125000
|
||||
vt 0.593750 0.156250
|
||||
vt 0.437500 0.156250
|
||||
vt 0.593750 0.062500
|
||||
vt 0.437500 0.031250
|
||||
vt 0.593750 0.031250
|
||||
vt 0.593750 0.125000
|
||||
vt 0.625000 0.062500
|
||||
vt 0.625000 0.125000
|
||||
vt 0.437500 0.062500
|
||||
vt 0.406250 0.125000
|
||||
vt 0.406250 0.062500
|
||||
vt 0.437500 0.125000
|
||||
vt 0.593750 0.156250
|
||||
vt 0.437500 0.156250
|
||||
vt 0.593750 0.062500
|
||||
vt 0.437500 0.031250
|
||||
vt 0.593750 0.031250
|
||||
vt 0.593750 0.125000
|
||||
vt 0.625000 0.062500
|
||||
vt 0.625000 0.125000
|
||||
vt 0.406250 0.156250
|
||||
vt 0.437500 0.656250
|
||||
vt 0.406250 0.656250
|
||||
vt 0.437500 0.156250
|
||||
vt 0.500000 0.656250
|
||||
vt 0.531250 0.656250
|
||||
vt 0.500000 0.656250
|
||||
vt 0.593750 0.156250
|
||||
vt 0.593750 0.656250
|
||||
vt 0.531250 0.656250
|
||||
vt 0.500000 0.718750
|
||||
vt 0.500000 0.656250
|
||||
vt 0.531250 0.718750
|
||||
vt 0.500000 0.656250
|
||||
vt 0.531250 0.656250
|
||||
vt 0.406250 -0.000000
|
||||
vt 0.187500 1.000000
|
||||
vt 0.593750 0.031250
|
||||
vt 0.500000 0.718750
|
||||
vt 0.406250 0.656250
|
||||
vt 0.531250 0.656250
|
||||
vt 0.531250 0.718750
|
||||
vt 0.500000 0.718750
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
s off
|
||||
f 3/1/1 2/2/1 1/3/1
|
||||
f 7/4/2 5/5/2 6/6/2
|
||||
f 1/7/3 5/8/3 3/9/3
|
||||
f 2/10/4 6/11/4 1/12/4
|
||||
f 4/13/5 7/14/5 2/2/5
|
||||
f 3/1/6 8/15/6 4/16/6
|
||||
f 36/17/5 10/18/5 34/19/5
|
||||
f 13/20/3 38/21/3 37/22/3
|
||||
f 12/23/4 13/24/4 10/25/4
|
||||
f 10/18/1 37/26/1 34/19/1
|
||||
f 11/27/2 40/28/2 35/29/2
|
||||
f 9/30/4 16/31/4 11/32/4
|
||||
f 21/33/3 19/34/3 17/35/3
|
||||
f 23/36/6 20/37/6 19/38/6
|
||||
f 22/39/4 17/40/4 18/41/4
|
||||
f 24/42/5 18/43/5 20/44/5
|
||||
f 21/33/2 24/42/2 23/36/2
|
||||
f 29/45/3 27/46/3 25/47/3
|
||||
f 31/48/6 28/49/6 27/50/6
|
||||
f 30/51/4 25/52/4 26/53/4
|
||||
f 32/54/5 26/55/5 28/56/5
|
||||
f 29/45/2 32/54/2 31/48/2
|
||||
f 33/57/1 15/58/1 9/59/1
|
||||
f 39/60/5 16/61/5 15/58/5
|
||||
f 36/17/2 14/62/2 12/63/2
|
||||
f 11/27/3 33/64/3 9/65/3
|
||||
f 33/66/6 40/67/6 39/68/6
|
||||
f 38/69/6 34/70/6 37/71/6
|
||||
f 3/1/1 4/16/1 2/2/1
|
||||
f 7/4/2 8/15/2 5/5/2
|
||||
f 1/7/3 6/72/3 5/8/3
|
||||
f 2/10/4 7/73/4 6/11/4
|
||||
f 4/13/5 8/74/5 7/14/5
|
||||
f 3/1/6 5/5/6 8/15/6
|
||||
f 36/17/5 12/63/5 10/18/5
|
||||
f 13/20/3 14/62/3 38/21/3
|
||||
f 12/23/4 14/75/4 13/24/4
|
||||
f 10/18/1 13/76/1 37/26/1
|
||||
f 11/27/2 16/61/2 40/28/2
|
||||
f 9/30/4 15/77/4 16/31/4
|
||||
f 21/33/3 23/36/3 19/34/3
|
||||
f 23/36/6 24/42/6 20/37/6
|
||||
f 22/39/4 21/33/4 17/40/4
|
||||
f 24/42/5 22/39/5 18/43/5
|
||||
f 21/33/2 22/39/2 24/42/2
|
||||
f 29/45/3 31/48/3 27/46/3
|
||||
f 31/48/6 32/54/6 28/49/6
|
||||
f 30/51/4 29/45/4 25/52/4
|
||||
f 32/54/5 30/51/5 26/55/5
|
||||
f 29/45/2 30/51/2 32/54/2
|
||||
f 33/57/1 39/60/1 15/58/1
|
||||
f 39/60/5 40/28/5 16/61/5
|
||||
f 36/17/2 38/21/2 14/62/2
|
||||
f 11/27/3 35/29/3 33/64/3
|
||||
f 33/66/6 35/78/6 40/67/6
|
||||
f 38/69/6 36/79/6 34/70/6
|
||||
10019
src/main/resources/assets/hbm/models/bombs/gadget.obj
Normal file
8226
src/main/resources/assets/hbm/models/weapons/lilmac.obj
Normal file
@ -201,6 +201,7 @@
|
||||
"weapon.coilgunShoot": {"category": "player", "sounds": [{"name": "weapon/coilgunShoot", "stream": false}]},
|
||||
"weapon.glReload": {"category": "player", "sounds": [{"name": "weapon/glReload", "stream": false}]},
|
||||
"weapon.glShoot": {"category": "player", "sounds": [{"name": "weapon/glShoot", "stream": false}]},
|
||||
"weapon.44Shoot": {"category": "player", "sounds": [{"name": "weapon/44Shoot", "stream": false}]},
|
||||
|
||||
"weapon.dFlash": {"category": "player", "sounds": [{"name": "weapon/dFlash", "stream": false}]},
|
||||
|
||||
|
||||
BIN
src/main/resources/assets/hbm/sounds/weapon/44Shoot.ogg
Normal file
BIN
src/main/resources/assets/hbm/textures/blocks/machine_funnel.png
Normal file
|
After Width: | Height: | Size: 263 B |
|
After Width: | Height: | Size: 304 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 316 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 33 KiB |
BIN
src/main/resources/assets/hbm/textures/models/bombs/gadget.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 11 KiB |
BIN
src/main/resources/assets/hbm/textures/models/weapons/lilmac.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 849 B |