Golems with this core just simply ignore all GregTech trees, making sweet infinite willow source impossible, at least with golems.
Wait how does Thaumcraft do Forestry Trees and such then?! I need to take a look at that.
The golem AI uses the Util.isWoodLog
function to determine if it can chop it, that function is:
public static boolean isWoodLog(IBlockAccess world, int x, int y, int z) {
Block bi = world.getBlock(x, y, z);
int md = world.getBlockMetadata(x, y, z);
return bi == Blocks.air?false:(bi.canSustainLeaves(world, x, y, z)?true:ItemElementalAxe.oreDictLogs.contains(Arrays.asList(new Object[]{bi, Integer.valueOf(md)})));
}
So if the block.canSustainLeaves
is true then it can, else if the ItemElementalAxe.oreDictLogs
contains the block and metadata (which is a public static field that you can add your own things to) then it can as well.
It says oreDictLogs as name of the List, why doesnât it accept my Logs then?
Good question, itâs only filled in TC by:
if(ore.equals("woodLog")) {
for(ItemStack is : OreDictionary.getOres(ore)) {
ItemElementalAxe.oreDictLogs.add(Arrays.asList(new Integer[]{Integer.valueOf(Item.getIdFromItem(is.getItem())), Integer.valueOf(is.getItemDamage())}));
}
}
So if your wood is oredictâd as woodLog
then it should work too?
Although if your wood returns true
for block.canSustainLeaves
then it should work as well.
What the actual fuck. The OreDict for Logs is âlogWoodâ not âwoodLogâ
Itâs TC, what do you expect?
But still, does your wood not return true
for the block.canSustainLeaves
call?
No it does not because then it could sustain Birch Leaves or Oak Leaves or some stupid garbage like that. The Trees are only supposed to sustain Leaves of their own Species damnit.
Sadly thatâs not how most mods assume that, any log should be able to support any leaf. Iâve experienced that annoyance myself in the past too.
EDIT: Technically thatâs how vanilla works as well, any log can support any leaf. I think the function was supposed to be called isLog
or something in the actual MC source based on how itâs used in vanilla (being called canSustainLeaves
seems to be an MCPâism)âŠ
yes isWood does exist too, Thaumcraft doesnât use that obvious Function.
Anyways Iâm gonna add the woodLog garbage to the System, probably through Automatic Re-Registration so all Logs from all Mods will be compatible that way, like Azanor obviously intended but failed to do.
Hmm, just looked over the source, the isWood
function is also improperly named by MCP it seems, in vanilla it doesnât have anything to do with wood, looks like itâs supposed to be an early out for replaceability testing, the actual wood check for that is yet a different function (no MCP name for it: func_150523_a
, which checks if something is a generic âplantâ it seems). So that one seems wrong too from the looks of it (not that it keeps mods from using it from the looks of it, binnies bees, forestry, and BoP seem to, but not seeing anything else in my setup here that uses it)âŠ
Sounds like the most compatible way, and would fix other mods woodâs that use logWood
and not woodLog
too. ^.^
I just noticed, because many Mods register Logs with Wildcard Meta, I need to actually add a special case for thatâŠ
Ooo, yeah thaumcraftâs thing will not work a wildcard, so if you add all 16 variants of wildcards that would work it seems as he actually tests it like ItemElementalAxe.oreDictLogs.contains(Arrays.asList(new Object[]{bi, Integer.valueOf(md)}))
and oreDictLogs
is an ArrayList
, so it wonât work for wildcard things either it looks like. Thaumcrafts handling of this is pretty exceptionally broken⊠:-/
Since both of you are here, can Thaumcraft Golems place GT6 Saplings?
Yeah, and can autoclick sifters too xD
Good to know that Sifting Tables work too even after my change to make them more AFK-able.
Anyways, the fix is up on the Secret Test Download Page now. There should not be any breaking changes at all in that Version, aside from Golems actually being able to break Wood now.
Well, golem still ignore the trees :\
Wait what? I dont know if you can look at it in NEI, but are the Logs registered as woodLog in it? Might be an NEI Plugin I have but considering I have one Plugin yet there is two ways, maybe Vanilla NEI can show.
It says - gregtech:gt.block.log.a
If that is what youâre asking
Also, blue mahoe is of the same class, and is too not being cut down by golem.
gt.block.log.b objects (like cinammon) have the same issue