Class: MCP::Packet
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- MCP::Packet
- Defined in:
- lib/mcp/packets_util.rb
Direct Known Subclasses
ChangeGamestate, ChunkAllocation, EntityHeadLook, EntityVelocity, Keepalive, Kick, LoginRequest, LoginResponse, Msg, PlayerAbilities, PluginMessage, SetWindowItems, SpawnItem, SpawnMob, SpawnNamedEntity, SpawnPosition, TimeUpdate
Constant Summary collapse
- Id =
-1
- Type =
:both
Instance Method Summary collapse
Instance Method Details
#with_id ⇒ Object
18 19 20 21 22 |
# File 'lib/mcp/packets_util.rb', line 18 def with_id packet = self.class id = packet::Id rescue 0 MCUbyte.new(id).to_binary_s + to_binary_s end |