MC Modding
Please register and join the community!


Join the forum, it's quick and easy

MC Modding
Please register and join the community!
MC Modding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[answered] Help with crashing

3 posters

MC Modding :: Help :: Help

Go down

[answered] Help with crashing Empty [answered] Help with crashing

Post by the undecided t Thu Oct 20, 2011 9:57 pm

I made a block using your tutorial and it is supposed to heal you. but when i touch it, it changes minecraft to a saving chunks screen and then minecraft crashes. why is this?

Admin Edit: Please use proper topic format. I'll fix for you.


Last edited by the undecided t on Mon Oct 24, 2011 2:55 pm; edited 1 time in total
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by Static_boy123 Thu Oct 20, 2011 10:15 pm

Please post code and error. In order to get the error run minecraft in error mode.
Static_boy123
Static_boy123
Helper

Posts : 32
Join date : 2011-10-19
Age : 24
Location : Eclipse Indigo

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by the undecided t Fri Oct 21, 2011 2:21 am

it doesnt give me an error when i start it would error mode still work?

Code:
package net.minecraft.src;
 
import java.util.Random;
 
public class Blockcocopad extends Block
{
 
    public Blockcocopad(int i, int j)
    {
        super(i, j, Material.iron);           
    }
    public int idDropped(int i, Random random)
    {
      return mod_Coco.cocopad.blockID;
    }
    public int quantityDropped(Random random)
    {
            return 0;
    }
    public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
    {
        float f = 0.0625F;
        return AxisAlignedBB.getBoundingBoxFromPool((float)i + f, j, (float)k + f, (float)(i + 1) - f, (float)(j + 1) - f, (float)(k + 1) - f);
    }
    public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int i, int j, int k)
    {
        float f = 0.0625F;
        return AxisAlignedBB.getBoundingBoxFromPool((float)i + f, j, (float)k + f, (float)(i + 1) - f, j + 1, (float)(k + 1) - f);
    }
    public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
    {
        entity.attackEntityFrom(null, -1);
    }
}
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by the undecided t Fri Oct 21, 2011 3:32 am

here is the error --- BEGIN ERROR REPORT 37488 --------
Generated 10/20/11 8:29 PM

Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Mobile Intel(R) 4 Series Express Chipset Family version 2.1.0 - Build 8.15.10.1883, Intel

java.lang.NullPointerException
at net.minecraft.src.EntityPlayer.attackEntityFrom(EntityPlayer.java:594)
at net.minecraft.src.Blockcocopad.onEntityCollidedWithBlock(Blockcocopad.java:32)
at net.minecraft.src.Entity.moveEntity(Entity.java:506)
at net.minecraft.src.EntityPlayerSP.moveEntity(EntityPlayerSP.java:44)
at net.minecraft.src.EntityLiving.moveEntityWithHeading(EntityLiving.java:600)
at net.minecraft.src.EntityPlayer.moveEntityWithHeading(EntityPlayer.java:1056)
at net.minecraft.src.EntityLiving.onLivingUpdate(EntityLiving.java:753)
at net.minecraft.src.EntityPlayer.onLivingUpdate(EntityPlayer.java:353)
at net.minecraft.src.EntityPlayerSP.onLivingUpdate(EntityPlayerSP.java:193)
at net.minecraft.src.EntityLiving.onUpdate(EntityLiving.java:255)
at net.minecraft.src.EntityPlayer.onUpdate(EntityPlayer.java:163)
at net.minecraft.src.World.updateEntityWithOptionalForce(World.java:1558)
at net.minecraft.src.World.updateEntity(World.java:1534)
at net.minecraft.src.World.updateEntities(World.java:1442)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1157)
at net.minecraft.client.Minecraft.run(Minecraft.java:483)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 20dfe49b ----------
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Fri Oct 21, 2011 4:39 am

You`re the guy working on Cocosmackdowns mod Neutral.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by the undecided t Fri Oct 21, 2011 4:41 am

that would be a yes... These are the tuts i have been using the whole time. Thanks for recognizing me
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Fri Oct 21, 2011 5:41 am

Edit: ignore this


Last edited by breakyorself on Fri Oct 21, 2011 6:38 am; edited 1 time in total
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Fri Oct 21, 2011 6:34 am

Blockcocopad.class =
Code:
package net.minecraft.src;

import java.util.Random;

public class Blockcocopad extends Block
{

    public Blockcocopad (int i, int j)
    {
        super(i, j, Material.ground);     
    }
    public int idDropped(int i, Random random)
    {
      return mod_cocopad.Namehere.blockID;
    }
    public void onEntityWalking(World world, int x, int y, int z, Entity entity)    {
       entity.motionY += 5.0;   
       }
    public int quantityDropped(Random random)
    {
            return 3;
    }
}
 
mod_cocopad.class
Code:
package net.minecraft.src;

public class mod_cocopad extends BaseMod
{
  public static Block Namehere = new Blockcocopad(190, 0).setHardness(1.0F).setResistance(6000.0F).setLightValue(1.0F).setBlockName("Namehere");
 
  public String Version()
  {
      return "1.8.1";
  }
 
  public mod_cocopad()
  {
      ModLoader.RegisterBlock(Namehere);
      Namehere.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/cocopad.png");
      ModLoader.AddName(Namehere, "Namehere");
      ModLoader.AddRecipe(new ItemStack(Namehere, 1), new Object[] {
      "###", "###", "###", Character.valueOf('#'), Block.dirt
      });
  }
}
 
Change anything from the how far you jump to recipe to how many blocks it drops. I don`t know if its any diff from yours but i tested it and it works.
Plus if it works can i get credit for fixing the bug :3.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by the undecided t Fri Oct 21, 2011 6:47 am

How would i set it to heal though. i am trying to make it heal not bouncy.
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Sat Oct 22, 2011 1:01 am

fail Neutral. I thought it was the pad you jumped on cause coco said you get saving chunks if you step on it.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by the undecided t Sat Oct 22, 2011 1:28 am


it is... its gonna allow you to bounce... I might just ditch the healing idea.
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Sat Oct 22, 2011 2:24 am

I`ll try and get some fixed code.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Sat Oct 22, 2011 2:40 am

Code:
    public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
    {
     entity.attackEntityFrom(DamageSource.func_35524_a(entity, entity), -4);
    }
 
Use that code to heal i`ve tested it. the -4 is how many half hearts it heals.
Note that it does make the noise like you get hurt but it heals you. You can change this by changing the function from DamageSource.
This goes in Blocknamehere
If you use this in mod can i get credit for fixing it?
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by the undecided t Sat Oct 22, 2011 3:39 am

ya sure
the undecided t
the undecided t
Helper

Posts : 45
Join date : 2011-10-20
Age : 27

http://www.blacklistgaming.org/forums

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by breakyorself Mon Oct 24, 2011 5:22 am

You still keeping the healing thing in the mod?
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

[answered] Help with crashing Empty Re: [answered] Help with crashing

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

MC Modding :: Help :: Help

 
Permissions in this forum:
You cannot reply to topics in this forum