Skip to content

Commit

Permalink
[Port] Update to 1.21.2 (v2.5.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
CDAGaming committed Oct 17, 2024
1 parent 4cabdbc commit 7b05347
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ matrices, getFontRenderer(), xOffset, yPos + 4, stack,
if (renderType.canRenderImage() && !ImageUtils.isTextureNull(texture)) {
final double yOffset = yPos + 4.5;
final double size = 32;
RenderUtils.drawTexture(getGameInstance(),
RenderUtils.drawTexture(getGameInstance(), getCurrentMatrix(),
xOffset, xOffset + size, yOffset, yOffset + size,
0.0D,
0.0D, 1.0D,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import io.github.cdagaming.unicore.utils.MappingUtils;
import io.github.cdagaming.unicore.utils.StringUtils;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.biome.Biome;
Expand Down Expand Up @@ -129,7 +129,7 @@ public void clearAttributes() {
@Override
public void updateData() {
final Biome newBiome = CraftPresence.world.getBiome(CraftPresence.player.blockPosition()).value();
final ResourceLocation newIdentifier = CraftPresence.world.registryAccess().registryOrThrow(Registries.BIOME).getKey(newBiome);
final ResourceLocation newIdentifier = CraftPresence.world.registryAccess().lookupOrThrow(Registries.BIOME).getKey(newBiome);
final String newBiomeName = newIdentifier != null ? newIdentifier.toString() : "Plains";

final String newBiomeIdentifier = StringUtils.getOrDefault(newBiomeName, MappingUtils.getClassName(newBiome));
Expand Down Expand Up @@ -200,7 +200,7 @@ public void updatePresence() {
*/
private List<ResourceLocation> getBiomeTypes() {
List<ResourceLocation> biomeTypes = StringUtils.newArrayList();
Optional<HolderLookup.RegistryLookup<Biome>> biomeRegistry = CraftPresence.world.registryAccess().lookup(Registries.BIOME);
Optional<Registry<Biome>> biomeRegistry = CraftPresence.world.registryAccess().lookup(Registries.BIOME);

if (biomeRegistry.isPresent()) {
List<Holder.Reference<Biome>> defaultBiomeTypes = StringUtils.newArrayList(biomeRegistry.get().listElements().toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import io.github.cdagaming.unicore.utils.MappingUtils;
import io.github.cdagaming.unicore.utils.StringUtils;
import net.minecraft.core.Holder;
import net.minecraft.core.HolderLookup;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.Level;
Expand Down Expand Up @@ -201,7 +201,7 @@ public void updatePresence() {
*/
private List<ResourceLocation> getDimensionTypes() {
List<ResourceLocation> dimensionTypes = StringUtils.newArrayList();
Optional<HolderLookup.RegistryLookup<DimensionType>> dimensionRegistry = CraftPresence.world.registryAccess().lookup(Registries.DIMENSION_TYPE);
Optional<Registry<DimensionType>> dimensionRegistry = CraftPresence.world.registryAccess().lookup(Registries.DIMENSION_TYPE);

if (dimensionRegistry.isPresent()) {
List<Holder.Reference<DimensionType>> defaultDimensionTypes = StringUtils.newArrayList(dimensionRegistry.get().listElements().toList());
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "${mod_name} Resources",
"pack_format": 34
"pack_format": 42
}
}
2 changes: 1 addition & 1 deletion forge/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "${mod_name} Resources",
"pack_format": 34
"pack_format": 42
}
}
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ isJarMod=false
# Mapping Info
mc_mappings=
mc_mappings_type=mojmap
mc_version=1.21.1
mc_protocol=767
mc_version=1.21.2-rc1
mc_protocol=768
display_version=
# Fabric Info
fabric_loader_version=0.16.5
Expand All @@ -41,7 +41,7 @@ neoforge_loader_version_range=[21.0.0-beta,)
versionId=2.5.1
deploymentType=Alpha
versionLabel=Release
additional_mc_versions=1.21
additional_mc_versions=1.21.2-snapshot
# Integration Info
source_java_version=21
build_java_version=21
Expand Down
2 changes: 1 addition & 1 deletion neoforge/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "${mod_name} Resources",
"pack_format": 34
"pack_format": 42
}
}
2 changes: 1 addition & 1 deletion quilt/src/main/resources/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"description": "${mod_name} Resources",
"pack_format": 34
"pack_format": 42
}
}

0 comments on commit 7b05347

Please sign in to comment.