mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-10-29 03:41:45 +00:00
Compare commits
4 Commits
b91fa2cf37
...
b12f86a04d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b12f86a04d | ||
|
|
c377544fa2 | ||
|
|
e6c62beed9 | ||
|
|
0424a5dd12 |
@ -1,3 +1,8 @@
|
||||
Version 2.2.041
|
||||
Fixed buckets being consumed by furnaces (thanks RunqRun)
|
||||
Fixed Repair stripping unsafe enchantments from items (thanks Techirion)
|
||||
Fixed IronGolem causing cast exceptions in rare cases (thanks Techirion)
|
||||
|
||||
Version 2.2.040
|
||||
Fixed hover component and action bar messages not working for 1.21.6 and 1.21.7
|
||||
Fixed bug where entries of mctop could be duplicated when using FlatFile
|
||||
|
||||
@ -68,7 +68,7 @@ public class InventoryListener implements Listener {
|
||||
furnaceState instanceof Furnace ? ((Furnace) furnaceState).getInventory()
|
||||
.getSmelting() : null;
|
||||
|
||||
if (!ItemUtils.isSmeltable(smelting)) {
|
||||
if (!ItemUtils.isSmeltable(smelting) || event.getBurnTime() <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -411,7 +411,7 @@ public class RepairManager extends SkillManager {
|
||||
if (enchantLevel > enchant.getKey().getMaxLevel()) {
|
||||
enchantLevel = enchant.getKey().getMaxLevel();
|
||||
|
||||
item.addEnchantment(enchant.getKey(), enchantLevel);
|
||||
item.addUnsafeEnchantment(enchant.getKey(), enchantLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ public class SmeltingManager extends SkillManager {
|
||||
* @param burnTime The initial burn time from the {@link FurnaceBurnEvent}
|
||||
*/
|
||||
public int fuelEfficiency(int burnTime) {
|
||||
if (burnTime <= 0) return 0;
|
||||
return Math.min(Short.MAX_VALUE, Math.max(1, burnTime * getFuelEfficiencyMultiplier()));
|
||||
}
|
||||
|
||||
|
||||
@ -961,8 +961,8 @@ public final class CombatUtils {
|
||||
EntityType type = target.getType();
|
||||
|
||||
if (ExperienceConfig.getInstance().hasCombatXP(type)) {
|
||||
if (type == EntityType.IRON_GOLEM) {
|
||||
if (!((IronGolem) target).isPlayerCreated()) {
|
||||
if (type == EntityType.IRON_GOLEM && target instanceof IronGolem ironGolem) {
|
||||
if (!ironGolem.isPlayerCreated()) {
|
||||
baseXP = ExperienceConfig.getInstance().getCombatXP(type);
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user