This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made base class for both fluid and item filter covers, moved some bas…
…e classes also changed default redstone mode of pump and conveyor
- Loading branch information
Showing
8 changed files
with
70 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 39 additions & 1 deletion
40
common/src/main/java/muramasa/gregtech/cover/base/CoverFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,40 @@ | ||
package muramasa.gregtech.cover.base;public class CoverFilter { | ||
package muramasa.gregtech.cover.base; | ||
|
||
import muramasa.antimatter.capability.ICoverHandler; | ||
import muramasa.antimatter.cover.BaseCover; | ||
import muramasa.antimatter.cover.CoverFactory; | ||
import muramasa.antimatter.machine.Tier; | ||
import net.minecraft.core.Direction; | ||
import net.minecraft.nbt.CompoundTag; | ||
import net.minecraft.world.item.ItemStack; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class CoverFilter extends BaseCover { | ||
protected boolean blacklist = false; | ||
protected boolean ignoreNBT = false; | ||
public CoverFilter(@NotNull ICoverHandler<?> source, @Nullable Tier tier, Direction side, CoverFactory factory) { | ||
super(source, tier, side, factory); | ||
} | ||
|
||
@Override | ||
public ItemStack getDroppedStack() { | ||
ItemStack stack = super.getDroppedStack(); | ||
stack.getOrCreateTag().putBoolean("blacklist", blacklist); | ||
stack.getOrCreateTag().putBoolean("ignoreNBT", ignoreNBT); | ||
return stack; | ||
} | ||
|
||
@Override | ||
public void addInfoFromStack(ItemStack stack) { | ||
super.addInfoFromStack(stack); | ||
CompoundTag tag = stack.getTag(); | ||
blacklist = tag.getBoolean("blacklist"); | ||
ignoreNBT = tag.getBoolean("ignoreNBT"); | ||
} | ||
|
||
@Override | ||
public void onUpdate() { | ||
super.onUpdate(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters