mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-24 05:44:32 +00:00
Drastically improve the Teleposer Blacklist
It now functions correctly. Only downside to this is that currently using the wildcard value of `*` does not work. Need to figure out how to cleanly do that.
This commit is contained in:
1 parent
4a86518366
commit
250debb604
3 files changed
+143
-33
No files matched your search
@@ -0,0 +1,47 @@
|
||||
package WayofTime.alchemicalWizardry.api;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
/**
|
||||
* A Block with a set metadata. Similar to an ItemStack.
|
||||
*/
|
||||
public class BlockStack {
|
||||
|
||||
private Block block;
|
||||
private int meta;
|
||||
|
||||
public BlockStack(Block block, int meta) {
|
||||
this.block = block;
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
public BlockStack(Block block) {
|
||||
this(block, 0);
|
||||
}
|
||||
|
||||
public Block getBlock() {
|
||||
return block;
|
||||
}
|
||||
|
||||
public int getMeta() {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return GameData.getBlockRegistry().getNameForObject(block) + ":" + meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
BlockStack blockStack = (BlockStack) obj;
|
||||
|
||||
return blockStack.block == this.getBlock() && blockStack.meta == this.getMeta();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user