mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-25 21:18:34 +01:00
Compare commits
6 commits
955652cd20
...
1e3ec07167
Author | SHA1 | Date | |
---|---|---|---|
1e3ec07167 | |||
5544f2c52d | |||
4a49e2518e | |||
7a44dc50ca | |||
a40389c548 | |||
75e5106866 |
7 changed files with 21 additions and 8 deletions
|
@ -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.6'
|
version = '1.12.7'
|
||||||
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'
|
||||||
|
|
||||||
|
|
|
@ -129,6 +129,7 @@ public class ItemFilter extends ItemStackHandler {
|
||||||
public void save() {
|
public void save() {
|
||||||
if (this.modified) {
|
if (this.modified) {
|
||||||
this.stack.getOrCreateTag().put("filter", this.serializeNBT());
|
this.stack.getOrCreateTag().put("filter", this.serializeNBT());
|
||||||
|
this.pipe.setChanged();
|
||||||
this.modified = false;
|
this.modified = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,11 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
|
||||||
public int getSlotLimit(int slot) {
|
public int getSlotLimit(int slot) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onContentsChanged(int slot) {
|
||||||
|
PipeBlockEntity.this.setChanged();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
public final Queue<NetworkLock> craftIngredientRequests = new LinkedList<>();
|
public final Queue<NetworkLock> craftIngredientRequests = new LinkedList<>();
|
||||||
public final List<Pair<BlockPos, ItemStack>> craftResultRequests = new ArrayList<>();
|
public final List<Pair<BlockPos, ItemStack>> craftResultRequests = new ArrayList<>();
|
||||||
|
@ -334,9 +339,8 @@ public class PipeBlockEntity extends BlockEntity implements MenuProvider, IPipeC
|
||||||
Stream.Builder<Pair<ItemStack, IModule>> builder = Stream.builder();
|
Stream.Builder<Pair<ItemStack, IModule>> builder = Stream.builder();
|
||||||
for (var i = 0; i < this.modules.getSlots(); i++) {
|
for (var i = 0; i < this.modules.getSlots(); i++) {
|
||||||
var stack = this.modules.getStackInSlot(i);
|
var stack = this.modules.getStackInSlot(i);
|
||||||
if (stack.isEmpty())
|
if (!stack.isEmpty() && stack.getItem() instanceof IModule module)
|
||||||
continue;
|
builder.accept(Pair.of(stack, module));
|
||||||
builder.accept(Pair.of(stack, (IModule) stack.getItem()));
|
|
||||||
}
|
}
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class ExtractionModuleItem extends ModuleItem {
|
||||||
this.maxExtraction = tier.forTier(1, 8, 64);
|
this.maxExtraction = tier.forTier(1, 8, 64);
|
||||||
this.speed = tier.forTier(20, 15, 10);
|
this.speed = tier.forTier(20, 15, 10);
|
||||||
this.filterSlots = tier.forTier(3, 6, 9);
|
this.filterSlots = tier.forTier(3, 6, 9);
|
||||||
this.preventOversending = tier.forTier(false, false, true);
|
this.preventOversending = tier.forTier(false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -74,7 +74,7 @@ public class FilterModifierModuleGui extends AbstractPipeGui<FilterModifierModul
|
||||||
public boolean mouseDragged(double mouseX, double mouseY, int i, double j, double k) {
|
public boolean mouseDragged(double mouseX, double mouseY, int i, double j, double k) {
|
||||||
if (this.isScrolling) {
|
if (this.isScrolling) {
|
||||||
var percentage = Mth.clamp(((float) mouseY - (this.topPos + 32 + 18)) / (58 - 15), 0, 1);
|
var percentage = Mth.clamp(((float) mouseY - (this.topPos + 32 + 18)) / (58 - 15), 0, 1);
|
||||||
var offset = (int) (percentage * (float) (this.tags.size() - 5));
|
var offset = Math.max(0, (int) (percentage * (float) (this.tags.size() - 5)));
|
||||||
if (offset != this.scrollOffset) {
|
if (offset != this.scrollOffset) {
|
||||||
this.scrollOffset = offset;
|
this.scrollOffset = offset;
|
||||||
this.updateWidgets();
|
this.updateWidgets();
|
||||||
|
|
|
@ -34,12 +34,12 @@
|
||||||
"item.prettypipes.filter_increase_modifier": "Filter Increase Modifier",
|
"item.prettypipes.filter_increase_modifier": "Filter Increase Modifier",
|
||||||
"item.prettypipes.random_sorting_modifier": "Random Sorting Modifier",
|
"item.prettypipes.random_sorting_modifier": "Random Sorting Modifier",
|
||||||
"item.prettypipes.round_robin_sorting_modifier": "Round Robin Sorting Modifier",
|
"item.prettypipes.round_robin_sorting_modifier": "Round Robin Sorting Modifier",
|
||||||
"info.prettypipes.extraction_module": "Pulls items from adjacent inventories\nFilters and pull rates vary by tier\nHigh tiers prevent over-sending",
|
"info.prettypipes.extraction_module": "Pulls items from adjacent inventories\nFilters and pull rates vary by tier\nMedium and high tiers prevent over-sending",
|
||||||
"info.prettypipes.filter_module": "Restricts flow from pipes into adjacent inventories\nFilter amount varies by tier",
|
"info.prettypipes.filter_module": "Restricts flow from pipes into adjacent inventories\nFilter amount varies by tier",
|
||||||
"info.prettypipes.speed_module": "Increases speed of items exiting adjacent inventories\nSpeed varies by tier",
|
"info.prettypipes.speed_module": "Increases speed of items exiting adjacent inventories\nSpeed varies by tier",
|
||||||
"info.prettypipes.low_priority_module": "Decreases the reception priority of adjacent inventories\nLower priority means items will prefer other inventories, regardless of distance",
|
"info.prettypipes.low_priority_module": "Decreases the reception priority of adjacent inventories\nLower priority means items will prefer other inventories, regardless of distance",
|
||||||
"info.prettypipes.high_priority_module": "Increases the reception priority of adjacent inventories\nHigher priority means items will prefer this inventory, regardless of distance",
|
"info.prettypipes.high_priority_module": "Increases the reception priority of adjacent inventories\nHigher priority means items will prefer this inventory, regardless of distance",
|
||||||
"info.prettypipes.retrieval_module": "Pulls items from other inventories in the network\nFilters and pull rates vary by tier\nHigh tiers prevent over-sending",
|
"info.prettypipes.retrieval_module": "Pulls items from other inventories in the network\nFilters and pull rates vary by tier\nMedium and high tiers prevent over-sending",
|
||||||
"info.prettypipes.stack_size_module": "Limits the amount of items that can enter adjacent inventories\nAutomatically prevents over-sending",
|
"info.prettypipes.stack_size_module": "Limits the amount of items that can enter adjacent inventories\nAutomatically prevents over-sending",
|
||||||
"info.prettypipes.damage_filter_modifier": "Causes any filter slots to filter by item damage",
|
"info.prettypipes.damage_filter_modifier": "Causes any filter slots to filter by item damage",
|
||||||
"info.prettypipes.nbt_filter_modifier": "Causes any filter slots to filter by item data (NBT)",
|
"info.prettypipes.nbt_filter_modifier": "Causes any filter slots to filter by item data (NBT)",
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"prettypipes:pipe",
|
||||||
|
"prettypipes:item_terminal",
|
||||||
|
"prettypipes:crafting_terminal",
|
||||||
|
"prettypipes:pressurizer"
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue