Skip to content

Commit

Permalink
V2.2.0-beta
Browse files Browse the repository at this point in the history
Added chest gui new invensee and so much more, so excited about this update go download! NOTE: this comes with a resource pack now!
  • Loading branch information
smell-of-curry committed Sep 15, 2022
1 parent f334626 commit d47b19e
Show file tree
Hide file tree
Showing 53 changed files with 1,568 additions and 48 deletions.
139 changes: 139 additions & 0 deletions entities/inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"format_version": "1.17.10",
"minecraft:entity": {
"description": {
"identifier": "rubedo:inventory",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"despawn": {
"minecraft:instant_despawn": {},
"minecraft:explode": {}
},
"size:27": {
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 27,
"restrict_to_owner": true
}
},
"size:36": {
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 36,
"restrict_to_owner": true
}
},
"size:45": {
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 45,
"restrict_to_owner": true
}
},
"size:54": {
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 54,
"restrict_to_owner": true
}
},
"size:81": {
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 81,
"restrict_to_owner": true
}
},
"size:108": {
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 108,
"restrict_to_owner": true
}
}
},
"components": {
"minecraft:collision_box": {
"width": 1,
"height": 2
},
"minecraft:movement": {
"value": 0
},
"minecraft:pushable": {
"is_pushable": false,
"is_pushable_by_piston": false
},
"minecraft:conditional_bandwidth_optimization": {},
"minecraft:inventory": {
"container_type": "inventory",
"inventory_size": 54,
"restrict_to_owner": true
},
"minecraft:damage_sensor": {
"triggers": {
"cause": "all",
"deals_damage": false
}
},
"minecraft:fire_immune": true,
"minecraft:tameable": true,
"minecraft:health": {
"value": 999999,
"min": 1
}
},
"events": {
"minecraft:on_tame": {},
"despawn": {
"add": {
"component_groups": ["despawn"]
}
},
"size:reset": {
"remove": {
"component_groups": [
"size:27",
"size:36",
"size:54",
"size:81",
"size:108"
]
}
},
"size:27": {
"trigger": "size:reset",
"add": {
"component_groups": ["size:27"]
}
},
"size:36": {
"trigger": "size:reset",
"add": {
"component_groups": ["size:36"]
}
},
"size:54": {
"trigger": "size:reset",
"add": {
"component_groups": ["size:54"]
}
},
"size:81": {
"trigger": "size:reset",
"add": {
"component_groups": ["size:81"]
}
},
"size:108": {
"trigger": "size:reset",
"add": {
"component_groups": ["size:108"]
}
}
}
}
}
41 changes: 39 additions & 2 deletions entities/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,19 @@
}
},
"component_groups": {
"rubedo:spawn_inventory": {
"minecraft:spawn_entity": {
"entities": {
"min_wait_time": 0,
"max_wait_time": 0,
"spawn_entity": "rubedo:tamed_inventory",
"single_use": true,
"num_to_spawn": 1
}
}
},
"kick": {
"minecraft:instant_despawn": {},
"minecraft:explode": {}
"minecraft:instant_despawn": {}
},
"spectator": {
"minecraft:scale": {
Expand Down Expand Up @@ -221,11 +231,38 @@
]
},
"event": "minecraft:trigger_raid"
},
{
"filters": {
"all_of": [
{
"test": "has_container_open"
}
]
},
"event": "rubedo:has_container_open"
},
{
"filters": {
"none_of": [
{
"test": "has_container_open"
}
]
},
"event": "rubedo:dosent_have_container_open"
}
]
}
},
"events": {
"rubedo:spawn_inventory": {
"add": {
"component_groups": ["rubedo:spawn_inventory"]
}
},
"rubedo:has_container_open": {},
"rubedo:dosent_have_container_open": {},
"kick": {
"add": {
"component_groups": ["kick"]
Expand Down
19 changes: 19 additions & 0 deletions entities/tamed_inventory.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"format_version": "1.16.0",
"minecraft:entity": {
"description": {
"identifier": "rubedo:tamed_inventory",
"runtime_identifier": "minecraft:arrow",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"components": {
"minecraft:projectile": {},
"minecraft:transformation": {
"into": "rubedo:inventory<minecraft:on_tame>",
"keep_owner": true
}
}
}
}
28 changes: 28 additions & 0 deletions items/gui.item.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"format_version": "1.18.0",
"minecraft:item": {
"description": {
"identifier": "rubedo:gui"
},
"components": {
"minecraft:max_stack_size": 1,
"minecraft:allow_off_hand": true,
"minecraft:foil": true,
"minecraft:icon": {
"texture": "diamond"
},
"minecraft:display_name": {
"value": "§b§lSTAFF GUI§r\n§eRight Click Me"
},
"minecraft:on_use": {
"on_use": {
"event": "rubedo:on_use"
}
},
"minecraft:cooldown": {
"category": "gui",
"duration": 0.1
}
}
}
}
19 changes: 12 additions & 7 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"header": {
"name": "pack.name",
"description": "pack.description",
"min_engine_version": [1, 19, 21],
"uuid": "49ec0e4e-5298-4e5d-925c-f77c3e102bf3",
"version": [2, 1, 0]
"min_engine_version": [1, 19, 0],
"uuid": "0c4794b4-7716-412f-a5b7-4d3f4bf3b272",
"version": [2, 2, 0]
},
"modules": [
{
"description": "Data Module",
"type": "data",
"uuid": "8ef59134-13b5-4b33-86da-0130e5bfb98e",
"version": [2, 1, 0]
"uuid": "66f7cb14-8ed2-462a-ae50-2531eb197e48",
"version": [2, 2, 0]
},
{
"description": "Gametest Module",
"language": "javascript",
"type": "script",
"uuid": "077b2f11-fb75-4465-81ad-08e8d32e0192",
"version": [2, 1, 0],
"uuid": "452406a4-cfd5-4519-83b9-650278ae9866",
"version": [2, 2, 0],
"entry": "scripts/index.js"
}
],
Expand All @@ -38,6 +38,11 @@
"description": "mojang-minecraft-ui module",
"uuid": "2bd50a27-ab5f-4f40-a596-3641627c635e",
"version": "1.0.0-beta"
},
{
"description": "This requires the Rubedo Resource pack",
"uuid": "aa7d1d5d-aed3-44e1-9672-ed762d38d189",
"version": [1, 0, 0]
}
],
"metadata": {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"name": "rubedo",
"description": "Welcome to Rubedo, Rubedo is a brand new Anti-cheat designed for Realms, Servers, Worlds and anyone who wants to protect there worlds from Hackers! Rubedo Uses Minecrafts Most advanced functionality so that includes Gametest.",
"version": "2.1.0",
"version": "2.2.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
45 changes: 45 additions & 0 deletions scripts/config/chest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
|--------------------------------------------------------------------------
| Gui item
|--------------------------------------------------------------------------
|
| This is the GUI item that is used to open up the gui
| this is set to the identifer of item.json and is used to find the item
| in the gui template
|
*/
export const GUI_ITEM = "rubedo:gui";

/*
|--------------------------------------------------------------------------
| Entity Inventory
|--------------------------------------------------------------------------
|
| The id of the entity inventory
| this is found in the entities file
| this will be updated if inventory entity is changed
|
*/
export const ENTITY_INVENTORY = "rubedo:inventory";

/*
|--------------------------------------------------------------------------
| Default Static Page id
|--------------------------------------------------------------------------
|
| This is the default static page id of what is open by default
| when you click on the gui, this can be changed but it probably shouldnt
| because static pages will need to be changed
|
*/
export const DEFAULT_STATIC_PAGE_ID = "home";

/*
|--------------------------------------------------------------------------
| Pages
|--------------------------------------------------------------------------
|
| These are the pages that are loaded in this
|
*/
export const PAGES = ["see"];
9 changes: 9 additions & 0 deletions scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { setTickInterval } from "./lib/Scheduling/utils.js";
import { PROTECTIONS } from "./config/protections";
import { MANAGERS } from "./config/managers";
import { COMMANDS } from "./config/commands";
import { PAGES } from "./config/chest";

/**
* All the Database tables that are created
Expand Down Expand Up @@ -90,3 +91,11 @@ for (const command of TABLES.config.get("commands") ?? COMMANDS) {
}

import "./lib/Commands/index.js";

import "./lib/Chest GUI/index.js";

for (const page of PAGES) {
import(`./modules/pages/${page}.js`).catch((error) => {
console.warn(`Error on Loading Page ${page}: ` + error + error.stack);
});
}
8 changes: 8 additions & 0 deletions scripts/lang/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ export const text = {
`The type ${a} is not a valid type, Vaild types: ${JSON.stringify(b)}`;
},
"api.ChestGUI.error.pagenotfound": (a) => `Page ${a} not found!`,
"modules.protections.cps.clickingToFast": () =>
`You are clicking to fast! Please click slower!`,
"modules.managers.mute.isMuted": () =>
`You are muted and cannot send messages please try again later`,
"modules.commands.ban.reply": (playerName, length, unit, reason) =>
`§cBanned §f"§a${playerName}§f" §cfor ${length} ${unit} Because: "${
reason ?? "No reason Provided"
}" §aSuccessfully`,
};
Loading

0 comments on commit d47b19e

Please sign in to comment.