Jump to content

Recommended Posts

Posted

getBlockState() requires 1 BlockPos while createExplosion requires 3 int and I have no idea how to do that.

 

BlockPos.x?  Jesus.

It might be xpos, or posx, I haven't actually used 1.8 yet, but I can't imagine its that difficult.

 

public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1)

This makes the @Override work and the rail itself works. However when i pass over the rail the game crashes.

 

worldObj.createExplosion(cart, x, y, z, 0.3F, false);
          worldObj.newExplosion(cart, x, y, z, 3.5F, true, true);

 

createExplosion require 3 int meaning "int x, int y, int z"

 public Explosion createExplosion(Entity p_72876_1_, double p_72876_2_, double p_72876_4_, double p_72876_6_, float p_72876_8_, boolean p_72876_9_)

 

If i write this, the @Override and the rail properties dont work at all. But it doesnt show any errors.

public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1, int x,int y, int z)

 

I need these "int x, int y, int z" to become "BlockPos x, BlockPos y, BlockPos z" or something like that but then 

if (worldObj.[b]getBlockState(pos1)[/b].getBlock() == ERMBase.armedRail)
        {
            IBlockState blockMetaData = worldObj.[b]getBlockState(pos1)[/b];

these 2 things dont work.

Posted

getBlockState() requires 1 BlockPos while createExplosion requires 3 int and I have no idea how to do that.

 

BlockPos.x?  Jesus.

It might be xpos, or posx, I haven't actually used 1.8 yet, but I can't imagine its that difficult.

 

public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1)

This makes the @Override work and the rail itself works. However when i pass over the rail the game crashes.

 

worldObj.createExplosion(cart, x, y, z, 0.3F, false);
          worldObj.newExplosion(cart, x, y, z, 3.5F, true, true);

 

createExplosion require 3 int meaning "int x, int y, int z"

 public Explosion createExplosion(Entity p_72876_1_, double p_72876_2_, double p_72876_4_, double p_72876_6_, float p_72876_8_, boolean p_72876_9_)

 

If i write this, the @Override and the rail properties dont work at all. But it doesnt show any errors.

public void onMinecartPass(World worldObj, EntityMinecart cart, BlockPos pos1, int x,int y, int z)

 

I need these "int x, int y, int z" to become "BlockPos x, BlockPos y, BlockPos z" or something like that but then 

if (worldObj.[b]getBlockState(pos1)[/b].getBlock() == ERMBase.armedRail)
        {
            IBlockState blockMetaData = worldObj.[b]getBlockState(pos1)[/b];

these 2 things dont work.

No you don't! The BlockPos class has methods to get the x/y/z variables! Use those! No need for "BlockPos x, BlockPos y, BlockPos z"!

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Basic.  Fucking.  Java.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Did some of the comments get deleted?

 

Anyway if I change :

int i1 = par1World.getBlockMatedata(x, y, z);

to

IBlockState i1 = par1World.getBlockState(pos);

 

public void onNeighborBlockChange(World par1World, BlockPos pos, Block par5)
    {
        if (!par1World.isRemote)
        {
            IBlockState i1 = par1World.getBlockState(pos);
            IBlockState j1 = i1;

            //if (this.isPowered)
            if (this.isPowered())
            {
                j1 = i1 & 7;
            }

 

this.isPowered() is still not working - It says that it is unidentified.

and j1 = i1 & 7 isnt working. It says "The operator & is unidentified for argument type IBlockState, int

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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