Minecraft Pocket Edition: programmeer uw eigen mods
We laten je stap voor stap zien hoe je je eigen mods voor Minecraft Pocket Edition kunt programmeren. Dus je kunt het bekende spel uitbreiden volgens je voorkeuren.
Minecraft Pocket-bewerking: programmeermodi - de voorbereidingen
Om mods te kunnen programmeren, hebt u een programma nodig dat Java-scripts kan maken. We zullen je ook alle stappen weer tonen in de fotogalerij aan het einde van het artikel.
- U kunt bijvoorbeeld Visual Studio gebruiken, wat een zeer uitgebreid programmeerprogramma is.
- Als alternatief kunt u ook de ietwat eenvoudiger Notepad ++ gebruiken.
- Als u geen computer bij de hand hebt, wordt de DroidEdit-app aanbevolen voor het programmeren.
Minecraft Pocket Edition-mods: blokken en items toevoegen
Allereerst willen we u laten zien hoe u uw eigen blokken en items kunt toevoegen.
- Als u een nieuw item wilt maken, schrijft u "ModPE.setItem (". Schrijf vervolgens de ID van het item tussen haakjes. Zorg ervoor dat de ID nog niet wordt gebruikt. Schrijf vervolgens de textuur van het item tussen aanhalingstekens en een 0 voor de schade. Schrijf ten slotte de naam van het item tussen aanhalingstekens, voeg de sluitende haakjes en een puntkomma toe. In ons geval is de voltooide opdracht: »ModPE.setItem (467, " apple ", 0, " THE REAL APPLE ");".
- De volgende stap is het toevoegen van een nieuw voedingsmiddel dat ook harten kan herstellen. In plaats van »ModPE.setItem («, wordt »ModPE.setFoodItem« aan het begin geschreven en wordt tussen haakjes een extra waarde toegevoegd voor het aantal te herstellen halve harten. In ons geval is de voltooide opdracht »ModPE.setFoodItem (468, "brood", 0, 15, "Lekker eten"); «.
- Ten slotte moet een nieuw blok worden toegevoegd. Om dit te doen, schrijf "Block.defineBlock (" en vervolgens opnieuw een ID en de naam tussen aanhalingstekens. Vervolgens wordt een vierkante haak geopend en worden de textuur en een 0 toegevoegd. Omdat alleen deze textuur moet worden gebruikt, voegen we toe voeg nog twee vierkante haken toe, in ons geval is het commando: »Block.defineBlock (469, " Example ", [[" bedrock ", 0]]);«.
- Vergeet echter niet aan te geven hoe lang het moet duren voordat uw blok wordt vernietigd. U kunt bijvoorbeeld de opdracht "Block.setDestroyTime (469, 2);" gebruiken. De 2 staat voor tijd in dit voorbeeld. Nummer 469 is de ID.
MCPE-mods: categorieën instellen en inventaris bewerken
Om alle mods correct te laten werken, moet je een categorie instellen voor je nieuw toegevoegde dingen en de creatieve inventaris bewerken:
- Om een categorie in te stellen, schrijft u "Item.setCategory (", tussen de haakjes de ID en "ItemCategory." En de categorie. U kunt de categorie "TOOL", "FOOD", "MATERIAL", "DECORATION" of "gebruiken. Gebruik INTERN. In ons geval hebben we de opdracht "Item.setCategory (467, ItemCategory.TOOL);" gebruikt. Vergeet deze stap niet te herhalen voor alle dingen die u hebt toegevoegd.
- Ten slotte moeten uw items en blokken ook worden weergegeven in de creatieve inventaris. Schrijf "Player.addItemCreativeInv (", tussen haakjes de ID en een 1 en een 0 in ons voorbeeld. In ons voorbeeld schreven we de opdracht "Player.addItemCreativeInv (467, 1, 0);". Herhaal deze stap voor iedereen nieuwe items en blokken.
Minecraft Pocket-editie: eigen knutsel- en ovenrecept
Ten slotte laten we je zien hoe je je eigen ontwerp en ovenrecept kunt maken.
- Om een recept te maken, kunt u de opdracht »Item.addShapedRecipe (468, 1, 0, [" i ", " i ", " i "], [" i ", 3, 0] gebruiken);«, De 468 is de ID van het item dat achteraf moet verschijnen. De 1 is het nummer en de 0 staat opnieuw voor schade. Tussen de eerste vierkante haakjes vindt u de drie rijen van de knutseltafel. Waar een spatie is, blijft het veld leeg. De "i" is een variabele en staat voor een item in Minecraft waarvan de ID is gedefinieerd tussen de tweede vierkante haken. In dit geval is dit een 3. Opnieuw wordt een 0 toegevoegd.
- Een ovenrecept maken is iets eenvoudiger. U kunt bijvoorbeeld de opdracht »Item.addFurnaceRecipe (468, 5, 1);« gebruiken. De 468 is de ID van het item dat in de oven moet worden geplaatst en de 5 is de ID van het item dat uitkomt. De 1 staat voor het nummer.
MCPE: Test je eigen mod
Nu je je eigen mods hebt geprogrammeerd, kun je ze testen. Om dit te doen, slaat u eerst uw mod op als een js-bestand, d.w.z. als een Java-script.
- Nu heb je een app nodig waarmee je de mod kunt testen. MCPE Master of BlockLauncher wordt aanbevolen. Importeer gewoon de Java-scripts als een nieuwe mod.
- Nu kunt u uw mod eenvoudig testen in Minecraft Pocket Edition.
- Tip: u vindt alle stappen terug in onze fotogalerij.
De 5 beste Minecraft-mods voor de pc-versie
In de volgende praktische tip geven we je een inleiding tot de Minecraft-mod "Mystcraft".
$config[ads_text5] not found