Skip to content

Commit

Permalink
Fixed issue with soft-locked level data after dimension change, causi…
Browse files Browse the repository at this point in the history
…ng high delays for the level loading / saving.
  • Loading branch information
MarkusBordihn committed Dec 7, 2023
1 parent 40e5133 commit 6ba3e78
Show file tree
Hide file tree
Showing 28 changed files with 3,520 additions and 3,192 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,7 +25,8 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Debugging**
Before reporting a issue please check if there is anything relevant in the crash-reports, debug.log and latest.log file.
Before reporting a issue please check if there is anything relevant in the crash-reports, debug.log
and latest.log file.

**Is the issue happening in combination with other mods? (If yes, please provide a full list)**

Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,34 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
20 changes: 10 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
java-version: '16'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@
This change log includes the summarized changes.
For the full changelog, please go to the [Git Hub History][history] instead.

### 7.10.0

- Fixed issue with soft-locked level data after dimension change, causing high delays for the level
loading / saving.

### 2023.11.28

- Added `companionLimitPerPlayer` option to limit the number of tamed companions per player on multiplayer servers.
- Added `companionLimitPerPlayer` option to limit the number of tamed companions per player on
multiplayer servers.

### 2023.11.19

- Added additional checks for tamed player companions items to make sure they are not getting lost with specific inventory mods.
- Added additional checks for tamed player companions items to make sure they are not getting lost
with specific inventory mods.
- Added basic German translation.

### 2023.10.12
Expand All @@ -20,7 +27,8 @@ For the full changelog, please go to the [Git Hub History][history] instead.

### 2023.10.11

- Added advancements for player companions from crafting the tame items to taming the different companion.
- Added advancements for player companions from crafting the tame items to taming the different
companion.
- Added automated recipe granting and notification for tame items.
- Added help text for untamed companions for the right tame item.
- Improved network performance for player companions.
Expand Down Expand Up @@ -98,7 +106,8 @@ For the full changelog, please go to the [Git Hub History][history] instead.

### 2022.07.22

- Added better compatibility with twitchspawn to allow directly spawn of companions with pre-define names.
- Added better compatibility with twitchspawn to allow directly spawn of companions with pre-define
names.
- Removed duplicated storing of companion name and will use the standard custom name instead.
- Added additional goal to let untamed companions more moving around the world.

Expand Down Expand Up @@ -155,6 +164,7 @@ For the full changelog, please go to the [Git Hub History][history] instead.

### 2022.04.20

- Optimized network protocols to avoid large package message, even with 100 companions on a single player.
- Optimized network protocols to avoid large package message, even with 100 companions on a single
player.

[history]: https://github.com/MarkusBordihn/BOs-Player-Companions/commits/
18 changes: 14 additions & 4 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# License

**The license applies only to the code in this repository. Images, models and other assets are explicitly excluded.**
**The license applies only to the code in this repository. Images, models and other assets are
explicitly excluded.**

## MIT License

Copyright 2021 Markus Bordihn

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66 changes: 45 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ You can access the inventory like a normal chest.

### Companion (wip)

The companion is a combination of the collector, follower and guard and has some additional features like text lines.
The companion is a combination of the collector, follower and guard and has some additional features
like text lines.

### Follower

Expand All @@ -44,7 +45,8 @@ Equip your guard with weapons and armor to deal more damage and to have a better
### Healer

The healer companion heals any player and your own companions in a specific radius.
Additional healer will stack up the effect, so if you are traveling with your friends it good to have 1-2 healers in the group.
Additional healer will stack up the effect, so if you are traveling with your friends it good to
have 1-2 healers in the group.

### Supporter

Expand All @@ -53,19 +55,23 @@ Additional supporter will not stack up, but they will be able to buff the whole

## Spawn

The player companions are automatically spawned in specific biomes, but could be also spawned over the specific items in the creative mode.
The player companions are automatically spawned in specific biomes, but could be also spawned over
the specific items in the creative mode.

## Tame Items

Tame items are needed to tame the different kind of companions.
Each player companion prefer a specific tame item, in most cases you need several tame items to tame a player companion.
Each player companion prefer a specific tame item, in most cases you need several tame items to tame
a player companion.

## Controls

Most of the companions could be controlled with the following controls:

- **ALT + Right Click** (on Player Companion with empty Hand or Weapon) Change Aggressive status like passive, neutral, aggressive
- **CTRL + Right Click** (on Player Companion with empty Hand or Weapon) Order to sit / un-order to sit
- **ALT + Right Click** (on Player Companion with empty Hand or Weapon) Change Aggressive status
like passive, neutral, aggressive
- **CTRL + Right Click** (on Player Companion with empty Hand or Weapon) Order to sit / un-order to
sit
- **Right Click** (on Collector with empty hand or normal Block) Open the companion inventory
- **Right Click** (on Player Companion with empty hand or normal Block) Open the companion menu
- **Right Click** (with Player Companion Item on Companion) Despawn/Spawn the companion
Expand All @@ -74,19 +80,23 @@ Most of the companions could be controlled with the following controls:

### Order to a specific position

Click with the corresponding item on the desired position and your companion will move or teleport to this position.
Click with the corresponding item on the desired position and your companion will move or teleport
to this position.

### Spawn / Respawn Companion

With the corresponding item, you can spawn / respawn your companion at any time with just a simple click on an empty space.
With the corresponding item, you can spawn / respawn your companion at any time with just a simple
click on an empty space.

### Despawn Companion

With the corresponding item, you can de-spawn your companion at any time. Just click with the right item on the spawned companion.
With the corresponding item, you can de-spawn your companion at any time. Just click with the right
item on the spawned companion.

## Compatible Mods

Most of the should be supported out of the box, but this is a list of mods which I personally tested and working fine with this mod:
Most of the should be supported out of the box, but this is a list of mods which I personally tested
and working fine with this mod:

-[Guard Villagers][guard-villagers]
-[Human Companions][human_companions]
Expand All @@ -98,13 +108,16 @@ I'm not able to test all different kind of mod combinations or mod packs.

## Type of Companions

There are different kind of companions which have different abilities and are living in different biomes.
There are different kind of companions which have different abilities and are living in different
biomes.
You can find a list of all companions and their corresponding tame items below.

### Dobutsu

The Dobutsu is a quick-change artist and can mimic the appearance of other players, even if their form will remain the same.
Open the menu of a captured Dobutsu and click on **Texture Settings** to adjust the skin and the Dobutsu will try to mimic the player.
The Dobutsu is a quick-change artist and can mimic the appearance of other players, even if their
form will remain the same.
Open the menu of a captured Dobutsu and click on **Texture Settings** to adjust the skin and the
Dobutsu will try to mimic the player.

![Example image with dobutsu](examples/dobutsu.png)

Expand All @@ -113,7 +126,8 @@ They live in the open fields and like eating sweet berries.
### Fairies

The fairy is magical create and has different kind of abilities.
They will heal you and your group along your journey but will also learn new abilities from time to time.
They will heal you and your group along your journey but will also learn new abilities from time to
time.

![Example image with fairies](examples/fairies.png)

Expand Down Expand Up @@ -174,7 +188,8 @@ They live in the mountains and like eating healthy apples.

### Small Ghasts

Small Ghast are not easy to catch, but once you became friend with one he will protect you for the rest of his live.
Small Ghast are not easy to catch, but once you became friend with one he will protect you for the
rest of his live.
They will shoot small fireballs to your targets and some hostile mob as well.

![Example image with small ghasts](examples/small_ghasts.png)
Expand All @@ -201,7 +216,8 @@ They live at the beach and like eating sea grass.

### Welsh Corgis

Welsh Corgi are will support you and other companions and players with their present and additional effects.
Welsh Corgi are will support you and other companions and players with their present and additional
effects.
Depending on the level they will give different kind of effects to the player.

![Example image with welsh corgis](examples/welsh_corgis.png)
Expand All @@ -212,12 +228,14 @@ They live in the taiga and like eating bones like any other dogs.

### I lost my companion item, is there are way to get it back❓

The easiest way is to get the identical (same type/variant) Player Companion Item (over creative mode or `/give command`) and just clicking on the corresponding player companion to link it.
The easiest way is to get the identical (same type/variant) Player Companion Item (over creative
mode or `/give command`) and just clicking on the corresponding player companion to link it.
Please keep in mind that only the owner is able to link a player companion to an item.

### I lost my companion, is there are way to summon it❓

The easiest way is to use your Player Companion Item or alternative over the `/player_companions summon` command.
The easiest way is to use your Player Companion Item or alternative over
the `/player_companions summon` command.

## Version Status Overview 🛠️

Expand All @@ -234,17 +252,23 @@ The easiest way is to use your Player Companion Item or alternative over the `/p

## License

The MIT [LICENSE.md](LICENSE.md) applies only to the code in this repository. Images, models and other assets are explicitly excluded.
The MIT [LICENSE.md](LICENSE.md) applies only to the code in this repository. Images, models and
other assets are explicitly excluded.

## Note

Please only download the mod from the official CurseForge page or with the official CurseForge launcher like:
Please only download the mod from the official CurseForge page or with the official CurseForge
launcher like:

🚀 <https://www.curseforge.com/minecraft/mc-mods/player-companions>

If you are downloading this mod from other sources we could not make sure that it works as expected or does not includes any unwanted modification (e.g. adware, malware, ...).
If you are downloading this mod from other sources we could not make sure that it works as expected
or does not includes any unwanted modification (e.g. adware, malware, ...).

[guard-villagers]: https://www.curseforge.com/minecraft/mc-mods/guard-villagers

[human_companions]: https://www.curseforge.com/minecraft/mc-mods/human-companions

[morevanillaarmor]: https://www.curseforge.com/minecraft/mc-mods/morevanillaarmor

[scaling-health]: https://www.curseforge.com/minecraft/mc-mods/scaling-health
Loading

0 comments on commit 6ba3e78

Please sign in to comment.