mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-06-09 22:40:23 +02:00
32 lines
968 B
Java
32 lines
968 B
Java
package de.ellpeck.prettypipes.pipe.modules;
|
|
|
|
import de.ellpeck.prettypipes.items.IModule;
|
|
import de.ellpeck.prettypipes.items.ModuleItem;
|
|
import de.ellpeck.prettypipes.items.ModuleTier;
|
|
import de.ellpeck.prettypipes.pipe.PipeTileEntity;
|
|
import net.minecraft.world.item.ItemStack;
|
|
|
|
public class LowPriorityModuleItem extends ModuleItem {
|
|
private final int priority;
|
|
|
|
public LowPriorityModuleItem(String name, ModuleTier tier) {
|
|
super(name);
|
|
this.priority = tier.forTier(-50, -100, -200);
|
|
}
|
|
|
|
@Override
|
|
public int getPriority(ItemStack module, PipeTileEntity tile) {
|
|
return this.priority;
|
|
}
|
|
|
|
@Override
|
|
public boolean isCompatible(ItemStack module, PipeTileEntity tile, IModule other) {
|
|
return !(other instanceof LowPriorityModuleItem) && !(other instanceof HighPriorityModuleItem);
|
|
}
|
|
|
|
@Override
|
|
public boolean hasContainer(ItemStack module, PipeTileEntity tile) {
|
|
return false;
|
|
}
|
|
}
|