-
Notifications
You must be signed in to change notification settings - Fork 9
Q&A
Here there is a fantastic place where I answer different questions about particular (and common) situations about how handle restriction in the best way!
Why Block Placing not work?
Block placing for item restrictions has different behaviour. Let's think about all properties: placing in Minecraft is handled after a player right click so you must set also this property to true.
AStages.addRestrictionForItem(...)
.setCanItemBeRightClicked(true)
.setCanBePlaced(true)How can I create a predicate restriction?
With new update (1.1.0), predicates were probably the most changed thing in the whole mod: it's so difficult to synchronise those classes within client and server and obviously tried methods were inefficient at all. To bring a more suitable system you need to create a "model", but what is a model? A model is like a box that contains your predicate and this box needs to be synchronised with client, and, unfortunately, developers have to manually does this. Here's an example.
// server_script -> file.js
'v- name of the model'
AModels.createPredicateModel('astages:rarity', stack => stack.rarity == $Rarity.EPIC) // Class $Rarity imported above!
AStages.addRestrictionForPredicate('astages/predicate', 'stage', 'astages:rarity') '<- use the same name'
// client_script -> file.js
AModels.createPredicateModel('astages:rarity', stack => stack.rarity == $Rarity.EPIC) // Manually copy ONLY this line, model will be inferred automatically.Documentation:
-
Restrictions
- Crop
- Dimension
- Effect
- Enchant
- Item (Old)
- Loot
- Mob
- Ore
- Pet
- Recipe
- Region
- Screen
- Structure -
Addons
- Curios API
- Pufferfish Skill's -
Simple Restrictions (via commands)
Brand new and intuitive way to add restriction! -
Developers
- Plugin
- Restrictions
- Simple Restrictions
- Stage System
- Utils -
Q&A
A place where questions are on the agenda! -
Changelogs
Changelogs since 0.6.0 version! -
What's Happened? (FLOP!)
New code formatting is coming!