Skip to content

Commit

Permalink
patch _shoulder tags and a few bits of meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Dec 22, 2021
1 parent e315f15 commit 23b3282
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EntityTeleportScriptEvent extends BukkitScriptEvent implements List
// Note that these causes will only work for player entities.
//
// Additionally, Denizen provides two basic teleport causes for non-player entity teleport events: ENTITY_PORTAL and ENTITY_TELEPORT.
// These additional causes are not usable in <@link command teleport>, and will not show in <@link tag server.teleport_causes>.
// These additional causes are only for <@link event entity teleports>, and thus not usable in <@link command teleport>, and will not show in <@link tag server.teleport_causes>.
// -->

// <--[event]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ public void adjust(Mechanism mechanism) {
// Forcibly removes all plugin tickets from this chunk, usually allowing it to unload.
// This is usually a bad idea.
// @tags
// <ChunkTag.clear_plugin_tickets>
// <ChunkTag.plugin_tickets>
// -->
if (mechanism.matches("clear_plugin_tickets")) {
for (Plugin plugin : new ArrayList<>(getChunk().getPluginChunkTickets())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,11 @@ else if (mtr.angle == BlockFace.EAST) {
if (!(object.getLivingEntity() instanceof HumanEntity)) {
return null;
}
return new EntityTag(((HumanEntity) object.getLivingEntity()).getShoulderEntityLeft()).getDenizenObject();
Entity e = ((HumanEntity) object.getLivingEntity()).getShoulderEntityLeft();
if (e == null) {
return null;
}
return new EntityTag(e).getDenizenObject();
});

// <--[tag]
Expand All @@ -1776,7 +1780,11 @@ else if (mtr.angle == BlockFace.EAST) {
if (!(object.getLivingEntity() instanceof HumanEntity)) {
return null;
}
return new EntityTag(((HumanEntity) object.getLivingEntity()).getShoulderEntityRight()).getDenizenObject();
Entity e = ((HumanEntity) object.getLivingEntity()).getShoulderEntityRight();
if (e == null) {
return null;
}
return new EntityTag(e).getDenizenObject();
});

// <--[tag]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public void adjust(Mechanism mechanism) {
// Example usage to render sections slowly (to reduce server impact):
// <code>
// - repeat 16 as:x:
// - adjust <item[map[map=4]]> full_render:<[value].sub[1].mul[8]>,0,<[value].mul[8]>,128
// - adjust <item[map[map=4]]> full_render:<[x].sub[1].mul[8]>,0,<[x].mul[8]>,128
// - wait 2t
// </code>
// @tags
Expand Down

0 comments on commit 23b3282

Please sign in to comment.