Skip to content

Commit

Permalink
Fix 1.21.1 compatibility (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte authored Aug 8, 2024
1 parent fe0fde0 commit 2fbbe60
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ archives_base_name=Powah
maven_group=dev.technici4n

# Common
minecraft_version=1.21
minecraft_version=1.21.1
cloth_config_version=15.0.127

rei_version=16.0.729
emi_version=1.1.10+1.21
neoforge_version=21.0.143
neoforge_version=21.1.1
curios_version=7.0.0-beta.3+1.20.4

# Switch between none, emi and rei
Expand All @@ -29,5 +29,5 @@ runtime_itemlist_mod=emi
#########################################################
# Parchment #
#########################################################
neoForge.parchment.minecraftVersion=1.20.6
neoForge.parchment.mappingsVersion=2024.06.16
neoForge.parchment.minecraftVersion=1.21
neoForge.parchment.mappingsVersion=2024.07.28
4 changes: 2 additions & 2 deletions src/main/java/owmii/powah/Powah.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModList;
Expand Down Expand Up @@ -127,7 +126,8 @@ private void registerTransfer(RegisterCapabilitiesEvent event) {
});

for (var entry : Tiles.DR.getEntries()) {
var be = entry.get().create(BlockPos.ZERO, Blocks.AIR.defaultBlockState());
var validBlock = entry.get().getValidBlocks().stream().iterator().next();
var be = entry.get().create(BlockPos.ZERO, validBlock.defaultBlockState());
if (be == null) {
throw new IllegalStateException("Failed to create a dummy BE for " + entry.getId());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Various ways to generate, store and transmit FE power.
[[dependencies.powah]]
modId="neoforge"
type="REQUIRED"
versionRange="[21.0.143,)"
versionRange="[21.1.1,)"
ordering="NONE"
side="BOTH"

Expand Down

0 comments on commit 2fbbe60

Please sign in to comment.