mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +01:00
Style
This commit is contained in:
parent
e8dd55ee20
commit
0cebad1277
2 changed files with 9 additions and 11 deletions
|
@ -74,9 +74,9 @@ public abstract class UFarmland extends BlockFarmland {
|
|||
}
|
||||
|
||||
public boolean hasWater(World world, BlockPos pos) {
|
||||
return PosHelper.inRegion(pos.add(-4, 0, -4), pos.add(4, 1, 4)).anyMatch(p -> {
|
||||
return world.getBlockState(p).getMaterial() == Material.WATER;
|
||||
});
|
||||
return PosHelper.inRegion(pos.add(-4, 0, -4), pos.add(4, 1, 4)).anyMatch(p ->
|
||||
world.getBlockState(p).getMaterial() == Material.WATER
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -103,21 +103,19 @@ public class OreReplacer {
|
|||
|
||||
public void done() {
|
||||
log.info("Searching for ore replacements...");
|
||||
Streams.stream(ForgeRegistries.RECIPES).forEach(recipe -> {
|
||||
Streams.stream(ForgeRegistries.RECIPES).forEach(recipe ->
|
||||
remappers.stream()
|
||||
.filter(remapper -> remapper.canRemap(recipe))
|
||||
.findFirst()
|
||||
.ifPresent(remapper -> remapper.replaceIngredients(this, recipe));
|
||||
});
|
||||
.ifPresent(remapper -> remapper.replaceIngredients(this, recipe))
|
||||
);
|
||||
log.info("Replaced {} ingredients.", replacements);
|
||||
}
|
||||
|
||||
public boolean replaceOre(ItemStack stack, NonNullList<ItemStack> newStacks) {
|
||||
return ores.stream().filter(ore -> ore.matches(stack)).map(ore -> {
|
||||
ore.getSubItems(stack, newStacks);
|
||||
|
||||
return ore;
|
||||
}).findFirst().isPresent();
|
||||
return ores.stream().filter(ore -> ore.matches(stack)).peek(ore ->
|
||||
ore.getSubItems(stack, newStacks)
|
||||
).findFirst().isPresent();
|
||||
}
|
||||
|
||||
public interface IIngredientRemapper {
|
||||
|
|
Loading…
Reference in a new issue