Skip to content

Commit

Permalink
Replace string == check with .equals
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Feb 19, 2024
1 parent 2cd54d2 commit 46fc9e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected void generate() {

@Override
protected Iterable<Block> getKnownBlocks() {
return ForgeRegistries.BLOCKS.getEntries().stream().filter(entry -> entry.getKey().location().getNamespace() == Chococraft.MOD_ID)
return ForgeRegistries.BLOCKS.getEntries().stream().filter(entry -> entry.getKey().location().getNamespace().equals(Chococraft.MOD_ID))
.map(entry -> entry.getValue())::iterator;
}
}
Expand All @@ -87,7 +87,7 @@ public void generate() {
@Override
protected Stream<EntityType<?>> getKnownEntityTypes() {
Stream<EntityType<?>> entityTypeStream = ForgeRegistries.ENTITY_TYPES.getEntries().stream()
.filter(entry -> entry.getKey().location().getNamespace() == Chococraft.MOD_ID).map(entry -> entry.getValue());
.filter(entry -> entry.getKey().location().getNamespace().equals(Chococraft.MOD_ID)).map(entry -> entry.getValue());
return entityTypeStream;
}
}
Expand Down

0 comments on commit 46fc9e3

Please sign in to comment.