Skip to content

Commit

Permalink
Version 0.1.0 - Build For Preview, Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelDobCZ23 committed Dec 14, 2022
0 parents commit cfe5141
Show file tree
Hide file tree
Showing 6 changed files with 757 additions and 0 deletions.
688 changes: 688 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

Binary file added On Campfire - On Fire Pack Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"metadata": {
"authors": ["PavelDobCZ23"],
"license": "GNU GPL v3 + The Commons Clause",
"url": "https://www.icecraftstudio.repl.co"
},
"format_version": 2,
"header": {
"description": "Campfires now set you and the entites on fire like they've used to! §9Made by PavelDobCZ23",
"name": "On Campfire - On Fire",
"uuid": "03862db4-c4b9-42e1-b57b-daf391a5a05a",
"version": [ 0, 1, 0 ],
"min_engine_version": [ 1, 19, 60 ]
},
"modules": [
{
"description": "On Campfire - On Fire [BP] - data module",
"type": "data",
"uuid": "2d602755-1a04-49fc-995c-0fb98b62a494",
"version": [0, 1, 0]
},
{
"description": "On Campfire - On Fire [BP] - script module",
"type": "script",
"language": "javascript",
"uuid": "514c9ddc-fd40-4189-9b10-bfc358089a33",
"version": [0, 1, 0],
"entry": "scripts/main.js"
}
],
"dependencies": [
{
"module_name": "@minecraft/server",
"version": "1.1.0-beta"
}
],
"subpacks": [
{
"folder_name": "performance",
"name": "§aPerformance Mode",
"memory_tier": 0
},
{
"folder_name": "normal",
"name": "Normal Mode",
"memory_tier": 0
}
]
}
16 changes: 16 additions & 0 deletions scripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { system, world, BlockLocation } from '@minecraft/server';
import { scheduledTicks } from './config/config';
const DIMENSION_LIST = ['minecraft:overworld','minecraft:nether','minecraft:the_end'];

system.runSchedule(() => {
for (let index = 0;index < DIMENSION_LIST.length;index++) {
const dimension = world.getDimension(DIMENSION_LIST[index]);
for (const entity of dimension.getEntities()) {
try {
const blockLocation = new BlockLocation(Math.floor(entity.location.x),Math.floor(entity.location.y),Math.floor(entity.location.z));
const blockStandingIn = dimension.getBlock(blockLocation);
if (blockStandingIn?.typeId === 'minecraft:campfire') entity.setOnFire(8);
} catch {}
}
}
},scheduledTicks);
2 changes: 2 additions & 0 deletions subpacks/normal/scripts/config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const scheduledTicks = 4;
export { scheduledTicks }
2 changes: 2 additions & 0 deletions subpacks/performance/scripts/config/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const scheduledTicks = 20;
export { scheduledTicks }

0 comments on commit cfe5141

Please sign in to comment.