Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ After publishing, the action commits the next development version and changelog

## Unreleased

- Craft a cutlery set with three iron nuggets above three sticks. Hold use to cut a serving into four bites, or set the utensils beside a small plate and eat with both hands empty. Right-click the utensils to take them back.

- Picking up a clay block or a clay ball unlocks the pottery wheel and both blank template recipes. A stamped template unlocks the recipe to turn it back into a blank of the same size.
- Hold fired pottery in your main hand and a flat item in your offhand to stamp its icon at the painting table. Each changed colored square uses 1 mL of matching dye. The table lists every missing color before spending paint.
- Older flower-painted pots now store their design as individual paint squares that you can edit at the painting table.
- Serve carrots, potatoes, and other edible crops on plates. A wide, shallow shape on the large template makes a serving platter with six wedges. Aim at a wedge to set down, eat, or take one portion. Crumbs rise from that serving while you eat.
- Shift-right-click an empty plate with an empty hand to pick it up. If the plate holds an item, the first click takes the item. Release and click again to take the plate.
- Hold right-click with an empty hand to eat from a plate. The food stays on the plate until you finish, and releasing early leaves it there. If you can’t eat the food, right-click picks it up. Shift-right-click takes any displayed item and leaves the plate in place, even when your hands are full. Plates need at least 80% of the small template’s radius and have no liquid capacity or lid.
- Large displays of matching pottery render faster. Filled pots reuse their liquid surface until the level changes, and wheels reuse their wooden guides until you change the blueprint.
- Use the new painting table while holding fired pottery. Paint one face and the pattern repeats around the vessel. Each square costs 1 mL of paint, and one matching dye refills 100 mL. You can erase squares or undo your last stroke.
- Shape a shallow small pot to make a plate. Paint from its center to its rim and place up to four plates along the edges of a block. Right-click an open plate with a non-block item to display one, then use an empty hand to take it back.
- Shape a shallow, wide piece on a small template to make a plate. Paint from its center to its rim and place up to four plates along the edges of a block. Right-click a plate with a non-block item to display one. An empty hand picks up displayed non-food items.
- Shape and hollow clay directly on the template. Hover to see the ring you’re editing, adjust the height with − and +, and undo strokes before stamping the blueprint. The editor keeps clay around the hollow at narrow shoulders and shows how many mL it will hold. Drag the preview to see how four small pots or one large pot will sit on a block.
- A small template gives you 16 × 16 × 16 units of clay. Use a clay ball on the wheel to throw a vessel that holds up to 1,000 mL. Craft a clay block with a stick for a 32 × 32 × 32 large template. A large vessel takes a clay block, holds up to 4,000 mL, and has a lid fitted to its outer rim.
- New templates start as open-mouthed jugs. Thrown and placed pots have smoother curves, and capacity follows the hollow from floor to lip, even near the template’s size limit. Fired pots and lids have the reddish grain of a flower pot, with smoother lighting around the belly and shoulders. Dyed pottery keeps the grain in its chosen color.
Expand Down
Binary file modified art/primal-pottery.spritepack
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.fabricmc.fabric.api.creativetab.v1.FabricCreativeModeTab;
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
import net.fabricmc.fabric.api.event.player.PlayerPickItemEvents;
import net.fabricmc.fabric.api.event.player.UseBlockCallback;
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.minecraft.core.Registry;
Expand All @@ -17,6 +18,8 @@
import net.modcrafters.minecraft.primalpottery.particle.ClayFleck;
import net.modcrafters.minecraft.primalpottery.recipe.ModRecipes;
import net.modcrafters.minecraft.primalpottery.network.LidPayload;
import net.modcrafters.minecraft.primalpottery.network.IconStampPayload;
import net.modcrafters.minecraft.primalpottery.block.PaintingTableBlock;
import net.modcrafters.minecraft.primalpottery.network.LidSync;
import net.modcrafters.minecraft.primalpottery.network.PlacedLidPayload;
import net.modcrafters.minecraft.primalpottery.network.PlacedLidSync;
Expand All @@ -42,6 +45,9 @@ public void onInitialize() {
.build()
);
PayloadTypeRegistry.serverboundPlay().register(TemplatePayload.TYPE, TemplatePayload.STREAM_CODEC);
PayloadTypeRegistry.serverboundPlay().register(IconStampPayload.TYPE, IconStampPayload.STREAM_CODEC);
ServerPlayNetworking.registerGlobalReceiver(IconStampPayload.TYPE, (payload, context) ->
PaintingTableBlock.applyStamp(context.player(), payload));
PayloadTypeRegistry.serverboundPlay().register(LidPayload.TYPE, LidPayload.STREAM_CODEC);
PayloadTypeRegistry.serverboundPlay().register(PlacedLidPayload.TYPE, PlacedLidPayload.STREAM_CODEC);
ServerPlayNetworking.registerGlobalReceiver(TemplatePayload.TYPE, (payload, context) ->
Expand All @@ -50,6 +56,7 @@ public void onInitialize() {
LidSync.apply(context.player(), payload.mainHand(), payload.closed()));
ServerPlayNetworking.registerGlobalReceiver(PlacedLidPayload.TYPE, (payload, context) ->
PlacedLidSync.apply(context.player(), payload.pos(), payload.slot(), payload.closed()));
UseBlockCallback.EVENT.register(PotteryBlock::sneakPickupPlate);
PlayerPickItemEvents.BLOCK.register((player, pos, state, includeData) ->
state.is(ModBlocks.POTTERY) ? PotteryBlock.pickFocused(player.level(), pos, player) : null);
PlayerBlockBreakEvents.BEFORE.register((level, player, pos, state, entity) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
public class PrimalPotteryFabricClient implements ClientModInitializer {
@Override
public void onInitializeClient() {
net.modcrafters.minecraft.primalpottery.client.ItemIconStamp.sender = ClientPlayNetworking::send;
net.minecraft.client.gui.screens.MenuScreens.register(net.modcrafters.minecraft.primalpottery.menu.PaintingMenu.TYPE,
net.modcrafters.minecraft.primalpottery.client.PaintingScreen::new);
ParticleProviderRegistry.getInstance().register(ClayFleck.TYPE, new ClayFleckProvider());
Expand Down
1 change: 1 addition & 0 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"license": "${license}",
"environment": "*",
"accessWidener": "primalpottery.accesswidener",
"mixins": ["primalpottery.mixins.json"],
"entrypoints": {
"main": [
"net.modcrafters.minecraft.primalpottery.fabric.PrimalPotteryFabric"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.modcrafters.minecraft.primalpottery.PrimalPottery;
import net.modcrafters.minecraft.primalpottery.block.ModBlockEntities;
import net.modcrafters.minecraft.primalpottery.block.ModBlocks;
import net.modcrafters.minecraft.primalpottery.block.PotteryBlock;
import net.modcrafters.minecraft.primalpottery.item.ModItems;
import net.modcrafters.minecraft.primalpottery.item.ModTab;
import net.modcrafters.minecraft.primalpottery.particle.ClayFleck;
Expand All @@ -18,12 +19,15 @@
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.loading.FMLEnvironment;
import net.modcrafters.minecraft.primalpottery.network.LidPayload;
import net.modcrafters.minecraft.primalpottery.network.IconStampPayload;
import net.modcrafters.minecraft.primalpottery.block.PaintingTableBlock;
import net.modcrafters.minecraft.primalpottery.network.LidSync;
import net.modcrafters.minecraft.primalpottery.network.PlacedLidPayload;
import net.modcrafters.minecraft.primalpottery.network.PlacedLidSync;
import net.modcrafters.minecraft.primalpottery.network.TemplatePayload;
import net.modcrafters.minecraft.primalpottery.network.TemplateSync;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.event.entity.player.PlayerInteractEvent;
import net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent;
import net.neoforged.neoforge.registries.RegisterEvent;

Expand All @@ -32,6 +36,13 @@ public class PrimalPotteryNeoForge {
public PrimalPotteryNeoForge(IEventBus modBus) {
modBus.addListener(PrimalPotteryNeoForge::registerContent);
modBus.addListener(PrimalPotteryNeoForge::registerPayloads);
NeoForge.EVENT_BUS.addListener((PlayerInteractEvent.RightClickBlock event) -> {
var result = PotteryBlock.sneakPickupPlate(event.getEntity(), event.getLevel(), event.getHand(), event.getHitVec());
if (result.consumesAction()) {
event.setCancellationResult(result);
event.setCanceled(true);
}
});
//? if >=1.21.9 {
if (FMLEnvironment.getDist() == Dist.CLIENT) {
//?} else
Expand All @@ -46,6 +57,8 @@ public PrimalPotteryNeoForge(IEventBus modBus) {

private static void registerPayloads(RegisterPayloadHandlersEvent event) {
event.registrar(Constants.MOD_ID)
.playToServer(IconStampPayload.TYPE, IconStampPayload.STREAM_CODEC,
(payload, context) -> context.enqueueWork(() -> PaintingTableBlock.applyStamp(context.player(), payload)))
.playToServer(
TemplatePayload.TYPE,
TemplatePayload.STREAM_CODEC,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ private PrimalPotteryNeoForgeClient() {
}

public static void register(IEventBus modBus) {
//? if >=26.1 {
net.modcrafters.minecraft.primalpottery.client.ItemIconStamp.sender = ClientPacketDistributor::sendToServer;
//?} else
//net.modcrafters.minecraft.primalpottery.client.ItemIconStamp.sender = PacketDistributor::sendToServer;
modBus.addListener((net.neoforged.neoforge.client.event.RegisterMenuScreensEvent event) ->
event.register(net.modcrafters.minecraft.primalpottery.menu.PaintingMenu.TYPE, net.modcrafters.minecraft.primalpottery.client.PaintingScreen::new));
modBus.addListener((RegisterParticleProvidersEvent event) ->
Expand Down
2 changes: 2 additions & 0 deletions neoforge/src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
modLoader = "javafml"
loaderVersion = "${neoforge_loader_version_range}"
license = "${license}"
[[mixins]]
config = "primalpottery.mixins.json"
[[mods]]
modId = "${mod_id}"
version = "${version}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
modLoader = "javafml"
loaderVersion = "${neoforge_loader_version_range}"
license = "${license}"
[[mixins]]
config = "primalpottery.mixins.json"
[[mods]]
modId = "${mod_id}"
version = "${version}"
Expand Down
Loading