Compare commits

..

No commits in common. "e340f52fb4e1152a3786d48627b3bfb160a90116" and "b63799893800b432dd749db83dd5fc7c6aba6aa2" have entirely different histories.

4 changed files with 10 additions and 9 deletions

View file

@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
version = '1.12.0'
version = '1.11.0'
group = 'de.ellpeck.prettypipes' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'PrettyPipes'
@ -24,7 +24,7 @@ if (System.getenv('BUILD_NUMBER') != null) {
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
minecraft {
mappings channel: 'official', version: '1.18.2'
mappings channel: 'official', version: '1.18.1'
runs {
client {
@ -105,11 +105,11 @@ configurations {
}
dependencies {
minecraft 'net.minecraftforge:forge:1.18.2-40.0.3'
minecraft 'net.minecraftforge:forge:1.18.1-39.0.5'
embed 'org.jgrapht:jgrapht-core:1.5.1'
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")
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")
// to test the rf requiring and crafting stuff
/* runtimeOnly fg.deobf("curse.maven:powah-352656:3057732")

View file

@ -3,7 +3,6 @@ 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;
@ -24,7 +23,7 @@ public class ItemEquality {
}
public static ItemEquality tag(ResourceLocation tag) {
return new ItemEquality((stack, filter) -> stack.getTags().anyMatch(t -> Objects.equals(tag, t.location())), true, Type.TAG);
return new ItemEquality((stack, filter) -> stack.getItem().getTags().contains(tag), true, Type.TAG);
}
public static boolean compareItems(ItemStack stack, ItemStack filter, ItemEquality... types) {

View file

@ -126,7 +126,7 @@ public class PipeItem implements IPipeItem {
currPipe = next;
}
} else {
var dist = (this.currGoalPos).distToLowCornerSqr(this.x - 0.5F, this.y - 0.5F, this.z - 0.5F);
var dist = (this.currGoalPos).distSqr(this.x - 0.5F, this.y - 0.5F, this.z - 0.5F, false);
if (dist < currSpeed * currSpeed) {
// we're past the start of the pipe, so move to the center of the next pipe
BlockPos nextPos;

View file

@ -1,10 +1,12 @@
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;
@ -23,7 +25,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);
stack.getTags().forEach(t -> unsortedTags.add(t.location()));
unsortedTags.addAll(stack.getItem().getTags());
}
}
return unsortedTags.stream().sorted().collect(Collectors.toList());