Jump to content

tattyseal

Forge Modder
  • Posts

    194
  • Joined

  • Last visited

Posts posted by tattyseal

  1. You need to install the small boats mod on your server. The minimap works because it is client only mod, which means it works on your minecraft and no-one else can see it or has to use it to go on your server. But the Small Boats mod is server and client so you have to install forge on your server and install Small Boats Mod.

     

    -Toby

  2. In your constructor for your block

    This thing:

     

     

    public BlockCable(int id, Material mat)

    {

    super(id, mat);

    this.needsRandomTick = true;

    setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F);

    }

     

     

     

    add this to it: setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F);

     

    The numbers are (minX, minY, minZ, maxX, maxY, maxZ)

     

    and then in the class add

     

    public boolean isOpaqueCube()

    {

    return false;

    }

     

    Hope this helps

  3. Hello,

     

    I am trying to make cables for my mod Electricraft.

     

    I have it set up to where the block detects if there is cables around it but I don't know how to detect if energy is needed and get energy from the other cables in the network

     

    Block Code:

     

     

    package com.electricraft.core.block;

     

    import java.util.Random;

     

    import net.minecraft.block.BlockContainer;

    import net.minecraft.block.material.Material;

    import net.minecraft.tileentity.TileEntity;

    import net.minecraft.world.World;

     

    public class BlockCable extends BlockContainer

    {

    public BlockCable(int id, Material mat)

    {

    super(id, mat);

    this.needsRandomTick = true;

    }

     

    public void randomDisplayTick(World w, int x, int y, int z, Random r)

    {

     

    TileEntityCable below;

    if(w.getBlockTileEntity(x, y-1, z) instanceof TileEntityCable)

    {

    below = (TileEntityCable) w.getBlockTileEntity(x, y-1, z);

    }

     

    TileEntityCable above;

    if(w.getBlockTileEntity(x, y+1, z) instanceof TileEntityCable)

    {

    above = (TileEntityCable) w.getBlockTileEntity(x, y+1, z);

    }

     

    TileEntityCable plusX;

    if(w.getBlockTileEntity(x+1, y, z) instanceof TileEntityCable)

    {

    plusX = (TileEntityCable) w.getBlockTileEntity(x+1, y, z);

    }

     

    TileEntityCable minusX;

    if(w.getBlockTileEntity(x-1, y, z) instanceof TileEntityCable)

    {

    minusX = (TileEntityCable) w.getBlockTileEntity(x-1, y, z);

    }

     

    TileEntityCable plusZ;

    if(w.getBlockTileEntity(x, y, z+1) instanceof TileEntityCable)

    {

    plusZ = (TileEntityCable) w.getBlockTileEntity(x, y, z+1);

    }

     

    TileEntityCable minusZ;

    if(w.getBlockTileEntity(x, y, z-1) instanceof TileEntityCable)

    {

    minusZ = (TileEntityCable) w.getBlockTileEntity(x, y, z-1);

    }

    }

     

    public TileEntity createNewTileEntity(World w)

    {

    return new TileEntityCable();

    }

     

    }

     

     

     

     

    Tile Entity Code:

     

     

    package com.electricraft.core.block;

     

    import net.minecraft.nbt.NBTTagCompound;

    import net.minecraft.tileentity.TileEntity;

     

    public class TileEntityCable extends TileEntity

    {

    public boolean isEnergyRequired;

    public boolean hasEnergy;

     

     

    public void readFromNBT(NBTTagCompound nbt)

    {

     

    }

     

    public void writeToNBT(NBTTagCompound nbt)

    {

     

    }

     

    }

     

     

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.