Skip to content

Conversation

@Leclowndu93150
Copy link

No description provided.

@Leclowndu93150
Copy link
Author

Leclowndu93150 commented Sep 24, 2025

i cannot guarantee high quality code but i know that this works, i can also maintain it and do bugfixes

@Leclowndu93150 Leclowndu93150 marked this pull request as ready for review September 25, 2025 01:02

ItemPredicate.CODEC.fieldOf("catalyst")
.forGetter(MiniaturizationRecipe::catalystTest)
ItemStack.STRICT_CODEC.fieldOf("catalyst")
Copy link
Collaborator

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

Comment on lines +182 to +184
ItemPredicate catalystPredicate = ItemPredicate.Builder.item()
.of(catalyst.getItem())
.build();
Copy link
Collaborator

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) {
Copy link
Collaborator

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.

Comment on lines +21 to +42
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)
);
Copy link
Collaborator

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;
Copy link
Collaborator

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();
Copy link
Collaborator

Choose a reason for hiding this comment

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

???

Comment on lines +117 to +119
public UUID getProxyId() {
return proxyId;
}
Copy link
Collaborator

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,
Copy link
Collaborator

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) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Revert

@stale
Copy link

stale bot commented Nov 6, 2025

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.

@stale stale bot added the stale label Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants