Skip to content

Commit

Permalink
Allow placing structural glass, reactor glass, and laser focus matric…
Browse files Browse the repository at this point in the history
…es inside framed blocks
  • Loading branch information
pupnewfster committed Aug 20, 2024
1 parent aab8bcf commit 8969df7
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ if (System.getenv('CURSEFORGE_KEY') != null || project.hasProperty('curseforgeKe
'biomes-o-plenty',
//Misc
'applied-energistics-2', 'ctm', 'curios-continuation', 'dark-mode-everywhere', 'farmers-delight', 'female-gender-forge', 'flux-networks',
'grandpower', 'json-things', 'perviaminvenire', 'projecte', 'recipe-stages'
'framedblocks', 'grandpower', 'json-things', 'perviaminvenire', 'projecte', 'recipe-stages'
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.DamageTypeTags;
import net.minecraft.tags.EntityTypeTags;
Expand All @@ -34,8 +33,6 @@

public class AdditionsTagProvider extends BaseTagProvider {

private static final TagKey<Block> FRAMEABLE = BlockTags.create(ResourceLocation.fromNamespaceAndPath("framedblocks", "frameable"));

public AdditionsTagProvider(PackOutput output, CompletableFuture<HolderLookup.Provider> lookupProvider, @Nullable ExistingFileHelper existingFileHelper) {
super(output, lookupProvider, MekanismAdditions.MODID, existingFileHelper);
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.util.concurrent.CompletableFuture;
import mekanism.common.tag.BaseTagProvider;
import mekanism.generators.common.registries.GeneratorsBlocks;
import mekanism.generators.common.registries.GeneratorsFluids;
import mekanism.generators.common.registries.GeneratorsChemicals;
import mekanism.generators.common.registries.GeneratorsFluids;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.PackOutput;
Expand Down Expand Up @@ -57,6 +57,9 @@ protected void registerTags(HolderLookup.Provider registries) {
GeneratorsBlocks.FUSION_REACTOR_PORT,
GeneratorsBlocks.FUSION_REACTOR_LOGIC_ADAPTER,
GeneratorsBlocks.LASER_FOCUS_MATRIX);

addToTag(FRAMEABLE, GeneratorsBlocks.REACTOR_GLASS, GeneratorsBlocks.LASER_FOCUS_MATRIX);
addToTag(FB_BE_WHITELIST, GeneratorsBlocks.REACTOR_GLASS, GeneratorsBlocks.LASER_FOCUS_MATRIX);
}

private void addBoxBlacklist() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public abstract class BaseTagProvider implements DataProvider {

protected static final TagKey<EntityType<?>> PVI_COMPAT = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation.fromNamespaceAndPath("per-viam-invenire", "replace_vanilla_navigator"));
private static final TagKey<Fluid> CREATE_NO_INFINITE_FLUID = FluidTags.create(ResourceLocation.fromNamespaceAndPath("create", "no_infinite_draining"));
protected static final TagKey<Block> FRAMEABLE = BlockTags.create(ResourceLocation.fromNamespaceAndPath("framedblocks", "frameable"));
protected static final TagKey<Block> FB_BE_WHITELIST = BlockTags.create(ResourceLocation.fromNamespaceAndPath("framedblocks", "blockentity_whitelisted"));

private final Map<ResourceKey<? extends Registry<?>>, Map<TagKey<?>, TagBuilder>> supportedTagTypes = new Object2ObjectLinkedOpenHashMap<>();
private final Set<Block> knownHarvestRequirements = new ReferenceOpenHashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ protected void registerTags(HolderLookup.Provider registries) {
MekanismBlocks.DYNAMIC_TANK,
MekanismBlocks.DYNAMIC_VALVE
);

addToTag(FRAMEABLE, MekanismBlocks.STRUCTURAL_GLASS);
addToTag(FB_BE_WHITELIST, MekanismBlocks.STRUCTURAL_GLASS);
}

private void addEntities() {
Expand Down

0 comments on commit 8969df7

Please sign in to comment.