Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Missing TileEntity Mappings?


atrain99
 Share

Recommended Posts

I get this when I run my solar panel add-on.

 

java.lang.RuntimeException: class net.minecraft.src.GreenEnergy.Solar.TileEntitySolar is missing a mapping! This is a bug!

at net.minecraft.src.TileEntity.writeToNBT(TileEntity.java:70)

at net.minecraft.src.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:270)

at net.minecraft.src.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:107)

at net.minecraft.src.ChunkProvider.saveChunkData(ChunkProvider.java:183)

at net.minecraft.src.ChunkProvider.saveChunks(ChunkProvider.java:231)

at net.minecraft.src.World.saveWorld(World.java:521)

at net.minecraft.src.World.tick(World.java:2817)

at net.minecraft.client.Minecraft.runTick(Minecraft.java:1873)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:822)

at net.minecraft.client.Minecraft.run(Minecraft.java:750)

at java.lang.Thread.run(Unknown Source)

 

I have no idea what's wrong.

BlockSolarPanel.java:

 

package net.minecraft.src.GreenEnergy.Solar;

 

import java.util.ArrayList;

 

import net.minecraft.src.*;

import net.minecraft.src.forge.*;

 

public class BlockSolarPanel extends BlockContainer implements ITextureProvider {

@Override

public String getTextureFile() {

return "/GreenEnergy/textures/blocks.png";

}

public BlockSolarPanel(int par1) {

super(par1, Material.iron);

        this.setBlockBounds(0, 0, 0, 1.0F, 0.3F, 1.0F);

}

 

@Override

public TileEntity getBlockEntity(int meta)

    {

return new TileEntitySolar();

    }

@Override

public TileEntity getBlockEntity() {

return null;

}

public int getBlockTexture(IBlockAccess par1IBlockAccess, int x, int y, int z, int side)

    {

   

    TileEntity blockEntity = par1IBlockAccess.getBlockTileEntity(x, y, z);

    int meta = par1IBlockAccess.getBlockMetadata(x, y, z);

    if(meta == 0)

    {

    if(side == 1)

    {

    return 0;

    }

    else

    {

    return 1;

    }

    }

return 1;

    }

  public boolean renderAsNormalBlock()

    {

        return false;

    }

  public boolean isOpaqueCube()

    {

        return false;

    }

  public void addCreativeItems(ArrayList items){

  items.add(new ItemStack(this,1));

  }

}

 

 

TileEntitySolar.java:

 

package net.minecraft.src.GreenEnergy.Solar;

import net.minecraft.src.*;

import net.minecraft.src.forge.*;

import net.minecraft.src.universalelectricity.*;

public class TileEntitySolar extends TileEntity implements UEIProducer{

boolean powerOn;

int ticks;

public void updateEntity()

    {   

    if(this.worldObj.isDaytime() && this.worldObj.canBlockSeeTheSky(this.xCoord, this.yCoord + 1, this.zCoord))

    {

    powerOn = true;

    }

    else

    {

    powerOn = false;

    }

if(ticks == 20)

{

ticks = 0;

}

else

{

ticks++;

}

    }  

   

@Override

public int onProduceElectricity(int maxWatts, int voltage, byte side) {

// TODO Auto-generated method stub

return 20;

}

 

@Override

public boolean canProduceElectricity(byte side) {

if(side == 0){

return true;

}

return false;

}

 

@Override

public int getVolts() {

return 25;

}

public boolean canUpdate()

      {

        return true;

      }

public boolean canConnect(byte side) {

if(side == 0)

{

return true;

}

return false;

}

 

}

 

 

Please explain what the missing mapping is so I can release this mod. Thanks!

Also, how do I extract my classes and stuff from the jar to distribute?

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

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