Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.21.2 Port #324

Merged
merged 8 commits into from
Oct 23, 2024
Merged

1.21.2 Port #324

merged 8 commits into from
Oct 23, 2024

Conversation

Dragon-Seeker
Copy link
Member

Supersedes #321

Contains breaking changes for various aspects of API:

Breaking Changes:

  • AutoRegistryContainer has been deprecated for Item, Block, and EntityType due to the changes within Minecraft that make it quite useless
  • Other changes like passing Function to get RenderLayer and more
  • Some rendering seems to be broken regarding depth while testing within test mod screens

Other Changes:

  • Adjust Shader Impl to use vanilla and adjust loading to happen after the ShaderLoader
  • Recipe remainders required a rewrite of internal logic but should be intact
  • Mouse Drag and Keyboard capture injections changed but should be the same as before

I believe OwoUIDrawContext should change to allow for passing the Function to create RenderLayer to be similar to DrawContext so overall this will be marked as a draft for the time being

@BasiqueEvangelist
Copy link
Contributor

mfw superseding your own PR

@Dragon-Seeker
Copy link
Member Author

Yea, old one had some cring in it that was needing to be redone after finding out better methods to do some things


import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;

public class NinePatchTexture {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

honestly, is it even worth to keep this class? doesn't Minecraft have native nine-patched textures now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Frankly don't think it functions the same way and really up to glisco to decided

Comment on lines +17 to +25
/**
* Due to changes within 1.21.2 makes {@link AutoRegistryContainer} impossible due to requiring
* the {@link net.minecraft.registry.RegistryKey} leading to the need to supplier the key before
* fully creating the desired entry.
* </br></br>
* Recommend using Minecraft methods for registering such entry
*/
@Deprecated(forRemoval = true)
public interface BlockRegistryContainer /*extends AutoRegistryContainer<Block>*/ {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're removing all methods and making the interface basically useless why not just remove it?
in any case imo this and the item registry container should be able to be saved if they're changed to work more like in the field registration adjustments pr

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done such as a way to illustrate why it was removed, can be removed if such is not desired but find this more helpful than just removing outright

Comment on lines +7 to +13
/**
* Due to changes within 1.21.2 makes {@link AutoRegistryContainer} impossible due to requiring
* the {@link net.minecraft.registry.RegistryKey} leading to the need to supplier the key before
* fully creating the desired entry.
* </br></br>
* Recommend using Minecraft methods for registering such entry
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as for BlockRegistryContainer

Comment on lines +3 to +10
/**
* Due to changes within 1.21.2 makes {@link AutoRegistryContainer} impossible due to requiring
* the {@link net.minecraft.registry.RegistryKey} leading to the need to supplier the key before
* fully creating the desired entry.
* </br></br>
* Recommend using Minecraft methods for registering such entry
*/
@Deprecated(forRemoval = true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as for BlockRegistryContainer

src/main/java/io/wispforest/owo/shader/GlProgram.java Outdated Show resolved Hide resolved
src/main/java/io/wispforest/owo/ui/core/Size.java Outdated Show resolved Hide resolved
@gliscowo gliscowo marked this pull request as ready for review October 23, 2024 15:14
@gliscowo gliscowo changed the base branch from 1.21 to 1.21.2 October 23, 2024 15:14
@gliscowo gliscowo merged commit 041a308 into wisp-forest:1.21.2 Oct 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants