File tree Expand file tree Collapse file tree
src/main/java/com/gregtechceu/gtceu/api/data/chemical/material Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -516,13 +516,17 @@ public MaterialStack multiply(long amount) {
516516 }
517517
518518 public <T extends IMaterialProperty > boolean hasProperty (PropertyKey <T > key ) {
519- return getProperty (key ) != null ;
519+ return properties . hasProperty (key );
520520 }
521521
522522 public <T extends IMaterialProperty > T getProperty (PropertyKey <T > key ) {
523523 return properties .getProperty (key );
524524 }
525525
526+ public <T extends IMaterialProperty > void removeProperty (PropertyKey <T > key ) {
527+ properties .removeProperty (key );
528+ }
529+
526530 public <T extends IMaterialProperty > void setProperty (PropertyKey <T > key , IMaterialProperty property ) {
527531 if (!GTCEuAPI .materialManager .canModifyMaterials ()) {
528532 throw new IllegalStateException ("Cannot add properties to a Material when registry is frozen!" );
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public <T extends IMaterialProperty> T getProperty(PropertyKey<T> key) {
3737 }
3838
3939 public <T extends IMaterialProperty > boolean hasProperty (PropertyKey <T > key ) {
40- return propertyMap .get (key ) != null ;
40+ return propertyMap .containsKey (key );
4141 }
4242
4343 public <T extends IMaterialProperty > void setProperty (PropertyKey <T > key , IMaterialProperty value ) {
You can’t perform that action at this time.
0 commit comments