mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-25 13:08:34 +01:00
Compare commits
No commits in common. "e340f52fb4e1152a3786d48627b3bfb160a90116" and "b63799893800b432dd749db83dd5fc7c6aba6aa2" have entirely different histories.
e340f52fb4
...
b637998938
4 changed files with 10 additions and 9 deletions
10
build.gradle
10
build.gradle
|
@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'maven-publish'
|
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
|
group = 'de.ellpeck.prettypipes' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = 'PrettyPipes'
|
archivesBaseName = 'PrettyPipes'
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ if (System.getenv('BUILD_NUMBER') != null) {
|
||||||
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
mappings channel: 'official', version: '1.18.2'
|
mappings channel: 'official', version: '1.18.1'
|
||||||
|
|
||||||
runs {
|
runs {
|
||||||
client {
|
client {
|
||||||
|
@ -105,11 +105,11 @@ configurations {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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'
|
embed 'org.jgrapht:jgrapht-core:1.5.1'
|
||||||
|
|
||||||
compileOnly fg.deobf("mezz.jei:jei-1.18.2:9.4.1.117:api")
|
compileOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.47:api")
|
||||||
runtimeOnly fg.deobf("mezz.jei:jei-1.18.2:9.4.1.117")
|
runtimeOnly fg.deobf("mezz.jei:jei-1.18.1:9.1.0.47")
|
||||||
|
|
||||||
// to test the rf requiring and crafting stuff
|
// to test the rf requiring and crafting stuff
|
||||||
/* runtimeOnly fg.deobf("curse.maven:powah-352656:3057732")
|
/* runtimeOnly fg.deobf("curse.maven:powah-352656:3057732")
|
||||||
|
|
|
@ -3,7 +3,6 @@ package de.ellpeck.prettypipes.misc;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
@ -24,7 +23,7 @@ public class ItemEquality {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ItemEquality tag(ResourceLocation tag) {
|
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) {
|
public static boolean compareItems(ItemStack stack, ItemStack filter, ItemEquality... types) {
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class PipeItem implements IPipeItem {
|
||||||
currPipe = next;
|
currPipe = next;
|
||||||
}
|
}
|
||||||
} else {
|
} 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) {
|
if (dist < currSpeed * currSpeed) {
|
||||||
// we're past the start of the pipe, so move to the center of the next pipe
|
// we're past the start of the pipe, so move to the center of the next pipe
|
||||||
BlockPos nextPos;
|
BlockPos nextPos;
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
package de.ellpeck.prettypipes.pipe.modules.modifier;
|
package de.ellpeck.prettypipes.pipe.modules.modifier;
|
||||||
|
|
||||||
|
import de.ellpeck.prettypipes.misc.ItemFilter;
|
||||||
import de.ellpeck.prettypipes.pipe.containers.AbstractPipeContainer;
|
import de.ellpeck.prettypipes.pipe.containers.AbstractPipeContainer;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.inventory.MenuType;
|
import net.minecraft.world.inventory.MenuType;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -23,7 +25,7 @@ public class FilterModifierModuleContainer extends AbstractPipeContainer<FilterM
|
||||||
for (var filter : this.tile.getFilters()) {
|
for (var filter : this.tile.getFilters()) {
|
||||||
for (var i = 0; i < filter.getSlots(); i++) {
|
for (var i = 0; i < filter.getSlots(); i++) {
|
||||||
var stack = filter.getStackInSlot(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());
|
return unsortedTags.stream().sorted().collect(Collectors.toList());
|
||||||
|
|
Loading…
Reference in a new issue