mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-07-01 06:36:35 +02:00
32 lines
916 B
Java
32 lines
916 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.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);
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean hasContainer(ItemStack module, PipeTileEntity tile) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|