-
Notifications
You must be signed in to change notification settings - Fork 11
Finish 21.1/next #76
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
base: 21.1/next
Are you sure you want to change the base?
Finish 21.1/next #76
Conversation
|
i cannot guarantee high quality code but i know that this works, i can also maintain it and do bugfixes |
neoforge-main/src/main/java/dev/compactmods/crafting/client/render/GhostRenderer.java
Outdated
Show resolved
Hide resolved
...in/src/main/java/dev/compactmods/crafting/compat/jei/JeiMiniaturizationCraftingCategory.java
Outdated
Show resolved
Hide resolved
...in/src/main/java/dev/compactmods/crafting/compat/jei/JeiMiniaturizationCraftingCategory.java
Outdated
Show resolved
Hide resolved
...in/src/main/java/dev/compactmods/crafting/compat/jei/JeiMiniaturizationCraftingCategory.java
Outdated
Show resolved
Hide resolved
...in/src/main/java/dev/compactmods/crafting/compat/jei/JeiMiniaturizationCraftingCategory.java
Outdated
Show resolved
Hide resolved
.../main/java/dev/compactmods/crafting/compat/theoneprobe/providers/FieldProjectorProvider.java
Outdated
Show resolved
Hide resolved
.../main/java/dev/compactmods/crafting/compat/theoneprobe/providers/FieldProjectorProvider.java
Outdated
Show resolved
Hide resolved
neoforge-main/src/main/java/dev/compactmods/crafting/recipes/MiniaturizationRecipe.java
Outdated
Show resolved
Hide resolved
neoforge-main/src/main/java/dev/compactmods/crafting/recipes/MiniaturizationRecipe.java
Outdated
Show resolved
Hide resolved
neoforge-main/src/main/resources/data/compactcrafting/recipe/oak_door.json
Outdated
Show resolved
Hide resolved
|
|
||
| ItemPredicate.CODEC.fieldOf("catalyst") | ||
| .forGetter(MiniaturizationRecipe::catalystTest) | ||
| ItemStack.STRICT_CODEC.fieldOf("catalyst") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this to ItemPredicate.CODEC - it still exists in 21.1 and does not cause breaks
| ItemPredicate catalystPredicate = ItemPredicate.Builder.item() | ||
| .of(catalyst.getItem()) | ||
| .build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert to ItemPredicate, the old system worked fine
| } | ||
|
|
||
| @SubscribeEvent | ||
| public static void onRightClickBlock(final PlayerInteractEvent.RightClickBlock event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using an event for this instead of the block methods? The proxies share a base class.
| public record FieldCenter(BlockPos center) { | ||
| } | ||
|
|
||
| public static final Codec<FieldCenter> FIELD_CENTER_CODEC = RecordCodecBuilder.create(instance -> | ||
| instance.group( | ||
| BlockPos.CODEC.fieldOf("center").forGetter(FieldCenter::center) | ||
| ).apply(instance, FieldCenter::new) | ||
| ); | ||
|
|
||
| public static final StreamCodec<RegistryFriendlyByteBuf, FieldCenter> FIELD_CENTER_STREAM_CODEC = | ||
| StreamCodec.composite( | ||
| BlockPos.STREAM_CODEC, FieldCenter::center, | ||
| FieldCenter::new | ||
| ); | ||
|
|
||
| public static final DeferredHolder<DataComponentType<?>, DataComponentType<FieldCenter>> FIELD_CENTER = | ||
| DATA_COMPONENTS.registerComponentType( | ||
| "field_center", | ||
| builder -> builder | ||
| .persistent(FIELD_CENTER_CODEC) | ||
| .networkSynchronized(FIELD_CENTER_STREAM_CODEC) | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add a specialized record for one thing that already has a codec? Just use a block position.
| public abstract class BaseFieldProxyEntity extends BlockEntity { | ||
|
|
||
| @Nullable | ||
| public BlockPos fieldCenter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be protected not public
| @Nullable | ||
| protected IMiniaturizationField<MiniaturizationRecipe> field = null; | ||
|
|
||
| private UUID proxyId = UUID.randomUUID(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
| public UUID getProxyId() { | ||
| return proxyId; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a proxy ID?
| MiniaturizationRecipeComponents.STREAM_CODEC, MiniaturizationRecipe::components, | ||
| ItemStack.LIST_STREAM_CODEC, MiniaturizationRecipe::codecOutputs, | ||
| ByteBufCodecs.fromCodecWithRegistries(ItemPredicate.CODEC), MiniaturizationRecipe::catalystMatcher, | ||
| ItemStack.STREAM_CODEC, MiniaturizationRecipe::catalyst, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert to ItemPredicate
| public static MiniaturizationRecipe fromCodec(int craftTime, int recipeSize, List<IRecipeLayer> layers, | ||
| MiniaturizationRecipeComponents components, List<ItemStack> outputs, | ||
| ItemPredicate catalyst) { | ||
| ItemStack catalyst) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
No description provided.