Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Updating for BTA 7.1 Prerelease 1a #1

Merged
merged 5 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Libraries used in this project are using:
- jBcrypt (MIT): https://github.com/jeremyh/jBCrypt
- halplibe (CC0): https://github.com/Turnip-Labs/bta-halplibe
## Setup
1. Mod to work would require working server instance of Babric BTA server ([available here](https://github.com/Turnip-Labs/babric-instance-repo/releases)) with halplibe version at least 2.1.6 (which was by default included in BTA instance) installed.<br/>
1. Mod to work would require working server instance of Babric BTA server ([available here](https://github.com/Turnip-Labs/babric-instance-repo/releases)) with halplibe version at least 3.2.1 (which was by default included in BTA instance) installed.<br/>
2. Don't forget about read/write privilages on server directory and any other directory specified by config (by default should be available for server but still, this can sometime happen)

## Config
Currently config allows for setting only
- DatabaseManager -specifies which database engine would be used for storing player data (currently only JSON file).
- Address - when specified json dbmanager, Address would point to directory where "database" file would reside.
- Schema - when specified json dbmanager, it would point at name of json file that would store usernames and encrypted passwords.
Modification in json manager mode should by default create required paths and files.
Modification in json manager mode should by default create required paths and files.
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,17 @@ dependencies {
// If you do not need Halplibe you can comment this line out or delete this line
modImplementation "com.github.Turnip-Labs:bta-halplibe:${project.halplibe_version}"

modImplementation "ModMenu:ModMenu:2.0.0"
modImplementation "ModMenu:ModMenu:2.0.3"

implementation 'org.slf4j:slf4j-api:1.7.30'
implementation "org.slf4j:slf4j-api:1.8.0-beta4"
implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0"

implementation 'com.google.guava:guava:30.0-jre'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9'

implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
var log4jVersion = "2.20.0"
implementation("org.apache.logging.log4j:log4j-core:${log4jVersion}")
implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}")
implementation("org.apache.logging.log4j:log4j-1.2-api:${log4jVersion}")
implementation("log4j:apache-log4j-extras:1.2.17")

implementation("org.mindrot:jbcrypt:${project.bcrypt_version}")
include("org.mindrot:jbcrypt:${project.bcrypt_version}")
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
org.gradle.jvmargs=-Xmx2G

# BTA
bta_version=1.7.7.0_02
bta_version=7.1-pre1a

# Loader
loader_version=0.14.19-babric.1-bta
loader_version=0.14.19-babric.3-bta

# HalpLibe
halplibe_version=2.1.6
halplibe_version=3.2.1

#bcrypt
bcrypt_version=0.4

# Mod
mod_version=0.0.1.2
mod_version=0.0.1.3
mod_group=pl.myku
mod_name=simplifiedAuth
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class NetServerHandlerMixin {
private static int timeout = 600;
@Shadow private EntityPlayerMP playerEntity;

@Shadow public abstract void teleportTo(double d, double d1, double d2, float f, float f1);
@Shadow public abstract void teleportAndRotate(double d, double d1, double d2, float f, float f1);

@Shadow private int playerInAirTime;

Expand Down Expand Up @@ -59,7 +59,7 @@ public void handleFlying(Packet10Flying packet, CallbackInfo ci){
}
if(System.nanoTime() >= (teleportTimeout + 5000000L)){
playerInAirTime = 0;
teleportTo(playerEntity.x, playerEntity.y, playerEntity.z, playerEntity.yRot, playerEntity.xRot);
teleportAndRotate(playerEntity.x, playerEntity.y, playerEntity.z, playerEntity.yRot, playerEntity.xRot);
teleportTimeout = System.nanoTime();
timeout--;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package pl.myku.simplifiedAuth.mixin;

import net.minecraft.server.entity.player.EntityPlayerMP;
import net.minecraft.server.net.ServerConfigurationManager;
import net.minecraft.server.net.PlayerList;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import pl.myku.simplifiedAuth.Player;
import pl.myku.simplifiedAuth.SimplifiedAuth;

@Mixin(value = ServerConfigurationManager.class, remap = false)
@Mixin(value = PlayerList.class, remap = false)
final class ServerConfigurationManagerMixin {
@Inject(method="playerLoggedIn", at=@At("TAIL"))
public void onPlayerConnect(EntityPlayerMP player, CallbackInfo ci){
Expand Down
Loading