mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-22 15:39:22 +01:00
updated to 1.18.2
This commit is contained in:
parent
bdd507885e
commit
9da43852dc
4 changed files with 8 additions and 9 deletions
|
@ -24,7 +24,7 @@ if (System.getenv('BUILD_NUMBER') != null) {
|
|||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||
|
||||
minecraft {
|
||||
mappings channel: 'official', version: '1.18.1'
|
||||
mappings channel: 'official', version: '1.18.2'
|
||||
|
||||
runs {
|
||||
client {
|
||||
|
@ -105,11 +105,11 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:1.18.1-39.0.5'
|
||||
minecraft 'net.minecraftforge:forge:1.18.2-40.0.3'
|
||||
embed 'org.jgrapht:jgrapht-core:1.5.1'
|
||||
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.47:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.47")
|
||||
compileOnly fg.deobf("mezz.jei:jei-1.18.2:9.4.1.117:api")
|
||||
runtimeOnly fg.deobf("mezz.jei:jei-1.18.2:9.4.1.117")
|
||||
|
||||
// to test the rf requiring and crafting stuff
|
||||
/* runtimeOnly fg.deobf("curse.maven:powah-352656:3057732")
|
||||
|
|
|
@ -3,6 +3,7 @@ package de.ellpeck.prettypipes.misc;
|
|||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
|
@ -23,7 +24,7 @@ public class ItemEquality {
|
|||
}
|
||||
|
||||
public static ItemEquality tag(ResourceLocation tag) {
|
||||
return new ItemEquality((stack, filter) -> stack.getItem().getTags().contains(tag), true, Type.TAG);
|
||||
return new ItemEquality((stack, filter) -> stack.getTags().anyMatch(t -> Objects.equals(tag, t.location())), true, Type.TAG);
|
||||
}
|
||||
|
||||
public static boolean compareItems(ItemStack stack, ItemStack filter, ItemEquality... types) {
|
||||
|
|
|
@ -126,7 +126,7 @@ public class PipeItem implements IPipeItem {
|
|||
currPipe = next;
|
||||
}
|
||||
} else {
|
||||
var dist = (this.currGoalPos).distSqr(this.x - 0.5F, this.y - 0.5F, this.z - 0.5F, false);
|
||||
var dist = (this.currGoalPos).distToLowCornerSqr(this.x - 0.5F, this.y - 0.5F, this.z - 0.5F);
|
||||
if (dist < currSpeed * currSpeed) {
|
||||
// we're past the start of the pipe, so move to the center of the next pipe
|
||||
BlockPos nextPos;
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package de.ellpeck.prettypipes.pipe.modules.modifier;
|
||||
|
||||
import de.ellpeck.prettypipes.misc.ItemFilter;
|
||||
import de.ellpeck.prettypipes.pipe.containers.AbstractPipeContainer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.inventory.MenuType;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.HashSet;
|
||||
|
@ -25,7 +23,7 @@ public class FilterModifierModuleContainer extends AbstractPipeContainer<FilterM
|
|||
for (var filter : this.tile.getFilters()) {
|
||||
for (var i = 0; i < filter.getSlots(); i++) {
|
||||
var stack = filter.getStackInSlot(i);
|
||||
unsortedTags.addAll(stack.getItem().getTags());
|
||||
stack.getTags().forEach(t -> unsortedTags.add(t.location()));
|
||||
}
|
||||
}
|
||||
return unsortedTags.stream().sorted().collect(Collectors.toList());
|
||||
|
|
Loading…
Reference in a new issue