@@ -185,7 +185,7 @@ public CArray location(MCLocation l, boolean includeYawAndPitch) {
185185 * @param c
186186 * @param w
187187 * @param t
188- * @return
188+ * @return
189189 * @deprecated Use {@link #location(Mixed, MCWorld, Target, Environment)} instead.
190190 */
191191 @ Deprecated
@@ -199,11 +199,12 @@ public MCLocation location(Mixed c, MCWorld w, Target t) {
199199 * 4 usages: <ul> <li>(x, y, z)</li> <li>(x, y, z, world)</li> <li>(x, y, z, yaw, pitch)</li> <li>(x, y, z, world,
200200 * yaw, pitch)</li> </ul> In all cases, the pitch and yaw default to 0, and the world defaults to the specified
201201 * world. <em>More conveniently: ([world], x, y, z, [yaw, pitch])</em>
202+ *
202203 * @param c
203204 * @param w
204205 * @param t
205206 * @param env
206- * @return
207+ * @return
207208 */
208209 public MCLocation location (Mixed c , MCWorld w , Target t , Environment env ) {
209210 if (!(c .isInstanceOf (CArray .TYPE , null , env ))) {
@@ -282,33 +283,16 @@ public MCLocation location(Mixed c, MCWorld w, Target t, Environment env) {
282283 * @param is
283284 * @param t
284285 * @return An item array or CNull
285- * @deprecated Use {@link #item(MCItemStack, Target, Environment)} instead.
286286 */
287- @ Deprecated
288287 public Construct item (MCItemStack is , Target t ) {
289- return item (is , t , null );
290- }
291-
292- /**
293- * An Item Object consists of data about a particular item stack. Information included is: recipeType, data, qty,
294- * and an array of enchantment objects (labeled enchants): erecipeType (enchantment recipeType) and elevel
295- * (enchantment level). For backwards compatibility, this information is also listed in numerical slots as well as
296- * associative slots. If the MCItemStack is null, or the underlying item is nonexistant (or air) CNull is returned.
297- *
298- * @param is
299- * @param t
300- * @param env
301- * @return An item array or CNull
302- */
303- public Construct item (MCItemStack is , Target t , Environment env ) {
304288 if (is == null || is .isEmpty ()) {
305289 return CNull .NULL ;
306290 }
307291
308- CArray ret = CArray .GetAssociativeArray (t , null , env );
309- ret .set ("name" , new CString (is .getType ().getName (), t ), t , env );
310- ret .set ("qty" , new CInt (is .getAmount (), t ), t , env );
311- ret .set ("meta" , itemMeta (is , t ), t , env );
292+ CArray ret = CArray .GetAssociativeArray (t , null , null );
293+ ret .set ("name" , new CString (is .getType ().getName (), t ), t , null );
294+ ret .set ("qty" , new CInt (is .getAmount (), t ), t , null );
295+ ret .set ("meta" , itemMeta (is , t ), t , null );
312296 return ret ;
313297 }
314298
@@ -333,7 +317,7 @@ public MCItemStack item(Mixed i, Target t, Environment env) {
333317 * @param i
334318 * @param t
335319 * @param legacy
336- * @return
320+ * @return
337321 * @deprecated Use {@link #item(Mixed, Target, boolean, Environment)} instead.
338322 */
339323 @ Deprecated
@@ -420,9 +404,12 @@ public MCItemStack item(Mixed i, Target t, boolean legacy, Environment env) {
420404 MCMaterial newmaterial ;
421405 String entityName = spawntype .val ().toUpperCase ();
422406 newmaterial = switch (entityName ) {
423- case "MUSHROOM_COW" -> StaticLayer .GetMaterial ("MOOSHROOM_SPAWN_EGG" );
424- case "PIG_ZOMBIE" -> StaticLayer .GetMaterial ("ZOMBIE_PIGMAN_SPAWN_EGG" );
425- default -> StaticLayer .GetMaterial (entityName + "_SPAWN_EGG" );
407+ case "MUSHROOM_COW" ->
408+ StaticLayer .GetMaterial ("MOOSHROOM_SPAWN_EGG" );
409+ case "PIG_ZOMBIE" ->
410+ StaticLayer .GetMaterial ("ZOMBIE_PIGMAN_SPAWN_EGG" );
411+ default ->
412+ StaticLayer .GetMaterial (entityName + "_SPAWN_EGG" );
426413 };
427414 if (newmaterial != null ) {
428415 material = newmaterial ;
@@ -2215,7 +2202,7 @@ public CArray enchants(Map<MCEnchantment, Integer> map, Target t) {
22152202 /**
22162203 * @param enchantArray
22172204 * @param t
2218- * @return
2205+ * @return
22192206 * @deprecated Use {@link #enchants(CArray, Target, Environment)} instead.
22202207 */
22212208 @ Deprecated
@@ -2293,7 +2280,7 @@ public CArray attributeModifier(MCAttributeModifier m, Target t) {
22932280 /**
22942281 * @param m
22952282 * @param t
2296- * @return
2283+ * @return
22972284 * @deprecated Use {@link #attributeModifier(CArray, Target, Environment)} instead.
22982285 */
22992286 @ Deprecated
@@ -2410,7 +2397,7 @@ public CArray potions(List<MCLivingEntity.MCEffect> effectList, Target t) {
24102397 /**
24112398 * @param ea
24122399 * @param t
2413- * @return
2400+ * @return
24142401 * @deprecated Use {@link #potions(CArray, Target, Environment)} instead.
24152402 */
24162403 @ Deprecated
@@ -2479,7 +2466,7 @@ public CArray potionData(MCPotionData mcpd, Target t) {
24792466 /**
24802467 * @param pd
24812468 * @param t
2482- * @return
2469+ * @return
24832470 * @deprecated Use {@link #potionData(CArray, Target, Environment)} instead.
24842471 */
24852472 @ Deprecated
@@ -2524,7 +2511,7 @@ public MCPotionData potionData(CArray pd, Target t, Environment env) {
25242511 /**
25252512 * @param potionArray
25262513 * @param t
2527- * @return
2514+ * @return
25282515 * @deprecated Use {@link #legacyPotionData(CArray, Target, Environment)} instead.
25292516 */
25302517 @ Deprecated
@@ -2601,7 +2588,7 @@ public CArray fireworkEffect(MCFireworkEffect mcfe, Target t) {
26012588 /**
26022589 * @param fe
26032590 * @param t
2604- * @return
2591+ * @return
26052592 * @deprecated Use {@link #fireworkEffect(CArray, Target, Environment)} instead.
26062593 */
26072594 @ Deprecated
@@ -2761,7 +2748,7 @@ public Construct recipe(MCRecipe r, Target t) {
27612748 /**
27622749 * @param c
27632750 * @param t
2764- * @return
2751+ * @return
27652752 * @deprecated Use {@link #recipe(Mixed, Target, Environment)} instead.
27662753 */
27672754 @ Deprecated
@@ -2901,7 +2888,8 @@ public MCRecipe recipe(Mixed c, Target t, Environment env) {
29012888 }
29022889 return ret ;
29032890 }
2904- default -> throw new CREIllegalArgumentException ("Could not find valid recipe type." , t );
2891+ default ->
2892+ throw new CREIllegalArgumentException ("Could not find valid recipe type." , t );
29052893 }
29062894 }
29072895
@@ -3017,7 +3005,7 @@ public MCMaterial material(Mixed name, Target t) {
30173005 /**
30183006 * @param ca
30193007 * @param t
3020- * @return
3008+ * @return
30213009 * @deprecated Use {@link #blockData(CArray, Target, Environment)} instead.
30223010 */
30233011 @ Deprecated
@@ -3033,7 +3021,7 @@ public MCBlockData blockData(CArray ca, Target t, Environment env) {
30333021 * @param ca
30343022 * @param blockType
30353023 * @param t
3036- * @return
3024+ * @return
30373025 * @deprecated Use {@link #blockData(CArray, MCMaterial, Target, Environment)} instead.
30383026 */
30393027 @ Deprecated
@@ -3118,7 +3106,7 @@ private Construct blockState(String value) {
31183106 * @param l
31193107 * @param pa
31203108 * @param t
3121- * @return
3109+ * @return
31223110 * @deprecated Use {@link #particleData(MCParticle, MCLocation, CArray, Target, Environment)} instead.
31233111 */
31243112 @ Deprecated
0 commit comments