MCHPR / MCHPRS

A multithreaded Minecraft server built for redstone.
MIT License
1.55k stars 68 forks source link

NOTEBLOCK COMPABILITY #136

Closed Wafflr450 closed 3 months ago

Wafflr450 commented 7 months ago

Cuz ya need it to build Sound cards for cpus and to build other cool stuff. Can't be that difficult i think :0

Please 🥺

Paul1365972 commented 7 months ago

There is already a PR open that adds noteblocks. If you don't want to wait until it gets merged, you can use this branch for now https://github.com/Paul1365972/MCHPRS/tree/noteblocks. Just as a small disclaimer, there are no particle effects yet and not all blocks are implemented, but there are replacements so all instruments should work. Here is the list of blocks for each instrument:

        match block {
            // All stone materials
            Block::Stone {}
            | Block::CoalBlock {}
            | Block::Quartz {}
            | Block::Sandstone {}
            | Block::Concrete { .. }
            | Block::Terracotta {}
            | Block::ColoredTerracotta { .. } => Instrument::Basedrum,
            // All sand/aggregate materials: ConcretePowder
            Block::Sand {} => Instrument::Snare,
            // All glass materials: GlassPane
            Block::Glass {} | Block::StainedGlass { .. } => Instrument::Hat,
            // All wood materials: Log, Plank
            Block::Sign { .. }
            | Block::NoteBlock { .. }
            | Block::Barrel {}
            | Block::Composter { .. } => Instrument::Bass,
            Block::Clay {} => Instrument::Flute,
            Block::GoldBlock {} => Instrument::Bell,
            Block::Wool { .. } => Instrument::Guitar,
            Block::PackedIce {} => Instrument::Chime,
            Block::BoneBlock {} => Instrument::Xylophone,
            Block::IronBlock {} => Instrument::IronXylophone,
            Block::SoulSand {} => Instrument::CowBell,
            Block::Pumpkin {} => Instrument::Didgeridoo,
            Block::EmeraldBlock {} => Instrument::Bit,
            Block::HayBlock {} => Instrument::Banjo,
            Block::Glowstone { .. } => Instrument::Pling,
            _ => Instrument::Harp,
        }
Wafflr450 commented 7 months ago

Can you send over da Compiled .jar pls 🥹🥹🥹

Paul1365972 commented 7 months ago

Ah, I think you misunderstand, this project isnt a mod or even a java application. It is a reimplementation of the minecraft server in a completly different programming language.

To run the MCHPR server you will need to first install git, if you haven't already, and then install rust via rustup. After that, inside the console, just run

git clone https://github.com/Paul1365972/MCHPRS
cd MCHPRS
git checkout noteblocks

to download this project and finally cargo run -r to actually start the server. That should take about 5-10 minutes. After that you will be able to conntect to the server like normal (via localhost) until you hit CTRL-C or close the console. You can restart the server with cargo run -r (inside of the MCHPRS folder of course) anytime, it should less than a second to start after the first time.

(If everything fails use this mchprs_noteblocks_fc415675d5e28093122b708f01f17731132606e6.zip. Just remember to not trust random executables, this one included, as they may and proabably will contain malware. I highly recommend just learning to compile projects yourself, it's only difficult the first time around)

Paul1365972 commented 3 months ago

Noteblocks are now officially supported!