-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from ModMaker101/development
updating some stuff and adding sneak and 3d unfinished kunai
- Loading branch information
Showing
27 changed files
with
313 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| 1.2.5 | :heavy_check_mark: | | ||
| 1.2.4 | :x: | | ||
| 1.2.3 | :x: | | ||
| Version | Supported | Mc Version Supported | | ||
| ------- | ------------------ |---------| | ||
| 1.2.5.1 | :heavy_check_mark: | 1.20.51 | | ||
| 1.2.5 | :heavy_check_mark: | 1.20.82 | | ||
|
||
Warnings | ||
|
||
- any version before 1.2.4 is not supported | ||
- any version before 1.2.4 is not supported but they work for the older version of minecraft |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"format_version": "1.20.51", | ||
"minecraft:recipe_shaped": { | ||
"description": { | ||
"identifier": "naruto:katana" | ||
}, | ||
"tags": [ | ||
"crafting_table" | ||
], | ||
"pattern": [ | ||
" #A", | ||
"#A#", | ||
"B# " | ||
], | ||
"key": { | ||
"#": { | ||
"item": "minecraft:iron_nugget" | ||
}, | ||
"A": { | ||
"item": "minecraft:iron_ingot" | ||
}, | ||
"B": { | ||
"item": "minecraft:stick" | ||
} | ||
}, | ||
"unlock": [ | ||
{ | ||
"item": "minecraft:air" | ||
} | ||
], | ||
"result": { | ||
"item": "naruto:katana", | ||
"count": 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
{ | ||
"format_version": "1.20.0", | ||
"minecraft:recipe_shaped": { | ||
"description": { | ||
"format_version": "1.20.51", | ||
"minecraft:recipe_shaped": { | ||
"description": { | ||
"identifier": "naruto:ramen" | ||
}, | ||
"tags": [ | ||
"crafting_table" | ||
], | ||
"pattern": [ | ||
"WWW", | ||
"GMG", | ||
" G " | ||
], | ||
"key": { | ||
"W": { | ||
"item": "minecraft:wheat" | ||
}, | ||
|
||
|
||
"tags": [ "crafting_table" ], | ||
"pattern": [ | ||
"WWW", | ||
"GMG", | ||
" G " | ||
], | ||
"key": { | ||
"W": { | ||
"item": "minecraft:wheat" | ||
}, | ||
"G": { | ||
"item": "minecraft:glass" | ||
}, | ||
"M":{ | ||
"item":"minecraft:cooked_beef" | ||
} | ||
"G": { | ||
"item": "minecraft:glass" | ||
}, | ||
"result": { | ||
"item": "naruto:ramen" | ||
"M": { | ||
"item": "minecraft:cooked_beef" | ||
} | ||
}, | ||
"unlock": [ | ||
{ | ||
"item": "minecraft:cooked_beef" | ||
} | ||
], | ||
"result": { | ||
"item": "naruto:ramen" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { world, system } from "@minecraft/server"; | ||
|
||
const ChakraAPI = { | ||
initializePlayerChakra(player, initialChakra = 100) { | ||
const objective = world.scoreboard.getObjective("chakra"); | ||
if (!objective) { | ||
world.scoreboard.addObjective("chakra", "dummy", "Chakra"); | ||
} | ||
player.runCommand(`scoreboard players set @s chakra ${initialChakra}`); | ||
this.updateChakraVisual(player); | ||
console.log(`Initialized chakra for ${player.name}`); | ||
}, | ||
|
||
getPlayerChakra(player) { | ||
const objective = world.scoreboard.getObjective("chakra"); | ||
if (objective) { | ||
return objective.getScore(player.scoreboard); | ||
} | ||
return 0; | ||
}, | ||
|
||
setPlayerChakra(player, amount) { | ||
const objective = world.scoreboard.getObjective("chakra"); | ||
if (objective) { | ||
player.runCommand(`scoreboard players set @s chakra ${amount}`); | ||
this.updateChakraVisual(player); | ||
console.log(`Set chakra for ${player.name} to ${amount}`); | ||
} | ||
}, | ||
|
||
addChakra(player, amount) { | ||
const currentChakra = this.getPlayerChakra(player); | ||
this.setPlayerChakra(player, currentChakra + amount); | ||
}, | ||
|
||
drainChakra(player, amount) { | ||
const currentChakra = this.getPlayerChakra(player); | ||
if (currentChakra >= amount) { | ||
this.setPlayerChakra(player, currentChakra - amount); | ||
return true; | ||
} else { | ||
player.runCommand(`tellraw @s {"rawtext":[{"text":"Not enough chakra!"}]}`); | ||
console.log(`Not enough chakra for ${player.name}`); | ||
return false; | ||
} | ||
}, | ||
|
||
updateChakraVisual(player) { | ||
const currentChakra = this.getPlayerChakra(player); | ||
player.runCommand(`title @s actionbar {"rawtext":[{"text":"Chakra: ${currentChakra}"}]}`); | ||
console.log(`Updated chakra visual for ${player.name} to ${currentChakra}`); | ||
} | ||
}; | ||
|
||
world.afterEvents.playerSpawn.subscribe(event => { | ||
const player = event.player; | ||
system.run(() => { | ||
ChakraAPI.initializePlayerChakra(player); | ||
}); | ||
}); | ||
|
||
export { ChakraAPI }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { system, world } from "@minecraft/server"; | ||
import { ChakraAPI } from "./chakraAPI.js"; | ||
|
||
const updateInterval = 20; // Update every second (20 ticks) | ||
|
||
function updateChakraVisuals() { | ||
for (const player of world.getPlayers()) { | ||
ChakraAPI.updateChakraVisual(player); | ||
} | ||
system.runTimeout(updateChakraVisuals, updateInterval); | ||
} | ||
|
||
// Start the visual update loop | ||
system.runTimeout(updateChakraVisuals, updateInterval); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { world } from "@minecraft/server"; | ||
import { ChakraAPI } from "./chakraAPI.js"; | ||
|
||
// Jutsu handler | ||
const JutsuHandler = { | ||
handleItemUse(event) { | ||
const player = event.source; | ||
const item = event.item; | ||
|
||
switch (item.id) { | ||
case "naruto:fireball_jutsu": | ||
this.useFireballJutsu(player); | ||
break; | ||
// Add more jutsus here | ||
} | ||
}, | ||
|
||
useFireballJutsu(player) { | ||
if (ChakraAPI.drainChakra(player, 20)) { | ||
player.runCommand(`execute as @s run summon naruto:fireball ~ ~1 ~`); | ||
} | ||
} | ||
}; | ||
|
||
world.events.afterItemUse.subscribe(event => JutsuHandler.handleItemUse(event)); | ||
|
||
export { JutsuHandler }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
//js files | ||
import "./serverSide/server.say" | ||
import "./server.say" | ||
//chakra | ||
import { ChakraAPI } from "./chakra/chakraAPI.js"; | ||
import { JutsuHandler } from "./chakra/jutsuHandler.js"; | ||
import "./chakra/chakraVisuals.js"; | ||
|
||
//module for the motd(aka the thank you message) | ||
import { ingMessage } from './serverSide/server.say'; | ||
ChakraAPI.initialize(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { world } from "@minecraft/server"; | ||
|
||
export let ingMessage = "§lThanks For Downloading §2Minecraft Bedrock §eNaruto Mod"; | ||
|
||
// Function to send the message to a player | ||
function sendMessageToPlayer(player) { | ||
player.sendMessage(ingMessage); | ||
} | ||
|
||
// Listen for the playerSpawn event | ||
world.afterEvents.playerSpawn.subscribe((event) => { | ||
sendMessageToPlayer(event.player); | ||
}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"format_version": "1.10.0", | ||
"minecraft:attachable": { | ||
"description": { | ||
"identifier": "naruto:konoha_headband", | ||
"render_controllers": ["controller.render.armor"], | ||
"materials": { | ||
"default": "entity_alphatest", | ||
"enchanted": "entity_alphatest_glint" | ||
}, | ||
"textures": { | ||
"default": "textures/entity/attachable/konoha_headband", | ||
"enchanted": "textures/misc/enchanted_item_glint" | ||
}, | ||
"geometry": { | ||
"default": "geometry.konoha_headband" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.