Jump to content

khm

Members
  • Posts

    12
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

khm's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. i am admittedly not too familiar with this method of gui handling, but the first thing i notice is there isn't a gui anywhere in your code, at-least as far as i can tell, and the line that registers your gui handler is commented out. also you have a lot of code there that isn't relevant to the problem at hand and it makes picking though it to help you unnecessarily time consuming.
  2. i'm guessing from the pm you sent me that you don't have your TileEntity set up properly. for starters the class you put it in needs to extend TileEntity. public class CustomTileEntity extends TileEntity { @Override public void updateEntity() { //your code here } } and then your bock needs to tell minecraft that it has a TileEntity public class BlockCustom extends Block implements ITileEntityProvider { @Override public TileEntity createNewTileEntity(World par1World) { return new CustomTileEntity(); } } and then you need to register your TileEntity @Init public void load(FMLInitializationEvent event) { //some code GameRegistry.registerTileEntity(CustomTileEntity.class, "CustomTileEntity"); //some more code }
  3. how the heck did i miss that? well thank you for the help
  4. i'm afraid running that in the updateEntity function of a TileEntity is the only way i know of to find entities outside the space your block occupies. as for pushing entities, i have never tried it before but the first thing that comes to mind is just simply adding some number to the posY of the entity: @Override public void updateEntity() { List list = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox((float) (xCoord -9), (float) yCoord, (float) (zCoord - 9), (float) (xCoord + 11), (float) (yCoord + 11), (float) (zCoord + 11))); for(int i=0; i < list.size(); i++) { Entity e = (Entity) list.get(i); e.posY += 0.1D; } }
  5. unfortunately (as far as i know) it is not possible to make a collation box that extends outside of your cubic meter box as that the collation detection function will not even look at your collation box unless the entity is colliding with the cubic meter space assigned to your block. so to check for entities outside this area, you have to manually call collision detection every tick or so.
  6. did you set the RenderId in your custome renderer? private int RenderId = RenderingRegistry.getNextAvailableRenderId(); @Override public int getRenderId() { return RenderId; } register the renderer in your ClientProxy? RenderingRegistry.registerBlockHandler(CustomRender); and set the render type of your block? setRenderType(ClientProxy.CustomRender.getRenderId());
  7. List list = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox((float) xCoord, (float) yCoord, (float) zCoord, (float) (xCoord + 1), (float) (yCoord + 2), (float) (zCoord + 1))); that should give you a list of every entity in or above your TileEntity, shouldn't be too difficult to modify it to do what you need. i recommend you change the Entity.class part to something more specific.
  8. my mod needs to save extra data to a file with the currently loaded game, currently how i am getting the path is: ISaveHandler SH = world.getSaveHandler(); File file = new File(Minecraft.getMinecraftDir().getCanonicalPath() + "/saves/" + SH.getSaveDirectoryName() + "/data"); but unfortunately that only works client side
  9. i was hopping there was something in the code that i missed since making players use that work around feels kind of iffy, but thanks for trying to help.
  10. the cart already moves over it the way i want it to, the problem is the rails next to it are not connecting. i would add a screen shot showing the problem, but i keep getting an error. edit: if you place the junction and then put a track north and south of it then place two more east and west of it. the ones on the east and west sides will not connect to the junction.
  11. the problem is that it doesn't connect to all 4 directions, it will only connect to 2, i want it to connect to all 4.
  12. i am trying to make a diamond junction rail connect to all the rails around it. i have been picking though BlockBaseRailLogic and can't seem to come up with a way to trick it into connecting to more then 2 rails. i know it has been done before by other mods, but can't figure out how.
×
×
  • Create New...

Important Information

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