mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-21 12:52:31 +00:00
Add variation removal support to API, add ICarvingRegistry
This commit is contained in:
1 parent
fd7fabf397
commit
974ceec043
10 files changed
+85
-12
No files matched your search
@@ -4,6 +4,8 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import com.cricketcraft.chisel.api.carving.CarvingUtils;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
|
||||
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
|
||||
@@ -36,6 +38,17 @@ public class CarvingGroup implements ICarvingGroup {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICarvingVariation removeVariation(Block block, int metadata) {
|
||||
ICarvingVariation toRemove = null;
|
||||
for (ICarvingVariation v : variations) {
|
||||
if (v.getBlock() == block && v.getBlockMeta() == metadata) {
|
||||
toRemove = v;
|
||||
}
|
||||
}
|
||||
return toRemove == null ? null : variations.remove(toRemove) ? toRemove : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
||||
Reference in new issue
Block a user