MCPcopy Create free account
hub / github.com/demoth/jake2 / buildEntityInfo

Method buildEntityInfo

game/src/main/java/jake2/game/GameWeapon.java:95–110  ·  view source on GitHub ↗
(SubgameEntity other)

Source from the content-addressed store, hash-verified

93 };
94
95 public static String buildEntityInfo(SubgameEntity other) {
96 final StringBuilder result = new StringBuilder("Classname: " + other.classname);
97 appendIfNonNull(result, "Index", other.index);
98 appendIfNonNull(result, "Target", other.target);
99 appendIfNonNull(result, "Targetname", other.targetname);
100 appendIfNonNull(result, "Use", other.use);
101 appendIfNonNull(result, "Die", other.die);
102 appendIfNonNull(result, "Blocked", other.blocked);
103 appendIfNonNull(result, "Touch", other.touch);
104 appendIfNonNull(result, "Pain", other.pain);
105 appendIfNonNull(result, "Kill target", other.killtarget);
106 appendIfNonNull(result, "Death target", other.deathtarget);
107 appendIfNonNull(result, "Combat target", other.combattarget);
108 appendIfNonNull(result, "Activator", other.activator);
109 return result.toString();
110 }
111
112 private static void appendIfNonNull(StringBuilder result, String name, Object o) {
113 if (o != null) {

Callers 2

touchMethod · 0.95
printEntityInfoMethod · 0.80

Calls 2

appendIfNonNullMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected