Skip to content

Commit

Permalink
Update java and node versions (#79)
Browse files Browse the repository at this point in the history
* Update java and node versions

* add wait in triggerMap
  • Loading branch information
rom1504 authored Dec 29, 2023
1 parent 2d6585a commit 6da2bfb
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
node-version: 18.x
- run: npm install
- run: npm test

Expand All @@ -36,10 +32,11 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/setup-java@v1
node-version: 18.x
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 1.8
java-version: 17
java-package: jre
- run: npm install
- name: Use Dumper
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 18.x
- name: Download artifact
uses: dawidd6/action-download-artifact@v2
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pr-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/setup-java@v1
node-version: 18.x
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 1.8
java-version: 17
java-package: jre
- run: npm install
- name: Use Dumper
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 10.0.0
node-version: 18.x
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@4f4bf159e299f65d21cd1cbd96fc5d53228036df
with: # All of theses inputs are optional
Expand Down
8 changes: 4 additions & 4 deletions bin/clientProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const srv = createServer({
'online-mode': false,
port: 25566,
keepAlive: false,
version: version
version
})
srv.on('login', function (client) {
const addr = client.socket.remoteAddress
Expand All @@ -62,11 +62,11 @@ srv.on('login', function (client) {
if (!endedTargetClient) { targetClient.end('Error') }
})
const targetClient = createClient({
host: host,
port: port,
host,
port,
username: client.username,
keepAlive: false,
version: version
version
})
const fromServKindCounter = {}
const fromServKindPromise = {}
Expand Down
1 change: 1 addition & 0 deletions lib/generate-packets.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ async function triggerMap (server, bot, mcData) {
const mapRecieved = once(bot.inventory, 'updateSlot')
server.writeServer(`give ${bot.username} map\n`)
await mapRecieved
await wait(500)
const map = once(bot._client, 'map')
bot.equip(bot.inventory.slots.find(x => x?.name === 'map'), 'hand')
bot.activateItem()
Expand Down

0 comments on commit 6da2bfb

Please sign in to comment.