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()));
|
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
|
// not that useful in commandline, more so in external scripts, so skipping here
|
||||||
if (eventPrefix != null) scarpetMatches.addAll(CarpetEventServer.Event.publicEvents(null).stream().
|
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.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()));
|
scarpetMatches.addAll(host.globaVariableNames(host.main, s -> s.startsWith(prefix)).collect(Collectors.toList()));
|
||||||
return scarpetMatches;
|
return scarpetMatches;
|
||||||
|
|||||||
@@ -364,10 +364,13 @@ public class EntityPlayerActionPack
|
|||||||
switch (hit.getType()) {
|
switch (hit.getType()) {
|
||||||
case ENTITY: {
|
case ENTITY: {
|
||||||
EntityHitResult entityHit = (EntityHitResult) hit;
|
EntityHitResult entityHit = (EntityHitResult) hit;
|
||||||
|
if (!action.isContinuous)
|
||||||
|
{
|
||||||
player.attack(entityHit.getEntity());
|
player.attack(entityHit.getEntity());
|
||||||
|
player.swingHand(Hand.MAIN_HAND);
|
||||||
|
}
|
||||||
player.resetLastAttackedTicks();
|
player.resetLastAttackedTicks();
|
||||||
player.updateLastActionTime();
|
player.updateLastActionTime();
|
||||||
player.swingHand(Hand.MAIN_HAND);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case BLOCK: {
|
case BLOCK: {
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ public class SettingsManager
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a custom rule observer to changes in rules from
|
* 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)
|
* @see SettingsManager#addRuleObserver(TriConsumer)
|
||||||
*
|
*
|
||||||
* @param observer A {@link TriConsumer} that will be called with
|
* @param observer A {@link TriConsumer} that will be called with
|
||||||
|
|||||||
Reference in new issue
Block a user