Merge branch 'master' into 1.17
This commit is contained in:
commit
ede1872803
3 files changed
+6
-3
No files matched your search
@@ -75,7 +75,7 @@ public class ScriptCommand
|
||||
filter(s -> s.startsWith(prefix) && s.length() <= maxLen).map(s -> s+"(").collect(Collectors.toList()));
|
||||
// not that useful in commandline, more so in external scripts, so skipping here
|
||||
if (eventPrefix != null) scarpetMatches.addAll(CarpetEventServer.Event.publicEvents(null).stream().
|
||||
filter(e -> e.name.startsWith(eventPrefix)).map(s -> "__on_"+s+"(").collect(Collectors.toList()));
|
||||
filter(e -> e.name.startsWith(eventPrefix)).map(s -> "__on_"+s.name+"(").collect(Collectors.toList()));
|
||||
scarpetMatches.addAll(host.globaFunctionNames(host.main, s -> s.startsWith(prefix)).map(s -> s+"(").collect(Collectors.toList()));
|
||||
scarpetMatches.addAll(host.globaVariableNames(host.main, s -> s.startsWith(prefix)).collect(Collectors.toList()));
|
||||
return scarpetMatches;
|
||||
|
||||
@@ -364,10 +364,13 @@ public class EntityPlayerActionPack
|
||||
switch (hit.getType()) {
|
||||
case ENTITY: {
|
||||
EntityHitResult entityHit = (EntityHitResult) hit;
|
||||
if (!action.isContinuous)
|
||||
{
|
||||
player.attack(entityHit.getEntity());
|
||||
player.swingHand(Hand.MAIN_HAND);
|
||||
}
|
||||
player.resetLastAttackedTicks();
|
||||
player.updateLastActionTime();
|
||||
player.swingHand(Hand.MAIN_HAND);
|
||||
return true;
|
||||
}
|
||||
case BLOCK: {
|
||||
|
||||
@@ -161,7 +161,7 @@ public class SettingsManager
|
||||
|
||||
/**
|
||||
* Adds a custom rule observer to changes in rules from
|
||||
* <b>any</b> registered {@link SettingsManger} instance.
|
||||
* <b>any</b> registered {@link SettingsManager} instance.
|
||||
* @see SettingsManager#addRuleObserver(TriConsumer)
|
||||
*
|
||||
* @param observer A {@link TriConsumer} that will be called with
|
||||
|
||||
Reference in new issue
Block a user