Skip to content
Permalink
Browse files

Using isLegacy() instead of startsWith()

  • Loading branch information...
EntryPointKR committed Aug 9, 2019
1 parent 2b28b20 commit 47190413f54507434eebb861e5eb01c169d51711
@@ -34,6 +34,8 @@

boolean isInteractable();

boolean isLegacy();

float getHardness();

float getBlastResistance();
@@ -87,6 +87,11 @@ public boolean isInteractable() {
return m.isInteractable();
}

@Override
public boolean isLegacy() {
return m.isLegacy();
}

@Override
public float getHardness() {
return m.getHardness();
@@ -1329,7 +1329,7 @@ public Boolean runAsync() {
public Mixed exec(Target t, Environment environment, Mixed... args) throws ConfigRuntimeException {
CArray mats = new CArray(t);
for(MCMaterial mat : StaticLayer.GetMaterialValues()) {
if(!mat.getName().startsWith("LEGACY_")) {
if(!mat.isLegacy()) {
mats.push(new CString(mat.getName(), t), t);
}
}

0 comments on commit 4719041

Please sign in to comment.
You can’t perform that action at this time.