Feature/creative tab - #46
Conversation
|
Here we are ! |
|
The Creative tab rewrite is a nice change, and I do think something along those lines is needed. The OpenPrinter changes are the part I’m not comfortable merging, though. OpenPrinter was intentionally integrated while still being kept separate internally, including remaining in Java, so porting it to Scala and folding it directly into the main codebase goes against that structure. If you’d like to remove the OpenPrinter changes and resubmit the Creative tab work on its own, I’d be happy to review that. |
|
Regarding OpenPrinter, I'd appreciate a quick clarification: when I suggested removing it from the mod, I understood from your response that OpenPrinter is intended to be integrated directly into OpenComputers. Is the plan to make OpenPrinter a standalone/independent mod again in the long term, or will it remain folded into the main repository? if OpenPrinter is meant to remain inside the repository long-term, what is the reasoning behind keeping it internally separated (and in Java) rather than fully integrating it into the main Scala codebase? Why should OpenSecurity remain a separate mod while OpenPrinter has to stay in this awkward state? Is your discomfort more about the change of language, or the change of structure? As a quick piece of feedback on OpenPrinter: having worked on it, I found that maintaining two very distinct architectural patterns and languages (Java and Scala) in the same repository creates noticeable friction. Aligning it with the rest of the codebase would make maintenance much easier moving forward. Before I touch anything, I want to make sure I fully understand so we can avoid this kind of issue in the future. |
dev/engine_room/flywheel/api/visualization/VisualizationLevel
Use direct registry access for item stack serialization so tablet updates don't call the server lifecycle hook on the client.
Reimplements PR CaitlynMainer#39 with the component clear methods. Needs review before merge. # Conflicts: # src/main/scala/li/cil/oc/common/init/OCItems.scala # src/main/scala/li/cil/oc/common/item/traits/SimpleItem.scala
Per asie.
Restores flat-array disassembly results for Microcontrollers and other template-based devices. Preserves the original item when a callback fails, and removes empty placeholder outputs from Microcontroller and Drone disassembly. Fixes CaitlynMainer#41
Previously the color was stored using item damage, like we're back in Minecraft 1.12. However, getDamageValue clamps the value to the max damage (which is zero here), so the block/item is never tinted correctly. It's much cleaner to use a dedicated component, which we now do. We now also datagen the remaining recipes and loot tables for chamelium.
Stollen with permission from CC:Tweaked.
TextBuffers could load blank when restored in a different chunk from where they were saved.
Render in-hand tablets through the supplied render buffer to preserve ordering with ImmediatelyFast. Use shader-compatible textured quads for tablet and terminal backgrounds. Write depth for opaque backgrounds to prevent transparency and angle-dependent overlap. Add UV coordinates required by Iris shader hand passes.
� Conflicts: � src/main/resources/assets/opencomputers/textures/gui/banner.png � src/main/resources/assets/opencomputers/textures/gui/banner.png~
bafb8a5 to
1dfe1bb
Compare
|
The check fail but in work on my machine.... How can we get logs ? I’ve completed all the requested changes. Everything should be good to go now—let me know if anything else needs tweaking! |
|
I’ll merge this once you resolve the conflict introduced by the latest PR merge in OCItems.scala and remove the unrelated Machine.scala async-beep change, which had already been removed before this fork. I can handle the remaining issues separately. |
|
Unrelated Machine.scala async-beep change removed ! Conflict introduced by the latest PR merge in OCItems.scala removed ! Hemaining issues handled by an other PR ! |
|
Can we now discuss the fate of OpenPrinter? I would at least like to understand your vision for the matter. Personally, my issue lies with the OCDevice, DeviceMenu, and DeviceScreen classes. Anyway, I might have a compulsive urge to make everything uniform.......... |
|
To be clear, I don't think anybody is arguing that OpenPrinters is in a perfect state, but more that it's very low on the priority list. There's a lot of larger parts of the main mod which need modernising first.
There's definitely a desire to have more (possibly eventually all) of the mod in Java, but moving away from that is going to have to be an incremental process. There's a lot of places relying on traits for instance, which will obviously not work on Java, so needs a bit of a rethink. |
|
Okay, I understand that point of view. I've tasked a friend with translating the doc/ file and the .lang files into the languages using AI (with a Python script and Ollama). Personally, I speak Italian and French, and I'm still looking for other friends to proofread and verify the other languages. I'd like to add a feature I'd already tried to implement as a mod addon, but I couldn't develop it further due to a lack of control over machine.scala. But if there are higher priorities, I still have about ten days of free time to dedicate to this. EDIT: In any case, please know that I love your work. I’ve tried porting it to a modern version several times in the past, but I always hit a wall. Even with Java, I’m not a professional—I’m a C developer—so I still have a lot to learn. |
Please do not add more AI back into this fork. We are working hard to remove as much of it as we possibly can. I fully acknowledge that this port started from someone using AI and that we have anything usable at all as a result of said use, but given the sentiment around the use of AI in creative endeavors like these in general, I'd recommend thinking long-term and not burning bridges. Besides, IME, if you are not qualified to do whatever it is yourself, you are probably not qualified to direct an AI to do it.
Keep several things in mind here:
|
|
Good evening, Regarding the use of AI:
Regarding the team... I WANT IN. It's my favorite mod, and thanks to my mastery of C, I handle Java well; plus, I view Scala as a blend of OCaml and Java, so it suits me fine. Plus, I need to learn how to use GitHub properly, and there's no better way to do that than by actually using it. |
|
I agree with not using Al in the development of the mod, because if you don't know how to do something yourself, you can't ask an Al to do it and be sure it's correct. However, I don't know anyone who could translate from English into Italian, French, Mexican Portuguese, European Portuguese, Traditional Chinese, Simplified Chinese, and German. On the other hand, language models are specifically designed to "understand" and "express" themselves fluently in all these languages. To me, translation is one of the only areas where it [makes sense to use them]. |
|
That said, that’s not the subject of this PR—it’s finished! |
There was a problem hiding this comment.
Attempted to load class net/minecraft/client/gui/GuiGraphics for invalid dist DEDICATED_SERVER
CreativeTab is loaded on both Client and Server, you can't have client rendering code in a common location.
There was a problem hiding this comment.
Also with this PR in place I am no longer able to register floppies directly from external mods, all floppy names seem to be forced to their internal name, and I am unable to register an item to the OC creative tab from another mod.
There was a problem hiding this comment.
The renderBannersn method wasn't even being called, but that simple declaration was what caused the error—I never would have guessed. So, I moved it.
There was a problem hiding this comment.
Normally, you can continue adding items to the end of the tab just as before, since I’m not adding padding at the end.
When using the API, floppy disks and EEPROMs should already appear in the tab.
To be able to add items to a section, a method would need to be added to li.cil.oc.api.Items.java.
kind of :
// in li.cil.oc.api.Items.java
public static void registerStack(ItemStack stack, String name, String section_id) {
if (API.items != null)
API.items.registerStack(stack, name, section_id);
}// in li.cil.oc.common.init.OCItems.scala
def registerStack(stack: ItemStack, id: String, section_id : String): ItemStack = {
val immutableStack = stack.copy()
ITEM_TO_SECTION.put(id, section_id);
descriptors += id -> new ItemInfo {
override def name: String = id
override def block = null
override def createItemStack(size: Int): ItemStack = {
val copy = immutableStack.copy()
copy.setCount(size)
copy
}
override def item: Item = immutableStack.getItem
}
stack
}However, this entails a significant change to the API.
A comment in li.cil.oc.api.CreativeTab should be used to explain how to register items in a section.
(It doesn't seem ideal to me, but if it works for you, it works for me.)
(I haven't committed anything for this yet because I'm waiting to see if you have a better idea.)
Thanks for the review!
feat(creative-tab): Better Creative Tab & OpenPrinter Reimplementation
Description
This PR overhauls the creative tab organization and deeply integrates OpenPrinter directly into OpenComputers.
Inspired by the section-based layout in Create: Aeronautics, the goal was to streamline item organization and make browsing mod content far more intuitive. What initially seemed like a simple tab reorganization revealed deeper architectural differences in how OpenPrinter was structured compared to OpenComputers. To make OpenPrinter feel like a native, seamless part of the OpenComputers ecosystem rather than an externally grafted addon, OpenPrinter was reimplemented directly into the main codebase.
Key Changes