mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 17:07:55 -04:00
Merge remote-tracking branch 'origin/render' into render
# Conflicts: # pom.xml
This commit is contained in:
commit
93276fa49e
BIN
data/mcdata/20w45a.tar.gz
Normal file
BIN
data/mcdata/20w45a.tar.gz
Normal file
Binary file not shown.
@ -29,3 +29,6 @@ Before downloading a file, the file is checked for relevance. Relevant files are
|
||||
- `minecraft/sounds/` -> Sounds
|
||||
- `minecraft/textures/` -> Textures
|
||||
- `minecraft/font/` -> Fonts
|
||||
|
||||
## Modifications
|
||||
If you want to edit an existing file, you should disable `verify-all-assets` (in `debug`), otherwise your changes will be recognised as corruption and will be overwritten.
|
||||
|
105
doc/Config.md
Normal file
105
doc/Config.md
Normal file
@ -0,0 +1,105 @@
|
||||
# Config file
|
||||
There is a config file located in:
|
||||
* Windows: `%AppData%\Minosoft`
|
||||
* MacOS: `"~/Library/Application Support/Minosoft"`
|
||||
* Linux (and all others): `~\Minosoft`
|
||||
|
||||
## Example
|
||||
```json
|
||||
{
|
||||
"general": {
|
||||
"version": 1,
|
||||
"log-level": "VERBOSE",
|
||||
"language": "en_US"
|
||||
},
|
||||
"game": {
|
||||
"render-distance": 12
|
||||
},
|
||||
"network": {
|
||||
"fake-network-brand": false,
|
||||
"show-lan-servers": true
|
||||
},
|
||||
"accounts": {
|
||||
"selected": "SECRET",
|
||||
"client-token": "SECRET",
|
||||
"entries": {
|
||||
"SECRET": {
|
||||
"accessToken": "SECRET",
|
||||
"userId": "SECRET",
|
||||
"uuid": "9e6ce7c5-40d3-483e-8e5a-b6350987d65f",
|
||||
"playerName": "Bixilon",
|
||||
"userName": "SECRET"
|
||||
}
|
||||
}
|
||||
},
|
||||
"servers": {
|
||||
"entries": {
|
||||
"1": {
|
||||
"id": 1,
|
||||
"name": "A Minosoft server",
|
||||
"address": "localhost",
|
||||
"favicon": "<Base 64 encoded png>",
|
||||
"version": -1
|
||||
}
|
||||
}
|
||||
},
|
||||
"download": {
|
||||
"urls": {
|
||||
"mappings": "https://gitlab.com/Bixilon/minosoft/-/raw/master/data/mcdata/%s.tar.gz?inline\u003dfalse"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"verify-assets": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## General
|
||||
- `version`: The current version of the config. Used for migration between versions. A new version will be tagged, once a new release of minosoft is there, and the format of the config changed.
|
||||
- `log-level`: Self explaining, valid log levels are defined in [LogLevels.java](/src/main/java/de/bixilon/minosoft/logging/LogLevels.java).
|
||||
- `language`: Self explaining. All values are valid, if the specific language cannot be loaded (or specific strings are not available), `en_US` will be used (as fallback).
|
||||
|
||||
## Network
|
||||
- `fake-network-brand`: Minosoft send its brand to the server. If true, minosoft will say, that we use standard `vanilla`.
|
||||
- `show-lan-servers`: If true, minosoft will listen for lan servers (singleplayer and share to LAN) and show them in the server list.
|
||||
|
||||
## Accounts
|
||||
- `selected`: userId of the current selected account, can be empty
|
||||
- `client-token`: A random uuid (generated at first startup), used as unique identifier for all authentication communication with mojang.
|
||||
- `entries`: A account array:
|
||||
|
||||
### Account
|
||||
```json
|
||||
{
|
||||
"<userId>": {
|
||||
"accessToken": "<access Token>",
|
||||
"userId": "<userId>",
|
||||
"uuid": "<UUID of player with dashes>",
|
||||
"playerName": "<Player name>",
|
||||
"userName": "<Mojang email address>"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Servers
|
||||
- `entries`: A server array:
|
||||
|
||||
### Server
|
||||
```json
|
||||
{
|
||||
"<Server id>": {
|
||||
"id": <Server ID>,
|
||||
"name": "<Server name>",
|
||||
"address": "<Server address>",
|
||||
"favicon": "<Base 64 encoded png>",
|
||||
"version": -1
|
||||
}
|
||||
}
|
||||
```
|
||||
## Download
|
||||
- `url`:
|
||||
- `mappings`: URL for the mappings. This is data generated by [mappingsDownloader.py](/util/mappingsDownloader.py).
|
||||
The URL must contain .tar.gz files named after minecraft versions (e.g. `1.14.4.tar.gz`).
|
||||
|
||||
## Debug
|
||||
- `verify-assets`: If true, minosoft will check the sha1 of every asset. Must be false, if you want to modify assets. (Should be true, can be false, if you want to improve the start time)
|
4
pom.xml
4
pom.xml
@ -27,7 +27,9 @@
|
||||
<configuration>
|
||||
<source>15</source>
|
||||
<target>15</target>
|
||||
<compilerArgs>--enable-preview</compilerArgs>
|
||||
<compilerArgs>
|
||||
--enable-preview
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
@ -57,17 +57,17 @@ public class Block {
|
||||
this.mod = mod;
|
||||
this.identifier = identifier;
|
||||
this.properties = new HashSet<>();
|
||||
BlockRotations rot = BlockRotations.NONE;
|
||||
BlockRotations rotation = BlockRotations.NONE;
|
||||
for (Map.Entry<String, JsonElement> property : properties.entrySet()) {
|
||||
String key = property.getKey();
|
||||
String value = property.getValue().getAsString();
|
||||
if (Blocks.getPropertiesMapping().containsKey(key)) {
|
||||
this.properties.add(Blocks.getPropertiesMapping().get(key).get(value));
|
||||
} else if (Blocks.getRotationMapping().containsKey(key)) {
|
||||
rot = Blocks.getRotationMapping().get(value);
|
||||
if (BlockProperties.PROPERTIES_MAPPING.containsKey(key)) {
|
||||
this.properties.add(BlockProperties.PROPERTIES_MAPPING.get(key).get(value));
|
||||
} else if (BlockRotations.ROTATION_MAPPING.containsKey(key)) {
|
||||
rotation = BlockRotations.ROTATION_MAPPING.get(value);
|
||||
}
|
||||
}
|
||||
rotation = rot;
|
||||
this.rotation = rotation;
|
||||
}
|
||||
|
||||
public String getMod() {
|
||||
|
@ -13,378 +13,479 @@
|
||||
|
||||
package de.bixilon.minosoft.data.mappings.blocks;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
public enum BlockProperties {
|
||||
NONE,
|
||||
// rails, doors, daylight sensor, ...
|
||||
REDSTONE_POWERED_YES,
|
||||
REDSTONE_POWERED_NO,
|
||||
REDSTONE_INVERTED_YES,
|
||||
REDSTONE_INVERTED_NO,
|
||||
|
||||
// farmland
|
||||
MOISTURE_0,
|
||||
MOISTURE_1,
|
||||
MOISTURE_2,
|
||||
MOISTURE_3,
|
||||
MOISTURE_4,
|
||||
MOISTURE_5,
|
||||
MOISTURE_6,
|
||||
MOISTURE_7,
|
||||
// furnace, candles, redstone torches, ...
|
||||
GENERAL_LIT_YES,
|
||||
GENERAL_LIT_NO,
|
||||
|
||||
// furnace, ...
|
||||
LIT,
|
||||
UN_LIT,
|
||||
// sign, fence, trapdoors, stairs, ...
|
||||
GENERAL_WATERLOGGED_YES,
|
||||
GENERAL_WATERLOGGED_NO,
|
||||
|
||||
// sign, fence
|
||||
WATERLOGGED,
|
||||
NOT_WATERLOGGED,
|
||||
|
||||
// half (flowers)
|
||||
HALF_UPPER,
|
||||
HALF_LOWER,
|
||||
// stairs
|
||||
STAIR_DIRECTIONAL_STRAIGHT("shape", "straight"),
|
||||
STAIR_DIRECTIONAL_INNER_LEFT("shape", "inner_left"),
|
||||
STAIR_DIRECTIONAL_INNER_RIGHT("shape", "inner_right"),
|
||||
STAIR_DIRECTIONAL_OUTER_LEFT("shape", "outer_left"),
|
||||
STAIR_DIRECTIONAL_OUTER_RIGHT("shape", "outer_right"),
|
||||
STAIR_HALF_TOP,
|
||||
STAIR_HALF_BOTTOM,
|
||||
|
||||
// slabs
|
||||
SLAB_TOP,
|
||||
SLAB_BOTTOM,
|
||||
SLAB_DOUBLE,
|
||||
SLAB_TYPE_TOP,
|
||||
SLAB_TYPE_BOTTOM,
|
||||
SLAB_TYPE_DOUBLE,
|
||||
|
||||
|
||||
// farmland
|
||||
FARMLAND_MOISTURE_LEVEL_0,
|
||||
FARMLAND_MOISTURE_LEVEL_1,
|
||||
FARMLAND_MOISTURE_LEVEL_2,
|
||||
FARMLAND_MOISTURE_LEVEL_3,
|
||||
FARMLAND_MOISTURE_LEVEL_4,
|
||||
FARMLAND_MOISTURE_LEVEL_5,
|
||||
FARMLAND_MOISTURE_LEVEL_6,
|
||||
FARMLAND_MOISTURE_LEVEL_7,
|
||||
|
||||
// plants, stairs
|
||||
PLANT_HALF_UPPER,
|
||||
PLANT_HALF_LOWER,
|
||||
|
||||
// fluids
|
||||
LEVEL_0,
|
||||
LEVEL_1,
|
||||
LEVEL_2,
|
||||
LEVEL_3,
|
||||
LEVEL_4,
|
||||
LEVEL_5,
|
||||
LEVEL_6,
|
||||
LEVEL_7,
|
||||
LEVEL_8,
|
||||
LEVEL_9,
|
||||
LEVEL_10,
|
||||
LEVEL_11,
|
||||
LEVEL_12,
|
||||
LEVEL_13,
|
||||
LEVEL_14,
|
||||
LEVEL_15,
|
||||
FLUID_LEVEL_0("level"),
|
||||
FLUID_LEVEL_1("level"),
|
||||
FLUID_LEVEL_2("level"),
|
||||
FLUID_LEVEL_3("level"),
|
||||
FLUID_LEVEL_4("level"),
|
||||
FLUID_LEVEL_5("level"),
|
||||
FLUID_LEVEL_6("level"),
|
||||
FLUID_LEVEL_7("level"),
|
||||
FLUID_LEVEL_8("level"),
|
||||
FLUID_LEVEL_9("level"),
|
||||
FLUID_LEVEL_10("level"),
|
||||
FLUID_LEVEL_11("level"),
|
||||
FLUID_LEVEL_12("level"),
|
||||
FLUID_LEVEL_13("level"),
|
||||
FLUID_LEVEL_14("level"),
|
||||
FLUID_LEVEL_15("level"),
|
||||
|
||||
// bee hive
|
||||
HONEY_LEVEL_0,
|
||||
HONEY_LEVEL_1,
|
||||
HONEY_LEVEL_2,
|
||||
HONEY_LEVEL_3,
|
||||
HONEY_LEVEL_4,
|
||||
HONEY_LEVEL_5,
|
||||
HONEY_LEVEL_0("honey_level"),
|
||||
HONEY_LEVEL_1("honey_level"),
|
||||
HONEY_LEVEL_2("honey_level"),
|
||||
HONEY_LEVEL_3("honey_level"),
|
||||
HONEY_LEVEL_4("honey_level"),
|
||||
HONEY_LEVEL_5("honey_level"),
|
||||
|
||||
// pistons
|
||||
TYPE_NORMAL,
|
||||
TYPE_STICKY,
|
||||
EXTENDED,
|
||||
NOT_EXTENDED,
|
||||
SHORT,
|
||||
LONG,
|
||||
PISTON_EXTENDED_YES,
|
||||
PISTON_EXTENDED_NO,
|
||||
|
||||
// piston head
|
||||
PISTON_TYPE_NORMAL,
|
||||
PISTON_TYPE_STICKY,
|
||||
PISTON_SHORT_YES,
|
||||
PISTON_SHORT_NO,
|
||||
|
||||
// rails
|
||||
POWERED,
|
||||
NOT_POWERED,
|
||||
STRAIGHT,
|
||||
INNER_LEFT,
|
||||
INNER_RIGHT,
|
||||
OUTER_LEFT,
|
||||
OUTER_RIGHT,
|
||||
NORTH_SOUTH,
|
||||
SOUTH_EAST,
|
||||
SOUTH_WEST,
|
||||
NORTH_WEST,
|
||||
NORTH_EAST,
|
||||
EAST_WEST,
|
||||
ASCENDING_EAST,
|
||||
ASCENDING_WEST,
|
||||
ASCENDING_NORTH,
|
||||
ASCENDING_SOUTH,
|
||||
RAILS_DIRECTION_NORTH_SOUTH("shape", "north_south"),
|
||||
RAILS_DIRECTION_SOUTH_EAST("shape", "south_east"),
|
||||
RAILS_DIRECTION_SOUTH_WEST("shape", "south_west"),
|
||||
RAILS_DIRECTION_NORTH_WEST("shape", "north_west"),
|
||||
RAILS_DIRECTION_NORTH_EAST("shape", "north_east"),
|
||||
RAILS_DIRECTION_EAST_WEST("shape", "east_west"),
|
||||
RAILS_DIRECTION_ASCENDING_EAST("shape", "ascending_east"),
|
||||
RAILS_DIRECTION_ASCENDING_WEST("shape", "ascending_west"),
|
||||
RAILS_DIRECTION_ASCENDING_NORTH("shape", "ascending_north"),
|
||||
RAILS_DIRECTION_ASCENDING_SOUTH("shape", "ascending_south"),
|
||||
|
||||
SNOWY,
|
||||
NOT_SNOWY,
|
||||
// grass, mycelium
|
||||
GRASS_SNOWY_YES,
|
||||
GRASS_SNOWY_NO,
|
||||
|
||||
STAGE_0,
|
||||
STAGE_1,
|
||||
// bamboo, sapling, plants
|
||||
PLANTS_STAGE_LEVEL_0,
|
||||
PLANTS_STAGE_LEVEL_1,
|
||||
|
||||
// dispenser
|
||||
TRIGGERED,
|
||||
NOT_TRIGGERED,
|
||||
DISPENSER_TRIGGERED_YES,
|
||||
DISPENSER_TRIGGERED_NO,
|
||||
|
||||
// leaves
|
||||
DISTANCE_0,
|
||||
DISTANCE_1,
|
||||
DISTANCE_2,
|
||||
DISTANCE_3,
|
||||
DISTANCE_4,
|
||||
DISTANCE_5,
|
||||
DISTANCE_6,
|
||||
DISTANCE_7,
|
||||
PERSISTENT,
|
||||
NOT_PERSISTENT,
|
||||
LEAVES_DISTANCE_LEVEL_0,
|
||||
LEAVES_DISTANCE_LEVEL_1,
|
||||
LEAVES_DISTANCE_LEVEL_2,
|
||||
LEAVES_DISTANCE_LEVEL_3,
|
||||
LEAVES_DISTANCE_LEVEL_4,
|
||||
LEAVES_DISTANCE_LEVEL_5,
|
||||
LEAVES_DISTANCE_LEVEL_6,
|
||||
LEAVES_DISTANCE_LEVEL_7,
|
||||
LEAVES_PERSISTENT_YES,
|
||||
LEAVES_PERSISTENT_NO,
|
||||
|
||||
// bed
|
||||
HEAD,
|
||||
FOOT,
|
||||
OCCUPIED,
|
||||
NOT_OCCUPIED,
|
||||
BED_PART_HEAD,
|
||||
BED_PART_FOOT,
|
||||
BED_OCCUPIED_YES,
|
||||
BED_OCCUPIED_NO,
|
||||
|
||||
// tnt
|
||||
UNSTABLE,
|
||||
STABLE,
|
||||
TNT_UNSTABLE_YES,
|
||||
TNT_UNSTABLE_NO,
|
||||
|
||||
// door
|
||||
HINGE_LEFT,
|
||||
HINGE_RIGHT,
|
||||
OPEN,
|
||||
CLOSED,
|
||||
DOOR_HINGE_LEFT,
|
||||
DOOR_HINGE_RIGHT,
|
||||
DOOR_OPEN_YES,
|
||||
DOOR_OPEN_NO,
|
||||
|
||||
// fire
|
||||
NORTH,
|
||||
NOT_NORTH,
|
||||
SOUTH,
|
||||
NOT_SOUTH,
|
||||
EAST,
|
||||
NOT_EAST,
|
||||
WEST,
|
||||
NOT_WEST,
|
||||
UP,
|
||||
NOT_UP,
|
||||
DOWN,
|
||||
NOT_DOWN,
|
||||
AGE_0,
|
||||
AGE_1,
|
||||
AGE_2,
|
||||
AGE_3,
|
||||
AGE_4,
|
||||
AGE_5,
|
||||
AGE_6,
|
||||
AGE_7,
|
||||
AGE_8,
|
||||
AGE_9,
|
||||
AGE_10,
|
||||
AGE_11,
|
||||
AGE_12,
|
||||
AGE_13,
|
||||
AGE_14,
|
||||
AGE_15,
|
||||
AGE_16,
|
||||
AGE_17,
|
||||
AGE_18,
|
||||
AGE_19,
|
||||
AGE_20,
|
||||
AGE_21,
|
||||
AGE_22,
|
||||
AGE_23,
|
||||
AGE_24,
|
||||
AGE_25,
|
||||
FIRE_POSITION_NORTH_YES,
|
||||
FIRE_POSITION_NORTH_NO,
|
||||
FIRE_POSITION_SOUTH_YES,
|
||||
FIRE_POSITION_SOUTH_NO,
|
||||
FIRE_POSITION_EAST_YES,
|
||||
FIRE_POSITION_EAST_NO,
|
||||
FIRE_POSITION_WEST_YES,
|
||||
FIRE_POSITION_WEST_NO,
|
||||
FIRE_POSITION_UP_YES,
|
||||
FIRE_POSITION_UP_NO,
|
||||
FIRE_POSITION_DOWN_YES,
|
||||
FIRE_POSITION_DOWN_NO,
|
||||
FIRE_AGE_LEVEL_0,
|
||||
FIRE_AGE_LEVEL_1,
|
||||
FIRE_AGE_LEVEL_2,
|
||||
FIRE_AGE_LEVEL_3,
|
||||
FIRE_AGE_LEVEL_4,
|
||||
FIRE_AGE_LEVEL_5,
|
||||
FIRE_AGE_LEVEL_6,
|
||||
FIRE_AGE_LEVEL_7,
|
||||
FIRE_AGE_LEVEL_8,
|
||||
FIRE_AGE_LEVEL_9,
|
||||
FIRE_AGE_LEVEL_10,
|
||||
FIRE_AGE_LEVEL_11,
|
||||
FIRE_AGE_LEVEL_12,
|
||||
FIRE_AGE_LEVEL_13,
|
||||
FIRE_AGE_LEVEL_14,
|
||||
FIRE_AGE_LEVEL_15,
|
||||
FIRE_AGE_LEVEL_16,
|
||||
FIRE_AGE_LEVEL_17,
|
||||
FIRE_AGE_LEVEL_18,
|
||||
FIRE_AGE_LEVEL_19,
|
||||
FIRE_AGE_LEVEL_20,
|
||||
FIRE_AGE_LEVEL_21,
|
||||
FIRE_AGE_LEVEL_22,
|
||||
FIRE_AGE_LEVEL_23,
|
||||
FIRE_AGE_LEVEL_24,
|
||||
FIRE_AGE_LEVEL_25,
|
||||
|
||||
// noteblock
|
||||
HARP,
|
||||
BASEDRUM,
|
||||
SNARE,
|
||||
HAT,
|
||||
BASS,
|
||||
FLUTE,
|
||||
BELL,
|
||||
GUITAR,
|
||||
CHIME,
|
||||
XYLOPHONE,
|
||||
IRON_XYLOPHONE,
|
||||
COW_BELL,
|
||||
DIDGERIDOO,
|
||||
BIT,
|
||||
BANJO,
|
||||
PLING,
|
||||
NOTBLOCK_INSTRUMENT_HARP,
|
||||
NOTBLOCK_INSTRUMENT_BASEDRUM,
|
||||
NOTBLOCK_INSTRUMENT_SNARE,
|
||||
NOTBLOCK_INSTRUMENT_HAT,
|
||||
NOTBLOCK_INSTRUMENT_BASS,
|
||||
NOTBLOCK_INSTRUMENT_FLUTE,
|
||||
NOTBLOCK_INSTRUMENT_BELL,
|
||||
NOTBLOCK_INSTRUMENT_GUITAR,
|
||||
NOTBLOCK_INSTRUMENT_CHIME,
|
||||
NOTBLOCK_INSTRUMENT_XYLOPHONE,
|
||||
NOTBLOCK_INSTRUMENT_IRON_XYLOPHONE("instrument", "iron_xylophone"),
|
||||
NOTBLOCK_INSTRUMENT_COW_BELL("instrument", "cow_bell"),
|
||||
NOTBLOCK_INSTRUMENT_DIDGERIDOO,
|
||||
NOTBLOCK_INSTRUMENT_BIT,
|
||||
NOTBLOCK_INSTRUMENT_BANJO,
|
||||
NOTBLOCK_INSTRUMENT_PLING,
|
||||
|
||||
NOTE_0,
|
||||
NOTE_1,
|
||||
NOTE_2,
|
||||
NOTE_3,
|
||||
NOTE_4,
|
||||
NOTE_5,
|
||||
NOTE_6,
|
||||
NOTE_7,
|
||||
NOTE_8,
|
||||
NOTE_9,
|
||||
NOTE_10,
|
||||
NOTE_11,
|
||||
NOTE_12,
|
||||
NOTE_13,
|
||||
NOTE_14,
|
||||
NOTE_15,
|
||||
NOTE_16,
|
||||
NOTE_17,
|
||||
NOTE_18,
|
||||
NOTE_19,
|
||||
NOTE_20,
|
||||
NOTE_21,
|
||||
NOTE_22,
|
||||
NOTE_23,
|
||||
NOTE_24,
|
||||
NOTEBLOCK_NOTE_LEVEL_0,
|
||||
NOTEBLOCK_NOTE_LEVEL_1,
|
||||
NOTEBLOCK_NOTE_LEVEL_2,
|
||||
NOTEBLOCK_NOTE_LEVEL_3,
|
||||
NOTEBLOCK_NOTE_LEVEL_4,
|
||||
NOTEBLOCK_NOTE_LEVEL_5,
|
||||
NOTEBLOCK_NOTE_LEVEL_6,
|
||||
NOTEBLOCK_NOTE_LEVEL_7,
|
||||
NOTEBLOCK_NOTE_LEVEL_8,
|
||||
NOTEBLOCK_NOTE_LEVEL_9,
|
||||
NOTEBLOCK_NOTE_LEVEL_10,
|
||||
NOTEBLOCK_NOTE_LEVEL_11,
|
||||
NOTEBLOCK_NOTE_LEVEL_12,
|
||||
NOTEBLOCK_NOTE_LEVEL_13,
|
||||
NOTEBLOCK_NOTE_LEVEL_14,
|
||||
NOTEBLOCK_NOTE_LEVEL_15,
|
||||
NOTEBLOCK_NOTE_LEVEL_16,
|
||||
NOTEBLOCK_NOTE_LEVEL_17,
|
||||
NOTEBLOCK_NOTE_LEVEL_18,
|
||||
NOTEBLOCK_NOTE_LEVEL_19,
|
||||
NOTEBLOCK_NOTE_LEVEL_20,
|
||||
NOTEBLOCK_NOTE_LEVEL_21,
|
||||
NOTEBLOCK_NOTE_LEVEL_22,
|
||||
NOTEBLOCK_NOTE_LEVEL_23,
|
||||
NOTEBLOCK_NOTE_LEVEL_24,
|
||||
|
||||
// redstone
|
||||
POWER_0,
|
||||
POWER_1,
|
||||
POWER_2,
|
||||
POWER_3,
|
||||
POWER_4,
|
||||
POWER_5,
|
||||
POWER_6,
|
||||
POWER_7,
|
||||
POWER_8,
|
||||
POWER_9,
|
||||
POWER_10,
|
||||
POWER_11,
|
||||
POWER_12,
|
||||
POWER_13,
|
||||
POWER_14,
|
||||
POWER_15,
|
||||
NORTH_UP,
|
||||
SOUTH_UP,
|
||||
EAST_UP,
|
||||
WEST_UP,
|
||||
NORTH_LOW,
|
||||
SOUTH_LOW,
|
||||
EAST_LOW,
|
||||
WEST_LOW,
|
||||
NORTH_SIDE,
|
||||
SOUTH_SIDE,
|
||||
EAST_SIDE,
|
||||
WEST_SIDE,
|
||||
NORTH_NONE,
|
||||
SOUTH_NONE,
|
||||
EAST_NONE,
|
||||
WEST_NONE,
|
||||
NORTH_TALL,
|
||||
SOUTH_TALL,
|
||||
EAST_TALL,
|
||||
WEST_TALL,
|
||||
REDSTONE_POWER_0,
|
||||
REDSTONE_POWER_1,
|
||||
REDSTONE_POWER_2,
|
||||
REDSTONE_POWER_3,
|
||||
REDSTONE_POWER_4,
|
||||
REDSTONE_POWER_5,
|
||||
REDSTONE_POWER_6,
|
||||
REDSTONE_POWER_7,
|
||||
REDSTONE_POWER_8,
|
||||
REDSTONE_POWER_9,
|
||||
REDSTONE_POWER_10,
|
||||
REDSTONE_POWER_11,
|
||||
REDSTONE_POWER_12,
|
||||
REDSTONE_POWER_13,
|
||||
REDSTONE_POWER_14,
|
||||
REDSTONE_POWER_15,
|
||||
REDSTONE_POSITION_NORTH_NONE("north", "none"),
|
||||
REDSTONE_POSITION_NORTH_LOW("north", "low"),
|
||||
REDSTONE_POSITION_NORTH_UP("north", "up"),
|
||||
REDSTONE_POSITION_NORTH_SIDE("north", "side"),
|
||||
REDSTONE_POSITION_NORTH_TALL("north", "tall"),
|
||||
REDSTONE_POSITION_WEST_NONE("west", "none"),
|
||||
REDSTONE_POSITION_WEST_LOW("west", "low"),
|
||||
REDSTONE_POSITION_WEST_UP("west", "up"),
|
||||
REDSTONE_POSITION_WEST_SIDE("west", "side"),
|
||||
REDSTONE_POSITION_WEST_TALL("west", "tall"),
|
||||
REDSTONE_POSITION_SOUTH_NONE("south", "none"),
|
||||
REDSTONE_POSITION_SOUTH_LOW("south", "low"),
|
||||
REDSTONE_POSITION_SOUTH_UP("south", "up"),
|
||||
REDSTONE_POSITION_SOUTH_SIDE("south", "side"),
|
||||
REDSTONE_POSITION_SOUTH_TALL("south", "tall"),
|
||||
REDSTONE_POSITION_EAST_NONE("east", "none"),
|
||||
REDSTONE_POSITION_EAST_LOW("east", "low"),
|
||||
REDSTONE_POSITION_EAST_UP("east", "up"),
|
||||
REDSTONE_POSITION_EAST_SIDE("east", "side"),
|
||||
REDSTONE_POSITION_EAST_TALL("east", "tall"),
|
||||
|
||||
LAYERS_1,
|
||||
LAYERS_2,
|
||||
LAYERS_3,
|
||||
LAYERS_4,
|
||||
LAYERS_5,
|
||||
LAYERS_6,
|
||||
LAYERS_7,
|
||||
LAYERS_8,
|
||||
// snow
|
||||
SNOW_LAYERS_LEVEL_1,
|
||||
SNOW_LAYERS_LEVEL_2,
|
||||
SNOW_LAYERS_LEVEL_3,
|
||||
SNOW_LAYERS_LEVEL_4,
|
||||
SNOW_LAYERS_LEVEL_5,
|
||||
SNOW_LAYERS_LEVEL_6,
|
||||
SNOW_LAYERS_LEVEL_7,
|
||||
SNOW_LAYERS_LEVEL_8,
|
||||
|
||||
IN_WALL,
|
||||
NOT_IN_WALL,
|
||||
// fence
|
||||
FENCE_IN_WALL_YES("in_wall"),
|
||||
FENCE_IN_WALL_NO("in_wall"),
|
||||
|
||||
// scaffolding
|
||||
BOTTOM,
|
||||
NOT_BOTTOM,
|
||||
SCAFFOLDING_BOTTOM_YES,
|
||||
SCAFFOLDING_BOTTOM_NO,
|
||||
|
||||
// trapwire
|
||||
DISARMED,
|
||||
ARMED,
|
||||
ATTACHED,
|
||||
NOT_ATTACHED,
|
||||
IN_AIR,
|
||||
ON_GROUND,
|
||||
// tripwire
|
||||
TRIPWIRE_DISARMED_YES,
|
||||
TRIPWIRE_DISARMED_NO,
|
||||
TRIPWIRE_IN_AIR_YES("in_air"),
|
||||
TRIPWIRE_IN_AIR_NO("in_air"),
|
||||
|
||||
// daylight, etc
|
||||
INVERTED,
|
||||
NOT_INVERTED,
|
||||
|
||||
// button
|
||||
FLOOR,
|
||||
WALL,
|
||||
CEILING,
|
||||
// tripwire hook
|
||||
TRIPWIRE_ATTACHED_YES,
|
||||
TRIPWIRE_ATTACHED_NO,
|
||||
|
||||
// structure block, comparator
|
||||
SAVE,
|
||||
LOAD,
|
||||
CORNER,
|
||||
DATA,
|
||||
COMPARE,
|
||||
SUBTRACT,
|
||||
STRUCTURE_BLOCK_MODE_SAVE("mode", "save"),
|
||||
STRUCTURE_BLOCK_MODE_LOAD("mode", "load"),
|
||||
STRUCTURE_BLOCK_MODE_CORNER("mode", "corner"),
|
||||
STRUCTURE_BLOCK_MODE_DATA("mode", "data"),
|
||||
STRUCTURE_BLOCK_MODE_COMPARE("mode", "compare"),
|
||||
STRUCTURE_BLOCK_MODE_SUBTRACT("mode", "subtract"),
|
||||
|
||||
// command block
|
||||
CONDITIONAL,
|
||||
UNCONDITIONAL,
|
||||
COMMAND_BLOCK_CONDITIONAL_YES,
|
||||
COMMAND_BLOCK_CONDITIONAL_NO,
|
||||
|
||||
// double column
|
||||
DRAG,
|
||||
NOT_DRAG,
|
||||
BUBBLE_COLUMN_DRAG_YES("drag"), // whirlpool
|
||||
BUBBLE_COLUMN_DRAG_NO("drag"), // upwards
|
||||
|
||||
// bell
|
||||
SINGLE_WALL,
|
||||
DOUBLE_WALL,
|
||||
BELL_ATTACHMENT_FLOOR,
|
||||
BELL_ATTACHMENT_CEILING,
|
||||
BELL_ATTACHMENT_SINGLE_WALL("attachment", "single_wall"),
|
||||
BELL_ATTACHMENT_DOUBLE_WALL("attachment", "double_wall"),
|
||||
|
||||
// lantern
|
||||
HANGING,
|
||||
NOT_HANGING,
|
||||
LANTERN_HANGING_YES,
|
||||
LANTERN_HANGING_NO,
|
||||
|
||||
// sea pickle
|
||||
PICKLES_1,
|
||||
PICKLES_2,
|
||||
PICKLES_3,
|
||||
PICKLES_4,
|
||||
SEA_PICKLE_PICKLES_LEVEL_1,
|
||||
SEA_PICKLE_PICKLES_LEVEL_2,
|
||||
SEA_PICKLE_PICKLES_LEVEL_3,
|
||||
SEA_PICKLE_PICKLES_LEVEL_4,
|
||||
|
||||
// lectern
|
||||
HAS_BOOK,
|
||||
NO_BOOK,
|
||||
LECTERN_BOOK_YES("has_book"),
|
||||
LECTERN_BOOK_NO("has_book"),
|
||||
|
||||
// brewing stand
|
||||
HAS_BOTTLE_0,
|
||||
NO_BOTTLE_0,
|
||||
HAS_BOTTLE_1,
|
||||
NO_BOTTLE_1,
|
||||
HAS_BOTTLE_2,
|
||||
NO_BOTTLE_2,
|
||||
BREWING_STAND_BOTTLE_0_YES("has_bottle_0"),
|
||||
BREWING_STAND_BOTTLE_0_NO("has_bottle_0"),
|
||||
BREWING_STAND_BOTTLE_1_YES("has_bottle_1"),
|
||||
BREWING_STAND_BOTTLE_1_NO("has_bottle_1"),
|
||||
BREWING_STAND_BOTTLE_2_YES("has_bottle_2"),
|
||||
BREWING_STAND_BOTTLE_2_NO("has_bottle_2"),
|
||||
|
||||
// chest
|
||||
TYPE_SINGLE,
|
||||
TYPE_LEFT,
|
||||
TYPE_RIGHT,
|
||||
CHEST_TYPE_SINGLE,
|
||||
CHEST_TYPE_LEFT,
|
||||
CHEST_TYPE_RIGHT,
|
||||
|
||||
// cake
|
||||
BITES_0,
|
||||
BITES_1,
|
||||
BITES_2,
|
||||
BITES_3,
|
||||
BITES_4,
|
||||
BITES_5,
|
||||
BITES_6,
|
||||
CAKES_BITES_LEVEL_0,
|
||||
CAKES_BITES_LEVEL_1,
|
||||
CAKES_BITES_LEVEL_2,
|
||||
CAKES_BITES_LEVEL_3,
|
||||
CAKES_BITES_LEVEL_4,
|
||||
CAKES_BITES_LEVEL_5,
|
||||
CAKES_BITES_LEVEL_6,
|
||||
|
||||
// bamboo
|
||||
SMALL,
|
||||
LARGE,
|
||||
BAMBOO_LEAVES_NONE,
|
||||
BAMBOO_LEAVES_SMALL,
|
||||
BAMBOO_LEAVES_LARGE,
|
||||
|
||||
// repeater
|
||||
LOCKED,
|
||||
UNLOCKED,
|
||||
DELAY_1,
|
||||
DELAY_2,
|
||||
DELAY_3,
|
||||
DELAY_4,
|
||||
REPEATER_LOCKED_YES,
|
||||
REPEATER_LOCKED_NO,
|
||||
REPEATER_DELAY_LEVEL_1,
|
||||
REPEATER_DELAY_LEVEL_2,
|
||||
REPEATER_DELAY_LEVEL_3,
|
||||
REPEATER_DELAY_LEVEL_4,
|
||||
|
||||
// end portal frame
|
||||
EYE,
|
||||
NO_EYE,
|
||||
PORTAL_FRAME_EYE_YES,
|
||||
PORTAL_FRAME_EYE_NO,
|
||||
|
||||
// jukebox
|
||||
HAS_RECORD,
|
||||
HAS_NO_RECORD,
|
||||
JUKEBOX_HAS_RECORD_YES("has_record"),
|
||||
JUKEBOX_HAS_RECORD_NO("has_record"),
|
||||
|
||||
// campfire
|
||||
SIGNAL_FIRE,
|
||||
NOT_SIGNAL_FIRE,
|
||||
CAMPFIRE_SIGNAL_FIRE_YES("signal_fire"),
|
||||
CAMPFIRE_SIGNAL_FIRE_NO("signal_fire"),
|
||||
|
||||
// turtle eggs
|
||||
EGGS_1,
|
||||
EGGS_2,
|
||||
EGGS_3,
|
||||
EGGS_4, // turtle eggs
|
||||
HATCH_0,
|
||||
HATCH_1,
|
||||
HATCH_2,
|
||||
|
||||
ENABLED,
|
||||
DISABLED,
|
||||
TURTLE_EGGS_EGGS_LEVEL_1("eggs"),
|
||||
TURTLE_EGGS_EGGS_LEVEL_2("eggs"),
|
||||
TURTLE_EGGS_EGGS_LEVEL_3("eggs"),
|
||||
TURTLE_EGGS_EGGS_LEVEL_4("eggs"),
|
||||
TURTLE_EGGS_HATCH_LEVEL_0("hatch"),
|
||||
TURTLE_EGGS_HATCH_LEVEL_1("hatch"),
|
||||
TURTLE_EGGS_HATCH_LEVEL_2("hatch"),
|
||||
|
||||
// respawn anchor
|
||||
CHARGES_0,
|
||||
CHARGES_1,
|
||||
CHARGES_2,
|
||||
CHARGES_3,
|
||||
CHARGES_4
|
||||
RESPAWN_ANCHOR_CHARGES_LEVEL_0,
|
||||
RESPAWN_ANCHOR_CHARGES_LEVEL_1,
|
||||
RESPAWN_ANCHOR_CHARGES_LEVEL_2,
|
||||
RESPAWN_ANCHOR_CHARGES_LEVEL_3,
|
||||
RESPAWN_ANCHOR_CHARGES_LEVEL_4,
|
||||
|
||||
// candles
|
||||
CANDLE_CANDLES_LEVEL_1,
|
||||
CANDLE_CANDLES_LEVEL_2,
|
||||
CANDLE_CANDLES_LEVEL_3,
|
||||
CANDLE_CANDLES_LEVEL_4,
|
||||
|
||||
// grindstone
|
||||
GRINDSTONE_FACE_FLOOR,
|
||||
GRINDSTONE_FACE_WALL,
|
||||
GRINDSTONE_FACE_CEILING,
|
||||
|
||||
// hopper
|
||||
HOPPER_ENABLED_YES,
|
||||
HOPPER_ENABLED_NO,
|
||||
|
||||
// button
|
||||
BUTTON_FACE_FLOOR,
|
||||
BUTTON_FACE_WALL,
|
||||
BUTTON_FACE_CEILING;
|
||||
|
||||
public static final HashMap<String, HashMap<String, BlockProperties>> PROPERTIES_MAPPING = new HashMap<>();
|
||||
|
||||
static {
|
||||
// add all to hashmap
|
||||
for (BlockProperties property : values()) {
|
||||
if (!PROPERTIES_MAPPING.containsKey(property.getGroup())) {
|
||||
PROPERTIES_MAPPING.put(property.getGroup(), new HashMap<>());
|
||||
}
|
||||
PROPERTIES_MAPPING.get(property.getGroup()).put(property.getValue(), property);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
final String group;
|
||||
final String value;
|
||||
|
||||
BlockProperties() {
|
||||
final String name = name();
|
||||
final List<String> split = Arrays.asList(name.split("_"));
|
||||
|
||||
if (name.contains("LEVEL")) {
|
||||
// level with int values
|
||||
int levelIndex = split.indexOf("LEVEL");
|
||||
group = split.get(levelIndex - 1).toLowerCase();
|
||||
} else if (split.size() == 3) {
|
||||
// TYPE_NAME_VALUE
|
||||
group = split.get(1).toLowerCase();
|
||||
} else if (name.endsWith("YES") || name.endsWith("NO")) {
|
||||
group = split.get(split.size() - 2).toLowerCase();
|
||||
} else {
|
||||
throw new IllegalArgumentException(String.format("Could not find group automatically: %s", name));
|
||||
}
|
||||
this.value = getValueByName(name);
|
||||
}
|
||||
|
||||
BlockProperties(String group) {
|
||||
this.group = group;
|
||||
this.value = getValueByName(name());
|
||||
}
|
||||
|
||||
|
||||
BlockProperties(String group, String value) {
|
||||
this.group = group;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
private static String getValueByName(String name) {
|
||||
final List<String> split = Arrays.asList(name.split("_"));
|
||||
if (name.contains("LEVEL")) {
|
||||
// level with int values
|
||||
return split.get(split.indexOf("LEVEL") + 1);
|
||||
} else if (name.endsWith("YES")) {
|
||||
return String.valueOf(true);
|
||||
} else if (name.endsWith("NO")) {
|
||||
return String.valueOf(false);
|
||||
} else if (split.size() == 3) {
|
||||
return split.get(2).toLowerCase();
|
||||
} else {
|
||||
throw new IllegalArgumentException(String.format("Could not find value automatically: %s", name));
|
||||
}
|
||||
}
|
||||
|
||||
public String getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
@ -13,25 +13,32 @@
|
||||
|
||||
package de.bixilon.minosoft.data.mappings.blocks;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
public enum BlockRotations {
|
||||
NONE,
|
||||
SOUTH,
|
||||
SOUTH_SOUTH_WEST,
|
||||
SOUTH_WEST,
|
||||
WEST_SOUTH_WEST,
|
||||
WEST,
|
||||
WEST_NORTH_WEST,
|
||||
NORTH_WEST,
|
||||
NORTH_NORTH_WEST,
|
||||
NORTH,
|
||||
NORTH_NORTH_EAST,
|
||||
NORTH_EAST,
|
||||
EAST_NORTH_EAST,
|
||||
EAST,
|
||||
EAST_SOUTH_EAST,
|
||||
SOUTH_EAST,
|
||||
SOUTH_SOUTH_EAST,
|
||||
// mostly sign, but general
|
||||
SOUTH("0"),
|
||||
SOUTH_SOUTH_WEST("1"),
|
||||
SOUTH_WEST("2"),
|
||||
WEST_SOUTH_WEST("3"),
|
||||
WEST("4"),
|
||||
WEST_NORTH_WEST("5"),
|
||||
NORTH_WEST("6"),
|
||||
NORTH_NORTH_WEST("7"),
|
||||
NORTH("8"),
|
||||
NORTH_NORTH_EAST("9"),
|
||||
NORTH_EAST("10"),
|
||||
EAST_NORTH_EAST("11"),
|
||||
EAST("12"),
|
||||
EAST_SOUTH_EAST("13"),
|
||||
SOUTH_EAST("14"),
|
||||
SOUTH_SOUTH_EAST("15"),
|
||||
|
||||
|
||||
// stairs?
|
||||
NORTH_SOUTH,
|
||||
EAST_WEST,
|
||||
ASCENDING_EAST,
|
||||
@ -42,13 +49,6 @@ public enum BlockRotations {
|
||||
UP,
|
||||
DOWN,
|
||||
|
||||
// log, portal
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
AXIS_Z,
|
||||
|
||||
// 1.16+
|
||||
|
||||
DOWN_EAST,
|
||||
DOWN_WEST,
|
||||
DOWN_NORTH,
|
||||
@ -61,4 +61,33 @@ public enum BlockRotations {
|
||||
NORTH_UP,
|
||||
UP_SOUTH,
|
||||
SOUTH_UP,
|
||||
|
||||
// log, portal
|
||||
AXIS_X("x"),
|
||||
AXIS_Y("y"),
|
||||
AXIS_Z("z");
|
||||
|
||||
public static final HashMap<String, BlockRotations> ROTATION_MAPPING = new HashMap<>();
|
||||
|
||||
static {
|
||||
// add all to hashmap
|
||||
for (BlockRotations rotation : values()) {
|
||||
ROTATION_MAPPING.put(rotation.name().toLowerCase(), rotation);
|
||||
rotation.getAliases().forEach((alias) -> ROTATION_MAPPING.put(alias, rotation));
|
||||
}
|
||||
}
|
||||
|
||||
private final HashSet<String> aliases;
|
||||
|
||||
BlockRotations() {
|
||||
aliases = new HashSet<>();
|
||||
}
|
||||
|
||||
BlockRotations(String... alias) {
|
||||
aliases = new HashSet<>(Arrays.asList(alias));
|
||||
}
|
||||
|
||||
public HashSet<String> getAliases() {
|
||||
return aliases;
|
||||
}
|
||||
}
|
||||
|
@ -17,444 +17,10 @@ import com.google.common.collect.HashBiMap;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
||||
public class Blocks {
|
||||
public static final Block nullBlock = new Block("minecraft", "air");
|
||||
static final HashMap<String, HashMap<String, BlockProperties>> propertiesMapping = new HashMap<>();
|
||||
static final HashMap<String, BlockRotations> rotationMapping = new HashMap<>();
|
||||
|
||||
static {
|
||||
HashMap<String, BlockProperties> propertyHashMap;
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 15; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("LEVEL_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("level", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 5; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("HONEY_LEVEL_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("honey_level", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 15; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("POWER_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("power", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 1; i <= 8; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("LAYERS_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("layers", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 7; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("DISTANCE_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("distance", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 25; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("AGE_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("age", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 7; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("DISTANCE_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("distance", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 7; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("MOISTURE_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("moisture", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 1; i <= 4; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("PICKLES_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("pickles", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 6; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("BITES_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("bites", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 1; i <= 4; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("DELAY_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("delay", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 2; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("HATCH_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("hatch", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 1; i <= 4; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("EGGS_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("eggs", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 24; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("NOTE_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("note", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
propertyHashMap.put(String.valueOf(i), BlockProperties.valueOf(String.format("CHARGES_%d", i)));
|
||||
}
|
||||
propertiesMapping.put("charges", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("0", BlockProperties.STAGE_0);
|
||||
propertyHashMap.put("1", BlockProperties.STAGE_1);
|
||||
propertiesMapping.put("stage", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.EAST);
|
||||
propertyHashMap.put("up", BlockProperties.EAST_UP);
|
||||
propertyHashMap.put("low", BlockProperties.EAST_LOW);
|
||||
propertyHashMap.put("tall", BlockProperties.EAST_TALL);
|
||||
propertyHashMap.put("side", BlockProperties.EAST_SIDE);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_EAST);
|
||||
propertyHashMap.put("none", BlockProperties.EAST_NONE);
|
||||
propertiesMapping.put("east", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.WEST);
|
||||
propertyHashMap.put("up", BlockProperties.WEST_UP);
|
||||
propertyHashMap.put("low", BlockProperties.WEST_LOW);
|
||||
propertyHashMap.put("tall", BlockProperties.WEST_TALL);
|
||||
propertyHashMap.put("side", BlockProperties.WEST_SIDE);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_WEST);
|
||||
propertyHashMap.put("none", BlockProperties.WEST_NONE);
|
||||
propertiesMapping.put("west", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.SOUTH);
|
||||
propertyHashMap.put("up", BlockProperties.SOUTH_UP);
|
||||
propertyHashMap.put("low", BlockProperties.SOUTH_LOW);
|
||||
propertyHashMap.put("tall", BlockProperties.SOUTH_TALL);
|
||||
propertyHashMap.put("side", BlockProperties.SOUTH_SIDE);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_SOUTH);
|
||||
propertyHashMap.put("none", BlockProperties.SOUTH_NONE);
|
||||
propertiesMapping.put("south", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.NORTH);
|
||||
propertyHashMap.put("up", BlockProperties.NORTH_UP);
|
||||
propertyHashMap.put("low", BlockProperties.NORTH_LOW);
|
||||
propertyHashMap.put("tall", BlockProperties.NORTH_TALL);
|
||||
propertyHashMap.put("side", BlockProperties.NORTH_SIDE);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_NORTH);
|
||||
propertyHashMap.put("none", BlockProperties.NORTH_NONE);
|
||||
propertiesMapping.put("north", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.SNOWY);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_SNOWY);
|
||||
propertiesMapping.put("snowy", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.UP);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_UP);
|
||||
propertiesMapping.put("up", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.DOWN);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_DOWN);
|
||||
propertiesMapping.put("down", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.IN_WALL);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_IN_WALL);
|
||||
propertiesMapping.put("in_wall", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.EXTENDED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_EXTENDED);
|
||||
propertiesMapping.put("extended", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.POWERED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_POWERED);
|
||||
propertiesMapping.put("powered", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.OPEN);
|
||||
propertyHashMap.put("false", BlockProperties.CLOSED);
|
||||
propertiesMapping.put("open", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.BOTTOM);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_BOTTOM);
|
||||
propertiesMapping.put("bottom", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.OCCUPIED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_OCCUPIED);
|
||||
propertiesMapping.put("occupied", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.ATTACHED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_ATTACHED);
|
||||
propertiesMapping.put("attached", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.DISARMED);
|
||||
propertyHashMap.put("false", BlockProperties.ARMED);
|
||||
propertiesMapping.put("disarmed", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.INVERTED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_INVERTED);
|
||||
propertiesMapping.put("inverted", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.TRIGGERED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_TRIGGERED);
|
||||
propertiesMapping.put("triggered", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.CONDITIONAL);
|
||||
propertyHashMap.put("false", BlockProperties.UNCONDITIONAL);
|
||||
propertiesMapping.put("conditional", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.DRAG);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_DRAG);
|
||||
propertiesMapping.put("drag", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.UNSTABLE);
|
||||
propertyHashMap.put("false", BlockProperties.STABLE);
|
||||
propertiesMapping.put("unstable", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.HANGING);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_HANGING);
|
||||
propertiesMapping.put("hanging", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.HAS_BOOK);
|
||||
propertyHashMap.put("false", BlockProperties.NO_BOOK);
|
||||
propertiesMapping.put("has_book", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.HAS_BOTTLE_0);
|
||||
propertyHashMap.put("false", BlockProperties.NO_BOTTLE_0);
|
||||
propertiesMapping.put("has_bottle_0", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.HAS_BOTTLE_1);
|
||||
propertyHashMap.put("false", BlockProperties.NO_BOTTLE_1);
|
||||
propertiesMapping.put("has_bottle_1", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.HAS_BOTTLE_2);
|
||||
propertyHashMap.put("false", BlockProperties.NO_BOTTLE_2);
|
||||
propertiesMapping.put("has_bottle_2", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.PERSISTENT);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_PERSISTENT);
|
||||
propertiesMapping.put("persistent", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.LIT);
|
||||
propertyHashMap.put("false", BlockProperties.UN_LIT);
|
||||
propertiesMapping.put("lit", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.WATERLOGGED);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_WATERLOGGED);
|
||||
propertiesMapping.put("waterlogged", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.LOCKED);
|
||||
propertyHashMap.put("false", BlockProperties.UNLOCKED);
|
||||
propertiesMapping.put("locked", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.EYE);
|
||||
propertyHashMap.put("false", BlockProperties.NO_EYE);
|
||||
propertiesMapping.put("eye", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.ENABLED);
|
||||
propertyHashMap.put("false", BlockProperties.DISABLED);
|
||||
propertiesMapping.put("enabled", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.HAS_RECORD);
|
||||
propertyHashMap.put("false", BlockProperties.HAS_NO_RECORD);
|
||||
propertiesMapping.put("has_record", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.SHORT);
|
||||
propertyHashMap.put("false", BlockProperties.LONG);
|
||||
propertiesMapping.put("short", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.SIGNAL_FIRE);
|
||||
propertyHashMap.put("false", BlockProperties.NOT_SIGNAL_FIRE);
|
||||
propertiesMapping.put("signal_fire", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("true", BlockProperties.IN_AIR);
|
||||
propertyHashMap.put("false", BlockProperties.ON_GROUND);
|
||||
propertiesMapping.put("in_air", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("harp", BlockProperties.HARP);
|
||||
propertyHashMap.put("basedrum", BlockProperties.BASEDRUM);
|
||||
propertyHashMap.put("snare", BlockProperties.SNARE);
|
||||
propertyHashMap.put("hat", BlockProperties.HAT);
|
||||
propertyHashMap.put("bass", BlockProperties.BASS);
|
||||
propertyHashMap.put("flute", BlockProperties.FLUTE);
|
||||
propertyHashMap.put("bell", BlockProperties.BELL);
|
||||
propertyHashMap.put("guitar", BlockProperties.GUITAR);
|
||||
propertyHashMap.put("chime", BlockProperties.CHIME);
|
||||
propertyHashMap.put("xylophone", BlockProperties.XYLOPHONE);
|
||||
propertyHashMap.put("iron_xylophone", BlockProperties.IRON_XYLOPHONE);
|
||||
propertyHashMap.put("cow_bell", BlockProperties.COW_BELL);
|
||||
propertyHashMap.put("didgeridoo", BlockProperties.DIDGERIDOO);
|
||||
propertyHashMap.put("bit", BlockProperties.BIT);
|
||||
propertyHashMap.put("banjo", BlockProperties.BANJO);
|
||||
propertyHashMap.put("pling", BlockProperties.PLING);
|
||||
propertiesMapping.put("instrument", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("head", BlockProperties.HEAD);
|
||||
propertyHashMap.put("foot", BlockProperties.FOOT);
|
||||
propertiesMapping.put("part", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("left", BlockProperties.HINGE_LEFT);
|
||||
propertyHashMap.put("right", BlockProperties.HINGE_RIGHT);
|
||||
propertiesMapping.put("hinge", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("floor", BlockProperties.FLOOR);
|
||||
propertyHashMap.put("wall", BlockProperties.WALL);
|
||||
propertyHashMap.put("ceiling", BlockProperties.CEILING);
|
||||
propertiesMapping.put("face", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("floor", BlockProperties.FLOOR);
|
||||
propertyHashMap.put("ceiling", BlockProperties.CEILING);
|
||||
propertyHashMap.put("single_wall", BlockProperties.SINGLE_WALL);
|
||||
propertyHashMap.put("double_wall", BlockProperties.DOUBLE_WALL);
|
||||
propertiesMapping.put("attachment", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("save", BlockProperties.SAVE);
|
||||
propertyHashMap.put("load", BlockProperties.LOAD);
|
||||
propertyHashMap.put("corner", BlockProperties.CORNER);
|
||||
propertyHashMap.put("data", BlockProperties.DATA);
|
||||
propertyHashMap.put("compare", BlockProperties.COMPARE);
|
||||
propertyHashMap.put("subtract", BlockProperties.SUBTRACT);
|
||||
propertiesMapping.put("mode", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("top", BlockProperties.HALF_UPPER);
|
||||
propertyHashMap.put("upper", BlockProperties.HALF_UPPER);
|
||||
propertyHashMap.put("bottom", BlockProperties.HALF_LOWER);
|
||||
propertyHashMap.put("lower", BlockProperties.HALF_LOWER);
|
||||
propertiesMapping.put("half", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("none", BlockProperties.NONE);
|
||||
propertyHashMap.put("small", BlockProperties.LARGE);
|
||||
propertyHashMap.put("large", BlockProperties.SMALL);
|
||||
propertiesMapping.put("leaves", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("top", BlockProperties.SLAB_TOP);
|
||||
propertyHashMap.put("bottom", BlockProperties.SLAB_BOTTOM);
|
||||
propertyHashMap.put("double", BlockProperties.SLAB_DOUBLE);
|
||||
propertyHashMap.put("normal", BlockProperties.TYPE_NORMAL);
|
||||
propertyHashMap.put("sticky", BlockProperties.TYPE_STICKY);
|
||||
propertyHashMap.put("single", BlockProperties.TYPE_SINGLE);
|
||||
propertyHashMap.put("left", BlockProperties.TYPE_LEFT);
|
||||
propertyHashMap.put("right", BlockProperties.TYPE_RIGHT);
|
||||
propertiesMapping.put("type", propertyHashMap);
|
||||
|
||||
propertyHashMap = new HashMap<>();
|
||||
propertyHashMap.put("straight", BlockProperties.STRAIGHT);
|
||||
propertyHashMap.put("inner_left", BlockProperties.INNER_LEFT);
|
||||
propertyHashMap.put("inner_right", BlockProperties.INNER_RIGHT);
|
||||
propertyHashMap.put("outer_left", BlockProperties.OUTER_LEFT);
|
||||
propertyHashMap.put("outer_right", BlockProperties.OUTER_RIGHT);
|
||||
propertyHashMap.put("north_south", BlockProperties.NORTH_SOUTH);
|
||||
propertyHashMap.put("east_west", BlockProperties.EAST_WEST);
|
||||
propertyHashMap.put("south_east", BlockProperties.SOUTH_EAST);
|
||||
propertyHashMap.put("south_west", BlockProperties.SOUTH_WEST);
|
||||
propertyHashMap.put("north_west", BlockProperties.NORTH_WEST);
|
||||
propertyHashMap.put("north_east", BlockProperties.NORTH_EAST);
|
||||
propertyHashMap.put("ascending_east", BlockProperties.ASCENDING_EAST);
|
||||
propertyHashMap.put("ascending_west", BlockProperties.ASCENDING_WEST);
|
||||
propertyHashMap.put("ascending_north", BlockProperties.ASCENDING_NORTH);
|
||||
propertyHashMap.put("ascending_south", BlockProperties.ASCENDING_SOUTH);
|
||||
propertiesMapping.put("shape", propertyHashMap);
|
||||
|
||||
rotationMapping.put("0", BlockRotations.SOUTH);
|
||||
rotationMapping.put("1", BlockRotations.SOUTH_SOUTH_WEST);
|
||||
rotationMapping.put("2", BlockRotations.SOUTH_WEST);
|
||||
rotationMapping.put("3", BlockRotations.WEST_SOUTH_WEST);
|
||||
rotationMapping.put("4", BlockRotations.WEST);
|
||||
rotationMapping.put("5", BlockRotations.WEST_NORTH_WEST);
|
||||
rotationMapping.put("6", BlockRotations.NORTH_WEST);
|
||||
rotationMapping.put("7", BlockRotations.NORTH_NORTH_WEST);
|
||||
rotationMapping.put("8", BlockRotations.NORTH);
|
||||
rotationMapping.put("9", BlockRotations.NORTH_NORTH_EAST);
|
||||
rotationMapping.put("10", BlockRotations.NORTH_EAST);
|
||||
rotationMapping.put("11", BlockRotations.EAST_NORTH_EAST);
|
||||
rotationMapping.put("12", BlockRotations.EAST);
|
||||
rotationMapping.put("13", BlockRotations.EAST_SOUTH_EAST);
|
||||
rotationMapping.put("14", BlockRotations.SOUTH_EAST);
|
||||
rotationMapping.put("15", BlockRotations.SOUTH_SOUTH_EAST);
|
||||
rotationMapping.put("south", BlockRotations.SOUTH);
|
||||
rotationMapping.put("east", BlockRotations.EAST);
|
||||
rotationMapping.put("north", BlockRotations.NONE);
|
||||
rotationMapping.put("west", BlockRotations.WEST);
|
||||
rotationMapping.put("up", BlockRotations.UP);
|
||||
rotationMapping.put("down", BlockRotations.DOWN);
|
||||
rotationMapping.put("ascending_east", BlockRotations.ASCENDING_EAST);
|
||||
rotationMapping.put("ascending_west", BlockRotations.ASCENDING_WEST);
|
||||
rotationMapping.put("ascending_north", BlockRotations.ASCENDING_NORTH);
|
||||
rotationMapping.put("ascending_south", BlockRotations.ASCENDING_SOUTH);
|
||||
rotationMapping.put("down_east", BlockRotations.DOWN_EAST);
|
||||
rotationMapping.put("down_west", BlockRotations.DOWN_WEST);
|
||||
rotationMapping.put("down_north", BlockRotations.DOWN_NORTH);
|
||||
rotationMapping.put("down_south", BlockRotations.DOWN_SOUTH);
|
||||
rotationMapping.put("up_east", BlockRotations.UP_EAST);
|
||||
rotationMapping.put("east_up", BlockRotations.EAST_UP);
|
||||
rotationMapping.put("up_west", BlockRotations.UP_WEST);
|
||||
rotationMapping.put("west_up", BlockRotations.WEST_UP);
|
||||
rotationMapping.put("up_north", BlockRotations.UP_NORTH);
|
||||
rotationMapping.put("north_up", BlockRotations.NORTH_UP);
|
||||
rotationMapping.put("up_south", BlockRotations.UP_SOUTH);
|
||||
rotationMapping.put("south_up", BlockRotations.SOUTH_UP);
|
||||
rotationMapping.put("north_south", BlockRotations.NORTH_SOUTH);
|
||||
rotationMapping.put("east_west", BlockRotations.EAST_WEST);
|
||||
rotationMapping.put("x", BlockRotations.AXIS_X);
|
||||
rotationMapping.put("y", BlockRotations.AXIS_Y);
|
||||
rotationMapping.put("z", BlockRotations.AXIS_Z);
|
||||
}
|
||||
|
||||
public static HashBiMap<Integer, Block> load(String mod, JsonObject json, boolean metaData) {
|
||||
HashBiMap<Integer, Block> versionMapping = HashBiMap.create();
|
||||
@ -469,27 +35,28 @@ public class Blocks {
|
||||
JsonObject propertiesJSON = statesJSON.getAsJsonObject("properties");
|
||||
BlockRotations rotation = BlockRotations.NONE;
|
||||
if (propertiesJSON.has("facing")) {
|
||||
rotation = rotationMapping.get(propertiesJSON.get("facing").getAsString());
|
||||
rotation = BlockRotations.ROTATION_MAPPING.get(propertiesJSON.get("facing").getAsString());
|
||||
propertiesJSON.remove("facing");
|
||||
} else if (propertiesJSON.has("rotation")) {
|
||||
rotation = rotationMapping.get(propertiesJSON.get("rotation").getAsString());
|
||||
rotation = BlockRotations.ROTATION_MAPPING.get(propertiesJSON.get("rotation").getAsString());
|
||||
propertiesJSON.remove("rotation");
|
||||
} else if (propertiesJSON.has("orientation")) {
|
||||
rotation = rotationMapping.get(propertiesJSON.get("orientation").getAsString());
|
||||
rotation = BlockRotations.ROTATION_MAPPING.get(propertiesJSON.get("orientation").getAsString());
|
||||
propertiesJSON.remove("orientation");
|
||||
} else if (propertiesJSON.has("axis")) {
|
||||
rotation = rotationMapping.get(propertiesJSON.get("axis").getAsString());
|
||||
rotation = BlockRotations.ROTATION_MAPPING.get(propertiesJSON.get("axis").getAsString());
|
||||
propertiesJSON.remove("axis");
|
||||
}
|
||||
|
||||
HashSet<BlockProperties> properties = new HashSet<>();
|
||||
for (String propertyName : propertiesJSON.keySet()) {
|
||||
if (propertiesMapping.get(propertyName) == null) {
|
||||
if (BlockProperties.PROPERTIES_MAPPING.get(propertyName) == null) {
|
||||
throw new RuntimeException(String.format("Unknown block property: %s (identifier=%s)", propertyName, identifierName));
|
||||
}
|
||||
if (propertiesMapping.get(propertyName).get(propertiesJSON.get(propertyName).getAsString()) == null) {
|
||||
if (BlockProperties.PROPERTIES_MAPPING.get(propertyName).get(propertiesJSON.get(propertyName).getAsString()) == null) {
|
||||
throw new RuntimeException(String.format("Unknown block property: %s -> %s (identifier=%s)", propertyName, propertiesJSON.get(propertyName).getAsString(), identifierName));
|
||||
}
|
||||
properties.add(propertiesMapping.get(propertyName).get(propertiesJSON.get(propertyName).getAsString()));
|
||||
properties.add(BlockProperties.PROPERTIES_MAPPING.get(propertyName).get(propertiesJSON.get(propertyName).getAsString()));
|
||||
}
|
||||
|
||||
block = new Block(mod, identifierName, properties, rotation);
|
||||
@ -522,12 +89,4 @@ public class Blocks {
|
||||
throw new RuntimeException(String.format("Block Id %s is already present for %s! (identifier=%s)", blockId, versionMapping.get(blockId), identifierName));
|
||||
}
|
||||
}
|
||||
|
||||
public static HashMap<String, BlockRotations> getRotationMapping() {
|
||||
return rotationMapping;
|
||||
}
|
||||
|
||||
public static HashMap<String, HashMap<String, BlockProperties>> getPropertiesMapping() {
|
||||
return propertiesMapping;
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,6 @@ import de.bixilon.minosoft.util.ServerAddress;
|
||||
import org.xbill.DNS.TextParseException;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
@ -161,7 +160,7 @@ public class Connection {
|
||||
this.customMapping.setVersion(version);
|
||||
try {
|
||||
Versions.loadVersionMappings(version.getVersionId());
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) {
|
||||
Log.printException(e, LogLevels.DEBUG);
|
||||
Log.fatal(String.format("Could not load mapping for %s. This version seems to be unsupported!", version));
|
||||
lastException = new MappingsLoadingException("Mappings could not be loaded", e);
|
||||
|
@ -72,7 +72,10 @@ public class PacketChunkData implements ClientboundPacket {
|
||||
return true;
|
||||
}
|
||||
this.location = new ChunkLocation(buffer.readInt(), buffer.readInt());
|
||||
boolean groundUpContinuous = buffer.readBoolean();
|
||||
boolean groundUpContinuous = true; // ToDo: how should we handle this now?
|
||||
if (buffer.getVersionId() < 758) {
|
||||
groundUpContinuous = buffer.readBoolean();
|
||||
}
|
||||
if (buffer.getVersionId() >= 732 && buffer.getVersionId() < 746) {
|
||||
this.ignoreOldData = buffer.readBoolean();
|
||||
}
|
||||
@ -97,7 +100,7 @@ public class PacketChunkData implements ClientboundPacket {
|
||||
|
||||
if (size > 0) {
|
||||
chunk = ChunkUtil.readChunkPacket(buffer, (short) sectionBitMask, (short) 0, groundUpContinuous, containsSkyLight);
|
||||
// set position of the byte buffer, because of some reasons HyPixel makes some weired stuff and sends way to much 0 bytes. (~ 190k), thanks @pokechu22
|
||||
// set position of the byte buffer, because of some reasons HyPixel makes some weird stuff and sends way to much 0 bytes. (~ 190k), thanks @pokechu22
|
||||
buffer.setPosition(size + lastPos);
|
||||
}
|
||||
if (buffer.getVersionId() >= 110) {
|
||||
|
@ -21,11 +21,15 @@ import de.bixilon.minosoft.protocol.protocol.PacketHandler;
|
||||
public class PacketResourcePackSend implements ClientboundPacket {
|
||||
String url;
|
||||
String hash;
|
||||
boolean forced = false;
|
||||
|
||||
@Override
|
||||
public boolean read(InByteBuffer buffer) {
|
||||
url = buffer.readString();
|
||||
hash = buffer.readString();
|
||||
if (buffer.getVersionId() >= 758) {
|
||||
forced = buffer.readBoolean();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -46,4 +50,8 @@ public class PacketResourcePackSend implements ClientboundPacket {
|
||||
public String getHash() {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public boolean isForced() {
|
||||
return forced;
|
||||
}
|
||||
}
|
||||
|
@ -29,10 +29,11 @@ public class PacketUpdateLight implements ClientboundPacket {
|
||||
if (buffer.getVersionId() >= 725) {
|
||||
boolean trustEdges = buffer.readBoolean();
|
||||
}
|
||||
int skyLightMask = buffer.readVarInt();
|
||||
int blockLightMask = buffer.readVarInt();
|
||||
int emptyBlockLightMask = buffer.readVarInt();
|
||||
int emptySkyLightMask = buffer.readVarInt();
|
||||
// was a varInt before 20w45a, should we change this?
|
||||
long skyLightMask = buffer.readVarLong();
|
||||
long blockLightMask = buffer.readVarLong();
|
||||
long emptyBlockLightMask = buffer.readVarLong();
|
||||
long emptySkyLightMask = buffer.readVarLong();
|
||||
ChunkUtil.readSkyLightPacket(buffer, skyLightMask, blockLightMask, emptyBlockLightMask, emptySkyLightMask);
|
||||
return true;
|
||||
}
|
||||
@ -44,6 +45,6 @@ public class PacketUpdateLight implements ClientboundPacket {
|
||||
|
||||
@Override
|
||||
public void log() {
|
||||
Log.protocol(String.format("Received sky light update (location=%s)", location));
|
||||
Log.protocol(String.format("Received light update (location=%s)", location));
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,6 @@ public class LANServerListener {
|
||||
servers.put(sender, server);
|
||||
Platform.runLater(() -> ServerListCell.listView.getItems().add(server));
|
||||
Log.debug(String.format("Discovered new LAN Server: %s", server));
|
||||
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
@ -91,7 +90,6 @@ public class LANServerListener {
|
||||
}
|
||||
servers.inverse().remove(server);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static Server getServerByBroadcast(InetAddress address, byte[] broadcast) {
|
||||
@ -103,7 +101,7 @@ public class LANServerListener {
|
||||
}
|
||||
String rawAddress = Util.getStringBetween(parsed, PORT_START_STRING, PORT_END_STRING);
|
||||
if (rawAddress.contains(":")) {
|
||||
// weired, just extract the port
|
||||
// weird, just extract the port
|
||||
rawAddress = rawAddress.split(":")[1];
|
||||
}
|
||||
int port = Integer.parseInt(rawAddress);
|
||||
|
@ -4,11 +4,11 @@
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.render.blockModels;
|
||||
@ -18,7 +18,6 @@ import com.google.gson.JsonObject;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.Block;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.BlockProperties;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.BlockRotations;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.Blocks;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
@ -39,11 +38,11 @@ public class BlockCondition {
|
||||
rotation = BlockRotations.NONE;
|
||||
for (Map.Entry<String, JsonElement> entry : json.entrySet()) {
|
||||
String value = entry.getValue().getAsString();
|
||||
if (Blocks.getPropertiesMapping().containsKey(entry.getKey())) {
|
||||
properties.add(Blocks.getPropertiesMapping().get(entry.getKey()).get(value));
|
||||
if (BlockProperties.PROPERTIES_MAPPING.containsKey(entry.getKey())) {
|
||||
properties.add(BlockProperties.PROPERTIES_MAPPING.get(entry.getKey()).get(value));
|
||||
continue;
|
||||
}
|
||||
rotation = Blocks.getRotationMapping().get(value);
|
||||
rotation = BlockRotations.ROTATION_MAPPING.get(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020 Lukas Eisenhauer
|
||||
* Copyright (C) 2020 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.render.blockModels;
|
||||
@ -19,7 +19,6 @@ import com.google.gson.JsonObject;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.Block;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.BlockProperties;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.BlockRotations;
|
||||
import de.bixilon.minosoft.data.mappings.blocks.Blocks;
|
||||
import de.bixilon.minosoft.data.world.BlockPosition;
|
||||
import de.bixilon.minosoft.logging.Log;
|
||||
import de.bixilon.minosoft.render.blockModels.Face.Axis;
|
||||
@ -44,10 +43,10 @@ public class BlockModel implements BlockModelInterface {
|
||||
HashSet<SubBlock> model = blockModels.get(state.get("model").getAsString()).stream().map(SubBlock::new).collect(Collectors.toCollection(HashSet::new));
|
||||
HashSet<String> properties = new HashSet<>();
|
||||
for (Map.Entry<String, JsonElement> property : state.getAsJsonObject("properties").entrySet()) {
|
||||
if (Blocks.getPropertiesMapping().containsKey(property.getKey())) {
|
||||
properties.add(Blocks.getPropertiesMapping().get(property.getKey()).get(property.getValue().getAsString()).name());
|
||||
} else if (Blocks.getRotationMapping().containsKey(property.getValue().getAsString())) {
|
||||
properties.add(Blocks.getRotationMapping().get(property.getValue().getAsString()).name());
|
||||
if (BlockProperties.PROPERTIES_MAPPING.containsKey(property.getKey())) {
|
||||
properties.add(BlockProperties.PROPERTIES_MAPPING.get(property.getKey()).get(property.getValue().getAsString()).name());
|
||||
} else if (BlockRotations.ROTATION_MAPPING.containsKey(property.getValue().getAsString())) {
|
||||
properties.add(BlockRotations.ROTATION_MAPPING.get(property.getValue().getAsString()).name());
|
||||
}
|
||||
}
|
||||
for (Axis axis : Axis.values()) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020 Moritz Zwerger
|
||||
* Copyright (C) 2020 Moritz Zwerger, Lukas Eisenhauer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.render.blockModels;
|
||||
@ -61,6 +61,10 @@ public class BlockModelLoader {
|
||||
}
|
||||
}
|
||||
|
||||
public static BlockModelLoader getInstance() {
|
||||
return blockModelLoader;
|
||||
}
|
||||
|
||||
private void loadBlocks(JsonObject mod, HashMap<String, HashSet<SubBlock>> blockModels) {
|
||||
for (Map.Entry<String, JsonElement> blockEntry : mod.get("blockStates").getAsJsonObject().entrySet()) {
|
||||
JsonObject block = blockEntry.getValue().getAsJsonObject();
|
||||
@ -124,7 +128,7 @@ public class BlockModelLoader {
|
||||
public BlockModelInterface getBlockModel(Block block) {
|
||||
BlockModelInterface model = modelMap.get(block.getMod()).get(block.getIdentifier());
|
||||
if (model == null) {
|
||||
throw new RuntimeException("block " + block + " could not be found");
|
||||
throw new RuntimeException(String.format("Block model for could not be found: %s", block));
|
||||
}
|
||||
return model;
|
||||
}
|
||||
@ -147,8 +151,4 @@ public class BlockModelLoader {
|
||||
public TextureLoader getTextureLoader() {
|
||||
return textureLoader;
|
||||
}
|
||||
|
||||
public static BlockModelLoader getInstance() {
|
||||
return blockModelLoader;
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,8 @@
|
||||
package de.bixilon.minosoft.util;
|
||||
|
||||
public final class BitByte {
|
||||
public static boolean isBitSet(int in, int pos) {
|
||||
int mask = 1 << pos;
|
||||
public static boolean isBitSet(long in, int pos) {
|
||||
long mask = 1 << pos;
|
||||
return ((in & mask) == mask);
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ public final class ChunkUtil {
|
||||
return new Chunk(sectionMap);
|
||||
}
|
||||
|
||||
public static void readSkyLightPacket(InByteBuffer buffer, int skyLightMask, int blockLightMask, int emptyBlockLightMask, int emptySkyLightMask) {
|
||||
public static void readSkyLightPacket(InByteBuffer buffer, long skyLightMask, long blockLightMask, long emptyBlockLightMask, long emptySkyLightMask) {
|
||||
for (byte c = 0; c < 18; c++) { // light sections
|
||||
if (!BitByte.isBitSet(skyLightMask, c)) {
|
||||
continue;
|
||||
|
@ -4,7 +4,7 @@
|
||||
"OFFLINE": "Offline",
|
||||
"CONNECTING": "Verbinde...",
|
||||
"ADD_SERVER_DIALOG_TITLE": "Server hinzufügen - Minosoft",
|
||||
"ADD_SERVER_DIALOG_HEADER": "Bitte gib die Daten ein um fortzufahren",
|
||||
"ADD_SERVER_DIALOG_HEADER": "Bitte gib den Namen und die Serveradrese ein um fortzufahren",
|
||||
"ADD_SERVER_DIALOG_DEFAULT_SERVER_NAME": "Ein Minosoft Server",
|
||||
"EDIT_SERVER_DIALOG_TITLE": "Server bearbeiten: {0} - Minosoft",
|
||||
"EDIT_SERVER_DIALOG_HEADER": "Server bearbeiten",
|
||||
@ -19,17 +19,17 @@
|
||||
"SERVER_INFO_LAST_CONNECTION_EXCEPTION": "Letzer Verbindungsfehler",
|
||||
"SERVER_INFO_VERSION_UNKNOWN": "Unbekannt ({0})",
|
||||
"SERVER_INFO_SLOTS_PLAYERS_ONLINE": "{0} / {1}",
|
||||
"SERVER_INFO_REAL_SERVER_ADDRESS": "Echte Serveradresse",
|
||||
"SERVER_INFO_REAL_SERVER_ADDRESS": "Reale Serveradresse",
|
||||
"SERVER_INFO_SERVER_BRAND": "Serverart",
|
||||
"SERVER_INFO_PLAYERS_ONLINE": "Spieler online",
|
||||
"SERVER_INFO_MESSAGE_OF_THE_DAY": "MotD",
|
||||
"SERVER_INFO_SERVER_MODDED_BRAND": "Veränderte Serverart",
|
||||
"SERVER_INFO_SERVER_MODDED_BRAND": "Serverart",
|
||||
"SERVER_INFO_SERVER_MODDED_MOD_LIST": "Modliste",
|
||||
"SESSIONS_DIALOG_TITLE": "Verbindungen - {0} - Minosoft",
|
||||
"ACCOUNTS_ACTION_SELECT": "Auswählen",
|
||||
"ACCOUNTS_ACTION_DELETE": "Löschen",
|
||||
"SERVER_ACTION_CONNECT": "Verbinden",
|
||||
"SERVER_ACTION_SHOW_INFO": "Info",
|
||||
"SERVER_ACTION_SHOW_INFO": "Infos",
|
||||
"SERVER_ACTION_EDIT": "Bearbeiten",
|
||||
"SERVER_ACTION_REFRESH": "Aktualisieren",
|
||||
"SERVER_ACTION_SESSIONS": "Verbindungen",
|
||||
@ -45,8 +45,8 @@
|
||||
"MAIN_WINDOW_MENU_SERVERS_REFRESH": "Aktualisieren",
|
||||
"MAIN_WINDOW_MENU_SERVERS_HELP": "_Hilfe",
|
||||
"MAIN_WINDOW_MENU_SERVERS_HELP_ABOUT": "Über",
|
||||
"MAIN_WINDOW_MENU_SERVERS_ACCOUNTS": "_Nutzer",
|
||||
"MAIN_WINDOW_MENU_SERVERS_ACCOUNTS_SELECTED": "_Nutzer ({0})",
|
||||
"MAIN_WINDOW_MENU_SERVERS_ACCOUNTS": "_Benutzer",
|
||||
"MAIN_WINDOW_MENU_SERVERS_ACCOUNTS_SELECTED": "_Benutzer ({0})",
|
||||
"MAIN_WINDOW_MENU_SERVERS_ACCOUNTS_MANAGE": "Verwalten",
|
||||
"SESSIONS_MENU_DISCONNECT": "Trennen",
|
||||
"SESSIONS_MENU_DISCONNECT_FROM_ALL": "...von allen",
|
||||
@ -55,12 +55,12 @@
|
||||
"SETTINGS_GENERAL_LOG_LEVEL": "Log Level",
|
||||
"SETTINGS_DOWNLOAD": "Download",
|
||||
"LOGIN_DIALOG_TITLE": "Anmelden - Minosoft",
|
||||
"LOGIN_DIALOG_HEADER": "Bitte gib deine Zugangsdaten ein um fortzufahren",
|
||||
"LOGIN_DIALOG_HEADER": "Bitte gib deine Minecraft Zugangsdaten ein dich anzumelden",
|
||||
"ERROR": "Fehler",
|
||||
"MINOSOFT_STILL_STARTING_TITLE": "Bitte warten",
|
||||
"MINOSOFT_STILL_STARTING_HEADER": "Minosoft braucht noch um zu starten...",
|
||||
"MANAGE_ACCOUNTS_TITLE": "Nutzer verwalten",
|
||||
"MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_TITLE": "Nutzer verwalten",
|
||||
"MINOSOFT_STILL_STARTING_HEADER": "Minosoft muss noch ein paar Dinge erledigen, bevor du es verwenden kannst.\nBitte warte noch ein paar Sekunden...",
|
||||
"MANAGE_ACCOUNTS_TITLE": "Benutzer verwalten",
|
||||
"MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_TITLE": "Benutzer verwalten",
|
||||
"MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_HEADER": "Bist du sicher?",
|
||||
"MANAGE_ACCOUNTS_NO_ACCOUNT_ERROR_ERROR": "Du hast noch keinen Account ausgewählt. Minosoft wird beendet."
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@ -17,7 +17,6 @@
|
||||
"entries": {}
|
||||
},
|
||||
"servers": {
|
||||
"selected": "",
|
||||
"entries": {}
|
||||
},
|
||||
"download": {
|
||||
|
@ -1,16 +1,3 @@
|
||||
"""
|
||||
* Minosoft
|
||||
* Copyright (C) 2020 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
"""
|
||||
|
||||
# Minosoft
|
||||
# Copyright (C) 2020 Moritz Zwerger
|
||||
#
|
||||
@ -21,6 +8,14 @@
|
||||
# You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
|
||||
import os
|
||||
import requests
|
||||
|
@ -1,16 +1,3 @@
|
||||
"""
|
||||
* Minosoft
|
||||
* Copyright (C) 2020 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
"""
|
||||
|
||||
# Minosoft
|
||||
# Copyright (C) 2020 Moritz Zwerger
|
||||
#
|
||||
@ -21,6 +8,14 @@
|
||||
# You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with this program.If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
|
||||
import os
|
||||
import requests
|
||||
|
Loading…
x
Reference in New Issue
Block a user