Cov txheej txheem:

OreServer - Raspberry Pi Dedicated Minecraft Server Nrog LED Player Qhov Ntsuas: 9 Cov Kauj Ruam (nrog Duab)
OreServer - Raspberry Pi Dedicated Minecraft Server Nrog LED Player Qhov Ntsuas: 9 Cov Kauj Ruam (nrog Duab)

Video: OreServer - Raspberry Pi Dedicated Minecraft Server Nrog LED Player Qhov Ntsuas: 9 Cov Kauj Ruam (nrog Duab)

Video: OreServer - Raspberry Pi Dedicated Minecraft Server Nrog LED Player Qhov Ntsuas: 9 Cov Kauj Ruam (nrog Duab)
Video: Raspberry Pi als Vanilla Minecraft Server 2024, Hlis ntuj nqeg
Anonim

Los ntawm MrJymmFollow Txog: Ntau lub tswv yim, tsis muaj sijhawm txaus. Xav paub ntau ntxiv txog MrJymm »

Lub Xya Hli 2020 Hloov Kho Tshiab - Ua ntej koj pib rau txoj haujlwm no, thov nco ntsoov tias ntau qhov kev hloov pauv thiab hloov tshiab tau ua rau ntau yam software uas kuv tau siv los tsim qhov no ntau dua ob xyoos dhau los. Raws li qhov tshwm sim, ntau cov kauj ruam tsis ua haujlwm raws li tau sau tseg. Txoj haujlwm tseem tuaj yeem ua tiav, thiab tseem yog qhov lom zem, tab sis thov cia siab tias yuav tsum tau ua koj tus kheej tinkering kom txhua yam ua haujlwm. Qee qhov kev daws teeb meem tuaj yeem pom hauv cov lus tsis ntev los no thaum kawg ntawm cov lus qhia. Ua tsaug, thiab zoo siab tsuas

Yog tias koj yog tus kiv cua ntawm kev ua si Minecraft koj yuav tau xav txog kev lom zem li cas nws thiaj li muaj koj tus kheej lub server los qhia rau koj cov phooj ywg. Kuv cov tub tau nug kuv tas li rau lawv tus kheej lub ntiaj teb sib koom, thiab thaum kawg lawv txaus siab rau Minecraft ua ke nrog kuv qhov kev txaus siab hauv Raspberry Pi, thiab lub tswv yim rau OreServer tau yug los.

Txoj haujlwm no yuav qhia koj yuav teeb tsa Minecraft server li cas nrog kev lom zem thiab qhov tshwj xeeb - nws tau tsim los kom zoo ib yam li pob zeb thaiv, thiab nws teeb nrog cov xim sib txawv nyob ntawm seb muaj pes tsawg tus neeg tam sim no ua si hauv koj lub ntiaj teb!

Tab sis nws tsis tso tseg! Peb tseem yuav ua rau cov neeg siv khoom nkag tau yooj yim rau txhua tus nrog PC tsab ntawm Minecraft, yog li koj tuaj yeem faib koj li chaw nyob server thiab caw phooj ywg rau hauv koj lub ntiaj teb. Nws yuav ua haujlwm 24/7, yog li txawm tias koj tsis khoom lossis tawm ntawm lub tsev koj cov phooj ywg tuaj yeem ua tsev. Thiab peb yuav teeb tsa cov thaub qab tsis siv neeg tsuas yog thaum muaj xwm txheej tshwm sim (uas TNT rab phom nrov zoo li lub tswv yim zoo thaum lub sijhawm …) yog li koj tuaj yeem rov pib dua los ntawm hnub ua haujlwm dhau los.

Kauj Ruam 1: Cov Khoom & Cov Npe

Cov Khoom & Cov Npe
Cov Khoom & Cov Npe

Nov yog cov ntu, cov cuab yeej, thiab software koj yuav xav tau los ua kom tiav txoj haujlwm no. Kuv tau ntxiv cov ntawv txuas rau kev siv, tab sis feem ntau ntawm cov khoom siv no muaj los ntawm ntau tus neeg muag khoom, yog li khaws lawv mus qhov twg yog qhov yooj yim / pheej yig tshaj rau koj.

Qhov:

  • Raspberry Pi 3 & Cov Khoom Siv Hluav Taws Xob

    Cov no kuj muaj nyob ua ib pawg

  • Micro USB txoj cai kaum lub adapter
  • MicroSD daim npav

    Yam tsawg kawg 8 GB, tab sis daim npav siab zoo 16 lossis 32 GB tau pom zoo

  • Adafruit Neopixel Nyiaj Kub
  • Peb lub xov tooj GPIO luv
  • Nyiaj los yog Grey 3D luam ntawv filament (Txhua yam)
  • 2.5mm ntsia hlau (x4)
  • Daim ntawv parchment lossis daim ntaub so ntswg dawb

Cov Cuab Yeej:

  • MicroSD daim npav nyeem ntawv
  • Cov cuab yeej siv cuab yeej
  • Cov ntsia hlau me me
  • 3D tshuab luam ntawv

Software:

  • Minecraft (Java PC Tsab)
  • Raspbian Lite ISO

    Tsis yog "nrog Desktop" version

  • lwm.io
  • Putty lossis zoo ib yam li SSH cov neeg siv khoom davhlau ya nyob twg
  • Filezilla lossis cov neeg siv FTP zoo sib xws

Kauj Ruam 2: Teeb thiab Npaj Raspberry Pi

Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi
Teeb thiab Npaj Raspberry Pi

Ua ntej peb tuaj yeem pib txhim kho tus neeg rau zaub mov peb yuav tsum ua tiav qee qhov teeb tsa yooj yim thiab teeb tsa cov kauj ruam ntawm Pi.

1. Npaj daim npav MicroSD

Ua ntej tshaj, peb yuav tsum tso Rasbian kev ua haujlwm rau peb daim npav MicroSD siv etcher.io.

  1. Ntxig koj daim npav MicroSD rau hauv koj daim npav nyeem ntawv, thiab daim npav nyeem daim npav rau hauv USB chaw nres nkoj ntawm koj lub PC
  2. Khiav lwm qhov thiab siv Xaiv Duab khawm kom thauj Rasbian Lite ISO
  3. Xaiv daim npav MicroSD rau kev teeb tsa tsav
  4. Nyem nyem!

Thaum cov txheej txheem ua tiav lwm yam yuav tshem tawm MicroSD tsav ntawm lub kaw lus, tab sis peb yuav tsum ntxiv ib daim ntawv ntxiv yog li tsuas yog ntsaws nws thiab ntsaws rov qab rau hauv. Luam ib daim ntawv tsis muaj npe hu ua "ssh" rau hauv lub khau raj, thiab tom qab ntawd tshem tawm MicroSD tsav los ntawm lub cev dua. Tam sim no daim npav MicroSD tau npaj txav mus rau hauv Raspberry Pi.

** Yog tias koj tsis tuaj yeem rub tawm cov ntawv "ssh", nws yooj yim los ua koj tus kheej los ntawm kev hloov pauv cov npe ntawv dawb. Nco ntsoov tias koj rho tawm qhov ".txt" txuas ntxiv. Thaum nws ua haujlwm, lub cim yuav dhau mus zoo li hauv lub screenshot. **

2. Txuas mus rau Pi lub davhlau ya nyob twg

Tam sim no tias Pi muaj lub kaw lus ua haujlwm, cia peb txhawb nws!

  1. Txuas ob qho tib si wired ethernet cable thiab lub zog xa mus rau Rasberry Pi. Txawm hais tias Pi 3 tau ua hauv kev txhawb nqa Wi-nkaus, kev txuas txuas txuas muaj zog dua thiab nyiam dua rau peb cov neeg rau zaub mov.
  2. Tom ntej no peb yuav tsum khaws tus Pi tus IP chaw nyob ntawm koj lub router. Cov kauj ruam no yuav txawv me ntsis nyob ntawm koj lub npe router - hauv kuv rooj plaub kuv nkag mus rau 192.168.1.1 rau hauv kuv tus browser kom nkag mus rau lub router tswj vaj huam sib luag. Koj yuav tab tom nrhiav rau DHCP cov npe cov neeg siv khoom, thiab nkag mus lub npe "raspberrypi". Nco ntsoov tus IP chaw nyob, hauv kuv qhov piv txwv nws yog 192.168.1.115. Tam sim no tseem yog lub sijhawm zoo los teeb tus IP chaw nyob raws li "tshwj tseg" lossis "ruaj khov" yog li nws tsis tau txais chaw nyob sib txawv tom qab. Yog tias koj muaj teeb meem nrog cov kauj ruam no koj yuav xav tshawb xyuas koj lub router cov ntaub ntawv lossis chaw txhawb nqa kom paub meej.
  3. Tam sim no peb tuaj yeem qhib Putty, nkag mus rau Pi tus IP chaw nyob hauv "Tus Tswv Lub Npe" teb, thiab nyem "Qhib".

Tam sim no koj yuav tsum tau saib ntawm lub vijtsam dub nrog "nkag mus raws li:". Nov yog koj li Pi lub davhlau ya nyob twg, thiab nws yog qhov uas peb yuav ua tag nrho cov haujlwm ntawm kev teeb tsa server. Nco ntsoov, cov ntxaij vab tshaus dav dav yog rau cov twj siv hluav taws xob! Koj tus nas yuav tsis siv ntau ntawm no.

3. Raspi-teeb tsa

Txhawm rau ua tiav qhov pib teeb tsa peb yuav tsum tau nkag mus siv qhov tsis raug:

login as: pib

lo lus zais: raspberry

Tam sim no peb tuaj yeem hla dhau qee qhov teeb tsa yooj yim ntawm Pi qhov kev teeb tsa pib los ntawm kev nkag mus rau hauv qab no

sudo raspi-teeb tsa

Peb yuav tsum tau hloov pauv ntau yam, thiab kuv yuav coj koj hla lawv hauv tib qho kev txiav txim raws li lawv tau suav rau ntawm lub vijtsam teeb tsa.

  1. Hloov Tus Neeg Siv Tus Kheej - Qhov no yuav tsum muaj! Txhua leej txhua tus paub tus password tsis raug, yog li hloov nws tam sim.
  2. Kev Xaiv Network

    Hostname - los ntawm lub neej ntawd qhov no yog "raspberrypi", tab sis yog tias koj xav tau koj tuaj yeem hloov nws kom piav qhia ntau ntxiv

  3. -(tsis muaj kev hloov pauv)-
  4. Cov Kev Xaiv Hauv Zos - yog tias koj tsis nyob hauv tebchaws Askiv koj yuav xav hloov qhov no mus rau koj lub tebchaws. Kuv cov piv txwv xav tias yog Asmeskas.

    1. Hloov Chaw - siv koj tus xub xub txhawm rau nrhiav nkag rau "en_GB" nrog tus * nyob ib sab ntawm nws. Siv koj lub spacebar tshem qhov ntawd * thiab tom qab ntawd mus me ntsis ntxiv rau "en_US. UTF-8" thiab rov siv spacebar los cim nws nrog *.
    2. Hloov Sijhawm Zaum - teeb tsa qhov no tseem ceeb rau peb cov sijhawm ua haujlwm kom ua haujlwm raug
    3. Hloov Keyboard Layout - koj yuav tuaj yeem hla qhov no, tab sis yog tias sab laug hauv UK muaj ob peb lub cim keyboard uas tau txav mus los
  5. Kev xaiv cuam tshuam

    1. -(tsis muaj kev hloov pauv)-
    2. SSH - Pab kom qhov no yog li koj tuaj yeem txuas ntxiv siv Putty tom qab rov pib dua Pi.
  6. -(tsis muaj kev hloov pauv)-
  7. Advanced Xaiv

    1. Nthuav Cov Ntaub Ntawv - qhov no ua kom paub tseeb tias Pi tuaj yeem siv txhua qhov chaw muaj nyob hauv SD daim npav
    2. -(tsis muaj kev hloov pauv)-
    3. Memory Split - hloov qhov no mus rau 16 kom tshem tau ntau lub cim xeeb rau Minecraft kev siv.

Tam sim no xaiv "Ua tiav", thiab tom qab ntawd xaiv "Yog" kom rov pib dua.

Qhov no yuav xaus koj qhov kev sib tham hauv Putty. Cias muab nws ib pliag kom ua tiav qhov rov pib dua, tom qab ntawd qhib Putty dua thiab rov txuas dua mus rau Pi tus IP chaw nyob. Nco ntsoov siv koj tus password tshiab!

Kauj Ruam 3: Nruab Dedicated Server

Kev teeb tsa lub server software yog cov kauj ruam ntev tshaj plaws, tab sis kuj tseem ceeb tshaj plaws. Peb yuav siv sijhawm ntau nkag mus rau hauv pawg ntawm cov lus tsis txaus siab Linux. Tsis txhob cia qhov ntawd hem koj! Tsuav koj tuaj yeem luam tawm thiab muab tshuaj txhuam koj tuaj yeem hla dhau ntu no.

Minecraft server yog qhov nyuaj, thiab khiav nws ntawm lub khoos phis tawj me me li Raspberry Pi xav tau qee qhov ua kom yooj yim. Kuv pib tawm nrog qhov kev qhia zoo no los ntawm James Chambers, vim tias nws muaj ob peb lub tswv yim zoo ntawm kev ua kom cov neeg ua haujlwm tau zoo tshaj plaws. Kuv yuav los piav qhia nws txheej txheem teeb tsa hauv qab no, thiab hais txog qee qhov kev hloov pauv thiab hloov tshiab uas kuv tau ua, tab sis kuv xav kom koj muab nws nplooj ntawv nyeem kom paub meej ntxiv.

Tam sim no koj tau nkag rov qab siv lub neej ntawd "pi" thiab koj tus password tshiab, peb tuaj yeem pib nkag mus rau cov lus txib txhawm rau teeb tsa server cov ntaub ntawv.

Tseem ceeb - Ntau ntawm cov lus txib no ntev thiab nyuaj thiab yuav yog qhov mob tiag tiag rau ntaus rau hauv lub qhov rai qhov rai. Yog li tsis txhob ua! Ua kom pom cov lus hais kom ua hauv lub qhov rais no, luam nws nrog ctrl-c, thiab tom qab ntawd hauv koj lub qhov rai qhov rai tsuas yog nyem-nyem nrog koj tus nas los muab cov ntawv sau. Saib, tus nas ntawd zoo rau qee yam tom qab tag nrho!

Rau qhov seem ntawm cov kauj ruam no, koj yuav tau theej txhua qhov lus txib hauv cov kab ntawv kab ntawv no.

Kuv yuav piav qhia luv luv txog yam peb tab tom ua.

Peb yuav pib los ntawm kev tau txais peb cov software txhua hnub.

sudo apt-tau hloov tshiab & sudo apt-tau hloov tshiab

Thaum twg koj pom qhov kev thov rau kev pom zoo teeb tsa, ntaus "y" thiab ntaus nkag mus lees txais thiab txuas ntxiv.

Minecraft khiav ntawm Java, tab sis peb "Lite" Rasbian teeb tsa tsis suav nrog nws, yog li cia peb tuav qhov ntawd.

wget-tsis-khij-ntawv pov thawj -no-ncuav qab zib -header "Cookie: oraclelicense = lees txais-ruaj ntseg rov qab-ncuav qab zib" https://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808 /jdk-8u161-linux-arm32-vfp-hflt.tar.gz

Nco tseg ** Thaum Java tau hloov kho rau qhov hloov tshiab uas hais kom ua yuav dhau mus. Yog tias koj tau txais cov lus yuam kev koj yuav tsum tau hloov kho cov lus txib rau qhov hloov tshiab kawg. Mus ntsib Oracle's Java rub tawm nplooj ntawv, nyem rau "Txais Daim Ntawv Pom Zoo Daim Ntawv Pom Zoo" khawm, thiab tom qab ntawd nyem rau kab ntawv txuas rau kab ntawv kawg linux-arm32 thiab xaiv daim ntawv txuas. Koj yuav tsum tau siv qhov txuas txuas tshiab los hloov cov ntawv hauv cov lus txib saum toj no, pib ntawm http. **

Tam sim no peb tuaj yeem nruab Java cov ntaub ntawv peb nyuam qhuav rub tawm.

sudo mkdir /usr /java

cd /usr /java

Yog tias koj yuav tsum hloov qhov rub tawm txuas rau qhov hloov tshiab, nco ntsoov hloov pauv tus lej hauv cov lus txib tom ntej no kom phim.

sudo tar xf ~/jdk-8u161-linux-arm32-vfp-hflt.tar.gz

sudo hloov kho-hloov pauv-nruab/usr/bin/java java /usr/java/jdk1.8.0_161/bin/java 1000

sudo hloov tshiab-hloov pauv-nruab/usr/bin/javac javac /usr/java/jdk1.8.0_161/bin/javac 1000

cd ~ ib

Thiab thaum kawg, qhov xwm txheej tseem ceeb uas koj tau ua siab ntev tos, cia peb nruab Minecraft server. Nov yog qhov tshwj xeeb version ntawm tus neeg rau zaub mov hu ua Ntawv, thiab nws tau ua tiav ntawm qhov ua tau zoo los txhim kho kev ua haujlwm.

mkdir Ntawv

wget

unzip master.zip -d Ntawv

mv ~/Ntawv/RaspberryPiMinecraft-master/* ~/Ntawv/

cd Ntawv

chmod +x start.sh

wget

java -jar -Xms512M -Xmx800M paperclip.jar

Qhov lus txib zaum kawg yuav pib rau server thawj zaug, thiab tom qab ob peb lub sijhawm koj yuav tau txais qhov yuam kev uas hais tias koj yuav tsum pom zoo rau EULA. Qhib EULA nrog cov lus txib tom ntej:

nano eula.txt ua

Hloov kab uas hais tias "eula = cuav" rau "eula = tseeb". Txuag koj qhov kev hloov pauv los ntawm kev ntaus ctrl-x, tom qab ntawd Y, tom qab ntawd nkag mus.

Nco tseg ** James Chambers hais txog ib txoj hauv kev rau overclocking koj daim npav SD ntawm qhov no ntawm nws phau ntawv qhia. Kuv tsis tau tus kheej sim cov kauj ruam ntawd, vim nws xav tau daim npav zoo thiab daim uas kuv tau muaj los siv tsis yog ib yam tshwj xeeb. Kuv ntseeg tias overclocking yeej yuav txhim kho kev ua tau zoo ntxiv, tab sis txawm tias tsis muaj overclocking server ua haujlwm tau zoo txaus uas kuv tsis tau txais kev yws los ntawm cov menyuam ua si ntawm nws. **

Cia saib sai sai ntawm Server Properties thiab ua ob peb qhov kev hloov pauv.

nano server.properties

Muaj cov npe ntev ntawm yam uas koj tuaj yeem hloov pauv txog koj lub server ntawm no, xws li kho tus kheej lub npe server thiab MOTD, hloov gamemode, lossis ua kom PvP lossis hais kom thaiv. Koj tuaj yeem hloov pauv yam koj nyiam tam sim no, lossis koj tuaj yeem qhib cov ntawv no kom hloov pauv ntau tom qab, tab sis muaj ob qhov kev hloov pauv peb yuav ua tam sim ntawd.

max-players = 8

server-chaw nres nkoj = 25565

Yim tus neeg ua si yog qhov siab tshaj plaws kuv xav qhia, ib qho siab dua thiab koj zoo li yuav pom cov neeg rau zaub mov ua haujlwm tau qeeb, txawm tias txhua qhov kev ua kom tau zoo los ua haujlwm ntawm Pi.

Chaw nres nkoj neeg rau zaub mov yuav tsum tau hloov pauv vim tias zoo li tus lej "raspberry" tus password, txhua tus paub qhov chaw nres nkoj tsis raug ntawm 25565. Txawm tias hloov me me rau 26565 yuav pab ua kom koj lub server ruaj ntseg. Jot nqis tus lej chaw nyob ib sab uas koj tau khaws Pi tus IP chaw nyob. Koj yuav xav tau ob qho no tom qab.

Thaum koj tau ua tiav kev hloov kho koj cov chaw, txuag cov kev hloov pauv los ntawm kev ntaus ctrl-x, tom qab ntawd Y, tom qab ntawd nkag mus.

Cov kauj ruam tom ntej hauv kev npaj koj lub server tseem yuav siv sijhawm ntev tshaj plaws thaum nws pib, tej zaum yuav txog ib teev. Cov lus txib no yuav tsim ua ntej koj lub ntiaj teb, uas txhais tau tias lub server tsis tas yuav ua txhua txoj haujlwm no tom qab thaum koj thiab koj cov phooj ywg tab tom tshawb nrhiav.

cd ~/Ntawv/plugins

wget --content -disposition -E

sudo apt-tau nruab screen

cd Ntawv

./start.sh

Nws yuav tsis zoo li nws muaj dab tsi tshwm sim, tab sis tam sim no koj lub server tau pib! Txhawm rau cuam tshuam nrog tus neeg rau zaub mov peb yuav tsum siv cov lus txib no

npo -r minecraft

Thiab tom qab ntawd peb yuav tsim lub ntiaj teb ua ntej:

wb world set 1000 spawn

wb world fill 1000

wb fill confirm

Qhov no yog ib feem uas yuav siv sijhawm ntev. Mus nqa khoom noj txom ncauj thiab rov qab saib tom qab! Thaum cov txheej txheem tiav, kaw lub server nrog cov lus txib yooj yim heev

nres

Qhov no yuav txuag thiab kaw cov neeg rau zaub mov thiab xa koj rov mus rau Raspberry Pi davhlau ya nyob twg.

Peb txoj haujlwm kawg yog teeb tsa tus neeg rau zaub mov kom pib ua haujlwm thaum Raspberry Pi tau ntsaws lossis rov pib dua. Peb tuaj yeem ua qhov no los ntawm kev tsim cov ntawv yooj yim.

cd ~ ib

nano pib.sh

Peb tau siv nano los kho ob peb cov ntaub ntawv ua ntej, tab sis lub sijhawm no peb tab tom tsim ib qho los ntawm kos, yog li lub qhov rai yuav tsis muaj dab tsi. Luam ob kab no rau hauv cov ntawv:

cd/tsev/pi/Ntawv

screen -dmS minecraft java -server -Dfile.encoding = UTF -8 -Xms512M -Xmx800M -XX: NewSize = 300M -XX: MaxNewSize = 500M -XX:+CMSIncrementalMode -XX:+UseConcMarkSweepGC -XX:+UseParNewC CMSIncrementalPacing -XX: ParallelGCThreads = 4 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX: SurvivorRatio = 16 -XX: TargetSurvivorRatio = 90 -jar /home/pi/Paper/paperclip.jar

Tom qab ntawv khaws koj tsab ntawv tshiab los ntawm kev ntaus ctrl-x, tom qab ntawd Y, tom qab ntawd nkag mus.

chmod +x startup.sh

chmod +x /etc/rc.local

sudo nano /etc/rc.local

Kab kawg ntawm rc.local cov ntaub ntawv hais tias "tawm 0". Ncaj nraim saum kab ntawv no peb yuav ntxiv qhov no:

su pi -c /home/pi/startup.sh

Thiab ib zaug ntxiv peb khaws cov ntaub ntawv hloov pauv nrog ctrl-x, tom qab ntawd Y, tom qab ntawd nkag mus.

sudo rov pib dua

Koj yuav tau txais cov lus hais tias qhov kev sib txuas tau kaw, thiab koj tuaj yeem kaw qhov Putty window.

Qhov ntawd yog nws! Koj tau ua nws dhau ntawm qhov tho txawv me ntsis! Tam sim no peb tau npaj los sim peb cov server!

Kauj Ruam 4: Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg

Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg
Ntsuam Xyuas Koj Li Server thiab Caw Koj Cov Phooj Ywg

Ntxiv mus, peb yuav tshuaj xyuas tias lub server ua haujlwm thiab ua kom ntseeg tau tias peb cov phooj ywg tuaj yeem koom nrog.

Qhib koj lub Minecraft launcher ntawm koj lub PC thiab ntaus ua si. Nco ntsoov tias koj tab tom siv qhov kev tshaj tawm tshiab tshaj plaws kom phim rau Paper server.

Ntawm lub vijtsam tseem ceeb xaiv Multiplayer, tom qab ntawd Ntxiv Server. Sau lub npe koj xav kom muaj nyob hauv koj cov npe neeg rau zaub mov, thiab rau Chaw Nyob Server sau koj tus IP thiab tus lej chaw nres nkoj. Rau kuv tus piv txwv peb siv 192.168.1.115:26565. Nco ntsoov tias koj muaj cov nyuv ntawm IP chaw nyob thiab tus lej chaw nres nkoj, thiab tias tsis muaj chaw nyob. Nyem Ua tiav, thiab tom qab ntawd nyem ua si ntawm koj lub server. Tom qab ob peb lub sijhawm koj yuav pom koj tus kheej poob rau hauv koj lub ntiaj teb tshiab!

Tos, rov qab los! Tsis txhob pib tsim txhua yam los ntawm koj tus kheej, cia caw qee tus phooj ywg! Hmoov tsis zoo, lawv tsis tuaj yeem siv tib tus IP chaw nyob uas koj ua. Yog li txhawm rau ua txoj haujlwm no, koj yuav tsum xub qhia koj lub router tias nws zoo rau cov neeg uas nyob sab nraum koj lub tsev txuas nrog Pi. Qhov no hu ua Port Forwarding thiab cov txheej txheem tseeb yuav txawv me ntsis nyob ntawm koj lub router. Kuv tau txuas lub vijtsam ntawm qhov nws zoo li ntawm kuv TP Txuas hom router, tab sis koj yuav xav tau txheeb xyuas koj lub routers txhawb nqa qhov chaw kom paub ntau ntxiv.

Hauv koj qhov chaw xa mus rau Chaw Xa Ntawv, nkag mus rau tus lej chaw nres nkoj uas koj xaiv rau koj lub server, thiab tom qab ntawd tus IP chaw nyob rau koj li Raspberry Pi. Koj tus router tam sim no paub tias thaum koj cov phooj ywg sim txuas mus rau tus lej chaw nres nkoj, lawv yuav tsum raug coj mus rau Pi.

Tom ntej no peb yuav tsum siv kev pabcuam dawb xws li Tsis-IP los tsim koj tus kheej qhov chaw nyob tshwj xeeb, hu ua Hostname. Koj tseem yuav teeb tsa koj lub router lossis koj lub PC kom ua rau Hostname tus IP chaw nyob tshiab.

Ua raws cov kauj ruam ntawm lawv Cov Ntawv Qhia Teeb tsa tam sim no.

Thaum koj tau teeb tsa koj li Tsis-IP tus lej, koj cov phooj ywg tuaj yeem txuas rau koj lub server los ntawm kev nkag mus rau koj tus Hostname tshiab thiab tus lej chaw nres nkoj hauv ntu Chaw Nyob Server ntawm lawv Minecraft multiplayer screen. Piv txwv li, hostname.ddns.net:266565.

Kauj ruam 5: Txuag Lub Ntiaj Teb! (nrog Tsis Siv Neeg Backups)

Txuag Lub Ntiaj Teb! (nrog Tsis Siv Neeg Backups)
Txuag Lub Ntiaj Teb! (nrog Tsis Siv Neeg Backups)

Cov kauj ruam no yog nyob ntawm yeem, tab sis nws yog lub peev xwm cawm neeg txoj sia. Koj lub ntiaj teb ntsib qee qhov kev pheej hmoo loj, tsis hais los ntawm daim npav MicroSD puas, qee zaum kev ua phem lossis kev tu siab, lossis tsuas yog cov neeg nkag siab phem. Txhawm rau tiv thaiv txhua yam koj ua haujlwm hnyav, peb yuav muaj lub server cia li txuag koj cov ntaub ntawv hauv ntiaj teb txhua hmo. Txhawm rau tiv thaiv koj daim npav MicroSD los ntawm kev sau peb tseem yuav tshem tawm cov thaub qab uas muaj ntau dua li ib lub lim tiam. Tom qab ntawd, koj tuaj yeem yooj yim luam lawv mus rau koj lub PC lossis lwm lub thaub qab kom muaj kev nyab xeeb ntau dua.

Peb yuav pib los ntawm kev siv Putty rov txuas rau peb Pi txhawm rau ua lwm tsab ntawv tshiab.

nano dailybackup.sh cov

Luam cov lus txib hauv qab no rau hauv tsab ntawv:

# Nres Minecraft server

screen -x minecraft -X cov khoom nres^M pw 5 # Luam daim ntawv teev npe rau thaub qab/PaperYYDDMM cp -a Ntawv/. thaub qab/Ntawv $ (hnub +%F) # Rho tawm cov thaub qab qub dua 7 hnub nrhiav thaub qab/* -mindepth 0 -maxdepth 0 -type d -ctime +7 -exec rm -rf {};

Thiab tom qab ntawd, hais nrog kuv - txuag koj cov ntaub ntawv los ntawm kev ntaus ctrl -x, Y, nkag mus.

Tam sim no peb yuav tsim txoj haujlwm rov ua haujlwm kom rov qab sau ntawv txhua hmo siv crontab.

crontab -e

Koj yuav tau txais kev xaiv cov kws kho mob thawj zaug koj ua cov lus txib no, xaiv tus lej 2 rau Nano.

Qhov no yuav qhib cov ntawv tshwj xeeb rau kev teem sijhawm ua haujlwm. Hauv qab ntawm cov ntawv no ntxiv cov kab hauv qab no:

50 * * * /home/pi/dailybackup.sh

15 0 * * * sudo rov pib dua

Thawj kab ntawv qhia Pi kom khiav koj cov ntawv rov qab thaum 12:05 sawv ntxov txhua hmo. Kab thib ob qhia rau Pi kom rov pib dua kaum feeb tom qab. Yog tias koj xav tau lub sijhawm sib txawv rau kev thaub qab thiab rov pib dua koj tuaj yeem hloov cov kab no kom haum rau koj nyiam. Tsuas nco ntsoov tias thawj tus lej yog feeb thiab tus lej thib ob yog teev hauv 24 teev. Peb lub hnub qub ua kom ntseeg tau tias tsab ntawv no yuav ua haujlwm txhua hnub.

Thaum koj lub kaw lus tau ua haujlwm ib ntus, koj yuav xav coj tus cwj pwm ntawm khaws cov thaub qab mus rau lwm qhov chaw tawm ntawm Pi's MicroSD card. Txoj haujlwm no ua tau yooj yim heev los ntawm kev txuas rau koj lub server siv Filezilla. Cias rub cov ntawv khaws cia ntawm sab xis ntawm Filezilla thiab xa nws mus rau koj lub PC. Thaum nws theej tag nrho cov ntaub ntawv koj tuaj yeem khaws lawv ntev li koj xav tau!

Thiab yog qhov xwm txheej puas tau tsoo thiab koj yuav tsum rov qab mus rau ib qho ntawm koj cov ntaub ntawv khaws tseg, nws yog txheej txheem sai thiab yooj yim. Ua ntej kom paub tseeb tias koj tau tso tseg server:

npo -r minecraft

nres

Tom qab ntawd siv Filezilla txhawm rau tshem tawm Cov Ntawv Qhia Ntawv thiab hloov nws los ntawm rub ib qho ntawm koj cov npe khaws tseg rov qab mus rau Pi. Nco ntsoov tias koj rho tawm hnub tim los ntawm cov npe phau ntawv yog li nws tau rov muaj npe yooj yim dua li Ntawv. Tom qab ntawd koj tuaj yeem rov pib dua koj lub server nrog

./startup.sh

Thiab ib yam li ntawd, koj tuaj yeem rov qab mus rau kev lag luam ntawm kev tsim tsev!

Kauj Ruam 6: Nqa cov LEDs

Hook Up cov LEDs
Hook Up cov LEDs
Hook Up cov LEDs
Hook Up cov LEDs
Hook Up cov LEDs
Hook Up cov LEDs

Lub sijhawm ntxiv qee qhov teeb ci! Nov yog qhov uas koj cov neeg rau zaub mov pib dhau los ntau dua li tsuas yog cov plua plav tom qab koj saib. Cov kauj ruam no yuav qhia koj yuav ua li cas thiaj li txuas tau thiab txuas Neopixel Jewel rau Raspberry Pi, thiab tom qab ntawd teeb tsa software uas xav tau los khiav cov LEDs. Tsis ntev tom qab ntawd koj yuav tsis tas yuav xav tsis thoob yog tias ib tus neeg online tos kom ua si nrog koj, vim tias koj lub server yuav qhia rau koj ib nyuag ntsia xwb!

Adafruit's Neopixel's yog cov LEDs zoo heev. Lawv yog RGB, uas txhais tau tias lawv tuaj yeem ua lub teeb nyob hauv txhua yam xim uas koj xav tau. Lawv tuaj yeem hais tau, uas txhais tau tias koj tuaj yeem siv software hais kom hloov lawv cov xim thaum twg koj xav tau. Yog xav paub ntau ntxiv cov ntaub ntawv ntawm yuav ua li cas Neopixels ua haujlwm nrog Raspberry Pi ua tibzoo saib ntawm Adafruit phau ntawv qhia ua haujlwm.

Cov hniav nyiaj hniav kub muaj 7 LEDs uas yuav muab rau peb kom muaj xim zoo nkauj. Kuj tseem muaj tsib lub ntsiab lus sib txuas, tab sis peb tsuas yog siv peb qho xwb. Kuv pom zoo kom koj siv peb lub xov tooj sib txawv xim kom tsis txhob sib xyaw thaum koj txuas lawv rau Pi tom qab. Hauv kuv cov duab piv txwv kuv siv liab, dub, thiab xim av.

Ua ntej pib cov kauj ruam no koj yuav xav kom Raspberry Pi ua kom muaj zog. Nkag mus rau cov lus txib no thiab tom qab ntawd tshem lub Pi lub zog hluav taws xob.

npo -r minecraft

nres

sudo kaw -h tam sim no

Txiav tawm peb tus poj niam GPIO cov xov hlau, ntev txaus uas koj muaj xaim ntau los ua haujlwm nrog thaum siv lub tshuab raj. Koj tuaj yeem rov ua dua qhov zoo ib yam li kuv tau ua. Ua tib zoo xaim cov xov hlau rau cov neeg nyob ntawm Pob Zeb. Tom qab ntawd txuas tus poj niam txuas rau Raspberry Pi GPIO pins:

PWR to pin 1 = 3.3V

GND rau tus pin 6 = Hauv av

IN rau tus pin 12 = GPIO18

Thaum Pob Zeb Diamond nyob hauv qhov chaw, koj tuaj yeem ntsaws Pi rov qab rau hauv thiab siv Putty txuas thiab teeb tsa lub software LED nrog cov lus txib hauv qab no. Saib rau qhov chaw uas yuav thov koj nkag mus rau Y txhawm rau txuas ntxiv kev teeb tsa.

sudo apt-tau nruab tsim-qhov tseem ceeb nab hab sej-dev git

sudo apt-tau nruab scons

sudo apt-tau nruab swig

git clone

cd rpi_ws281x

saib xyuas

Tseem ceeb ** Hauv kauj ruam tom ntej peb yuav ua kom me me ntxiv rau lub tsev qiv ntawv neopixel. Qhov no yog qhov tsim nyog kom tsis txhob nco qhov yuam kev uas tsav kuv ceev rau ob peb hnub. Yog tsis muaj nws cov LEDs yuav ua haujlwm li ob peb teev thiab tom qab ntawd nres hloov kho kom raug. **

cd python

nab hab sej setup.py tsim

sudo nano tsim/lib.linux-armv7l-2.7/neopixel.py

Siv tus xub xub nqes los hla kab uas hais tias chav kawm Adafruit_NeoPixel (yam khoom):. Tsis deb dhau los uas koj yuav pom ntu nrog cov ntawv xiav uas hais tias def _cleanup (tus kheej). Koj yuav tau theej cov kab hauv qab no rau hauv no ntu, raws nraim li qhia hauv lub screenshot saum toj no.

ws.ws2811_fini (self._leds)

Thiab ib zaug ntxiv peb yuav tsum khaws cov kev hloov pauv nrog ctrl-x, Y, nkag mus.

cd ~ ib

cd rpi_ws281x/python

sudo python setup.py nruab

Tom ntej no peb yuav tsum qhia cov ntawv xeem tus lej ntawm LEDs peb muaj, tom qab ntawd peb tuaj yeem pom lawv!

cd piv txwv

sudo nano strandtest.py

Nrhiav kab uas hais tias LED_COUNT = 16 thiab hloov nws mus rau LED_COUNT = 7, tom qab ntawd ctrl-x, Y, nkag mus rau txuag.

sudo nab hab sej strandtest.py

Yog tias txhua yam tau ua tiav raug, koj tau raug qhov muag tsis pom los ntawm qhov ua rau pom zaj sawv tawg. Thaum koj tuaj yeem pom dua, ntaus ctrl-c kom nres lub teeb. Cov LEDs yuav tsis tua, tab sis lawv yuav tsum nres nyem thiab qhov ntawd zoo txaus rau tam sim no.

Kauj Ruam 7: Teeb tsa lub LEDs txhawm rau Txheeb Xyuas Tus Neeg rau zaub mov

Ua haujlwm LEDs txhawm rau Txheeb Xyuas Tus Txheej Txheem
Ua haujlwm LEDs txhawm rau Txheeb Xyuas Tus Txheej Txheem

Nrog peb cov LEDs teeb tsa thiab npaj tau, nws yog lub sijhawm los ua rau lawv cuam tshuam rau tus neeg rau zaub mov. Tshwj xeeb, peb yuav ua rau lawv qhia tus lej tam sim no ntawm cov neeg ua si ntawm server:

Cov neeg ua si = Ore

  • 0 = Redstone
  • 1-2 = Hlau
  • 3-4 = Kub
  • 5-6 = Emerald
  • 7-8 = Pob Zeb Diamond

Yog tias lub server tsis ua haujlwm, Oreblock yuav yog Coal (LEDs tawm). Thiab raws li kev ntxiv nyiaj ntxiv, yog tias kev txheeb xyuas qhov xwm txheej tsis tuaj yeem nrhiav kev txuas hauv is taws nem LEDs yuav ntsais daj!

Txhawm rau khaws cov neeg suav suav los ntawm server peb tab tom yuav nruab mcstatus los ntawm Nathan Adams, yog ib tus Mojang cov tsim game.

sudo apt-tau nruab nruab sej-pip

sudo pip nruab mcstatus

Tom qab ntawd peb yuav tsum luam ob tsab ntawv nab nab hauv qab no, mcled.py thiab ledoff.py, rau peb cov neeg rau zaub mov nrog Filezilla. Tsuas yog rub thiab tso ob tsab ntawv rau hauv lub npov ntawm sab xis, raws li pom hauv qhov screen txhaj tshuaj.

Mus tom ntej thiab sim ledoff.py tam sim no, yog li peb tuaj yeem tua LEDs uas tau sab laug rau hauv cov kauj ruam dhau los.

sudo nab hab sej ledoff.py

Thaum khiav cov ntawv sau tus kheej zoo li qhov no koj yuav tau txais cov lus hais tias "Segmentation txhaum". Nov yog qhov teeb meem daws tsis tau hauv Neopixel.py lub tsev qiv ntawv uas tsis muaj kev cuam tshuam rau yam peb tab tom ua.

Yog tias koj xav paub yuav ua li cas cov ntawv sau no ua haujlwm, koj tuaj yeem qhib lawv nrog cov ntawv sau ntawm koj lub PC, lossis siv nano ntawm lub davhlau ya nyob twg. Tsuas yog ceev faj kom tsis txhob yuam kev txuag qhov kev hloov pauv uas yuav ua rau lawv tsis ua haujlwm!

Nco tseg ** mcled.py xav tias koj siv chaw nres nkoj 26565 los ntawm kuv tus piv txwv. Yog tias koj siv lwm qhov chaw nres nkoj koj yuav tsum hloov tsab ntawv kom phim nrog cov kauj ruam hauv qab no **

sudo nano mcled.py

Nrhiav kab ntawv liab ntawm cov ntawv uas hais tias "# Tau txais cov neeg rau zaub mov suav", thiab hauv qab no koj yuav pom kab uas suav nrog cov ntawv ntsuab uas hais tias "localhost" thiab tus lej chaw nres nkoj nyob ze ntawm qhov ntawd. Hloov tus lej chaw nres nkoj kom phim koj li, thiab ib txwm khaws koj cov kev hloov pauv nrog ctrl-x, Y, nkag mus.

Txhawm rau kom tau txais qhov hloov tshiab tas li ntawm tus neeg rau zaub mov xwm txheej peb yuav qhia rau Pi kom khiav mcled.py tsab ntawv txhua feeb, thiab qhov ntawd txhais tau tias teeb tsa lwm ob kab ntawm kab hauv crontab.

crontab -e

Koj yuav pom ob kab uas peb tau ntxiv ua ntej rau kev teem sijhawm thaub qab thiab rov pib dua. Tam sim no peb yuav ntxiv ob qho ntxiv:

* 6-20 * * * sudo nab hab sej mcled.py

0 21 * * * sudo nab hab sej ledoff.py

Thawj kab hais kom Pi khiav mcled.py txhua feeb ntawm txhua teev ntawm 6 teev sawv ntxov txog 8:59 teev tsaus ntuj. Kab thib ob qhia rau Pi kom tua LEDs thaum 9 teev tsaus ntuj. Qhov ntawd yog tus kheej nyiam, vim hais tias los ntawm lub sijhawm ntawd kuv cov menyuam tsis tau ua si Minecraft lawm, txawm hais tias lub server tseem ua haujlwm. Peb kuj tseem muaj OreServer nthuav tawm zoo tshaj peb lub TV thiab lub teeb ci dhau los ua rau muaj kev kub ntxhov thaum yav tsaus ntuj. Koj tuaj yeem hloov kho ob txoj kab no kom ua rau LEDs khiav tsis nres, lossis tua tom qab, lossis ib qho twg haum rau koj lub hom phiaj.

Tsis ntev tom qab koj qhov kev hloov pauv tau txais kev cawmdim (koj puas mob ctrl-x, Y, nkag mus tau?) Tsab ntawv yuav raug hu thiab koj lub Pob Zeb yuav ci dua. Feem ntau nws yuav liab los qhia tias lub server khiav tab sis tsis siv. Siv sijhawm me ntsis tam sim no kom pib Minecraft thiab koom nrog lub server zoo li peb tau ua thaum peb xeem dhau los. Tsis ntev tom qab koj tau koom nrog, LEDs yuav tsum hloov mus rau dawb, thiab tom qab ntawd rov qab los liab thaum koj txiav tawm.

Kauj Ruam 8: Ua Tus Kheej

Ua qhov Ore Case
Ua qhov Ore Case
Ua qhov Ore Case
Ua qhov Ore Case
Ua qhov Ore Case
Ua qhov Ore Case
Ua qhov Ore Case
Ua qhov Ore Case

Qhov kawg kov kom coj txhua qhov no ua ke yog rooj plaub oreblock rau Raspberry Pi. Txhawm rau ua cov ntaub ntawv Ore, Kuv siv Lulzbot TAZ6 3D tshuab luam ntawv ntawm kuv lub chaw tsim khoom hauv cheeb tsam, RiverCityLabs. Kuv tau muab kuv cov ntaub ntawv luam tawm. STL rau lub hauv paus thiab saum toj hauv qab no. Yog tias koj tsis muaj koj tus kheej lub tshuab luam ntawv 3D, txheeb xyuas koj thaj chaw rau cov zej zog tsim khoom, lawv zoo heev! Lossis koj yuav muaj lub tsev qiv ntawv hauv nroog lossis tsev kawm ntawv uas muaj cov tshuab luam ntawv nkag mus rau pej xeem. Kuj tseem muaj ntau qhov kev pabcuam 3D luam ntawv online uas tuaj yeem luam tawm thiab xa koj tus qauv tsim. Lossis koj tuaj yeem muaj tswv yim! Tsis muaj dab tsi los txwv koj ntawm kev ua rooj plaub tawm ntawm cov duab los qhia lossis ib pawg ntawm Lego grey lossis lwm yam uas koj muaj ze ntawm tes.

Qee cov ntawv tseem ceeb rau thaum koj teeb tsa cov tshuab luam ntawv 3D:

  • Luam tawm cov ntawv yam tsis muaj kev hloov pauv kom ntseeg tau tias cov kab sib dhos ua ke nrog Pi.
  • Tig Sab Saum Rov Qab kom qhib qhov kawg tau ntsib.
  • Nco ntsoov qhib koj lub chaw txhawb nqa, yog li cov thav duab ntawm phab ntsa tsis txhob ntxhov.

Thaum koj luam tawm tiav koj tuaj yeem xa Pi mus rau Base nrog plaub 2.5 hli ntsia hlau. Kuv nrhiav tsis tau qhov txuas rau cov khoom lag luam tiag tab sis kuv pom cov no hauv 2 pob ntawm Menards, uas yog txoj hauv kev zoo dua li xaj ib lub thawv 100 ntawm Amazon.

Tshem tag nrho cov ntaub ntawv txhawb nqa los ntawm Sab Saum Toj, thiab txiav ib daim ntawv ntawm daim ntawv parchment lossis ntawv dawb rau kom haum rau sab hauv. Qhov no yuav nthuav tawm lub teeb ci LED uas ua rau lub ntsej muag ci zoo li ib lab lub sijhawm zoo dua li tsuas yog tso lub qhov qhib.

Txuas lub kaum sab xis sab xis MicroUSB adapter rau lub chaw nres nkoj fais fab kom lub cable tawm sab nraum qab ntawm rooj plaub ntawm ib sab ntawm ethernet chaw nres nkoj.

Tam sim no koj tuaj yeem txuas lub zog thiab cov xov tooj ethernet, teeb Sab saum toj rau hauv qhov chaw, thiab txaus siab!

Kauj Ruam 9: Cov ntsiab lus, Xav Ntxiv, thiab Ua Tsaug

Qhov khoom plig loj hauv Minecraft Challenge 2018

Pom zoo: