Skip to content

Commit

Permalink
Rename individual data providers
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed Apr 21, 2024
1 parent 22d18b6 commit 512db6e
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import gripe._90.megacells.definition.MEGABlocks;
import gripe._90.megacells.definition.MEGAItems;
import gripe._90.megacells.definition.MEGATranslations;
import org.jetbrains.annotations.NotNull;

public class MEGALanguageProvider extends LanguageProvider {
public MEGALanguageProvider(PackOutput output) {
Expand All @@ -27,4 +28,10 @@ protected void addTranslations() {
add(translation.getTranslationKey(), translation.getEnglishText());
}
}

@NotNull
@Override
public String getName() {
return "Language";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,9 @@ private void interfaceOrProviderPart(ItemDefinition<?> part) {
.texture("front", front)
.texture("back", back);
}

@Override
public String getName() {
return "Block States / Models";
}
}
12 changes: 12 additions & 0 deletions src/data/java/gripe/_90/megacells/datagen/MEGATagProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ protected void addTags(@NotNull HolderLookup.Provider provider) {
.add(Items.ICE, Items.PACKED_ICE)
.addOptionalTag(new ResourceLocation("functionalstorage", "ignore_crafting_check"));
}

@NotNull
@Override
public String getName() {
return "Tags (Item)";
}
}

public static class BlockTags extends IntrinsicHolderTagsProvider<Block> {
Expand All @@ -79,5 +85,11 @@ protected void addTags(@NotNull HolderLookup.Provider provider) {

tag(MEGATags.SKY_STEEL_BLOCK).add(MEGABlocks.SKY_STEEL_BLOCK.block());
}

@NotNull
@Override
public String getName() {
return "Tags (Block)";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

import gripe._90.megacells.block.entity.MEGAPatternProviderBlockEntity;

@SuppressWarnings("deprecation")
public class MEGAPatternProviderBlock extends AEBaseEntityBlock<MEGAPatternProviderBlockEntity> {
private static final EnumProperty<PushDirection> PUSH_DIRECTION = PatternProviderBlock.PUSH_DIRECTION;

Expand All @@ -56,6 +55,7 @@ protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockSt
}

@ParametersAreNonnullByDefault
@SuppressWarnings("deprecation")
@Override
public void neighborChanged(
BlockState state, Level level, BlockPos pos, Block block, BlockPos fromPos, boolean isMoving) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import gripe._90.megacells.definition.MEGAMenus;

public class MEGAPatternProviderBlockEntity extends PatternProviderBlockEntity {

public MEGAPatternProviderBlockEntity(BlockEntityType<?> blockEntityType, BlockPos pos, BlockState blockState) {
super(blockEntityType, pos, blockState);
}
Expand Down

0 comments on commit 512db6e

Please sign in to comment.