Skip to content

Commit

Permalink
Updated to 1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed Jun 15, 2024
1 parent 9a59cd4 commit 60208a6
Show file tree
Hide file tree
Showing 33 changed files with 43 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.6 2024-05-05T10:18:49.4009886 Item Models: sereneseasons
// 1.21 2024-06-15T10:07:24.2355164 Item Models: sereneseasons
8131cb872e089e4f0ac2bccf3d4d7a25d7d92ec7 assets/sereneseasons/models/item/calendar.json
cb387a39c39a0f4665c565e7218cd4426875246a assets/sereneseasons/models/item/calendar_00.json
c154671ec34c7931bc05c47db4f69f21a5e413c7 assets/sereneseasons/models/item/calendar_01.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.6 2024-05-05T10:18:49.3994883 Block States: sereneseasons
// 1.21 2024-06-15T10:07:24.2345172 Block States: sereneseasons
edf060403d4f871caf88b27e91d713ee2be4ebc1 assets/sereneseasons/blockstates/season_sensor.json
2797b7f59442c019e778d4e72e49c819153d75b3 assets/sereneseasons/models/block/season_sensor_autumn.json
607600cb666bf37bc704c834d7d0ffc585b405d0 assets/sereneseasons/models/block/season_sensor_spring.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// 1.20.6 2024-05-05T10:18:49.3999887 Recipes
e072858e57ee517a9ad673759ea337523f1faf58 data/sereneseasons/advancements/recipes/redstone/season_sensor.json
a6e2e9061195651e5a5ebe536429b983725e47a8 data/sereneseasons/advancements/recipes/tools/calendar.json
6dcfb1f16a07426dedd4bb0c22cf7e8875aaa637 data/sereneseasons/recipes/calendar.json
3a8122eb3cd03dfa946e5daabcc7c0a9813346e2 data/sereneseasons/recipes/season_sensor.json
// 1.21 2024-06-15T10:07:24.2355164 Recipes
e072858e57ee517a9ad673759ea337523f1faf58 data/sereneseasons/advancement/recipes/redstone/season_sensor.json
a6e2e9061195651e5a5ebe536429b983725e47a8 data/sereneseasons/advancement/recipes/tools/calendar.json
6dcfb1f16a07426dedd4bb0c22cf7e8875aaa637 data/sereneseasons/recipe/calendar.json
3a8122eb3cd03dfa946e5daabcc7c0a9813346e2 data/sereneseasons/recipe/season_sensor.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static void registerArguments(BiConsumer<ResourceLocation, ArgumentTypeIn

private static ArgumentTypeInfo<?, ?> register(BiConsumer<ResourceLocation, ArgumentTypeInfo<?, ?>> func, String name, Class<?> clazz, ArgumentTypeInfo<?, ?> typeInfo)
{
func.accept(new ResourceLocation(SereneSeasons.MOD_ID, name), typeInfo);
func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), typeInfo);
ArgumentTypeInfos.BY_CLASS.put(clazz, typeInfo);
return typeInfo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SeasonsConfig extends glitchcore.config.Config
{
try
{
new ResourceLocation(s);
ResourceLocation.parse(s);
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void registerBlockEntities(BiConsumer<ResourceLocation, BlockEntit
private static <T extends BlockEntity> BlockEntityType<?> register(BiConsumer<ResourceLocation, BlockEntityType<?>> func, String name, BlockEntityType.Builder<T> builder)
{
var type = builder.build(Util.fetchChoiceType(References.BLOCK_ENTITY, name));
func.accept(new ResourceLocation(SereneSeasons.MOD_ID, name), type);
func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), type);
return type;
}
}
2 changes: 1 addition & 1 deletion common/src/main/java/sereneseasons/init/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void registerBlocks(BiConsumer<ResourceLocation, Block> func)

private static Block register(BiConsumer<ResourceLocation, Block> func, Block block, String name)
{
func.accept(new ResourceLocation(SereneSeasons.MOD_ID, name), block);
func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), block);
return block;
}
}
4 changes: 2 additions & 2 deletions common/src/main/java/sereneseasons/init/ModClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static void onItemTooltip(ItemTooltipEvent event)

public static void registerItemProperties()
{
ItemProperties.register(SSItems.CALENDAR, new ResourceLocation(SereneSeasons.MOD_ID, "time"), new ClampedItemPropertyFunction()
ItemProperties.register(SSItems.CALENDAR, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, "time"), new ClampedItemPropertyFunction()
{
@Override
public float unclampedCall(ItemStack stack, ClientLevel clientWorld, LivingEntity entity, int seed)
Expand Down Expand Up @@ -116,7 +116,7 @@ public float unclampedCall(ItemStack stack, ClientLevel clientWorld, LivingEntit
}
});

ItemProperties.register(SSItems.CALENDAR, new ResourceLocation(SereneSeasons.MOD_ID, "seasontype"), new ClampedItemPropertyFunction()
ItemProperties.register(SSItems.CALENDAR, ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, "seasontype"), new ClampedItemPropertyFunction()
{
@Override
public float unclampedCall(ItemStack stack, ClientLevel clientWorld, LivingEntity entity, int seed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void registerCreativeTabs(BiConsumer<ResourceLocation, CreativeMod

private static CreativeModeTab register(BiConsumer<ResourceLocation, CreativeModeTab> func, String name, CreativeModeTab tab)
{
func.accept(new ResourceLocation(SereneSeasons.MOD_ID, name), tab);
func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), tab);
return tab;
}
}
2 changes: 1 addition & 1 deletion common/src/main/java/sereneseasons/init/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void registerBlockItems(BiConsumer<ResourceLocation, Item> func)

private static Item register(BiConsumer<ResourceLocation, Item> func, String name, Item item)
{
func.accept(new ResourceLocation(SereneSeasons.MOD_ID, name), item);
func.accept(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), item);
return item;
}
}
4 changes: 2 additions & 2 deletions common/src/main/java/sereneseasons/init/ModPackets.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class ModPackets
{
private static final ResourceLocation CHANNEL = new ResourceLocation(SereneSeasons.MOD_ID, "main");
private static final ResourceLocation CHANNEL = ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, "main");
public static final PacketHandler HANDLER = new PacketHandler(CHANNEL);

public static void init()
Expand All @@ -22,6 +22,6 @@ public static void init()

public static void register(String name, CustomPacket<?> packet)
{
HANDLER.register(new ResourceLocation(SereneSeasons.MOD_ID, name), packet);
HANDLER.register(ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name), packet);
}
}
28 changes: 14 additions & 14 deletions common/src/main/java/sereneseasons/init/ModTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public static class Blocks
{
private static void setup() {}

public static final TagKey<Block> SPRING_CROPS = create(new ResourceLocation("sereneseasons:spring_crops"));
public static final TagKey<Block> SUMMER_CROPS = create(new ResourceLocation("sereneseasons:summer_crops"));
public static final TagKey<Block> AUTUMN_CROPS = create(new ResourceLocation("sereneseasons:autumn_crops"));
public static final TagKey<Block> WINTER_CROPS = create(new ResourceLocation("sereneseasons:winter_crops"));
public static final TagKey<Block> SPRING_CROPS = create(ResourceLocation.parse("sereneseasons:spring_crops"));
public static final TagKey<Block> SUMMER_CROPS = create(ResourceLocation.parse("sereneseasons:summer_crops"));
public static final TagKey<Block> AUTUMN_CROPS = create(ResourceLocation.parse("sereneseasons:autumn_crops"));
public static final TagKey<Block> WINTER_CROPS = create(ResourceLocation.parse("sereneseasons:winter_crops"));

public static final TagKey<Block> GREENHOUSE_GLASS = create(new ResourceLocation("sereneseasons:greenhouse_glass"));
public static final TagKey<Block> UNBREAKABLE_INFERTILE_CROPS = create(new ResourceLocation("sereneseasons:unbreakable_infertile_crops"));
public static final TagKey<Block> GREENHOUSE_GLASS = create(ResourceLocation.parse("sereneseasons:greenhouse_glass"));
public static final TagKey<Block> UNBREAKABLE_INFERTILE_CROPS = create(ResourceLocation.parse("sereneseasons:unbreakable_infertile_crops"));

public static TagKey<Block> create(ResourceLocation name)
{
Expand All @@ -41,10 +41,10 @@ public static class Items
{
private static void setup() {}

public static final TagKey<Item> SPRING_CROPS = create(new ResourceLocation("sereneseasons:spring_crops"));
public static final TagKey<Item> SUMMER_CROPS = create(new ResourceLocation("sereneseasons:summer_crops"));
public static final TagKey<Item> AUTUMN_CROPS = create(new ResourceLocation("sereneseasons:autumn_crops"));
public static final TagKey<Item> WINTER_CROPS = create(new ResourceLocation("sereneseasons:winter_crops"));
public static final TagKey<Item> SPRING_CROPS = create(ResourceLocation.parse("sereneseasons:spring_crops"));
public static final TagKey<Item> SUMMER_CROPS = create(ResourceLocation.parse("sereneseasons:summer_crops"));
public static final TagKey<Item> AUTUMN_CROPS = create(ResourceLocation.parse("sereneseasons:autumn_crops"));
public static final TagKey<Item> WINTER_CROPS = create(ResourceLocation.parse("sereneseasons:winter_crops"));

public static TagKey<Item> create(ResourceLocation name)
{
Expand All @@ -56,10 +56,10 @@ public static class Biomes
{
private static void setup() {}

public static final TagKey<Biome> BLACKLISTED_BIOMES = createBiomeTag(new ResourceLocation("sereneseasons:blacklisted_biomes"));
public static final TagKey<Biome> INFERTILE_BIOMES = createBiomeTag(new ResourceLocation("sereneseasons:infertile_biomes"));
public static final TagKey<Biome> LESSER_COLOR_CHANGE_BIOMES = createBiomeTag(new ResourceLocation("sereneseasons:lesser_color_change_biomes"));
public static final TagKey<Biome> TROPICAL_BIOMES = createBiomeTag(new ResourceLocation("sereneseasons:tropical_biomes"));
public static final TagKey<Biome> BLACKLISTED_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:blacklisted_biomes"));
public static final TagKey<Biome> INFERTILE_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:infertile_biomes"));
public static final TagKey<Biome> LESSER_COLOR_CHANGE_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:lesser_color_change_biomes"));
public static final TagKey<Biome> TROPICAL_BIOMES = createBiomeTag(ResourceLocation.parse("sereneseasons:tropical_biomes"));
}

private static TagKey<Biome> createBiomeTag(ResourceLocation name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void encode(FriendlyByteBuf buf)
@Override
public SyncSeasonCyclePacket decode(FriendlyByteBuf buf)
{
return new SyncSeasonCyclePacket(ResourceKey.create(Registries.DIMENSION, new ResourceLocation(buf.readUtf())), buf.readInt());
return new SyncSeasonCyclePacket(ResourceKey.create(Registries.DIMENSION, ResourceLocation.parse(buf.readUtf())), buf.readInt());
}

@Override
Expand Down
16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ group=com.github.glitchfiend
release_channel=beta

# Common
minecraft_version=1.20.6
minecraft_version=1.21

# Forge
forge_version=50.0.5
forge_version_range=[50.0.5,)
forge_loader_version_range=[50,)
forge_version=51.0.5
forge_version_range=[51.0.5,)
forge_loader_version_range=[51,)

# NeoForge
neoforge_version=20.6.24-beta
neoforge_version_range=[20.6,)
neoforge_version=21.0.6-beta
neoforge_version_range=[21.0,)
neoforge_loader_version_range=[1,)

# Fabric
fabric_version=0.97.8+1.20.6
fabric_version=0.100.1+1.21
fabric_loader_version=0.15.11

# Mod options
Expand All @@ -40,4 +40,4 @@ org.gradle.daemon=false

# Dependencies
nightconfig_version=3.6.7
glitchcore_version=1.1.0.5
glitchcore_version=2.0.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public void registerSeasonSensor()
public BlockModelBuilder seasonSensor(Season season)
{
String name = "season_sensor_" + season.name().toLowerCase();
ResourceLocation topTexture = new ResourceLocation(SereneSeasons.MOD_ID, ModelProvider.BLOCK_FOLDER + "/" + name + "_top");
ResourceLocation sideTexture = new ResourceLocation(SereneSeasons.MOD_ID, ModelProvider.BLOCK_FOLDER + "/season_sensor_side");
ResourceLocation topTexture = ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, ModelProvider.BLOCK_FOLDER + "/" + name + "_top");
ResourceLocation sideTexture = ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, ModelProvider.BLOCK_FOLDER + "/season_sensor_side");
return this.daylightDetector(name, topTexture, sideTexture);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ private void registerCalendarModels()

private static ResourceLocation location(String name)
{
return new ResourceLocation(SereneSeasons.MOD_ID, name);
return ResourceLocation.fromNamespaceAndPath(SereneSeasons.MOD_ID, name);
}
}

0 comments on commit 60208a6

Please sign in to comment.