Start your Journey
Introduction
On the home page of the documentation for the Inner Core engine, which extends the base functionality of Minecraft on Android devices. The task of this site is to teach the capabilities of creating changes to the gameplay — modifications, bringing your own idea to the game, and just learning something new.
Methodology
Any project one way or another has some summary of basic terms, in which any of us should easily navigate, not forgetting basic concepts. It is important to remember that Minecraft is a game that encourages creativity and freedom of action, so there are no strict rules or limitations in methodology. However, one can describe the general steps and approaches that can be used when playing or creating mods for it.
Installing the Engine
Before creating or simply installing modifications, we need to prepare tools for modifying the game. Why can't I modify the game directly? By default, Minecraft is closed-source and does not allow for gameplay modification, except perhaps for behavior packs.
Supported IDEs
An environment simplifies project development by providing auto-completion, error checking, compilation of low-level languages, and a whole bunch of features. Writing code in an environment is much more convenient than using a notepad, although, however, the choice is entirely yours.
Going Forward
Once the necessary tools or environments have been installed, you can proceed directly to learning languages and creating a project. Regardless of the chosen programming language and project idea, it is important to maintain interest and motivation, as programming can be a complex and lengthy process.
Mod Structure
Before using one of the template creation options, it will probably be an equally important part to familiarize yourself with their contents. First of all, a mod is a folder with a configuration file build.config, which describes the entire process of loading, compiling and building your mod. Let's look at the contents of the entire folder, and first analyze other, but no less important aspects.
Mod Lifecycle
Usually begins before launching the game, at this moment the mod announces its existence to the launcher and performs a list of necessary procedures for the user. Now we will look at the complete cycle from this moment to closing the game, what happens in the mod during various events and how it can affect the gameplay.
Building Scripts
Besides the ability to directly set an executable script, there is often a need to divide the source code into files. As soon as the project starts to contain the first classes, utility functions, and other things that should be separated, working in a single file becomes simply impossible. This is where build files and advanced toolchain settings come to our aid.
Evaluate Context
Defines the space in which all your code is located. It stores the values of variables and constants, functions and transformed classes, and also performs future code interactions with the space.
Integrating Libraries
Implemented from any mod script. Libraries expand the capabilities of the game, or simplify the creation of existing ones. In addition, you can even allocate part of your code to use it as a library; these are regular scripts, the context of which will now be considered.
Where, what and who
This principle is how most of the events we are going to learn about work. Let's start with what is generally understood as an event? In addition to the obvious in-game events, events can depend on other mods, be called randomly or with a certain periodicity, and even come from the server side. We will consider each of these types, but not immediately, and not even in this chapter, but only when they are really needed.
Callbacks
From the phrase call + back, it is with their help that we will register event handlers. As the name implies, we will receive a call, and then we can cancel further action. However, not all actions can be canceled, and those that can be can be canceled either by another mod or by the engine. But let's focus on handling callbacks.
Updatables
These are objects built around an update function. Updates are called every tick (1/20 of a second), which can interact with the world in any way and perform long-term operations. An integral part of the engine, on which most of the life cycle is based.
Threading
Multithreading is of paramount importance for any modern system, environment, application, and simply for a script. But not in the case of Minecraft. This game uses one thread for practically everything: rendering interfaces, world generation, rendering entities, and more. So far this works identically on all editions of the game, creating performance issues and raising system requirements. But is everything really so bad and when can you use multiple threads, and also, why do we even need this. Let's figure it out.
using-synced-data
First Item
We call items things that are in the inventory or a container. This broad category includes crafting materials, food, tools, armor, and the like. There are even useless items, like poisonous potatoes. The player can interact with them, equip them, throw them, or eat them; these are the main game objects for the world and the beginning of learning.
Food, Armor and Snowballs
Let's superficially look at the basics of each type of items. The syntax of their implementation in most cases coincides with the standard item creation, however additional arguments appear for each of them. Examine their description again if necessary. The only difference in registering third-party item types from regular ones is the last argument with parameters. And of course, other types have properties and events unique to them.
Recipes
Items in the game, in addition to being simply found in various structures, are crafted on a crafting table, smelted in a furnace, or obtained as a result of mechanisms and rituals. Everything except the last must be registered as a recipe, which will be considered now.
Extra
2 items
tools
First Block
The whole world of Minecraft consists of blocks. The player and entities move on them, mining them allows the player to extract resources and create new blocks to craft even more blocks, and some can be opened or interacted with in some way. Let's start by looking at textures, and then, we'll create blocks with different variations.
First Liquid
Liquids are blocks that spread over a plane, which usually make it difficult for entities to move on them and form currents. In-game liquids include water and lava.
Models
4 items
block-entities
Modifying the Region
The game world consists of chunks — components of a region, they contain blocks and entities that form the environment. The number of regions is unlimited, they are tied to the dimension. Specifically for linking regions to each other, a block source was created, for the developer it is only important to determine which dimension they will interact with, and a special handler will take care of the processing. Let's consider the capabilities of the environment, modifying and getting properties, spawning entities and placing blocks.
game-objects
animation
Particles and Emitters
Particles are two-dimensional, usually uniformly accelerated, bodies in game space. They are emitted during interactions with blocks, from blocks themselves during their operation, destruction of tools and much, much, much more. Emitters determine "sources"; those places relative to which particles will, for example, move. Emitters allow you to redefine linear accelerations of emitted particles, significantly expanding the scope of their application.
Processing Entities
An entity is a soft physical body that "lives" and moves around the world. In addition to the physical part, entities (or mobs) have a visual part, it does not determine the physical shape, but only allows you to display the entity in the game. Often you can interact with an entity, for example, to obtain resources or exchange some for others. Let's get acquainted with the possibilities of processing them.
First Entity
The concept of creating entities is somewhat different from everything else, a script will not work for this, it is much more convenient to use behavior and resource packs. This article describes many new concepts not described previously, however we will get acquainted with most of them. Let's start with the foundation of a new mob, and later move on to describing its behavior and creating the visual part.
Renders
3 items
path-navigation
Investigating contents
The interface in Inner Core is built on the basis of the Android graphical shell, all elements of which are drawn on a single canvas for each window. Displaying occurs on top of the gameplay, which does not allow modifying the in-game interface, but extends the capabilities of working with content.
Background layout
Forms the window space, visually indicating its boundaries and adding background objects as needed. These components are always under the main elements, and like any other components, are drawn on the canvas as the content of your window.
Elements
Perform most of the functions required of the interface. The element processes user actions and changes based on them, switching its state or reporting an interaction to the window. Like any other component, the element is drawn on the canvas, but can also dynamically change its content.
window-types
Advanced
2 items
Saving Data
Usually certain data is attributed to the world, while others must be unique for each player. This determines which saves and by whom they should be processed. The methods of saving are different, the types of data too, so let's look at the main ones.
principles-and-objectives
containers
tile-entities
processing-resources
Getting Started
Multiplayer is one of the most important parts of any non-client mod that the creator needs to support so that players can play the mod together. And at the same time, one of the most difficult for beginners.
Client Packets
Client packets are one of the things that almost no magic mod can do without.
Server Packets
Oh, you're back here. Thank you for reading us!
network-entity-type
Ore with Manual Generation
Usually, ore generation comes down to a couple of methods, but it is limited by the shape and method of generation. We will use the built-in generator, consider options for creating our own generators and generate several shapes.