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) {
|
public boolean hasWater(World world, BlockPos pos) {
|
||||||
return PosHelper.inRegion(pos.add(-4, 0, -4), pos.add(4, 1, 4)).anyMatch(p -> {
|
return PosHelper.inRegion(pos.add(-4, 0, -4), pos.add(4, 1, 4)).anyMatch(p ->
|
||||||
return world.getBlockState(p).getMaterial() == Material.WATER;
|
world.getBlockState(p).getMaterial() == Material.WATER
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -103,21 +103,19 @@ public class OreReplacer {
|
||||||
|
|
||||||
public void done() {
|
public void done() {
|
||||||
log.info("Searching for ore replacements...");
|
log.info("Searching for ore replacements...");
|
||||||
Streams.stream(ForgeRegistries.RECIPES).forEach(recipe -> {
|
Streams.stream(ForgeRegistries.RECIPES).forEach(recipe ->
|
||||||
remappers.stream()
|
remappers.stream()
|
||||||
.filter(remapper -> remapper.canRemap(recipe))
|
.filter(remapper -> remapper.canRemap(recipe))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresent(remapper -> remapper.replaceIngredients(this, recipe));
|
.ifPresent(remapper -> remapper.replaceIngredients(this, recipe))
|
||||||
});
|
);
|
||||||
log.info("Replaced {} ingredients.", replacements);
|
log.info("Replaced {} ingredients.", replacements);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean replaceOre(ItemStack stack, NonNullList<ItemStack> newStacks) {
|
public boolean replaceOre(ItemStack stack, NonNullList<ItemStack> newStacks) {
|
||||||
return ores.stream().filter(ore -> ore.matches(stack)).map(ore -> {
|
return ores.stream().filter(ore -> ore.matches(stack)).peek(ore ->
|
||||||
ore.getSubItems(stack, newStacks);
|
ore.getSubItems(stack, newStacks)
|
||||||
|
).findFirst().isPresent();
|
||||||
return ore;
|
|
||||||
}).findFirst().isPresent();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IIngredientRemapper {
|
public interface IIngredientRemapper {
|
||||||
|
|
Loading…
Reference in a new issue