From a2263c55cc40f03d6e3552bf6cab49d315842f3d Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Thu, 30 Jul 2026 12:55:41 +0200 Subject: [PATCH] chore: update bug report template --- .github/FUNDING.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 67 +++++++++++-------- .github/PULL_REQUEST_TEMPLATE.md | 3 +- Cargo.lock | 32 ++++----- Cargo.toml | 4 +- pumpkin-util/src/random/mod.rs | 2 +- .../structure/structures/jigsaw_placement.rs | 10 ++- pumpkin/src/block/blocks/redstone/bell.rs | 2 +- .../block/blocks/redstone/redstone_wire.rs | 13 ++-- .../entities/furnace_like_block_entity.rs | 2 +- pumpkin/src/entity/item.rs | 2 +- .../src/entity/projectile/shulker_bullet.rs | 6 +- pumpkin/src/lib.rs | 3 +- pumpkin/src/world/custom_bossbar.rs | 11 ++- 14 files changed, 83 insertions(+), 76 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c63515905..61b730703 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,3 @@ # These are supported funding model platforms -github: [ Snowiiii ] \ No newline at end of file +custom: ["https://pumpkinmc.org/donate/"] \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index fd3149c8e..62ca16c56 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,50 +1,61 @@ -name: "Bug report" -description: "Create a bug report to help us improve" +name: "Bug Report" +description: "File a bug report to help us improve" labels: ["bug"] -assignees: Snowiiii +assignees: ["Snowiiii"] body: - type: checkboxes id: duplicate attributes: - label: "I've searched existing issues and couldn't find a duplicate." - description: "I confirm this is not a duplicate." + label: "Before Submitting" options: - - label: "I confirm this is not a duplicate." + - label: "I have searched existing issues and confirmed this is not a duplicate." required: true - - type: input - id: os + + - type: dropdown + id: edition attributes: - label: Operating System - description: "What operating system are you using?" - placeholder: "Example: macOS Big Sur" + label: "Minecraft Edition" + description: "Which edition of Minecraft does this bug affect?" + options: + - "Java Edition" + - "Bedrock Edition" + - "Both / Crossplay" validations: required: true + - type: input id: version attributes: - label: "Server Software Version/Commit" - description: "What Server Software Version/Commit are you using?. (Tip: Use the /pumpkin command)" - placeholder: "Example: 1.0.0/39b4cb3" + label: "Server Version / Commit" + description: "Provide your server version (Tip: Run `/pumpkin`)." + placeholder: "e.g., 1.0.0/39b4cb3" validations: required: true - - type: textarea - id: what-happened + + - type: input + id: os attributes: - label: "What happened?" - description: "A clear and concise description of what the bug is." + label: "Operating System" + placeholder: "e.g., Windows 11, Ubuntu 22.04, macOS" validations: required: true + + - type: textarea + id: description + attributes: + label: "Bug Description & Expected Behavior" + description: "What is currently happening, and what did you expect to happen instead?" + validations: + required: true + - type: textarea id: to-reproduce attributes: - label: "To Reproduce" - description: "Steps to reproduce the behavior" + label: "Steps to Reproduce" + description: "Please provide a clear, step-by-step list to replicate the issue." + placeholder: | + 1. Go to... + 2. Click on... + 3. See error... validations: - required: true - - type: textarea - id: expected-behavior - attributes: - label: "Expected behavior" - description: "A clear and concise description of what you expected to happen." - validations: - required: true + required: true \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bf8c71d0c..38c43343c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,4 +1,5 @@ - + + ## Description diff --git a/Cargo.lock b/Cargo.lock index a525de8e7..94c5bbb67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" +checksum = "3976abdc8fe7d1133d43d304afd42abdf5bc3e1319d263d223bde07b5efc4be8" dependencies = [ "compression-codecs", "compression-core", @@ -268,7 +268,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes 3.0.1", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -285,7 +285,7 @@ dependencies = [ "maybe-owned", "rustix", "rustix-linux-procfs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "winx", ] @@ -450,7 +450,7 @@ version = "3.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -1106,7 +1106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -2093,7 +2093,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3018,7 +3018,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3093,9 +3093,9 @@ dependencies = [ [[package]] name = "ruzstd" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c1c839d570d835527c9a5e4db7cb2198683a988cb9d7293fc8674e6bd58fc8" +checksum = "a252f5e20f038fe7b4ea53e073e65398d652c864cc162fc77c56c2f13717b888" [[package]] name = "same-file" @@ -3331,7 +3331,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -3445,7 +3445,7 @@ dependencies = [ "fastrand", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -3577,13 +3577,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -4411,7 +4411,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7667ee64d..298de534c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,7 +118,7 @@ serde_json = { version = "1.0", default-features = false, features = ["std"] } tempfile = { version = "3.27.0", default-features = false } proc-macro-error2 = { version = "2", default-features = false } aes = { version = "0.9", default-features = false } -async-compression = { version = "0.4.42", default-features = false } +async-compression = { version = "0.4.43", default-features = false } base64 = { version = "0.23.0", default-features = false, features = ["std"] } bitflags = { version = "2.13.1", default-features = false, features = ["std"] } cesu8 = { version = "1.1", default-features = false } @@ -164,7 +164,7 @@ rsa = { version = "=0.10.0-rc.18", default-features = false, features = ["std", cipher = { version = "0.5.2", default-features = false } rustc-hash = { version = "2.1.3", default-features = false, features = ["std"] } rustyline = { version = "18.0.1", default-features = false, features = ["with-file-history"] } -ruzstd = { version = "0.8.3", default-features = false, features = ["std"] } +ruzstd = { version = "0.9.0", default-features = false, features = ["std"] } sha1 = { version = "=0.11.0", default-features = false, features = ["oid"] } sha2 = { version = "=0.11.0", default-features = false, features = ["oid"] } signature = { version = "3.0.0", default-features = false, features = ["std"] } diff --git a/pumpkin-util/src/random/mod.rs b/pumpkin-util/src/random/mod.rs index 53faee915..a28f43f07 100644 --- a/pumpkin-util/src/random/mod.rs +++ b/pumpkin-util/src/random/mod.rs @@ -29,7 +29,7 @@ static SEED_UNIQUIFIER: AtomicU64 = AtomicU64::new(8682522807148012u64); /// A 64-bit seed value suitable for initializing random number generators. pub fn get_seed() -> u64 { let seed = SEED_UNIQUIFIER - .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |val| { + .try_update(Ordering::Relaxed, Ordering::Relaxed, |val| { Some(val.wrapping_mul(1181783497276652981u64)) }) .unwrap(); diff --git a/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs b/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs index 79a9906ec..696329587 100644 --- a/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs +++ b/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs @@ -306,11 +306,10 @@ impl JigsawPlacement { let delta_y = source_jigsaw_local_y - target_jigsaw_local_y + source_facing.to_vector().y; - let target_box_y; let mut source_jigsaw_base_height = i32::MIN; - if source_rigid && target_rigid { - target_box_y = source_box.min.y + delta_y; + let target_box_y = if source_rigid && target_rigid { + source_box.min.y + delta_y } else { if source_jigsaw_base_height == i32::MIN { source_jigsaw_base_height = @@ -328,9 +327,8 @@ impl JigsawPlacement { source_jigsaw_pos.0.y }; } - target_box_y = - source_jigsaw_base_height - target_jigsaw_local_y; - } + source_jigsaw_base_height - target_jigsaw_local_y + }; let raw_target_pos = BlockPos::new( target_jigsaw_pos.0.x - target_jigsaw_local_pos.x, diff --git a/pumpkin/src/block/blocks/redstone/bell.rs b/pumpkin/src/block/blocks/redstone/bell.rs index 59a99003e..001988c7a 100644 --- a/pumpkin/src/block/blocks/redstone/bell.rs +++ b/pumpkin/src/block/blocks/redstone/bell.rs @@ -25,7 +25,7 @@ fn ring_bell(position: BlockPos, world: &Arc, hit_direction: Option() diff --git a/pumpkin/src/block/blocks/redstone/redstone_wire.rs b/pumpkin/src/block/blocks/redstone/redstone_wire.rs index d858fd280..9130d9133 100644 --- a/pumpkin/src/block/blocks/redstone/redstone_wire.rs +++ b/pumpkin/src/block/blocks/redstone/redstone_wire.rs @@ -53,9 +53,8 @@ impl BlockBehaviour for RedstoneWireBlock { Box::pin(async move { let mut wire = RedstoneWireProperties::from_state_id(args.state_id, args.block); let old_state = wire; - let new_side: WireConnection; - match args.direction { + let new_side: WireConnection = match args.direction { BlockDirection::Up => { return args.state_id; } @@ -67,24 +66,24 @@ impl BlockBehaviour for RedstoneWireBlock { BlockDirection::North => { let side = get_side(args.world, args.position, BlockDirection::North).await; wire.north = side.to_north(); - new_side = side; + side } BlockDirection::South => { let side = get_side(args.world, args.position, BlockDirection::South).await; wire.south = side.to_south(); - new_side = side; + side } BlockDirection::East => { let side = get_side(args.world, args.position, BlockDirection::East).await; wire.east = side.to_east(); - new_side = side; + side } BlockDirection::West => { let side = get_side(args.world, args.position, BlockDirection::West).await; wire.west = side.to_west(); - new_side = side; + side } - } + }; wire = get_regulated_sides(wire, args.world, args.position).await; wire.power = calculate_power(args.world, args.position).await; diff --git a/pumpkin/src/block/entities/furnace_like_block_entity.rs b/pumpkin/src/block/entities/furnace_like_block_entity.rs index f55f5a52a..4ad1be8ea 100644 --- a/pumpkin/src/block/entities/furnace_like_block_entity.rs +++ b/pumpkin/src/block/entities/furnace_like_block_entity.rs @@ -451,7 +451,7 @@ macro_rules! impl_block_entity_for_cooking { } } else if !self.is_burning() && self.get_cooking_time_spent() > 0 { self.cooking_time_spent - .fetch_update(Ordering::Acquire, Ordering::Acquire, |v| { + .try_update(Ordering::Acquire, Ordering::Acquire, |v| { Some( v.saturating_sub(2) .min(self.cooking_total_time.load(Ordering::Acquire)), diff --git a/pumpkin/src/entity/item.rs b/pumpkin/src/entity/item.rs index 30657548d..b9b743fa7 100644 --- a/pumpkin/src/entity/item.rs +++ b/pumpkin/src/entity/item.rs @@ -238,7 +238,7 @@ impl ItemEntity { fn decrement_pickup_delay(&self) { self.pickup_delay - .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |val| { + .try_update(Ordering::Relaxed, Ordering::Relaxed, |val| { Some(val.saturating_sub(1)) }) .ok(); diff --git a/pumpkin/src/entity/projectile/shulker_bullet.rs b/pumpkin/src/entity/projectile/shulker_bullet.rs index c9e99e57e..36c1fba21 100644 --- a/pumpkin/src/entity/projectile/shulker_bullet.rs +++ b/pumpkin/src/entity/projectile/shulker_bullet.rs @@ -61,9 +61,9 @@ impl ShulkerBulletEntity { // Position at the center of the shulker's bounding box let bb = owner.bounding_box.load(); let origin = Vector3::new( - (bb.min.x + bb.max.x) * 0.5, - (bb.min.y + bb.max.y) * 0.5, - (bb.min.z + bb.max.z) * 0.5, + f64::midpoint(bb.min.x, bb.max.x), + f64::midpoint(bb.min.y, bb.max.y), + f64::midpoint(bb.min.z, bb.max.z), ); let entity = Entity::from_uuid( diff --git a/pumpkin/src/lib.rs b/pumpkin/src/lib.rs index 60e795dab..9ea5b2cf9 100644 --- a/pumpkin/src/lib.rs +++ b/pumpkin/src/lib.rs @@ -186,9 +186,8 @@ pub fn stop_or_exit_server() { if SERVER_IS_STOPPING.load(Ordering::Acquire) { // Server is already stopping, so we forcefully exit. exit(SERVER_EXIT_CODE.load(Ordering::Acquire)); - } else { - stop_server(); } + stop_server(); } fn resolve_some T>( diff --git a/pumpkin/src/world/custom_bossbar.rs b/pumpkin/src/world/custom_bossbar.rs index 30191fe26..ba93c227a 100644 --- a/pumpkin/src/world/custom_bossbar.rs +++ b/pumpkin/src/world/custom_bossbar.rs @@ -155,15 +155,14 @@ impl CustomBossbars { } let ratio = f64::from(value) / f64::from(max_value); - let health: f32; - if ratio < 0.0 { - health = 0.0; + let health: f32 = if ratio < 0.0 { + 0.0 } else if ratio > 1.0 { - health = 1.0; + 1.0 } else { - health = ratio as f32; - } + ratio as f32 + }; bossbar.value = value; bossbar.max = max_value;