Skip to content

Commit

Permalink
feat: Update to Minecraft 1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Sep 26, 2023
1 parent a1eae81 commit d2a3654
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Updated to Minecraft 1.20
- Updated to Minecraft 1.20.2
6 changes: 3 additions & 3 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"fertilization.mixins.json"
],
"depends": {
"balm-fabric": ">=7.0.0",
"fabricloader": ">=0.14.21",
"balm-fabric": ">=8.0.0",
"fabricloader": ">=0.14.22",
"fabric-api": "*",
"minecraft": ">=1.20",
"minecraft": ">=1.20.2",
"java": ">=17"
},
"suggests": {
Expand Down
20 changes: 10 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ modrinth_forge_project_id = dJhpNOys
modrinth_fabric_project_id = dJhpNOys

# Minecraft
minecraft_version = 1.20
minecraft_versions = 1.20,1.20.1
minecraft_version_range=[1.20,1.21)
minecraft_version = 1.20.2
minecraft_versions = 1.20.2
minecraft_version_range=[1.20.2,1.21)
java_version = 17

# Balm
balm_version = 7.1.0-SNAPSHOT
balm_version_range = [7.0.0,)
balm_version = 8.1.0-SNAPSHOT
balm_version_range = [8.0.0,)

# Forge
forge_version = 46.0.10
forge_version_range=[46.0.0,)
forge_loader_version_range=[46,)
forge_version = 48.0.1
forge_version_range=[48.0.0,)
forge_loader_version_range=[48,)
forge_mixins=true

# Fabric
fabric_version = 0.83.0+1.20
fabric_loader_version = 0.14.21
fabric_version = 0.89.0+1.20.2
fabric_loader_version = 0.14.22

# Dependencies
jei_minecraft_version=1.19.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import net.blay09.mods.fertilization.BoneMealHelper;
import net.blay09.mods.fertilization.FertilizationConfig;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockSource;
import net.minecraft.core.dispenser.BlockSource;
import net.minecraft.core.dispenser.OptionalDispenseItemBehavior;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.RandomSource;
Expand Down Expand Up @@ -37,8 +37,8 @@ public FloristsBoneMealItem(Properties properties) {
@Override
protected ItemStack execute(BlockSource source, ItemStack itemStack) {
this.setSuccess(true);
Level level = source.getLevel();
BlockPos pos = source.getPos().relative(source.getBlockState().getValue(DispenserBlock.FACING));
Level level = source.level();
BlockPos pos = source.pos().relative(source.state().getValue(DispenserBlock.FACING));
BlockState state = level.getBlockState(pos);

// When facing air, target the block below instead to spawn flowers nearby
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package net.blay09.mods.fertilization.item;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.item.BalmItems;
import net.blay09.mods.fertilization.Fertilization;
import net.minecraft.core.BlockPos;
import net.minecraft.core.BlockSource;
import net.minecraft.core.dispenser.BlockSource;
import net.minecraft.core.dispenser.OptionalDispenseItemBehavior;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.DispenserBlock;
Expand All @@ -33,8 +31,8 @@ public static void registerBoneMealDispenseBehaviour(CompressedBoneMealItem bone
@Override
protected ItemStack execute(BlockSource source, ItemStack itemStack) {
this.setSuccess(true);
Level level = source.getLevel();
BlockPos pos = source.getPos().relative(source.getBlockState().getValue(DispenserBlock.FACING));
Level level = source.level();
BlockPos pos = source.pos().relative(source.state().getValue(DispenserBlock.FACING));
BlockState state = level.getBlockState(pos);
if (boneMealItem.applyBoneMeal(level, pos, state, itemStack, null) != InteractionResult.SUCCESS) {
this.setSuccess(false);
Expand Down

0 comments on commit d2a3654

Please sign in to comment.