Skip to content

Commit

Permalink
fix: fix Wide Flesh Doors incompatibility with Quark's double door fe…
Browse files Browse the repository at this point in the history
…ature

Closes: #108
  • Loading branch information
Elenterius committed Oct 28, 2023
1 parent 9dd10ee commit e9f4eb5
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.github.elenterius.biomancy.datagen.tags;

import com.github.elenterius.biomancy.block.FleshDoorBlock;
import com.github.elenterius.biomancy.block.FullFleshDoorBlock;
import com.github.elenterius.biomancy.init.ModBlockMaterials;
import com.github.elenterius.biomancy.init.ModBlocks;
import com.github.elenterius.biomancy.init.tags.ModBlockTags;
Expand All @@ -17,6 +19,7 @@
import org.apache.commons.lang3.StringUtils;

import javax.annotation.Nullable;
import java.util.function.Predicate;

import static com.github.elenterius.biomancy.BiomancyMod.MOD_ID;

Expand All @@ -39,6 +42,7 @@ public String getName() {
protected void addTags() {
addFleshyBlocksToHoeTag();
addCreateTags();
addQuarkTags();

//CONVERTABLE_TO_PRIMAL_FLESH
//CONVERTABLE_TO_MALIGNANT_FLESH
Expand Down Expand Up @@ -110,4 +114,15 @@ private void addCreateTags() {
);
}

/**
* <a href="https://github.com/VazkiiMods/Quark/blob/master/src/main/resources/data/quark/tags">Quark Tags</a>
*/
private void addQuarkTags() {
String modId = "quark";
TagKey<Block> noDoubleDoor = tagKey(modId, "non_double_door");
TagAppender<Block> tag = tag(noDoubleDoor);

Predicate<Block> predicate = block -> block instanceof FleshDoorBlock || block instanceof FullFleshDoorBlock;
ModBlocks.BLOCKS.getEntries().stream().map(RegistryObject::get).filter(predicate).forEach(tag::add);
}
}

0 comments on commit e9f4eb5

Please sign in to comment.