Jump to content

[solver] More beacon pyramid blocks


ezeglace

Recommended Posts

*opens Block.java*

 

 

/**
     * Determines if this block can be used as the base of a beacon.
     *
     * @param world The current world
     * @param x X Position
     * @param y Y Position
     * @param z Z position
     * @param beaconX Beacons X Position
     * @param beaconY Beacons Y Position
     * @param beaconZ Beacons Z Position
     * @return True, to support the beacon, and make it active with this block.
     */
    public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ)
    {
        return (blockID == blockEmerald.blockID || blockID == blockGold.blockID || blockID == blockDiamond.blockID || blockID == blockIron.blockID);
    }

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

Ok so here is what i've got

public boolean isBeaconBase; {
    return (blockID == PureBlock.blockID || blockID == RubyBlock.blockID || blockID == SapphireBlock.blockID);
}

but i am getting errors at the blockID's just before ==

Link to comment
Share on other sites

I know HOW to override a method the problem is WHAT i have to override

really, are you sure

 

public boolean isBeaconBase; {
    return (blockID == PureBlock.blockID || blockID == RubyBlock.blockID || blockID == SapphireBlock.blockID);
}

thats not overriding a method

 

generic method

 

accessibility [static] [final] returnType methodname(arguments){
method body
}

 

public boolean isBeaconBase; {
    return (blockID == PureBlock.blockID || blockID == RubyBlock.blockID || blockID == SapphireBlock.blockID);
}

 

*input the "method" in my magic code claner/fixer/transformer*

public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
    return (blockID == PureBlock.blockID || blockID == RubyBlock.blockID || blockID == SapphireBlock.blockID);
}

 

*relive ancient times*

override

isBeaconBase

and return true

 

*second pass of magic transformation*

 

@Override
public boolean isBeaconBase(World worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ) {
    return true;
}

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

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.