Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

  • Author

Please remove this topic! I solved the problem!

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

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.