File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
PacketWrapper/src/main/java/com/comphenix/packetwrapper Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 19
19
package com .comphenix .packetwrapper ;
20
20
21
21
import com .comphenix .packetwrapper .util .BackwardsCompatible ;
22
+ import com .comphenix .packetwrapper .util .EntityUtil ;
22
23
import com .comphenix .protocol .PacketType ;
23
24
import com .comphenix .protocol .events .PacketContainer ;
24
25
import com .comphenix .protocol .events .PacketEvent ;
@@ -329,25 +330,24 @@ public void setOptionalSpeedZ(double value) {
329
330
public EntityType getType () {
330
331
return MINOR_VERSION >= 14
331
332
? handle .getEntityTypeModifier ().read (0 )
332
- : EntityType . fromId (handle .getIntegers ().read (MINOR_VERSION >= 9 ? 6 : 9 ));
333
+ : EntityUtil . getEntityTypeById (handle .getIntegers ().read (MINOR_VERSION >= 9 ? 6 : 9 ));
333
334
}
334
335
335
336
/**
336
337
* Set the type of object.
337
338
*
338
339
* @param value - new value.
339
340
*/
340
- @ SuppressWarnings ("deprecation" )
341
341
public void setType (EntityType value ) {
342
342
if (MINOR_VERSION >= 14 ) handle .getEntityTypeModifier ().write (0 , value );
343
- else handle .getIntegers ().write (MINOR_VERSION >= 9 ? 6 : 9 , ( int ) value .getTypeId ());
343
+ else handle .getIntegers ().write (MINOR_VERSION >= 9 ? 6 : 9 , EntityUtil .getTypeId (value ));
344
344
}
345
345
346
346
/**
347
347
* Retrieve object data.
348
348
* <p>
349
349
* The content depends on the object type:
350
- * <table border="1" cellpadding="4">
350
+ * <table border="1" cellpadding="4" summary="Value meaning" >
351
351
* <tr>
352
352
* <th>Object Type:</th>
353
353
* <th>Name:</th>
You can’t perform that action at this time.
0 commit comments