mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
rename pumpkin-core to pumpkin-util
I see that there is an confusion between the pumpkin-core crate, People often think that this is the most important one
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
resolver = "2"
|
||||
members = [
|
||||
"pumpkin-config",
|
||||
"pumpkin-core",
|
||||
"pumpkin-util",
|
||||
"pumpkin-entity",
|
||||
"pumpkin-inventory",
|
||||
"pumpkin-macros/",
|
||||
|
||||
@@ -4,7 +4,7 @@ version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
pumpkin-core = { path = "../pumpkin-core" }
|
||||
pumpkin-util = { path = "../pumpkin-util" }
|
||||
serde.workspace = true
|
||||
log.workspace = true
|
||||
uuid.workspace = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::PermissionLvl;
|
||||
use pumpkin_util::PermissionLvl;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use log::warn;
|
||||
use logging::LoggingConfig;
|
||||
use pumpkin_core::{Difficulty, GameMode, PermissionLvl};
|
||||
use pumpkin_util::{Difficulty, GameMode, PermissionLvl};
|
||||
use serde::{de::DeserializeOwned, Deserialize, Serialize};
|
||||
|
||||
use std::{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::ProfileAction;
|
||||
use pumpkin_util::ProfileAction;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::permission::PermissionLvl;
|
||||
use pumpkin_util::permission::PermissionLvl;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ pumpkin-protocol = { path = "../pumpkin-protocol" }
|
||||
pumpkin-world = { path = "../pumpkin-world" }
|
||||
pumpkin-registry = {path = "../pumpkin-registry"}
|
||||
pumpkin-macros = { path = "../pumpkin-macros" }
|
||||
pumpkin-core = { path = "../pumpkin-core" }
|
||||
pumpkin-util = { path = "../pumpkin-util" }
|
||||
|
||||
log.workspace = true
|
||||
rayon.workspace = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::crafting::check_if_matches_crafting;
|
||||
use crate::{Container, WindowType};
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use pumpkin_world::block::block_registry::Block;
|
||||
use pumpkin_world::item::ItemStack;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -14,7 +14,7 @@ query = []
|
||||
pumpkin-nbt = { path = "../pumpkin-nbt" }
|
||||
pumpkin-macros = { path = "../pumpkin-macros" }
|
||||
pumpkin-world = { path = "../pumpkin-world" }
|
||||
pumpkin-core = { path = "../pumpkin-core" }
|
||||
pumpkin-util = { path = "../pumpkin-util" }
|
||||
|
||||
uuid.workspace = true
|
||||
serde.workspace = true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::VarInt;
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
pub enum BosseventAction {
|
||||
Add {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use bytes::BufMut;
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use crate::{bytebuf::ByteBufMut, ClientPacket, VarInt};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use bytes::BufMut;
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
use crate::{bytebuf::ByteBufMut, ClientPacket, PositionFlag, VarInt};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::{codec::identifier::Identifier, VarInt};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use bytes::BufMut;
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
use crate::{bytebuf::ByteBufMut, ClientPacket, PositionFlag, VarInt};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
use serde::Serialize;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use bytes::BufMut;
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_macros::client_packet;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use crate::{bytebuf::ByteBufMut, ClientPacket, NumberFormat, VarInt};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::TextComponent;
|
||||
use pumpkin_util::text::TextComponent;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
|
||||
use pumpkin_macros::client_packet;
|
||||
use serde::Serialize;
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::num::NonZeroU16;
|
||||
use bytebuf::{packet_id::Packet, ReadingError};
|
||||
use bytes::{Buf, BufMut, Bytes};
|
||||
use codec::{identifier::Identifier, var_int::VarInt};
|
||||
use pumpkin_core::text::{style::Style, TextComponent};
|
||||
use pumpkin_util::text::{style::Style, TextComponent};
|
||||
use serde::{Deserialize, Serialize, Serializer};
|
||||
|
||||
pub mod bytebuf;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use bytes::Buf;
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::server_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
use crate::{
|
||||
bytebuf::{ByteBuf, ReadingError},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_macros::server_packet;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_macros::server_packet;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::server_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
#[server_packet("play:move_player_pos")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_macros::server_packet;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
#[derive(serde::Deserialize)]
|
||||
#[server_packet("play:move_player_pos_rot")]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_core::math::{position::WorldPosition, vector3::Vector3};
|
||||
use pumpkin_macros::server_packet;
|
||||
use pumpkin_util::math::{position::WorldPosition, vector3::Vector3};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::VarInt;
|
||||
|
||||
@@ -6,7 +6,7 @@ edition.workspace = true
|
||||
[dependencies]
|
||||
pumpkin-protocol = { path = "../pumpkin-protocol" }
|
||||
pumpkin-nbt = { path = "../pumpkin-nbt" }
|
||||
pumpkin-core = { path = "../pumpkin-core" }
|
||||
pumpkin-util = { path = "../pumpkin-util" }
|
||||
|
||||
indexmap = { version = "2.7.0", features = ["serde"] }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::text::style::Style;
|
||||
use pumpkin_util::text::style::Style;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "pumpkin-core"
|
||||
name = "pumpkin-util"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
@@ -5,7 +5,7 @@ edition.workspace = true
|
||||
|
||||
[dependencies]
|
||||
pumpkin-nbt = { path = "../pumpkin-nbt" }
|
||||
pumpkin-core = { path = "../pumpkin-core" }
|
||||
pumpkin-util = { path = "../pumpkin-util" }
|
||||
pumpkin-config = { path = "../pumpkin-config" }
|
||||
pumpkin-macros = { path = "../pumpkin-macros" }
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
pub mod block_registry;
|
||||
pub mod block_state;
|
||||
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
pub use block_state::BlockState;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ use bytes::*;
|
||||
use fastnbt::LongArray;
|
||||
use flate2::bufread::{GzDecoder, GzEncoder, ZlibDecoder, ZlibEncoder};
|
||||
use indexmap::IndexMap;
|
||||
use pumpkin_core::math::ceil_log2;
|
||||
use pumpkin_util::math::ceil_log2;
|
||||
use std::time::{SystemTime, UNIX_EPOCH};
|
||||
use std::{
|
||||
collections::HashSet,
|
||||
@@ -135,7 +135,7 @@ impl ChunkReader for AnvilChunkFormat {
|
||||
fn read_chunk(
|
||||
&self,
|
||||
save_file: &LevelFolder,
|
||||
at: &pumpkin_core::math::vector2::Vector2<i32>,
|
||||
at: &pumpkin_util::math::vector2::Vector2<i32>,
|
||||
) -> Result<super::ChunkData, ChunkReadingError> {
|
||||
let region = (at.x >> 5, at.z >> 5);
|
||||
|
||||
@@ -219,7 +219,7 @@ impl ChunkWriter for AnvilChunkFormat {
|
||||
&self,
|
||||
chunk_data: &ChunkData,
|
||||
level_folder: &LevelFolder,
|
||||
at: &pumpkin_core::math::vector2::Vector2<i32>,
|
||||
at: &pumpkin_util::math::vector2::Vector2<i32>,
|
||||
) -> Result<(), super::ChunkWritingError> {
|
||||
let region = (at.x >> 5, at.z >> 5);
|
||||
|
||||
@@ -477,7 +477,7 @@ impl AnvilChunkFormat {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use fastnbt::LongArray;
|
||||
use pumpkin_core::math::{ceil_log2, vector2::Vector2};
|
||||
use pumpkin_util::math::{ceil_log2, vector2::Vector2};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{collections::HashMap, iter::repeat_with};
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -3,8 +3,8 @@ use std::ops::Deref;
|
||||
use crate::{WORLD_LOWEST_Y, WORLD_MAX_Y};
|
||||
use derive_more::derive::{AsMut, AsRef, Display, Into};
|
||||
use num_traits::{PrimInt, Signed, Unsigned};
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::num::NonZeroU8;
|
||||
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub struct Cylindrical {
|
||||
@@ -87,7 +87,7 @@ mod test {
|
||||
use std::num::NonZeroU8;
|
||||
|
||||
use super::Cylindrical;
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
#[test]
|
||||
fn test_bounds() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use enum_dispatch::enum_dispatch;
|
||||
use num_traits::PrimInt;
|
||||
use pumpkin_core::{
|
||||
use pumpkin_util::{
|
||||
math::{floor_div, vector2::Vector2, vector3::Vector3},
|
||||
random::RandomDeriver,
|
||||
};
|
||||
@@ -657,7 +657,7 @@ pub trait AquiferSamplerImpl {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
use crate::{
|
||||
block::BlockState,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::{collections::HashMap, hash::Hash, mem, num::Wrapping, ops::AddAssign, sync::Arc};
|
||||
|
||||
use num_traits::Zero;
|
||||
use pumpkin_core::math::{floor_div, vector2::Vector2, vector3::Vector3};
|
||||
use pumpkin_macros::block_state;
|
||||
use pumpkin_util::math::{floor_div, vector2::Vector2, vector3::Vector3};
|
||||
|
||||
use crate::{
|
||||
block::BlockState,
|
||||
@@ -1377,7 +1377,7 @@ impl ChunkNoiseGenerator {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
use crate::generation::{
|
||||
aquifer_sampler::{FluidLevel, FluidLevelSampler},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use noise::Perlin;
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
use crate::biome::Biome;
|
||||
use crate::block::block_state::BlockState;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use noise::{NoiseFn, Perlin};
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
use crate::{
|
||||
chunk::{ChunkData, Subchunks},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use noise::Perlin;
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_macros::block_state;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
use rand::Rng;
|
||||
|
||||
use crate::{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
use crate::{
|
||||
biome::Biome,
|
||||
@@ -45,7 +45,7 @@ impl TerrainGenerator for SuperflatTerrainGenerator {
|
||||
fn generate_block(
|
||||
&self,
|
||||
_chunk_pos: &Vector2<i32>,
|
||||
_at: pumpkin_core::math::vector3::Vector3<i32>,
|
||||
_at: pumpkin_util::math::vector3::Vector3<i32>,
|
||||
_biome: Biome,
|
||||
) -> BlockState {
|
||||
todo!()
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::{
|
||||
|
||||
use dashmap::{DashMap, Entry};
|
||||
use num_traits::Zero;
|
||||
use pumpkin_core::math::{vector2::Vector2, vector3::Vector3};
|
||||
use pumpkin_util::math::{vector2::Vector2, vector3::Vector3};
|
||||
|
||||
use crate::{
|
||||
biome::Biome,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use pumpkin_core::random::{
|
||||
use pumpkin_util::random::{
|
||||
legacy_rand::LegacyRand, xoroshiro128::Xoroshiro, RandomDeriver, RandomGenerator, RandomImpl,
|
||||
};
|
||||
|
||||
@@ -145,7 +145,7 @@ impl NoiseConfig {
|
||||
mod test {
|
||||
use std::{fs, path::Path};
|
||||
|
||||
use pumpkin_core::{
|
||||
use pumpkin_util::{
|
||||
assert_eq_delta,
|
||||
random::{xoroshiro128::Xoroshiro, RandomDeriver, RandomImpl},
|
||||
};
|
||||
|
||||
@@ -951,7 +951,7 @@ impl<E: DensityFunctionEnvironment> ComponentReference<E> for MutableComponentRe
|
||||
mod test {
|
||||
use std::sync::Arc;
|
||||
|
||||
use pumpkin_core::random::{legacy_rand::LegacyRand, RandomDeriver, RandomImpl};
|
||||
use pumpkin_util::random::{legacy_rand::LegacyRand, RandomDeriver, RandomImpl};
|
||||
|
||||
use crate::generation::noise::{
|
||||
built_in_noise_params,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::random::{legacy_rand::LegacyRand, RandomImpl};
|
||||
use pumpkin_util::random::{legacy_rand::LegacyRand, RandomImpl};
|
||||
|
||||
use crate::generation::noise::simplex::SimplexNoiseSampler;
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ pub mod built_in_density_function {
|
||||
use crate::generation::noise::built_in_noise_params::{self};
|
||||
use crate::generation::positions::{MAX_COLUMN_HEIGHT, MIN_HEIGHT};
|
||||
|
||||
use pumpkin_core::math::floor_div;
|
||||
use pumpkin_util::math::floor_div;
|
||||
|
||||
use super::{apply_blending, noise_in_range, vertical_range_choice};
|
||||
|
||||
@@ -875,7 +875,7 @@ pub fn lerp_density_static_start(
|
||||
mod test {
|
||||
use std::sync::Arc;
|
||||
|
||||
use pumpkin_core::random::{
|
||||
use pumpkin_util::random::{
|
||||
legacy_rand::LegacyRand, RandomDeriver, RandomDeriverImpl, RandomImpl,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::{marker::PhantomData, sync::Arc};
|
||||
|
||||
use pumpkin_core::random::{xoroshiro128::Xoroshiro, RandomGenerator, RandomImpl};
|
||||
use pumpkin_util::random::{xoroshiro128::Xoroshiro, RandomGenerator, RandomImpl};
|
||||
|
||||
use crate::{
|
||||
generation::noise::{
|
||||
|
||||
@@ -742,7 +742,7 @@ impl SplineBuilder {
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
||||
use pumpkin_core::random::{legacy_rand::LegacyRand, RandomDeriver, RandomImpl};
|
||||
use pumpkin_util::random::{legacy_rand::LegacyRand, RandomDeriver, RandomImpl};
|
||||
|
||||
use crate::generation::noise::density::{
|
||||
built_in_density_function::CONTINENTS_OVERWORLD,
|
||||
|
||||
@@ -521,7 +521,7 @@ pub fn create_jaggedness_spline(
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use pumpkin_core::random::{legacy_rand::LegacyRand, RandomDeriver, RandomImpl};
|
||||
use pumpkin_util::random::{legacy_rand::LegacyRand, RandomDeriver, RandomImpl};
|
||||
|
||||
use crate::generation::noise::density::{
|
||||
built_in_density_function::{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use num_traits::Pow;
|
||||
use pumpkin_core::random::RandomGenerator;
|
||||
use pumpkin_util::random::RandomGenerator;
|
||||
|
||||
use super::{lerp3, GRADIENTS};
|
||||
|
||||
@@ -377,7 +377,7 @@ impl DoublePerlinNoiseSampler {
|
||||
|
||||
#[cfg(test)]
|
||||
mod double_perlin_noise_sampler_test {
|
||||
use pumpkin_core::random::{
|
||||
use pumpkin_util::random::{
|
||||
legacy_rand::LegacyRand, xoroshiro128::Xoroshiro, RandomGenerator, RandomImpl,
|
||||
};
|
||||
|
||||
@@ -582,7 +582,7 @@ mod double_perlin_noise_sampler_test {
|
||||
|
||||
#[cfg(test)]
|
||||
mod octave_perline_noise_sampler_test {
|
||||
use pumpkin_core::random::{
|
||||
use pumpkin_util::random::{
|
||||
legacy_rand::LegacyRand, xoroshiro128::Xoroshiro, RandomGenerator, RandomImpl,
|
||||
};
|
||||
|
||||
@@ -755,7 +755,7 @@ mod octave_perline_noise_sampler_test {
|
||||
mod perlin_noise_sampler_test {
|
||||
use std::{fs, path::Path};
|
||||
|
||||
use pumpkin_core::{
|
||||
use pumpkin_util::{
|
||||
assert_eq_delta,
|
||||
random::{xoroshiro128::Xoroshiro, RandomDeriverImpl, RandomGenerator, RandomImpl},
|
||||
};
|
||||
|
||||
@@ -470,7 +470,7 @@ fn create_caves(sloped_cheese: SharedComponentReference) -> SharedComponentRefer
|
||||
mod test {
|
||||
use std::{fs, path::Path, sync::Arc};
|
||||
|
||||
use pumpkin_core::{
|
||||
use pumpkin_util::{
|
||||
assert_eq_delta,
|
||||
random::{legacy_rand::LegacyRand, xoroshiro128::Xoroshiro, RandomDeriver, RandomImpl},
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::hash::Hash;
|
||||
|
||||
use num_traits::Pow;
|
||||
use pumpkin_core::random::{legacy_rand::LegacyRand, RandomImpl};
|
||||
use pumpkin_util::random::{legacy_rand::LegacyRand, RandomImpl};
|
||||
|
||||
use super::GRADIENTS;
|
||||
|
||||
@@ -274,7 +274,7 @@ impl OctaveSimplexNoiseSampler {
|
||||
|
||||
#[cfg(test)]
|
||||
mod octave_simplex_noise_sampler_test {
|
||||
use pumpkin_core::random::{xoroshiro128::Xoroshiro, RandomImpl};
|
||||
use pumpkin_util::random::{xoroshiro128::Xoroshiro, RandomImpl};
|
||||
|
||||
use crate::generation::noise::simplex::OctaveSimplexNoiseSampler;
|
||||
|
||||
@@ -411,7 +411,7 @@ mod octave_simplex_noise_sampler_test {
|
||||
mod simplex_noise_sampler_test {
|
||||
use std::ops::Deref;
|
||||
|
||||
use pumpkin_core::random::{xoroshiro128::Xoroshiro, RandomImpl};
|
||||
use pumpkin_util::random::{xoroshiro128::Xoroshiro, RandomImpl};
|
||||
|
||||
use crate::generation::noise::simplex::SimplexNoiseSampler;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::random::RandomDeriver;
|
||||
use pumpkin_util::random::RandomDeriver;
|
||||
|
||||
use crate::block::BlockState;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use pumpkin_core::math::{floor_log2, smallest_encompassing_power_of_two};
|
||||
use pumpkin_util::math::{floor_log2, smallest_encompassing_power_of_two};
|
||||
|
||||
pub mod block_pos {
|
||||
use pumpkin_core::math::vector3::Vector3;
|
||||
use pumpkin_util::math::vector3::Vector3;
|
||||
|
||||
use super::{
|
||||
BITS_X, BITS_Y, BITS_Z, BIT_SHIFT_X, BIT_SHIFT_Z, SIZE_BITS_X, SIZE_BITS_Y, SIZE_BITS_Z,
|
||||
@@ -34,7 +34,7 @@ pub mod block_pos {
|
||||
}
|
||||
|
||||
pub mod chunk_pos {
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
// A chunk outside of normal bounds
|
||||
pub const MARKER: u64 = packed(&Vector2::new(1875066, 1875066));
|
||||
@@ -89,7 +89,7 @@ pub const MIN_HEIGHT_CELL: i32 = MIN_HEIGHT << 4;
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use pumpkin_core::math::{vector2::Vector2, vector3::Vector3};
|
||||
use pumpkin_util::math::{vector2::Vector2, vector3::Vector3};
|
||||
|
||||
use super::{block_pos, chunk_pos};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::math::{vector2::Vector2, vector3::Vector3};
|
||||
use pumpkin_util::math::{vector2::Vector2, vector3::Vector3};
|
||||
|
||||
use crate::{
|
||||
block::BlockState,
|
||||
@@ -216,7 +216,7 @@ impl ProtoChunk {
|
||||
mod test {
|
||||
use std::{fs, path::Path};
|
||||
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
use crate::read_data_from_file;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use pumpkin_core::random::{get_seed, java_string_hash, legacy_rand::LegacyRand, RandomImpl};
|
||||
use pumpkin_util::random::{get_seed, java_string_hash, legacy_rand::LegacyRand, RandomImpl};
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub struct Seed(pub u64);
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{path::PathBuf, sync::Arc};
|
||||
|
||||
use dashmap::{DashMap, Entry};
|
||||
use num_traits::Zero;
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
|
||||
use tokio::{
|
||||
runtime::Handle,
|
||||
|
||||
@@ -5,7 +5,7 @@ use generation::{
|
||||
noise::{config::NoiseConfig, router::OVERWORLD_NOISE_ROUTER},
|
||||
proto_chunk::{ProtoChunk, StandardChunkFluidLevelSampler},
|
||||
};
|
||||
use pumpkin_core::math::vector2::Vector2;
|
||||
use pumpkin_util::math::vector2::Vector2;
|
||||
|
||||
pub mod biome;
|
||||
pub mod block;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use pumpkin_config::BASIC_CONFIG;
|
||||
use pumpkin_core::Difficulty;
|
||||
use pumpkin_util::Difficulty;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use thiserror::Error;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ LegalCopyright = "Copyright © 2025 Aleksander Medvedev"
|
||||
|
||||
[dependencies]
|
||||
# pumpkin
|
||||
pumpkin-core = { path = "../pumpkin-core" }
|
||||
pumpkin-util = { path = "../pumpkin-util" }
|
||||
pumpkin-config = { path = "../pumpkin-config" }
|
||||
pumpkin-inventory = { path = "../pumpkin-inventory" }
|
||||
pumpkin-world = { path = "../pumpkin-world" }
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use crate::block::pumpkin_block::{BlockMetadata, PumpkinBlock};
|
||||
use crate::entity::player::Player;
|
||||
use crate::server::Server;
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_inventory::OpenContainer;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use pumpkin_world::block::block_registry::Block;
|
||||
use pumpkin_world::item::item_registry::Item;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use async_trait::async_trait;
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_inventory::{Chest, OpenContainer, WindowType};
|
||||
use pumpkin_macros::{pumpkin_block, sound};
|
||||
use pumpkin_protocol::{client::play::CBlockAction, codec::var_int::VarInt};
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use pumpkin_world::{
|
||||
block::block_registry::{get_block, Block},
|
||||
item::item_registry::Item,
|
||||
|
||||
@@ -3,9 +3,9 @@ use crate::block::pumpkin_block::PumpkinBlock;
|
||||
use crate::entity::player::Player;
|
||||
use crate::server::Server;
|
||||
use async_trait::async_trait;
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_inventory::{CraftingTable, OpenContainer, WindowType};
|
||||
use pumpkin_macros::pumpkin_block;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use pumpkin_world::{block::block_registry::Block, item::item_registry::Item};
|
||||
|
||||
#[pumpkin_block("minecraft:crafting_table")]
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::block::block_manager::BlockActionResult;
|
||||
use crate::entity::player::Player;
|
||||
use async_trait::async_trait;
|
||||
use pumpkin_core::math::position::WorldPosition;
|
||||
use pumpkin_inventory::Furnace;
|
||||
use pumpkin_inventory::WindowType;
|
||||
use pumpkin_macros::pumpkin_block;
|
||||
use pumpkin_util::math::position::WorldPosition;
|
||||
use pumpkin_world::block::block_registry::Block;
|
||||
use pumpkin_world::item::item_registry::Item;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user