VikeStep/sprinkles_for_vanilla

Beacon Base Block configuration

Closed this issue · 5 comments

Ideally you'd want to inject a handler into the start of Blocks.isBeaconBase

It would be pretty easy, just inject
return Hooks.isBeaconBase(this, worldObj, x, y, z, beaconX, beaconY, beaconZ, oldReturn);
before any other return statements in the method and then have something like:

public static boolean isBeaconBase(Block block, IBlockAccess worldObj, int x, int y, int z, int beaconX, int beaconY, int beaconZ, boolean oldReturn)
{
if (whitelist.contains(block, worldObj.getBlockMetadata(x,y,z)) return true;
if (blacklist.contains(block, worldObj.getBlockMetadata(x,y,z)) return false;
return oldReturn;
}

with some sort of BlockWithMetadata class

I am kinda busy atm or I'd PR it properly - but I will if you would like

I'm not entirely sure what feature you are asking for. Mind elaborating?

To be able to define and remove blocks as valid beacon base blocks

Oh. facepalms. I think I'll start working on this now

Awesome :D
Sorry for the possibly over-technical original post, I had a good look into the feasibility of it before I bothered with submitting it as an issue and when I've been thinking about a problem I tend to assume everyone has been thinking about the same thing which leads me to skip the first 5 steps in an explanation ^^

Done in the latest update, thanks for the suggestion :)