Skip to content

Commit

Permalink
nna
Browse files Browse the repository at this point in the history
  • Loading branch information
MORIMORI0317 committed Aug 10, 2024
1 parent c65d6ea commit 130f7d4
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import net.morimori0317.yajusenpai.YajuSenpai;
import net.morimori0317.yajusenpai.effect.YJMobEffects;
import net.morimori0317.yajusenpai.item.*;
import net.morimori0317.yajusenpai.sound.InmFamilySounds;
import net.morimori0317.yajusenpai.sound.InmFamilySound;
import net.morimori0317.yajusenpai.sound.InmFamilySounds;

import java.util.List;
import java.util.function.Function;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.google.common.collect.ImmutableList;
import net.minecraft.core.HolderLookup;
import net.minecraft.data.PackOutput;
import net.minecraft.resources.ResourceKey;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
Expand All @@ -14,6 +13,7 @@
import net.morimori0317.yajusenpai.explatform.data.YJDataExpectPlatform;

import java.util.concurrent.CompletableFuture;
import java.util.function.Supplier;

public class YJBlockTagProvider extends BlockTagProviderWrapper {
public YJBlockTagProvider(PackOutput packOutput, CompletableFuture<HolderLookup.Provider> lookup, CrossDataGeneratorAccess crossDataGeneratorAccess) {
Expand Down Expand Up @@ -100,7 +100,7 @@ public void generateTag(IntrinsicTagProviderAccess<Block> providerAccess) {
.add(YJBlocks.YJ_STONE.get(), YJBlocks.YJ_DEEPSLATE.get());

providerAccess.tag(YJBlockTags.INM_BLOCK)
.add(YJBlocks.NON_YJ_BLOCKS.stream().map(it -> it.getKey()).toArray(ResourceKey[]::new))
.add(YJBlocks.NON_YJ_BLOCKS.stream().map(Supplier::get).toArray(Block[]::new))
.addTag(YJBlockTags.YAJUSENPAI_BLOCK);

providerAccess.tag(YJBlockTags.YJ_DEEPSLATE_ORE_REPLACEABLES)
Expand All @@ -119,7 +119,7 @@ public void generateTag(IntrinsicTagProviderAccess<Block> providerAccess) {
.add(YJBlocks.YAJUSENPAI_BLOCK.get(), YJBlocks.DEEPSLATE_YAJUSENPAI_ORE.get());

providerAccess.tag(YJBlockTags.YAJUSENPAI_BLOCK)
.add(YJBlocks.YJ_BLOCKS.stream().map(it -> it.getKey()).toArray(ResourceKey[]::new));
.add(YJBlocks.YJ_BLOCKS.stream().map(Supplier::get).toArray(Block[]::new));

providerAccess.tag(YJBlockTags.INM_BLOCK_REPLACEABLES)
.add(Blocks.END_STONE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package net.morimori0317.yajusenpai.explatform.client;

import dev.architectury.injectables.annotations.ExpectPlatform;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.ItemLike;
import net.morimori0317.yajusenpai.client.renderer.item.BEWLItemRenderer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.morimori0317.yajusenpai.block.InmBlock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.commands.PlaceCommand;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.ServerLevelAccessor;
import net.minecraft.world.level.block.Mirror;
Expand All @@ -12,7 +11,6 @@
import net.minecraft.world.level.levelgen.structure.StructurePieceAccessor;
import net.minecraft.world.level.levelgen.structure.TemplateStructurePiece;
import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceSerializationContext;
import net.minecraft.world.level.levelgen.structure.pools.StructureTemplatePool;
import net.minecraft.world.level.levelgen.structure.templatesystem.BlockIgnoreProcessor;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.morimori0317.yajusenpai.util;

import com.llamalad7.mixinextras.sugar.ref.LocalIntRef;
import dev.architectury.platform.Platform;
import dev.architectury.registry.registries.RegistrySupplier;
import dev.architectury.utils.value.IntValue;
import net.minecraft.core.BlockPos;
Expand Down Expand Up @@ -132,6 +133,10 @@ public static boolean isFood(ItemStack stack, LivingEntity livingEntity) {
}

public static <T> Holder<T> vanillaHolder(RegistrySupplier<T> registrySupplier) {
return registrySupplier.getRegistrar().getHolder(registrySupplier.getKey());
if (Platform.isFabric()) {
return registrySupplier.getRegistrar().getHolder(registrySupplier.getKey());
} else {
return registrySupplier.getRegistrar().getHolder(registrySupplier.getId());
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package net.morimori0317.yajusenpai.explatform.client.fabric;

import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.ItemLike;
import net.morimori0317.yajusenpai.client.renderer.item.BEWLItemRenderer;
import net.morimori0317.yajusenpai.client.util.YJRenderUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public static void generateItemTag(ItemTagProviderWrapper.ItemTagProviderAccess
.add(YJItems.APPLE_INM.get());

providerAccess.tag(YJItemTagsFabric.NETHER_STARS)
.add(YJItems.YJ_STAR.getKey());
.add(YJItems.YJ_STAR.get());

providerAccess.tag(ConventionalItemTags.INGOTS)
.addTags(ImmutableList.of(YJItemTagsFabric.YJNIUM_INGOTS, YJItemTagsFabric.YAJUSENPAI_INGOTS));
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ mod_display_name=YajuSenpai
mod_version=2024.0.0
maven_group=net.morimori0317

architectury_version=13.0.1
architectury_version=13.0.6

fabric_loader_version=0.15.11
fabric_api_version=0.100.3+1.21

neoforge_version=21.0.16-beta
neoforge_version=21.0.167

modmenu_version=11.0.0
rei_version=16.0.729
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package net.morimori0317.yajusenpai.explatform.client.neoforge;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.ItemLike;
import net.morimori0317.yajusenpai.client.renderer.item.BEWLItemRenderer;
import net.morimori0317.yajusenpai.neoforge.client.renderer.item.ItemRendererRegisterNeoForge;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.minecraft.data.CachedOutput;
import net.minecraft.data.DataProvider;
import net.minecraft.data.tags.EnchantmentTagsProvider;
import net.morimori0317.yajusenpai.data.cross.provider.BasicProviderWrapper;

import java.util.concurrent.CompletableFuture;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ public static void generateItemTag(ItemTagProviderWrapper.ItemTagProviderAccess
providerAccess.tag(Tags.Items.FOODS)
.add(YJItems.ICE_TEA.get(), YJItems.BAKED_POTATO_SENPAI.get());

providerAccess.tag(Tags.Items.FOODS_FRUITS)
providerAccess.tag(Tags.Items.FOODS_FRUIT)
.add(YJItems.APPLE_INM.get());

providerAccess.tag(Tags.Items.FOODS_VEGETABLES)
providerAccess.tag(Tags.Items.FOODS_VEGETABLE)
.add(YJItems.POTATO_SENPAI.get());

providerAccess.tag(YJItemTagsNeoForge.DRINKS)
Expand Down
4 changes: 2 additions & 2 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ catalogueImageIcon = "icon.png"
[[dependencies.yajusenpai]]
modId = "neoforge"
type = "required"
versionRange = "[21.0.16-beta,)"
versionRange = "[21.0.167,)"
ordering = "NONE"
side = "BOTH"

Expand All @@ -69,7 +69,7 @@ side = "BOTH"
[[dependencies.yajusenpai]]
modId = "architectury"
type = "required"
versionRange = "[13.0.1,)"
versionRange = "[13.0.6,)"
ordering = "AFTER"
side = "BOTH"

Expand Down
10 changes: 10 additions & 0 deletions neoforge_version_check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"homepage": "https://modrinth.com/mod/yaju-senpai",
"1.21": {
"2024.0.0": "The 2024 Release."
},
"promos": {
"1.21-latest": "2024.0.0",
"1.21-recommended": "2024.0.0"
}
}

0 comments on commit 130f7d4

Please sign in to comment.