Conduits #127
No reviewers
Labels
No labels
Area-Assets
Area-Backend
Area-Conduits
Area-Datapacks
Area-Lang
Area-Mod Compat
Area-Parity
Area-Rendering
Good first issue
MC-1.19.2
MC-1.20.1
MC-1.20.4
MC-1.20.6
MC-1.21
MC-1.21.1
Modtoberfest
P-0-High
P-1-Medium
P-2-Low
Status-Awaiting Response
Status-Behind-Flag
Status-Blocked
Status-Cannot Reproduce
Status-Duplicate
Status-Help Wanted
Status-Incomplete Report
Status-Invalid
Status-Needs LTS Backport
Status-Needs Updating
Status-Stale
Status-To Implement
Status-Triage
Status-Wontfix
Status-Wontmerge
Type-Backport
Type-Bug
Type-Documentation
Type-Enhancement
Type-Question
Type-RFC
Type-Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Team-EnderIO/EnderIO#127
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "collab/conduits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Merging work on conduits into main branches.
Thanks a bunch to @agnor99 who did all of the work, I'm just helping merge this stuff in.
Todo
Checklist:
A big review, mostly formatting things and future works, but a couple questions for @agnor99 if you have time please :) I verified mostly code health rather than validating functionality as this has been pretty extensively tested thusfar anyway.
Remove this
This will be re-enabled when merging in #129
@ -0,0 +1,28 @@package com.enderio.api.conduit;Newline
@ -0,0 +56,4 @@return Minecraft.getInstance().getModelManager().getModel(model);}/**Newline
@ -0,0 +12,4 @@boolean hasUpgrade();default boolean showBarSeperator() {newline
@ -0,0 +81,4 @@return cast();}static Supplier<EmptyExtendedConduitData> dummy() {newlines
@ -0,0 +1,76 @@package com.enderio.api.conduit;newline
@ -0,0 +1,74 @@package com.enderio.api.conduit;newline
@ -0,0 +22,4 @@import java.util.List;public interface IIOAwareConduitTicker extends ILoadedAwareConduitTicker {@Overridenewline
@ -0,0 +23,4 @@public interface IIOAwareConduitTicker extends ILoadedAwareConduitTicker {@Overridedefault void tickGraph(IConduitType<?> type, List<NodeIdentifier<?>> loadedNodes, ServerLevel level, Graph<Mergeable.Dummy> graph) {Method formatting
@ -0,0 +62,4 @@}}return state.control().isActive(hasRedstone);}newline
@ -0,0 +36,4 @@inserted += insert.receiveEnergy(availableForExtraction - inserted, false);if (inserted == availableForExtraction)break;}Newlines
@ -0,0 +15,4 @@}default void onModConstruct() {newline
@ -0,0 +12,4 @@public static Component REDSTONE_ACTIVE_WITH_SIGNAL;public static Component REDSTONE_ACTIVE_WITHOUT_SIGNAL;public static Component REDSTONE_NEVER_ACTIVE;newline
@ -0,0 +1,59 @@package com.enderio.conduits.client;Format
@agnor99 Where was this method from so I can AT it?
@ -0,0 +32,4 @@private static TextureAtlas blockAtlas() {return Minecraft.getInstance().getModelManager().getAtlas(InventoryMenu.BLOCK_ATLAS);}newline
@ -0,0 +45,4 @@@Overridepublic List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, RandomSource rand, ModelData extraData,@Nullable RenderType renderType) {List<BakedQuad> quads = new ArrayList<>();Formatting
@ -0,0 +1,188 @@package com.enderio.conduits.common;Can this be removed?
@ -0,0 +26,4 @@private VoxelShape totalShape = core;public ConduitShape() {Newline
@ -0,0 +1,523 @@package com.enderio.conduits.common.blockentity;Can these be removed?
@ -0,0 +267,4 @@}}if (level instanceof ServerLevel serverLevel) {Newline
@ -0,0 +479,4 @@@Overridepublic boolean isItemValid(int slot, @NotNull ItemStack stack) {//TODO implementDoes this need implementing? If so what does it need?
@ -0,0 +49,4 @@* @return the type that is now not in this bundle*/public RightClickAction addType(Level level, IConduitType<?> type, Player player) {if (types.size() == MAX_CONDUIT_TYPES)Format
@ -0,0 +251,4 @@}//TODO: RFCWhats this for, shall we discuss here @agnor99?
@ -0,0 +279,4 @@facadeTextures.put(direction, facade);}//TODO, make this method more useableWhat does this mean?
@ -0,0 +163,4 @@private Optional<InteractionResult> addConduit(ConduitBlockEntity conduit, Player player, ItemStack stack, boolean isClientSide) {if (!(stack.getItem() instanceof ConduitBlockItem conduitBlockItem))return Optional.empty();EnderIO.LOGGER.info("rightclicked with conduititem: " + ConduitTypes.getRegistry().getKey(conduitBlockItem.getType()) + " @ " + conduit.getBlockPos().toShortString());Tbh we should do a PR reviewing all logger uses, because to me these should all be debug logs.
@ -0,0 +24,4 @@public static final ItemEntry<Item> POWER = createConduitItem(() -> EnderConduitTypes.POWER.get(), "power1");public static final ItemEntry<Item> POWER2 = createConduitItem(() -> EnderConduitTypes.POWER2.get(), "power2");public static final ItemEntry<Item> POWER3 = createConduitItem(() -> EnderConduitTypes.POWER3.get(), "power3");Going to keep the 3 tiers here for now, but I believe consensus was we're going to rework power and remove transfer caps, is that right @agnor99?
@ -0,0 +15,4 @@public static final ResourceLocation ICON_TEXTURE = EnderIO.loc("textures/gui/conduit_icon.png");public static final RegistryObject<PowerConduitType> POWER = powerConduit(1, 1280, new Vector2i(0,24));public static final RegistryObject<PowerConduitType> POWER2 = powerConduit(2, 5120, new Vector2i(0,48));public static final RegistryObject<PowerConduitType> POWER3 = powerConduit(3, 20480, new Vector2i(0,72));Same story with power here
@ -0,0 +1,143 @@package com.enderio.conduits.common.integrations.ae2;Newline
@ -0,0 +61,4 @@mainNode.loadFromNBT(nbt);}void onSecurityBreach() {Note for 1.20.1 porting: This will all be binned I believe as AE2 doesnt have security stuff anymore.
@ -0,0 +87,4 @@}public boolean canPlayerModify(Player player) {//TODO add checkWhat check are we missing here?
@ -0,0 +35,4 @@}private ConduitSavedData() {Newline
@ -0,0 +1,151 @@package com.enderio.conduits.common.types;Yeup forgot I still had to do these
@ -0,0 +1,87 @@package com.enderio.conduits.common.types;Newline
@ -122,6 +122,11 @@ public class EnumIconWidget<T extends Enum<T> & IIcon, U extends Screen & IEnderTooltips here too :)
@ -224,15 +229,15 @@ public class EnumIconWidget<T extends Enum<T> & IIcon, U extends Screen & IEnderif (getter.get() != value) {Fix what? I'll take another look in a bit
@ -0,0 +13,4 @@public class ListDataSlot<T, V extends Tag> extends EnderDataSlot<List<T>> {private final Function<T, V> serializer;private final Function<V, T> deSerializer;Newline
@ -283,2 +283,4 @@ResourceLocation id = new ResourceLocation(obj.get("tag").getAsString());TagKey<Item> tag = ItemTags.create(id);// TODO: move these tests into OutputItem instead..What are these checks added for? I think I can leave these for a future 1.20 todo cleanup pass though.
@ -0,0 +15,4 @@import java.util.List;public record PaintingQuadTransformer(BlockState paint, RenderType type) implements IQuadTransformer {If this is what I think it is; is there any way to make the purple and grey box things render with a nicer texture?
@ -283,2 +283,4 @@ResourceLocation id = new ResourceLocation(obj.get("tag").getAsString());TagKey<Item> tag = ItemTags.create(id);// TODO: move these tests into OutputItem instead..I think that invalid recipes (ingredients without valid items (empty tags, missing mods) etc. ) are not registered and don't pollute the recipe search, but it really shouldn't be in this PR
@ -283,2 +283,4 @@ResourceLocation id = new ResourceLocation(obj.get("tag").getAsString());TagKey<Item> tag = ItemTags.create(id);// TODO: move these tests into OutputItem instead..That's all good then, I'll leave it in there and it can get picked up again (one day ™️)
@ -0,0 +15,4 @@import java.util.List;public record PaintingQuadTransformer(BlockState paint, RenderType type) implements IQuadTransformer {Resolved in discord, i didn't understand this part :P
@ -0,0 +1,188 @@package com.enderio.conduits.common;Removing
@ -0,0 +1,523 @@package com.enderio.conduits.common.blockentity;Removing
Going to merge this for now; TODOs left over can be addressed in future. Going to try for a swifter pace.
Thanks a lot @agnor99 and @wahfl2 for your ace work on this!