mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Merge branch 'master' of https://github.com/Slimefun/Slimefun4.git
This commit is contained in:
commit
61f0fa5d0d
@ -32,6 +32,7 @@
|
|||||||
* Added Armor Forge Auto-Crafter
|
* Added Armor Forge Auto-Crafter
|
||||||
* Auto-Crafters can now be turned on and off
|
* Auto-Crafters can now be turned on and off
|
||||||
* Added Produce Collector to automate Milk and Mushroom Stew
|
* Added Produce Collector to automate Milk and Mushroom Stew
|
||||||
|
* Added a new message when constructing a Multiblock successfully
|
||||||
* Block Placers can now place down cake
|
* Block Placers can now place down cake
|
||||||
|
|
||||||
#### Changes
|
#### Changes
|
||||||
@ -53,6 +54,7 @@
|
|||||||
* Fixed Auto-Crafters swallowing buckets when crafting cake
|
* Fixed Auto-Crafters swallowing buckets when crafting cake
|
||||||
* Fixed Multimeter not working on Auto-Crafters
|
* Fixed Multimeter not working on Auto-Crafters
|
||||||
* Fixed #2650
|
* Fixed #2650
|
||||||
|
* Fixed Slimefun items applying damage to items with an `unbreakable` tag
|
||||||
|
|
||||||
## Release Candidate 21 (14 Mar 2021)
|
## Release Candidate 21 (14 Mar 2021)
|
||||||
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#21
|
||||||
|
4
pom.xml
4
pom.xml
@ -347,7 +347,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.seeseemelk</groupId>
|
<groupId>com.github.seeseemelk</groupId>
|
||||||
<artifactId>MockBukkit-v1.16</artifactId>
|
<artifactId>MockBukkit-v1.16</artifactId>
|
||||||
<version>0.32.1</version>
|
<version>0.32.2</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
|
|
||||||
<exclusions>
|
<exclusions>
|
||||||
@ -420,7 +420,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.182</version>
|
<version>2.1.183</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
|
||||||
<exclusions>
|
<exclusions>
|
||||||
|
@ -3,7 +3,6 @@ package io.github.thebusybiscuit.slimefun4.core.attributes;
|
|||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -47,7 +46,7 @@ public interface DamageableItem extends ItemAttribute {
|
|||||||
* The {@link ItemStack} to damage
|
* The {@link ItemStack} to damage
|
||||||
*/
|
*/
|
||||||
default void damageItem(@Nonnull Player p, @Nullable ItemStack item) {
|
default void damageItem(@Nonnull Player p, @Nullable ItemStack item) {
|
||||||
if (isDamageable() && item != null && item.getType() != Material.AIR && item.getAmount() > 0) {
|
if (isDamageable() && item != null && !item.getType().isAir() && item.getAmount() > 0) {
|
||||||
int unbreakingLevel = item.getEnchantmentLevel(Enchantment.DURABILITY);
|
int unbreakingLevel = item.getEnchantmentLevel(Enchantment.DURABILITY);
|
||||||
|
|
||||||
if (unbreakingLevel > 0 && Math.random() * 100 <= (60 + Math.floorDiv(40, (unbreakingLevel + 1)))) {
|
if (unbreakingLevel > 0 && Math.random() * 100 <= (60 + Math.floorDiv(40, (unbreakingLevel + 1)))) {
|
||||||
@ -55,14 +54,17 @@ public interface DamageableItem extends ItemAttribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ItemMeta meta = item.getItemMeta();
|
ItemMeta meta = item.getItemMeta();
|
||||||
Damageable damageable = (Damageable) meta;
|
|
||||||
|
|
||||||
if (damageable.getDamage() >= item.getType().getMaxDurability()) {
|
if (!meta.isUnbreakable()) {
|
||||||
p.playSound(p.getEyeLocation(), Sound.ENTITY_ITEM_BREAK, 1, 1);
|
Damageable damageable = (Damageable) meta;
|
||||||
item.setAmount(0);
|
|
||||||
} else {
|
if (damageable.getDamage() >= item.getType().getMaxDurability()) {
|
||||||
damageable.setDamage(damageable.getDamage() + 1);
|
p.playSound(p.getEyeLocation(), Sound.ENTITY_ITEM_BREAK, 1, 1);
|
||||||
item.setItemMeta(meta);
|
item.setAmount(0);
|
||||||
|
} else {
|
||||||
|
damageable.setDamage(damageable.getDamage() + 1);
|
||||||
|
item.setItemMeta(meta);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,11 @@ public class ArmorForge extends AbstractCraftingTable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SlimefunPlugin.getLocalization().sendMessage(p, "machines.pattern-not-found", true);
|
if (inv.isEmpty()) {
|
||||||
|
SlimefunPlugin.getLocalization().sendMessage(p, "machines.inventory-empty", true);
|
||||||
|
} else {
|
||||||
|
SlimefunPlugin.getLocalization().sendMessage(p, "machines.pattern-not-found", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,11 @@ public class EnhancedCraftingTable extends AbstractCraftingTable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SlimefunPlugin.getLocalization().sendMessage(p, "machines.pattern-not-found", true);
|
if (inv.isEmpty()) {
|
||||||
|
SlimefunPlugin.getLocalization().sendMessage(p, "machines.inventory-empty", true);
|
||||||
|
} else {
|
||||||
|
SlimefunPlugin.getLocalization().sendMessage(p, "machines.pattern-not-found", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,11 @@ public class MagicWorkbench extends AbstractCraftingTable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SlimefunPlugin.getLocalization().sendMessage(p, "machines.pattern-not-found", true);
|
if (inv.isEmpty()) {
|
||||||
|
SlimefunPlugin.getLocalization().sendMessage(p, "machines.inventory-empty", true);
|
||||||
|
} else {
|
||||||
|
SlimefunPlugin.getLocalization().sendMessage(p, "machines.pattern-not-found", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ placeholderapi:
|
|||||||
guide:
|
guide:
|
||||||
locked: 'LOCKED'
|
locked: 'LOCKED'
|
||||||
work-in-progress: 'This feature is not fully finished yet!'
|
work-in-progress: 'This feature is not fully finished yet!'
|
||||||
|
|
||||||
locked-category:
|
locked-category:
|
||||||
- 'To unlock this category you will'
|
- 'To unlock this category you will'
|
||||||
- 'need to unlock all items from the'
|
- 'need to unlock all items from the'
|
||||||
@ -64,11 +64,11 @@ guide:
|
|||||||
|
|
||||||
cheat:
|
cheat:
|
||||||
no-multiblocks: '&4You cannot cheat in Multiblocks, you have to build them!'
|
no-multiblocks: '&4You cannot cheat in Multiblocks, you have to build them!'
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
previous: 'Previous page'
|
previous: 'Previous page'
|
||||||
next: 'Next page'
|
next: 'Next page'
|
||||||
|
|
||||||
back:
|
back:
|
||||||
title: 'Back'
|
title: 'Back'
|
||||||
guide: 'Go back to the Slimefun Guide'
|
guide: 'Go back to the Slimefun Guide'
|
||||||
@ -86,11 +86,11 @@ guide:
|
|||||||
- '&7the language in which Slimefun'
|
- '&7the language in which Slimefun'
|
||||||
- '&7will be presented to you. Items'
|
- '&7will be presented to you. Items'
|
||||||
- '&7cannot be translated for now.'
|
- '&7cannot be translated for now.'
|
||||||
|
|
||||||
translations:
|
translations:
|
||||||
name: '&aIs something missing?'
|
name: '&aIs something missing?'
|
||||||
lore: 'Click to add your own translation'
|
lore: 'Click to add your own translation'
|
||||||
|
|
||||||
title:
|
title:
|
||||||
main: 'Slimefun Guide'
|
main: 'Slimefun Guide'
|
||||||
settings: 'Settings & Info'
|
settings: 'Settings & Info'
|
||||||
@ -101,7 +101,7 @@ guide:
|
|||||||
bugs: 'Bug Reports'
|
bugs: 'Bug Reports'
|
||||||
source: 'Source Code'
|
source: 'Source Code'
|
||||||
versions: 'Installed versions'
|
versions: 'Installed versions'
|
||||||
|
|
||||||
credits:
|
credits:
|
||||||
commit: 'Commit'
|
commit: 'Commit'
|
||||||
commits: 'Commits'
|
commits: 'Commits'
|
||||||
@ -193,17 +193,17 @@ messages:
|
|||||||
fail: '&cYou cannot enchant this item.'
|
fail: '&cYou cannot enchant this item.'
|
||||||
no-enchantment: '&cCouldn''t find any applicable enchantment for this item.'
|
no-enchantment: '&cCouldn''t find any applicable enchantment for this item.'
|
||||||
success: '&aYou have successfully applied a random applicable enchantment to this item.'
|
success: '&aYou have successfully applied a random applicable enchantment to this item.'
|
||||||
|
|
||||||
research:
|
research:
|
||||||
start: '&7The Ancient Spirits whisper mysterious words into your ear!'
|
start: '&7The Ancient Spirits whisper mysterious words into your ear!'
|
||||||
progress: '&7You start to wonder about &b%research% &e(%progress%)'
|
progress: '&7You start to wonder about &b%research% &e(%progress%)'
|
||||||
|
|
||||||
tape-measure:
|
tape-measure:
|
||||||
no-anchor: '&cYou need to set an anchor before you can start to measure!'
|
no-anchor: '&cYou need to set an anchor before you can start to measure!'
|
||||||
wrong-world: '&cYour anchor seems to be in a different world!'
|
wrong-world: '&cYour anchor seems to be in a different world!'
|
||||||
distance: '&7Measurement taken. &eDistance: %distance%'
|
distance: '&7Measurement taken. &eDistance: %distance%'
|
||||||
anchor-set: '&aSuccessfully set the anchor:&e %anchor%'
|
anchor-set: '&aSuccessfully set the anchor:&e %anchor%'
|
||||||
|
|
||||||
climbing-pick:
|
climbing-pick:
|
||||||
dual-wielding: '&4You need to hold Climbing Picks in both hands to use them!'
|
dual-wielding: '&4You need to hold Climbing Picks in both hands to use them!'
|
||||||
wrong-material: '&cYou cannot climb this surface. Check your Slimefun Guide for more info!'
|
wrong-material: '&cYou cannot climb this surface. Check your Slimefun Guide for more info!'
|
||||||
@ -217,7 +217,7 @@ messages:
|
|||||||
no-iron-golem-heal: '&cThat is not an Iron Ingot. You cannot use this to heal Iron Golems!'
|
no-iron-golem-heal: '&cThat is not an Iron Ingot. You cannot use this to heal Iron Golems!'
|
||||||
link-prompt: '&eClick here:'
|
link-prompt: '&eClick here:'
|
||||||
diet-cookie: '&eYou are starting to feel very light...'
|
diet-cookie: '&eYou are starting to feel very light...'
|
||||||
|
|
||||||
fortune-cookie:
|
fortune-cookie:
|
||||||
- '&7Help me, I am trapped in a Fortune Cookie Factory!'
|
- '&7Help me, I am trapped in a Fortune Cookie Factory!'
|
||||||
- '&7You will die tomorrow... by a Creeper'
|
- '&7You will die tomorrow... by a Creeper'
|
||||||
@ -243,6 +243,7 @@ machines:
|
|||||||
full-inventory: '&eSorry, my inventory is too full!'
|
full-inventory: '&eSorry, my inventory is too full!'
|
||||||
in-use: '&cThis Block''s inventory is currently opened by a different Player.'
|
in-use: '&cThis Block''s inventory is currently opened by a different Player.'
|
||||||
ignition-chamber-no-flint: '&cIgnition Chamber is missing Flint and Steel.'
|
ignition-chamber-no-flint: '&cIgnition Chamber is missing Flint and Steel.'
|
||||||
|
inventory-empty: '&6You have successfully constructed this Multiblock. Proceed by placing items inside the dispenser and click me again to craft the item you want!'
|
||||||
|
|
||||||
ANCIENT_ALTAR:
|
ANCIENT_ALTAR:
|
||||||
not-enough-pedestals: '&4The Altar is not surrounded by the needed amount of Pedestals &c(%pedestals% / 8)'
|
not-enough-pedestals: '&4The Altar is not surrounded by the needed amount of Pedestals &c(%pedestals% / 8)'
|
||||||
@ -255,7 +256,7 @@ machines:
|
|||||||
HOLOGRAM_PROJECTOR:
|
HOLOGRAM_PROJECTOR:
|
||||||
enter-text: '&7Please enter your desired Hologram Text into your Chat. &r(Color Codes are supported!)'
|
enter-text: '&7Please enter your desired Hologram Text into your Chat. &r(Color Codes are supported!)'
|
||||||
inventory-title: 'Hologram Editor'
|
inventory-title: 'Hologram Editor'
|
||||||
|
|
||||||
ELEVATOR:
|
ELEVATOR:
|
||||||
no-destinations: '&4No destinations found'
|
no-destinations: '&4No destinations found'
|
||||||
pick-a-floor: '&3- Pick a floor -'
|
pick-a-floor: '&3- Pick a floor -'
|
||||||
@ -263,26 +264,26 @@ machines:
|
|||||||
click-to-teleport: '&eClick &7to teleport to this floor:'
|
click-to-teleport: '&eClick &7to teleport to this floor:'
|
||||||
enter-name: '&7Please enter your desired floor name into your Chat. &r(Color Codes are supported!)'
|
enter-name: '&7Please enter your desired floor name into your Chat. &r(Color Codes are supported!)'
|
||||||
named: '&2Successfully named this floor: &r%floor%'
|
named: '&2Successfully named this floor: &r%floor%'
|
||||||
|
|
||||||
TELEPORTER:
|
TELEPORTER:
|
||||||
teleporting: '&3Teleporting...'
|
teleporting: '&3Teleporting...'
|
||||||
teleported: '&3Teleported!'
|
teleported: '&3Teleported!'
|
||||||
cancelled: '&4Teleportation cancelled!'
|
cancelled: '&4Teleportation cancelled!'
|
||||||
invulnerability: '&b&lYou have been given 30 seconds of Invulnerability!'
|
invulnerability: '&b&lYou have been given 30 seconds of Invulnerability!'
|
||||||
|
|
||||||
gui:
|
gui:
|
||||||
title: 'Your waypoints'
|
title: 'Your waypoints'
|
||||||
tooltip: 'Click to teleport'
|
tooltip: 'Click to teleport'
|
||||||
time: 'Estimated time'
|
time: 'Estimated time'
|
||||||
|
|
||||||
GPS_CONTROL_PANEL:
|
GPS_CONTROL_PANEL:
|
||||||
title: 'GPS - Control Panel'
|
title: 'GPS - Control Panel'
|
||||||
transmitters: 'Transmitter Overview'
|
transmitters: 'Transmitter Overview'
|
||||||
waypoints: 'Waypoint Overview'
|
waypoints: 'Waypoint Overview'
|
||||||
|
|
||||||
CARGO_NODES:
|
CARGO_NODES:
|
||||||
must-be-placed: '&4Must be placed onto a chest or machine!'
|
must-be-placed: '&4Must be placed onto a chest or machine!'
|
||||||
|
|
||||||
INDUSTRIAL_MINER:
|
INDUSTRIAL_MINER:
|
||||||
no-fuel: '&cYour Industrial Miner ran out of fuel! Put your fuel into the chest above.'
|
no-fuel: '&cYour Industrial Miner ran out of fuel! Put your fuel into the chest above.'
|
||||||
piston-facing: '&cYour Industrial Miner requires pistons to face upwards!'
|
piston-facing: '&cYour Industrial Miner requires pistons to face upwards!'
|
||||||
@ -292,7 +293,7 @@ machines:
|
|||||||
full-chest: '&cThe Chest of your Industrial Miner is full!'
|
full-chest: '&cThe Chest of your Industrial Miner is full!'
|
||||||
no-permission: '&4You do not seem to have permission to operate an Industrial Miner here!'
|
no-permission: '&4You do not seem to have permission to operate an Industrial Miner here!'
|
||||||
finished: '&eYour Industrial Miner has finished! It obtained a total of %ores% ore(s)!'
|
finished: '&eYour Industrial Miner has finished! It obtained a total of %ores% ore(s)!'
|
||||||
|
|
||||||
anvil:
|
anvil:
|
||||||
not-working: '&4You cannot use Slimefun items in an anvil!'
|
not-working: '&4You cannot use Slimefun items in an anvil!'
|
||||||
mcmmo-salvaging: '&4You cannot salvage Slimefun items!'
|
mcmmo-salvaging: '&4You cannot salvage Slimefun items!'
|
||||||
@ -338,12 +339,12 @@ inventory:
|
|||||||
android:
|
android:
|
||||||
started: '&7Your Android resumed running its script'
|
started: '&7Your Android resumed running its script'
|
||||||
stopped: '&7Your Android has paused its script'
|
stopped: '&7Your Android has paused its script'
|
||||||
|
|
||||||
scripts:
|
scripts:
|
||||||
already-uploaded: '&4This script has already been uploaded.'
|
already-uploaded: '&4This script has already been uploaded.'
|
||||||
editor: 'Script Editor'
|
editor: 'Script Editor'
|
||||||
too-long: '&cThe script is too long to edit!'
|
too-long: '&cThe script is too long to edit!'
|
||||||
|
|
||||||
instructions:
|
instructions:
|
||||||
START: '&2Start Script'
|
START: '&2Start Script'
|
||||||
REPEAT: '&9Repeat Script'
|
REPEAT: '&9Repeat Script'
|
||||||
|
Loading…
Reference in New Issue
Block a user