sprinkles_for_vanilla

sprinkles_for_vanilla

601k Downloads

Beacon Base Block configuration

hilburn opened this issue ยท 5 comments

commented

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

commented

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

commented

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

commented

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

commented

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

commented

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 ^^