diff --git a/lib/logicbot/objects.rb b/lib/logicbot/objects.rb index 30bbf81..d2cb1eb 100644 --- a/lib/logicbot/objects.rb +++ b/lib/logicbot/objects.rb @@ -29,7 +29,7 @@ def initialize bot, pos, in_channels, out_channel, needs_update = false, metadat @out_channel = out_channel @needs_update = needs_update @metadata = metadata - @signs = [''] * 6 # [block_face] = sign_text + @signs = [''] * 24 # [block_face] = sign_text @last_state = nil end diff --git a/lib/logicbot/server.rb b/lib/logicbot/server.rb index 80421d2..a0de4f8 100644 --- a/lib/logicbot/server.rb +++ b/lib/logicbot/server.rb @@ -68,7 +68,7 @@ def get_event @block_cache[pos] = data[6].to_i return {:type => :block_change, :pos => pos, :id => data[6].to_i} when 'S' # Sign change - return {:type => :sign_update, :pos => [data[3].to_i, data[4].to_i, data[5].to_i], :facing => data[6].to_i, :text => data[7 .. -1].join(',')} + return {:type => :sign_update, :pos => [data[3].to_i, data[4].to_i, data[5].to_i], :facing => data[6].to_i, :text => (data[7 .. -1] or []).join(',')} when 'N' # Player join @players[data[1].to_i] = data[2 .. -1].join(',') return {:type => :player_join, :id => data[1].to_i, :name => data[2 .. -1].join(',')}