Ore Stone Variants

Ore Stone Variants

1M Downloads

Normal redstone spam

pupnewfster opened this issue ยท 6 comments

commented

I decided to open an issue for this as I have managed to track down WHAT causes it to go off even though I am not sure where it happens in the code.

Every time that I look at a non lit redstone ore_stone_variant ore it fires the message until I stop looking at the block.

commented

Damn, really? I never noticed. I'm not even aware of any methods in Block that run when blocks are looked at, but that does help. I'll look at it. I guess I could always just disable it, but it's there for a reason. It's supposed to indicate that something is happening when it should not.

Edit: I tested and could not reproduce. Like I said, I've definitely seen it before, but not recently. This must be an interaction with some other mod you're using. Unfortunately, I don't know enough about most of those mods to imagine why they would trigger. I could try adding print lines to every method in the class that calls the function to at least see which parent function is partly responsible, but it would help a lot if we knew which mod was doing it, if any in particular.

commented

Not sure, the majority of ores I use are dynamicly created ones but it happens with the vanilla ores also. The only other thing I can think of that MAY be calling some method for blocks when looking at them is I use The One Probe which is like WAILA for showing what block someone is looking at.

Edit: I will try opening it without TOP enabled and see if that stops it from happening.

commented

Tried it. That was it. Let me run their mod through a decompiler or something and see if I can figure it out.

commented

If you mean run TOP through a decompiler you could just look here https://github.com/McJtyMods/TheOneProbe as it is open source.

commented

I also noticed it happening with other blocks. Took a look at the different probe info classes and didn't see anything unusual. Decided to take another peek at BlockOresBase and saw this:

private IBlockState ensureNormalRedstone(int meta)
{
	if (getNormalRedstoneVariant() != null)
	{
		return getNormalRedstoneVariant();
	}
		
	return this.getStateFromMeta(meta);
}

Turns out, that was it. Replacing getNormalRedstoneVariant() with isLitRedstone() fixed the issue for me. Not sure why I wrote it that way, I guess.

Edit: okay, clearly I don't understand GitHub's markdown.
Edit 2: Fixed the formatting. Needed a multi-line key.

commented

Closing this given it is fixed in the next version as I no longer experience this with the test build you sent me.