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

pos1.getX()

or someting like that. It REALLY isn't hard to figure this out by yourself.

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/

  • Author

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.

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/

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.

  • Author

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.

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.