mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 08:14:00 +02:00
compatiblity with vane portal
This commit is contained in:
parent
8394cef84c
commit
e0e71b574a
1 changed files with 8 additions and 0 deletions
|
|
@ -10,13 +10,16 @@ interface ExternGuiTester {
|
|||
|
||||
fun testIfGui(inventory: InventoryView): Boolean {
|
||||
// this mean we are on test
|
||||
//TODO review why needed knowing previous mitigations should works
|
||||
if(inventory.javaClass.name.endsWith("AnvilViewMock")) return false
|
||||
|
||||
val clazz = getContainerClass(inventory) ?: return false
|
||||
|
||||
val clazzName = clazz.name
|
||||
//TODO maybe instead of testing non default, better to be testing we are default ?
|
||||
if (expectWesjd(clazzName)) return true
|
||||
if (expectXenondevUI(clazzName)) return true
|
||||
if (expectVanePortal(clazzName)) return true
|
||||
|
||||
return false
|
||||
}
|
||||
|
|
@ -37,5 +40,10 @@ interface ExternGuiTester {
|
|||
&& name.endsWith(XenondevUISufix)
|
||||
}
|
||||
|
||||
fun expectVanePortal(name: String): Boolean {
|
||||
val expected = "org.oddlama.vane.core.menu.AnvilMenu\$AnvilContainer"
|
||||
|
||||
return name == expected
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue