1
0
Fork 0

Minor changes (#3909)

This commit is contained in:
mathiascode 2017-08-24 12:19:40 +03:00 committed by Lukas Pioch
parent 92ac45d27e
commit 02775e52c4
48 changed files with 299 additions and 242 deletions

View File

@ -19,7 +19,7 @@ if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
# Without this, the MSVC variable isn't defined for MSVC builds ( http://www.cmake.org/pipermail/cmake/2011-November/047130.html )
# Without this, the MSVC variable isn't defined for MSVC builds ( https://cmake.org/pipermail/cmake/2011-November/047130.html )
enable_language(CXX C)
# Enable the support for solution folders in MSVC
@ -94,7 +94,7 @@ else()
endif()
# We need C++11 features, Visual Studio has those from VS2012, but it needs a new platform toolset for those; VS2013 supports them natively:
# Adapted from http://binglongx.wordpress.com/2013/06/28/set-non-default-platform-toolset-in-cmake/
# Adapted from https://web.archive.org/web/https://binglongx.wordpress.com/2013/06/28/set-non-default-platform-toolset-in-cmake/
if(MSVC OR MSVC_IDE)
if( MSVC_VERSION LESS 1700 ) # VC10- / VS2010-
message(FATAL_ERROR "The project requires C++11 features. "

View File

@ -1,12 +1,12 @@
COMPILING
=========
Compiling Cuberite
==================
To compile Cuberite from source, you need the following set of software:
* CMake
* Platform-specific make tool \(Windows would be MSVC, Linux/macOS GNU make, etc.\)
* C compiler
* modern C++ compiler and linker
- CMake
- Platform-specific make tool (Windows would be MSVC, Linux/macOS GNU make, etc.)
- C compiler
- Modern C++ compiler and linker
To contribute code, you also need a Git client.
@ -15,17 +15,17 @@ Windows
We use Microsoft Visual Studio for Windows compilation. It is possible to use other toolchains, but we don't test against them and they aren't supported. Visual Studio 2013 Express for Desktop is being actively used for development.
You can find download links for VS2013 Express here: https://go.microsoft.com/?linkid=9832280
You can find download links for VS2013 Express [here][1].
Next, you need to download and install CMake. Download from here: https://cmake.org/download/ . You should download a full installation package, so that the installer will set everything up for you (especially the paths).
Next, you need to download and install [CMake][2]. You should download a full installation package, so that the installer will set everything up for you (especially the paths).
To contribute your changes to the source back to the repository, you need a Git client. Options are:
* Git for Windows: https://git-for-windows.github.io/
* GitHub Desktop: https://desktop.github.com/
* TortoiseGit: https://tortoisegit.org/
- [Git for Windows][3]
- [GitHub Desktop][4]
- [TortoiseGit][5]
Alternatively, if you want only to compile the source, without contributing, you can [download the sources in a ZIP file directly from GitHub](https://github.com/cuberite/cuberite/archive/master.zip).
Alternatively, if you want only to compile the source, without contributing, you can [download the sources in a ZIP file directly from GitHub][6].
If you're using Git to get the source, use the following command to set up the local workspace correctly:
@ -39,30 +39,30 @@ Finally, open the newly created file, `Cuberite.sln`, in your Visual Studio.
If you want to run Cuberite from within VS, you need to first make sure that it will be run with the correct home folder. Normally this happens automatically, but for some Visual Studio versions the process doesn't stick. Right-click on the Cuberite project in the Solution Explorer tool window, and select Properties. In the dialog, navigate to Configuration properties -> Debugging in the tree on the left, then make sure the value `Working Directory` is set to `../Server`. If you don't do this, the server won't be able to find crafting recipes, item names or plugins.
### Release configuration ###
### Release Configuration
To make Visual Studio produce the version with the best performance, you will need to select a Release configuration. Go to menu Build -> Configuration Manager, and in the opened dialog, change the top left combo box (Active solution configuration) to Release. Close the dialog and build the solution. The resulting executable is called `Cuberite.exe` in the `Server` folder.
### Debug configuration ###
### Debug Configuration
In order to tinker with the code, you'll more than likely need to use the debugging features of your IDE. To make them the easiest to use, you should switch to the Debug configuration - this provides the highest level of information while debugging, for the price of the executable being 2 - 10 times slower. Go to menu Build -> Configuration Manager, and in the opened dialog, change the top left combo box (Active solution configuration) to Debug. Close the dialog and build the solution. The resulting executable is called `Cuberite_debug.exe` in the `Server` folder.
macOS
---
-----
Install git from its [website](https://git-scm.com/) or homebrew: `brew install git`.
- Install git from its [website][7] or homebrew: `brew install git`.
Install Xcode (commandline tools are recommended) from the App Store or [the website](https://developer.apple.com/downloads).
- Install Xcode (commandline tools are recommended) from the App Store or [the website][8].
Install CMake from its [website](https://cmake.org/) or homebrew: `brew install cmake`.
- Install CMake from its [website][9] or homebrew: `brew install cmake`.
### Getting the sources ###
### Getting the Source
```
git clone --recursive https://github.com/cuberite/cuberite.git
```
### Building ###
### Building
Follow the instructions at [CMake on Unix-based platforms](#cmake-on-unix-based-platforms), using Xcode as cmake's generator. If no generator is specified, CMake will use the Makefile generator, in which case you must build with the `make` command.
@ -79,13 +79,13 @@ sudo apt-get install git make cmake clang
```
Ensure that you have modern C++ compiler and linker (Clang 3.4+, GCC 4.8+, or VS 2013+).
### Getting the source ###
### Getting the Source
```
git clone --recursive https://github.com/cuberite/cuberite.git
```
### Building ###
### Building
Run the following commands to build Cuberite:
@ -103,18 +103,18 @@ Android
It is required that users obtain the latest copies of:
* The Android Native Development Kit (NDK): https://developer.android.com/ndk/downloads
* Lua: https://www.lua.org/download.html (download a binary)
- [The Android Native Development Kit (NDK)][10]
- [Lua (download a binary)][11]
Windows users may optionally install the Ninja build system (https://github.com/ninja-build/ninja/releases) for improved build speeds.
Windows users may optionally install the [Ninja build system][12] for improved build speeds.
### Getting the sources ###
### Getting the Source
```
git clone --recursive https://github.com/cuberite/cuberite.git
```
### Configuration ###
### Configuration
From the `android` subdirectory:
@ -123,7 +123,7 @@ cmake . -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=16 -DCMAKE_BUILD_TYPE
```
where `CMAKE_ANDROID_NDK` should be the absolute path to where the Android NDK is installed.
#### Generators to use ####
#### Generators to Use
On Linux, the default Make is suggested. No additional parameters are required for this option.
@ -136,19 +136,19 @@ where `CMAKE_MAKE_PROGRAM` should be the absolute path to the `make` program, fo
The next easiest generator is Ninja, which additionally offers multithreaded builds, to be specified:
* `-G "Ninja"`
#### Additional ABI options ####
#### Additional ABI Options
For additional ABI options, visit: https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_ARCH_ABI.html
Please note that certain ABIs require specific [API levels](#api-level-requirements).
#### API level requirements ####
#### API Level Requirements
The minimum API level is 16 in the verbatim copy of this folder, due to the inclusion of position independent compilation. Additonally, API level 21 or higher is needed for 64 bit ABIs as earlier versions have no support for this architecture.
To lower these requirements to run on very old devices, it is necessary to select a compatible ABI, and disable position independent code generation.
### Building ###
### Building
From the `android` subdirectory:
@ -160,7 +160,7 @@ If the build succeeded, an Android-launchable binary will have been generated un
To use it in the official Android app, compress the aforementioned `Server` directory into a Zip file, and transfer it to the phone on which the app is installed.
#### Using the compile script on Linux ####
#### Using the Compile Script on Linux
Linux users are entitled to use the compile script, which provides some easy to use options and also contains instructions for using the binaries in the official Android app.
@ -172,7 +172,7 @@ NDK="path/to/ndk/root" CMAKE="path/to/cmake/executable" android/compile.sh <abi|
The NDK variable must be set to the path to the NDK root, CMAKE to a call of the cmake binary used for compiling. If the cmake binary is in the PATH, a simple `CMAKE=cmake` is enough. As last parameter you either have to enter a correct ABI (see https://cmake.org/cmake/help/latest/variable/CMAKE_ANDROID_ARCH_ABI.html) or either all or clean. Clean will cause the script to remove the android-build directory, all will compile and zip all Cuberite for all 7 ABIs and create a zip archive of the android/Server direcory for use in the official Android app. If you are unsure which ABI is required for your phone, open the official Android app and navigate to "Settings" and "Install". It will show you the required ABI. Additional parameters may be given through enviroment variables, namely TYPE="" as Release or Debug (defaults to Release) and THREADS="4" as the number of threads used for compilation (defaults to 4).
### Running the executables on a device ###
### Running the Executables on a Device
Note the locations to which the Zip files were transferred. Open the official Android app, and select "Settings", then "Install", and finally select the Zip files.
@ -181,7 +181,7 @@ Cuberite for Android is now ready to use.
CMake on Unix-based platforms
-----------------------------
### Release Mode ###
### Release Mode
Release mode is preferred for almost all cases, it has much better speed and less console spam. However, if you are developing Cuberite actively, debug mode might be better.
@ -197,7 +197,7 @@ NOTE: CMake can generate project files for many different programs, such as Xcod
The executable will be built in the `cuberite/Server` folder and will be named `Cuberite`.
### Debug Mode ###
### Debug Mode
Debug mode is useful if you want more debugging information about Cuberite while it's running or if you want to use a debugger like GDB to debug issues and crashes.
@ -213,7 +213,7 @@ NOTE: CMake can generate project files for many different programs, such as Xcod
The executable will be built in the `cuberite/Server` folder and will be named `Cuberite_debug`.
### 32 Bit Mode switch ###
### 32 Bit Mode Switch
This is useful if you want to compile Cuberite on an x64 (64-bit Intel) machine but want to use on an x86 (32-bit Intel) machine. This switch can be used with debug or release mode. Simply add:
@ -221,7 +221,7 @@ This is useful if you want to compile Cuberite on an x64 (64-bit Intel) machine
to your cmake command and 32 bit will be forced.
### Compiling for another computer of the same architecture ###
### Compiling for Another Computer of the Same Architecture
When cross-compiling for another computer of the same architecture it is important to set the NO_NATIVE_OPTIMIZATION flag. This tells the compiler not to optimise for your machine. This switch can be used with debug or release mode. To enable, simply add:
@ -229,7 +229,7 @@ When cross-compiling for another computer of the same architecture it is importa
to your cmake command.
### List of all build flags ###
### List of All Build Flags
Cuberite's build process supports a large number of flags for customising the builds. Use these flags by adding `-DFlag_name=Value` to the cmake configuration command. For example to enable test generation using the `SELF_TEST` flag add: `-DSELF_TEST=ON`
@ -247,3 +247,16 @@ Forces the build to use 32 bit builds on *nix systems. Define as ON to enable. D
###### NO_NATIVE_OPTIMIZATION
Disables optimizations for the build host. This is important when building on a different machine from the one you will run Cuberite on as the build machine may support instructions the final machine does not. This flag only has any effect on linux. Define as ON to enable. Define as OFF to disable.
[1]: https://www.visualstudio.com/downloads/
[2]: https://cmake.org/download/
[3]: https://git-for-windows.github.io/
[4]: https://desktop.github.com/
[5]: https://tortoisegit.org/
[6]: https://github.com/cuberite/cuberite/archive/master.zip
[7]: https://git-scm.com/
[8]: https://developer.apple.com/downloads
[9]: https://cmake.org/
[10]: https://developer.android.com/ndk/downloads/index.html
[11]: https://www.lua.org/download.html
[12]: https://github.com/ninja-build/ninja/releases

View File

@ -1,10 +1,11 @@
How to contribute to Cuberite
-----------------------------
How to Contribute to Cuberite
=============================
Thank you for your interest in Cuberite. Contributing to Cuberite is easy, just fork the project on GitHub, make your changes and submit a pull request to get your code merged. That's all there is to it.
Check out [GETTING-STARTED.md](https://github.com/cuberite/cuberite/blob/master/GETTING-STARTED.md) for more information about setting up the development environment for Cuberite, finding issues to work on, etc...
Check out [GETTING-STARTED.md][1] for more information about setting up the development environment for Cuberite, finding issues to work on, etc...
If you are new to open source and/or GitHub, or just aren't sure about some details in the contribution process, here's a tutorial to get you started:
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
[How to Contribute to an Open Source Project on GitHub][2]
Code Conventions
----------------
@ -13,63 +14,65 @@ When contributing, you must follow our code conventions. Otherwise, CI builds wi
Here are the conventions:
* We use the subset of C++11 supported by MSVC 2013 (ask if you think that something outside of this subset would be useful)
* All new public functions in all classes need documenting comments on what they do and what behavior they follow, use doxy-comments formatted as `/** Description */`. Do not use asterisks on additional lines in multi-line comments.
* Use spaces after the comment markers: `// Comment` instead of `//Comment`. A comment must be prefixed with two spaces if it's on the same line with code:
- `SomeFunction()<Space><Space>//<Space>Note the two spaces prefixed to me and the space after the slashes.`
* All variable names and function names use CamelCase style, with the exception of single letter variables.
- `ThisIsAProperFunction()` `This_is_bad()` `this_is_bad()` `GoodVariableName` `badVariableName`.
* All member variables start with `m_`, all function parameters start with `a_`, all class names start with `c`.
- `class cMonster { int m_Health; int DecreaseHealth(int a_Amount); }`
* Function parameters that are coordinates should be passed using an appropriate storage container, and not as three separate arguments.
- e.g. for a block position, Vector3i. For an entity position, Vector3d. For a chunk coordinate, cChunkCoords.
- For a 3-dimensional box of blocks, use cCuboid. For an axis-aligned bounding box, use cBoundingBox.
* Parameters smaller than 4 elements (e.g. Vector3, cChunkCoords) should be passed by value. All other parameters should be passed by const reference, where applicable.
- `Foo(Vector3d a_Param1, const cCuboid & a_Param2)`
- See the discussion in issue #3853
* Put spaces after commas. `Vector3d(1, 2, 3)` instead of `Vector3d(1,2,3)`
* Put spaces before and after every operator.
- `a = b + c;`
- `if (a == b)`
* Keep individual functions spaced out by 5 empty lines, this enhances readability and makes navigation in the source file easier.
* Add those extra parentheses to conditions, especially in C++:
- `if ((a == 1) && ((b == 2) || (c == 3)))` instead of ambiguous `if (a == 1 && b == 2 || c == 3)`
- This helps prevent mistakes such as `if (a & 1 == 0)`
* Use the provided wrappers for OS stuff:
- Threading is done by inheriting from `cIsThread`, thread synchronization through `cCriticalSection` and `cEvent`, file access and filesystem operations through the `cFile` class, high-precision timers through `cTimer`, high-precision sleep through `cSleep`
* No magic numbers, use named constants:
- `E_ITEM_XXX`, `E_BLOCK_XXX` and `E_META_XXX` for items and blocks
- `cEntity::etXXX` for entity types, `cMonster::mtXXX` for mob types
- `dimNether`, `dimOverworld` and `dimEnd` for world dimension
- `gmSurvival`, `gmCreative`, `gmAdventure` for game modes
- `wSunny`, `wRain`, `wThunderstorm` for weather
- `cChunkDef::Width`, `cChunkDef::Height` for chunk dimensions (C++)
- etc.
* Instead of checking for a specific value, use an `IsXXX` function, if available:
- `cPlayer:IsGameModeCreative()` instead of` (cPlayer:GetGameMode() == gmCreative)` (the player can also inherit the gamemode from the world, which the value-d condition doesn't catch)
* Please use **tabs for indentation and spaces for alignment**. This means that if it's at line start, it's a tab; if it's in the middle of a line, it's a space
* Alpha-sort stuff that makes sense alpha-sorting - long lists of similar items etc.
* White space is free, so use it freely
- "freely" as in "plentifully", not "arbitrarily"
* All `case` statements inside a `switch` need an extra indent
* Each and every control statement deserves its braces. This helps maintainability later on when the file is edited, lines added or removed - the control logic doesn't break so easily
- The only exception: a `switch` statement with all `case` statements being a single short statement is allowed to use the short brace-less form
- These two rules really mean that indent is governed by braces
* Add an empty last line in all source files (GCC and Git can complain otherwise)
- We use the subset of C++11 supported by MSVC 2013 (ask if you think that something outside of this subset would be useful)
- All new public functions in all classes need documenting comments on what they do and what behavior they follow, use doxy-comments formatted as `/** Description */`. Do not use asterisks on additional lines in multi-line comments.
- Use spaces after the comment markers: `// Comment` instead of `//Comment`. A comment must be prefixed with two spaces if it's on the same line with code:
- `SomeFunction()<Space><Space>//<Space>Note the two spaces prefixed to me and the space after the slashes.`
- All variable names and function names use CamelCase style, with the exception of single letter variables.
- `ThisIsAProperFunction()` `This_is_bad()` `this_is_bad()` `GoodVariableName` `badVariableName`.
- All member variables start with `m_`, all function parameters start with `a_`, all class names start with `c`.
- `class cMonster { int m_Health; int DecreaseHealth(int a_Amount); }`
- Function parameters that are coordinates should be passed using an appropriate storage container, and not as three separate arguments.
- e.g. for a block position, Vector3i. For an entity position, Vector3d. For a chunk coordinate, cChunkCoords.
- For a 3-dimensional box of blocks, use cCuboid. For an axis-aligned bounding box, use cBoundingBox.
- Parameters smaller than 4 elements (e.g. Vector3, cChunkCoords) should be passed by value. All other parameters should be passed by const reference, where applicable.
- `Foo(Vector3d a_Param1, const cCuboid & a_Param2)`
- See the discussion in issue #3853
- Put spaces after commas. `Vector3d(1, 2, 3)` instead of `Vector3d(1,2,3)`
- Put spaces before and after every operator.
- `a = b + c;`
- `if (a == b)`
- Keep individual functions spaced out by 5 empty lines, this enhances readability and makes navigation in the source file easier.
- Add those extra parentheses to conditions, especially in C++:
- `if ((a == 1) && ((b == 2) || (c == 3)))` instead of ambiguous `if (a == 1 && b == 2 || c == 3)`
- This helps prevent mistakes such as `if (a & 1 == 0)`
- Use the provided wrappers for OS stuff:
- Threading is done by inheriting from `cIsThread`, thread synchronization through `cCriticalSection` and `cEvent`, file access and filesystem operations through the `cFile` class, high-precision timers through `cTimer`, high-precision sleep through `cSleep`
- No magic numbers, use named constants:
- `E_ITEM_XXX`, `E_BLOCK_XXX` and `E_META_XXX` for items and blocks
- `cEntity::etXXX` for entity types, `cMonster::mtXXX` for mob types
- `dimNether`, `dimOverworld` and `dimEnd` for world dimension
- `gmSurvival`, `gmCreative`, `gmAdventure` for game modes
- `wSunny`, `wRain`, `wThunderstorm` for weather
- `cChunkDef::Width`, `cChunkDef::Height` for chunk dimensions (C++)
- etc.
- Instead of checking for a specific value, use an `IsXXX` function, if available:
- `cPlayer:IsGameModeCreative()` instead of` (cPlayer:GetGameMode() == gmCreative)` (the player can also inherit the gamemode from the world, which the value-d condition doesn't catch)
- Please use **tabs for indentation and spaces for alignment**. This means that if it's at line start, it's a tab; if it's in the middle of a line, it's a space
- Alpha-sort stuff that makes sense alpha-sorting - long lists of similar items etc.
- White space is free, so use it freely
- "freely" as in "plentifully", not "arbitrarily"
- All `case` statements inside a `switch` need an extra indent
- Each and every control statement deserves its braces. This helps maintainability later on when the file is edited, lines added or removed - the control logic doesn't break so easily
- The only exception: a `switch` statement with all `case` statements being a single short statement is allowed to use the short brace-less form
- These two rules really mean that indent is governed by braces
- Add an empty last line in all source files (GCC and Git can complain otherwise)
Pre-commit hook
---------
Pre-commit Hook
---------------
When contributing, the code conventions above *must* be followed. Otherwise, the CI builds will automatically fail and your PR will not be merged until the non-conforming code is fixed. It is highly recommended to set up a pre-commit hook which will check your code style before every commit. Here is how to do that:
* Clone the repository as usual.
* Go to your `<clone location>/.git/hooks` folder, create a text file named "pre-commit" there with the following contents:
- Clone the repository as usual.
- Go to your `<clone location>/.git/hooks` folder, create a text file named "pre-commit" there with the following contents:
```
#!/bin/sh
src/CheckBasicStyle.lua 1>&2 -g
```
* If on Linux/Unix, you need to give the newly created file an execute permission: `chmod +x .git/hooks/pre-commit`
* Lua must be installed.
* You're done. Now, `src/CheckBasicStyle.lua` will check the changed files before every commit. If a problem is found, it will point you to that problem and will cancel the commit.
- If on Linux/Unix, you need to give the newly created file an execute permission: `chmod +x .git/hooks/pre-commit`
- Lua must be installed.
- You're done. Now, `src/CheckBasicStyle.lua` will check the changed files before every commit. If a problem is found, it will point you to that problem and will cancel the commit.
Note that the check script is not smart enough to catch everything, so not having any warnings does not necessarily imply that you followed the conventions fully. The other humans working on this will perform more checks before merging.
@ -78,4 +81,7 @@ Copyright
Your must either place your work in the public domain or licensed it under the Apache License 2.0, and if so you must add yourself to the contributors file to show that you accept the publication of your work under the license.
**PLUGINS ONLY**: If your plugin is not licensed under the Apache license, then it must be compatible and marked as such. This is only valid for the plugins included within the Cuberite source; plugins developed on separate repositories can use whatever license they want.
**PLUGINS ONLY**: If your plugin is not licensed under the Apache License 2.0, then it must be compatible and marked as such. This is only valid for the plugins included within the Cuberite source; plugins developed on separate repositories can use whatever license they want.
[1]: https://github.com/cuberite/cuberite/blob/master/GETTING-STARTED.md
[2]: https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github

View File

@ -1099,25 +1099,25 @@ QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#namespace
# https://doc.qt.io/qt-5/qthelpproject.html#namespace
QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#virtual-folders
# https://doc.qt.io/qt-5/qthelpproject.html#virtual-folders
QHP_VIRTUAL_FOLDER = doc
# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
# add. For more information please see
# http://doc.trolltech.com/qthelpproject.html#custom-filters
# https://doc.qt.io/qt-5/qthelpproject.html#custom-filters
QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
# <a href="https://doc.qt.io/qt-5/qthelpproject.html#custom-filters">
# Qt Help Project / Custom Filters</a>.
QHP_CUST_FILTER_ATTRS =
@ -1125,7 +1125,7 @@ QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's
# filter section matches.
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
# <a href="https://doc.qt.io/qt-5/qthelpproject.html#filter-attributes">
# Qt Help Project / Filter Attributes</a>.
QHP_SECT_FILTER_ATTRS =

View File

@ -1,30 +1,33 @@
Getting Started
===============
Hello! Thanks for wanting to work on this project :smile:, and I hope that this file will help you somewhat in getting all set up and running. I'll go through the basics of getting the project environment set up, the code organization and style, and general development practices. I'll also show you some good issues to start off working on to get yourself familiarised with the code.
Note that this document is about contributing code for Cuberite.
- If you are looking for usage instructions, see the [user manual](https://book.cuberite.org/) instead.
- If you would like to help but you are not a programmer, you can still help with testing! Please see the `TESTING.md` file.
- If you are looking for usage instructions, see the [User's Manual][1] instead.
- If you would like to help but you are not a programmer, you can still help with testing! Please see the [TESTING.md][2] file.
Minecraft Basics
----------------
If you don't play Minecraft or don't have a great knowledge of the basic systems, you should get to know them. The [Minecraft Wiki](http://minecraft.gamepedia.com/Minecraft_Wiki) is quite useful for this task, although some youtubers are also fairly good at teaching the basics and just playing is quite good too. It is possible to contribute without knowing minecraft in detail though, or even owning a license.
If you don't play Minecraft or don't have a great knowledge of the basic systems, you should get to know them. The [Minecraft Wiki][3] is quite useful for this task, although some youtubers are also fairly good at teaching the basics and just playing is quite good too. It is possible to contribute without knowing minecraft in detail though, or even owning a license.
I'd say that the important topics are:
* Different types of blocks and how they act.
* Mobs, what they do and how.
* Redstone, pistons, and automation.
* Farming.
* Fighting, health and the hunger system.
- Different types of blocks and how they act.
- Mobs, what they do and how.
- Redstone, pistons, and automation.
- Farming.
- Fighting, health and the hunger system.
Useful Resources
----------------
* [Minecraft Wiki](http://minecraft.gamepedia.com/Minecraft_Wiki)
* [Minecraft Protocol Wiki](http://wiki.vg/Main_Page)
* [Lua API Documentation](https://api.cuberite.org/)
* [VS2013 Community Edition Download](https://www.visualstudio.com/products/visual-studio-community-vs)
- [Minecraft Wiki](https://minecraft.gamepedia.com/Minecraft_Wiki)
- [Minecraft Protocol Wiki](http://wiki.vg/Main_Page)
- [Lua API Documentation](https://api.cuberite.org/)
- [VS2013 Community Edition Download](https://www.visualstudio.com/downloads/)
Setting up a Dev Environment
============================
@ -32,19 +35,19 @@ Setting up a Dev Environment
Requirements
------------
**Linux/BSD/Solaris/macOS:**
### Linux/BSD/Solaris/macOS
You'll need the basic C++ build tools:
* gcc (or clang or another C compiler)
* g++ (or clang++ or another C++ compiler)
* make
- gcc (or clang or another C compiler)
- g++ (or clang++ or another C++ compiler)
- make
You'll also need CMake to generate the makefile to build from.
**Windows:**
### Windows
If you use Windows, your best bet is the MSVC2013 (available as a free download in the Community edition from MS), solution files for which can be generated with cmake. You'll also need cmake to generate the project files.
If you use Windows, your best bet is the MSVC2013 (available as a free download in the Community edition from Microsoft), solution files for which can be generated with cmake. You'll also need cmake to generate the project files.
Setting up the Repo
-------------------
@ -59,57 +62,69 @@ Once you've cloned, you need to pull down the submodules:
After that they should come down automatically when you pull but it's not bad to refresh every once in a while.
Repo Arrangement
---------------------------
----------------
The Cuberite repo has recently been rearranged for better code separation and other things, but basically it's split into a few areas:
* `src`
- `src`
This holds all of the Cuberite source code, and is where most development takes place.
It's split into logical areas for blocks, the protocol handling and other things.
* `lib`
- `lib`
This holds all the 3rd party libraries for Cuberite. You basically don't need to touch these, and we're thinking of switching them into submodules soon.
* `Server`
This contains the default plugins and environment to actually run the server. You'll find the executable (named `Cuberite`) here and in the `plugins` directory the default plugins. The config files are also stored here. Config files with `.example.ini` on the end are generated by the server or source control and should be left alone, instead you should copy them to a file without the `example` in the name which will be prioritised over the generated ones.
- `Server`
This contains the default plugins and environment to actually run the server. You'll find the executable (named `Cuberite`) here and in the `Plugins` directory the default plugins. The config files are also stored here. Config files with `.example.ini` on the end are generated by the server or source control and should be left alone, instead you should copy them to a file without the `example` in the name which will be prioritised over the generated ones.
Code Style
----------
You should follow the code style guidelines in [CONTRIBUTING.md](https://github.com/cuberite/cuberite/blob/master/CONTRIBUTING.md), as well as other C++ best practices.
You should follow the code style guidelines in [CONTRIBUTING.md][4], as well as other C++ best practices.
Note that there is a script file, $/src/CheckBasicStyle.lua, that can check some common violations of the coding style. You should run this file to check your code regularly. This script is run during the integration builds and if it fails, the build will fail. Note that you need Lua installed in order to run this script. It is recommended to set this up as a pre-commit hook and doing so is covered in CONTRIBUTING.md.
How to Build
------------------
------------
**Linux/BSD/Solaris/macOS:**
### Linux/BSD/Solaris/macOS
Follow the instructions in [COMPILING.md](https://github.com/cuberite/cuberite/blob/master/COMPILING.md). You probably want to build in debug mode (when you're developing) for console alerts and debugging capability, even though it's much slower for everyday use.
Follow the instructions in [COMPILING.md][5]. You probably want to build in debug mode (when you're developing) for console alerts and debugging capability, even though it's much slower for everyday use.
Basically, the process is:
cmake . -DCMAKE_BUILD_TYPE=DEBUG && make
**Windows:**
### Windows
You need to first generate a solution file by executing `cmake .` on the commandline at the top-level folder of the repository, then just open the solution file in MSVC and build. Note that the first time after generating the solution, you will need to do extra setup in order to be able to fully debug in MSVC:
- Set the startup project to Cuberite: right-click the Cuberite project in the Solution Explorer and choose "Set as Startup Project".
- Set the debugging folder: right-click the Cuberite project in the Solution Explorer, choose "Properties". In the dialog, browse to "Configuration Properties" -> "Debugging" and set "Working Directory" to "../Server".
- Set the startup project to Cuberite: right-click the Cuberite project in the Solution Explorer and choose "Set as Startup Project".
- Set the debugging folder: right-click the Cuberite project in the Solution Explorer, choose "Properties". In the dialog, browse to "Configuration Properties" -> "Debugging" and set "Working Directory" to "../Server".
How to Run
----------
The server can be run (on *nix) by a simple `./Cuberite` in the `Cuberite` directory. On first run it will generate the world and start a server on the default port (configurable in `settings.ini`) so you can connect in minecraft via `localhost`. Note that if you build a debug version, the executable will be names `Cuberite_debug` instead
The server can be run (on *nix) by a simple `./Cuberite` in the `Server` directory. On first run it will generate the world and start a server on the default port (configurable in `settings.ini`) so you can connect in Minecraft via `localhost`. Note that if you build a debug version, the executable will be names `Cuberite_debug` instead
Where to Get Started
-------------------------------
--------------------
Issues that should be easy to get started with are tagged as [easy](https://github.com/cuberite/cuberite/issues?q=is%3Aopen+is%3Aissue+label%3Aeffort%2Feasy) in GitHub issues. Other good places to get started are:
Issues that should be easy to get started with are tagged as [easy][6] in GitHub issues.
* Cleaning up some of the compiler warnings. (Check [Travis CI](https://travis-ci.org/cuberite/cuberite) for a list of them.) With clang, there are over 10000 lines of warnings to clean up.
* Writing some plugins: They are written in lua, with excellent API documentation available via [APIDump](http://api-docs.cuberite.org/). The [Core](https://github.com/cuberite/Core) plugin should also help quite a bit here.
Other good places to get started are:
- Cleaning up some of the compiler warnings. Check [Travis CI][7] for a list of them.
- Writing some plugins: They are written in lua, with excellent API documentation available via [APIDump][8]. The [Core plugin][9] should also help quite a bit here.
Special Things
---------------------
* Make yourself familiar with the community. Visit the forums: https://forum.cuberite.org/
* Ask questions as much as you like, we're here to help :smiley:
--------------
- Make yourself familiar with the community. Visit the forums: https://forum.cuberite.org/
- Ask questions as much as you like, we're here to help :smiley:
[1]: https://book.cuberite.org/
[2]: https://github.com/cuberite/cuberite/blob/master/TESTING.md
[3]: https://minecraft.gamepedia.com/Minecraft_Wiki
[4]: https://github.com/cuberite/cuberite/blob/master/CONTRIBUTING.md
[5]: https://github.com/cuberite/cuberite/blob/master/COMPILING.md
[6]: https://github.com/cuberite/cuberite/issues?q=is%3Aopen+is%3Aissue+label%3Aeffort%2Feasy
[7]: https://travis-ci.org/cuberite/cuberite
[8]: https://api.cuberite.org/
[9]: https://github.com/cuberite/Core

View File

@ -8,58 +8,76 @@ Cuberite can run on Windows, *nix and Android operating systems. This includes A
We currently support Release 1.8 - 1.12.1 Minecraft protocol versions.
Subscribe to [the newsletter](https://cuberite.org/news/#subscribe) for important updates and project news.
Subscribe to [the newsletter][1] for important updates and project news.
Installation
------------
There are several ways to obtain Cuberite.
#### Binaries
### Binaries
- The easiest method is downloading for Windows or Linux from the [Project site](https://cuberite.org/).
- You can use the EasyInstall script for Linux and macOS, which automatically downloads the correct binary. The script is described below.
- You can also obtain a binary from the [buildserver archive](https://builds.cuberite.org/).
- The easiest method is downloading for Windows or Linux from the [website][2].
- You can use the EasyInstall script for Linux and macOS, which automatically downloads the correct binary. The script is described below.
- You can also obtain a binary from the [buildserver archive][3].
##### The EasyInstall script
#### The EasyInstall script
This script will download the correct binary from the project site.
curl -sSfL https://download.cuberite.org | sh
#### Compiling
### Compiling
- You can compile automatically for Linux / *nix with the `compile.sh` script. The script is described below.
- You can also compile manually. See [COMPILING.md](https://github.com/cuberite/cuberite/blob/master/COMPILING.md).
- You can compile automatically for Linux / *nix with the `compile.sh` script. The script is described below.
- You can also compile manually. See [COMPILING.md][4].
Compiling may provide better performance (1.5-3x as fast) and it supports more operating systems.
##### The compile.sh script
#### The compile.sh script
This script downloads the source code and compiles it. The script is smart enough to notify you of missing dependencies and instructing you on how to install them. The script doesn't work for Windows.
sh -c "$(wget -O - https://compile.cuberite.org)"
#### Hosted services
### Hosted services
- Hosted Cuberite is available via [Gamocosm](https://gamocosm.com/).
- Hosted Cuberite is available via [Gamocosm][5].
Contributing
------------
Cuberite is licensed under the Apache License V2, and we welcome anybody to fork and submit a Pull Request back with their changes, and if you want to join as a permanent member we can add you to the team.
Cuberite is developed in C++ and Lua. To contribute code, please check out [GETTING-STARTED.md](https://github.com/cuberite/cuberite/blob/master/GETTING-STARTED.md) and [CONTRIBUTING.md](https://github.com/cuberite/cuberite/blob/master/CONTRIBUTING.md) for more details.
Cuberite is developed in C++ and Lua. To contribute code, please check out [GETTING-STARTED.md][6] and [CONTRIBUTING.md][7] for more details.
Plugins are written in Lua. You can contribute by developing plugins and submitting them to [the forum](https://forum.cuberite.org/forum-2.html). Please check out our [plugin introduction guide](http://api-docs.cuberite.org/Writing-a-Cuberite-plugin.html) for more info.
Plugins are written in Lua. You can contribute by developing plugins and submitting them to the [plugin repository][8] or the [forum][9]. Please check out our [plugin introduction guide][10] for more info.
If you are not a programmer, you can help by testing Cuberite and reporting bugs. See [TESTING.md](https://github.com/cuberite/cuberite/blob/master/TESTING.md) for details.
If you are not a programmer, you can help by testing Cuberite and reporting bugs. See [TESTING.md][11] for details.
You can also help with documentation by contributing to the [User's Manual](https://github.com/cuberite/users-manual).
You can also help with documentation by contributing to the [User's Manual][12].
Other Stuff
-----------
For other stuff, check out the [homepage](https://cuberite.org/), the [Users' Manual](https://book.cuberite.org/),
the [forums](https://forum.cuberite.org/), and the [Plugin API](https://api.cuberite.org/).
For other stuff, check out the [homepage][13], the [Users' Manual][14], the [forums][15], and the [Plugin API][16].
[Support Us on Bountysource](https://bountysource.com/teams/cuberite)
[Support Us on Bountysource][17]
[1]: https://cuberite.org/news/#subscribe
[2]: https://cuberite.org/
[3]: https://builds.cuberite.org/
[4]: https://github.com/cuberite/cuberite/blob/master/COMPILING.md
[5]: https://gamocosm.com/
[6]: https://github.com/cuberite/cuberite/blob/master/GETTING-STARTED.md
[7]: https://github.com/cuberite/cuberite/blob/master/CONTRIBUTING.md
[8]: https://plugins.cuberite.org/
[9]: https://forum.cuberite.org/forum-2.html
[10]: https://api.cuberite.org/Writing-a-Cuberite-plugin.html
[11]: https://github.com/cuberite/cuberite/blob/master/TESTING.md
[12]: https://github.com/cuberite/users-manual
[13]: https://cuberite.org/
[14]: https://book.cuberite.org/
[15]: https://forum.cuberite.org/
[16]: https://api.cuberite.org/
[17]: https://bountysource.com/teams/cuberite

View File

@ -2183,7 +2183,7 @@ function OnPlayerJoined(a_Player)
-- Send an example composite chat message to the player:
a_Player:SendMessage(cCompositeChat()
:AddTextPart("Hello, ")
:AddUrlPart(a_Player:GetName(), "http://cuberite.org", "u@2") -- Colored underlined link
:AddUrlPart(a_Player:GetName(), "https://cuberite.org", "u@2") -- Colored underlined link
:AddSuggestCommandPart(", and welcome.", "/help", "u") -- Underlined suggest-command
:AddRunCommandPart(" SetDay", "/time set 0") -- Regular text that will execute command when clicked
:SetMessageType(mtJoin) -- It is a join-message
@ -10559,7 +10559,7 @@ a_Player:OpenWindow(Window);
Type = "string",
},
},
Notes = "Sends the specified message to the player (shows above action bar, doesn't show for < 1.8 clients).",
Notes = "Sends the specified message to the player (shows above action bar).",
},
SendBlocksAround =
{
@ -10706,7 +10706,7 @@ a_Player:OpenWindow(Window);
Type = "string",
},
},
Notes = "Sends the specified message to the player (doesn't show for < 1.8 clients).",
Notes = "Sends the specified message to the player.",
},
SetBedPos =
{
@ -16912,7 +16912,7 @@ end
{
Desc = [[
This class provides an interface to the XML parser,
{{http://matthewwild.co.uk/projects/luaexpat/|LuaExpat}}. It provides a SAX interface with an
{{https://matthewwild.co.uk/projects/luaexpat/|LuaExpat}}. It provides a SAX interface with an
incremental XML parser.</p>
<p>
With an event-based API like SAX the XML document can be fed to the parser in chunks, and the
@ -16921,7 +16921,7 @@ end
parsing of huge documents can benefit from this piecemeal operation.</p>
<p>
See the online
{{http://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}} for details
{{https://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}} for details
on how to work with this parser. The code examples below should provide some basic help, too.
]],
Functions =
@ -16973,7 +16973,7 @@ end
The callbacks table passed to the new() function specifies the Lua functions that the parser
calls upon various events. The following table lists the most common functions used, for a
complete list see the online
{{http://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}}.</p>
{{https://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}}.</p>
<table>
<tr><th>Function name</th><th>Parameters</th><th>Notes</th></tr>
<tr><td>CharacterData</td><td>Parser, string</td><td>Called when the parser recognizes a raw string inside the element</td></tr>
@ -16987,7 +16987,7 @@ end
Contents = [[
The XMLParser object returned by lxp.new provides the functions needed to parse the XML. The
following list provides the most commonly used ones, for a complete list see the online
{{http://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}}.
{{https://matthewwild.co.uk/projects/luaexpat/manual.html#parser|LuaExpat documentation}}.
<ul>
<li>close() - closes the parser, freeing all memory used by it.</li>
<li>getCallbacks() - returns the callbacks table for this parser.</li>
@ -17191,7 +17191,7 @@ end
Desc = [[
This class represents the tolua bridge between the Lua API and Cuberite. It supports some low
level operations and queries on the objects. See also the tolua++'s documentation at
{{http://www.codenix.com/~tolua/tolua++.html#utilities}}. Normally you shouldn't use any of these
{{https://www8.cs.umu.se/kurser/TDBD12/VT04/lab/lua/tolua++.html#utilities}}. Normally you shouldn't use any of these
functions except for type()
]],
Functions =

View File

@ -2327,7 +2327,7 @@ end
Type = "Vector3i",
},
},
Notes = "Returns a new Vector3i that is a {{http://en.wikipedia.org/wiki/Cross_product|cross product}} of this vector and the specified vector.",
Notes = "Returns a new Vector3i that is a {{https://en.wikipedia.org/wiki/Cross_product|cross product}} of this vector and the specified vector.",
},
Dot =
{

View File

@ -2,13 +2,13 @@ return
{
HOOK_PLAYER_ANIMATION =
{
CalledWhen = "A client has sent an Animation packet (0x12)",
CalledWhen = "A client has sent an Animation packet",
DefaultFnName = "OnPlayerAnimation", -- also used as pagename
Desc = [[
This hook is called when the server receives an Animation packet (0x12) from the client.</p>
This hook is called when the server receives an Animation packet from the client.</p>
<p>
For the list of animations that are sent by the client, see the
<a href="http://wiki.vg/Protocol#0x12">Protocol wiki</a>.
<a href="http://wiki.vg/Protocol#Animation_.28clientbound.29">Protocol wiki</a>.
]],
Params =
{

View File

@ -19,7 +19,7 @@ return
<p>
The client sends the left-click packet for several other occasions, such as dropping the held item
(Q keypress) or shooting an arrow. This is reflected in the Status code. Consult the
<a href="http://wiki.vg/Protocol#0x0E">protocol documentation</a> for details on the actions.
<a href="http://wiki.vg/Protocol#Player_Digging">protocol documentation</a> for details on the actions.
]],
Params =
{

View File

@ -22,7 +22,7 @@
<p>Here's a screenshot of a default Decoda window with the debugger stepping through the code (scaled down):<br />
<img src="Static/decoda_workspace.png" /></p>
<p>As you can see, you can set breakpoints in the code, inspect variables' values, view both the Lua and native (C++) call-stacks. Decoda also breaks program execution when a faulty Lua script is executed, providing a detailed error message and pointing you directly to the faulting code. It is even possible to attach a C++ debugger to a process that is being debugged by Decoda, this way you can trap both C++ and Lua errors.</p>
<p>Decoda is open-source, the sources are on GitHub: <a href="https://github.com/unknownworlds/decoda">https://github.com/unknownworlds/decoda</a>. You can download a compiled binary from the creators' site, <a href="http://unknownworlds.com/decoda/">http://unknownworlds.com/decoda/</a>.
<p>Decoda is open-source, the sources are on GitHub: <a href="https://github.com/unknownworlds/decoda">https://github.com/unknownworlds/decoda</a>. You can download a compiled binary from the creators' site, <a href="https://unknownworlds.com/decoda/">https://unknownworlds.com/decoda/</a>.
<h2><img src="Static/decoda_logo.png" /> Project management</h2>
<p>To begin using Decoda, you need to create a project, or load an existing one. Decoda projects have a .deproj extension, and are simply a list of Lua files that are to be opened. You can create a project through menu Project -> New Project. Save your project first, so that Decoda knows what relative paths to use for the files. Then either add existing Lua files or create new one, through menu Project -> Add Add New File / Add Existing File.</p>

View File

@ -22,14 +22,14 @@
<p>Here's a screenshot of a default ZBS window with the debugger stepping through the code (scaled down):<br />
<img src="Static/zbs_workspace.png" /></p>
<p>As you can see, you can set breakpoints in the code, inspect variables' values, view the Lua call-stacks.</p>
<p>ZBS is open-source, the sources are on GitHub: <a href="https://github.com/pkulchenko/ZeroBraneStudio">https://github.com/pkulchenko/ZeroBraneStudio</a>. The project's homepage is at <a href="http://studio.zerobrane.com/">http://studio.zerobrane.com/</a>.
<p>ZBS is open-source, the sources are on GitHub: <a href="https://github.com/pkulchenko/ZeroBraneStudio">https://github.com/pkulchenko/ZeroBraneStudio</a>. The project's homepage is at <a href="https://studio.zerobrane.com/">https://studio.zerobrane.com/</a>.
<h2><img src="Static/zbs_logo.png" /> First-time setup</h2>
<p>Since ZBS is a universal Lua IDE, you need to first set it up so that it is ready for Cuberite plugin development. For that, you need to download one file, <a href="https://raw.githubusercontent.com/pkulchenko/ZeroBranePackage/master/cuberite.lua">cuberite.lua</a> from the <a href="https://github.com/pkulchenko/ZeroBranePackage">ZBS's plugin repository</a>. Place that file in the "packages" folder inside your ZBS's folder. Note that there are other useful plugins in the repository and you may want to have a look there later on to further customize your ZBS. To install them, simply save them into the same folder.</p>
<p>Next you should install the code-completion support specific for Cuberite. You should repeat this step from time to time, because the API evolves in time so new functions and classes are added to it quite often. You should have an APIDump plugin in your Cuberite installation. Enable the APIDump plugin in the server settings, it's very cheap to keep it enabled and it doesn't cost any performance during normal gameplay. To generate the code-completion support file, enter the <code style="background: #ddd; border: 1px solid #aaa">api</code> command into the server console. This will create a new file, "cuberite_api.lua", next to the Cuberite executable. Move that file into the "api/lua" subfolder inside your ZBS's folder. (Note that if you had the "mcserver_api.lua" file from previous versions, you should remove it)</p>
<p>After you download the cuberite.lua file and install the completion support, you need to restart ZBS in order for the plugin to load. If there are no errors, you should see two new items in the Project -> Lua Interpreter submenu: "Cuberite - debug mode" and "Cuberite - release mode". The only difference between the two is which filename they use to launch Cuberite - cuberite_debug(.exe) for the debug option and "cuberite(.exe)" for the release option. If you built your own Cuberite executable and you built it in debug mode, you should select the debug mode option. In all other cases, including if you downloaded the already-compiled Cuberite executable from the internet, you should select the release mode option.</p>
<p>For a first time user, it might be a bit overwhelming that there are no GUI settings in the ZBS, yet the IDE is very configurable. There are two files that you edit in order to change settings, either system-wide (all users of the computer share those settings) or user-wide (the settings are only for a specific user of the computer). Those files are regular Lua sources and you can quickly locate them and edit them from within the IDE itself, select Edit -> Preferences -> Settings: XYZ from the menu, with XYZ being either System or User.</p>
<p>There is a documentation on most of the settings on ZBS's webpage, have a look at <a href="http://studio.zerobrane.com/documentation.html">http://studio.zerobrane.com/documentation.html</a>, especially the Preferences section. Personally I recommend setting editor.usetabs to true and possibly adjusting the editor.tabwidth, turn off the editor.smartindent feature and for debugging the option debugger.alloweditting should be set to true unless you feel like punishing yourself.</p>
<p>There is a documentation on most of the settings on ZBS's webpage, have a look at <a href="https://studio.zerobrane.com/documentation.html">https://studio.zerobrane.com/documentation.html</a>, especially the Preferences section. Personally I recommend setting editor.usetabs to true and possibly adjusting the editor.tabwidth, turn off the editor.smartindent feature and for debugging the option debugger.alloweditting should be set to true unless you feel like punishing yourself.</p>
<h2><img src="Static/zbs_logo.png" /> Project management</h2>
<p>ZBS works with projects, it considers all files and subfolder in a specific folder to be a project. There's no need for a special project file nor for adding individual files to the workspace, all files are added automatically. To open a Cuberite plugin as the project, click the triple-dot button in the Project pane, or select Project -> Project directory -> Choose... from the menu. Browse and select the Cuberite plugin's folder. ZBS will load all the files in the plugin's folder and you can start editting code.</p>

View File

@ -1630,7 +1630,7 @@ function HandleCompo(a_Split, a_Player)
-- Send one composite message to self:
local msg = cCompositeChat()
msg:AddTextPart("Hello! ", "b@e") -- bold yellow
msg:AddUrlPart("Cuberite", "http://cuberite.org")
msg:AddUrlPart("Cuberite", "https://cuberite.org")
msg:AddTextPart(" rules! ")
msg:AddRunCommandPart("Set morning", "/time set 0")
a_Player:SendMessage(msg)
@ -1728,7 +1728,7 @@ function OnPlayerJoined(a_Player)
-- Test composite chat chaining:
a_Player:SendMessage(cCompositeChat()
:AddTextPart("Hello, ")
:AddUrlPart(a_Player:GetName(), "http://cuberite.org", "u@2")
:AddUrlPart(a_Player:GetName(), "https://cuberite.org", "u@2")
:AddSuggestCommandPart(", and welcome.", "/help", "u")
:AddRunCommandPart(" SetDay", "/time set 0")
)
@ -2454,12 +2454,12 @@ function HandleConsoleTestUrlParser(a_Split, a_EntireCmd)
"https://github.com",
"ftp://anonymous:user@example.com@ftp.cuberite.org:9921/releases/2015/2015-12-25.zip",
"ftp://anonymous:user:name:with:colons@example.com@ftp.cuberite.org:9921",
"http://google.com/",
"http://google.com/?q=cuberite",
"http://google.com/search?q=cuberite",
"http://google.com/some/search?q=cuberite#results",
"http://google.com/?q=cuberite#results",
"http://google.com/#results",
"https://google.com/",
"https://google.com/?q=cuberite",
"https://google.com/search?q=cuberite",
"https://google.com/some/search?q=cuberite#results",
"https://google.com/?q=cuberite#results",
"https://google.com/#results",
"ftp://cuberite.org:9921/releases/2015/2015-12-25.zip",
"mailto:support@cuberite.org",
}

View File

@ -727,7 +727,7 @@ local function LoadLFS()
If you don't have luarocks installed, you need to install them using your OS's package manager, usually:
sudo apt-get install luarocks (Ubuntu / Debian)
On windows, a binary distribution can be downloaded from the LuaRocks homepage, http://luarocks.org/en/Download
On windows, a binary distribution can be downloaded from the LuaRocks homepage, https://github.com/luarocks/luarocks/wiki/Download
]])
print("Original error text: ", err)

View File

@ -4,7 +4,7 @@
# The time for a brewing recipe is always 20 seconds (400 ticks).
#
# Minecraft-Wiki Brewing:
# http://minecraft.gamepedia.com/Brewing
# https://minecraft.gamepedia.com/Brewing
#
# A brewing recipe has this format:
# Data Value + Ingredient = Potion

View File

@ -207,7 +207,7 @@ function ShowPage(WebAdmin, TemplateRequest)
</div>
<div class="lower">
<div class="wrapper">
<span id="copyright">Copyright © <a href="http://cuberite.org/" target="_blank">Cuberite Team</a>.</span>
<span id="copyright">Copyright © <a href="https://cuberite.org/" target="_blank">Cuberite Team</a>.</span>
</div>
</div>
</div>

View File

@ -1,25 +1,30 @@
Contributing by testing Cuberite
===============================
Contributing by Testing Cuberite
================================
You can help us even if you are not a programmer! This document explains how.
If you would like to help with coding instead, see `README.md` and `GETTING-STARTING.md`.
If you would like to help with coding instead, see [GETTING-STARTED.md][1] and [CONTRIBUTING.md][2].
Here are things you can help with without being a programmer:
- Run and test Cuberite. Report issues, bugs, crashes, and stacktraces at the [issue tracker](https://github.com/cuberite/cuberite/issues). This is best done in debug mode.
- Test unmerged versions (known as branches or Pull Requests) which are marked with the [ingame-testing-needed](https://github.com/cuberite/cuberite/pulls?q=is%3Aopen+is%3Apr+label%3Astatus%2Fingame-testing-needed) label.
- Run and test Cuberite. Report issues, bugs, crashes, and stacktraces at the [issue tracker][3]. This is best done in debug mode.
- Test unmerged versions (known as branches or Pull Requests) which are marked with the [ingame-testing-needed][4] label.
Note that code marked with `ingame-testing-needed` is not always available, and sometimes the above list will be empty.
Please use the issue tracker search feature and make sure your issue has not been reported before!
Obtaining Debug builds
Obtaining Debug Builds
----------------------
When testing Cuberite, debug builds are preferred because they output detailed info about the problem that had occured at the server console.
Currently, we do not provide debug builds. You will have to compile Cuberite yourself to obtain them. See the compilation instructions.
You can also test with regular builds.
Testing unmerged pull requests
Testing Unmerged Pull Requests
------------------------------
To test unmerged branches, pick one from the [ingame-testing-needed](https://github.com/cuberite/cuberite/pulls?q=is%3Aopen+is%3Apr+label%3Aingame-testing-needed) list, and follow the download instructions.
To test unmerged branches, pick one from the ingame-testing-needed list, and follow the download instructions.
If you are familiar with git, you can also fetch and compile the unmerged branch instead.
[1]: https://github.com/cuberite/cuberite/blob/master/GETTING-STARTED.md
[2]: https://github.com/cuberite/cuberite/blob/master/CONTRIBUTING.md
[3]: https://github.com/cuberite/cuberite/issues
[4]: https://github.com/cuberite/cuberite/pulls?q=is%3Aopen+is%3Apr+label%3Astatus%2Fingame-testing-needed

View File

@ -2,7 +2,7 @@
::
:: Profiling using a MSVC standalone profiler
::
:: See http://www.codeproject.com/Articles/144643/Profiling-of-C-Applications-in-Visual-Studio-for-F for details
:: See https://www.codeproject.com/Articles/144643/Profiling-of-C-Applications-in-Visual-Studio-for-F for details
::
@ -48,7 +48,7 @@ if errorlevel 1 goto haderror
cd %outputdir%
:: generate the report files (.csv)
%pt%\vsperfreport /summary:all %output% /symbolpath:"srv*C:\Programovani\Symbols*http://msdl.microsoft.com/download/symbols"
%pt%\vsperfreport /summary:all %output% /symbolpath:"srv*C:\Programovani\Symbols*https://msdl.microsoft.com/download/symbols"
if errorlevel 1 goto haderror

View File

@ -1099,25 +1099,25 @@ QCH_FILE =
# The QHP_NAMESPACE tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#namespace
# https://doc.qt.io/qt-5/qthelpproject.html#namespace
QHP_NAMESPACE = org.doxygen.Project
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
# Qt Help Project output. For more information please see
# http://doc.trolltech.com/qthelpproject.html#virtual-folders
# https://doc.qt.io/qt-5/qthelpproject.html#virtual-folders
QHP_VIRTUAL_FOLDER = doc
# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
# add. For more information please see
# http://doc.trolltech.com/qthelpproject.html#custom-filters
# https://doc.qt.io/qt-5/qthelpproject.html#custom-filters
QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see
# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
# <a href="https://doc.qt.io/qt-5/qthelpproject.html#custom-filters">
# Qt Help Project / Custom Filters</a>.
QHP_CUST_FILTER_ATTRS =
@ -1125,7 +1125,7 @@ QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's
# filter section matches.
# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
# <a href="https://doc.qt.io/qt-5/qthelpproject.html#filter-attributes">
# Qt Help Project / Filter Attributes</a>.
QHP_SECT_FILTER_ATTRS =

View File

@ -21,7 +21,7 @@
<p>We're seeing an increased need to store "prefabs" - little areas with predefined block contents, such as village houses or fortress rooms - in collections. We have one collection of village houses for the plains village, one collection for the desert village, one collection for the nether fortress... And there are plans in the future to use even more collections - trees, overworld fortresses, more village types and even custom structures. The point that they have in common is that they need to store not only the prefabs, but also metadata for those prefabs - how often they generate, how they connect together. There's even need for metadata for the entire collection, such as what the accepted biomes are, what block should village roads use, and various other generator parameters. So we need a file format that could store all this information together.</p>
<p>There are some existing formats available to consider first:
<ul>
<li><a href="http://minecraft.gamepedia.com/Schematic_file_format"><b>schematic</b></a> - file format native to MCEdit / Bukkit / WorldEdit communities. Can store the prefab, the block entities and regular entities, and any metadata. Cannot store multiple prefabs. No effort to read or write, there's already code to do that (except for the entities) in the server.</li>
<li><a href="https://minecraft.gamepedia.com/Schematic_file_format"><b>schematic</b></a> - file format native to MCEdit / Bukkit / WorldEdit communities. Can store the prefab, the block entities and regular entities, and any metadata. Cannot store multiple prefabs. No effort to read or write, there's already code to do that (except for the entities) in the server.</li>
<li><a href="https://dev.bukkit.org/projects/terrain-control"><b>bob / bo2 / bo3</b></a> - file format created for prefabs in the Terrain Control mod. Can store the prefab and any metadata. Support for block entities and regular entities is unknown. Cannot store multiple prefabs. Medium difficulty for reading and writing, would need new parser and serializer. Unknown (but assumed true) whether the format truly supports any metadata.</li>
<li><a href="https://github.com/cuberite/cuberite/tree/master/src/Generating/Prefabs"><b>cpp</b></a> - export from our Gallery server directly into C++ source files. Can store the prefab and any metadata, block entities and regular entities currently not implemented but could be added. Very difficult for reading, writing already implemented. Only usable when compiling directly into the server. Can store multiple prefabs and metadata for the entire set.</li>
</ul>

View File

@ -665,7 +665,7 @@ public:
bool GetStackValue(int a_StackPos, T & a_ReturnedVal, typename std::enable_if<std::is_integral<T>::value>::type * unused = nullptr)
{
UNUSED(unused);
if (!lua_isnumber(m_LuaState, a_StackPos)) // Also accepts strings representing a number: http://pgl.yoyo.org/luai/i/lua_isnumber
if (!lua_isnumber(m_LuaState, a_StackPos)) // Also accepts strings representing a number: https://pgl.yoyo.org/luai/i/lua_isnumber
{
return false;
}

View File

@ -270,7 +270,7 @@ enum ENUM_BLOCK_ID : BLOCKTYPE
E_BLOCK_STRUCTURE_BLOCK = 255,
// Keep these two as the last values. Update the last block value to the last block with an id less than 255 when adding another block
// IsValidBlock() depends on this (255 gets checked additionally because there is a gap. See http://minecraft.gamepedia.com/Data_values#Block_IDs
// IsValidBlock() depends on this (255 gets checked additionally because there is a gap. See https://minecraft.gamepedia.com/Data_values#Block_IDs
E_BLOCK_NUMBER_OF_TYPES = E_BLOCK_CONCRETE_POWDER + 1, ///< Number of individual (different) blocktypes
E_BLOCK_MAX_TYPE_ID = E_BLOCK_NUMBER_OF_TYPES - 1, ///< Maximum BlockType number used

View File

@ -120,7 +120,7 @@ bool cBlockBedHandler::OnUse(cChunkInterface & a_ChunkInterface, cWorldInterface
Vector3i Coords(a_BlockX, a_BlockY, a_BlockZ);
a_WorldInterface.DoExplosionAt(5, a_BlockX, a_BlockY, a_BlockZ, true, esBed, &Coords);
}
else if (!((a_WorldInterface.GetTimeOfDay() > 12541) && (a_WorldInterface.GetTimeOfDay() < 23458))) // Source: http://minecraft.gamepedia.com/Bed#Sleeping
else if (!((a_WorldInterface.GetTimeOfDay() > 12541) && (a_WorldInterface.GetTimeOfDay() < 23458))) // Source: https://minecraft.gamepedia.com/Bed#Sleeping
{
a_Player.SendMessageFailure("You can only sleep at night");
}

View File

@ -105,7 +105,7 @@ public:
}
// Search for water in a close proximity:
// Ref.: http://minecraft.gamepedia.com/Farmland#Hydrated_Farmland_Tiles
// Ref.: https://minecraft.gamepedia.com/Farmland#Hydration
// TODO: Rewrite this to use the chunk and its neighbors directly
cBlockArea Area;
int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width;

View File

@ -140,7 +140,7 @@ public:
and wakes up all simulators on the block. */
virtual void Check(cChunkInterface & ChunkInterface, cBlockPluginInterface & a_PluginInterface, int a_RelX, int a_RelY, int a_RelZ, cChunk & a_Chunk);
/** Returns the base colour ID of the block, as will be represented on a map, as per documentation: http://minecraft.gamepedia.com/Map_item_format */
/** Returns the base colour ID of the block, as will be represented on a map, as per documentation: https://minecraft.gamepedia.com/Map_item_format */
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta);
/** Rotates a given block meta counter-clockwise. Default: no change

View File

@ -414,7 +414,7 @@ inline bool IsValidBlock(int a_BlockType)
(a_BlockType > -1) &&
(a_BlockType <= E_BLOCK_MAX_TYPE_ID)
) ||
(a_BlockType == 255) // the blocks 235-254 don't exist yet -> http://minecraft.gamepedia.com/Data_values#Block_IDs
(a_BlockType == 255) // the blocks 253-254 don't exist yet -> https://minecraft.gamepedia.com/Data_values#Block_IDs
)
{
return true;

View File

@ -40,7 +40,7 @@ Serialization will never put zero-level enchantments into the stringspec and wil
class cEnchantments
{
public:
/** Individual enchantment IDs, corresponding to their NBT IDs: http://minecraft.gamepedia.com/Data_values#Enchantment_IDs
/** Individual enchantment IDs, corresponding to their NBT IDs: https://minecraft.gamepedia.com/Data_values#Enchantment_IDs
*/
enum eEnchantment

View File

@ -579,7 +579,7 @@ bool cEntity::DoTakeDamage(TakeDamageInfo & a_TDI)
int cEntity::GetRawDamageAgainst(const cEntity & a_Receiver)
{
// Returns the hitpoints that this pawn can deal to a_Receiver using its equipped items
// Ref: http://minecraft.gamepedia.com/Damage#Dealing_damage as of 2012_12_20
// Ref: https://minecraft.gamepedia.com/Damage#Dealing_damage as of 2012_12_20
switch (this->GetEquippedWeapon().m_ItemType)
{
case E_ITEM_WOODEN_SWORD: return 4;
@ -625,7 +625,7 @@ void cEntity::ApplyArmorDamage(int DamageBlocked)
bool cEntity::ArmorCoversAgainst(eDamageType a_DamageType)
{
// Ref.: http://minecraft.gamepedia.com/Armor#Effects as of 2012_12_20
// Ref.: https://minecraft.gamepedia.com/Armor#Effects as of 2012_12_20
switch (a_DamageType)
{
case dtOnFire:
@ -718,7 +718,7 @@ int cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_Dama
}
// Add up all armor points:
// Ref.: http://minecraft.gamepedia.com/Armor#Defense_points
// Ref.: https://minecraft.gamepedia.com/Armor#Defense_points
int ArmorValue = 0;
int Toughness = 0;
switch (GetEquippedHelmet().m_ItemType)
@ -755,7 +755,7 @@ int cEntity::GetArmorCoverAgainst(const cEntity * a_Attacker, eDamageType a_Dama
}
// TODO: Special armor cases, such as wool, saddles, dog's collar
// Ref.: http://minecraft.gamepedia.com/Armor#Mob_armor as of 2012_12_20
// Ref.: https://minecraft.gamepedia.com/Armor#Mob_armor as of 2012_12_20
double Reduction = std::max(ArmorValue / 5.0, ArmorValue - a_Damage / (2 + Toughness / 4.0));
return static_cast<int>(a_Damage * std::min(20.0, Reduction) / 25.0);
@ -1712,7 +1712,7 @@ void cEntity::DoSetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
void cEntity::HandleAir(void)
{
// Ref.: http://www.minecraftwiki.net/wiki/Chunk_format
// Ref.: https://minecraft.gamepedia.com/Chunk_format
// See if the entity is /submerged/ water (block above is water)
// Get the type of block the entity is standing in:

View File

@ -580,7 +580,7 @@ protected:
/** Stores the air drag that is applied to the entity every tick, measured in speed ratio per tick
Acts as air friction and slows down flight
Will be interpolated if the server tick rate varies
Data: http://minecraft.gamepedia.com/Entity#Motion_of_entities */
Data: https://minecraft.gamepedia.com/Entity#Motion_of_entities */
float m_AirDrag;
Vector3d m_LastPosition;

View File

@ -23,7 +23,7 @@ cEntityEffect::eType cEntityEffect::GetPotionEffectType(short a_ItemDamage)
{
// Lowest four bits
// Potion effect bits are different from entity effect values
// For reference: http://minecraft.gamepedia.com/Data_values#.22Potion_effect.22_bits
// For reference: https://minecraft.gamepedia.com/Data_values#.22Potion_effect.22_bits
switch (a_ItemDamage & 0x0f)
{
case 0x01: return cEntityEffect::effRegeneration;
@ -112,9 +112,9 @@ int cEntityEffect::GetPotionEffectDuration(short a_ItemDamage)
SplashCoeff = IsPotionDrinkable(a_ItemDamage) ? 1 : 0.75;
// Ref.:
// http://minecraft.gamepedia.com/Data_values#.22Tier.22_bit
// http://minecraft.gamepedia.com/Data_values#.22Extended_duration.22_bit
// http://minecraft.gamepedia.com/Data_values#.22Splash_potion.22_bit
// https://minecraft.gamepedia.com/Data_values#.22Tier.22_bit
// https://minecraft.gamepedia.com/Data_values#.22Extended_duration.22_bit
// https://minecraft.gamepedia.com/Data_values#.22Splash_potion.22_bit
return static_cast<int>(base * TierCoeff * ExtCoeff * SplashCoeff);
}
@ -126,7 +126,7 @@ int cEntityEffect::GetPotionEffectDuration(short a_ItemDamage)
bool cEntityEffect::IsPotionDrinkable(short a_ItemDamage)
{
// Drinkable potion if 13th lowest bit is set
// Ref.: http://minecraft.gamepedia.com/Potions#Data_value_table
// Ref.: https://minecraft.gamepedia.com/Potions#Data_value_table
return ((a_ItemDamage & 0x2000) != 0);
}

View File

@ -50,7 +50,7 @@ void cFireChargeEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hi
if (!a_EntityHit.IsFireproof())
{
// TODO Damage Entity with 5 damage(from http://minecraft.gamepedia.com/Blaze#Blaze_fireball)
// TODO Damage Entity with 5 damage(from https://minecraft.gamepedia.com/Blaze#Blaze_fireball)
a_EntityHit.StartBurning(5 * 20); // 5 seconds of burning
}
}

View File

@ -2372,7 +2372,7 @@ void cPlayer::TickBurning(cChunk & a_Chunk)
void cPlayer::HandleFood(void)
{
// Ref.: http://minecraft.gamepedia.com/Hunger
// Ref.: https://minecraft.gamepedia.com/Hunger
if (IsGameModeCreative() || IsGameModeSpectator())
{

View File

@ -97,12 +97,12 @@ public:
float GetXpPercentage(void);
/** Calculates the amount of XP needed for a given level
Ref: http://minecraft.gamepedia.com/XP
Ref: https://minecraft.gamepedia.com/XP
*/
static int XpForLevel(int a_Level);
/** Inverse of XpForLevel
Ref: http://minecraft.gamepedia.com/XP
Ref: https://minecraft.gamepedia.com/XP
values are as per this with pre-calculations
*/
static int CalcLevelFromXp(int a_CurrentXp);

View File

@ -72,7 +72,7 @@ void cFurnaceRecipe::ReloadRecipes(void)
{
// There is a problem here on Android. Text files transferred from another OS may have a newline representation Android's implementation of getline doesn't expect
// Thus, part of a newline may be left in ParsingLine. ::empty() thus thinks the string isn't empty, and the below code outputs interesting errors since it was passed a nearly empty string
// Ref: http://stackoverflow.com/questions/6089231/getting-std-ifstream-to-handle-lf-cr-and-crlf
// Ref: https://stackoverflow.com/questions/6089231/getting-std-ifstream-to-handle-lf-cr-and-crlf
// TODO: There is a solution in the above reference, but it isn't very pretty. Fix it somehow.
continue;
}

View File

@ -471,7 +471,7 @@ bool cItem::CanHaveEnchantment(int a_EnchantmentID)
}
// The organization here is based on the summary at:
// http://minecraft.gamepedia.com/Enchanting
// https://minecraft.gamepedia.com/Enchanting
// as of July 2017 (Minecraft 1.12).
// Hand tool enchantments

View File

@ -21,7 +21,7 @@ public:
virtual bool IsDrinkable(short a_ItemDamage) override
{
// Drinkable potion if 13th lowest bit is set
// Ref.: http://minecraft.gamepedia.com/Potions#Data_value_table
// Ref.: https://minecraft.gamepedia.com/Potions#Data_value_table
return cEntityEffect::IsPotionDrinkable(a_ItemDamage);
}

View File

@ -33,7 +33,7 @@ public:
}
/** Generates a random color for the sheep like the vanilla server.
The percent's where used are from the wiki: http://minecraft.gamepedia.com/Sheep#Breeding */
The percent's where used are from the wiki: https://minecraft.gamepedia.com/Sheep#Breeding */
static NIBBLETYPE GenerateNaturalRandomColor(void);
bool IsSheared(void) const { return m_IsSheared; }

View File

@ -5,7 +5,7 @@
/*
LICENSE (http://www.opensource.org/licenses/bsd-license.php)
LICENSE (https://www.opensource.org/licenses/bsd-license.php)
Copyright (c) 2005-2010, Jochen Kalmbach
All rights reserved.
@ -504,7 +504,7 @@ private:
pGMI = (tGMI)GetProcAddress(hPsapi, "GetModuleInformation");
if ((pEPM == nullptr) || (pGMFNE == nullptr) || (pGMBN == nullptr) || (pGMI == nullptr))
{
// we couldn´t find all functions
// we couldn't find all functions
FreeLibrary(hPsapi);
return FALSE;
}
@ -850,11 +850,11 @@ BOOL WinStackWalker::LoadModules()
strcat_s(szSymPath, nSymPathLen, "SRV*");
strcat_s(szSymPath, nSymPathLen, szTemp);
strcat_s(szSymPath, nSymPathLen, "\\websymbols");
strcat_s(szSymPath, nSymPathLen, "*http://msdl.microsoft.com/download/symbols;");
strcat_s(szSymPath, nSymPathLen, "*https://msdl.microsoft.com/download/symbols;");
}
else
{
strcat_s(szSymPath, nSymPathLen, "SRV*c:\\websymbols*http://msdl.microsoft.com/download/symbols;");
strcat_s(szSymPath, nSymPathLen, "SRV*c:\\websymbols*https://msdl.microsoft.com/download/symbols;");
}
}
} // if SymBuildPath

View File

@ -3,7 +3,7 @@
// Declares the stack walking for Windows binaries
/*
LICENSE (http://www.opensource.org/licenses/bsd-license.php)
LICENSE (https://www.opensource.org/licenses/bsd-license.php)
Copyright (c) 2005-2010, Jochen Kalmbach
All rights reserved.

View File

@ -33,7 +33,7 @@ public:
bool DoesAcceptInput(void) const { return m_DoesAcceptInput; }
/** Converts a raw 160-bit SHA1 digest into a Java Hex representation
According to http://wiki.vg/wiki/index.php?title=Protocol_Encryption&oldid=2802
According to http://wiki.vg/Protocol_Encryption
*/
static void DigestToJava(const Checksum & a_Digest, AString & a_JavaOut);

View File

@ -3,7 +3,7 @@
// Interfaces to the cAuthenticator class representing the thread that authenticates users against the official Mojang servers
// Authentication prevents "hackers" from joining with an arbitrary username (possibly impersonating the server admins)
// For more info, see http://wiki.vg/Session#Server_operation
// For more info, see http://wiki.vg/Session
// In Cuberite, authentication is implemented as a single thread that receives queued auth requests and dispatches them one by one.

View File

@ -617,7 +617,7 @@ void cProtocol_1_10_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity
Writer.AddByte("Rot", MobHeadEntity.GetRotation() & 0xFF);
Writer.AddString("id", "Skull"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though
// The new Block Entity format for a Mob Head. See: http://minecraft.gamepedia.com/Head#Block_entity
// The new Block Entity format for a Mob Head. See: https://minecraft.gamepedia.com/Head#Block_entity
Writer.BeginCompound("Owner");
Writer.AddString("Id", MobHeadEntity.GetOwnerUUID());
Writer.AddString("Name", MobHeadEntity.GetOwnerName());

View File

@ -464,7 +464,7 @@ void cProtocol_1_11_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity
Writer.AddByte("Rot", MobHeadEntity.GetRotation() & 0xFF);
Writer.AddString("id", "Skull"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though
// The new Block Entity format for a Mob Head. See: http://minecraft.gamepedia.com/Head#Block_entity
// The new Block Entity format for a Mob Head. See: https://minecraft.gamepedia.com/Head#Block_entity
Writer.BeginCompound("Owner");
Writer.AddString("Id", MobHeadEntity.GetOwnerUUID());
Writer.AddString("Name", MobHeadEntity.GetOwnerName());

View File

@ -3181,7 +3181,7 @@ void cProtocol_1_8_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity &
Writer.AddByte("Rot", MobHeadEntity.GetRotation() & 0xFF);
Writer.AddString("id", "Skull"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though
// The new Block Entity format for a Mob Head. See: http://minecraft.gamepedia.com/Head#Block_entity
// The new Block Entity format for a Mob Head. See: https://minecraft.gamepedia.com/Head#Block_entity
Writer.BeginCompound("Owner");
Writer.AddString("Id", MobHeadEntity.GetOwnerUUID());
Writer.AddString("Name", MobHeadEntity.GetOwnerName());

View File

@ -3511,7 +3511,7 @@ void cProtocol_1_9_0::WriteBlockEntity(cPacketizer & a_Pkt, const cBlockEntity &
Writer.AddByte("Rot", MobHeadEntity.GetRotation() & 0xFF);
Writer.AddString("id", "Skull"); // "Tile Entity ID" - MC wiki; vanilla server always seems to send this though
// The new Block Entity format for a Mob Head. See: http://minecraft.gamepedia.com/Head#Block_entity
// The new Block Entity format for a Mob Head. See: https://minecraft.gamepedia.com/Head#Block_entity
Writer.BeginCompound("Owner");
Writer.AddString("Id", MobHeadEntity.GetOwnerUUID());
Writer.AddString("Name", MobHeadEntity.GetOwnerName());

View File

@ -11,7 +11,7 @@ cStatInfo cStatInfo::ms_Info[statCount] =
{
// The order must match the order of enum eStatistic
// http://minecraft.gamepedia.com/Achievements
// https://minecraft.gamepedia.com/Achievements
/* Type | Name | Prerequisite */
cStatInfo(achOpenInv, "achievement.openInventory"),
@ -48,7 +48,7 @@ cStatInfo cStatInfo::ms_Info[statCount] =
cStatInfo(achBreedCow, "achievement.breedCow", achKillCow),
cStatInfo(achThrowDiamonds, "achievement.diamondsToYou", achDiamonds),
// http://minecraft.gamepedia.com/Statistics
// https://minecraft.gamepedia.com/Statistics
/* Type | Name */
cStatInfo(statGamesQuit, "stat.leaveGame"),

View File

@ -380,7 +380,7 @@ void cNBTChunkSerializer::AddMobHeadEntity(cMobHeadEntity * a_MobHead)
m_Writer.AddByte ("SkullType", a_MobHead->GetType() & 0xFF);
m_Writer.AddByte ("Rot", a_MobHead->GetRotation() & 0xFF);
// The new Block Entity format for a Mob Head. See: http://minecraft.gamepedia.com/Head#Block_entity
// The new Block Entity format for a Mob Head. See: https://minecraft.gamepedia.com/Head#Block_entity
m_Writer.BeginCompound("Owner");
m_Writer.AddString("Id", a_MobHead->GetOwnerUUID());
m_Writer.AddString("Name", a_MobHead->GetOwnerName());

View File

@ -57,7 +57,7 @@ protected:
////////////////////////////////////////////////////////////////////////////////
// The following template has been modified from code available at
// http://www.codeproject.com/Articles/1847/C-Wrappers-for-the-Expat-XML-Parser
// https://www.codeproject.com/Articles/1847/C-Wrappers-for-the-Expat-XML-Parser
// It uses templates to remove the virtual function call penalty (both size and speed) for each callback
/* Usage: