Uh oh!
There was an error while loading. Please reload this page.
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| ItemPredicate.CODEC.fieldOf("catalyst") | ||
| .forGetter(MiniaturizationRecipe::catalystTest) | ||
| ItemStack.STRICT_CODEC.fieldOf("catalyst") |
There was a problem hiding this comment.
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.
Revert to ItemPredicate, the old system worked fine
| } | ||
| @SubscribeEvent | ||
| public static void onRightClickBlock(final PlayerInteractEvent.RightClickBlock event) { |
There was a problem hiding this comment.
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.
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.
Should be protected not public
| @Nullable | ||
| protected IMiniaturizationField<MiniaturizationRecipe> field = null; | ||
| private UUID proxyId = UUID.randomUUID(); |
| public UUID getProxyId() { | ||
| return proxyId; | ||
| } |
| MiniaturizationRecipeComponents.STREAM_CODEC, MiniaturizationRecipe::components, | ||
| ItemStack.LIST_STREAM_CODEC, MiniaturizationRecipe::codecOutputs, | ||
| ByteBufCodecs.fromCodecWithRegistries(ItemPredicate.CODEC), MiniaturizationRecipe::catalystMatcher, | ||
| ItemStack.STREAM_CODEC, MiniaturizationRecipe::catalyst, |
| public static MiniaturizationRecipe fromCodec(int craftTime, int recipeSize, List<IRecipeLayer> layers, | ||
| MiniaturizationRecipeComponents components, List<ItemStack> outputs, | ||
| ItemPredicate catalyst) { | ||
| ItemStack catalyst) { |
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.