Commits

Senmori authored and md_5 committed 494bb508ace
Add missing PistonMoveReactions.
No tags

src/main/java/org/bukkit/block/PistonMoveReaction.java

Modified
1 1 package org.bukkit.block;
2 2
3 3 import java.util.HashMap;
4 4 import java.util.Map;
5 5
6 +/**
7 + * Represents how a block or entity will react when interacting with a piston
8 + * when it is extending or retracting.
9 + */
6 10 public enum PistonMoveReaction {
7 11
8 12 /**
9 13 * Indicates that the block can be pushed or pulled.
10 14 */
11 15 MOVE(0),
12 16 /**
13 17 * Indicates the block is fragile and will break if pushed on.
14 18 */
15 19 BREAK(1),
16 20 /**
17 21 * Indicates that the block will resist being pushed or pulled.
18 22 */
19 - BLOCK(2);
23 + BLOCK(2),
24 + /**
25 + * Indicates that the entity will ignore any interaction(s) with
26 + * pistons.
27 + * <br>
28 + * Blocks should use {@link PistonMoveReaction#BLOCK}.
29 + */
30 + IGNORE(3),
31 + /**
32 + * Indicates that the block can only be pushed by pistons, not pulled.
33 + */
34 + PUSH_ONLY(4);
20 35
21 36 private int id;
22 37 private static Map<Integer, PistonMoveReaction> byId = new HashMap<Integer, PistonMoveReaction>();
23 38 static {
24 39 for (PistonMoveReaction reaction : PistonMoveReaction.values()) {
25 40 byId.put(reaction.id, reaction);
26 41 }
27 42 }
28 43
29 44 private PistonMoveReaction(int id) {

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut