Advertisement
Guest User

Redworks

a guest
Aug 31st, 2013
20,340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 674.52 KB | None | 0 0
  1. startup=fs.open("startup","w")
  2. startup.write([[shell.setPath( ".:/rom/programs" )
  3. help.setPath( "/rom/help" )
  4.  
  5. shell.setAlias( "ls", "list" )
  6. shell.setAlias( "dir", "list" )
  7. shell.setAlias( "cp", "copy" )
  8. shell.setAlias( "mv", "move" )
  9. shell.setAlias( "rm", "delete" )
  10.  
  11. if fs.isDir('/mem/autorun') then
  12.     local files = fs.list('/mem/autorun')
  13.     table.sort(files)
  14.     for k, file in ipairs(files) do
  15.         local path = fs.combine('/mem/autorun', file)
  16.         if not fs.isDir(path) then
  17.             shell.run(path)
  18.         end
  19.     end
  20. end]])
  21. startup.close()
  22. fs.makeDir("logic")
  23. fs.makeDir("mem")
  24. fs.makeDir("mem/autorun")
  25. fs.makeDir("mem/redworks")
  26. fs.makeDir("mem/redworks/apis")
  27. fs.makeDir("mem/redworks/help")
  28. fs.makeDir("mem/redworks/libs")
  29. fs.makeDir("mem/redworks/minepedia")
  30. fs.makeDir("mem/redworks/programs")
  31. fs.makeDir("mem/redworks/programs/cc-get-bin")
  32. fs.makeDir("mem/redworks/programs/circuits")
  33. fs.makeDir("mem/redworks/programs/http")
  34. ccget=fs.open("mem/autorun/cc-get","w")
  35. ccget.write([[if shell.path():match('/bin') == nil then
  36.     shell.setPath(shell.path() .. ':/bin')
  37. end]])
  38. ccget.close()
  39. redworks=fs.open("mem/autorun/redworks","w")
  40. redworks.write([[--Setup redworks functions
  41.  
  42. local path=":/mem/redworks/programs:/mem/redworks/libs"
  43. if http then path=path..":/mem/redworks/programs/http:/bin"end
  44.  
  45. shell.setPath( ".:/mem/redworks/programs:/rom/programs"..path )
  46. help.setPath( "mem/redworks/help:/rom/help/" )
  47. shell.setAlias( "ls", "list" )
  48. shell.setAlias( "dir", "list" )
  49. shell.setAlias( "cp", "copy" )
  50. shell.setAlias( "mv", "move" )
  51. shell.setAlias( "rm", "delete" )
  52. shell.setAlias( "off", "shutdown" )
  53. shell.setAlias( "faq", "help" )
  54. shell.setAlias( "cl", "clear" )
  55. shell.setAlias( "goto", "cd" )
  56. shell.setAlias( "del", "delete" )
  57.  
  58. -- Load APIs
  59. local tApis = fs.list( "/mem/redworks/apis" )
  60. for n,sFile in ipairs( tApis ) do
  61.     if not fs.isDir( sFile ) then
  62.         os.loadAPI( fs.combine( "/mem/redworks/apis", sFile ) )
  63.     end
  64. end
  65.  
  66. -- Do login code
  67. redworks.showLogo()
  68. local user,succ = redworks.doLogin()
  69. if not succ then
  70.     --Login failed
  71.     term.clear()
  72.     term.setCursorPos(1,5)
  73.     print("login failed.\n\nLocking terminal for 15 seconds")
  74.     local bExit=false
  75.     os.startTimer(15)
  76.     while not bExit do
  77.         falt, sEvent, param = pcall(os.pullEvent)
  78.         if sEvent == "timer" then
  79.             bExit = true
  80.         end
  81.     end
  82.     os.shutdown()
  83. else
  84.     redworks.setUser(user)
  85. end
  86.  
  87. term.clear()
  88. term.setCursorPos(1,1)
  89. print(os.version() .. " with Redworks "..redworks.version().." Terminal ID# " .. os.getComputerID())
  90. print("Welcome " .. redworks.getUser()..".".. " Current time is "..textutils.formatTime( os.time(), false ))
  91. term.setCursorPos(1,4)
  92. ]])
  93. redworks.close()
  94. redworks=fs.open("mem/redworks/apis/redworks","w")
  95. redworks.write([[local user=""
  96. local locked=false
  97. -- functions for making read only values
  98.  
  99. function version()
  100.     return "1.21"
  101. end
  102.  
  103. function sprint(text)
  104.   textutils.slowPrint(text)
  105. end
  106.  
  107. function waitForKey()
  108.     while true do
  109.         event, param = os.pullEvent()
  110.         if event == "key" then
  111.             break
  112.         end
  113.     end
  114.     return param
  115. end
  116.  
  117. function setUser(sUser)
  118.     if not locked then user=sUser end
  119.     locked=true
  120. end
  121.  
  122. function getUser()
  123.     return user
  124. end
  125.  
  126. function reading()
  127.   sleep(0.5)
  128.   write "."
  129. end
  130.  
  131. function showLogo()
  132.     term.clear()
  133.     term.setCursorPos(1,1)
  134.     print("   " .. os.version() .. " with Redworks "..redworks.version().." Terminal ID# " .. os.getComputerID())
  135.     print("   _ \\            |                    |        ")
  136.     print("     /   -_)   _' | \\ \\  \\ /  _ \\   _| | / (_-< ")
  137.     print("  _|_\\ \\___| \\__,_|  \\_/\\_/ \\___/ _|  _\\_\\ ___/ ")
  138.     print("    Development Team at http://redworksos.com")
  139. end
  140.  
  141. function showLogo2()
  142.     term.clear()
  143.     print"@@@@@@@  @@@@@@@@ @@@@@@@"
  144.     print"@@!  @@@ @@!      @@!  @@@"
  145.     print"@!@!!@!  @!!!:!   @!@  !@!"
  146.     print"!!: :!!  !!:      !!:  !!!"
  147.     print"::   : : : :: ::  :: :::"
  148.     print"@@@  @@@  @@@  @@@@@@  @@@@@@@  @@@  @@@  @@@@@@"
  149.     print"@@!  @@!  @@! @@!  @@@ @@!  @@@ @@!  !@@ !@@"
  150.     print"@!!  !!@  @!@ @!@  !@! @!@!!@!  @!@@!@!   !@@!!"
  151.     print" !:  !!:  !!  !!:  !!! !!: :!!  !!: :!!      !:!"
  152.     print"  ::.:  :::    : :. :   :   : :  :   ::: ::.: : "
  153. end
  154.  
  155. function doLogin() --returns true if login succeeds, false if it fails
  156.     local sPasswdPath = "ACCOUNTS.F"
  157.     --check we have a login path, if not, what we enter will create the account instead of log in
  158.     if fs.exists( sPasswdPath ) then--Password exists so this is not the first run
  159.         local loginCount=0
  160.         while loginCount < 3 do
  161.             local tPasswd={}
  162.             local file = fs.open(sPasswdPath,"r")
  163.             local sLine = file:readLine()
  164.             while sLine do
  165.                 for k, v in string.gmatch(sLine, "(%w+)%s(%w+)") do
  166.                     tPasswd[k]=v
  167.                 end
  168.                 sLine = file:readLine()
  169.             end
  170.             file:close()
  171.             numItems = 0
  172.             for k,v in pairs(tPasswd) do
  173.                 numItems = numItems + 1
  174.             end
  175.  
  176.             if (numItems==0) then
  177.                 --no passwords, not first run, so exit with out login.
  178.                 print(" ")
  179.                 print("To secure this terminal use:\n\nadduser username password")
  180.                 sleep(3)
  181.                 return "",true
  182.             end
  183.             local ux,uy,px,py=8,8,8,10
  184.             local size,len = 2,10
  185.             rawWriteLoc(ux,uy,"Username:")
  186.             rawWriteLoc(px,py,"Password:")
  187.             textBox(ux+10,uy-1,len,size,false,false,"",true)
  188.             textBox(px+10,py-1,len,size,false,true,"",true)
  189.             local enterPressed = false
  190.             local username,password="",""
  191.             while not enterPressed do
  192.                 username, enterPressed=textBox(ux+10,uy-1,len,size,true,false,username,true)
  193.                 password, enterPressed=textBox(px+10,py-1,len,size,true,true,"",true)
  194.             end
  195.             if (tPasswd[username]==password) then --Login ok
  196.                 return username,true
  197.             else --invalid login
  198.                 loginCount=loginCount+1
  199.                 rawWriteLoc(ux+10,7,"Invalid login")
  200.             end
  201.         end
  202.         return "",false
  203.     else--This is the first run, ask if they want to secure this box.      
  204.         local iSelected, sText = selectWindow(nil,nil,"Lock Terminal",{"Yes","No"})
  205.         clearArea(16,6,17,7)
  206.         local userFocus=true
  207.         if (sText=="Yes") then
  208.             local passwordMatch=false
  209.             local username,password,password2="",""
  210.             while not passwordMatch do
  211.                 local ux,uy=12,8
  212.                 local px,py=ux,10
  213.                 local size,len = 2,10
  214.                 rawWriteLoc(ux,uy,"Username:")
  215.                 rawWriteLoc(px,py,"Password:")
  216.                 rawWriteLoc(px,py+2,"Re-enter:")
  217.                 textBox(ux+10,uy-1,len,size,false,false,"xlilcasper",true)
  218.                 textBox(px+10,py-1,len,size,false,true,"",true)
  219.                 textBox(px+10,py+1,len,size,false,true,"",true)
  220.                 local enterPressed = false
  221.                
  222.                 while not enterPressed do
  223.                     username, enterPressed=textBox(ux+10,uy-1,len,size,userFocus,false,username,true)
  224.                     password, enterPressed=textBox(px+10,py-1,len,size,true,true,"",true)
  225.                     password2, enterPressed=textBox(px+10,py+1,len,size,true,true,"",true)
  226.                 end
  227.                 if (password == password2) then
  228.                     passwordMatch = true
  229.                 else
  230.                     userFocus=false
  231.                     rawWriteLoc(ux+1,7,"Passwords do not match")
  232.                 end
  233.             end
  234.             --Our passwords match, store them for later.
  235.                 tPasswd={}
  236.                 tPasswd[username]=password
  237.                
  238.                 local file = io.open(sPasswdPath,"w")
  239.                 for user,pass in pairs(tPasswd) do
  240.                     file:write(user .. " " .. pass .."\n")
  241.                 end
  242.                 file:close()
  243.                 return username,true
  244.         else --Do not secure
  245.             local file = io.open(sPasswdPath,"w")
  246.             file:close()
  247.             return "",true
  248.         end
  249.     end
  250. end
  251.  
  252. --Helper functions
  253.  
  254. --XLC (XLilCaspers) Windows libary included with permissions. Access with redworks.showWindow, redworks.textBox, redworks.selectWindow...
  255. function rawWriteLoc(x,y,sText)
  256.     term.setCursorPos(x,y)
  257.     term.write(sText)
  258. end
  259.  
  260. function textBox(x,y,len,size,focus,hideChar,default,disableTerm)
  261.     local h=2
  262.     local w=len+3
  263.     local char=""
  264.     local line=""
  265.     if size==1 then
  266.         y=y
  267.         w=len
  268.         for tx=0,w do
  269.             rawWriteLoc(x+tx,y,"_")
  270.         end
  271.     elseif size==2 then
  272.         for tx=0,w do
  273.             rawWriteLoc(x+tx,y+2,"-")
  274.         end
  275.     else
  276.         for ty=0,h do
  277.             for tx=0,w do
  278.                 char=" "
  279.                 if (ty==0) or (ty==h) then --horizonal line
  280.                     if (tx==0 or tx==w) then
  281.                         char="+"
  282.                     else
  283.                         char="-"
  284.                     end
  285.                 elseif (ty==1) then
  286.                     if (tx==0 or tx==w) then
  287.                         char="|"
  288.                     end
  289.                 else--normal line
  290.                     if (tx==0 or tx==w) then
  291.                         char="|"
  292.                     end
  293.                 end
  294.             line=line..char
  295.             end
  296.             rawWriteLoc(x,y+ty,line)
  297.             line=""
  298.         end
  299.     end
  300.    
  301.     if (focus) then
  302.         if size==2 then
  303.             y=y+1
  304.             len=len+3
  305.         elseif size==3 then
  306.             x=x+2
  307.             y=y+1
  308.         end
  309.         term.setCursorPos(x,y)
  310.         term.setCursorBlink(true)
  311.         sText=default or ""
  312.         rawWriteLoc(x,y,sText)
  313.         bExit = false
  314.         local dispText=""
  315.         local clearChar=" "
  316.         if size==1 then clearChar="_" end
  317.         local falt, sEvent, param = nil,nil,nil
  318.         while not bExit do
  319.             if disableTerm then
  320.                 falt, sEvent, param = pcall(os.pullEvent)
  321.             else
  322.                 sEvent, param = os.pullEvent()
  323.                 falt=false
  324.             end
  325.            
  326.             if sEvent == "key" then
  327.                 if param == 28 then
  328.                     return sText,true
  329.                 elseif param==15 then
  330.                     return sText,false
  331.                 elseif param == 14 then
  332.                     sText = string.sub(sText,1,string.len(sText)-1)
  333.                 end
  334.             end
  335.            
  336.             if sEvent == "char" then
  337.                 sText = sText .. param
  338.             end
  339.            
  340.             local dispChars=string.len(sText)
  341.             if dispChars > len then dispChars=len end
  342.             if not hideChar then
  343.                 dispText = string.sub(sText,-len)
  344.             else
  345.                 dispText=""
  346.                 for n=1,dispChars do
  347.                     dispText=dispText.."*"
  348.                 end
  349.                 dispText = string.sub(dispText,-len)
  350.             end
  351.             dispChars=string.len(dispText)
  352.             for n=dispChars,len do
  353.                 dispText=dispText..clearChar
  354.             end
  355.             rawWriteLoc(x,y,dispText)
  356.             term.setCursorPos(x+dispChars,y)
  357.         end
  358.     else
  359.         return sText,true
  360.     end
  361. end
  362.  
  363. function tCopy (tOrig, tTwin)
  364. if not tTwin then tTwin = { } end
  365. local tStack = {{tOrig, tTwin}}
  366. local function copy (tTable, tTarget)
  367. if not getmetatable(tTarget) then setmetatable(tTarget, getmetatable(tTable)) end
  368. for k, v in pairs(tTable) do
  369. if type(v)~='table' then
  370. tTarget[k] = v
  371. else
  372. tTarget[k] = { }
  373. table.insert(tStack, {tTable[k], tTarget[k]})
  374. end
  375. end
  376. end
  377. while #tStack>0 do
  378. copy(tStack[1][1], tStack[1][2])
  379. table.remove(tStack, 1)
  380. end
  381. return tTwin
  382. end
  383.  
  384. function showWindow(x,y,w,h,title,text)
  385.     local sTitle = title or ""
  386.     local sText = text or ""
  387.     width, height = term.getSize()
  388.     sTitle = string.sub(sTitle,1,w-2)
  389.     iTitleStart = ((w/2)-1)-((#sTitle-1)/2)
  390.     if (not x) then
  391.         x=(width-w)/2
  392.     end
  393.     if (not y) then
  394.         y=(height-h)/2
  395.     end
  396.     if (w > width) then w = width end
  397.     if (h > height) then h = height end
  398.     local line=""
  399.     local char=""
  400.     local curChar=1
  401.     local waitForLine=1
  402.     if (sTitle ~= "") then waitForLine = 2 end
  403.     for ty=0,h do
  404.         for tx=0,w do
  405.             char=" "
  406.             if (ty==0) or ((ty==2) and (sTitle ~= "")) or (ty==h) then --horizonal line
  407.                 if (tx==0 or tx==w) then
  408.                     char="+"
  409.                 else
  410.                     char="-"
  411.                 end
  412.             elseif (ty==1) then
  413.                 if (tx==0 or tx==w) then
  414.                     char="|"
  415.                 else
  416.                     --if (tx-iTitleStart < #sTitle+1) and (tx > iTitleStart) then
  417.                     --  char = string.sub(sTitle,tx-iTitleStart,tx-iTitleStart)
  418.                     --end
  419.                 end
  420.             else--normal line
  421.                 if (tx==0 or tx==w) then
  422.                     char="|"
  423.                 end
  424.             end
  425.         line=line..char
  426.         end
  427.         rawWriteLoc(x,y+ty,line)
  428.         line=""
  429.     end
  430.     if (sTitle ~= "") then
  431.         rawWriteLoc(x+iTitleStart+1,y+1,sTitle)
  432.     end
  433.     if (sText ~= "") then
  434.         term.setCursorPos(x+1,y+3)
  435.         local wrapedText = getWrapedText(x+1,y+2,x+w-2,y+h-1,sText)
  436.         local offset = 0
  437.         if (sTitle ~= "") then offset=2 end
  438.         for ty=1,#wrapedText do
  439.             rawWriteLoc(x+1,ty+y+offset,wrapedText[ty])
  440.             if (ty>h-offset-2) then break end
  441.         end
  442.     end
  443. end
  444.  
  445. function getWrapedText(sx,sy,w,h, sText )
  446.     local x,y = sx,sy
  447.     local line = ""
  448.     local wraped = { }
  449.     local function newLine()
  450.         table.insert(wraped,line)
  451.         line=""
  452.         x=sx
  453.     end
  454.    
  455.     local function storeText(text)
  456.         line=line..text
  457.         return #text
  458.     end
  459.    
  460.     -- Print the line with proper word wrapping
  461.     while string.len(sText) > 0 do
  462.         local whitespace = string.match( sText, "^[ \t]+" )
  463.         if whitespace then
  464.             -- Print whitespace
  465.             x = x + storeText(whitespace)
  466.             sText = string.sub( sText, string.len(whitespace) + 1 )
  467.         end
  468.        
  469.         local newline = string.match( sText, "^\n" )
  470.         if newline then
  471.             -- Print newlines
  472.             newLine()
  473.             sText = string.sub( sText, 2 )
  474.         end
  475.        
  476.         local text = string.match( sText, "^[^ \t\n]+" )
  477.         if text then
  478.             sText = string.sub( sText, string.len(text) + 1 )
  479.             if string.len(text) > w then
  480.                 -- Print a multiline word              
  481.                 while string.len( text ) > 0 do
  482.                 if x > w then
  483.                     newLine()
  484.                 end
  485.                     x = x + storeText( text )
  486.                     text = string.sub( text, (w-x) + 2 )
  487.                 end
  488.             else
  489.                 -- Print a word normally
  490.                 if x + string.len(text) > w then
  491.                     newLine()
  492.                 end
  493.                 x = x + storeText( text )
  494.             end
  495.         end
  496.     end
  497.     newLine()
  498.     return wraped
  499. end
  500.  
  501. function selectWindow(x,y,title,tOptions,iSelected)
  502.     local w=#title
  503.     local h=1
  504.     local selected=iSelected or 1
  505.     local tOptionsOrg=tCopy(tOptions)
  506.     local width, height = term.getSize()
  507.     for n=1,#tOptions do
  508.         tOptions[n]=" "..tOptionsOrg[n].."  "
  509.         if (string.len(tOptions[n])>w) then w=string.len(tOptions[n]) end      
  510.     end
  511.     w=w+2
  512.     local sTitle = title or ""
  513.     if (sTitle ~= "") then h = h + 2 end
  514.     h = h + #tOptions
  515.     tOptions[selected]="*"..tOptionsOrg[selected].."*"
  516.     if (not x) then
  517.         x=(width-w)/2
  518.     end
  519.     if (not y) then
  520.         y=(height-h)/2
  521.     end
  522.     showWindow(x,y,w,h,sTitle,table.concat(tOptions,"\n"))
  523.    
  524.     --loop and capture arrow keys for selecting output.
  525.     bExit = false
  526.     while not bExit do
  527.         event, param = os.pullEvent()
  528.         if event == "key" then
  529.             if param == 197 then --Exit on pause/break
  530.                 bExit = true
  531.             elseif param == 208 then
  532.                 tOptions[selected]=" "..tOptionsOrg[selected].."  " --Clear selection
  533.                 selected=selected+1
  534.                 if (selected>#tOptions) then selected=1 end
  535.                 tOptions[selected]="*"..tOptionsOrg[selected].."*"
  536.                 showWindow(x,y,w,h,sTitle,table.concat(tOptions,"\n"))
  537.             elseif param == 200 then
  538.                 tOptions[selected]=" "..tOptionsOrg[selected].."  " --Clear selection
  539.                 selected=selected-1
  540.                 if (selected<1) then selected=#tOptions end
  541.                 tOptions[selected]="*"..tOptionsOrg[selected].."*"
  542.                 showWindow(x,y,w,h,sTitle,table.concat(tOptions,"\n"))
  543.             elseif param == 28 then
  544.                 return selected,tOptionsOrg[selected]
  545.             end
  546.         end
  547.        
  548.     end
  549. end
  550.  
  551. function clearArea(x,y,w,h,char)
  552.     local sChar = char or " "
  553.     for yy=0,h do
  554.         for xx=0,w do
  555.             rawWriteLoc(x+xx,y+yy,sChar)
  556.         end
  557.     end
  558. end
  559.  
  560. --End of windows libary
  561.  
  562. function class(base, init)
  563.    local c = {}    -- a new class instance
  564.    if not init and type(base) == 'function' then
  565.       init = base
  566.       base = nil
  567.    elseif type(base) == 'table' then
  568.     -- our new class is a shallow copy of the base class!
  569.       for i,v in pairs(base) do
  570.          c[i] = v
  571.       end
  572.       c._base = base
  573.    end
  574.    -- the class will be the metatable for all its objects,
  575.    -- and they will look up their methods in it.
  576.    c.__index = c
  577.  
  578.    -- expose a constructor which can be called by <classname>(<args>)
  579.    local mt = {}
  580.    mt.__call = function(class_tbl, ...)
  581.    local obj = {}
  582.    setmetatable(obj,c)
  583.    if init then
  584.       init(obj,...)
  585.    else
  586.       -- make sure that any stuff from the base class is initialized!
  587.       if base and base.init then
  588.       base.init(obj, ...)
  589.       end
  590.    end
  591.    return obj
  592.    end
  593.    c.init = init
  594.    c.is_a = function(self, klass)
  595.       local m = getmetatable(self)
  596.       while m do
  597.          if m == klass then return true end
  598.          m = m._base
  599.       end
  600.       return false
  601.    end
  602.    setmetatable(c, mt)
  603.    return c
  604. end
  605.  
  606. window = {}
  607. window.w,window.h = term.getSize()
  608. window.midw = window.w/2
  609. window.midh = window.h/2
  610.  
  611. screen = {}
  612.  
  613. screen.x = 0
  614. screen.y = 0
  615.  
  616. entity = {}
  617. entitynum = 1
  618.  
  619. function entity.new(a, x, y, t, c, d) -- Adds a new Entity to the execution
  620.     id = entitynum
  621.     entity[id] = {}
  622.    
  623.     entity[id][1] = {}
  624.     entity[id][1][1] = 'Name'
  625.     entity[id][1][2] = a
  626.    
  627.     entity[id][2] = {}
  628.     entity[id][2][1] = 'X Position'
  629.     entity[id][2][2] = x -- XPos
  630.    
  631.     entity[id][3] = {}
  632.     entity[id][3][1] = 'Y Position'
  633.     entity[id][3][2] = y -- YPos
  634.    
  635.     entity[id][4] = {}
  636.     entity[id][4][1] = 'Character'
  637.     entity[id][4][2] = t -- Text Representing the Entity
  638.    
  639.     entity[id][5] = {}
  640.     entity[id][5][1] = 'Visibility'
  641.     entity[id][5][2] = c -- Depicts whether the object is visible or not
  642.    
  643.     entity[id][6] = {}
  644.     entity[id][6][1] = 'Physical'
  645.     entity[id][6][2] = d -- If an object is Physical, it cannot move onto the same spot as a physical object
  646.                          -- WARNING: Objects can still be set to physical using entity.setvar(), or by creating an object at the same spot as another object!
  647.                          
  648.     entity[id][7] = {}
  649.     entity[id][7][1] = 'Absolute'
  650.     entity[id][7][2] = false -- Sets whether an object has an absolute position(1 = 1 on screen regardless of screen offset) or not
  651.    
  652.     entity[id][8] = {}
  653.     entity[id][8][1] = 'Variable Count'
  654.     entity[id][8][2] = 7 -- Counts how many variables there are
  655.    
  656.     entitynum = entitynum+1
  657.     return id
  658. end
  659.  
  660. function entity.setchar(a, b)
  661.     entity[a][4][2] = b
  662. end
  663.  
  664. function entity.setphys(a, b)
  665.     entity[a][5][2] = b
  666. end
  667.  
  668. function entity.setabs(a, b)
  669.     entity[a][7][2] = b
  670. end
  671.  
  672. function entity.addvar(a, b, c) -- Adds a new variable to an Entity
  673.     varcount = entity[a][8][2] + 1
  674.     entity[a][varcount] = {}
  675.     entity[a][varcount][1] = b
  676.     entity[a][varcount][2] = c
  677.     entity[a][8][2] = varcount
  678. end
  679.  
  680. function entity.remvar(a, b)
  681.     for i in ipairs(entity[a]) do
  682.         if entity[a][i][1] == b then
  683.             table.remove(entity[a], i)
  684.             entity[a][8][2] = entity[a][8][2] - 1
  685.             break
  686.         end
  687.     end
  688. end
  689.  
  690. function entity.setvar(a, b, c)
  691.     for i in ipairs(entity[a]) do
  692.         if entity[a][i][1] == b then
  693.             entity[a][i][2] = c
  694.             break
  695.         end
  696.     end
  697. end
  698.  
  699. function entity.getvar(a, b)
  700.     answer = 0
  701.     for i in ipairs(entity[a]) do
  702.         if entity[a][i][1] == b then
  703.             answer = entity[a][i][2]
  704.             break
  705.         end
  706.     end
  707.     return answer
  708. end
  709.            
  710.  
  711. function entity.rem(a) -- Removes Entity from the execution
  712.     --Don't know if this is possible or not. Might just zero out the entity. Reason? table.remove() would shift all the higher index entities down, changing their ID's
  713. end
  714.  
  715. function entity.getposx(a) return entity[a][2][2] end
  716. function entity.getposy(a) return entity[a][3][2] end
  717.  
  718. function entity.setpos(a, x, y, r) -- Sets the Entity's Position
  719.     if r ~= nil then
  720.         local resx = entity[a][2][2] + x
  721.         local resy = entity[a][3][2] + y
  722.         if get.locphys(resx,resy) == false then
  723.             entity[a][2][2] = resx
  724.             entity[a][3][2] = resy
  725.         end
  726.     else
  727.         if get.locphys(x,y) == false then
  728.             entity[a][2][2] = x
  729.             entity[a][3][2] = y
  730.         end
  731.     end
  732. end
  733.  
  734. get = {}
  735.  
  736. function get.locphys(x, y)
  737.     answer = false
  738.     for i,v in ipairs(entity) do
  739.         if entity[i][6][2] then
  740.             if entity[i][2][2] == x then
  741.                 if entity[i][3][2] == y then
  742.                     answer = i
  743.                     break
  744.                 end
  745.             end
  746.         end
  747.     end
  748.     return answer
  749. end
  750.  
  751. function printCenter( y, s ) -- Prints centered text on the screen
  752.     local x = math.floor((w - string.len(s)) / 2)
  753.     term.setCursorPos(x, y)
  754.     term.clearLine()
  755.     term.write( s )
  756. end
  757.  
  758.  
  759. --Variables
  760. exec = {}
  761. exec.active = false
  762. --Functions
  763. function exec.quit() -- Ends the current execution
  764.     term.clear()
  765.     exec.active = false
  766.     term.setCursorPos(window.midw-7,window.h)
  767.     term.write('Thanks for using the RinAPI')
  768.     sleep(2)
  769.     term.clear()
  770.     term.setCursorPos(1,1)
  771. end
  772.  
  773. function exec.draw() -- Draws the screen
  774.     term.clear()
  775.     for i,v in ipairs(entity) do
  776.         if entity[i][5][2] == true and entity[i][7][2] == false then
  777.             local x = entity[i][2][2]
  778.             local y = entity[i][3][2]
  779.             term.setCursorPos(x - screen.x, y - screen.y)
  780.             term.write(entity[i][4][2])
  781.         end
  782.     end
  783.     for i,v in ipairs(entity) do
  784.         if entity[i][5][2] == true and entity[i][7][2] == true then
  785.             local x = entity[i][2][2]
  786.             local y = entity[i][3][2]
  787.             term.setCursorPos(x, y)
  788.             term.write(entity[i][4][2])
  789.         end
  790.     end
  791. end
  792.  
  793. function exec.defupdate() -- Default Update, can be overridden for custom draw handling
  794.     term.clear()
  795.     exec.draw()
  796. end
  797.  
  798. function exec.start() -- Starts the current execution
  799.     exec.active = true
  800.     os.startTimer(1/30)
  801.     while exec.active do
  802.         local t,k = os.pullEvent()
  803.         if t == 'timer' then
  804.             if exec.beginstep ~= nil then exec.beginstep() end
  805.             if exec.step ~= nil then exec.step() end
  806.             if exec.endstep ~= nil then exec.endstep() end
  807.             if exec.update ~= nil then exec.update()
  808.             else exec.defupdate() end
  809.             os.startTimer(1/30)
  810.         elseif t == 'key' then
  811.             if k == 14 then
  812.                 exec.quit()
  813.             else
  814.                 if exec.key ~= nil then exec.key(k) end
  815.             end
  816.         end
  817.     end
  818. end
  819. ]])
  820. redworks.close()
  821. bundleworks=fs.open("mem/redworks/help/bundleworks","w")
  822. bundleworks.write([[
  823. BundleWorks is a Redworks program that tells the computer which redpower wire attached to a bundled cable to activate / deactivate. All you have to do is type the color you wish to toggle the output.
  824.  
  825.  colors such as: supports all 16 colors: White, Orange, Magenta, LightBlue, Yellow, Lime, Pink, Gray, LightGray, Cyan, Purple, Blue, Brown, Green, Yellow, and Black.
  826.  
  827.  reset: turns all the wires off.
  828.  all: turns all the wires on.
  829.  quit: quits the program, and shutdown.
  830.  
  831.  Important: Bundleworks assumes you have the regular
  832.  bundled cable, connected to the back of the computer for output. And the extension of color wire you choose.
  833.  
  834.  Created by Redworks Developer: FuzzyPurp(streetstar5)
  835.  
  836.  Visit www.RedworksOS.com for discussions.]])
  837. bundleworks.close()
  838. cc_get=fs.open("mem/redworks/help/cc-get","w")
  839. cc_get.write([[cc-get version 0.1.1
  840. Usage: cc-get <action> [<program>]
  841. Actions:
  842.     install <program>
  843.     update
  844.     remove <program>
  845.     list
  846. ]])
  847. cc_get.close()
  848. ccirc=fs.open("mem/redworks/help/ccirc","w")
  849. ccirc.write([[The Chat App CIM know known as CCirc was developed by Casper7526 on the Minecraft Forums to chat over SSP/SMP MC It now emulates a real IRC client.
  850. ]])
  851. ccirc.close()
  852. circuit=fs.open("mem/redworks/help/circuit","w")
  853. circuit.write([[Custom Circuitry API is an "api" to aid a mod, that helps add a computer, into a computer game. It was originally created by Casper7526, and maintained by Streetstar5
  854.  
  855. It adds a base program (ran from root) called "circuit". When you access this program it will ask you to choose the type of circuit you wish to create. It will give you the options to change the inputs and outputs and any extra data that might be needed with the circuit. It will then create a startup file with the new information automatically and ready to go the next time your computer is rebooted (or by running startup).
  856.  
  857. Current Circuits:
  858.  
  859. D-FlipFlop, Inverter. -converted by Casper
  860.  
  861. Learn How To Code For The API:
  862.  
  863. Coding is extremely simple and the only file you have to worry about is the one you wish to create inside the circuit folder. Below explains further.
  864.  
  865.  
  866. --2             - Number of Inputs (Must be 0 if none)
  867. --2             - Number of Outputs (Must be 0 if none)
  868. --2             - Number of Extras (Must be 0 if none)
  869. input = {}            - LEAVE ME
  870. output = {}           - LEAVE ME
  871. extra = {}            - LEAVE ME
  872.  
  873. input[1] = "bottom" -only need as many here as you have inputs. 0 = no lines here
  874. input[2] = "right"
  875.  
  876. output[1] = "back" -only need as many here as you have outputs. 0 = no lines here
  877. output[2] = "top"  
  878.  
  879. extra[1] = "Number of Pulses" -only need as many here as you have extras. 0 = no lines here
  880. extra[2] = "Speed of Pulses"  - The name for extras is what is shown to the user, they change it to a value.
  881.  
  882. ----- BELOW HERE IS WHERE YOU CAN START DOING WHATEVER YOU WANT
  883. print ("Yep")
  884. print ("Test - "..input[1].." Test - "..output[1])
  885. print ("Yep")
  886.  
  887. ]])
  888. circuit.close()
  889. gameapi=fs.open("mem/redworks/help/gameapi","w")
  890. gameapi.write([[GameAPI is a lightweight and easy to use library that you can use to make games.
  891. The library uses a system of automatically drawn and bounded actors and it does most of the work that you would have to normally do yourself.
  892. Because of the graphical limitations of CraftOS, the interface is in an ascii-type style, a text character representing each actor.]])
  893. gameapi.close()
  894. intro=fs.open("mem/redworks/help/intro","w")
  895. intro.write([[Welcome to CraftOS!
  896. Type "programs" to see the programs you can run.
  897. Type "help <program>" to see help for a specific program.
  898. Type "help programming" to learn about programming.
  899. Type "help whatsnew" to see what's changed in 1.2
  900. Type "help credits" to learn who made all this.
  901. Type "help index" to see all help topics.
  902. ]])
  903. intro.close()
  904. login=fs.open("mem/redworks/help/login","w")
  905. login.write([[Each terminal stores it's own user account
  906. information. To add and delete accounts on a
  907. terminal, once logged in, use cc-get program and
  908. download the addons.
  909.  
  910. "cc-get install adduser" "cc-get install deluser"
  911.  
  912. These two go hand in hand with our Login system.
  913.  
  914. then you can type "adduser username password"
  915. to remove a name use "deluser username password"]])
  916. login.close()
  917. redword=fs.open("mem/redworks/help/redword","w")
  918. redword.write([[(Red Works Word Processor)
  919.  
  920. RedWord is an advanced note-making application specific to RedWorks.
  921. You can edit, and create files on the fly.
  922. It can be opened with the command 'redword'.]])
  923. redword.close()
  924. redworks=fs.open("mem/redworks/help/redworks","w")
  925. redworks.write([[To much info to list here. Please visit us
  926. at our home page www.redworksOS.com]])
  927. redworks.close()
  928. GameAPI=fs.open("mem/redworks/libs/GameAPI","w")
  929. GameAPI.write([[term.clear()
  930. print "GameAPI r4
  931. Press Backspace at any time to exit the game."
  932. sleep(1)
  933. screen = {}
  934. screen.width = 40
  935. screen.height = 15
  936. screen.actors = {}
  937.  
  938. function round(v,int)
  939.     local int = (int~=nil) and int or 1
  940.     local n = v%int
  941.    
  942.     if n >= int/2 then
  943.         return (v-n)+int
  944.     else
  945.         return (v-n)
  946.     end
  947. end
  948.  
  949. for y=1,screen.height do
  950.     local t = {}
  951.     for x=1,screen.width do
  952.         table.insert(t,' ')
  953.     end
  954.     table.insert(screen.actors,t)
  955. end
  956.  
  957. function draw()
  958.     term.clear()
  959.     for y,v in pairs(screen.actors) do
  960.         local line = ''
  961.         for x,vv in pairs(v) do
  962.             line = line .. vv
  963.         end
  964.         print(line)
  965.     end
  966. end
  967.  
  968. function format(actor)
  969.     if actor.bounded then
  970.         actor.x = (actor.x>1) and actor.x or 1
  971.         actor.x = (actor.x<screen.width) and actor.x or screen.width
  972.         actor.y = (actor.y>1) and actor.y or 1
  973.         actor.y = (actor.y<screen.height) and actor.y or screen.height
  974.     end
  975.     screen.actors[round(actor.y)][round(actor.x)] = actor.char
  976.     return actor
  977. end
  978.  
  979. actor = {}
  980.  
  981. function actor:new(x,y,char,b)
  982.     actor.x = x
  983.     actor.y = y
  984.     actor.char = char
  985.     actor.bounded = (b~=nil) and b or true
  986.     screen.actors[round(y)][round(x)] = char
  987.     return format(actor)
  988. end
  989.  
  990. function actor:setPos(x,y)
  991.     screen.actors[actor.y][actor.x] = ' '
  992.     actor.x = x
  993.     actor.y = y
  994.     actor = format(actor)
  995. end
  996.  
  997. function actor:setX(x)
  998.     screen.actors[actor.y][actor.x] = ' '
  999.     actor.x = x
  1000.     actor = format(actor)
  1001. end
  1002.  
  1003. function actor:setY(y)
  1004.     screen.actors[actor.y][actor.x] = ' '
  1005.     actor.y = y
  1006.     actor = format(actor)
  1007. end
  1008.  
  1009. function actor:addPos(x,y)
  1010.     screen.actors[actor.y][actor.x] = ' '
  1011.     actor.x = actor.x + x
  1012.     actor.y = actor.y + y
  1013.     actor = format(actor)
  1014. end
  1015.  
  1016. function actor:addX(x)
  1017.     screen.actors[actor.y][actor.x] = ' '
  1018.     actor.x = actor.x + x
  1019.     actor = format(actor)
  1020. end
  1021.  
  1022. function actor:addY(y)
  1023.     screen.actors[actor.y][actor.x] = ' '
  1024.     actor.y = actor.y + y
  1025.     actor = format(actor)
  1026. end
  1027.  
  1028. function actor:setChar(char)
  1029.     screen.actors[actor.y][actor.x] = char
  1030.     actor.char = char
  1031. end
  1032.  
  1033. function actor:destroy()
  1034.     screen.actors[actor.y][actor.x] = ' '
  1035.     actor = nil
  1036. end
  1037.  
  1038. game = {}
  1039. game.state = 'running'
  1040.  
  1041. function game.quit()
  1042.     term.clear()
  1043.     game.state = 'dead'
  1044. end
  1045.  
  1046. function game.start()
  1047.     os.startTimer(1/30)
  1048.     while game.state == 'running' do
  1049.         local t,k = os.pullEvent()
  1050.         if t == 'timer' then
  1051.             draw()
  1052.             if game.update ~= nil then game.update() end
  1053.             os.startTimer(1/30)
  1054.         elseif t == 'key' then
  1055.             if k == 14 then
  1056.                 game.quit()
  1057.             else
  1058.                 if game.key ~= nil then game.key(k) end
  1059.             end
  1060.         end
  1061.     end
  1062. end
  1063.  
  1064. --put the code for your game down here since i can't figure out how to use "require" and "loadfile" is a bitch
  1065.  
  1066. --Brief Explanation of Functions:
  1067.  
  1068. --actor:new(x, y, char[, bounded])
  1069. --returns a new actor at the x and y positions on the terminal
  1070. --bounded is a boolean which will determine whether or not your actor's ---movement is limited to the console window, true by default.
  1071.  
  1072. --actor.x
  1073. --the actor's x position
  1074.  
  1075. --actor.y
  1076. --the actor's y position
  1077.  
  1078. --actor.char
  1079. --the character representing the actor on screen
  1080.  
  1081. --actor.bounded
  1082. --whether or not the actor can go outside the screen
  1083.  
  1084. --actor:setPos(x,y)
  1085. --sets the actor's position
  1086. --**this method and other positioning methods must be used in order for --the actor's position to be updated onscreen
  1087.  
  1088. --actor:addPos(x,y)
  1089. --adds to the actor's position
  1090.  
  1091. --actor:setX(n)
  1092. --sets the actor's x position to n
  1093.  
  1094. --actor:setY(n)
  1095. --sets the actor's y position to n
  1096.  
  1097. --actor:addX(n)
  1098. --adds n to the actor's x position
  1099.  
  1100. --actor:addY(n)
  1101. --adds n to the actor's y position
  1102.  
  1103. --actor:setChar(char)
  1104. --change the actor's character to char
  1105.  
  1106. --game.key(k)
  1107. --user defined, triggered when a key is pressed
  1108.  
  1109. --game.update()
  1110. --user defined, triggered when a new frame is drawn
  1111.  
  1112. --game.start()
  1113. --required for the game to start, obviously
  1114. --**any code after this function will not be ran until the game has stopped
  1115.  
  1116. --game.stop()
  1117. --quit the program
  1118.  
  1119. --Changelog:
  1120.  
  1121. --r1:
  1122. --Released API
  1123.  
  1124. --r4:
  1125. --Added 'game:setChar()' to change an actor's characters
  1126. --Added a 'bounded' attribute if you wanted an actor to be able to go outside the screen.
  1127. --Added 'screen.width' and 'screen.height' as editable attributes to allow for custom widths and heights]])
  1128. GameAPI.close()
  1129. RedBundle=fs.open("mem/redworks/libs/RedBundle","w")
  1130. RedBundle.write([[function leftRed()
  1131. rs.setBundledOutput('left ', rs.getBundledOutput('left') + colors.red)
  1132. sleep(0.1)
  1133. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.red)
  1134. end
  1135. function leftBlue()
  1136. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.blue)
  1137. sleep(0.1)
  1138. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.blue)
  1139. end
  1140. function leftGreen()
  1141. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.green)
  1142. sleep(0.1)
  1143. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.green)
  1144. end
  1145. function leftYellow()
  1146. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.yellow)
  1147. sleep(0.1)
  1148. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.yellow)
  1149. end
  1150. function leftBrown()
  1151. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.brown)
  1152. sleep(0.1)
  1153. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.brown)
  1154. end
  1155. function leftBlack()
  1156. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.black)
  1157. sleep(0.1)
  1158. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.black)
  1159. end
  1160. function leftMagenta()
  1161. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.magenta)
  1162. sleep(0.1)
  1163. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.magenta)
  1164. end
  1165. function leftPurple()
  1166. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.purple)
  1167. sleep(0.1)
  1168. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.purple)
  1169. end
  1170. function leftOrange()
  1171. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.orange)
  1172. sleep(0.1)
  1173. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.orange)
  1174. end
  1175. function leftCyan()
  1176. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.cyan)
  1177. sleep(0.1)
  1178. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.cyan)
  1179. end
  1180. function leftPink()
  1181. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.pink)
  1182. sleep(0.1)
  1183. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.pink)
  1184. end
  1185. function leftLightgray()
  1186. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.lightGray)
  1187. sleep(0.1)
  1188. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.lightGray)
  1189. end
  1190. function leftGray()
  1191. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.gray)
  1192. sleep(0.1)
  1193. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.gray)
  1194. end
  1195. function leftLightblue()
  1196. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.lightBlue)
  1197. sleep(0.1)
  1198. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.lightBlue)
  1199. end
  1200. function leftLime()
  1201. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.lime)
  1202. sleep(0.1)
  1203. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.lime)
  1204. end
  1205. function leftWhite()
  1206. rs.setBundledOutput('left', rs.getBundledOutput('left') + colors.white)
  1207. sleep(0.1)
  1208. rs.setBundledOutput('left', rs.getBundledOutput('left') - colors.white)
  1209. end
  1210. function rightRed()
  1211. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.red)
  1212. sleep(0.1)
  1213. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.red)
  1214. end
  1215. function rightBlue()
  1216. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.blue)
  1217. sleep(0.1)
  1218. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.blue)
  1219. end
  1220. function rightGreen()
  1221. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.green)
  1222. sleep(0.1)
  1223. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.green)
  1224. end
  1225. function rightYellow()
  1226. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.yellow)
  1227. sleep(0.1)
  1228. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.yellow)
  1229. end
  1230. function rightBrown()
  1231. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.brown)
  1232. sleep(0.1)
  1233. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.brown)
  1234. end
  1235. function rightBlack()
  1236. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.black)
  1237. sleep(0.1)
  1238. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.black)
  1239. end
  1240. function rightMagenta()
  1241. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.magenta)
  1242. sleep(0.1)
  1243. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.magenta)
  1244. end
  1245. function rightPurple()
  1246. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.purple)
  1247. sleep(0.1)
  1248. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.purple)
  1249. end
  1250. function rightOrange()
  1251. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.orange)
  1252. sleep(0.1)
  1253. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.orange)
  1254. end
  1255. function rightCyan()
  1256. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.cyan)
  1257. sleep(0.1)
  1258. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.cyan)
  1259. end
  1260. function rightPink()
  1261. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.pink)
  1262. sleep(0.1)
  1263. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.pink)
  1264. end
  1265. function rightLightgray()
  1266. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.lightGray)
  1267. sleep(0.1)
  1268. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.lightGray)
  1269. end
  1270. function rightGray()
  1271. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.gray)
  1272. sleep(0.1)
  1273. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.gray)
  1274. end
  1275. function rightLightblue()
  1276. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.lightBlue)
  1277. sleep(0.1)
  1278. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.lightBlue)
  1279. end
  1280. function rightLime()
  1281. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.lime)
  1282. sleep(0.1)
  1283. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.lime)
  1284. end
  1285. function rightWhite()
  1286. rs.setBundledOutput('right', rs.getBundledOutput('right') + colors.white)
  1287. sleep(0.1)
  1288. rs.setBundledOutput('right', rs.getBundledOutput('right') - colors.white)
  1289. end]])
  1290. RedBundle.close()
  1291. adduser=fs.open("mem/redworks/programs/adduser","w")
  1292. adduser.write([[local sPasswdPath = "ACCOUNTS.F"
  1293. params = { ... }
  1294. if #params < 2 then
  1295.     error( "Usage: adduser <username> <password>" )
  1296. end
  1297. local tPasswd = { }
  1298.  
  1299. if fs.exists( sPasswdPath ) then
  1300.     print("File exists. Loading")
  1301.     local file = io.open(sPasswdPath)
  1302.     local sLine = file:read()
  1303.     while sLine do
  1304.         for k, v in string.gmatch(sLine, "(%w+)%s(%w+)") do
  1305.             tPasswd[k]=v           
  1306.         end
  1307.         sLine = file:read()
  1308.     end
  1309.     file:close()
  1310. end
  1311.  
  1312. tPasswd[params[1]].."]]"..[[=params[2]
  1313.  
  1314. local file = io.open(sPasswdPath,"w")
  1315. for user,pass in pairs(tPasswd) do
  1316.     file:write(user .. " " .. pass .."\n")
  1317. end
  1318. file:close()
  1319. print("User " .. params[1] .. " has been created.")
  1320.  
  1321. ]])
  1322. adduser.close()
  1323. BundleWorks=fs.open("mem/redworks/programs/BundleWorks","w")
  1324. BundleWorks.write([[--BundleWorks
  1325. --Date created: 1/13/12
  1326. --Version: 1.1
  1327. --Author: FuzzyPurp
  1328. --Info: Built as a standalone, now part of Redworks.
  1329.  
  1330. --BundleWorks is a program to tell the computer which redpower wire to activate / deactivate.
  1331.  
  1332.  --colors such as: supports all 16 colors: red, yellow,
  1333.  --green, blue, orange, gray purple, white pink, gray,
  1334.  --lightbue, lightgray, magenta, cyan, brown, black.
  1335.  
  1336.  --reset: turns all the wires off.
  1337.  --all: turns all the wires on.
  1338.  --quit: quits the program, and shutdown.
  1339.  
  1340.  --Important: Bundleworks assumes you have the regular
  1341.  --bundled cable, connected to the back of the computer for output. And the extension of color wire you choose.
  1342.  
  1343.  
  1344.  --Functions
  1345. function clear()
  1346. term.clear()
  1347. term.setCursorPos(1,1)
  1348. end
  1349. function clear2()
  1350. term.clear()
  1351. term.setCursorPos(1,5)
  1352. end
  1353. function light(color)
  1354. if color=="red" then
  1355. return colors.red,1
  1356. end
  1357. if color=="white" then
  1358. return colors.white,2
  1359. end
  1360. if color=="blue" then
  1361. return colors.blue,3
  1362. end
  1363. if color=="green" then
  1364. return colors.green,4
  1365. end
  1366. if color=="pink" then
  1367. return colors.pink,5
  1368. end
  1369. if color=="orange" then
  1370. return colors.orange,6
  1371. end
  1372. if color=="magenta" then
  1373. return colors.magenta,7
  1374. end
  1375. if color=="lightblue" then
  1376. return 8,8
  1377. end
  1378. if color=="yellow" then
  1379. return colors.yellow,9
  1380. end
  1381. if color=="lime" then
  1382. return colors.lime,10
  1383. end
  1384. if color=="gray" then
  1385. return colors.gray,11
  1386. end
  1387. if color=="quit" then
  1388. clear2()
  1389. print ("Thank you for using FuzzyPurp's BundleWorks!\n\nHave a colorful day : )")
  1390. sleep(2)
  1391. os.shutdown()
  1392. end
  1393. if color=="lightgray" then
  1394. return 256,12
  1395. end
  1396. if color=="cyan" then
  1397. return colors.cyan,13
  1398. end
  1399. if color=="purple" then
  1400. return colors.purple,14
  1401. end
  1402. if color=="brown" then
  1403. return colors.brown,15
  1404. end
  1405. if color=="black" then
  1406. return colors.black,16
  1407. end
  1408. if color=="reset" then
  1409. return (rs.getBundledOutput("back")*(-1))
  1410. end
  1411. if color=="all" then
  1412. return (65535)
  1413. end
  1414. return 0
  1415. end
  1416.  
  1417. ---More Fire!!
  1418. l={}
  1419. for i=1, 16 do
  1420. l[i]=0
  1421. end
  1422.  
  1423. clear()
  1424. while true do
  1425. term.setCursorPos(16,1)
  1426. print"-BundleWorks- 1.1"
  1427. redworks.showWindow(1,8,49,6,"-Choice of Color-","White| Orange| Magenta| LightBlue| Yellow| Lime| Pink| Gray| LightGray| Cyan| Purple| Blue| Brown| Green| Yellow| Black|   All|")
  1428. term.setCursorPos(1,17)
  1429. print("Type 'quit' to close, 'reset' all wires Off.")
  1430. term.setCursorPos(1,3)
  1431. write("Toggle which Colored Wire? ")
  1432. term.setCursorPos(28,3)
  1433.  
  1434. a=read()
  1435. num,place=light(a,l)
  1436. if num==rs.getBundledOutput("back")*(-1)  then
  1437. rs.setBundledOutput("back", 0)
  1438. clear2()
  1439. print("All Colored Wires are now OFF!")
  1440.  
  1441. for i=1, 16 do
  1442. l[i]=0
  1443. end
  1444. else
  1445. if num==65535 then
  1446. rs.setBundledOutput("back", 65535)
  1447. clear2()
  1448. print("All Colored Wires are now ON!")
  1449. for i=1, 16 do
  1450. l[i]=1
  1451. end
  1452. else
  1453.  
  1454. if num~=0 then
  1455. if l[place]==0 then
  1456. l[place]=1
  1457. else
  1458. l[place]=0
  1459. end
  1460. if l[place]==0 then
  1461. rs.setBundledOutput("back", rs.getBundledOutput("back")-num)
  1462. clear2()
  1463. print("Output for Wire: ".. string.upper(a) .." is now OFF.")
  1464. print(newline)
  1465. else
  1466. rs.setBundledOutput("back", rs.getBundledOutput("back")+num)
  1467. clear2()
  1468. print("Output for Wire: ".. string.upper(a) .." is now ON.")
  1469. print(newline)
  1470. end
  1471. else
  1472. clear2()
  1473. write("Nonsense. Please choose the available.")
  1474. print(newline)
  1475. end
  1476. end
  1477. end
  1478. end
  1479. ]])
  1480. BundleWorks.close()
  1481. Calculator=fs.open("mem/redworks/programs/Calculator","w")
  1482. Calculator.write([[term.clear()
  1483. term.setCursorPos(1,1)
  1484. print ("Redworks Calculator\n")
  1485. print ("Type an equation and press Enter\n")
  1486. local tEnv = {
  1487.     ["exit"] = function()
  1488.         bRunning = false
  1489.     end,
  1490. }
  1491. setmetatable( tEnv, { __index = getfenv() } )
  1492. local s = io.read()
  1493.     local nForcePrint = 0
  1494.     local func, e = loadstring( s )
  1495.  
  1496.     local func2, e2 = loadstring( "return "..s )
  1497.         if not func then
  1498.         if func2 then
  1499.             func = func2
  1500.             e = nil
  1501.             nForcePrint = 1
  1502.         end
  1503.     else
  1504.         if func2 then
  1505.             func = func2
  1506.         end
  1507.     end
  1508.     if func then
  1509.         setfenv( func, tEnv )
  1510.         local tResults = { pcall( func ) }
  1511.         if tResults[1] then
  1512.             local n = 1
  1513.             while (tResults[n + 1] ~= nil) or (n <= nForcePrint) do
  1514.                 print( tostring( tResults[n + 1] ) )
  1515.                 n = n + 1
  1516.             end
  1517.         else
  1518.             print( tResults[2] )
  1519.         end
  1520.     else
  1521.         print( e )
  1522.     end
  1523. ]])
  1524. Calculator.close()
  1525. Circuit=fs.open("mem/redworks/programs/Circuit","w")
  1526. Circuit.write([[function clear()
  1527. term.clear()
  1528. term.setCursorPos(1,1)
  1529. end
  1530.  
  1531. local running = true
  1532. while running do
  1533. clear()
  1534. print ("Which circuitry would you like?\n")
  1535. shell.run( "ls", "/mem/redworks/programs/circuits/" )
  1536. print()
  1537. choice = io.read()
  1538. choice = string.lower(choice)
  1539. cname = choice 
  1540.     choice = "/mem/redworks/programs/circuits/"..choice
  1541.     if fs.exists(choice) then
  1542.     break
  1543.     else
  1544.     print ("\nNo circuit found by that name.\n")
  1545.     end
  1546. end
  1547.  
  1548. sFile = ("logic/"..cname)
  1549. sPath = shell.resolve(sFile)
  1550.     if fs.exists(sPath) then
  1551. fs.delete( "logic/"..cname )
  1552. end
  1553.  
  1554. clear()
  1555. fs.makeDir("/logic")
  1556. fs.copy( choice, "logic/"..cname )
  1557. local tLines = {}
  1558. local file = io.open( "logic/"..cname, "r" )
  1559. local sLine = file:read()
  1560.     while sLine do
  1561.         table.insert( tLines, sLine )
  1562.         sLine = file:read()
  1563.     end
  1564. file:close()
  1565. table.insert( tLines, "" )
  1566. term.setCursorPos(1,1)
  1567. print (tLines[1])
  1568. print (tLines[2])
  1569. print (tLines[3])
  1570. print""
  1571. tLines[1] = string.sub(tLines[1],string.len(tLines[1]), -1)
  1572. tLines[2] = string.sub(tLines[2],string.len(tLines[2]), -1)
  1573. tLines[3] = string.sub(tLines[3],string.len(tLines[3]), -1)
  1574.  
  1575. numinputs = tonumber(tLines[1])
  1576. numoutputs = tonumber(tLines[2])
  1577. numextras = tonumber(tLines[3])
  1578. a = 7
  1579. b = a + numinputs
  1580. print ("=-=| "..cname.." |=-=")
  1581. print ("\nDefault Inputs are:")
  1582. while a < b do
  1583. s = string.sub(tLines[a], 13, -1)
  1584. s = string.sub(s, 1, string.len(s) - 1)
  1585. print (s)
  1586. a = a + 1
  1587. end
  1588. print ("Default Outputs are:")
  1589. b = a + numoutputs
  1590. while a < b do
  1591. s = string.sub(tLines[a], 14, -1)
  1592. s = string.sub(s, 1, string.len(s) - 1)
  1593. print (s)
  1594. a = a + 1
  1595. end
  1596. if numextras > 0 then
  1597. aa = a - 1
  1598. a = 1
  1599. print ("")
  1600. while a <= numextras do
  1601. s = string.sub(tLines[aa + a], 13, -1)
  1602. s = string.sub(s, 1, string.len(s) - 1)
  1603. print ("Enter a setting for - "..s)
  1604. choice = io.read()
  1605. tLines[aa + a] = "extra["..a.."] = \""..choice.."\""
  1606. a = a + 1
  1607. end
  1608. end
  1609.  
  1610. print ("\nWant to change the "..cname.."'s I/O settings?\n(y)es (n)o")
  1611. choice = io.read()
  1612. choice = string.lower(choice)
  1613. if choice == "y" then
  1614. c = 1
  1615. results = ""
  1616. print ("(right - left - back - front - top - bottom)")
  1617.     while c <= numinputs do
  1618.     print ("New Input for #"..c)
  1619.     choice = io.read()
  1620.     choice = string.lower(choice)
  1621.     tLines[c + 6] = "Input["..c.."] = \""..choice.."\""
  1622.     results = results.."Input #"..c.." set to - "..choice.."\n"
  1623.     c = c + 1
  1624.     end
  1625.     c = 1
  1626.     while c <= numoutputs do
  1627.     print ("New Output for #"..c)
  1628.     choice = io.read()
  1629.     choice = string.lower(choice)
  1630.     tLines[c + 6 + numinputs] = "Output["..c.."] = \""..choice.."\""
  1631.     results = results.."Output #"..c.." set to - "..choice.."\n"
  1632.     c = c + 1
  1633.     end
  1634.     term.clear()
  1635.     print ("\n"..results)
  1636.     print ("A ["..cname.."] circuit has been installed successfully.\n")
  1637. else
  1638. print ("\nA ["..cname.."] circuit has been installed successfully with default settings.\n")
  1639. end
  1640.  
  1641. print (" Type [ logic/"..cname.." ] to run the circuit. ")
  1642.  
  1643. table.remove (tLines , 1)
  1644. table.remove (tLines , 1)
  1645. table.remove (tLines , 1)
  1646.  
  1647. local file = io.open( "logic/"..cname, "w" )
  1648. for n, sLine in ipairs( tLines ) do
  1649. file:write( sLine .. "\n" )
  1650. end
  1651. file:close()
  1652. ]])
  1653. Circuit.close()
  1654. deluser=fs.open("mem/redworks/programs/deluser","w")
  1655. deluser.write([[local sPasswdPath = "ACCOUNTS.F"
  1656. params = { ... }
  1657. if #params < 1 then
  1658.     error( "Usage: deluser <username>" )
  1659. end
  1660. local tPasswd = { }
  1661.  
  1662. if fs.exists( sPasswdPath ) then
  1663.     print("File exists. Loading")
  1664.     local file = io.open(sPasswdPath)
  1665.     local sLine = file:read()
  1666.     while sLine do
  1667.         for k, v in string.gmatch(sLine, "(%w+)%s(%w+)") do
  1668.             tPasswd[k]=v           
  1669.         end
  1670.         sLine = file:read()
  1671.     end
  1672.     file:close()
  1673. end
  1674.  
  1675. tPasswd[params[1]].."]]"..[[=nil
  1676.  
  1677. local file = io.open(sPasswdPath,"w")
  1678. for user,pass in pairs(tPasswd) do
  1679.     file:write(user .. " " .. pass .."\n")
  1680. end
  1681. file:close()
  1682. print("User " .. params[1] .. " has been deleted.")
  1683. ]])
  1684. deluser.close()
  1685. GetKeyCode=fs.open("mem/redworks/programs/GetKeyCode","w")
  1686. GetKeyCode.write([[term.clear()
  1687. term.setCursorPos(1,1)
  1688.  
  1689. print("Press a key")
  1690.     while true do
  1691.         event, param = os.pullEvent()
  1692.         if event == "key" then
  1693.             print("Keycode is " .. param)
  1694.             break
  1695.         end
  1696.         sleep(0.5)
  1697.     end]])
  1698. GetKeyCode.close()
  1699. Lock=fs.open("mem/redworks/programs/Lock","w")
  1700. Lock.write([[function clear()
  1701.   term.clear()
  1702.   term.setCursorPos(18,5)
  1703.   term.setCursorBlink( false )
  1704. end
  1705.  
  1706. function reading()
  1707.   sleep(0.5)
  1708.   write "."
  1709. end
  1710. clear()
  1711. write "Logging out"
  1712. for n=1,5 do
  1713. reading()
  1714. end
  1715.  
  1716. sleep(1)
  1717.   term.setCursorBlink( false )
  1718.   term.setCursorPos(1,3)
  1719.   redworks.showLogo2()
  1720.   term.setCursorPos(1,17)
  1721. print"Terminal is locked. Press ENTER to log in."
  1722.  
  1723. -- disables terminate key
  1724. while true do
  1725. fault, event, param1, param2, param3 = pcall(os.pullEvent)
  1726.   if fault == false then
  1727.   elseif event == "key" and param1 == 28 then
  1728. break end
  1729. end
  1730.  
  1731. os.reboot()]])
  1732. Lock.close()
  1733. MineDwarf=fs.open("mem/redworks/programs/MineDwarf","w")
  1734. MineDwarf.write([[shell.run('mem/redworks/apis/redworks')
  1735.  
  1736. --Sprites
  1737. psprite = {}
  1738. psprite.up = '^'
  1739. psprite.down = 'V'
  1740. psprite.right = '>'
  1741. psprite.left = '<'
  1742. psprite.select = '-->'
  1743.  
  1744. --Functions
  1745.  
  1746. player = entity.new('Player', 5, 5, psprite.up, true, true)
  1747. entity.addvar(player, 'num', 1)
  1748. title = entity.new('title', 1, 1, 'MineDwarf: Beginnings   Press Backspace to Exit', true, false)
  1749. entity.setabs(title, true)
  1750. debug = entity.new('Debug', 2, 2, ' ', true, false)
  1751. entity.setabs(debug, true)
  1752.  
  1753. commands = entity.new('Command Bar', 1, window.h, 'E: Interact', true, false)
  1754. entity.setabs(commands, true)
  1755.  
  1756. wall = {}
  1757. wallnum = 1
  1758.  
  1759. function wall.new(x,y)
  1760.     wall[wallnum] = entity.new('Wall', x, y, '=', true, true )
  1761.     wallnum = wallnum+1
  1762. end
  1763.  
  1764. room = {}
  1765.  
  1766. function room.new(x1,y1,x2,y2)
  1767.     write('newroom')
  1768.     i=0
  1769.     while i < x2-x1+1 do
  1770.         wall.new(x1+i,y1)
  1771.         i= i+1
  1772.     end
  1773.     i=0
  1774.     while i < x2-x1+1 do
  1775.         wall.new(x1+i,y2)
  1776.         i= i+1
  1777.     end
  1778.     i=0
  1779.     while i < y2-y1+1 do
  1780.         if i ~= 4 then
  1781.             wall.new(x1, y1+i)
  1782.         end
  1783.         i= i+1
  1784.     end
  1785.     i=0
  1786.     while i < y2-y1+1 do
  1787.         wall.new(x2, y1+i)
  1788.         i= i+1
  1789.     end
  1790. end
  1791.  
  1792. room.new(7,7,15,15)
  1793.  
  1794. --||||| KEY EXECUTION |||||
  1795. function exec.key(k)
  1796.     --Up
  1797.     if k == 17 then
  1798.         entity.setpos( player, 0, -1, true )
  1799.         entity.setvar(player, 'num', entity.getvar(player, 'num') + 1 )
  1800.         entity.setchar( player, psprite.up )
  1801.     end
  1802.     --Down
  1803.     if k == 31 then
  1804.         entity.setpos( player, 0, 1, true )
  1805.         entity.setvar(player, 'num', entity.getvar(player, 'num') + 1 )
  1806.         entity.setchar( player, psprite.down )
  1807.     end
  1808.     --Left
  1809.     if k == 30 then
  1810.         entity.setpos( player, -1, 0, true )
  1811.         entity.setvar(player, 'num', entity.getvar(player, 'num') + 1 )
  1812.         entity.setchar( player, psprite.left )
  1813.     end
  1814.     --Right
  1815.     if k == 32 then
  1816.         entity.setpos( player, 1, 0, true )
  1817.         entity.setvar(player, 'num', entity.getvar(player, 'num') + 1 )
  1818.         entity.setchar( player, psprite.right )
  1819.     end
  1820.    
  1821.     if k == 18 then
  1822.         check = false
  1823.         local x = entity.getposx(player)
  1824.         local y = entity.getposy(player)
  1825.         local facing = entity.getvar(player, 'Character')
  1826.         if facing == psprite.up then
  1827.             check = get.locphys(x, y-1)
  1828.         elseif facing == psprite.down then
  1829.             check = get.locphys(x, y+1)
  1830.         elseif facing == psprite.right then
  1831.             check = get.locphys(x+1, y)
  1832.         elseif facing == psprite.left then
  1833.             check = get.locphys(x-1, y)
  1834.         end
  1835.        
  1836.         if check then
  1837.             check = entity.getvar(check, 'Name')
  1838.             if check == 'Wall' then
  1839.                 entity.setchar(debug, "That's a wall")
  1840.                 time.text = 1
  1841.             end
  1842.         end
  1843.     end
  1844.        
  1845.    
  1846.            
  1847.    
  1848.     --Screen
  1849.     --Up
  1850.     if k == 200 then
  1851.         screen.y = screen.y - 1
  1852.     end
  1853.     --Down
  1854.     if k == 208 then
  1855.         screen.y = screen.y + 1
  1856.     end
  1857.     --Left
  1858.     if k == 203 then
  1859.         screen.x = screen.x - 1
  1860.     end
  1861.     --Right
  1862.     if k == 205 then
  1863.         screen.x = screen.x + 1
  1864.     end
  1865. end
  1866.  
  1867. time = {}
  1868. time.text = 0
  1869. function exec.step()
  1870.     if time.text ~= 0 then
  1871.         time.text = time.text+1
  1872.     end
  1873.     if time.text == 50 then
  1874.         time.text = 0
  1875.         entity.setchar(debug, ' ')
  1876.     end
  1877.     --Window Follow
  1878.     screen.x = entity.getposx(player) - window.midw
  1879.     screen.y = entity.getposy(player) - window.midh
  1880. end
  1881.  
  1882. exec.start()
  1883. ]])
  1884. MineDwarf.close()
  1885. MinePedia=fs.open("mem/redworks/programs/MinePedia","w")
  1886. MinePedia.write([[term.clear()
  1887. term.setCursorPos(1,1)
  1888. tArgs = { ... }
  1889. if #tArgs > 0 then
  1890.  sTopic = tArgs[1]
  1891. else
  1892.  sTopic = "intro"
  1893. end
  1894.  
  1895. local w,h = term.getSize()
  1896. local file = io.open( "mem/redworks/minepedia/"..sTopic )
  1897. if file then
  1898.  
  1899.   local sLine = file:read()
  1900.   local nLines = 0
  1901.   while sLine do
  1902.     print( sLine )
  1903.     nLines = nLines + 1
  1904.     if nLines >= h then
  1905.         term.write( "Press any key to continue." )
  1906.         repeat
  1907.             local event = os.pullEvent()
  1908.         until event == "key"
  1909.         term.clearLine()
  1910.         local x,y = term.getCursorPos()
  1911.         term.setCursorPos(1,y)
  1912.     end
  1913.     sLine = file:read()
  1914.   end
  1915.   file:close()
  1916. else
  1917.   print( "No data available. Type 'minepedia list'" )
  1918. end
  1919. ]])
  1920. MinePedia.close()
  1921. RedWord=fs.open("mem/redworks/programs/RedWord","w")
  1922. RedWord.write([[--Made by kijzeer
  1923. --Version 1.2
  1924.  
  1925. term.setCursorBlink(true)
  1926. local sNew = "|   [Make new file]    Open existing file   |"
  1927. local sOpen = "|    Make new file    [Open existing file]  |"
  1928. local sYes = "|               [Yes]    No                 |"
  1929. local sNo = "|                Yes    [No]                |"
  1930. local sSave = "|      [Save]    Quit     Save & Quit       |"
  1931. local sQuit = "|       Save    [Quit]    Save & Quit       |"
  1932. local sSaveAndQuit = "|       Save     Quit    [Save & Quit]      |"
  1933. local iMenuXCor = 0
  1934. local sFile = ""
  1935. local sLine = ""
  1936. local tLines = {}
  1937. local iScrollX, iScrollY = 0,0
  1938. local x, y = 1,1
  1939. local w, h = term.getSize()
  1940.  
  1941. local function fMenuXCor()
  1942.     iMenuXCor = (w/2)-21
  1943. end
  1944.  
  1945. local function fCheckDir()
  1946.     if not fs.isDir("/files") then
  1947.         fs.makeDir("/files")
  1948.     end
  1949.     if shell.dir() ~=  "/files" then
  1950.         shell.setDir("/files")
  1951.     end
  1952. end
  1953.  
  1954. local function fExitDir()
  1955.     term.clear()
  1956.     shell.setDir("")
  1957. end
  1958.  
  1959. local function fOpenNew()
  1960.     tLines = {}
  1961.     table.insert(tLines, "")
  1962. end
  1963.  
  1964. local function fMenuNotExist()
  1965.     term.clear()
  1966.     term.setCursorBlink(false)
  1967.     local sYesOrNo = sYes
  1968.     term.setCursorPos(iMenuXCor,6)
  1969.     write(" ___________________________________________")
  1970.     term.setCursorPos(iMenuXCor,7)
  1971.     write("|                                           |")
  1972.     term.setCursorPos(iMenuXCor,8)
  1973.     write("|         Error: File doesn't exist.        |")
  1974.     term.setCursorPos(iMenuXCor,9)
  1975.     write("|          Do you want to make it?          |")
  1976.     term.setCursorPos(iMenuXCor,10)
  1977.     write("|                                           |")
  1978.     term.setCursorPos(iMenuXCor,11)
  1979.     write(sYesOrNo)
  1980.     term.setCursorPos(iMenuXCor,12)
  1981.     write("|___________________________________________|")
  1982.     repeat
  1983.         local sEvent, param = os.pullEvent()
  1984.         if sEvent == "key" then
  1985.             param = tostring(param)
  1986.             if param == "203" or param == "205" then
  1987.                 if sYesOrNo == sYes then
  1988.                     sYesOrNo = sNo
  1989.                     term.setCursorPos(iMenuXCor,11)
  1990.                     write(sYesOrNo)
  1991.                 elseif sYesOrNo == sNo then
  1992.                     sYesOrNo = sYes
  1993.                     term.setCursorPos(iMenuXCor,11)
  1994.                     write(sYesOrNo)
  1995.                 end
  1996.             end
  1997.         end
  1998.     until param == "28"
  1999.     if sYesOrNo == sYes then
  2000.         bExit = false
  2001.         fOpenNew()
  2002.     elseif sYesOrNo == sNo then
  2003.         bExit = true
  2004.     end
  2005. end
  2006.  
  2007. local function fLoad()
  2008.     sPath = shell.resolve(sFile)
  2009.     if fs.exists( sPath ) then
  2010.         local file = io.open( sPath , "r")
  2011.         local sLine = file:read()
  2012.         while sLine do
  2013.             table.insert(tLines, sLine)
  2014.             sLine = file:read()
  2015.         end
  2016.         file:close()
  2017.     else
  2018.         fMenuNotExist()
  2019.     end
  2020. end
  2021.  
  2022. local function fMenuNew()
  2023.     term.clear()
  2024.     term.setCursorBlink(false)
  2025.     term.setCursorPos(iMenuXCor,1)
  2026.     write(" ___________________________________________")
  2027.     term.setCursorPos(iMenuXCor,2)
  2028.     write("|                                           |")
  2029.     term.setCursorPos(iMenuXCor,3)
  2030.     write("|     How do you want to call the file?     |")
  2031.     term.setCursorPos(iMenuXCor,4)
  2032.     write("|                                           |")
  2033.     term.setCursorPos(iMenuXCor,5)
  2034.     write("|                                           |")
  2035.     term.setCursorPos(iMenuXCor,6)
  2036.     write("|___________________________________________|")
  2037.     term.setCursorPos(iMenuXCor+6,5)
  2038.     sFile = io.read()
  2039.     sFileExt = string.sub(sFile, -3)
  2040.     if sFileExt ~= ".txt" then
  2041.         sFile = sFile..".txt"
  2042.     end
  2043.     sPath = shell.resolve(sFile)
  2044.     if fs.exists(sPath) then
  2045.         term.clear()
  2046.         local sYesOrNo = sYes
  2047.         term.setCursorPos(iMenuXCor,6)
  2048.         write(" ___________________________________________")
  2049.         term.setCursorPos(iMenuXCor,7)
  2050.         write("|                                           |")
  2051.         term.setCursorPos(iMenuXCor,8)
  2052.         write("|         Error: File already exist.        |")
  2053.         term.setCursorPos(iMenuXCor,9)
  2054.         write("|          Do you want to edit it?          |")
  2055.         term.setCursorPos(iMenuXCor,10)
  2056.         write("|                                           |")
  2057.         term.setCursorPos(iMenuXCor,11)
  2058.         write(sYesOrNo)
  2059.         term.setCursorPos(iMenuXCor,12)
  2060.         write("|___________________________________________|")
  2061.         repeat
  2062.             local sEvent, param = os.pullEvent()
  2063.             if sEvent == "key" then
  2064.                 param = tostring(param)
  2065.                 if param == "203" or param == "205" then
  2066.                     if sYesOrNo == sYes then
  2067.                         sYesOrNo = sNo
  2068.                         term.setCursorPos(iMenuXCor,11)
  2069.                         write(sYesOrNo)
  2070.                     elseif sYesOrNo == sNo then
  2071.                         sYesOrNo = sYes
  2072.                         term.setCursorPos(iMenuXCor,11)
  2073.                         write(sYesOrNo)
  2074.                     end
  2075.                 end
  2076.             end
  2077.         until param == "28"
  2078.         if sYesOrNo == sYes then
  2079.             bExit = false
  2080.             fLoad()
  2081.         elseif sYesOrNo == sNo then
  2082.             bExit = true
  2083.         end
  2084.     else
  2085.         fOpenNew()
  2086.     end
  2087.     term.setCursorBlink(true)
  2088. end
  2089.  
  2090. local function fMenuOpen()
  2091.     term.clear()
  2092.     term.setCursorBlink(false)
  2093.     term.setCursorPos(1,8)
  2094.     write("Files:")
  2095.     term.setCursorPos(iMenuXCor,10)
  2096.     shell.run("ls")
  2097.     term.setCursorPos(iMenuXCor,1)
  2098.     write(" ___________________________________________")
  2099.     term.setCursorPos(iMenuXCor,2)
  2100.     write("|                                           |")
  2101.     term.setCursorPos(iMenuXCor,3)
  2102.     write("|      Which file do you want to open?      |")
  2103.     term.setCursorPos(iMenuXCor,4)
  2104.     write("|                                           |")
  2105.     term.setCursorPos(iMenuXCor,5)
  2106.     write("|                                           |")
  2107.     term.setCursorPos(iMenuXCor,6)
  2108.     write("|___________________________________________|")
  2109.     term.setCursorPos(iMenuXCor+7,5)
  2110.     term.setCursorBlink(true)
  2111.     sFile = read()
  2112.     sFileExt = string.sub(sFile, -3)
  2113.     if sFileExt ~= ".txt" then
  2114.         sFile = sFile..".txt"
  2115.     end
  2116.     sPath = shell.resolve(sFile)
  2117.     local file = io.open( sPath , "r")
  2118.         local sLine = file:read()
  2119.         while sLine do
  2120.             table.insert(tLines, sLine)
  2121.             sLine = file:read()
  2122.         end
  2123.         file:close()
  2124.     bExit = false
  2125. end
  2126.  
  2127. local function fMenuStart()
  2128.     local sChoose = sNew
  2129.     fMenuXCor()
  2130.     term.clear()
  2131.     term.setCursorBlink(false)
  2132.     term.setCursorPos(iMenuXCor,6)
  2133.     write(" ___________________________________________")
  2134.     term.setCursorPos(iMenuXCor,7)
  2135.     write("|                                           |")
  2136.     term.setCursorPos(iMenuXCor,8)
  2137.     write("| Welcome to the RedworksOS Word Processor, |")
  2138.     term.setCursorPos(iMenuXCor,9)
  2139.     write("|          what do you want to do?          |")
  2140.     term.setCursorPos(iMenuXCor,10)
  2141.     write("|                                           |")
  2142.     term.setCursorPos(iMenuXCor,11)
  2143.     write(sChoose)
  2144.     term.setCursorPos(iMenuXCor,12)
  2145.     write("|                                           |")
  2146.     term.setCursorPos(iMenuXCor,13)
  2147.     write("|         To access menu press Ctrl.        |")
  2148.     term.setCursorPos(iMenuXCor,14)
  2149.     write("|___________________________________________|")
  2150.     repeat
  2151.     local sEvent, param = os.pullEvent()
  2152.     if sEvent == "key" then
  2153.         param = tostring(param)
  2154.         if param == "203" or param == "205" then
  2155.             if sChoose == sNew then
  2156.                 sChoose = sOpen
  2157.                 term.setCursorPos(iMenuXCor,11)
  2158.                 write(sChoose)
  2159.             elseif sChoose == sOpen then
  2160.                 sChoose = sNew
  2161.                 term.setCursorPos(iMenuXCor,11)
  2162.                 write(sChoose)
  2163.             end
  2164.         end
  2165.     end
  2166.     until param == "28"
  2167.     if sChoose == sOpen then
  2168.         term.clear()
  2169.         fMenuOpen()
  2170.     elseif sChoose == sNew then
  2171.         term.clear()
  2172.         fMenuNew()
  2173.     end
  2174.     term.setCursorBlink(true)
  2175. end
  2176.  
  2177. local function fMenuExit()
  2178.     term.clear()
  2179.     term.setCursorBlink(false)
  2180.     local sSaveOrQuit = sSave
  2181.     term.setCursorPos(iMenuXCor,6)
  2182.     write(" ___________________________________________")
  2183.     term.setCursorPos(iMenuXCor,7)
  2184.     write("|                                           |")
  2185.     term.setCursorPos(iMenuXCor,8)
  2186.     write("|          What do you want to do?          |")
  2187.     term.setCursorPos(iMenuXCor,9)
  2188.     write("|                                           |")
  2189.     term.setCursorPos(iMenuXCor,10)
  2190.     write(sSaveOrQuit)
  2191.     term.setCursorPos(iMenuXCor,11)
  2192.     write("|___________________________________________|")
  2193.     repeat
  2194.         local sEvent, param = os.pullEvent()
  2195.         if sEvent == "key" then
  2196.             if param == 203 then
  2197.                 if sSaveOrQuit == sSave then
  2198.                     sSaveOrQuit = sSaveAndQuit
  2199.                     term.setCursorPos(iMenuXCor,10)
  2200.                     write(sSaveOrQuit)
  2201.                 elseif sSaveOrQuit == sQuit then
  2202.                     sSaveOrQuit = sSave
  2203.                     term.setCursorPos(iMenuXCor,10)
  2204.                     write(sSaveOrQuit)
  2205.                 elseif sSaveOrQuit == sSaveAndQuit then
  2206.                     sSaveOrQuit = sQuit
  2207.                     term.setCursorPos(iMenuXCor,10)
  2208.                     write(sSaveOrQuit)
  2209.                 end
  2210.             elseif param == 205 then
  2211.                 if sSaveOrQuit == sSave then
  2212.                     sSaveOrQuit = sQuit
  2213.                     term.setCursorPos(iMenuXCor,10)
  2214.                     write(sSaveOrQuit)
  2215.                 elseif sSaveOrQuit == sQuit then
  2216.                     sSaveOrQuit = sSaveAndQuit
  2217.                     term.setCursorPos(iMenuXCor,10)
  2218.                     write(sSaveOrQuit)
  2219.                 elseif sSaveOrQuit == sSaveAndQuit then
  2220.                     sSaveOrQuit = sSave
  2221.                     term.setCursorPos(iMenuXCor,10)
  2222.                     write(sSaveOrQuit)
  2223.                 elseif param == 29 or param == 157 then
  2224.                    
  2225.                 end
  2226.             end
  2227.         end
  2228.     until param == 28 or param == 29 or param == 157
  2229.     while true do
  2230.         if param == 29 or param == 157 then
  2231.             break
  2232.         elseif sSaveOrQuit == sSave then
  2233.             fSave()
  2234.             term.setCursorBlink(true)
  2235.             bExit = false
  2236.             break
  2237.         elseif sSaveOrQuit == sQuit then
  2238.             bExit = true
  2239.             break
  2240.         elseif sSaveOrQuit == sSaveAndQuit then
  2241.             bExit = true
  2242.             fSave()
  2243.             break
  2244.         end
  2245.     end
  2246. end
  2247.  
  2248. function fSave()
  2249.     local file = io.open( sPath, "w" )
  2250.     if file then
  2251.         for n, sLine in ipairs( tLines ) do
  2252.             file:write( sLine .. "\n" )
  2253.         end
  2254.         file:close()
  2255.     end
  2256. end
  2257.  
  2258. local function fPrintText()
  2259.     for y=1,h do
  2260.         term.setCursorPos( 1 - iScrollX, y )
  2261.         term.clearLine()
  2262.  
  2263.         local sLine = tLines[ y + iScrollY ]
  2264.         if sLine ~= nil then
  2265.             write( sLine )
  2266.         end
  2267.     end
  2268.     term.setCursorPos( x - iScrollX, y - iScrollY )
  2269. end
  2270.  
  2271. local function fPrintLine()
  2272.     local sLine = tLines[y]
  2273.     term.setCursorPos( 1 - iScrollX, y - iScrollY )
  2274.     term.clearLine()
  2275.     term.write( sLine )
  2276.     term.setCursorPos( x - iScrollX, y - iScrollY )
  2277. end
  2278.  
  2279. local function fSetCursor(x, y)
  2280.     local screenX = x - iScrollX
  2281.     local screenY = y - iScrollY
  2282.    
  2283.     if screenX < 1 then
  2284.         iScrollX = x - 1
  2285.         screenX = 1
  2286.         fPrintText()
  2287.     elseif screenX > w then
  2288.         iScrollX = x - w
  2289.         screenX = w
  2290.         fPrintText()
  2291.     end
  2292.    
  2293.     if screenY < 1 then
  2294.         iScrollY = y - 1
  2295.         screenY = 1
  2296.         fPrintText()
  2297.     elseif screenY > h then
  2298.         iScrollY = y - (h)
  2299.         screenY = h
  2300.         fPrintText()
  2301.     end
  2302.    
  2303.     term.setCursorPos( screenX, screenY )
  2304. end
  2305.  
  2306. fCheckDir()
  2307. fMenuStart()
  2308. term.clear()
  2309. term.setCursorPos(x,y)
  2310. term.setCursorBlink(true)
  2311. fPrintText()
  2312. while true do
  2313.     if not bExit then
  2314.         local sEvent, param = os.pullEvent()
  2315.         if sEvent == "key" then
  2316.             if param == 200 then
  2317.                 if y > 1 then
  2318.                     y = y - 1
  2319.                     x = math.min( x, string.len( tLines[y] ) + 1 )
  2320.                     fSetCursor( x, y )
  2321.                 end
  2322.            
  2323.             elseif param == 208 then
  2324.                 if y < #tLines then
  2325.                         y = y + 1
  2326.                         x = math.min( x, string.len( tLines[y] ) + 1 )
  2327.                         fSetCursor( x, y )
  2328.                 end
  2329.            
  2330.             elseif param == 203 then
  2331.                 if x > 1 then
  2332.                     x = x - 1
  2333.                     fSetCursor( x, y )
  2334.                 end
  2335.            
  2336.             elseif param == 205 then
  2337.                 if x < string.len( tLines[y] ) + 1 then
  2338.                     x = x + 1
  2339.                     fSetCursor( x, y )
  2340.                 end
  2341.                
  2342.             elseif param == 14 then
  2343.                  if x > 1 then
  2344.                     local sLine = tLines[y]
  2345.                     tLines[y] = string.sub(sLine,1,x-2) .. string.sub(sLine,x)
  2346.                     fPrintLine()
  2347.                
  2348.                     x = x - 1
  2349.                     fSetCursor( x, y )
  2350.                    
  2351.                 elseif y > 1 then
  2352.                     local sPrevLen = string.len( tLines[y-1] )
  2353.                     tLines[y-1] = tLines[y-1] .. tLines[y]
  2354.                     table.remove( tLines, y )
  2355.                     fPrintText()
  2356.                    
  2357.                     x = sPrevLen + 1
  2358.                     y = y - 1
  2359.                     fSetCursor( x, y )
  2360.                 end
  2361.                
  2362.             elseif param == 28 then
  2363.                 local sLine = tLines[y]
  2364.                 tLines[y] = string.sub(sLine,1,x-1)
  2365.                 table.insert( tLines, y+1, string.sub(sLine,x) )
  2366.                 fPrintText()
  2367.                
  2368.                 x = 1
  2369.                 y = y + 1
  2370.                 fSetCursor( x, y )     
  2371.                
  2372.                
  2373.             elseif param == 29 or param == 157 then
  2374.                 fMenuExit()
  2375.                 if bExit then
  2376.                     break
  2377.                 else
  2378.                     fPrintText()
  2379.                 end
  2380.            
  2381.             elseif param == 199 then
  2382.                 y = 1
  2383.                 x = string.len( tLines[y] ) + 1
  2384.                 fSetCursor(x, y)
  2385.            
  2386.             elseif param == 207 then
  2387.                 y = # tLines
  2388.                 x = string.len( tLines[y] ) + 1
  2389.                 fSetCursor(x, y)
  2390.            
  2391.             elseif param == 201 then
  2392.                 if y > h then
  2393.                     y = y - h
  2394.                 else
  2395.                     y = 1
  2396.                 end
  2397.                
  2398.                 if y < 1 then
  2399.                     y = 1
  2400.                 end
  2401.                
  2402.                 x = string.len( tLines[y] ) + 1
  2403.                 fSetCursor(x, y)
  2404.            
  2405.             elseif param == 209 then
  2406.                 if # tLines > h then
  2407.                     y = y + h
  2408.                 else
  2409.                     y = #tLines
  2410.                 end
  2411.                
  2412.                 if y > # tLines then
  2413.                     y = #tLines
  2414.                 end
  2415.                
  2416.                 x = string.len( tLines[y] ) + 1
  2417.                 fSetCursor(x, y)
  2418.            
  2419.             elseif param == 15 then
  2420.                 local sLine = tLines[y]
  2421.                 tLines[y] = string.sub(sLine,1,x-1) .. "    " .. string.sub(sLine,x)
  2422.                 fPrintLine()
  2423.            
  2424.                 x = x + 4
  2425.                 fSetCursor(x, y)
  2426.                
  2427.             elseif param == 211 then
  2428.                 if x < string.len(tLines[y]) + 1 then
  2429.                     local sLine = tLines[y]
  2430.                     tLines[y] = string.sub(sLine,1,x-1) .. string.sub(sLine,x+1)
  2431.                     fPrintLine()
  2432.                     fSetCursor( x, y )
  2433.                
  2434.                 elseif x == string.len(tLines[y]) + 1 then
  2435.                     if y < #tLines then
  2436.                         tLines[y] = tLines[y] .. tLines[y+1]
  2437.                         table.remove( tLines, y + 1 )
  2438.                         fPrintText()
  2439.                        
  2440.                         fSetCursor( x, y )
  2441.                     end
  2442.                 end
  2443.            
  2444.             end
  2445.  
  2446.         elseif sEvent == "char" then
  2447.             local sLine = tLines[y]
  2448.             tLines[y] = string.sub(sLine,1,x-1) .. param .. string.sub(sLine,x)
  2449.             fPrintLine()
  2450.        
  2451.             x = x + string.len( param )
  2452.             fSetCursor(x, y)
  2453.         end
  2454.     else
  2455.         break
  2456.     end
  2457. end
  2458.  
  2459. fExitDir()
  2460. term.clear()
  2461. term.setCursorBlink(false)
  2462. term.setCursorPos(1,1)
  2463. ]])
  2464. RedWord.close()
  2465. Tutorial=fs.open("mem/redworks/programs/Tutorial","w")
  2466. Tutorial.write([[-- BaseLine Variables
  2467. CurrentChapter = 1
  2468. CurrentSection = 1
  2469. ChapterTitles = {
  2470.  "How to Create a Program",
  2471.  "How to Display and clear Text",
  2472.  "How to Use and Display Variables",
  2473.  "How to get User Input",
  2474.  "How to use IF statements",
  2475.  "How to use loops",
  2476.  "How to use redstone",
  2477.  "How to use redpower bundles",
  2478.  "How to use events",
  2479.  "How to use functions",
  2480.  "Extra Tips and Extra Functions"
  2481. }
  2482. Chapter = {
  2483.                  [1] = {
  2484.                  "Key Points in this Chapter:\n1. Learning how to create a program.\n2. Learning how to save that program.\n3. Learning how to run that program.",
  2485.                  "1.1 - Learning how to create a program.\n\nOk so first things first right? We gotta learn how to create our first program. Creating a program is very simple in CC.\n\nedit programname\n\nedit means we want to create or edit program, and programname is the name of the program we wish to edit or create.",
  2486.                  "1.2 - Learning how to save that program.\n\nSo now your inside the editing feature of CC and you can move around almost like a notepad. We want to press the [Control] key which will bring up a menu at the bottom of your screen. Pressing the [Left] and [Right] arrow keys will change your selection in this menu. [SAVE] will save the program. [QUIT] will quit editing the program. By pressing [ENTER] we can choose our selection.",
  2487.                  "1.3 - Learning how to run that program.\n\nWe've created our little program, but how do we run it? Well thats simple. We type the program name into our terminal and press [ENTER], but remember all things in LUA are case-sensitive. Your program named \"Hello\" is not the same as your program named \"hello\".",
  2488.                  "1.4 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2489.                  "SIM"               
  2490.                  },
  2491.                  [2] = {
  2492.                  "Key Points in this Chapter:\n1. How to use print\n2. How to use write\n3. How to clear the screen.\n4. How to use the cursor position.\n5. How to clear a specific line.",
  2493.                  "2.1 - How to use print.\n\nTo show text to the user is a simple task. We do so by the following.\n\nprint (\"Hello User\")\n\nprint means to display the text to the user, and Hello User is the text we wish to display.",
  2494.                  "2.2 - How to use write.\n\nWhen you print text, the program automatically adds a linebreak after your print command, sometimes you may not wish to do this.\n\nwrite (\"Hello\")\nprint (\"User\")\n\nThese two lines would make the exact same appearance as the print line we made previously. The reason is because the write command does not generate a linebreak and we can use this to keep our current position and continue writing on the same line.",
  2495.                  "2.3 - How to clear the screen.\nQuite often you'll want to clear the screen automatically in your program.\n\nterm.clear()\n\nUsing this line we can clear the screen for our user to remove anything we don't want cluttering up the screen.",
  2496.                  "2.4 - How to use the cursor position.\nThe cursor position is a very powerful thing. For example, when you clear the screen, the cursor still stays on it's previous line. Meaning that after you clear the screen, your next print statement very well may appear at the bottom of the screen.",
  2497.                  "2.4 - How to use the cursor position.\nTo remedy this problem we've been given the command.\n\nterm.setCursorPos(1,1)\n\nThe first 1 in our statment is the horizontal position and the second 1 on our statement is the vertical posistion.",
  2498.                  "2.4 - How to use the cursor position.\nBy using the term.setCursorPos(1,1) directly after a term.clear(), we can make sure that the next text we show the user appears at the top of his screen.\n\nRemember, lua is case sensitive. term.setcursorpos(1,1) is not right.",
  2499.                  "2.5 - How to clear a specific line.\nBy using the term.setCursorPos we can create some pretty nifty tricks, like reprinting over lines already on the screen, or even clearing a certain line and printing something new.",
  2500.                  "2.5 - How to clear a specific line.\nterm.setCursorPos(1,1)\nprint (\"You won't see this\")\nterm.setCursorPos(1,1)\nterm.clearLine()\nprint (\"Hello User\")\n\nWe used the term.clearLine() to remove the line at 1,1 and then we printed a new line where the old line used to be.",
  2501.                  "2.6 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2502.                  "SIM"
  2503.                  },
  2504.                  [3] = {
  2505.                  "Key Points in this Chapter:\n1. What is a variable\n2. How to use a variable\n3. How to display a variable\n4. How to convert a variable",
  2506.                  "3.1 - What is a variable.\n\nThink of a variable as a container in which you can place text or a number. Using variables allows you to store information and modify it on the fly. Using variables correctly is the key to making a sucessful program.",
  2507.                  "3.2 - How to use a variable.\n\nThe first thing we should almost always do when we want to use a variable in a program is to define the variable. We do this by giving the variable a default piece of data. If we don't define a variable then the variable is considered NIL until it has been set.",
  2508.                  "3.2 - How to use a variable.\n\nA NIL variable can cause lots of problems in your program, if you try to add together 2 variables and one is NIL, you'll get an error, if you try printing a NIL variable you'll get an error.",
  2509.                  "3.2 - How to use a variable.\n\nWe'll be using the variable x from this point onward. Remember that x is different then X in lua.\n\nx = 0\n\nThis defined x to have a default value of 0. You could also do x = \"hello\" if you wanted it to contain text.",
  2510.                  "3.2 - How to use a variable.\n\nA variable will hold it's data until you change it. Therefor x = 0 means that x will be 0 until you tell your program that x is something different.",
  2511.                  "3.2 - How to use a variable.\n\nYou can also set variables as booleans, booleans are true and false.\nx = true\nThis would set x to true, which is different then \"true\". Using booleans gives you 1 more way to define a variable to be used later in your program.",
  2512.                  "3.3 - How to display a variable.\n\nBeing able to show a variable to the user is very important. Who wants to just save the user's name in a variable, but not show it to them during the program? When displaying variables we can use the print or write commands.",
  2513.                  "3.3 - How to display a variable.\nx = 0\nprint (x)\nx = \"Bob\"\nprint (\"Hello\"..x)\n\nYou'll notice in the last line that we used our x variable along with another piece of text. To do so we used .. which tells the program to add the x variable directly after the word Hello. In this syntax that would show the user   HelloBob  since we didn't add a space ;)",
  2514.                  "3.3 - How to display a variable.\n\nRemember variables are case sensitive, and that variable1 is different then Variable1.\nIf you wanted to place a variable inbetween text you could do.\n\nprint (\"Hello \"..x..\" how are you?\")\n\nThis would print   Hello Bob how are you?",
  2515.                  "3.4 - How to convert a variable.\n\nSometimes a variable might need to be converted, this is mainly the case when you want to use the variable as a number, but it's currently a string. For example:\nx = \"0\"\nx = x + 1\n\nThis will not work, as x equals \"0\"",
  2516.                  "3.4 - How to convert a variable.\n\nThe difference between 0 and \"0\" is that one is a number and the other is a string. You can't use the basic math functions on strings. Lua can convert a number to a string automatically but it cannot convert a string to a number automatically.",
  2517.                  "3.4 - How to convert a variable.\n\nx = 0\ny = \"1\"\nWe can't add those together atm, so we need to convert our string to a number so that we can add it to x.\ny = tonumber(y)\nThis converts y to a number (if it can't be converted to a number then y will be NIL)",
  2518.                  "3.4 - How to convert a variable.\n\nNow that we've converted y to a number we can do.\nx = x + y\nThis would make x equal to x(0) + y(1). This means that x is now equal to 1 and y hasn't changed so it's still 1 as well.",
  2519.                  "3.4 - How to convert a variable.\n\nIf we want to add a string to another string, we don't use the math symbols, we simply use ..\nx = \"Hello\"\ny = \"Bob\"\nx = x..y\nThis would make x = \"HelloBob\"",
  2520.                  "3.4 - How to convert a variable.\n\nRemember that Lua can convert a number to a string, but not the other way around. If you always want to be 100% positive what your variables are, use the functions tonumber(x) and tostring(x).",
  2521.                  "3.5 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2522.                  "SIM"               
  2523.                  },
  2524.                  [4] = {
  2525.                  "Key Points in this Chapter:\n1. How to get user input",
  2526.                  "4.1 - How to get user input.\n\nWhat's the point of having all these cool variables if your user can't make a variable be something they want? We fix this by allowing the user to input a variable into the program.",
  2527.                  "4.1 - How to get user input.\n\nx = io.read()\nThe io.read() tells the program to stop and wait for user input, when the user presses enter that information is then stored in the variable x and the program continues.\nUser input is always stored as a string, therefor if the user types 1 and presses enter, x will be come \"1\", not 1",
  2528.                  "4.1 - How to get user input.\n\nOnce the user's input is entered into the x variable you can use that variable like you would any other variable. This means if you then wanted to show the user their input you could follow your io.read() line with print(x)",
  2529.                  "4.1 - How to get user input.\n\nBy using the write command before an io.read() we can show text then have the user type after that text.\nwrite(\"Enter Your Name -\"\nname = io.read()\nThis would have the user type their name directly after the - in the write statement.",
  2530.                  "4.2 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2531.                  "SIM"               
  2532.                  },
  2533.                  [5] = {
  2534.                  "Key Points in this Chapter:\n1. What is an IF statement\n2. The ELSE statement\n3. The ELSEIF statement\n4. Complex IF's",
  2535.                  "5.1 - What is an IF statement.\n\nWe use IF statements to control the programs direction based on certain criteria that you define. Doing this allows us to do only certain things based on certain conditions.",
  2536.                  "5.1 - What is an IF statement.\n\nif name == \"Bob\" then\nprint (\"Hello Again Bob\")\nend\n\nThe 1st line says, if the variable name is equal to \"Bob\" then enter this IF statement. The next line is the code that will run if name does equal Bob. The 3rd line says to end the IF statement, if the name was not Bob the program would skip to the line directly after end.",
  2537.                  "5.1 - What is an IF statement.\n\nWe have many options in the IF statement, we could do:\nif x >= 1\nRemember we can't do that IF statement if x is a string x = \"1\".\nif name ~= \"Bob\"\nThe ~= option means is not equal too. This if statement would pass if the name was NOT Bob.",
  2538.                  "5.2 - The ELSE statement.\n\nSometimes we want to do 1 thing if our IF statement is true and something else if it's false.\nif name == \"Bob\" then\nprint (\"Hello Bob\")\nelse\nprint(\"Your not Bob\")\nend\n\n",
  2539.                  "5.2 - The ELSE statement.\n\nNotice how their is only 1 end statement as the last line of the entire IF statement. The ELSE line is a part of the current IF statement.",
  2540.                  "5.3 - The ELSEIF statement.\n\nSometimes we want to check for multiple outcomes inside an IF statement, we can achieve this using the ELSEIF statement. The key things to remember is that you still only need 1 end as the last line, because this is 1 full statement, and that you will need to include a then for an ELSEIF.",
  2541.                  "5.3 - The ELSEIF statement.\n\nif name == \"Bob\" then\nprint (\"Hello Bob\")\nelseif name == \"John\" then\nprint (\"Hello John\")\nelse\nprint (\"Hello Other\")\nend",
  2542.                  "5.3 - The ELSEIF statement.\n\nI still included the final else, which tells the program if the name wasn't Bob or John, then do something else. Notice again that there was only a single end as the last line, because this was 1 full statement.",
  2543.                  "5.4 - Complex IF's.\n\nIf's can become very complex depending on your situation. I will show some examples of more complex IF's:\nif name == \"Bob\" and name ~= \"John\" then\nWe are checking the variable twice in 1 if statement by using the AND statement. We could also use the OR statement",
  2544.                  "5.4 - Complex IF's.\n\nYou can also place IF statements inside other IF statements, just make sure you place an END statement at the correct place for each IF statement. Next page is an example of a pretty complex IF statement.",
  2545.                  "5.4 - Complex IF's.\nif name == \"Bob\" then\n     if x == 1 then\n     print(x)\n     else\n     print(\"Not 1\")\n     end\nprint (\"Hi Bob\")\nelse\nprint (\"Your not Bob\")\nend",
  2546.                  "5.4 - Complex IF's.\nWith precise placement of IF statements you can control the flow of your program to a great degree, this allows you to make sure the user is only seeing what you want them to see at all times.",
  2547.                  "5.5 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2548.                  "SIM"                               
  2549.                  },
  2550.                  [6] = {
  2551.                  "Key Points in this Chapter:\n1.What is a loop\n2.How to exit a loop\n3.Different kinds of loops",
  2552.                  "6.1 - What is a loop\n\nA loop is a section of code that will continually run until told otherwise. We use these to repeat the same code until we say otherwise.\n\nwhile true do\nend\n\nThis is a while loop that has no exit, it will continually run over and over again until the program crashes.",
  2553.                  "6.2 - How to exit a loop\nSince we don't want our loops to run until they crash we have to give them a way to stop. We do this by using the BREAK command.The break command is mostly placed inside an IF statement as just placing it in the loop itself would break the loop right away.",
  2554.                  "6.2 - How to exit a loop\n\nx = 0\nwhile true do\n     x = x + 1\n     if x == 10 then\n     break\n     end\nend\n\nNotice how are while statements have their own end? This would run the loop and continually add 1 to x until x == 10 then it will break out of the loop.",
  2555.                  "6.3 - Different kinds of loops\n\nYou don't always need to use the BREAK command. You can also include a condition in the WHILE statement for how long to run the loop.\n\nx = 0\nwhile x < 10 do\nx = x + 1\nend\n\nWe could also end this early with a BREAK as well.",
  2556.                  "6.3 - Different kinds of loops\n\nHeck we don't even have to use the WHILE statement to create a loop.\n\nfor x = 0, 10, 1 do\nprint (x)\nend\n\nThe first line says - x starts at 0, and continues until 10, increasing by 1 every time we come back to this line.",
  2557.                  "6.3 - Different kinds of loops\n\nSo using the for statement we could do.\n\nx = 5\nfor x, 50, 5 do\nprint (x)\nend\n\nThis would printout 5 then 10 then 15 ect ect until reaching 50.",
  2558.                  "6.4 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2559.                  "SIM"                               
  2560.                  },
  2561.                  [7] = {
  2562.                  "Key Points in this Chapter:\n1. Turning on and off redstone\n2. Checking and Setting Redstone",
  2563.                  "7.1 - Turning on and off redstone\n\nOne of the greatest features of CC is that your computer can not only receive redstone signals, but it can also send them as well. We have 6 directions to choose from and they are:\ntop, bottom, front, back, left, right",
  2564.                  "7.1 - Turning on and off redstone\n\nWe can control redstone with our computer using 2 basic commands, redstone.getInput(side) and redstone.setOutput(side, boolean).\nWe have to remember to place our sides in quotes though IE \"left\"",
  2565.                  "7.2 - Checking and Setting Redstone\n\nredstone.setOutput(\"back\", true)\nThis tells the computer to turn on the redstone output on the back of the computer. We can replace true with false to turn off the redstone output to the back.",
  2566.                  "7.2 - Checking and Setting Redstone\n\nif redstone.getInput(\"back\") == true then\nprint \"Redstone is on\"\nend\n\nThis would enter the IF statement if their was power running to the back of the computer.",
  2567.                  "7.2 - Checking and Setting Redstone\n\nBy checking and setting different redstone sources while using IF statements we can control multiple things connected to our computer based on the redstone connections.",
  2568.                  "7.3 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2569.                  "SIM"                                               
  2570.                  },
  2571.                  [8] = {
  2572.                  "Key Points in this Chapter:\n1. How to turn on a single color\n2. How to turn off a single color\n3. Using multiple colors\n4. Testing Inputs\n5. Turning off all colors.",
  2573.                  "8.1 - How to turn on a single color\n\nrs.setBundledOutput(\"back\", colors.white)\n\nThis would turn on the white output in the back.",
  2574.                  "8.2 - How to turn off a single color\n\nrs.setBundledOutput(\"back\", rs.getBundledOutput(\"back\") - colors.white)\n\n This would turn off only the color white in the back.",
  2575.                  "8.3 - Using Multiple colors\nUsing multiple colors is much easier when you use the colors.combine colors.subtract functions.",
  2576.                  "8.3 - Using Multiple colors\n\nout = colors.combine(colors.blue, colors.white)\nrs.setBundledOutput(\"back\", out)\n\nThis would turn on blue and white at the back\nout = colors.subtract(out, colors.blue)\nrs.setBundledOutput(\"back\", out)\nThis would turn off blue, but leave white on.",
  2577.                  "8.4 - Testing Inputs\n\nin = rs.getBundledInput(\"back\")\nif colors.test(in, colors.white) == true then\n\nThis would get the current input and store it in the in variable. We then use colors.test on the in variable to see if white is on.",
  2578.                  "8.5 - Turning off all colors\n\nrs.setBundledOutput(\"back\", 0)\n\nSetting the output to 0 is the quickest and most efficient way to turn off all colors at the same time.",
  2579.                  "8.6 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2580.                  "SIM"                                                               
  2581.                  },
  2582.                  [9] = {
  2583.                  "Key Points in this Chapter:\n1. What is an event?\n2. How do we check for events\n3. What types of events are there?\n4. Using event loops\n5. WHATS GOING ON!",
  2584.                  "9.1 - What is an event?\n\nAn event can be many things, from redstone to timers, as well as smashing your face on the keyboard. These can all trigger events within a program, and by correctly using the os.pullEvent() command we can make sure that no matter what happens, we'll know about it!",
  2585.                  "9.2 - How do we check for events\n\nevent, param1, param2 = os.pullEvent()\n\nPlacing this line in your code will stop the program until ANY event triggers. So just by pressing a key, you will pass this statement because a keypress is an event",
  2586.                  "9.2 - How do we check for events\n\nThe easiest way to check for an event happening is the IF statement.\n\nif event == \"char\" and param1 == \"q\" then\n This line would trigger if you pressed q on your keyboard.",
  2587.                  "9.3 - What types of events are there\n\nchar - triggers on keypress\nkey - triggers on keypress\ntimer - triggers on a timer running out\nalarm - triggers on an alarm going off\nredstone - triggers on any change to redstone",
  2588.                  "9.3 - What types of events are there\n\ndisk - triggers on disk insertion\ndisk_eject - triggers on disk ejection",
  2589.                  "9.4 - Using event loops\n\nUsing the pullEvent() function inside a loop is a great way to determine when to break the loop. For instance:\n\nwhile true do\nevent, param1, param2 = os.pullEvent()\n     if event == \"char\" and param1 == \"q\" then\n     break\n     end\nend",
  2590.                  "9.5 - WHATS GOING ON!\nThis is a cool test program to make, so that you can see exactly whats happening in events.\n\nwhile true do\nevent, param1, param2, param3 = os.pullEvent()\nprint (\"Event = \"..event)\nprint (\"P1 = \"..param1)\nprint (\"P2 = \"..param2)\nprint (\"P3 = \"..param3)\nend\n\nDon't Forget to Hold control+t to exit the loop.",
  2591.                  "9.6 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2592.                  "SIM"                                                                               
  2593.                  },
  2594.                  [10] = {
  2595.                  "Key Points in this Chapter:\n1. What is a function?\n2. How to use a basic function\n3. How to get a return value from a function",
  2596.                  "10.1 - What is a function\n\nThink of a function as a part of your code that can be ran from anywhere inside your code. Once your function is done running, it will take you back to where your code left off.",
  2597.                  "10.2 - How to use a basic function\n\nfunction hello()\nprint (\"Hello\")\nend\n\n Here we created a function named hello, and inside that function we placed a print statement that says hello.",
  2598.                  "10.2 - How to use a basic function\n\nNow that we have our function created, anytime and anywhere in our program, we can place\nhello()\nThis will jump to the function, run the functions code, then come back to where you called the function.",
  2599.                  "10.3 - How to get a return value from a function\n\nMost of the time we want our functions to do repetitious tasks for us though, to do this we can create a more advanced function that will return a value based on what happens in the function.",
  2600.                  "10.3 - How to get a return value from a function\n\nfunction add(num1, num2)\nresult = tonumber(num1) + tonumber(num2)\nreturn result\nend\n\nThis is our adding function, it takes 2 numbers that we supply and returns the result.",
  2601.                  "10.3 - How to get a return value from a function\n\nTo call our adding function we use.\nx = add(5,5)\nThis makes the add function use the numbers 5 and 5, which it will then add together and return to us. We save that return data in x",
  2602.                  "10.3 - How to get a return value from a function\n\nBy combining what we already know, we must assume that we can use variables instead of numbers in our function. Therefor making:\nx = add(x, y)\nA perfectly good way to add 2 variables together.",
  2603.                  "10.4 - Practice What We've Learned!\n\nYou'll see a new option at the bottom of your screen now. You can press [SPACE] to continue onward to the next chapter, you can also press [ENTER] to run this chapters simulation.\nDon't worry, you won't hurt my feelings by not practicing.",
  2604.                  "SIM"                                                                                               
  2605.                  },
  2606.                  [11] = {
  2607.                  "This is not a Chapter, this is just random blurbs of extra information about other features and functions.",
  2608.                  "Blurb 0 (The Most Important) - Use NOTEPAD++ to edit your code, the in-game edit kinda sucks\n\nFind your code in saves/world/computer/#",
  2609.                  "Blurb 1 - sleep(1) will pause your code for 1 second",
  2610.                  "Blurb 2 - timername = os.startTimer(1) will cause a timer to go off in 1 second, use events to check for the name",
  2611.                  "Blurb 3 - Making your code readable helps everyone\nwhile true do\nif x == 5 then\nend\nend\nCOULD BE\nwhile true do\n     if x == 5 then\n     end\nend",
  2612.                  "Blurb 4 - Atleast 75% of the time, an error tells you exactly whats wrong with your program.\nSomething with NIL means your trying to use a NIL variable.",
  2613.                  "Blurb 5 - Google Is your friend, just try \"lua strings tutorial\"",
  2614.                  "Blurb 6 - Theres DOZENS of functions I didn't go over, you should read about them on the interwebs\nstring.len()\nstring.sub()\nstring.find()\nio.open()\nio.close()",
  2615.                  "Blurb 7 - No one will help you if you don't work on the code yourself and provide them with it.",
  2616.                  "Blurb 8 - When your ready for more advanced coding, start looking into the default programs as well as other user created content.",
  2617.                  "Blurb 9 - Using matrice's is a good test to see if your grasping lua",
  2618.                  "Blurb 10 - You don't have to use functions if you trully don't understand them, they can make your life easier, but they can also make your life much harder.",
  2619.                  "Blurb 11 - Find help on IRC, but prepare to have code ready to be shown. http://webchat.esper.net/?channels=#computercraft",
  2620.                  "Blurb 12 - You can do almost anything your imagination can think up.....except magic",
  2621.                  "Blurb 13 - By holding Control+t you can terminate any program. By holding Control+r you can reboot any computer.",
  2622.                  "END"
  2623.                  }
  2624. }
  2625. --"Event Checker""String Functions","File Functions","Math Functions","Calling Another Program","Disk Functions",
  2626. Examples = {
  2627. [1] = {
  2628. "Event Checker",
  2629. "This example is a great way to check what event is being passed through the pullEvent() statement. It uses a while loop that continually checks the pull event until the q key is pressed.",
  2630. '
  2631. term.clear()
  2632. term.setCursorPos(1,1)
  2633. while true do
  2634. event, param1, param2 = os.pullEvent()
  2635. print ("Event "..event)
  2636. print ("P1 "..param1)
  2637. print ("P2 "..param2)
  2638. if event == "char" and param1 == "q" then break end
  2639. end
  2640. ',
  2641. "eventchecker" -- filename to be saved as
  2642. },
  2643. [2] = {
  2644. "String Functions",
  2645. "This example uses some basic string functions to modify a string, we will take a long string and shorten it to 10 characters which will all be lowercased.",
  2646. '
  2647. text = "Hello user and Welcome to the World of ComputerCraft"
  2648.  
  2649. blah = string.sub(text, 1, 10)
  2650.  
  2651. -- This line says that blah is now equal to 1-10 of text.
  2652.  
  2653. blah = string.lower(blah)
  2654.  
  2655. -- This line says that blah is now equal to an all lowercase blah.
  2656.  
  2657. print (blah)
  2658. -- This outputs as  hello user
  2659. ',
  2660. "stringfunc"
  2661. },
  2662. [3] = {
  2663. "File Functions",
  2664. "This example will check to see if the file exists we will open it in \"r\" mode to read, it will then read line by line from the file and store that data into an array, we will then print each line of the file with a 1 second sleep between them. We can use the file:write(variable) statement if the file is opened in write mode \"w\". We can append a file with the \"wa\" mode.",
  2665. '
  2666. filename = "tutorial"
  2667. if fs.exists(filename) == true then
  2668. file = io.open(filename, "r")
  2669. local i = 1
  2670. local line = {}
  2671. while true do
  2672. line[i] = file:read()
  2673. if line[i] == nil then break end
  2674. print (line[i])
  2675. sleep (1)
  2676. i = i + 1
  2677. end
  2678. else
  2679. print ("File doesn't exist.")
  2680. end
  2681. ',
  2682. "filefunc"
  2683. },
  2684. [4] = {
  2685. "Math Functions",
  2686. "This tutorial will go over some of the math functions, we'll start with a random number from 1-10, we will then divide that by another random number from 1-20. We will take the result and round upwards to a whole number. Meaning that if our answer is 3.1 it will still round up to 4. You'll notice the math.ciel function which does our rounding, we could also use math.floor which would round down instead.",
  2687. '
  2688. num1 = math.random(1,10)
  2689. num2 = math.random(1,20)
  2690. print ("Number 1 is "..num1)
  2691. print ("Number 2 is "..num2)
  2692. result = num1 / num2
  2693. print ("UnRounded Result is "..result)
  2694. result = math.ceil(result)
  2695. print ("Rounded Result is "..result)
  2696. ',
  2697. "mathfunc"
  2698. },
  2699. [5] = {
  2700. "Calling Another Program",
  2701. "This tutorial is very basic, but is a very powerful function as well. The shell.run command allows us to run a command from within our program as if we were at the terminal.",
  2702. '
  2703. shell.run("programname")
  2704. shell.run("mkdir", "testing")
  2705. This would create a testing directory
  2706. shell.run("copy", "disk/hello", "world")
  2707. This would copy the program hello from the disk directory
  2708. and place it as a program called world in your root
  2709. directory.
  2710. ',
  2711. "callprogram"
  2712. },
  2713. [6] = {
  2714. "Disk Functions",
  2715. "This tutorial will go over some of the basic floppy functions. We will check to see if a floppy is inserted using the pullEvent() loop, we will then make sure the floppy doesn't have a label, and if it's label is empty we will label it Blank and exit the program. We can learn more about the disk functions by typing help disk at the terminal.",
  2716. '
  2717. while true do
  2718. event, param1 = os.pullEvent()
  2719. if event == "disk" then
  2720.     if disk.getLabel(param1) == nil then
  2721.     disk.setLabel(param1, "Blank")
  2722.     print ("Disk labeled to Blank")
  2723.     print ("Disk is in the "..param1.." side")
  2724.     break
  2725.     else
  2726.     print ("Disk already has a label.")
  2727.     print ("Disk is in the "..param1.." side")
  2728.     break
  2729.     end
  2730. end
  2731. end
  2732. ',
  2733. "diskfunc"
  2734. }
  2735. }
  2736.  
  2737. function SaveExamples()
  2738. term.clear()
  2739. term.setCursorPos(1,1)
  2740. print "This will save all of the example programs into the examples folder."
  2741. print ""
  2742. print "You can access this folder by typing"
  2743. print "cd examples"
  2744. print "You can list the examples by typing"
  2745. print "ls"
  2746. print "You can simply edit the file to look"
  2747. print "at it, or you can open the file inside"
  2748. print "your computer by finding it in your"
  2749. print "saves directory under your worldname"
  2750. print "and computer #."
  2751. print ""
  2752. print ("Your Computer # is "..os.getComputerID())
  2753. pressany()
  2754. sleep(.5)
  2755. shell.run("mkdir", "examples")
  2756. local i = 1
  2757.     while true do
  2758.         if Examples[i] ~= nil then
  2759.         file = io.open("examples/"..Examples[i][4], "w")
  2760.         file:write("--\[\[\n")
  2761.         file:write(Examples[i][2])
  2762.         file:write("--\[\[\n")
  2763.         file:write(Examples[i][3])
  2764.         file:close()
  2765.         i = i + 1
  2766.         else
  2767.         break
  2768.         end
  2769.     end
  2770. term.clear()
  2771. term.setCursorPos(1,1)
  2772. print "Examples correctly saved to /examples"
  2773. pressany()
  2774. end
  2775.  
  2776. function mainmenu()
  2777. while true do
  2778. term.clear()
  2779. term.setCursorPos(1,1)
  2780. print "--------------------------------------"
  2781. print "| ComputerCraft Interactive Tutorial |"
  2782. print "|            By: Casper7526          |"
  2783. print "--------------------------------------"
  2784. print "|                                    |"
  2785. print "| 1. Start                           |"
  2786. print "| 2. Choose Chapter                  |"
  2787. print "| 3. Examples                        |"
  2788. print "| 4. Save Examples To File           |"
  2789. print "| 5. Exit                            |"
  2790. print "|                                    |"
  2791. print "--------------------------------------"
  2792. event, param1, param2, param3 = os.pullEvent()
  2793. if event == "char" and param1 == "5" then break end
  2794. if event == "char" and param1 == "1" then chapter = 1 LoadChapter(chapter) end
  2795. if event == "char" and param1 == "2" then ChooseChapter() end
  2796. if event == "char" and param1 == "3" then ChooseExample() end
  2797. if event == "char" and param1 == "4" then SaveExamples() end
  2798. end
  2799. end
  2800.  
  2801. function LoadExample(num)
  2802. term.clear()
  2803. term.setCursorPos(1,1)
  2804. print (Examples[num][2])
  2805. pressany()
  2806. term.clear()
  2807. sleep(.5)
  2808. term.setCursorPos(1,1)
  2809. print (Examples[num][3])
  2810. pressany()
  2811. end
  2812.  
  2813. function ChooseExample()
  2814. while true do
  2815. term.clear()
  2816. term.setCursorPos(1,1)
  2817. print "--------------- Example Index ---------------"
  2818. print "---------------------------------------------"
  2819. print ""
  2820. local i = 1
  2821.     while true do
  2822.     if Examples[i] == nil then break end
  2823.     print (i..". "..Examples[i][1])
  2824.     i = i + 1
  2825.     end
  2826. print ""
  2827. print "q. Quit"
  2828. print "---------------------------------------------"
  2829. write "Choice - "
  2830. choice = io.read()
  2831. if string.lower(choice) == "q" then break end
  2832. if Examples[tonumber(choice)] == nil then print "Thats not a valid chapter." sleep(1) else
  2833. LoadExample(tonumber(choice)) break end
  2834. end
  2835. end
  2836.  
  2837.  
  2838.  
  2839. function ChooseChapter()
  2840. while true do
  2841. term.clear()
  2842. term.setCursorPos(1,1)
  2843. print "--------------- Chapter Index ---------------"
  2844. print "---------------------------------------------"
  2845. print ""
  2846. local i = 1
  2847.     while true do
  2848.     if ChapterTitles[i] == nil then break end
  2849.     print (i..". "..ChapterTitles[i])
  2850.     i = i + 1
  2851.     end
  2852. print ""
  2853. print "q. Quit"
  2854. print "---------------------------------------------"
  2855. write "Choice - "
  2856. choice = io.read()
  2857. if string.lower(choice) == "q" then break end
  2858. if ChapterTitles[tonumber(choice)] == nil then print "Thats not a valid chapter." sleep(1) else
  2859. LoadChapter(tonumber(choice)) break end
  2860. end
  2861. end
  2862.  
  2863. function LoadChapter(chapter)
  2864. while true do
  2865. term.clear()
  2866. term.setCursorPos(1,1)
  2867. print ("Chapter "..chapter.." - "..ChapterTitles[chapter])
  2868. print ("---------------------------------------------")
  2869. print (Chapter[chapter][CurrentSection])
  2870. print ""
  2871. if Chapter[chapter][CurrentSection + 1] == "END" then print "THATS ALL FOLKS!" else
  2872. print "Press [Space] To Continue"
  2873. end
  2874. print "[q] - Main Menu [b] - Previous Page."
  2875. if Chapter[chapter][CurrentSection + 1] == "SIM" then print "Press [Enter] To Run Simulation" end
  2876. event, param1, param2, param3 = os.pullEvent()
  2877.     if event == "key" and param1 == 28 and Chapter[chapter][CurrentSection + 1] == "SIM" then Sim(chapter) EndSim(chapter) chapter = chapter + 1 CurrentSection = 1 end
  2878.     if event == "char" and param1 == "q" then CurrentSection = 1 break end
  2879.     if event == "char" and param1 == "b" then
  2880.     CurrentSection = CurrentSection - 1
  2881.     if CurrentSection == 0 then CurrentSection = 1 end
  2882.     end
  2883.     if event == "char" and param1 == " " and Chapter[chapter][CurrentSection + 1] ~= "END" then
  2884.     if Chapter[chapter][CurrentSection + 1] == "SIM" then chapter = chapter + 1 CurrentSection = 1 else CurrentSection = CurrentSection + 1 end
  2885.     end
  2886. end
  2887. end
  2888.  
  2889. function EndSim(chapter)
  2890. while true do
  2891. term.clear()
  2892. term.setCursorPos(1,1)
  2893. print "Great work back there!"
  2894. print ""
  2895. print "Press [ENTER] to move on to the next chapter"
  2896. event, param1, param2 = os.pullEvent()
  2897. if event == "key" and param1 == 28 then shell.run("rm", "tmptut") break end
  2898. end
  2899. end
  2900.  
  2901. function pressany()
  2902. term.setCursorPos(1,17)
  2903. print "Press Any Key To Continue"
  2904. event = os.pullEvent()
  2905. end
  2906.  
  2907. function Sim(chapter)
  2908. stage = 1
  2909. while true do
  2910. term.clear()
  2911. term.setCursorPos(1,1)
  2912.     if chapter == 1 then
  2913.     print "Your Goals:"
  2914.     print ""
  2915.     print "* Create a program named hello."
  2916.     print "* Type anything you wish inside that program."
  2917.     print "* Save and Exit the program."
  2918.     print "* Run the program."
  2919.     print ""
  2920.     print "quit   will exit the sim early."
  2921.     write (">") input = io.read()
  2922.     if input == "quit" then break end
  2923.         --------------------------------
  2924.         if stage == 1 then
  2925.             if input == "edit hello" then
  2926.             shell.run("edit", "tmptut")
  2927.             print "Great Job, now let's run our program!"
  2928.             sleep(2)
  2929.             stage = 2
  2930.             else
  2931.             print "Remember, lua is case sensitive."
  2932.             print "Try"
  2933.             print "edit hello"
  2934.             sleep(2)           
  2935.             end
  2936.         elseif stage == 2 then
  2937.             if input == "hello" then break
  2938.             else
  2939.             print "Remember, lua is case sensitive."
  2940.             print "Try"
  2941.             print "hello"
  2942.             sleep(2)           
  2943.             end
  2944.         end
  2945.     end
  2946.  
  2947.     if chapter == 2 then
  2948.     print "Your Goals:"
  2949.     print ""
  2950.     print "* Create a program named hello."
  2951.     print "* Clear the Screen"
  2952.     print "* Set the Cursor Pos to 1,1"
  2953.     print "* Print \"Hello Loser\" on line 1 of the screen."
  2954.     print "* Print \"Welcome\" on line 2 of the screen."
  2955.     print "* Clear the 1st line."
  2956.     print "* Print \"Hello User\" on line 1 of the screen."
  2957.     print "* Run your program!"
  2958.     print ""
  2959.     print "You can type \"example\" at anytime to see the correct syntax."
  2960.     print "quit   will exit the sim early."
  2961.     print ""
  2962.     write (">") input = io.read()
  2963.         if input == "quit" then break end
  2964.         if input == "edit hello" then shell.run("edit", "tmptut") end
  2965.         if input == "hello" then shell.run("tmptut") pressany()
  2966.         term.clear()
  2967.         term.setCursorPos(1,1)
  2968.         print "Did you program work as you expected?"
  2969.         print ""
  2970.         print "Press [ENTER] to end the simulation."
  2971.         print "Press Any Other Key to go back and work on your program."
  2972.         event, param1, param2 = os.pullEvent()
  2973.         if event == "key" and param1 == 28 then break end
  2974.         end
  2975.         if string.lower(input) == "example" then
  2976.         term.clear()
  2977.         term.setCursorPos(1,1)
  2978.         print ("term.clear()")
  2979.         print ("term.setCursorPos(1,1)")
  2980.         print ("print (\"Hello Loser\"")
  2981.         print ("print (\"Welcome\"")
  2982.         print ("term.setCursorPos(1,1)")
  2983.         print ("term.clearLine()")
  2984.         print ("print (\"Hello User\")")
  2985.         pressany()
  2986.         end
  2987.     end
  2988.  
  2989.     if chapter == 3 then
  2990.     print "Your Goals:"
  2991.     print ""
  2992.     print "--Use the program hello--"
  2993.     print "* Create the following variables."
  2994.     print "  x = 1"
  2995.     print "  y = \"2\""
  2996.     print "  z = 0"
  2997.     print "  text = \"Output \""
  2998.     print "* Add x and y together and store that value in z, then print text and z to the user on the same line."
  2999.     print "* Run your program!"
  3000.     print ""
  3001.     print "You can type \"example\" at anytime to see the correct syntax."
  3002.     print "quit   will exit the sim early."
  3003.     print ""
  3004.     write (">") input = io.read()
  3005.         if input == "quit" then break end
  3006.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3007.         if input == "hello" then shell.run("tmptut") pressany()
  3008.         term.clear()
  3009.         term.setCursorPos(1,1)
  3010.         print "Did you program work as you expected?"
  3011.         print ""
  3012.         print "Press [ENTER] to end the simulation."
  3013.         print "Press Any Other Key to go back and work on your program."
  3014.         event, param1, param2 = os.pullEvent()
  3015.         if event == "key" and param1 == 28 then break end
  3016.         end
  3017.         if string.lower(input) == "example" then
  3018.         term.clear()
  3019.         term.setCursorPos(1,1)
  3020.         print ("term.clear()")
  3021.         print ("term.setCursorPos(1,1)")
  3022.         print ("x = 1")
  3023.         print ("y = \"2\"")
  3024.         print ("z = 0")
  3025.         print ("text = \"Output \"")
  3026.         print ("y = tonumber(y)")
  3027.         print ("z = x + y")
  3028.         print ("print (text..z)")
  3029.         pressany()
  3030.         end
  3031.     end
  3032.    
  3033.     if chapter == 4 then
  3034.     print "Your Goals:"
  3035.     print ""
  3036.     print "--Use the program hello--"
  3037.     print "* Ask the user for their name"
  3038.     print "* Show them the line:"
  3039.     print "  Hello name how are you today?"
  3040.     print "  With name replaced by their input."
  3041.     print "* Run your program!"
  3042.     print ""
  3043.     print "You can type \"example\" at anytime to see the correct syntax."
  3044.     print "quit   will exit the sim early."
  3045.     print ""
  3046.     write (">") input = io.read()
  3047.         if input == "quit" then break end
  3048.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3049.         if input == "hello" then shell.run("tmptut") pressany()
  3050.         term.clear()
  3051.         term.setCursorPos(1,1)
  3052.         print "Did you program work as you expected?"
  3053.         print ""
  3054.         print "Press [ENTER] to end the simulation."
  3055.         print "Press Any Other Key to go back and work on your program."
  3056.         event, param1, param2 = os.pullEvent()
  3057.         if event == "key" and param1 == 28 then break end
  3058.         end
  3059.         if string.lower(input) == "example" then
  3060.         term.clear()
  3061.         term.setCursorPos(1,1)
  3062.         print ("term.clear()")
  3063.         print ("term.setCursorPos(1,1)")
  3064.         print ("write(\"Whats your name? \")")
  3065.         print ("name = io.read()")
  3066.         print ("print (\"Hello \"..name..\" how are you today?\")")
  3067.         pressany()
  3068.         end
  3069.     end
  3070.    
  3071.    
  3072.     if chapter == 5 then
  3073.     print "Your Goals:"
  3074.     print ""
  3075.     print "--Use the program hello--"
  3076.     print "* Ask the user for their name"
  3077.     print "* If their name is Bob or John then welcome them."
  3078.     print "* If their name isn't Bob or John, then tell them to get lost!"
  3079.     print "* Run your program!"
  3080.     print ""
  3081.     print "You can type \"example\" at anytime to see the correct syntax."
  3082.     print "quit   will exit the sim early."
  3083.     print ""
  3084.     write (">") input = io.read()
  3085.         if input == "quit" then break end
  3086.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3087.         if input == "hello" then shell.run("tmptut") pressany()
  3088.         term.clear()
  3089.         term.setCursorPos(1,1)
  3090.         print "Did you program work as you expected?"
  3091.         print ""
  3092.         print "Press [ENTER] to end the simulation."
  3093.         print "Press Any Other Key to go back and work on your program."
  3094.         event, param1, param2 = os.pullEvent()
  3095.         if event == "key" and param1 == 28 then break end
  3096.         end
  3097.         if string.lower(input) == "example" then
  3098.         term.clear()
  3099.         term.setCursorPos(1,1)
  3100.         print ("term.clear()")
  3101.         print ("term.setCursorPos(1,1)")
  3102.         print ("write(\"Whats your name? \")")
  3103.         print ("name = io.read()")
  3104.         print ("if name == \"Bob\" or name == \"John\" then ")
  3105.         print ("print (\"Welcome \"..name)")
  3106.         print ("else")
  3107.         print ("print (\"Get lost!\")")
  3108.         print ("end")
  3109.         pressany()
  3110.         end
  3111.     end
  3112.    
  3113.    
  3114.     if chapter == 6 then
  3115.     print "Your Goals:"
  3116.     print ""
  3117.     print "--Use the program hello--"
  3118.     print "* Create a loop that continually asks the user for their name."
  3119.     print "* Only exit that loop if they enter Bob as their name."
  3120.     print "* Try using the BREAK statement as well as without."
  3121.     print "* Run your program!"
  3122.     print ""
  3123.     print "You can type \"example\" at anytime to see the correct syntax."
  3124.     print "quit   will exit the sim early."
  3125.     print ""
  3126.     write (">") input = io.read()
  3127.         if input == "quit" then break end
  3128.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3129.         if input == "hello" then shell.run("tmptut") pressany()
  3130.         term.clear()
  3131.         term.setCursorPos(1,1)
  3132.         print "Did you program work as you expected?"
  3133.         print ""
  3134.         print "Press [ENTER] to end the simulation."
  3135.         print "Press Any Other Key to go back and work on your program."
  3136.         event, param1, param2 = os.pullEvent()
  3137.         if event == "key" and param1 == 28 then break end
  3138.         end
  3139.         if string.lower(input) == "example" then
  3140.         term.clear()
  3141.         term.setCursorPos(1,1)
  3142.         print ("term.clear()")
  3143.         print ("term.setCursorPos(1,1)")
  3144.         print ""
  3145.         print ("while name ~= \"Bob\" do")
  3146.         print ("write(\"Whats your name? \")")
  3147.         print ("name = io.read()")
  3148.         print ("end")
  3149.         print ""
  3150.         print ("while true do")
  3151.         print ("write(\"Whats your name? \")")
  3152.         print ("name = io.read()")
  3153.         print ("    if name == \"Bob\" then")
  3154.         print ("    break")
  3155.         print ("    end")
  3156.         print ("end")
  3157.         pressany()
  3158.         end
  3159.     end
  3160.    
  3161.    
  3162.     if chapter == 7 then
  3163.     print "Your Goals:"
  3164.     print ""
  3165.     print "--Use the program hello--"
  3166.     print "* Check to see if there is redstone current coming into the back of your computer"
  3167.     print "* If there is current coming in the back then turn on the current to the front"
  3168.     print "* If there isn't current coming in the back, then turn off the current to the front"
  3169.     print "* Tell the user if you turned the current on or off."
  3170.     print "* Run your program!"
  3171.     print ""
  3172.     print "You can type \"example\" at anytime to see the correct syntax."
  3173.     print "quit   will exit the sim early."
  3174.     print ""
  3175.     write (">") input = io.read()
  3176.         if input == "quit" then break end
  3177.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3178.         if input == "hello" then shell.run("tmptut") pressany()
  3179.         term.clear()
  3180.         term.setCursorPos(1,1)
  3181.         print "Did you program work as you expected?"
  3182.         print ""
  3183.         print "Press [ENTER] to end the simulation."
  3184.         print "Press Any Other Key to go back and work on your program."
  3185.         event, param1, param2 = os.pullEvent()
  3186.         if event == "key" and param1 == 28 then break end
  3187.         end
  3188.         if string.lower(input) == "example" then
  3189.         term.clear()
  3190.         term.setCursorPos(1,1)
  3191.         print ("term.clear()")
  3192.         print ("term.setCursorPos(1,1)")
  3193.         print ("if redstone.getInput(\"back\") == true then")
  3194.         print ("redstone.setOutput(\"front\", true)")
  3195.         print ("print (\"Front is now on.\")")
  3196.         print ("else")
  3197.         print ("redstone.setOutput(\"front\", false)")
  3198.         print ("print (\"Front is now off.\")")
  3199.         print ("end")
  3200.         pressany()
  3201.         end
  3202.     end
  3203.    
  3204.     if chapter == 8 then
  3205.     print "Your Goals:"
  3206.     print ""
  3207.     print "--Use the program hello--"
  3208.     print "--Use the back output of the computer--"
  3209.     print "* Turn on white"
  3210.     print "* Turn on blue"
  3211.     print "* Turn on purple"
  3212.     print "* Turn off blue"
  3213.     print "* Turn off all colors"
  3214.     print "* Check to see if white is coming in the front"
  3215.     print "* Run your program!"
  3216.     print ""
  3217.     print "You can type \"example\" at anytime to see the correct syntax."
  3218.     print "quit   will exit the sim early."
  3219.     print ""
  3220.     write (">") input = io.read()
  3221.         if input == "quit" then break end
  3222.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3223.         if input == "hello" then shell.run("tmptut") pressany()
  3224.         term.clear()
  3225.         term.setCursorPos(1,1)
  3226.         print "Did you program work as you expected?"
  3227.         print ""
  3228.         print "Press [ENTER] to end the simulation."
  3229.         print "Press Any Other Key to go back and work on your program."
  3230.         event, param1, param2 = os.pullEvent()
  3231.         if event == "key" and param1 == 28 then break end
  3232.         end
  3233.         if string.lower(input) == "example" then
  3234.         term.clear()
  3235.         term.setCursorPos(1,1)
  3236.         print ("term.clear()")
  3237.         print ("term.setCursorPos(1,1)")
  3238.         print ("out = colors.combine(colors.white, colors.blue, colors.purple)")
  3239.         print ("rs.setBundledOutput(\"back\", out)")
  3240.         print ("out = colors.subtract(out, colors.blue)")
  3241.         print ("rs.setBundledOutput(\"back\", out)")
  3242.         print ("rs.setBundledOutput(\"back\", 0)")
  3243.         print ("in = rs.getBundledInput(\"front\")")
  3244.         print ("if colors.test(in, colors.white) == true then")
  3245.         print ("print (\"White is on in front\")")
  3246.         print ("else")
  3247.         print ("print (\"White is off in front\")")
  3248.         print ("end")
  3249.         pressany()
  3250.         end
  3251.     end
  3252.    
  3253.     if chapter == 9 then
  3254.     print "Your Goals:"
  3255.     print ""
  3256.     print "--Use the program hello--"
  3257.     print "* Create an event loop"
  3258.     print "* Print the char that was pressed"
  3259.     print "* Stop the loop when the q key is pressed"
  3260.     print "* Stop the loop if the redstone event happens"
  3261.     print "* Run your program!"
  3262.     print ""
  3263.     print "You can type \"example\" at anytime to see the correct syntax."
  3264.     print "quit   will exit the sim early."
  3265.     print ""
  3266.     write (">") input = io.read()
  3267.         if input == "quit" then break end
  3268.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3269.         if input == "hello" then shell.run("tmptut") pressany()
  3270.         term.clear()
  3271.         term.setCursorPos(1,1)
  3272.         print "Did you program work as you expected?"
  3273.         print ""
  3274.         print "Press [ENTER] to end the simulation."
  3275.         print "Press Any Other Key to go back and work on your program."
  3276.         event, param1, param2 = os.pullEvent()
  3277.         if event == "key" and param1 == 28 then break end
  3278.         end
  3279.         if string.lower(input) == "example" then
  3280.         term.clear()
  3281.         term.setCursorPos(1,1)
  3282.         print ("term.clear()")
  3283.         print ("term.setCursorPos(1,1)")
  3284.         print ("while true do")
  3285.         print ("event, param1, param2 = os.pullEvent()")
  3286.         print ("     if event == \"redstone\" then")
  3287.         print ("     break")
  3288.         print ("     end")
  3289.         print ("     if event == \"char\" and param1 == \"q\" then")
  3290.         print ("     break")
  3291.         print ("     else")
  3292.         print ("     print (\"You pressed - \"..param1)")
  3293.         print ("     end")
  3294.         print ("end")
  3295.         pressany()
  3296.         end
  3297.     end
  3298.    
  3299.     if chapter == 10 then
  3300.     print "Your Goals:"
  3301.     print ""
  3302.     print "--Use the program hello--"
  3303.     print "* Ask the user for their first name."
  3304.     print "* Ask the user for their last name."
  3305.     print "* Combine the 2 strings using a function"
  3306.     print "  return the result into the fullname variable"
  3307.     print "* Show the user their full name"
  3308.     print "* Run your program!"
  3309.     print ""
  3310.     print "You can type \"example\" at anytime to see the correct syntax."
  3311.     print "quit   will exit the sim early."
  3312.     print ""
  3313.     write (">") input = io.read()
  3314.         if input == "quit" then break end
  3315.         if input == "edit hello" then shell.run("edit", "tmptut") end
  3316.         if input == "hello" then shell.run("tmptut") pressany()
  3317.         term.clear()
  3318.         term.setCursorPos(1,1)
  3319.         print "Did you program work as you expected?"
  3320.         print ""
  3321.         print "Press [ENTER] to end the simulation."
  3322.         print "Press Any Other Key to go back and work on your program."
  3323.         event, param1, param2 = os.pullEvent()
  3324.         if event == "key" and param1 == 28 then break end
  3325.         end
  3326.         if string.lower(input) == "example" then
  3327.         term.clear()
  3328.         term.setCursorPos(1,1)
  3329.         print ("term.clear()")
  3330.         print ("term.setCursorPos(1,1)")
  3331.         print ("function combine(s1, s2)")
  3332.         print ("result = s1..s2")
  3333.         print ("return result")
  3334.         print ("end")
  3335.         print ("write(\"What's your first name? \")")
  3336.         print ("firstname = io.read()")
  3337.         print ("write(\"What's your last name? \")")
  3338.         print ("lastname = io.read()")
  3339.         print ("fullname = combine(firstname, lastname)")
  3340.         print ("print (\"Hello \"..fullname)")
  3341.         pressany()
  3342.         end
  3343.     end
  3344.    
  3345.    
  3346. end
  3347.    
  3348. end
  3349.  
  3350.  
  3351. mainmenu()
  3352.  
  3353. print "You don't need to thank me."
  3354. print "Thank yourself for learning!"
  3355. print "To learn more search online!"
  3356. print "You can also type help <topic>!"
  3357. ]])
  3358. Tutorial.close()
  3359. dkjson=fs.open("mem/redworks/programs/cc-get-bin/dkjson.lua","w")
  3360. dkjson.write([[    --[==[
  3361.  
  3362. David Kolf's JSON module for Lua 5.1/5.2
  3363. ========================================
  3364.  
  3365. *Version 2.1*
  3366.  
  3367. This module writes no global values, not even the module table.
  3368. Import it using
  3369.  
  3370.     json = require ("dkjson")
  3371.  
  3372. Exported functions and values:
  3373.  
  3374. `json.encode (object [, state])`
  3375. --------------------------------
  3376.  
  3377. Create a string representing the object. `Object` can be a table,
  3378. a string, a number, a boolean, `nil`, `json.null` or any object with
  3379. a function `__tojson` in its metatable. A table can only use strings
  3380. and numbers as keys and its values have to be valid objects as
  3381. well. It raises an error for any invalid data types or reference
  3382. cycles.
  3383.  
  3384. `state` is an optional table with the following fields:
  3385.  
  3386.   - `indent`  
  3387.     When `indent` (a boolean) is set, the created string will contain
  3388.     newlines and indentations. Otherwise it will be one long line.
  3389.   - `keyorder`  
  3390.     `keyorder` is an array to specify the ordering of keys in the
  3391.     encoded output. If an object has keys which are not in this array
  3392.     they are written after the sorted keys.
  3393.   - `level`  
  3394.     This is the initial level of indentation used when `indent` is
  3395.     set. For each level two spaces are added. When absent it is set
  3396.     to 0.
  3397.   - `buffer`  
  3398.     `buffer` is an array to store the strings for the result so they
  3399.     can be concatenated at once. When it isn't given, the encode
  3400.     function will create it temporary and will return the
  3401.     concatenated result.
  3402.   - `bufferlen`  
  3403.     When `bufferlen` is set, it has to be the index of the last
  3404.     element of `buffer`.
  3405.   - `tables`  
  3406.     `tables` is a set to detect reference cycles. It is created
  3407.     temporary when absent. Every table that is currently processed
  3408.     is used as key, the value is `true`.
  3409.  
  3410. When `state.buffer` was set, the return value will be `true` on
  3411. success. Without `state.buffer` the return value will be a string.
  3412.  
  3413. `json.decode (string [, position [, null]].."]]"..[[)`
  3414. --------------------------------------------
  3415.  
  3416. Decode `string` starting at `position` or at 1 if `position` was
  3417. omitted.
  3418.  
  3419. `null` is an optional value to be returned for null values. The
  3420. default is `nil`, but you could set it to `json.null` or any other
  3421. value.
  3422.  
  3423. The return values are the object or `nil`, the position of the next
  3424. character that doesn't belong to the object, and in case of errors
  3425. an error message.
  3426.  
  3427. Two metatables are created. Every array or object that is decoded gets
  3428. a metatable with the `__jsontype` field set to either `array` or
  3429. `object`. If you want to provide your own metatables use the syntax
  3430.  
  3431.     json.decode (string, position, null, objectmeta, arraymeta)
  3432.  
  3433. `<metatable>.__jsonorder`
  3434. -------------------------
  3435.  
  3436. `__jsonorder` can overwrite the `keyorder` for a specific table.
  3437.  
  3438. `<metatable>.__jsontype`
  3439. ------------------------
  3440.  
  3441. `__jsontype` can be either `"array"` or `"object"`. This is mainly useful
  3442. for tables that can be empty. (The default for empty tables is
  3443. `"array"`).
  3444.  
  3445. `<metatable>.__tojson (self, state)`
  3446. ------------------------------------
  3447.  
  3448. You can provide your own `__tojson` function in a metatable. In this
  3449. function you can either add directly to the buffer and return true,
  3450. or you can return a string. On errors nil and a message should be
  3451. returned.
  3452.  
  3453. `json.null`
  3454. -----------
  3455.  
  3456. You can use this value for setting explicit `null` values.
  3457.  
  3458. `json.version`
  3459. --------------
  3460.  
  3461. Set to `"dkjson 2.1"`.
  3462.  
  3463. `json.quotestring (string)`
  3464. ---------------------------
  3465.  
  3466. Quote a UTF-8 string and escape critical characters using JSON
  3467. escape sequences. This function is only necessary when you build
  3468. your own `__tojson` functions.
  3469.  
  3470. `json.addnewline (state)`
  3471. -------------------------
  3472.  
  3473. When `state.indent` is set, add a newline to `state.buffer` and spaces
  3474. according to `state.level`.
  3475.  
  3476. LPeg support
  3477. ------------
  3478.  
  3479. When the local configuration variable
  3480. `always_try_using_lpeg` is set, this module tries to load LPeg to
  3481. replace the functions `quotestring` and `decode`. The speed increase
  3482. is significant. You can get the LPeg module at
  3483.   <http://www.inf.puc-rio.br/~roberto/lpeg/>.
  3484. When LPeg couldn't be loaded, the pure Lua functions stay active.
  3485.  
  3486. In case you don't want this module to require LPeg on its own,
  3487. disable this option:
  3488.  
  3489.     --]==]
  3490.     local always_try_using_lpeg = true
  3491.     --[==[
  3492.  
  3493. In this case you can later load LPeg support using
  3494.  
  3495. ### `json.use_lpeg ()`
  3496.  
  3497. Require the LPeg module and replace the functions `quotestring` and
  3498. and `decode` with functions that use LPeg patterns.
  3499. This function returns the module table, so you can load the module
  3500. using:
  3501.  
  3502.     json = require "dkjson".use_lpeg()
  3503.  
  3504. Alternatively you can use `pcall` so the JSON module still works when
  3505. LPeg isn't found.
  3506.  
  3507.     json = require "dkjson"
  3508.     pcall (json.use_lpeg)
  3509.  
  3510. ### `json.using_lpeg`
  3511.  
  3512. This variable is set to `true` when LPeg was loaded successfully.
  3513.  
  3514. You can contact the author by sending an e-mail to 'kolf' at the
  3515. e-mail provider 'gmx.de'.
  3516.  
  3517. ---------------------------------------------------------------------
  3518.  
  3519. *Copyright (C) 2010, 2011 David Heiko Kolf*
  3520.  
  3521. Permission is hereby granted, free of charge, to any person obtaining
  3522. a copy of this software and associated documentation files (the
  3523. "Software"), to deal in the Software without restriction, including
  3524. without limitation the rights to use, copy, modify, merge, publish,
  3525. distribute, sublicense, and/or sell copies of the Software, and to
  3526. permit persons to whom the Software is furnished to do so, subject to
  3527. the following conditions:
  3528.  
  3529. The above copyright notice and this permission notice shall be
  3530. included in all copies or substantial portions of the Software.
  3531.  
  3532. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  3533. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  3534. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  3535. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  3536. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  3537. ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  3538. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  3539. SOFTWARE.
  3540.  
  3541. <!-- This documentation can be parsed using Markdown to generate HTML.
  3542.      The source code is enclosed in a HTML comment so it won't be displayed
  3543.      by browsers, but it should be removed from the final HTML file as
  3544.      it isn't a valid HTML comment (and wastes space).
  3545.   -->
  3546.  
  3547.   <!--]==]
  3548.  
  3549. -- global dependencies:
  3550. local pairs, type, tostring, tonumber, getmetatable, setmetatable, rawset =
  3551.       pairs, type, tostring, tonumber, getmetatable, setmetatable, rawset
  3552. local error, require, pcall = error, require, pcall
  3553. local floor, huge = math.floor, math.huge
  3554. local strrep, gsub, strsub, strbyte, strchar, strfind, strlen, strformat =
  3555.       string.rep, string.gsub, string.sub, string.byte, string.char,
  3556.       string.find, string.len, string.format
  3557. local concat = table.concat
  3558.  
  3559. if _VERSION == 'Lua 5.1' then
  3560.   local function noglobals (s,k,v) error ("global access: " .. k, 2) end
  3561.   setfenv (1, setmetatable ({}, { __index = noglobals, __newindex = noglobals }))
  3562. end
  3563. local _ENV = nil -- blocking globals in Lua 5.2
  3564.  
  3565. local json = { version = "dkjson 2.1" }
  3566.  
  3567. pcall (function()
  3568.   -- Enable access to blocked metatables.
  3569.   -- Don't worry, this module doesn't change anything in them.
  3570.   local debmeta = require "debug".getmetatable
  3571.   if debmeta then getmetatable = debmeta end
  3572. end)
  3573.  
  3574. json.null = setmetatable ({}, {
  3575.   __tojson = function () return "null" end
  3576. })
  3577.  
  3578. local function isarray (tbl)
  3579.   local max, n, arraylen = 0, 0, 0
  3580.   for k,v in pairs (tbl) do
  3581.     if k == 'n' and type(v) == 'number' then
  3582.       arraylen = v
  3583.       if v > max then
  3584.         max = v
  3585.       end
  3586.     else
  3587.       if type(k) ~= 'number' or k < 1 or floor(k) ~= k then
  3588.         return false
  3589.       end
  3590.       if k > max then
  3591.         max = k
  3592.       end
  3593.       n = n + 1
  3594.     end
  3595.   end
  3596.   if max > 10 and max > arraylen and max > n * 2 then
  3597.     return false -- don't create an array with too many holes
  3598.   end
  3599.   return true, max
  3600. end
  3601.  
  3602. local escapecodes = {
  3603.   ["\""] = "\\\"", ["\\"] = "\\\\", ["\b"] = "\\b", ["\f"] = "\\f",
  3604.   ["\n"] = "\\n",  ["\r"] = "\\r",  ["\t"] = "\\t"
  3605. }
  3606.  
  3607. local function escapeutf8 (uchar)
  3608.   local value = escapecodes[uchar]
  3609.   if value then
  3610.     return value
  3611.   end
  3612.   local a, b, c, d = strbyte (uchar, 1, 4)
  3613.   a, b, c, d = a or 0, b or 0, c or 0, d or 0
  3614.   if a <= 0x7f then
  3615.     value = a
  3616.   elseif 0xc0 <= a and a <= 0xdf and b >= 0x80 then
  3617.     value = (a - 0xc0) * 0x40 + b - 0x80
  3618.   elseif 0xe0 <= a and a <= 0xef and b >= 0x80 and c >= 0x80 then
  3619.     value = ((a - 0xe0) * 0x40 + b - 0x80) * 0x40 + c - 0x80
  3620.   elseif 0xf0 <= a and a <= 0xf7 and b >= 0x80 and c >= 0x80 and d >= 0x80 then
  3621.     value = (((a - 0xf0) * 0x40 + b - 0x80) * 0x40 + c - 0x80) * 0x40 + d - 0x80
  3622.   else
  3623.     return ""
  3624.   end
  3625.   if value <= 0xffff then
  3626.     return strformat ("\\u%.4x", value)
  3627.   elseif value <= 0x10ffff then
  3628.     -- encode as UTF-16 surrogate pair
  3629.     value = value - 0x10000
  3630.     local highsur, lowsur = 0xD800 + floor (value/0x400), 0xDC00 + (value % 0x400)
  3631.     return strformat ("\\u%.4x\\u%.4x", highsur, lowsur)
  3632.   else
  3633.     return ""
  3634.   end
  3635. end
  3636.  
  3637. local function fsub (str, pattern, repl)
  3638.   -- gsub always builds a new string in a buffer, even when no match
  3639.   -- exists. First using find should be more efficient when most strings
  3640.   -- don't contain the pattern.
  3641.   if strfind (str, pattern) then
  3642.     return gsub (str, pattern, repl)
  3643.   else
  3644.     return str
  3645.   end
  3646. end
  3647.  
  3648. local function quotestring (value)
  3649.   -- based on the regexp "escapable" in https://github.com/douglascrockford/JSON-js
  3650.   value = fsub (value, "[%z\1-\31\"\\\127]", escapeutf8)
  3651.   if strfind (value, "[\194\216\220\225\226\239]") then
  3652.     value = fsub (value, "\194[\128-\159\173]", escapeutf8)
  3653.     value = fsub (value, "\216[\128-\132]", escapeutf8)
  3654.     value = fsub (value, "\220\143", escapeutf8)
  3655.     value = fsub (value, "\225\158[\180\181]", escapeutf8)
  3656.     value = fsub (value, "\226\128[\140-\143\168\175]", escapeutf8)
  3657.     value = fsub (value, "\226\129[\160-\175]", escapeutf8)
  3658.     value = fsub (value, "\239\187\191", escapeutf8)
  3659.     value = fsub (value, "\239\191[\176\191]", escapeutf8)
  3660.   end
  3661.   return "\"" .. value .. "\""
  3662. end
  3663. json.quotestring = quotestring
  3664.  
  3665. local function addnewline2 (level, buffer, buflen)
  3666.   buffer[buflen+1] = "\n"
  3667.   buffer[buflen+2] = strrep ("  ", level)
  3668.   buflen = buflen + 2
  3669.   return buflen
  3670. end
  3671.  
  3672. function json.addnewline (state)
  3673.   if state.indent then
  3674.     state.bufferlen = addnewline2 (state.level or 0,
  3675.                            state.buffer, state.bufferlen or #(state.buffer))
  3676.   end
  3677. end
  3678.  
  3679. local encode2 -- forward declaration
  3680.  
  3681. local function addpair (key, value, prev, indent, level, buffer, buflen, tables, globalorder)
  3682.   local kt = type (key)
  3683.   if kt ~= 'string' and kt ~= 'number' then
  3684.     return nil, "type '" .. kt .. "' is not supported as a key by JSON."
  3685.   end
  3686.   if prev then
  3687.     buflen = buflen + 1
  3688.     buffer[buflen] = ","
  3689.   end
  3690.   if indent then
  3691.     buflen = addnewline2 (level, buffer, buflen)
  3692.   end
  3693.   buffer[buflen+1] = quotestring (key)
  3694.   buffer[buflen+2] = ":"
  3695.   return encode2 (value, indent, level, buffer, buflen + 2, tables, globalorder)
  3696. end
  3697.  
  3698. encode2 = function (value, indent, level, buffer, buflen, tables, globalorder)
  3699.   local valtype = type (value)
  3700.     local valmeta
  3701.     if valtype == 'string' then
  3702.         valmeta = ''
  3703.     else
  3704.         valmeta = getmetatable (value)
  3705.     end
  3706.  
  3707.     valmeta = type (valmeta) == 'table' and valmeta -- only tables
  3708.   local valtojson = valmeta and valmeta.__tojson
  3709.   if valtojson then
  3710.     if tables[value] then
  3711.       return nil, "reference cycle"
  3712.     end
  3713.     tables[value] = true
  3714.     local state = {
  3715.         indent = indent, level = level, buffer = buffer,
  3716.         bufferlen = buflen, tables = tables, keyorder = globalorder
  3717.     }
  3718.     local ret, msg = valtojson (value, state)
  3719.     if not ret then return nil, msg end
  3720.     tables[value] = nil
  3721.     buflen = state.bufferlen
  3722.     if type (ret) == 'string' then
  3723.       buflen = buflen + 1
  3724.       buffer[buflen] = ret
  3725.     end
  3726.   elseif value == nil then
  3727.     buflen = buflen + 1
  3728.     buffer[buflen] = "null"
  3729.   elseif valtype == 'number' then
  3730.     local s
  3731.     if value ~= value or value >= huge or -value >= huge then
  3732.       -- This is the behaviour of the original JSON implementation.
  3733.       s = "null"
  3734.     else
  3735.       s = tostring (value)
  3736.     end
  3737.     buflen = buflen + 1
  3738.     buffer[buflen] = s
  3739.   elseif valtype == 'boolean' then
  3740.     buflen = buflen + 1
  3741.     buffer[buflen] = value and "true" or "false"
  3742.   elseif valtype == 'string' then
  3743.     buflen = buflen + 1
  3744.     buffer[buflen] = quotestring (value)
  3745.   elseif valtype == 'table' then
  3746.     if tables[value] then
  3747.       return nil, "reference cycle"
  3748.     end
  3749.     tables[value] = true
  3750.     level = level + 1
  3751.     local metatype = valmeta and valmeta.__jsontype
  3752.     local isa, n
  3753.     if metatype == 'array' then
  3754.       isa = true
  3755.       n = value.n or #value
  3756.     elseif metatype == 'object' then
  3757.       isa = false
  3758.     else
  3759.       isa, n = isarray (value)
  3760.     end
  3761.     local msg
  3762.     if isa then -- JSON array
  3763.       buflen = buflen + 1
  3764.       buffer[buflen] = "["
  3765.       for i = 1, n do
  3766.         buflen, msg = encode2 (value[i], indent, level, buffer, buflen, tables, globalorder)
  3767.         if not buflen then return nil, msg end
  3768.         if i < n then
  3769.           buflen = buflen + 1
  3770.           buffer[buflen] = ","
  3771.         end
  3772.       end
  3773.       buflen = buflen + 1
  3774.       buffer[buflen] = "]"
  3775.     else -- JSON object
  3776.       local prev = false
  3777.       buflen = buflen + 1
  3778.       buffer[buflen] = "{"
  3779.       local order = valmeta and valmeta.__jsonorder or globalorder
  3780.       if order then
  3781.         local used = {}
  3782.         n = #order
  3783.         for i = 1, n do
  3784.           local k = order[i]
  3785.           local v = value[k]
  3786.           if v then
  3787.             used[k] = true
  3788.             buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder)
  3789.             prev = true -- add a seperator before the next element
  3790.           end
  3791.         end
  3792.         for k,v in pairs (value) do
  3793.           if not used[k] then
  3794.             buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder)
  3795.             if not buflen then return nil, msg end
  3796.             prev = true -- add a seperator before the next element
  3797.           end
  3798.         end
  3799.       else -- unordered
  3800.         for k,v in pairs (value) do
  3801.           buflen, msg = addpair (k, v, prev, indent, level, buffer, buflen, tables, globalorder)
  3802.           if not buflen then return nil, msg end
  3803.           prev = true -- add a seperator before the next element
  3804.         end
  3805.       end
  3806.       if indent then
  3807.         buflen = addnewline2 (level - 1, buffer, buflen)
  3808.       end
  3809.       buflen = buflen + 1
  3810.       buffer[buflen] = "}"
  3811.     end
  3812.     tables[value] = nil
  3813.   else
  3814.     return nil, "type '" .. valtype .. "' is not supported by JSON."
  3815.   end
  3816.   return buflen
  3817. end
  3818.  
  3819. function json.encode (value, state)
  3820.   state = state or {}
  3821.   local oldbuffer = state.buffer
  3822.   local buffer = oldbuffer or {}
  3823.   local ret, msg = encode2 (value, state.indent, state.level or 0,
  3824.                    buffer, state.bufferlen or 0, state.tables or {}, state.keyorder)
  3825.   if not ret then
  3826.     error (msg, 2)
  3827.   elseif oldbuffer then
  3828.     state.bufferlen = ret
  3829.     return true
  3830.   else
  3831.     return concat (buffer)
  3832.   end
  3833. end
  3834.  
  3835. local function loc (str, where)
  3836.   local line, pos, linepos = 1, 1, 1
  3837.   while true do
  3838.     pos = strfind (str, "\n", pos, true)
  3839.     if pos and pos < where then
  3840.       line = line + 1
  3841.       linepos = pos
  3842.       pos = pos + 1
  3843.     else
  3844.       break
  3845.     end
  3846.   end
  3847.   return "line " .. line .. ", column " .. (where - linepos)
  3848. end
  3849.  
  3850. local function unterminated (str, what, where)
  3851.   return nil, strlen (str) + 1, "unterminated " .. what .. " at " .. loc (str, where)
  3852. end
  3853.  
  3854. local function scanwhite (str, pos)
  3855.   while true do
  3856.     pos = strfind (str, "%S", pos)
  3857.     if not pos then return nil end
  3858.     if strsub (str, pos, pos + 2) == "\239\187\191" then
  3859.       -- UTF-8 Byte Order Mark
  3860.       pos = pos + 3
  3861.     else
  3862.       return pos
  3863.     end
  3864.   end
  3865. end
  3866.  
  3867. local escapechars = {
  3868.   ["\""] = "\"", ["\\"] = "\\", ["/"] = "/", ["b"] = "\b", ["f"] = "\f",
  3869.   ["n"] = "\n", ["r"] = "\r", ["t"] = "\t"
  3870. }
  3871.  
  3872. local function unichar (value)
  3873.   if value < 0 then
  3874.     return nil
  3875.   elseif value <= 0x007f then
  3876.     return strchar (value)
  3877.   elseif value <= 0x07ff then
  3878.     return strchar (0xc0 + floor(value/0x40),
  3879.                     0x80 + (floor(value) % 0x40))
  3880.   elseif value <= 0xffff then
  3881.     return strchar (0xe0 + floor(value/0x1000),
  3882.                     0x80 + (floor(value/0x40) % 0x40),
  3883.                     0x80 + (floor(value) % 0x40))
  3884.   elseif value <= 0x10ffff then
  3885.     return strchar (0xf0 + floor(value/0x40000),
  3886.                     0x80 + (floor(value/0x1000) % 0x40),
  3887.                     0x80 + (floor(value/0x40) % 0x40),
  3888.                     0x80 + (floor(value) % 0x40))
  3889.   else
  3890.     return nil
  3891.   end
  3892. end
  3893.  
  3894. local function scanstring (str, pos)
  3895.   local lastpos = pos + 1
  3896.   local buffer, n = {}, 0
  3897.   while true do
  3898.     local nextpos = strfind (str, "[\"\\]", lastpos)
  3899.     if not nextpos then
  3900.       return unterminated (str, "string", pos)
  3901.     end
  3902.     if nextpos > lastpos then
  3903.       n = n + 1
  3904.       buffer[n] = strsub (str, lastpos, nextpos - 1)
  3905.     end
  3906.     if strsub (str, nextpos, nextpos) == "\"" then
  3907.       lastpos = nextpos + 1
  3908.       break
  3909.     else
  3910.       local escchar = strsub (str, nextpos + 1, nextpos + 1)
  3911.       local value
  3912.       if escchar == "u" then
  3913.         value = tonumber (strsub (str, nextpos + 2, nextpos + 5), 16)
  3914.         if value then
  3915.           local value2
  3916.           if 0xD800 <= value and value <= 0xDBff then
  3917.             -- we have the high surrogate of UTF-16. Check if there is a
  3918.             -- low surrogate escaped nearby to combine them.
  3919.             if strsub (str, nextpos + 6, nextpos + 7) == "\\u" then
  3920.               value2 = tonumber (strsub (str, nextpos + 8, nextpos + 11), 16)
  3921.               if value2 and 0xDC00 <= value2 and value2 <= 0xDFFF then
  3922.                 value = (value - 0xD800)  * 0x400 + (value2 - 0xDC00) + 0x10000
  3923.               else
  3924.                 value2 = nil -- in case it was out of range for a low surrogate
  3925.               end
  3926.             end
  3927.           end
  3928.           value = value and unichar (value)
  3929.           if value then
  3930.             if value2 then
  3931.               lastpos = nextpos + 12
  3932.             else
  3933.               lastpos = nextpos + 6
  3934.             end
  3935.           end
  3936.         end
  3937.       end
  3938.       if not value then
  3939.         value = escapechars[escchar] or escchar
  3940.         lastpos = nextpos + 2
  3941.       end
  3942.       n = n + 1
  3943.       buffer[n] = value
  3944.     end
  3945.   end
  3946.   if n == 1 then
  3947.     return buffer[1], lastpos
  3948.   elseif n > 1 then
  3949.     return concat (buffer), lastpos
  3950.   else
  3951.     return "", lastpos
  3952.   end
  3953. end
  3954.  
  3955. local scanvalue -- forward declaration
  3956.  
  3957. local function scantable (what, closechar, str, startpos, nullval, objectmeta, arraymeta)
  3958.   local len = strlen (str)
  3959.   local tbl, n = {}, 0
  3960.   local pos = startpos + 1
  3961.   if what == 'object' then
  3962.     setmetatable (tbl, objectmeta)
  3963.   else
  3964.     setmetatable (tbl, arraymeta)
  3965.   end
  3966.   while true do
  3967.     pos = scanwhite (str, pos)
  3968.     if not pos then return unterminated (str, what, startpos) end
  3969.     local char = strsub (str, pos, pos)
  3970.     if char == closechar then
  3971.       return tbl, pos + 1
  3972.     end
  3973.     local val1, err
  3974.     val1, pos, err = scanvalue (str, pos, nullval, objectmeta, arraymeta)
  3975.     if err then return nil, pos, err end
  3976.     pos = scanwhite (str, pos)
  3977.     if not pos then return unterminated (str, what, startpos) end
  3978.     char = strsub (str, pos, pos)
  3979.     if char == ":" then
  3980.       if val1 == nil then
  3981.         return nil, pos, "cannot use nil as table index (at " .. loc (str, pos) .. ")"
  3982.       end
  3983.       pos = scanwhite (str, pos + 1)
  3984.       if not pos then return unterminated (str, what, startpos) end
  3985.       local val2
  3986.       val2, pos, err = scanvalue (str, pos, nullval, objectmeta, arraymeta)
  3987.       if err then return nil, pos, err end
  3988.       tbl[val1] = val2
  3989.       pos = scanwhite (str, pos)
  3990.       if not pos then return unterminated (str, what, startpos) end
  3991.       char = strsub (str, pos, pos)
  3992.     else
  3993.       n = n + 1
  3994.       tbl[n] = val1
  3995.     end
  3996.     if char == "," then
  3997.       pos = pos + 1
  3998.     end
  3999.   end
  4000. end
  4001.  
  4002. scanvalue = function (str, pos, nullval, objectmeta, arraymeta)
  4003.   pos = pos or 1
  4004.   pos = scanwhite (str, pos)
  4005.   if not pos then
  4006.     return nil, strlen (str) + 1, "no valid JSON value (reached the end)"
  4007.   end
  4008.   local char = strsub (str, pos, pos)
  4009.   if char == "{" then
  4010.     return scantable ('object', "}", str, pos, nullval, objectmeta, arraymeta)
  4011.   elseif char == "[" then
  4012.     return scantable ('array', "]", str, pos, nullval, objectmeta, arraymeta)
  4013.   elseif char == "\"" then
  4014.     return scanstring (str, pos)
  4015.   else
  4016.     local pstart, pend = strfind (str, "^%-?[%d%.]+[eE]?[%+%-]?%d*", pos)
  4017.     if pstart then
  4018.       local number = tonumber (strsub (str, pstart, pend))
  4019.       if number then
  4020.         return number, pend + 1
  4021.       end
  4022.     end
  4023.     pstart, pend = strfind (str, "^%a%w*", pos)
  4024.     if pstart then
  4025.       local name = strsub (str, pstart, pend)
  4026.       if name == "true" then
  4027.         return true, pend + 1
  4028.       elseif name == "false" then
  4029.         return false, pend + 1
  4030.       elseif name == "null" then
  4031.         return nullval, pend + 1
  4032.       end
  4033.     end
  4034.     return nil, pos, "no valid JSON value at " .. loc (str, pos)
  4035.   end
  4036. end
  4037.  
  4038. function json.decode (str, pos, nullval, objectmeta, arraymeta)
  4039.   objectmeta = objectmeta or {__jsontype = 'object'}
  4040.   arraymeta = arraymeta or {__jsontype = 'array'}
  4041.   return scanvalue (str, pos, nullval, objectmeta, arraymeta)
  4042. end
  4043.  
  4044. function json.use_lpeg ()
  4045.   local g = require ("lpeg")
  4046.   local pegmatch = g.match
  4047.   local P, S, R, V = g.P, g.S, g.R, g.V
  4048.  
  4049.   local SpecialChars = (R"\0\31" + S"\"\\\127" +
  4050.     P"\194" * (R"\128\159" + P"\173") +
  4051.     P"\216" * R"\128\132" +
  4052.     P"\220\132" +
  4053.     P"\225\158" * S"\180\181" +
  4054.     P"\226\128" * (R"\140\143" + S"\168\175") +
  4055.     P"\226\129" * R"\160\175" +
  4056.     P"\239\187\191" +
  4057.     P"\229\191" + R"\176\191") / escapeutf8
  4058.  
  4059.   local QuoteStr = g.Cs (g.Cc "\"" * (SpecialChars + 1)^0 * g.Cc "\"")
  4060.  
  4061.   quotestring = function (str)
  4062.     return pegmatch (QuoteStr, str)
  4063.   end
  4064.   json.quotestring = quotestring
  4065.  
  4066.   local function ErrorCall (str, pos, msg, state)
  4067.     if not state.msg then
  4068.       state.msg = msg .. " at " .. loc (str, pos)
  4069.       state.pos = pos
  4070.     end
  4071.     return false
  4072.   end
  4073.  
  4074.   local function Err (msg)
  4075.     return g.Cmt (g.Cc (msg) * g.Carg (2), ErrorCall)
  4076.   end
  4077.  
  4078.   local Space = (S" \n\r\t" + P"\239\187\191")^0
  4079.  
  4080.   local PlainChar = 1 - S"\"\\\n\r"
  4081.   local EscapeSequence = (P"\\" * g.C (S"\"\\/bfnrt" + Err "unsupported escape sequence")) / escapechars
  4082.   local HexDigit = R("09", "af", "AF")
  4083.   local function UTF16Surrogate (match, pos, high, low)
  4084.     high, low = tonumber (high, 16), tonumber (low, 16)
  4085.     if 0xD800 <= high and high <= 0xDBff and 0xDC00 <= low and low <= 0xDFFF then
  4086.       return true, unichar ((high - 0xD800)  * 0x400 + (low - 0xDC00) + 0x10000)
  4087.     else
  4088.       return false
  4089.     end
  4090.   end
  4091.   local function UTF16BMP (hex)
  4092.     return unichar (tonumber (hex, 16))
  4093.   end
  4094.   local U16Sequence = (P"\\u" * g.C (HexDigit * HexDigit * HexDigit * HexDigit))
  4095.   local UnicodeEscape = g.Cmt (U16Sequence * U16Sequence, UTF16Surrogate) + U16Sequence/UTF16BMP
  4096.   local Char = UnicodeEscape + EscapeSequence + PlainChar
  4097.   local String = P"\"" * g.Cs (Char ^ 0) * (P"\"" + Err "unterminated string")
  4098.   local Integer = P"-"^(-1) * (P"0" + (R"19" * R"09"^0))
  4099.   local Fractal = P"." * R"09"^0
  4100.   local Exponent = (S"eE") * (S"+-")^(-1) * R"09"^1
  4101.   local Number = (Integer * Fractal^(-1) * Exponent^(-1))/tonumber
  4102.   local Constant = P"true" * g.Cc (true) + P"false" * g.Cc (false) + P"null" * g.Carg (1)
  4103.   local SimpleValue = Number + String + Constant
  4104.   local ArrayContent, ObjectContent
  4105.  
  4106.   -- The functions parsearray and parseobject parse only a single value/pair
  4107.   -- at a time and store them directly to avoid hitting the LPeg limits.
  4108.   local function parsearray (str, pos, nullval, state)
  4109.     local obj, cont
  4110.     local npos
  4111.     local t, nt = {}, 0
  4112.     repeat
  4113.       obj, cont, npos = pegmatch (ArrayContent, str, pos, nullval, state)
  4114.       if not npos then break end
  4115.       pos = npos
  4116.       nt = nt + 1
  4117.       t[nt] = obj
  4118.     until cont == 'last'
  4119.     return pos, setmetatable (t, state.arraymeta)
  4120.   end
  4121.  
  4122.   local function parseobject (str, pos, nullval, state)
  4123.     local obj, key, cont
  4124.     local npos
  4125.     local t = {}
  4126.     repeat
  4127.       key, obj, cont, npos = pegmatch (ObjectContent, str, pos, nullval, state)
  4128.       if not npos then break end
  4129.       pos = npos
  4130.       t[key] = obj
  4131.     until cont == 'last'
  4132.     return pos, setmetatable (t, state.objectmeta)
  4133.   end
  4134.  
  4135.   local Array = P"[" * g.Cmt (g.Carg(1) * g.Carg(2), parsearray) * Space * (P"]" + Err "']' expected")
  4136.   local Object = P"{" * g.Cmt (g.Carg(1) * g.Carg(2), parseobject) * Space * (P"}" + Err "'}' expected")
  4137.   local Value = Space * (Array + Object + SimpleValue)
  4138.   local ExpectedValue = Value + Space * Err "value expected"
  4139.   ArrayContent = Value * Space * (P"," * g.Cc'cont' + g.Cc'last') * g.Cp()
  4140.   local Pair = g.Cg (Space * String * Space * (P":" + Err "colon expected") * ExpectedValue)
  4141.   ObjectContent = Pair * Space * (P"," * g.Cc'cont' + g.Cc'last') * g.Cp()
  4142.   local DecodeValue = ExpectedValue * g.Cp ()
  4143.  
  4144.   function json.decode (str, pos, nullval, objectmeta, arraymeta)
  4145.     local state = {
  4146.       objectmeta = objectmeta or {__jsontype = 'object'},
  4147.       arraymeta = arraymeta or {__jsontype = 'array'}
  4148.     }
  4149.     local obj, retpos = pegmatch (DecodeValue, str, pos, nullval, state)
  4150.     if state.msg then
  4151.       return nil, state.pos, state.msg
  4152.     else
  4153.       return obj, retpos
  4154.     end
  4155.   end
  4156.  
  4157.   -- use this function only once:
  4158.   json.use_lpeg = function () return json end
  4159.  
  4160.   json.using_lpeg = true
  4161.  
  4162.   return json -- so you can get the module using json = require "dkjson".use_lpeg()
  4163. end
  4164.  
  4165. if always_try_using_lpeg then
  4166.   pcall (json.use_lpeg)
  4167. end
  4168.  
  4169. return json
  4170.  
  4171. -->
  4172.  
  4173. ]])
  4174. dkjson.close()
  4175. package=fs.open("mem/redworks/programs/cc-get-bin/package.lua","w")
  4176. package.write([[local installDir = '/bin';
  4177. Package = {}
  4178. Package.__index = Package
  4179.  
  4180. -- Package.get gets the package from cc-get website
  4181. function Package.get( name, version )
  4182.     local url = urlBase .. 'get/' .. name
  4183.     if version then
  4184.         url = url .. '?v=' .. params.version
  4185.     end
  4186.    
  4187.     local package = json.decode( http.get(url).readAll() )
  4188.    
  4189.     if package.error ~= nil then
  4190.         return false, package.error
  4191.     else
  4192.         setmetatable(package, Package)
  4193.         return true, package
  4194.     end
  4195. end
  4196.  
  4197. -- Package.load looks for the program on file
  4198. function Package.load( name )
  4199.     if data.packages[name] ~= nil then
  4200.         local package = data.packages[name]
  4201.         setmetatable(package, Package)
  4202.         return true, package
  4203.     else
  4204.         return false, 'Package is not installed'
  4205.     end
  4206. end
  4207.  
  4208. function Package:install()
  4209.     data.installed = data.installed + 1
  4210.    
  4211.     local installPath = fs.combine(installDir, self.name .. '-lib')
  4212.     fs.makeDir(installPath)
  4213.  
  4214.     function create_files( items, path )
  4215.         for k, item in pairs( items ) do
  4216.             local itemPath = fs.combine( path, item.name )
  4217.             if item.type == 'file' then
  4218.                 local fh = fs.open(itemPath, 'w')
  4219.                 fh.write( item.script )
  4220.                 fh.close()
  4221.             elseif item.type == 'folder' then
  4222.                 fs.makeDir( itemPath )
  4223.                 create_files( item.files, itemPath )
  4224.             end
  4225.         end
  4226.     end
  4227.  
  4228.     create_files( self.source, installPath )
  4229.    
  4230.     if self.onpath then
  4231.         self:link()
  4232.     end
  4233.     return true
  4234. end
  4235.  
  4236. function Package:uninstall()
  4237.     fs.delete( fs.combine(installDir, self.name .. '-lib') )
  4238.     self:unlink()
  4239.     data.installed = data.installed - 1
  4240.     data.packages[ self.name ] = nil
  4241.     return true
  4242. end
  4243.  
  4244. function Package:link()
  4245.     if self.onpath ~= '' then
  4246.         if self.onpath_filename == 0 then
  4247.             -- Use name of file that is being linked to
  4248.             name = fs.combine( installDir, self.onpath:match('[^/]-$') )
  4249.         elseif self.onpath_filename == 1 then
  4250.             -- Use name of project
  4251.             name = fs.combine(installDir, self.name)
  4252.         end
  4253.        
  4254.         local fh = fs.open( name, 'w' )
  4255.    
  4256.         fh.writeLine('local dir = shell.dir()')
  4257.         fh.writeLine("shell.setDir('/"..fs.combine(installDir, self.name .. '-lib').."')")
  4258.         fh.writeLine("shell.run('/".. fs.combine(fs.combine(installDir, self.name .. '-lib'), self.onpath) .. "', table.concat({...}, ' ') )")
  4259.         fh.writeLine("shell.setDir(dir)")
  4260.         fh.close()
  4261.     end
  4262.     return true
  4263. end
  4264.  
  4265. function Package:unlink()
  4266.     if self.onpath ~= '' then
  4267.         if self.onpath_filename == 0 then
  4268.             -- Use name of file that is being linked to
  4269.             name = fs.combine( installDir, self.onpath:match('[^/]-$') )
  4270.         elseif self.onpath_filename == 1 then
  4271.             -- Use name of project
  4272.             name = fs.combine(installDir, self.name)
  4273.         end
  4274.        
  4275.         fs.delete(name)
  4276.     end
  4277.    
  4278.     return true
  4279. end
  4280.  
  4281. function Package:update()
  4282.     local status, package = Package.get( self.name )
  4283.     if status then
  4284.         self:uninstall()
  4285.         package:install()
  4286.         data.packages[ package.name ] = package
  4287.     end
  4288. end
  4289. ]])
  4290. package.close()
  4291. params=fs.open("mem/redworks/programs/cc-get-bin/params.lua","w")
  4292. params.write([[
  4293. --Params version 1.0.0
  4294.  
  4295. --Examples:
  4296. --  If you were to run:
  4297. --  cc-get install program -v 1.2 -f
  4298.    
  4299. --  With this in the cc-get program:
  4300. --  opts = parse_params({...}, {version = '-v *([^ ]+)', flag = '-f'})
  4301.    
  4302. --  Opts would be:
  4303. --  opts = {
  4304. --      'install',
  4305. --      'program',
  4306. --      flag = true,
  4307. --      version = '1.2'
  4308. --  }
  4309.  
  4310. function parse_params(params, patterns)
  4311.     params = table.concat(params, ' ')
  4312.     local result = {}
  4313.     local left = params
  4314.  
  4315.     for k, pattern in pairs(patterns) do
  4316.         for x in string.gmatch(params, pattern) do
  4317.             if x == pattern then
  4318.                 result[ k ] = true
  4319.             else
  4320.                 result[ k ] = x
  4321.             end
  4322.             left = left:gsub(pattern, '')
  4323.         end
  4324.     end
  4325.    
  4326.     -- Remove extra spaces
  4327.     left = left:gsub('%s+', ' ')
  4328.    
  4329.     -- Trim before and after
  4330.     left = left:gsub('^%s*(.+)%s*$', '%1')
  4331.    
  4332.     for param in left:gmatch('[^ ]+') do
  4333.         table.insert( result, param )
  4334.     end
  4335.    
  4336.     return result
  4337. end
  4338. ]])
  4339. params.close()
  4340. AND=fs.open("mem/redworks/programs/circuits/AND","w")
  4341. AND.write([[--2
  4342. --1
  4343. --0
  4344. input = {}
  4345. output = {}
  4346. extra = {}
  4347. input[1] = "left"
  4348. input[2] = "right"
  4349. output[1] = "back"
  4350.  
  4351. -- AND Gate
  4352. -- Created by: Streetstar5 aka FuzzyPurp
  4353.  
  4354. term.clear()
  4355. term.setCursorPos(1,2)
  4356. print("AND Gate is now running.")
  4357. print("Input(s): " .. input[1] .. ", " .. input[2] .. ".")
  4358. print("Output(s): " .. output[1] .. ".")
  4359. print("\nPress Q to terminate.")
  4360.  
  4361. while true do
  4362.  
  4363.  --wait on an event
  4364.  event, param = os.pullEvent()
  4365.  
  4366.  -- Key event. Q key will exit to shell.  
  4367.  if event == "char" and string.lower(param) == "q" then
  4368.   print("Device stopped")
  4369.   break
  4370.  end
  4371.  --Now on to the actual Logic gate.
  4372.  
  4373.  if rs.getInput(input[1]) and rs.getInput(input[2]) then
  4374.     rs.setOutput(output[1], true)
  4375.   else
  4376.     rs.setOutput(output[1], false)
  4377.   end
  4378. end
  4379. ]])
  4380. AND.close()
  4381. D_FlipFlop=fs.open("mem/redworks/programs/circuits/D-FlipFlop","w")
  4382. D_FlipFlop.write([[--2
  4383. --2
  4384. --0
  4385. input = {}
  4386. output = {}
  4387. extra = {}
  4388. input[1] = "front"
  4389. input[2] = "left"
  4390. output[1] = "right"
  4391. output[2] = "back"
  4392.  
  4393. -- D-FlipFlop
  4394. -- press q or Q to exit to shell
  4395.  
  4396. -- front  input: Clock
  4397. -- left   input: D (Data)
  4398. -- right output: Q (Data Out)
  4399. -- back  output: Inv Q (Inverted Data Out)
  4400.  
  4401. term.clear()
  4402. term.setCursorPos(1,2)
  4403. print("D-FlipFlop running. Press Q to stop.")
  4404.  
  4405. --set initial state
  4406.  QBit = false;
  4407.  redstone.setOutput(output[1],QBit)
  4408.  redstone.setOutput(output[2], not QBit)
  4409.  
  4410. lastinpfront = false
  4411.  
  4412. while true do
  4413.  
  4414.  --wait on an event
  4415.  event, param = os.pullEvent()
  4416.  
  4417.  -- Key event. On a key Q or q we exit to shell  
  4418.  if event == "char" and (param == "q" or  param == "Q") then
  4419.   print("Device stopped")
  4420.   break
  4421.  end
  4422.  
  4423.  -- redstone event
  4424.  if event == "redstone" then
  4425.   -- read clock input
  4426.   inpfront = redstone.getInput(input[1])  
  4427.   if (inpfront and not lastinpfront) then
  4428.    -- rising edge detected
  4429.    -- read data Input
  4430.    QBit = redstone.getInput(input[2])
  4431.    -- delay the output at least a bit more than 0.05 sec to allow synchronous working circuits
  4432.    sleep(0.06)
  4433.    -- set new output
  4434.    -- well I don't think the order matters (single core app) but let's do it the safe way and go low first
  4435.    if QBit then
  4436.     redstone.setOutput(output[2], not QBit)
  4437.     redstone.setOutput(output[1],QBit)
  4438.    else
  4439.     redstone.setOutput(output[1],QBit)
  4440.     redstone.setOutput(output[2], not QBit)
  4441.    end
  4442.   end
  4443.   lastinpfront = inpfront
  4444.  end
  4445.  
  4446. end
  4447.  
  4448.  
  4449. ]])
  4450. D_FlipFlop.close()
  4451. Inverter=fs.open("mem/redworks/programs/circuits/Inverter","w")
  4452. Inverter.write([[--2
  4453. --2
  4454. --2
  4455. input = {}
  4456. output = {}
  4457. extra = {}
  4458. input[1] = "bottom"
  4459. input[2] = "right"
  4460. output[1] = "back"
  4461. output[2] = "top"
  4462. extra[1] = "Number of Pulses"
  4463. extra[2] = "Speed of Pulses"
  4464.  
  4465. print ("Yep")
  4466. print ("Test - "..input[1].." Test - "..output[1])
  4467. print ("Yep")
  4468.  
  4469. ]])
  4470. Inverter.close()
  4471. Lever=fs.open("mem/redworks/programs/circuits/Lever","w")
  4472. Lever.write([[--0
  4473. --6
  4474. --0
  4475. input = {}
  4476. output = {}
  4477. extra = {}
  4478. output[1] = "back"
  4479. output[2] = "front"
  4480. output[3] = "left"
  4481. output[4] = "right"
  4482. output[5] = "bottom"
  4483. output[6] = "top"
  4484.  
  4485. -- 6-way Ouput Lever
  4486. -- Created by: Streetstar5 aka FuzzyPurp
  4487.  
  4488. rState = false
  4489. local rRunning = true
  4490.  
  4491. term.clear()
  4492. term.setCursorPos(1,2)
  4493. print("Artificial Lever is now running.")
  4494. print("Press T to turn ON and F to turn off")
  4495. print("Output(s): " .. output[1] .. ", " ..output[2] .. ", " .. output[3] .. ".")
  4496. print("Output(s): " .. output[4] .. ", " ..output[5] .. ", " .. output[6] .. ".")
  4497. print("\nHold Control+T to terminate.")
  4498.  
  4499. while true do
  4500.  
  4501.   local rEvent, param = os.pullEvent()
  4502.   if rEvent == "key" then
  4503.     if param == 20 then
  4504.       rState = true
  4505.     end
  4506.     if param == 33 then
  4507.       rState = false
  4508.     end
  4509.   end
  4510.   rs.setOutput(output[1], rState)
  4511.   rs.setOutput(output[2], rState)
  4512.   rs.setOutput(output[3], rState)
  4513.   rs.setOutput(output[4], rState)
  4514.   rs.setOutput(output[5], rState)
  4515.   rs.setOutput(output[6], rState)
  4516. end
  4517. ]])
  4518. Lever.close()
  4519. NOT=fs.open("mem/redworks/programs/circuits/NOT","w")
  4520. NOT.write([[--1
  4521. --1
  4522. --0
  4523. input = {}
  4524. output = {}
  4525. extra = {}
  4526. input[1] = "left"
  4527. output[1] = "back"
  4528.  
  4529. -- NOT Gate
  4530. -- Created by: Streetstar5 aka FuzzyPurp
  4531.  
  4532. local rRunning = true
  4533.  
  4534. term.clear()
  4535. term.setCursorPos(1,2)
  4536. print("NOT Gate is now running.")
  4537. print("Input(s): " .. input[1] .. ".")
  4538. print("Output(s): " .. output[1] .. ".")
  4539. print("\nHold Control+T to terminate.")
  4540.  
  4541. while rRunning do
  4542.   sleep(0.1)
  4543.   if rs.getInput(input[1]) then
  4544.     rs.setOutput(output[1], false)
  4545.   else
  4546.     rs.setOutput(output[1], true)
  4547.   end
  4548. end
  4549. ]])
  4550. NOT.close()
  4551. Pulse_Former=fs.open("mem/redworks/programs/circuits/Pulse-Former","w")
  4552. Pulse_Former.write([[--1
  4553. --1
  4554. --0
  4555. input = {}
  4556. output = {}
  4557. extra = {}
  4558. input[1] = "left"
  4559. output[1] = "back"
  4560.  
  4561. -- Pulse Former
  4562. -- Created by: FuzzyPurp
  4563.  
  4564. local rRunning = true
  4565. term.clear()
  4566. term.setCursorPos(1,2)
  4567. print("Pulse Former is now running.")
  4568. print("Input(s): " .. input[1] .. ".")
  4569. print("Output(s): " .. output[1] .. ".")
  4570. print("\nHold Control+T to terminate.")
  4571.  
  4572. while rRunning do
  4573.   sleep(0.1)
  4574.  
  4575.   local rEvent, param = os.pullEvent()
  4576.   if rEvent == "redstone" then
  4577.     if rs.getInput(input[1]) then
  4578.       rs.setOutput(output[1], true)
  4579.       sleep(0.2)
  4580.       rs.setOutput(output[1], false)
  4581.     end
  4582.   end
  4583. end
  4584. ]])
  4585. Pulse_Former.close()
  4586. Timer=fs.open("mem/redworks/programs/circuits/Timer","w")
  4587. Timer.write([[--1
  4588. --1
  4589. --1
  4590. input = {}
  4591. output = {}
  4592. extra = {}
  4593. input[1] = "front"
  4594. output[1] = "back"
  4595. extra[1] = "The delay of pulse."
  4596.  
  4597.  
  4598. -- Simple Timer
  4599. -- Created by: FuzzyPurp
  4600.  
  4601. local rRunning = true
  4602. term.clear()
  4603. term.setCursorPos(1,2)
  4604. print("Timer is now running with a " .. extra[1] .. " sec. delay.")
  4605. print("\nInput(s): " .. input[1] .. ".")
  4606. print("Output(s): " .. output[1] .. ".")
  4607. print("\nHold Control+R to reboot.")
  4608. print("Hold Control+T to terminate.")
  4609.  
  4610.  
  4611. while rRunning do
  4612.   sleep(extra[1] - 0.1)
  4613.   if rs.getInput(input[1]) then
  4614.     else
  4615.     rs.setOutput(output[1], true)
  4616.     sleep(0.1)
  4617.     rs.setOutput(output[1], false)
  4618.   end
  4619. end
  4620. ]])
  4621. Timer.close()
  4622. Toggle_Latch=fs.open("mem/redworks/programs/circuits/Toggle-Latch","w")
  4623. Toggle_Latch.write([[--1
  4624. --1
  4625. --0
  4626. input = {}
  4627. output = {}
  4628. extra = {}
  4629. input[1] = "left"
  4630. output[1] = "back"
  4631.  
  4632. -- Toggle Latch
  4633. -- Created by: Techzune
  4634. -- Converted by: Streetstar5 aka FuzzyPurp
  4635.  
  4636. rToggle = false
  4637. local rRunning = true
  4638.  
  4639. term.clear()
  4640. term.setCursorPos(1,2)
  4641. print("Toggle Latch is now running.")
  4642. print("Input(s): " .. input[1] .. ".")
  4643. print("Output(s): " .. output[1] .. ".")
  4644. print("\nHold Control+T to terminate.")
  4645.  
  4646. while rRunning do
  4647.   sleep(0.1)
  4648.   local rEvent, param = os.pullEvent()
  4649.   if rEvent == "redstone" then
  4650.     if rs.getInput(input[1]) then
  4651.       if rToggle == false then
  4652.         rToggle = true
  4653.       else
  4654.         rToggle = false
  4655.       end
  4656.     end
  4657.   end
  4658.   redstone.setOutput(output[1], rToggle)
  4659. end
  4660. ]])
  4661. Toggle_Latch.close()
  4662. XOR=fs.open("mem/redworks/programs/circuits/XOR","w")
  4663. XOR.write([[--2
  4664. --1
  4665. --0
  4666. input = {}
  4667. output = {}
  4668. extra = {}
  4669. input[1] = "left"
  4670. input[2] = "right"
  4671. output[1] = "back"
  4672.  
  4673. -- XOR Gate
  4674. -- Created by: Streetstar5 aka FuzzyPurp
  4675.  
  4676. local rRunning = true
  4677. term.clear()
  4678. term.setCursorPos(1,2)
  4679. print("XOR Gate is now running.")
  4680. print("Input(s): " .. input[1] .. ", " .. input[2] .. ".")
  4681. print("Output(s): " .. output[1] .. ".")
  4682. print("\nHold Control+T to terminate.")
  4683.  
  4684. while rRunning do
  4685.   sleep(0.1)
  4686.   if rs.getInput(input[1]) ~= redstone.getInput(input[2]) then
  4687.     rs.setOutput(output[1], true)
  4688.   else
  4689.     rs.setOutput(output[1], false)
  4690.   end
  4691. end
  4692. ]])
  4693. XOR.close()
  4694. alchemy=fs.open("mem/redworks/minepedia/alchemy","w")
  4695. alchemy.write([[Brewing is how potions and splash potions are made in Minecraft.
  4696. Recipes: Despite the complicated web of potions that can be brewed from other potions, to brew a specific potion from the water bottle most efficiently the options are quite simple. The following table gives the most efficient way to brew each potion without wasting extra ingredients. Cases where the order of ingredients is irrelevant or two different ingredients are interchangeable are included. The potion of weakness, the only one which can be brewed without starting with a nether wart, can still be brewed from an awkward potion if the player wishes to convert all water bottles to awkward potions in preparation for brewing.
  4697. Weakness > fermented spider eye
  4698. Weakness E > fermented spider eye and redstone (if brewed from an awkward potion the fermented spider eye must be added first)
  4699. Strength > nether wart > blaze powder
  4700. Strength E > nether wart > blaze powder > redstone
  4701. Strength II > nether wart > blaze powder > glowstone
  4702. Regeneration > nether wart > ghast tear
  4703. Regeneration E > nether wart > ghast tear > redstone
  4704. Regeneration II > nether wart > ghast tear > glowstone
  4705. Swiftness > nether wart > sugar
  4706. Swiftness E > nether wart > sugar > redstone
  4707. Swiftness II > nether wart > sugar > glowstone
  4708. Slowness > nether wart > sugar or magma cream > fermented spider eye
  4709. Slowness E > nether wart > sugar or magma cream > fermented spider eye > redstone
  4710. Health > nether wart > glistering melon
  4711. Health II > nether wart > glistering melon > glowstone
  4712. Harming > nether wart > glistering melon or spider eye > fermented spider eye
  4713. Harming II > nether wart > glistering melon or spider eye > fermented spider eye and glowstone
  4714. Poison > nether wart > spider eye
  4715. Poison E > nether wart > spider eye > redstone
  4716. Poison II > nether wart > spider eye > glowstone
  4717. Fire Resistance > nether wart > magma cream
  4718. Fire Resistance E > nether wart > magma cream > redstone
  4719. History: Initially, the Cauldron was where potions were brewed. Code in Beta 1.9 pre2 revealed that Potions were brewed by adding water to the Cauldron followed by certain reagents. Correctly combined reagents would confer purely beneficial potion effects, and incorrect combinations added negative effects. The system was complicated, lacked a GUI, and formed many duplicate potions (i.e. two potions that were exactly the same could be made in several different ways), so Notch and Jeb came up with a new brewing method using a Brewing Stand.[1] The Cauldron's role in brewing was relegated to being a slightly more efficient storage vessel for water. Brewing was greatly streamlined and simplified when a brewing GUI was added and most duplicate potions were removed (the total possible potions went down from 150 combinations to only 25 different potions in 31 combinations). However, this new system made some potion effects available in earlier 1.9 pre-releases inaccessible (e.g. Nausea, Blindness and Invisibility).
  4720. Throwable Splash Potions were introduced in Beta 1.9 Pre4 and brewed by placing gunpowder and any potion together in a brewing stand. This pre-release also introduced Glistering Melon as an alchemical reagent to replace the instant health effect conferred by the Ghast Tear, which then added the effect of regeneration instead. This version also converted certain reagents into base-secondary reagents (the Spider Eye, Glistering Melon and Blaze Powder made Mundane Potion when brewed into a water bottle in addition to their previous functions), bringing the potion total to 28 different potions in 35 combinations.
  4721. Trivia:Only 1 ingredient is needed to brew into up to 3 potions. These three potions do not necessarily have to be the same.
  4722. Upgrading effect of potion that has no time parameter (i.e. Instant Health, Harming) with glowstone dust has no downsides.
  4723. Upgrading a Fire Resistance Potion with redstone dust has no downsides.
  4724. Although Jeb said that in the 1.9 pre-release 3 there were 161 possible different potion combinations with 2,653 in the future, in the actual third pre-release only 22 different potions could be made without the use of external programs. Of those, 19 potions had one of 8 different effects.
  4725. The Mundane Potion made from redstone has a different metadata (64) than the mundane potion made from any other ingredient (8192). Unlike Mundane 64, Mundane 8192 can be made into a Splash Mundane Potion by adding gunpowder that is, like its base potion, without any effect.
  4726. There are many Potions that were left behind from 1.9 pre-releases that fill up different metadatas that otherwise cannot be brewed or obtained without a SMP server command or inventory editor. These potions include but are not limited to: Bungling Potion, Buttering Potion, Debonair Potion, Refined Potion.
  4727. Splash potions can be fired by Dispensers.
  4728. Cauldrons can be entirely circumvented from the brewing process with no ill effects, as bottles can be filled by right-clicking on a water source block. This is an improvement from cauldrons, as one does not have to replenish the source block every three bottles, or indeed at all. This, however can not be done in the Nether, where cauldrons become essential.
  4729. Some splash potions have the opposite effect on undead mobs such as zombies and skeletons.
  4730. ]])
  4731. alchemy.close()
  4732. biome=fs.open("mem/redworks/minepedia/biome","w")
  4733. biome.write([[According to Wikipedia, biomes are climatically and geographically defined as similar climatic conditions on the Earth, such as communities of plants, animals, and soil organisms, and are often referred to as ecosystems.
  4734. In Minecraft, from the Halloween Update onwards, this means that different areas with varying heights, temperatures, humidity ratings and foliage colors are created.
  4735. Before the Halloween Update, when a map was generated it had either a Snowy or Grassy theme. But after the update, a single world includes all themes in a logical fashion determined from the biomes graph.
  4736. Biome Types Biome types may be easily distinguished by the differentiating grass and leaf colors in conjunction with the kind of blocks present, like cacti in deserts and pine trees in pine forests. They are randomly created during the generation of the world and are affected by the starting seed.
  4737. There are nine biomes in Minecraft 1.0.
  4738. Biome  Description  Features  Image  
  4739. Forest (Oak/Birch Forest)  A biome with many trees and a fair amount of tall grass. Birch trees can be found in this biome.  Oak and Birch Trees, Grass, Flowers, Tall Grass.    
  4740. Taiga (Pine Forest)  A biome with many pine/spruce trees and dull grey-blue grass. Wolves are also found on this biome more commonly than others. As of 1.8, it is most likely to spawn in one of these biomes. Snow and Ice occur in this biome after Minecraft 11w48a.  Pine Trees, Grass, Flowers, Wolves, Tall Grass.    
  4741. Swampland  A flat biome with swamp-like trees with vines and shallow pools of clay, sand and dirt. The water, grass, leaves, vines and trees are much darker. The water can have floating lily pads. Mushrooms are also moderately common in swamps. There is a green-ish color in the water. Trees can sometimes spawn in the water in this biome.  Oak Trees, Grass, Vines, Lily Pads, Clay, Mushrooms.    
  4742. Extreme Hills (Mountains)  A highly mountainous biome with dull grey-blue grass and few trees, added in the 1.8 Adventure Update. Prior to this update, mountains were found in all types of biomes, but now are very rare outside this type of land. More underground cave systems are present here than any other biome.  Oak Trees, Grass.    
  4743. Desert  A very flat biome consisting mostly of sand, dead shrubs and cacti. No rain occurs in this biome. Sugar Cane can be found sometimes next to pools of water. NPC Villages spawn mostly in this biome.  Sand, Cacti, Dead Bushes, Sandstone, Sugar Cane.    
  4744. Plains  A relatively flat biome with rolling hills and a large amount of tall grass (more than in any other type of land). The occasional tree does exist, although very rarely. Gulleys are also quite common in this biome.  Tall Grass, Grass, Oak Trees.    
  4745. Ocean  A very big, flat open biome made entirely of water, with underwater reliefs such as small mountains and plains and usually includes sand and clay at its bottom. Ocean biomes can go down to 30 blocks deep and the occasional island may exist, as a small version of other biome types. Entrances to underground ravines can be also found at the bottom of the ocean, as well as Abandoned Mine Shafts (whose upper parts are mostly flooded due to the proximity of the ocean). Oceans can be larger than ten thousand blocks wide and long.  Water, Sand, Clay.    
  4746. Tundra  A relatively flat biome covered in snow. Lakes and rivers are mostly frozen over and trees (only regular types are spawned) are scarce. Sugar canes do spawn in this biome, but are destroyed and dropped when the chunks load because of the ice that spreads over open water sources.  Snow, Snowfall, Oak Trees, Ice, Sugar Cane.    
  4747. Mushroom  This biome consists of flat landscapes and high hills, has Mycelium instead of grass as its common surface block, and tends to appear as islands far from the spawn of a map and any significant landmass. It is the only biome where Huge Mushrooms can spawn and grow naturally, where mushrooms grow in full sunlight, and where Mooshrooms spawn.
  4748. It's actually composed of two different "biomes" - the shoreline, which is flat, and the mainland, which is more undulating (hilly). Contrary to popular belief, trees can be grown in this biome, but not next to Mycelium which will take over the dirt square from the sapling and un-plant the sapling. A player can create a Mycelium-free zone with cobblestone and grow a tree in the middle of it on freshly placed dirt. A player is also able to place saplings on mycelium and use bonemeal on the sapling to grow it. Otherwise, it is advised to collect wood (and saplings) before settling here.
  4749. No mobs other than Mooshrooms (including hostile mobs at night) spawn in this biome. This includes caves, abandoned mines, etc... below Mushroom Biomes, meaning exploring underground is relatively safe. Dungeons with spawners will still spawn mobs, however, and caution should still be taken when exploring (as sometimes "fingers" of other biomes project into mushroom biomes).
  4750. As of 1.0.0 player made structures in this biome are exempt from the "no mob spawn" rule: Only mushroom terrain originally created with the map seems to prevent mob spawning.
  4751. History: Biomes were added in Alpha 1.2.0, also known as the Halloween Update. In Beta 1.8, biomes got an overhaul, removing some biomes and others replaced with nine fractal-based biomes - some old, some new.
  4752. Difficulty: It can be difficult to play and gather sufficient resources if one starts in the middle of a biome with no trees, such as the desert, savanna, tundra, and especially the ocean.
  4753. There have been multiple reports of players spawning on tiny islands in the middle of a vast ocean with no trees for several Minecraft days in any direction. It appears that these desert islands generate in the Ocean biome, where animals cannot spawn (on the water); sometimes the island spawns with no trees so players have to delete the world and start again, swim great distances to a landmass, or search for nearby underwater openings into abandoned mineshafts to acquire wood. This is not quite as bad a problem if one starts the map in Creative Mode since the player is able to fly, make a boat, or plant trees. It is still undetermined whether this feature is a bug or not (Notch didn't say it was a bug, but the community seems to think it is).
  4754. ]])
  4755. biome.close()
  4756. biomes=fs.open("mem/redworks/minepedia/biomes","w")
  4757. biomes.write([[According to Wikipedia, biomes are climatically and geographically defined as similar climatic conditions on the Earth, such as communities of plants, animals, and soil organisms, and are often referred to as ecosystems.
  4758. In Minecraft, from the Halloween Update onwards, this means that different areas with varying heights, temperatures, humidity ratings and foliage colors are created.
  4759. Before the Halloween Update, when a map was generated it had either a Snowy or Grassy theme. But after the update, a single world includes all themes in a logical fashion determined from the biomes graph.
  4760. Biome Types Biome types may be easily distinguished by the differentiating grass and leaf colors in conjunction with the kind of blocks present, like cacti in deserts and pine trees in pine forests. They are randomly created during the generation of the world and are affected by the starting seed.
  4761. There are nine biomes in Minecraft 1.0.
  4762. Biome  Description  Features  Image  
  4763. Forest (Oak/Birch Forest)  A biome with many trees and a fair amount of tall grass. Birch trees can be found in this biome.  Oak and Birch Trees, Grass, Flowers, Tall Grass.    
  4764. Taiga (Pine Forest)  A biome with many pine/spruce trees and dull grey-blue grass. Wolves are also found on this biome more commonly than others. As of 1.8, it is most likely to spawn in one of these biomes. Snow and Ice occur in this biome after Minecraft 11w48a.  Pine Trees, Grass, Flowers, Wolves, Tall Grass.    
  4765. Swampland  A flat biome with swamp-like trees with vines and shallow pools of clay, sand and dirt. The water, grass, leaves, vines and trees are much darker. The water can have floating lily pads. Mushrooms are also moderately common in swamps. There is a green-ish color in the water. Trees can sometimes spawn in the water in this biome.  Oak Trees, Grass, Vines, Lily Pads, Clay, Mushrooms.    
  4766. Extreme Hills (Mountains)  A highly mountainous biome with dull grey-blue grass and few trees, added in the 1.8 Adventure Update. Prior to this update, mountains were found in all types of biomes, but now are very rare outside this type of land. More underground cave systems are present here than any other biome.  Oak Trees, Grass.    
  4767. Desert  A very flat biome consisting mostly of sand, dead shrubs and cacti. No rain occurs in this biome. Sugar Cane can be found sometimes next to pools of water. NPC Villages spawn mostly in this biome.  Sand, Cacti, Dead Bushes, Sandstone, Sugar Cane.    
  4768. Plains  A relatively flat biome with rolling hills and a large amount of tall grass (more than in any other type of land). The occasional tree does exist, although very rarely. Gulleys are also quite common in this biome.  Tall Grass, Grass, Oak Trees.    
  4769. Ocean  A very big, flat open biome made entirely of water, with underwater reliefs such as small mountains and plains and usually includes sand and clay at its bottom. Ocean biomes can go down to 30 blocks deep and the occasional island may exist, as a small version of other biome types. Entrances to underground ravines can be also found at the bottom of the ocean, as well as Abandoned Mine Shafts (whose upper parts are mostly flooded due to the proximity of the ocean). Oceans can be larger than ten thousand blocks wide and long.  Water, Sand, Clay.    
  4770. Tundra  A relatively flat biome covered in snow. Lakes and rivers are mostly frozen over and trees (only regular types are spawned) are scarce. Sugar canes do spawn in this biome, but are destroyed and dropped when the chunks load because of the ice that spreads over open water sources.  Snow, Snowfall, Oak Trees, Ice, Sugar Cane.    
  4771. Mushroom  This biome consists of flat landscapes and high hills, has Mycelium instead of grass as its common surface block, and tends to appear as islands far from the spawn of a map and any significant landmass. It is the only biome where Huge Mushrooms can spawn and grow naturally, where mushrooms grow in full sunlight, and where Mooshrooms spawn.
  4772. It's actually composed of two different "biomes" - the shoreline, which is flat, and the mainland, which is more undulating (hilly). Contrary to popular belief, trees can be grown in this biome, but not next to Mycelium which will take over the dirt square from the sapling and un-plant the sapling. A player can create a Mycelium-free zone with cobblestone and grow a tree in the middle of it on freshly placed dirt. A player is also able to place saplings on mycelium and use bonemeal on the sapling to grow it. Otherwise, it is advised to collect wood (and saplings) before settling here.
  4773. No mobs other than Mooshrooms (including hostile mobs at night) spawn in this biome. This includes caves, abandoned mines, etc... below Mushroom Biomes, meaning exploring underground is relatively safe. Dungeons with spawners will still spawn mobs, however, and caution should still be taken when exploring (as sometimes "fingers" of other biomes project into mushroom biomes).
  4774. As of 1.0.0 player made structures in this biome are exempt from the "no mob spawn" rule: Only mushroom terrain originally created with the map seems to prevent mob spawning.
  4775. History: Biomes were added in Alpha 1.2.0, also known as the Halloween Update. In Beta 1.8, biomes got an overhaul, removing some biomes and others replaced with nine fractal-based biomes - some old, some new.
  4776. Difficulty: It can be difficult to play and gather sufficient resources if one starts in the middle of a biome with no trees, such as the desert, savanna, tundra, and especially the ocean.
  4777. There have been multiple reports of players spawning on tiny islands in the middle of a vast ocean with no trees for several Minecraft days in any direction. It appears that these desert islands generate in the Ocean biome, where animals cannot spawn (on the water); sometimes the island spawns with no trees so players have to delete the world and start again, swim great distances to a landmass, or search for nearby underwater openings into abandoned mineshafts to acquire wood. This is not quite as bad a problem if one starts the map in Creative Mode since the player is able to fly, make a boat, or plant trees. It is still undetermined whether this feature is a bug or not (Notch didn't say it was a bug, but the community seems to think it is).
  4778. ]])
  4779. biomes.close()
  4780. blaze=fs.open("mem/redworks/minepedia/blaze","w")
  4781. blaze.write([[Blaze is a type of mob found in The Nether. In their searching state they are confined to the ground and do not blow smoke. They will not start flying unless they spot the player. When pursuing, they catch fire briefly before shooting a three round burst of fireballs. A short cool down period occurs between attacks. Their bodies are made up of a head atop a central column of smoke, and three rotating sections, each rotating section contains four floating yellow rods. They drop Blaze Rods, and can only spawn in Nether Fortresses, from Mob Spawners. Their fireballs set players and mobs alike on fire. Despite being similar to a Ghast fireball, Blaze Fireballs are not explosive, and cannot be deflected.
  4782. Combat: Blazes are one of the most difficult mobs to fight, due to their ranged, unblockable attacks and rapid rate of fire. Their ability to fly usually leaves the player's sword useless, while a player's bow's charging time and move speed leaves the player highly vulnerable to attack. On the other hand, Blaze have a much shorter attack range, which makes it more feasible to snipe them from afar. Blaze can only spawn in light level 12 or lower (at the lower half of their body). Much like Ghasts, the Blaze's ability to fly can make it difficult to recover their loot after killing them. However, a viable tactic of combat is to fight them at close range by reeling them in with a fishing rod first. The use of a potion of fire resistance is extremely helpful when fighting Blazes.
  4783. Blaze spawners occur in Nether Fortresses, and will start spawning Blazes once the player gets within 16 blocks. The spawners have a chance of spawning 1-6 Blazes at once. 'Camping' at a Blaze spawner is an effective way to gather Blaze Rods, as they will always appear close enough to attack with a sword, and there is a delay in their attack after they spawn because they have to charge first. This is best done in combination with the fire resistance potion in effect, which makes the player immune to the Blaze's attacks and can be brewed by adding Magma Cream to awkward potions. You can also build a doorway, 2 blocks tall and 1 block wide, where you can camp and kill the blazes as they come down. This strategy is extremely effective if you cover up the roof of the spawner room and camp in the doorway with a diamond sword.
  4784. A Blaze suffers damage upon contact with water or from snowballs, making a small army of Snow Golems a great way to kill them or even make Golem-based Blaze grinders, provided the player has enough ingredients to replace the fallen golems, a safe place to hide while making new golems, as well as that the initial attack is made with enough snowmen to defeat the first wave of Blazes, before more Blazes can arrive and turn the Blaze grinder into a Snow Golem grinder. Be aware with Blaze spawners as these can quickly create new waves of Blaze, outnumbering the golems. In SMP, this tactic is one of the easiest ways (if not THE easiest way) to kill Blazes, as another player can be assigned the mission to gather snow from dead snow golems and turn this into blocks, letting the golem maker work without stopping to get more snow. Systems like this can in practical use take out several spawners with the only resource requirement being pumpkins for new golems, making the Blaze killing process almost self-sustaining. A pumpkin farm could produce unlimited pumpkins, making it fairly sustainable, although the snow would run out if the dead golems' snowballs weren't collected.
  4785. History: Blazes were introduced in Beta 1.9 Pre-release 1. Starting from Beta 1.9 Pre-release 4(verify version) they only drop items when they aren't on fire (about to attack).
  4786. Trivia: The light level of an area to disable a spawnable area has to be 12 or higher.
  4787. Blaze cannot shoot if trapped in a Cobweb.
  4788. Blaze do not have a body, unlike other mobs. They are simply floating heads over a cloud of smoke surrounded by spinning rods.
  4789. Unlike Ghasts, projectiles fired by a Blaze cannot be deflected, so hitting the projectiles would be pointless.
  4790. Blaze projectiles will set whatever they hit on fire, which includes solid blocks, mobs, and the player.
  4791. With a 'fire resistance potion' in effect, the blaze is the only mob whose attacks are capable of being neutralized, including their knockback effect. However, they are able to hit players when up close with a melee attack when they are on fire and ONLY when they are on fire.
  4792. The player and Snow Golems can kill a blaze with snowballs, although Snow Golems will be killed quickly by the Blazes' attacks.
  4793. Each snowball deals 3 () damage, so it takes 7 snowballs to kill one Blaze.
  4794. Blazes will take damage from rain and snowy weather if spawned into the over-world.
  4795. As of Beta 1.9 Pre-release 5, Blaze only drop a Blaze Rod when killed by the player.
  4796. As of Version RC2, Blaze now have their own sounds. They make "breath" sounds and make metallic clunks when hurt.
  4797. Blazes, despite their almost alien morphology, share a recolored face with The Player and other humanoid mobs.
  4798. When this mob is not in pursuit of the player, they are bound to the ground. One can observe this as they may jump to get onto higher blocks and drop when going off an edge.
  4799. One may also observe that when they make contact with a block below they make footstepping noises appropriate to the block, as any earth-bound mob with feet would make, despite being a floating mob.
  4800. Once fired, the Blaze's fireball has an infinite range. However, The Player still needs to be within 'attack range' of the Blaze to attack.
  4801. Blazes take damage from water.
  4802. ]])
  4803. blaze.close()
  4804. blockids=fs.open("mem/redworks/minepedia/blockids","w")
  4805. blockids.write([[These data values refer to the different types of blocks and items. They are used in many, many places in Minecraft. Block IDs are used to define blocks placed in the world and inventory items (including items in chests and items dropped in the world). Item IDs are only valid for items. Each inventory slot has a unique slot number. In a Beta world, Block data further defines blocks placed, describing for example the height of water or the direction a torch points.
  4806. Icon  Dec  Hex  Block type  
  4807. 00  00  Air  
  4808.  01  01  Stone  
  4809.  02  02  Grass  
  4810.  03  03  Dirt  
  4811.  04  04  Cobblestone  
  4812.  05  05  Wooden Planks  
  4813.  06  06  Saplings D B  
  4814.  07  07  Bedrock  
  4815.  08  08  Water D  
  4816.  09  09  Stationary water D  
  4817.  10  0A  Lava D  
  4818.  11  0B  Stationary lava D  
  4819.  12  0C  Sand  
  4820.  13  0D  Gravel  
  4821.  14  0E  Gold Ore  
  4822.  15  0F  Iron Ore  
  4823.  16  10  Coal Ore  
  4824.  17  11  Wood D B  
  4825.  18  12  Leaves D B  
  4826.  19  13  Sponge  
  4827.  20  14  Glass  
  4828.  21  15  Lapis Lazuli Ore  
  4829.  22  16  Lapis Lazuli Block  
  4830.  23  17  Dispenser D T  
  4831.  24  18  Sandstone  
  4832.  25  19  Note Block T  
  4833.  26  1A  Bed D I  
  4834.  27  1B  Powered Rail D  
  4835.  28  1C  Detector Rail D  
  4836.  29  1D  Sticky Piston D  
  4837.  30  1E  Cobweb  
  4838.  31  1F  Tall Grass D  
  4839. Icon  Dec  Hex  Block type  
  4840.  32  20  Dead Bush  
  4841.  33  21  Piston D  
  4842.  34  22  Piston Extension D  
  4843.  35  23  Wool D B  
  4844.  36  24  Block moved by Piston T  
  4845.  37  25  Dandelion  
  4846.  38  26  Rose  
  4847.  39  27  Brown Mushroom  
  4848.  40  28  Red Mushroom  
  4849.  41  29  Block of Gold  
  4850.  42  2A  Block of Iron  
  4851.  43  2B  Double Slabs D B  
  4852.  44  2C  Slabs D B  
  4853.  45  2D  Bricks  
  4854.  46  2E  TNT  
  4855.  47  2F  Bookshelf  
  4856.  48  30  Moss Stone  
  4857.  49  31  Obsidian  
  4858.  50  32  Torch D  
  4859.  51  33  Fire D  
  4860.  52  34  Monster Spawner T  
  4861.  53  35  Wooden Stairs D  
  4862.  54  36  Chest D T  
  4863.  55  37  Redstone Wire D I  
  4864.  56  38  Diamond Ore  
  4865.  57  39  Block of Diamond  
  4866.  58  3A  Crafting Table  
  4867.  59  3B  Wheat Seeds D  
  4868.  60  3C  Farmland D  
  4869.  61  3D  Furnace D T  
  4870.  62  3E  Burning Furnace D T  
  4871.  63  3F  Sign Post D I T  
  4872. Icon  Dec  Hex  Block type  
  4873.  64  40  Wooden Door D I  
  4874.  65  41  Ladders D  
  4875.  66  42  Rails D  
  4876.  67  43  Cobblestone Stairs D  
  4877.  68  44  Wall Sign D T  
  4878.  69  45  Lever D  
  4879.  70  46  Stone Pressure Plate D  
  4880.  71  47  Iron Door D I  
  4881.  72  48  Wooden Pressure Plate D  
  4882.  73  49  Redstone Ore  
  4883.  74  4A  Glowing Redstone Ore  
  4884.  75  4B  Redstone Torch ("off" state) D  
  4885.  76  4C  Redstone Torch ("on" state) D  
  4886.  77  4D  Stone Button D  
  4887.  78  4E  Snow D  
  4888.  79  4F  Ice  
  4889.  80  50  Snow Block  
  4890.  81  51  Cactus D  
  4891.  82  52  Clay Block  
  4892.  83  53  Sugar Cane D I  
  4893.  84  54  Jukebox D T  
  4894.  85  55  Fence  
  4895.  86  56  Pumpkin D  
  4896.  87  57  Netherrack  
  4897.  88  58  Soul Sand  
  4898.  89  59  Glowstone Block  
  4899.  90  5A  Portal  
  4900.  91  5B  Jack-O-Lantern D  
  4901.  92  5C  Cake Block D I  
  4902.  93  5D  Redstone Repeater ("off" state) D I  
  4903.  94  5E  Redstone Repeater ("on" state) D I  
  4904.  95  5F  Locked Chest  
  4905. Icon  Dec  Hex  Block type  
  4906.  96  60  Trapdoor D  
  4907.  97  61  Hidden Silverfish D  
  4908.  98  62  Stone Bricks D B  
  4909.  99  63  Huge Brown Mushroom D  
  4910.  100  64  Huge Red Mushroom D  
  4911.  101  65  Iron Bars  
  4912.  102  66  Glass Pane  
  4913.  103  67  Melon  
  4914.  104  68  Pumpkin Stem D  
  4915.  105  69  Melon Stem D  
  4916.  106  6A  Vines D  
  4917.  107  6B  Fence Gate D  
  4918.  108  6C  Brick Stairs D  
  4919.  109  6D  Stone Brick Stairs D  
  4920.  110  6E  Mycelium  
  4921.  111  6F  Lily Pad  
  4922.  112  70  Nether Brick  
  4923.  113  71  Nether Brick Fence  
  4924.  114  72  Nether Brick Stairs D  
  4925.  115  73  Nether Wart D I  
  4926.  116  74  Enchantment Table T  
  4927.  117  75  Brewing Stand D T I  
  4928.  118  76  Cauldron D I  
  4929.  119  77  End Portal T  
  4930.  120  78  End Portal Frame D  
  4931.  121  79  End Stone  
  4932.  122  7A  Dragon Egg  
  4933. Item IDs All items have values above 255, making it easy to separate the Block IDs from the Item IDs. Entries marked with a D require additional data to fully define the item in a Beta world. The chainmail set is currently unobtainable in Survival mode without hacking or, in multiplayer, the /give server command. It is available in Creative mode, however. The same applies to all music discs except for 13 and cat.
  4934.  
  4935. Icon  Dec  Hex  Item  
  4936. 256  100  Iron Shovel  
  4937. 257  101  Iron Pickaxe  
  4938. 258  102  Iron Axe  
  4939. 259  103  Flint and Steel  
  4940. 260  104  Red Apple  
  4941. 261  105  Bow  
  4942. 262  106  Arrow  
  4943. 263  107  Coal D  
  4944. 264  108  Diamond  
  4945. 265  109  Iron Ingot  
  4946. 266  10A  Gold Ingot  
  4947. 267  10B  Iron Sword  
  4948. 268  10C  Wooden Sword  
  4949. 269  10D  Wooden Shovel  
  4950. 270  10E  Wooden Pickaxe  
  4951. 271  10F  Wooden Axe  
  4952. 272  110  Stone Sword  
  4953. 273  111  Stone Shovel  
  4954. 274  112  Stone Pickaxe  
  4955. 275  113  Stone Axe  
  4956. 276  114  Diamond Sword  
  4957. 277  115  Diamond Shovel  
  4958. 278  116  Diamond Pickaxe  
  4959. 279  117  Diamond Axe  
  4960. 280  118  Stick  
  4961. 281  119  Bowl  
  4962. 282  11A  Mushroom Soup  
  4963. 283  11B  Gold Sword  
  4964. 284  11C  Gold Shovel  
  4965. 285  11D  Gold Pickaxe  
  4966. 286  11E  Gold Axe  
  4967. 287  11F  String  
  4968. Icon  Dec  Hex  Item  
  4969. 288  120  Feather  
  4970. 289  121  Gunpowder  
  4971. 290  122  Wooden Hoe  
  4972. 291  123  Stone Hoe  
  4973. 292  124  Iron Hoe  
  4974. 293  125  Diamond Hoe  
  4975. 294  126  Gold Hoe  
  4976. 295  127  Seeds  
  4977. 296  128  Wheat  
  4978. 297  129  Bread  
  4979. 298  12A  Leather Cap  
  4980. 299  12B  Leather Tunic  
  4981. 300  12C  Leather Pants  
  4982. 301  12D  Leather Boots  
  4983. 302  12E  Chain Helmet  
  4984. 303  12F  Chain Chestplate  
  4985. 304  130  Chain Leggings  
  4986. 305  131  Chain Boots  
  4987. 306  132  Iron Helmet  
  4988. 307  133  Iron Chestplate  
  4989. 308  134  Iron Leggings  
  4990. 309  135  Iron Boots  
  4991. 310  136  Diamond Helmet  
  4992. 311  137  Diamond Chestplate  
  4993. 312  138  Diamond Leggings  
  4994. 313  139  Diamond Boots  
  4995. 314  13A  Gold Helmet  
  4996. 315  13B  Gold Chestplate  
  4997. 316  13C  Gold Leggings  
  4998. 317  13D  Gold Boots  
  4999. 318  13E  Flint  
  5000. 319  13F  Raw Porkchop  
  5001. Icon  Dec  Hex  Item  
  5002. 320  140  Cooked Porkchop  
  5003. 321  141  Paintings  
  5004. 322  142  Golden Apple  
  5005. 323  143  Sign  
  5006. 324  144  Wooden door  
  5007. 325  145  Bucket  
  5008. 326  146  Water bucket  
  5009. 327  147  Lava bucket  
  5010. 328  148  Minecart  
  5011. 329  149  Saddle  
  5012. 330  14A  Iron door  
  5013. 331  14B  Redstone  
  5014. 332  14C  Snowball  
  5015. 333  14D  Boat  
  5016. 334  14E  Leather  
  5017. 335  14F  Milk  
  5018. 336  150  Clay Brick  
  5019. 337  151  Clay  
  5020. 338  152  Sugar Cane  
  5021. 339  153  Paper  
  5022. 340  154  Book  
  5023. 341  155  Slimeball  
  5024. 342  156  Minecart with Chest  
  5025. 343  157  Minecart with Furnace  
  5026. 344  158  Egg  
  5027. 345  159  Compass  
  5028. 346  15A  Fishing Rod  
  5029. 347  15B  Clock  
  5030. 348  15C  Glowstone Dust  
  5031. 349  15D  Raw Fish  
  5032. 350  15E  Cooked Fish  
  5033. 351  15F  Dye D  
  5034. Icon  Dec  Hex  Item  
  5035. 352  160  Bone  
  5036. 353  161  Sugar  
  5037. 354  162  Cake  
  5038. 355  163  Bed  
  5039. 356  164  Redstone Repeater  
  5040. 357  165  Cookie  
  5041. 358  166  Map  
  5042. 359  167  Shears  
  5043. 360  168  Melon Slice  
  5044. 361  169  Pumpkin Seeds  
  5045. 362  16A  Melon Seeds  
  5046. 363  16B  Raw Beef  
  5047. 364  16C  Steak  
  5048. 365  16D  Raw Chicken  
  5049. 366  16E  Cooked Chicken  
  5050. 367  16F  Rotten Flesh  
  5051. 368  170  Ender Pearl  
  5052. 369  171  Blaze Rod  
  5053. 370  172  Ghast Tear  
  5054. 371  173  Gold Nugget  
  5055. 372  174  Nether Wart  
  5056. 373  175  Potions D  
  5057. 374  176  Glass Bottle  
  5058. 375  177  Spider Eye  
  5059. 376  178  Fermented Spider Eye  
  5060. 377  179  Blaze Powder  
  5061. 378  17A  Magma Cream  
  5062. 379  17B  Brewing Stand  
  5063. 380  17C  Cauldron  
  5064. 381  17D  Eye of Ender  
  5065. 382  17E  Glistering Melon  
  5066. 383  17F  Spawner Egg D  
  5067. Icon  Dec  Hex  Item  
  5068. 2256  8D0  13 Disc  
  5069. 2257  8D1  Cat Disc  
  5070. 2258  8D2  blocks Disc  
  5071. 2259  8D3  chirp Disc  
  5072. 2260  8D4  far Disc  
  5073. 2261  8D5  mall Disc  
  5074. 2262  8D6  mellohi Disc  
  5075. 2263  8D7  stal Disc  
  5076. 2264  8D8  strad Disc  
  5077. 2265  8D9  ward Disc  
  5078. 2266  8DA  11 Disc  
  5079. Entity IDs Icon  Dec  Hex  Entity  
  5080. Drops  
  5081. 1  01  Dropped item  
  5082. 2  02  Experience Orb  
  5083. Projectiles  
  5084. 10  0A  Shot arrow  
  5085. 11  0B  Thrown snowball  
  5086. 12  0C  Ghast fireball  
  5087. 13  0D  Blaze fireball  
  5088. 14  0E  Thrown Ender Pearl  
  5089. 15  0F  Thrown Eye of Ender  
  5090. Blocks  
  5091. 20  14  Primed TNT  
  5092. 21  15  Falling block (gravel, sand)  
  5093. Vehicles  
  5094. 40  28  Minecart  
  5095. 41  29  Boat  
  5096. Icon  Dec  Hex  Entity  
  5097. Hostile mobs  
  5098. 50  32  Creeper  
  5099. 51  33  Skeleton  
  5100. 52  34  Spider  
  5101. 53  35  Giant  
  5102. 54  36  Zombie  
  5103. 55  37  Slime  
  5104. 56  38  Ghast  
  5105. 57  39  Zombie Pigman  
  5106. 58  3A  Enderman  
  5107. 59  3B  Cave Spider  
  5108. 60  3C  Silverfish  
  5109. 61  3D  Blaze  
  5110. 62  3E  Magma Cube  
  5111. 63  3F  Enderdragon  
  5112. Icon  Dec  Hex  Entity  
  5113. Passive mobs  
  5114. 90  5A  Pig  
  5115. 91  5B  Sheep  
  5116. 92  5C  Cow  
  5117. 93  5D  Chicken  
  5118. 94  5E  Squid  
  5119. 95  5F  Wolf  
  5120. 96  60  Mooshroom  
  5121. 97  61  Snow Golem  
  5122. NPCs  
  5123. 120  78  Villager  
  5124. Other  
  5125. 200  C8  Ender Crystal  
  5126. Icon  Dec  Hex  Block type  
  5127. 00  00  Air  
  5128.  01  01  Stone  
  5129.  02  02  Grass  
  5130.  03  03  Dirt  
  5131.  04  04  Cobblestone  
  5132.  05  05  Wooden Planks  
  5133.  06  06  Saplings D B  
  5134.  07  07  Bedrock  
  5135.  08  08  Water D  
  5136.  09  09  Stationary water D  
  5137.  10  0A  Lava D  
  5138.  11  0B  Stationary lava D  
  5139.  12  0C  Sand  
  5140.  13  0D  Gravel  
  5141.  14  0E  Gold Ore  
  5142.  15  0F  Iron Ore  
  5143.  16  10  Coal Ore  
  5144.  17  11  Wood D B  
  5145.  18  12  Leaves D B  
  5146.  19  13  Sponge  
  5147.  20  14  Glass  
  5148.  21  15  Lapis Lazuli Ore  
  5149.  22  16  Lapis Lazuli Block  
  5150.  23  17  Dispenser D T  
  5151.  24  18  Sandstone  
  5152.  25  19  Note Block T  
  5153.  26  1A  Bed D I  
  5154.  27  1B  Powered Rail D  
  5155.  28  1C  Detector Rail D  
  5156.  29  1D  Sticky Piston D  
  5157.  30  1E  Cobweb  
  5158.  31  1F  Tall Grass D  
  5159. Icon  Dec  Hex  Block type  
  5160.  32  20  Dead Bush  
  5161.  33  21  Piston D  
  5162.  34  22  Piston Extension D  
  5163.  35  23  Wool D B  
  5164.  36  24  Block moved by Piston T  
  5165.  37  25  Dandelion  
  5166.  38  26  Rose  
  5167.  39  27  Brown Mushroom  
  5168.  40  28  Red Mushroom  
  5169.  41  29  Block of Gold  
  5170.  42  2A  Block of Iron  
  5171.  43  2B  Double Slabs D B  
  5172.  44  2C  Slabs D B  
  5173.  45  2D  Bricks  
  5174.  46  2E  TNT  
  5175.  47  2F  Bookshelf  
  5176.  48  30  Moss Stone  
  5177.  49  31  Obsidian  
  5178.  50  32  Torch D  
  5179.  51  33  Fire D  
  5180.  52  34  Monster Spawner T  
  5181.  53  35  Wooden Stairs D  
  5182.  54  36  Chest D T  
  5183.  55  37  Redstone Wire D I  
  5184.  56  38  Diamond Ore  
  5185.  57  39  Block of Diamond  
  5186.  58  3A  Crafting Table  
  5187.  59  3B  Wheat Seeds D  
  5188.  60  3C  Farmland D  
  5189.  61  3D  Furnace D T  
  5190.  62  3E  Burning Furnace D T  
  5191.  63  3F  Sign Post D I T  
  5192. Icon  Dec  Hex  Block type  
  5193.  64  40  Wooden Door D I  
  5194.  65  41  Ladders D  
  5195.  66  42  Rails D  
  5196.  67  43  Cobblestone Stairs D  
  5197.  68  44  Wall Sign D T  
  5198.  69  45  Lever D  
  5199.  70  46  Stone Pressure Plate D  
  5200.  71  47  Iron Door D I  
  5201.  72  48  Wooden Pressure Plate D  
  5202.  73  49  Redstone Ore  
  5203.  74  4A  Glowing Redstone Ore  
  5204.  75  4B  Redstone Torch ("off" state) D  
  5205.  76  4C  Redstone Torch ("on" state) D  
  5206.  77  4D  Stone Button D  
  5207.  78  4E  Snow D  
  5208.  79  4F  Ice  
  5209.  80  50  Snow Block  
  5210.  81  51  Cactus D  
  5211.  82  52  Clay Block  
  5212.  83  53  Sugar Cane D I  
  5213.  84  54  Jukebox D T  
  5214.  85  55  Fence  
  5215.  86  56  Pumpkin D  
  5216.  87  57  Netherrack  
  5217.  88  58  Soul Sand  
  5218.  89  59  Glowstone Block  
  5219.  90  5A  Portal  
  5220.  91  5B  Jack-O-Lantern D  
  5221.  92  5C  Cake Block D I  
  5222.  93  5D  Redstone Repeater ("off" state) D I  
  5223.  94  5E  Redstone Repeater ("on" state) D I  
  5224.  95  5F  Locked Chest  
  5225. Icon  Dec  Hex  Block type  
  5226.  96  60  Trapdoor D  
  5227.  97  61  Hidden Silverfish D  
  5228.  98  62  Stone Bricks D B  
  5229.  99  63  Huge Brown Mushroom D  
  5230.  100  64  Huge Red Mushroom D  
  5231.  101  65  Iron Bars  
  5232.  102  66  Glass Pane  
  5233.  103  67  Melon  
  5234.  104  68  Pumpkin Stem D  
  5235.  105  69  Melon Stem D  
  5236.  106  6A  Vines D  
  5237.  107  6B  Fence Gate D  
  5238.  108  6C  Brick Stairs D  
  5239.  109  6D  Stone Brick Stairs D  
  5240.  110  6E  Mycelium  
  5241.  111  6F  Lily Pad  
  5242.  112  70  Nether Brick  
  5243.  113  71  Nether Brick Fence  
  5244.  114  72  Nether Brick Stairs D  
  5245.  115  73  Nether Wart D I  
  5246.  116  74  Enchantment Table T  
  5247.  117  75  Brewing Stand D T I  
  5248.  118  76  Cauldron D I  
  5249.  119  77  End Portal T  
  5250.  120  78  End Portal Frame D  
  5251.  121  79  End Stone  
  5252.  122  7A  Dragon Egg  
  5253. Item IDs All items have values above 255, making it easy to separate the Block IDs from the Item IDs. Entries marked with a D require additional data to fully define the item in a Beta world. The chainmail set is currently unobtainable in Survival mode without hacking or, in multiplayer, the /give server command. It is available in Creative mode, however. The same applies to all music discs except for 13 and cat.
  5254.  
  5255. Icon  Dec  Hex  Item  
  5256. 256  100  Iron Shovel  
  5257. 257  101  Iron Pickaxe  
  5258. 258  102  Iron Axe  
  5259. 259  103  Flint and Steel  
  5260. 260  104  Red Apple  
  5261. 261  105  Bow  
  5262. 262  106  Arrow  
  5263. 263  107  Coal D  
  5264. 264  108  Diamond  
  5265. 265  109  Iron Ingot  
  5266. 266  10A  Gold Ingot  
  5267. 267  10B  Iron Sword  
  5268. 268  10C  Wooden Sword  
  5269. 269  10D  Wooden Shovel  
  5270. 270  10E  Wooden Pickaxe  
  5271. 271  10F  Wooden Axe  
  5272. 272  110  Stone Sword  
  5273. 273  111  Stone Shovel  
  5274. 274  112  Stone Pickaxe  
  5275. 275  113  Stone Axe  
  5276. 276  114  Diamond Sword  
  5277. 277  115  Diamond Shovel  
  5278. 278  116  Diamond Pickaxe  
  5279. 279  117  Diamond Axe  
  5280. 280  118  Stick  
  5281. 281  119  Bowl  
  5282. 282  11A  Mushroom Soup  
  5283. 283  11B  Gold Sword  
  5284. 284  11C  Gold Shovel  
  5285. 285  11D  Gold Pickaxe  
  5286. 286  11E  Gold Axe  
  5287. 287  11F  String  
  5288. Icon  Dec  Hex  Item  
  5289. 288  120  Feather  
  5290. 289  121  Gunpowder  
  5291. 290  122  Wooden Hoe  
  5292. 291  123  Stone Hoe  
  5293. 292  124  Iron Hoe  
  5294. 293  125  Diamond Hoe  
  5295. 294  126  Gold Hoe  
  5296. 295  127  Seeds  
  5297. 296  128  Wheat  
  5298. 297  129  Bread  
  5299. 298  12A  Leather Cap  
  5300. 299  12B  Leather Tunic  
  5301. 300  12C  Leather Pants  
  5302. 301  12D  Leather Boots  
  5303. 302  12E  Chain Helmet  
  5304. 303  12F  Chain Chestplate  
  5305. 304  130  Chain Leggings  
  5306. 305  131  Chain Boots  
  5307. 306  132  Iron Helmet  
  5308. 307  133  Iron Chestplate  
  5309. 308  134  Iron Leggings  
  5310. 309  135  Iron Boots  
  5311. 310  136  Diamond Helmet  
  5312. 311  137  Diamond Chestplate  
  5313. 312  138  Diamond Leggings  
  5314. 313  139  Diamond Boots  
  5315. 314  13A  Gold Helmet  
  5316. 315  13B  Gold Chestplate  
  5317. 316  13C  Gold Leggings  
  5318. 317  13D  Gold Boots  
  5319. 318  13E  Flint  
  5320. 319  13F  Raw Porkchop  
  5321. Icon  Dec  Hex  Item  
  5322. 320  140  Cooked Porkchop  
  5323. 321  141  Paintings  
  5324. 322  142  Golden Apple  
  5325. 323  143  Sign  
  5326. 324  144  Wooden door  
  5327. 325  145  Bucket  
  5328. 326  146  Water bucket  
  5329. 327  147  Lava bucket  
  5330. 328  148  Minecart  
  5331. 329  149  Saddle  
  5332. 330  14A  Iron door  
  5333. 331  14B  Redstone  
  5334. 332  14C  Snowball  
  5335. 333  14D  Boat  
  5336. 334  14E  Leather  
  5337. 335  14F  Milk  
  5338. 336  150  Clay Brick  
  5339. 337  151  Clay  
  5340. 338  152  Sugar Cane  
  5341. 339  153  Paper  
  5342. 340  154  Book  
  5343. 341  155  Slimeball  
  5344. 342  156  Minecart with Chest  
  5345. 343  157  Minecart with Furnace  
  5346. 344  158  Egg  
  5347. 345  159  Compass  
  5348. 346  15A  Fishing Rod  
  5349. 347  15B  Clock  
  5350. 348  15C  Glowstone Dust  
  5351. 349  15D  Raw Fish  
  5352. 350  15E  Cooked Fish  
  5353. 351  15F  Dye D  
  5354. Icon  Dec  Hex  Item  
  5355. 352  160  Bone  
  5356. 353  161  Sugar  
  5357. 354  162  Cake  
  5358. 355  163  Bed  
  5359. 356  164  Redstone Repeater  
  5360. 357  165  Cookie  
  5361. 358  166  Map  
  5362. 359  167  Shears  
  5363. 360  168  Melon Slice  
  5364. 361  169  Pumpkin Seeds  
  5365. 362  16A  Melon Seeds  
  5366. 363  16B  Raw Beef  
  5367. 364  16C  Steak  
  5368. 365  16D  Raw Chicken  
  5369. 366  16E  Cooked Chicken  
  5370. 367  16F  Rotten Flesh  
  5371. 368  170  Ender Pearl  
  5372. 369  171  Blaze Rod  
  5373. 370  172  Ghast Tear  
  5374. 371  173  Gold Nugget  
  5375. 372  174  Nether Wart  
  5376. 373  175  Potions D  
  5377. 374  176  Glass Bottle  
  5378. 375  177  Spider Eye  
  5379. 376  178  Fermented Spider Eye  
  5380. 377  179  Blaze Powder  
  5381. 378  17A  Magma Cream  
  5382. 379  17B  Brewing Stand  
  5383. 380  17C  Cauldron  
  5384. 381  17D  Eye of Ender  
  5385. 382  17E  Glistering Melon  
  5386. 383  17F  Spawner Egg D  
  5387. Icon  Dec  Hex  Item  
  5388. 2256  8D0  13 Disc  
  5389. 2257  8D1  Cat Disc  
  5390. 2258  8D2  blocks Disc  
  5391. 2259  8D3  chirp Disc  
  5392. 2260  8D4  far Disc  
  5393. 2261  8D5  mall Disc  
  5394. 2262  8D6  mellohi Disc  
  5395. 2263  8D7  stal Disc  
  5396. 2264  8D8  strad Disc  
  5397. 2265  8D9  ward Disc  
  5398. 2266  8DA  11 Disc  
  5399. Entity IDs Icon  Dec  Hex  Entity  
  5400. Drops  
  5401. 1  01  Dropped item  
  5402. 2  02  Experience Orb  
  5403. Projectiles  
  5404. 10  0A  Shot arrow  
  5405. 11  0B  Thrown snowball  
  5406. 12  0C  Ghast fireball  
  5407. 13  0D  Blaze fireball  
  5408. 14  0E  Thrown Ender Pearl  
  5409. 15  0F  Thrown Eye of Ender  
  5410. Blocks  
  5411. 20  14  Primed TNT  
  5412. 21  15  Falling block (gravel, sand)  
  5413. Vehicles  
  5414. 40  28  Minecart  
  5415. 41  29  Boat  
  5416. Icon  Dec  Hex  Entity  
  5417. Hostile mobs  
  5418. 50  32  Creeper  
  5419. 51  33  Skeleton  
  5420. 52  34  Spider  
  5421. 53  35  Giant  
  5422. 54  36  Zombie  
  5423. 55  37  Slime  
  5424. 56  38  Ghast  
  5425. 57  39  Zombie Pigman  
  5426. 58  3A  Enderman  
  5427. 59  3B  Cave Spider  
  5428. 60  3C  Silverfish  
  5429. 61  3D  Blaze  
  5430. 62  3E  Magma Cube  
  5431. 63  3F  Enderdragon  
  5432. Icon  Dec  Hex  Entity  
  5433. Passive mobs  
  5434. 90  5A  Pig  
  5435. 91  5B  Sheep  
  5436. 92  5C  Cow  
  5437. 93  5D  Chicken  
  5438. 94  5E  Squid  
  5439. 95  5F  Wolf  
  5440. 96  60  Mooshroom  
  5441. 97  61  Snow Golem  
  5442. NPCs  
  5443. 120  78  Villager  
  5444. Other  
  5445. 200  C8  Ender Crystal  
  5446. 0x2: Facing West
  5447. 0x3: Facing South
  5448. 0x4: Facing North
  5449. Ground levers:
  5450.  
  5451. 0x5: Lever points South when off.
  5452. 0x6: Lever points East when off. (Note that unlike the other types of switch, this version didn't power wires around the block it was sitting on. This bug was fixed in Beta 1.6)
  5453. Doors The two least significant bits are the orientation of the door, that is, the corner in which its hinge is positioned:
  5454.  
  5455. 0x0: Northwest corner
  5456. 0x1: Northeast corner
  5457. 0x2: Southeast corner
  5458. 0x3: Southwest corner
  5459. The two bits above are flags:
  5460.  
  5461. 0x8: If this bit is set, this is the top half of a door (else the lower half).
  5462. 0x4: If this bit is set, the door has swung counterclockwise around its hinge.
  5463. For example, the bottom half of a door with its hinge on the Southwest corner, which is swung so that it is closed when viewed from the West, will have a data value of (3 | 4) = (3 + 4) = 7.
  5464.  
  5465. Buttons 0x8 If this bit is set, the button has been pressed. If this bit is set in a saved level, the button will remain pressed for an undefined length of time after the level is loaded.
  5466. Button direction:
  5467.  
  5468. 0x1: Facing East
  5469. 0x2: Facing West
  5470. 0x3: Facing South
  5471. 0x4: Facing North
  5472. Sign Posts 0x0: South
  5473. 0x1: South-Southwest
  5474. 0x2: Southwest
  5475. 0x3: West-Southwest
  5476. 0x4: West
  5477. 0x5: West-Northwest
  5478. 0x6: Northwest
  5479. 0x7: North-Northwest
  5480. 0x8: North
  5481. 0x9: North-Northeast
  5482. 0xA: Northeast
  5483. 0xB: East-Northeast
  5484. 0xC: East
  5485. 0xD: East-Southeast
  5486. 0xE: Southeast
  5487. 0xF: South-Southeast
  5488. Wall Signs, Furnaces, Dispensers and Chests 0x2: Facing North
  5489. 0x3: Facing South
  5490. 0x4: Facing West
  5491. 0x5: Facing East
  5492. Pumpkins and Jack-O-Lanterns 0x0: Facing South
  5493. 0x1: Facing West
  5494. 0x2: Facing North
  5495. 0x3: Facing East
  5496. Pressure Plates 0x1: If this bit is set, the plate is pressed.
  5497. Slab and Double Slab material Icon  Value  Description  
  5498.  0x0  Stone Slab  
  5499.  0x1  Sandstone Slab  
  5500.  0x2  Wooden Slab  
  5501.  0x3  Cobblestone Slab  
  5502.  0x4  Brick Slab  
  5503.  0x5  Stone Brick Slab  
  5504.  0x6  Stone Slab  
  5505. Snow  
  5506. Heights of snow from 0-7, going from left to right0x0: Normal snowfall height
  5507. ...
  5508. 0x7: Full block size height
  5509. The height repeats for values 8-15. Note that snow does not occur naturally at other heights than 0, but can be edited or hacked in. Values 0-2 has no hitbox, values 3-7 has the same hitbox as a slab.
  5510.  
  5511. Cake 0x0: 0 pieces eaten
  5512. 0x1: 1 piece eaten
  5513. 0x2: 2 pieces eaten
  5514. 0x3: 3 pieces eaten
  5515. 0x4: 4 pieces eaten
  5516. 0x5: 5 pieces eaten
  5517. Beds 0x0: Head is pointing South
  5518. 0x1: Head is pointing West
  5519. 0x2: Head is pointing North
  5520. 0x3: Head is pointing East
  5521. 0x4: (bit flag) - When 0, the bed is empty. When 1, the bed is occupied.
  5522. 0x8: (bit flag) - When 0, the foot of the bed. When 1, the head of the bed.
  5523. Redstone Repeater Low (1st & 2nd) bits:
  5524.  
  5525. 0x0: Facing North
  5526. 0x1: Facing East
  5527. 0x2: Facing South
  5528. 0x3: Facing West
  5529. High (3rd & 4th) bits:
  5530.  
  5531. 0x0: 1 tick delay
  5532. 0x1: 2 tick delay
  5533. 0x2: 3 tick delay
  5534. 0x3: 4 tick delay
  5535. Redstone Wire 0xF is a wire placed right next to a power source (like a redstone torch). The value declines with distance until 0x0, which is a non-powered wire. The direction of the wire is not saved but calculated at runtime.
  5536.  
  5537. Tall Grass Icon  Value  Description  
  5538.  0x0  Dead shrub (identical in appearance to block Dead Bush when placed, but acts like Tall Grass)  
  5539.  0x1  Tall grass  
  5540.  0x2  Fern  
  5541. Trapdoors 0x4 is a bit that determines whether or not the trapdoor is swung open. 0 for closed (on the ground), 1 for open (against its connecting wall). The remaining two bits describe which wall the trapdoor is attached to:
  5542.  
  5543. 0x0: Attached to the South wall
  5544. 0x1: Attached to the North wall
  5545. 0x2: Attached to the East wall
  5546. 0x3: Attached to the West wall
  5547. Piston The top bit (0x8) is a status bit that determines whether the piston is pushed out or not. 1 for pushed out, 0 for retracted.
  5548.  
  5549. The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing)
  5550.  
  5551. 0: Down
  5552. 1: Up
  5553. 2: North
  5554. 3: South
  5555. 4: West
  5556. 5: East
  5557. Piston Extension The top bit (0x8) is a status bit that determines whether the head is sticky or not (note that the Piston Body actually has completely different block types for Sticky and Regular). 1 is sticky, 0 is regular.
  5558.  
  5559. The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing).
  5560.  
  5561. 0: Down
  5562. 1: Up
  5563. 2: North
  5564. 3: South
  5565. 4: West
  5566. 5: East
  5567. Stone Brick 0: Normal
  5568. 1: Mossy
  5569. 2: Cracked
  5570. Huge brown and red mushroom Huge mushrooms consist of the same blocks throughout their structure, the data value of each block decides the texture. The default texture on all sides is porous flesh. The cap texture can be either the brown mushroom or red mushroom texture, the textures for porous and stem sides are identical.
  5571.  
  5572. Value  Description  Textures  
  5573. 0  Fleshy piece  Pores on all sides  
  5574. 1  Corner piece  Cap texture on top, West and North  
  5575. 2  Side piece  Cap texture on top and North  
  5576. 3  Corner piece  Cap texture on top, North and East  
  5577. 4  Side piece  Cap texture on top and West  
  5578. 5  Top piece  Cap texture on top  
  5579. 6  Side piece  Cap texture on top and East  
  5580. 7  Corner piece  Cap texture on top, South and West  
  5581. 8  Side piece  Cap texture on top and South  
  5582. 9  Corner piece  Cap texture on top, East and South  
  5583. 10  Stem piece  Stem texture on all four sides, pores on top and bottom  
  5584. Vines Determines the face against which the vine is anchored. Note that (except for Top) these are testable as bit flags, unlike most of the other directional data for other block types. Multiple sides can contain vines. The "top" attachment is assumed to be present if data is 0 or there is solid block above.
  5585.  
  5586. 1: South
  5587. 2: West
  5588. 4: North
  5589. 8: East
  5590. Fence Gates 0x4 is a bit flag: 1 is open, 0 is closed. The remaining two bits determine in which direction the gate will open.
  5591.  
  5592. 0: To the South
  5593. 1: To the West
  5594. 2: To the North
  5595. 3: To the East
  5596. Hidden Silverfish A silverfish will hide inside a Stone, Cobblestone, or Stone Brick block, changing it into a Hidden Silverfish block. The data value tells us its appearance:
  5597.  
  5598. 0: Stone
  5599. 1: Cobblestone
  5600. 2: Stone Brick
  5601. Potions A Glass Bottle filled with a potion. Potion type is stored in item's damage value as a 16-bit number. Potion effect, name, and other flags are encoded on bits. Effect duration itself isn't there, but can be calculated from other values.
  5602.  
  5603. Current meaning of bits is described below. Note that potion name overlaps with potion effect and tier.
  5604.  
  5605. Bit  Dec  Hex  Meaning  
  5606. 0  1  0001  Potion effect  Potion name  
  5607. 1  2  0002  
  5608. 2  4  0004  
  5609. 3  8  0008  
  5610. 4  16  0010  
  5611. 5  32  0020  Tier  
  5612. 6  64  0040  Extended duration  
  5613. 7  128  0800  (ignored)  
  5614. 8  256  0100  
  5615. 9  512  0200  
  5616. 10  1024  0400  
  5617. 11  2048  0800  
  5618. 12  4096  1000  
  5619. 13  8192  2000  
  5620. 14  16384  4000  Splash potion  
  5621. 15  32768  8000  (ignored)  
  5622.  
  5623. To calculate damage value of potion with desired effect use the following formula:
  5624.  
  5625. DV = potion_effect + tier_bit + extended_bit + splash_bit
  5626. for example:
  5627.  
  5628. potion with "Instant Health" effect has damage value 5 (= 5 + 0 + 0 + 0);
  5629. potion with extended "Slowness" effect has value 74 (= 10 + 0 + 64 + 0);
  5630. splash potion with tier II "Strength" effect has value 16425 (= 9 + 32 + 0 + 16384).
  5631. To get potion with certain name, use the following formula:
  5632.  
  5633. DV = potion_name + extended_bit + splash_bit
  5634. for example:
  5635.  
  5636. "Splash Charming Potion" has damage value 16422 (= 38 + 0 + 16384)
  5637. "Potion name" bits Dec  Hex  Potion  
  5638. 0  00  Water Bottle / Mundane Potion  
  5639. 1  01  Potion of Regeneration  
  5640. 2  02  Potion of Swiftness  
  5641. 3  03  Potion of Fire Resistance  
  5642. 4  04  Potion of Poison  
  5643. 5  05  Potion of Healing  
  5644. 6  06  Clear Potion  
  5645. 7  07  Clear Potion  
  5646. 8  08  Potion of Weakness  
  5647. 9  09  Potion of Strength  
  5648. 10  0a  Potion of Slowness  
  5649. 11  0b  Diffuse Potion  
  5650. 12  0c  Potion of Harming  
  5651. 13  0d  Artless Potion  
  5652. 14  0e  Thin Potion  
  5653. 15  0f  Thin Potion  
  5654. Dec  Hex  Potion  
  5655. 16  10  Awkward Potion  
  5656. 17  11  Potion of Regeneration  
  5657. 18  12  Potion of Swiftness  
  5658. 19  13  Potion of Fire Resistance  
  5659. 20  14  Potion of Poison  
  5660. 21  15  Potion of Healing  
  5661. 22  16  Bungling Potion  
  5662. 23  17  Bungling Potion  
  5663. 24  18  Potion of Weakness  
  5664. 25  19  Potion of Strength  
  5665. 26  1a  Potion of Slowness  
  5666. 27  1b  Smooth Potion  
  5667. 28  1c  Potion of Harming  
  5668. 29  1d  Suave Potion  
  5669. 30  1e  Debonair Potion  
  5670. 31  1f  Debonair Potion  
  5671. Dec  Hex  Potion  
  5672. 32  20  Thick Potion  
  5673. 33  21  Potion of Regeneration II  
  5674. 34  22  Potion of Swiftness II  
  5675. 35  23  Potion of Fire Resistance  
  5676. 36  24  Potion of Poison II  
  5677. 37  25  Potion of Healing II  
  5678. 38  26  Charming Potion  
  5679. 39  27  Charming Potion  
  5680. 40  28  Potion of Weakness  
  5681. 41  29  Potion of Strength II  
  5682. 42  2a  Potion of Slowness  
  5683. 43  2b  Refined Potion  
  5684. 44  2c  Potion of Harming II  
  5685. 45  2d  Cordial Potion  
  5686. 46  2e  Sparkling Potion  
  5687. 47  2f  Sparkling Potion  
  5688. Dec  Hex  Potion  
  5689. 48  30  Potent Potion  
  5690. 49  31  Potion of Regeneration II  
  5691. 50  32  Potion of Swiftness II  
  5692. 51  33  Potion of Fire Resistance  
  5693. 52  34  Potion of Poison II  
  5694. 53  35  Potion of Healing II  
  5695. 54  36  Rank Potion  
  5696. 55  37  Rank Potion  
  5697. 56  38  Potion of Weakness  
  5698. 57  39  Potion of Strength II  
  5699. 58  3a  Potion of Slowness  
  5700. 59  3b  Acrid Potion  
  5701. 60  3c  Potion of Harming II  
  5702. 61  3d  Gross Potion  
  5703. 62  3e  Stinky Potion  
  5704. 63  3f  Stinky Potion  
  5705.  
  5706. Note: potion with name set to 0 is called "Water Bottle" only if no other bit is set. Otherwise, it is called "Mundane Potion".
  5707.  
  5708. Note: potions with splash potion bit set have additional "Splash " prefix.
  5709.  
  5710. "Potion effect" bits Dec  Hex  Effect  Duration  Bottles  Icon  Effect color  
  5711. 0  0  -  -    -  
  5712. 1  1  Regeneration  0:45     Pink  
  5713. 2  2  Speed  3:00     Sky blue  
  5714. 3  3  Fire Resistance  3:00     Orange  
  5715. 4  4  Poison  0:45     Green  
  5716. 5  5  Instant Health  instant    -  -  
  5717. 6  6  -  -    -  -  
  5718. 7  7  -  -    -  -  
  5719. 8  8  Weakness  1:30     Grey  
  5720. 9  9  Strength  3:00     Dark red  
  5721. 10  a  Slowness  1:30     Blue-Grey  
  5722. 11  b  -  -    -  -  
  5723. 12  c  Instant Damage  instant    -  -  
  5724. 13  d  -  -    -  -  
  5725. 14  e  -  -    -  -  
  5726. 15  f  -  -    -  -  
  5727. "Tier" bit Dex  Hex  Meaning  
  5728. 0  0000  Tier I effect.  
  5729. 32  0020  Tier II effect. Multiply duration by 1/2.  
  5730.  
  5731. Note: Fire Resistance, Weakness and Slowness effects have no second tier. Their strength and duration are unaffected by this bit.
  5732.  
  5733. "Extended duration" bit Dex  Hex  Meaning  
  5734. 0  0000  Base duration.  
  5735. 64  0040  Multiply duration by 8/3.  
  5736. "Splash potion" bit Dex  Hex  Meaning  
  5737. 0  0000  Drinkable potion.  
  5738. 16384  4000  Splash potion. Multiply duration by 3/4.  
  5739. Brewing Stand The bottom three bits are bit flags for which bottle slots actually contain bottles. The actual bottle contents (and the reagent at the top) are stored in a TileEntity for this block, not in the data field.
  5740.  
  5741. 0x1: The slot pointing East
  5742. 0x2: The slot pointing Southwest
  5743. 0x4: The slot pointing Northwest
  5744. Cauldron The data value stores the amount of water kept in the cauldron, in units of glass bottles that can be filled.
  5745.  
  5746. 0: Empty
  5747. 1: 1/3 filled
  5748. 2: 2/3 filled
  5749. 3: Fully filled
  5750. End Portal Frame The bottom two bits determine which "side" of the whole portal frame this block is a part of.
  5751.  
  5752. 0x4 is a bit flag: 0 is an "empty" frame block, 1 is a block with an Eye of Ender inserted
  5753.  
  5754.  
  5755. ]])
  5756. blockids.close()
  5757. bluespider=fs.open("mem/redworks/minepedia/bluespider","w")
  5758. bluespider.write([[The Cave Spider[1] is a small bug-like monster and also is a hostile mob re-textured from the Spider with a blue skin and is more dangerous than the regular spider, but in turn they are much more rare than regular Spiders. Cave Spiders do not spawn naturally, they only come from Spawners found in Abandoned Mine Shafts. Cave Spiders are also smaller than regular spiders,[1][2] presumably so that they can fit through the mine shafts that they spawn in, including 1 x 1 x 1 holes, and can pass through passages only half a block high. Their exact size is 0.7 x 0.7 x 0.5.
  5759. Venom: The most notable feature of the cave spider is its venomous bite. When bitten by a Cave Spider on any difficulty except Easy, the player's health bar turns yellow-green and gradually decreases.[3] The venom inflicts half of a heart of damage about every second and a half (or 1.5 seconds), and lasts for 5 seconds. Armor does not affect venom; neither the conditions under which you will receive venom, nor the damage received from it. Since 1.9 Pre-Release 4 Jeb gave milk the ability to cure the player of the venom. Regardless of the difficulty, venom cannot kill you, but it can drop your health to dangerously low levels.
  5760. History: The Cave Spider was first introduced in the Beta 1.8 Pre-release.
  5761. SMP servers upgraded from older versions running in peaceful mode may begin spawning cave spiders, though no other monster appears in the world. This is because in older versions setting the Server.properties key spawn-monsters to false would place the server in peaceful mode. As of 1.8, a separate key difficulty must be set to zero to select peaceful difficulty; setting spawn-monsters to false prevents monsters from spawning randomly in dark areas but does not disable spawners. Because the difficulty key defaults to 1 (easy), servers without the key configured at all changed from running in peaceful mode (prior to 1.8) to easy mode (as of 1.8).
  5762. Trivia: Cobwebs don't affect Cave Spiders.
  5763. Cave Spiders are faster than normal spiders.
  5764. Cave Spider poison does affect Skeletons, but will not kill them because the venom only brings entities down to half a heart.
  5765. Cave Spider spawners are surrounded by Cobwebs, making them difficult to get. Since as mentioned above, Cave Spiders are not slowed by Cobwebs, players can only take extreme caution when passing these areas, unless playing on Easy.
  5766. Cave Spiders behave just like normal Spiders in daylight or light levels of 10 or higher.
  5767. Because of their small dimensions, building a mob farm from a cave spider spawner would be considerably difficult (unless the player is on the Peaceful setting) and somewhat inefficient to build.
  5768. Cave Spiders can track you through walls.
  5769. If both cave and regular spiders are attempting to get to the player through a 1x1x1 size opening, the regular spiders crowd the opening and block the path of the smaller cave spider greatly reducing its chance of getting through the opening.
  5770. Cave Spiders will leap into an area three blocks high and wait for the player to get close enough to be attacked.
  5771. They may be able to go through a 1 block gap, but they cannot go around fences. Proving the only effective way to farm cave spiders for spider eyes is through the gap in fences; which the player can hit them between.
  5772. Spiders are unaffected by Splash Potions of Poison.
  5773. Bugs: Because of the natural tendency of cave spider spawners being created with cobwebs and ceilings, but without walls such as the Moss Stone walls in dungeons, cave spiders can be spawned in the middle of a cavern or a ravine.
  5774. ]])
  5775. bluespider.close()
  5776. brewing=fs.open("mem/redworks/minepedia/brewing","w")
  5777. brewing.write([[Brewing is how potions and splash potions are made in Minecraft.
  5778. Recipes: Despite the complicated web of potions that can be brewed from other potions, to brew a specific potion from the water bottle most efficiently the options are quite simple. The following table gives the most efficient way to brew each potion without wasting extra ingredients. Cases where the order of ingredients is irrelevant or two different ingredients are interchangeable are included. The potion of weakness, the only one which can be brewed without starting with a nether wart, can still be brewed from an awkward potion if the player wishes to convert all water bottles to awkward potions in preparation for brewing.
  5779. Weakness > fermented spider eye
  5780. Weakness E > fermented spider eye and redstone (if brewed from an awkward potion the fermented spider eye must be added first)
  5781. Strength > nether wart > blaze powder
  5782. Strength E > nether wart > blaze powder > redstone
  5783. Strength II > nether wart > blaze powder > glowstone
  5784. Regeneration > nether wart > ghast tear
  5785. Regeneration E > nether wart > ghast tear > redstone
  5786. Regeneration II > nether wart > ghast tear > glowstone
  5787. Swiftness > nether wart > sugar
  5788. Swiftness E > nether wart > sugar > redstone
  5789. Swiftness II > nether wart > sugar > glowstone
  5790. Slowness > nether wart > sugar or magma cream > fermented spider eye
  5791. Slowness E > nether wart > sugar or magma cream > fermented spider eye > redstone
  5792. Health > nether wart > glistering melon
  5793. Health II > nether wart > glistering melon > glowstone
  5794. Harming > nether wart > glistering melon or spider eye > fermented spider eye
  5795. Harming II > nether wart > glistering melon or spider eye > fermented spider eye and glowstone
  5796. Poison > nether wart > spider eye
  5797. Poison E > nether wart > spider eye > redstone
  5798. Poison II > nether wart > spider eye > glowstone
  5799. Fire Resistance > nether wart > magma cream
  5800. Fire Resistance E > nether wart > magma cream > redstone
  5801. History: Initially, the Cauldron was where potions were brewed. Code in Beta 1.9 pre2 revealed that Potions were brewed by adding water to the Cauldron followed by certain reagents. Correctly combined reagents would confer purely beneficial potion effects, and incorrect combinations added negative effects. The system was complicated, lacked a GUI, and formed many duplicate potions (i.e. two potions that were exactly the same could be made in several different ways), so Notch and Jeb came up with a new brewing method using a Brewing Stand.[1] The Cauldron's role in brewing was relegated to being a slightly more efficient storage vessel for water. Brewing was greatly streamlined and simplified when a brewing GUI was added and most duplicate potions were removed (the total possible potions went down from 150 combinations to only 25 different potions in 31 combinations). However, this new system made some potion effects available in earlier 1.9 pre-releases inaccessible (e.g. Nausea, Blindness and Invisibility).
  5802. Throwable Splash Potions were introduced in Beta 1.9 Pre4 and brewed by placing gunpowder and any potion together in a brewing stand. This pre-release also introduced Glistering Melon as an alchemical reagent to replace the instant health effect conferred by the Ghast Tear, which then added the effect of regeneration instead. This version also converted certain reagents into base-secondary reagents (the Spider Eye, Glistering Melon and Blaze Powder made Mundane Potion when brewed into a water bottle in addition to their previous functions), bringing the potion total to 28 different potions in 35 combinations.
  5803. Trivia:Only 1 ingredient is needed to brew into up to 3 potions. These three potions do not necessarily have to be the same.
  5804. Upgrading effect of potion that has no time parameter (i.e. Instant Health, Harming) with glowstone dust has no downsides.
  5805. Upgrading a Fire Resistance Potion with redstone dust has no downsides.
  5806. Although Jeb said that in the 1.9 pre-release 3 there were 161 possible different potion combinations with 2,653 in the future, in the actual third pre-release only 22 different potions could be made without the use of external programs. Of those, 19 potions had one of 8 different effects.
  5807. The Mundane Potion made from redstone has a different metadata (64) than the mundane potion made from any other ingredient (8192). Unlike Mundane 64, Mundane 8192 can be made into a Splash Mundane Potion by adding gunpowder that is, like its base potion, without any effect.
  5808. There are many Potions that were left behind from 1.9 pre-releases that fill up different metadatas that otherwise cannot be brewed or obtained without a SMP server command or inventory editor. These potions include but are not limited to: Bungling Potion, Buttering Potion, Debonair Potion, Refined Potion.
  5809. Splash potions can be fired by Dispensers.
  5810. Cauldrons can be entirely circumvented from the brewing process with no ill effects, as bottles can be filled by right-clicking on a water source block. This is an improvement from cauldrons, as one does not have to replenish the source block every three bottles, or indeed at all. This, however can not be done in the Nether, where cauldrons become essential.
  5811. Some splash potions have the opposite effect on undead mobs such as zombies and skeletons.
  5812. ]])
  5813. brewing.close()
  5814. cavespider=fs.open("mem/redworks/minepedia/cavespider","w")
  5815. cavespider.write([[The Cave Spider[1] is a small bug-like monster and also is a hostile mob re-textured from the Spider with a blue skin and is more dangerous than the regular spider, but in turn they are much more rare than regular Spiders. Cave Spiders do not spawn naturally, they only come from Spawners found in Abandoned Mine Shafts. Cave Spiders are also smaller than regular spiders,[1][2] presumably so that they can fit through the mine shafts that they spawn in, including 1 x 1 x 1 holes, and can pass through passages only half a block high. Their exact size is 0.7 x 0.7 x 0.5.
  5816. Venom: The most notable feature of the cave spider is its venomous bite. When bitten by a Cave Spider on any difficulty except Easy, the player's health bar turns yellow-green and gradually decreases.[3] The venom inflicts half of a heart of damage about every second and a half (or 1.5 seconds), and lasts for 5 seconds. Armor does not affect venom; neither the conditions under which you will receive venom, nor the damage received from it. Since 1.9 Pre-Release 4 Jeb gave milk the ability to cure the player of the venom. Regardless of the difficulty, venom cannot kill you, but it can drop your health to dangerously low levels.
  5817. History: The Cave Spider was first introduced in the Beta 1.8 Pre-release.
  5818. SMP servers upgraded from older versions running in peaceful mode may begin spawning cave spiders, though no other monster appears in the world. This is because in older versions setting the Server.properties key spawn-monsters to false would place the server in peaceful mode. As of 1.8, a separate key difficulty must be set to zero to select peaceful difficulty; setting spawn-monsters to false prevents monsters from spawning randomly in dark areas but does not disable spawners. Because the difficulty key defaults to 1 (easy), servers without the key configured at all changed from running in peaceful mode (prior to 1.8) to easy mode (as of 1.8).
  5819. Trivia: Cobwebs don't affect Cave Spiders.
  5820. Cave Spiders are faster than normal spiders.
  5821. Cave Spider poison does affect Skeletons, but will not kill them because the venom only brings entities down to half a heart.
  5822. Cave Spider spawners are surrounded by Cobwebs, making them difficult to get. Since as mentioned above, Cave Spiders are not slowed by Cobwebs, players can only take extreme caution when passing these areas, unless playing on Easy.
  5823. Cave Spiders behave just like normal Spiders in daylight or light levels of 10 or higher.
  5824. Because of their small dimensions, building a mob farm from a cave spider spawner would be considerably difficult (unless the player is on the Peaceful setting) and somewhat inefficient to build.
  5825. Cave Spiders can track you through walls.
  5826. If both cave and regular spiders are attempting to get to the player through a 1x1x1 size opening, the regular spiders crowd the opening and block the path of the smaller cave spider greatly reducing its chance of getting through the opening.
  5827. Cave Spiders will leap into an area three blocks high and wait for the player to get close enough to be attacked.
  5828. They may be able to go through a 1 block gap, but they cannot go around fences. Proving the only effective way to farm cave spiders for spider eyes is through the gap in fences; which the player can hit them between.
  5829. Spiders are unaffected by Splash Potions of Poison.
  5830. Bugs: Because of the natural tendency of cave spider spawners being created with cobwebs and ceilings, but without walls such as the Moss Stone walls in dungeons, cave spiders can be spawned in the middle of a cavern or a ravine.
  5831. ]])
  5832. cavespider.close()
  5833. chicken=fs.open("mem/redworks/minepedia/chicken","w")
  5834. chicken.write([[Chicken are passive mobs that first appeared in Alpha mode. They have white feathers and wings, with a yellow beak, and a red wattle. The main purpose of chickens is to supply feathers, Raw Chicken and eggs, essential for arrows, food and cakes, respectively. Chickens are 0.875 blocks tall, 0.5 blocks wide and 0.8125 blocks long.
  5835. Behavior: Chickens appear to wander around aimlessly, but actually and subtly possess decent pathfinding ability. They will make no attempt to stay out of water, and a common sight is several chickens bouncing up and down in the water. They will follow you if have wheat in your hand.They appear to be drawn to caves, since they move more easily down ledges than up them. Chickens are also drawn to light in a dark environment and will swim upstream to get to it. Chickens will also climb simple steps, but not a ladder, to escape a pit. It is possible to push a chicken up a ladder, therefore letting them escape a pit you may have trapped them in. This can be prevented by removing the ladder on the bottom, but you will have to jump to get up the ladder. Since the Beta update they seem to be the most common mob. Chickens often spawn alone, but can spawn in groups of 2-6. Like all other passive mobs, they seemingly move randomly in a natural environment. Chickens seem to make attempts at escaping (if trapped/fenced) by constantly jumping into nearby doors or fence gates if available.Upon reloading a map a Chicken has a chance to respawn on the other side of a fence to which it started.
  5836. Chickens lay eggs which can be thrown at enemies or used as an ingredient in cakes. Chickens lay an egg on every 5-10 minutes (it took 40 minutes for 9 chickens to lay 50 eggs = 7.2 minutes/egg). Since the Beta 1.8 update, Chickens have a 1/8 chance of being spawned from a thrown egg.
  5837. When a chicken falls from a height it slowly "hovers" down to safety.
  5838. Breeding: All passive mobs, [excluding squid and villagers] can be bred using Wheat.
  5839. Chickens can still be created and bred using eggs, allowing them to be easily bred far away from where they naturally spawn. Each egg will have a 1/8th chance in hatching a chick minus a 1/256th chance to get 4 chicks in a egg instead. If you start with 11 eggs you have a 35% chance of creating a colony of at least 2 chickens.
  5840. You can quickly make a small colony in a Minecraft day by routinely picking up eggs and farming wheat. If you breed these chickens in an enclosed space, you should have a reliable source of chickens within a few days. Furthermore, since zombies no longer drop feathers (making it harder to craft arrows)making a chicken colony is a great way to get an unlimited supply of feathers and raw chicken.
  5841. It takes around 20 minutes for a baby-chicken to turn fully grown.
  5842. History: Raw Chicken was introduced in Beta 1.8 with the introduction of the hunger system. Before this, chickens only dropped feathers on death. In 1.8 Chickens seem to drop Eggs more often than usual, but this is only because animals are, since then, persistent. In 1.8, Chickens need a large area to walk around in or they will start dying on their own. This happens because the chickens push each other into the walls, suffocating for a split-second. To solve the problem, make sure they are surrounded by fences and not solid blocks.
  5843. Trivia: Chickens are the third smallest mob (the first being silverfish, the second being small slimes). They are able to fit through 1�971 gaps.
  5844. They take no fall damage, and when they fall they make a flapping animation and fall slower than normal.
  5845. When a chicken is killed, and if it has a boost from the hit or is thrown over a cliff by the hit, the "corpse" will also fall more slowly than normal, and the wings will still make a flapping animation.
  5846. When a chicken is riding a minecart, it is impossible to attack the chicken rather than the cart as it is completely inside the shape of the cart.
  5847. Cooked Chicken can easily be obtained by letting chickens fall onto a block of burning netherrack from which they can run off.
  5848. It takes one full minecraft day or 20 minutes for baby chicks to become fully mature chickens.
  5849. Chickens are the only Overworld mob (without the use of hacks/inventory editors) that can be bred in the Nether, by building a suitable area and throwing Eggs inside of it.
  5850. Chickens are sometimes mistaken for ducks due to their wide beaks and ability to swim.
  5851. Probably inspired by this, Notch tweeted that he changed the chickens to ducks a few weeks before the end of beta,[1] causing a turmoil on Twitter. A few days later Jeb, still getting feedback on the idea, tweeted that it was just a joke.[2]
  5852. If you throw eggs at Glass Panes, there is a small chance that the chicken will spawn on the other side of the panes.
  5853. Despite being a creature that does not give live birth, chicken breeding will cause the chickens to create a baby chicken instead of laying an egg.
  5854. Throwing eggs in any map after 1.0.0 will spawn baby chickens. However, in SMP, if the map was generated at any time before the full release of Minecraft, the eggs will only spawn adult chickens.
  5855. You can start "chicken tube" farms in which you contain vast numbers of chickens in a small space to get their eggs to make more chickens or to kill for food, completely bypassing the point of breeding and wheat farming.
  5856. Baby chicks cannot be lured by wheat like adult chickens.
  5857. As of 1.0.0 chickens are able to climb ladders ]])
  5858. chicken.close()
  5859. chunk=fs.open("mem/redworks/minepedia/chunk","w")
  5860. chunk.write([[Chunks are segments of the virtually infinite Minecraft maps. They are 16 blocks wide, 16 blocks long, and 128 blocks deep, which is 32,768 blocks total. Chunks are generated around players when they first enter the world. And as they wander that world, nearby chunks are generated as needed.
  5861. The exact number of generated chunks varies in single player mode, depending on view distance and movement. In multiplayer mode, a grid with a radius of 10 (for a total of 21x21 or 441 chunks) is loaded around each player and sent to the player by default, although this radius can be configured. These chunks may have activity (mobs spawning, trees growing, water flowing, dropped items disappearing etc.), while the other world chunks are inactive, stored on your hard drive. Chunks will not save again if they were saved in the last 30 seconds.
  5862. Slimes can only spawn in specific chunks, determined by a calculation performed on the chunk coordinates. There are a number of utilities and mods which allow the player to tell which chunks they can spawn in; see the Slime article for details.
  5863. Creation of Chunks: Chunks are created with the help of the Map Seed, which means that the chunks are always the same if you would use the same Seed again (on the same Minecraft version at least).
  5864. Finding Chunk Edges: Pressing the "F3" button opens the Debug screen which shows the player's X, Y, and Z coordinates. These coordinates will change as the player moves around. X and Z coordinates that are divisible by 16 represent the boundaries between chunks. EG: (96, -32) is a corner where four chunks meet. One of those chunks is between X coordinates 80 to 96 and Z coordinates -48 to -32. Another one is between X coordinates 96 to 112 and Z coordinates -32 to -16, and so on. When either X or Z crosses a multiple of 16, the player is moving across chunks.
  5865. One can make a timer with repeaters and hook up a sticky piston to it. Put glowstone in front of the piston. The light will flicker while the piston moves and if you are up on a high pole, one can see that the light updates on the chunks at slightly different times. This can also be achieved with 2 regular pistons.
  5866. Chunk borders are visible when viewing frozen rivers and ponds from above. (Tested in Creative 1.0.0)
  5867. Chunk Error: A chunk error (also known as a missing chunk or world hole) is a rare error found in multiplayer mode. They are only client side, meaning that other users cannot see the chunk error unless under some very rare circumstances. Reconnecting to the server or reloading the map usually fixes chunk errors. Players can jump or fall into an errored chunk, since some players have reported falling and some have reported warping similar to arrows. Due to the way fluids are displayed, any fluids on the border of the chunk error will look as if they are flowing downwards. On non-modded servers the teleport command can be used to escape such a glitch. Items dropped on an errored chunk will fall and cannot be retrieved, however. Also, non-solid blocks can't flow into one. Blocks that are in a chunk error can reappear if you place a block in a chunk error (it gets overwritten, so the block you place gets turned into what was there) or blow it up with TNT.
  5868. [edit] Chunk error Work-arounds Because chunk errors are usually temporary bugs where the Minecraft client was unable to load a chunk, logging out and logging back in is often all that is required to fix one. However, there are also other things a player can do to work around chunk errors.
  5869. Players are able to walk into a chunk error, but will only glitch out.[1] They are able to ride through them in a boat or minecart - provided there are pre-existing rails. While the track will remain invisible to you, your cart will follow it. If your destination happens to be in a errored chunk, simply re-connect to the server or reload the map upon arrival to avoid falling into the errored chunk and losing your minecart.[2]
  5870. Lighting, explosions, and other processes that update blocks within a chunk can cause chunks to re-load, making them visible. Because of this, placing torches can be used to make localized parts of chunk errors visible.
  5871. Another type of chunk error is when a player is on a SMP server and sees a chunk that is empty. If the player walks on it, the chunk will act as if it was visible. Resending the chunks by moving away(or other means) will usually fix this. Waiting may also fix this.
  5872. Usage of chunk errors Often, a chunk error will allow you to see a cross-section of the world, making it easy to locate ores, caves, dungeons, and other hidden structures underground. This can be exploited by marking the surface above any interesting looking veins, caverns, dungeons or other structures before re-loading the map.
  5873. If you have a buddy on a multiplayer server with a chunk error, they are useful for guiding you from along the sides of a chunk error as they can see where you are digging. This means that your friends can point you to resources they cannot reach because of the chunk error.
  5874.  
  5875. ]])
  5876. chunk.close()
  5877. chunks=fs.open("mem/redworks/minepedia/chunks","w")
  5878. chunks.write([[Chunks are segments of the virtually infinite Minecraft maps. They are 16 blocks wide, 16 blocks long, and 128 blocks deep, which is 32,768 blocks total. Chunks are generated around players when they first enter the world. And as they wander that world, nearby chunks are generated as needed.
  5879. The exact number of generated chunks varies in single player mode, depending on view distance and movement. In multiplayer mode, a grid with a radius of 10 (for a total of 21x21 or 441 chunks) is loaded around each player and sent to the player by default, although this radius can be configured. These chunks may have activity (mobs spawning, trees growing, water flowing, dropped items disappearing etc.), while the other world chunks are inactive, stored on your hard drive. Chunks will not save again if they were saved in the last 30 seconds.
  5880. Slimes can only spawn in specific chunks, determined by a calculation performed on the chunk coordinates. There are a number of utilities and mods which allow the player to tell which chunks they can spawn in; see the Slime article for details.
  5881. Creation of Chunks: Chunks are created with the help of the Map Seed, which means that the chunks are always the same if you would use the same Seed again (on the same Minecraft version at least).
  5882. Finding Chunk Edges: Pressing the "F3" button opens the Debug screen which shows the player's X, Y, and Z coordinates. These coordinates will change as the player moves around. X and Z coordinates that are divisible by 16 represent the boundaries between chunks. EG: (96, -32) is a corner where four chunks meet. One of those chunks is between X coordinates 80 to 96 and Z coordinates -48 to -32. Another one is between X coordinates 96 to 112 and Z coordinates -32 to -16, and so on. When either X or Z crosses a multiple of 16, the player is moving across chunks.
  5883. One can make a timer with repeaters and hook up a sticky piston to it. Put glowstone in front of the piston. The light will flicker while the piston moves and if you are up on a high pole, one can see that the light updates on the chunks at slightly different times. This can also be achieved with 2 regular pistons.
  5884. Chunk borders are visible when viewing frozen rivers and ponds from above. (Tested in Creative 1.0.0)
  5885. Chunk Error: A chunk error (also known as a missing chunk or world hole) is a rare error found in multiplayer mode. They are only client side, meaning that other users cannot see the chunk error unless under some very rare circumstances. Reconnecting to the server or reloading the map usually fixes chunk errors. Players can jump or fall into an errored chunk, since some players have reported falling and some have reported warping similar to arrows. Due to the way fluids are displayed, any fluids on the border of the chunk error will look as if they are flowing downwards. On non-modded servers the teleport command can be used to escape such a glitch. Items dropped on an errored chunk will fall and cannot be retrieved, however. Also, non-solid blocks can't flow into one. Blocks that are in a chunk error can reappear if you place a block in a chunk error (it gets overwritten, so the block you place gets turned into what was there) or blow it up with TNT.
  5886. [edit] Chunk error Work-arounds Because chunk errors are usually temporary bugs where the Minecraft client was unable to load a chunk, logging out and logging back in is often all that is required to fix one. However, there are also other things a player can do to work around chunk errors.
  5887. Players are able to walk into a chunk error, but will only glitch out.[1] They are able to ride through them in a boat or minecart - provided there are pre-existing rails. While the track will remain invisible to you, your cart will follow it. If your destination happens to be in a errored chunk, simply re-connect to the server or reload the map upon arrival to avoid falling into the errored chunk and losing your minecart.[2]
  5888. Lighting, explosions, and other processes that update blocks within a chunk can cause chunks to re-load, making them visible. Because of this, placing torches can be used to make localized parts of chunk errors visible.
  5889. Another type of chunk error is when a player is on a SMP server and sees a chunk that is empty. If the player walks on it, the chunk will act as if it was visible. Resending the chunks by moving away(or other means) will usually fix this. Waiting may also fix this.
  5890. Usage of chunk errors Often, a chunk error will allow you to see a cross-section of the world, making it easy to locate ores, caves, dungeons, and other hidden structures underground. This can be exploited by marking the surface above any interesting looking veins, caverns, dungeons or other structures before re-loading the map.
  5891. If you have a buddy on a multiplayer server with a chunk error, they are useful for guiding you from along the sides of a chunk error as they can see where you are digging. This means that your friends can point you to resources they cannot reach because of the chunk error.
  5892.  
  5893. ]])
  5894. chunks.close()
  5895. cow=fs.open("mem/redworks/minepedia/cow","w")
  5896. cow.write([[Cows is a farm animal-like mob and also are passive mobs that are the sole source of leather, raw beef, steak, and milk. They stand 1.6875 blocks tall and are 0.625 blocks wide and 1.5 blocks long
  5897. Uses: When killed, a cow drops 0-2 (97% Droprate) pieces of leather, as well as 1 - 3 (205% Droprate) raw beef. If the cow dies by fire, steak is dropped instead of beef. Leather is used to craft the first tier of armor. Cows are usually necessary to make cake, as mooshrooms are the only other source of milk, and are much rarer. A cow can be milked by right clicking the cow with an empty bucket. Due to the fact that cows can be bred an unlimited number of times using renewable wheat, all of the cow's products are renewable.
  5898. Behavior: Cows roam the Overworld in herds of 4 - 8 and can be observed jumping up slight inclines and falling to their deaths from tall cliffs and overhangs. Cows make no attempt to stay out of water, and will bob up and down to stay afloat. They will flee when attacked. They tend to walk around, lowing (mooing). Cows are the biggest of the 5 animals(not counting mooshrooms because it is a variation of a cow or Villagers who aren't an animal).
  5899. Breeding: All passive mobs (Excluding squid and villagers) can be bred using Wheat.
  5900. Breeding will create a baby cow (calf) and the parent cows have a delay of an unknown amount of time until they can breed again. Parent cows will follow the calf until it is full grown. There exists a bug with calves: if more than one calf is in an area, the parents can switch and/or just get confused and start to follow a calf that isn't theirs.
  5901. Creating a colony of cows and breeding them is a way to ensure that the player can get an unlimited supply of Steaks, Milk and Leather when needed.
  5902. History: Cows were introduced in Alpha 1.0.8, dropping leather when killed and producing milk when the player used a bucket on a cow. This milk had no use until Beta 1.2, when Notch introduced the crafting recipe for cake that required 3 buckets of it.
  5903. As of Beta 1.8, cows flee when attacked.
  5904. As of Beta 1.9 Pre-release 3 Cow's milk also cures poison and all other potion effects.
  5905. Trivia: Cows in the PC Gamer demo of Minecraft are branded with a 'PCG' logo on their side.
  5906. In SMP, clicking anywhere on the cow with a bucket will fill it with Milk, but only at the maximum distance at which you can use the bucket.
  5907. As of Beta 1.3_01, the pink of the cow's ear may also be milked.[citation needed]
  5908. Because of the lack of hierarchy in every box model, the horns of the cow are sometimes misplaced. Jeb is planning to fix this.
  5909. In 1.8 cows seem to be less common than other passive mobs. This may be due to the fact that since 1.8 cows give an abundance of resources including beef, leather and milk whereas other passive mobs give less.
  5910. Because all cows in Minecraft have udders and are therefore female, all baby cows will have two mothers.
  5911. It takes one full minecraft day or 20 minutes for baby calves to become fully mature cows.
  5912. Calves will still give milk.
  5913. Cows can be an efficient mob since they drop Leather that can be made into armor and Raw Beef that can be eaten
  5914. ]])
  5915. cow.close()
  5916. craftOS=fs.open("mem/redworks/minepedia/craftOS","w")
  5917. craftOS.write([[
  5918. CraftOS is the default Operating System in ComputerCraft, created by dan200.
  5919. The built in programs is enough to get you started.
  5920. ]])
  5921. craftOS.close()
  5922. creeper=fs.open("mem/redworks/minepedia/creeper","w")
  5923. creeper.write([[The Creeper is an infamous, green-camouflaged, near-silent exploding mob that will chase players and hiss for 1.5 seconds before blowing up. Unlike Zombies and Skeletons, Creepers will not catch fire in direct sunlight meaning they can wander around unharmed day and night, and are still aggressive. Underground or on the surface, creepers will spawn at night and in dimly lit locations with a light level of 7 or less.
  5924. Notch has described creepers as "being crunchy, like dry leaves".
  5925. Publicity: Creepers have a formidable reputation among players because of their potential to damage players and destroy player-made structures, which has made them a widely-recognizable Minecraft icon. They are referenced in several of the items available at the Minecraft merchandise depot,[2] and have become an internet meme complete with fan art, web comic references, and demotivational posters. A central part of the meme is the creeper's unofficial catchphrase derived from the mob's tendency to sneak up on the player and hiss before detonating:
  5926. "That'sssss a very nice ___________ (everything, house, etc.) you've got there... It'd be a (ssss)shame if anything were to happen to it..."[3]
  5927. TV Series
  5928. Several creepers have appeared on tv during episodes of the Mad TV Show ("Criminal Minecraft"[4] and "ThunderLolcats" [5]).
  5929. Youtube Videos
  5930. A parody [6] of "The Creep" features a trio of creepers instead of the eponymous creeps.
  5931. Flash Games
  5932. In Stealing the Diamond, when Henry sneaks up to the museum's outer wall with a pickaxe, a creeper comes up behind him and explodes, destroying part of the wall instead.
  5933. At the far end of the map in Stick RPG2, a smiling creeper can be seen in a hole at ground level.
  5934. Other Games
  5935. In a game called Quube made by Universal Chicken in Adelaide, Australia, one of the levels has a Creeper face.
  5936. PixelJunk Shooter 2 for the PS3 shows a small creeper in the title screen hidden among other enemies native to Shooter 2.
  5937. Uses: Creepers are the easiest obtainable source of gunpowder when killed (the more challenging alternatives being defeating ghasts and conquering dungeons), and are therefore critical to the production of TNT. Each creeper can drop 0 - 2 units of gunpowder upon death. Music DiscsCreepers are the only mob that drops Music Discs, and can only do so if killed by a skeleton. How the creeper is damaged beforehand doesn't matter as long as the final blow which kills it is made by a skeleton's arrow. The easiest way to arrange this is to shoot it once with a fully charged arrow, then with two just under fully charged arrows. After this, put the creeper between you and a skeleton to be shot at. This will kill the Creeper in one shot. However, if a creeper is hit by a skeleton and not killed, it will run towards it and explode, which won't yield a music disc. A music disc must be put into a jukebox to be used. Charged creepers can also drop music discs.
  5938. Behavior: When within one block of a player, a creeper will hiss loudly, increase in size and turn more white, and detonate after 1.5 seconds. A creeper will still start its countdown sizzle when the player moves close enough (flying or not) even if the creeper is not focused on the player. Killing a creeper before the countdown starts or finishes will not cause the creeper to detonate. Creepers make audible footsteps while walking on dirt or grass, but are otherwise silent unless they fall or are damaged. Creepers can also create noise in Water which can help a player locate one. If they see a player walking past them, they will turn to face them and start walking towards them in pursuit. If a creeper is following you and you block its path with a door, it will attempt to run through the door. The creeper will look like it is pressing its face to the window in your door, and opening the door will prove to be foolish, as the creeper will get inside your house.
  5939. A creeper's detonation can be avoided if the player moves out of the blast radius (about 3 - 4 blocks). The hissing will stop as the creeper gradually reset its timer at the same rate that it counted down - if it has been counting down for 1 second, it will take 1 second to "cool down".
  5940. A creeper can still go off even if the player stands behind a one-block thick wall although the creeper must be able to see the player to actually detonate. This can often happen when homes are surrounded by fences or short walls that creepers can oversee when jumping. Creepers cannot see a player through glass, so if the creeper is behind a glass barrier one block thick, the player is safe. This should not be confused with the creeper's pursuit mode - like other aggressive mobs, once a creeper acquires a target, it can track it through solid blocks even if the player subsequently enters a completely enclosed building. Because creepers also do not burn in sunlight, it may be waiting for the player just around the door if he/she later emerges thinking it is safe.
  5941. If the player manages to block a creeper behind a soul sand one-way entrance, they can approach up to two blocks without triggering the countdown, but if they suddenly go into a sneaking position, the creeper will hiss and initialize the countdown. This demonstrates that creepers count down farther away if the player is at a lower elevation, and will only count down if much closer to a player are at a higher elevation - probably because players can outrun explosions at a higher altitude and are more shielded from the blast there.
  5942. A creeper's explosion is 25% less powerful than that of TNT, with an explosive power of 3. Charged creeper explosions are 50% more powerful than TNT and twice that of a normal creeper's.
  5943. As with TNT and Ghast fireballs, all dropped items in the explosion radius will be destroyed. A certain percentage of blocks destroyed by the creeper will survive the blast and can be picked up. In terms of environmental damage, the harder the material caught in an explosion, the less damaging the explosion will be to anything behind the material.
  5944. A charged creeper is a type of creeper created when lightning strikes within 3 - 4 blocks of a normal creeper (a rare occurrence). Charged creepers do not otherwise spawn naturally and can be distinguished from normal creepers by the blue aura surrounding them (this blue aura is the power.png in the armor folder in your minecraft folder). Many players refer to charged creepers as "Lightning creepers", due to the fact that they are created by lightning.
  5945. Charged creepers take damage from the initial lightning strike, so it takes fewer attacks to kill them than an ordinary creeper. Their countdown timers act the same as uncharged creepers, both range-wise and time-wise. An explosion caused by a charged creeper is much more powerful, however, than an explosion caused by a regular creeper (as shown in the image above). This blast is both more powerful and of greater radius.
  5946. Charged creepers have different entity IDs from normal creepers. However, testing has never been done to find this ID.
  5947. Charged creepers are more dangerous than the normal creeper.
  5948. Combat: The safest way to engage a creeper is from a distance by shooting two fully charged arrows at it with a bow so it cannot explode near the player. Or you can risk trying to kill it with a sword. If you insist on using melee attacks, you should not stop hitting the air with your sword when waiting for the creeper to approach and have ready a finger on the "s" button to get back if the creeper tries to flank you or initializes the countdown.
  5949. Swimming creepers can be easily dealt with using melee attacks while the player is underwater. Players can also take advantage of the creeper's countdown system by hitting it, retreating a few blocks away, and repeating this until it dies. Alternatively, the player can find sufficiently high ground to strike a creeper from above with a melee weapon without the detonation sequence being activated. However, the player should keep in mind that creepers move forwards and to the right (your left) when in pursuit.
  5950. A creeper can be hit and knocked out of reach with the sprint hit ability. This allows a player to slowly work down a creepers health while remaining out of the explosion radius. Jumping and hitting a creeper while falling during a sprint will kill the creeper quickly while still keeping it out of reach.
  5951. A diamond sword can quickly dispatch a creeper with three successive hits, one right after the other. This is not a recommended tactic around multiple creepers, though it can be a lifesaver when exploring underground should a creeper suddenly fall down behind the player in dim, tight areas.
  5952. If a creeper is below the player, the player can suffocate a creeper (and many other mobs) by placing a block of sand or gravel above the creeper as long as the block they are placing is on a wall or a block in front of the player and above the target mob. It will usually take one to two blocks to cover the creeper and when it is covered, the creeper will slowly suffocate to death. This is a slow way of eliminating a creeper but it will keep the player out of harm's way and preserve the durability of their weapon.
  5953. If caught in a difficult place without a weapon, the player can run away if he or she is outdoors or tunnel down towards bedrock and wait for the creeper to de-spawn before surfacing. A failsafe is to set the difficulty to peaceful, removing all hostile mobs, although this is considered cheating by many players.
  5954. Another method to kill a creeper is by doing a critical attack (implemented in the 1.8 update) by jumping in the air and, while falling, quickly hit the creeper. Then attack the creeper again normally. This is effective for taking out a creeper quickly without it exploding. Best to be done with a stone sword or better.
  5955. A sword enchanted with Knockback is efficient at fighting creepers as you can repeatedly strike them without them getting close enough to you for a length of time sufficient for them to explode.
  5956. Also a good way to fight it is to attack once, then run away and have it chase you. When it comes towards to you again then rush towards it and back away right as you attack it.
  5957. Defensive Measures: Due to creepers' natural stealth and potential hazards to the player and his/her structures, the player must remain vigilant at all times, especially in caverns and heavily wooded areas. Players are advised to keep a sword in their inventory to switch to at a moment's notice. To keep creeper populations down on the surface, a player in SSP can sleep in a sheltered bed at dusk since creepers spawn regularly if given the chance to do so at night. Players on an SMP server with other players must coordinate to sleep, as all players must be in a bed after dusk to cycle the map to dawn.
  5958. Creepers' straightforward path finding tendencies can be used against them.
  5959. Placing flowing water, when above the creeper, can push them away and/or prevent their movement toward the player.
  5960. Placing lava between the player and the creeper is an easy way to eliminate them, but there is a very high chance that anything dropped will be burnt up immediately.
  5961. The player can dig three-block-deep pits, lead the creeper towards them, and then hit it from above. While two blocks may seem sufficient to trap a creeper, there is a chance the creeper will be "boosted" up out of the pit when struck.
  5962. This strategy has a couple of major drawbacks - it can be difficult to use on multiple creepers, and it is possible for the player to fall into his or her own pit while running backwards (the player is advised to block off the hole and tunnel downward if this happens).
  5963. If a player has planned for a creeper attack, they can build a pit deep enough to cause fall damage and even kill the creeper. A layer of blocks above the pit and destroying blocks below the creeper will cause the creeper to fall. A tunnel can be built to the bottom and to finish off/collect the items from the creeper.
  5964. Walking behind a three block high cactus will cause the creeper to impale itself to death, but this will also destroy anything it drops.
  5965. Construction Safeguards: Glass walls around entrances can preempt the creepers' habit of hiding in ambush around corners (but this is offset by the disadvantage that glass is not very durable in an explosion).
  5966. Ladders should be placed carefully, as creepers are capable of climbing ladders, despite lacking arms.
  5967. To minimize creeper damage to shelters and structures, the surrounding, interior, and roof areas should be well-lit.
  5968. Buildings should be constructed out of sturdier materials like cobblestone, stone, end stone (having better resistance than stone but not totally explosion-proof), stone brick, or brick (with obsidian having the best blast resistance).
  5969. Players should bear in mind that while an explosion will only destroy cobblestone construction to a depth of one block, it will destroy several blocks of dirt, sand, Netherrack, and gravel and may therefore expose a vulnerability to a building's unreinforced basement should it explode against a wall made of such material.
  5970. Alternatively, the buildings can be built raised over the ground outside the reach of a creeper's blast radius or on a platform on the surface of a deep ocean or lake, where the surrounding water will absorb most of the explosive force from swimming creepers. ** Note that Water and lava will completely cushion explosive damage to any blocks, but not to entities (players, any floating items).
  5971. Placing a small glass wall 2 or 3 blocks high around the area wanted to be protected can be a very effective method. Just don't get within the area where your wall is and keep the area being enclosed well lit.
  5972. Although obsidian is harder to obtain, it is a great anti-creeper building material.
  5973. The most basic example is a 3x1x3 (length x width x height, so a total of 7 blocks required) frame around a main front entrance. With such a frame, the wooden doors may be blown off, but damage to the surrounding area should be relatively minimal.
  5974. Having a 4x3x3 obsidian bed/panic room can be useful as a place to run to when being chased by multiple creepers.
  5975. Stone slabs provide excellent defense against creeper explosions as well, and are considerably easier to obtain than obsidian. While a creeper will typically blow out the stone slab itself, the slab will prevent the explosion from damaging the underlying blocks, even if said underlying blocks are dirt or weaker material.
  5976. Fencing provides a great way to protect holdings, provided that the player finds fencing aesthetically compatible with a given property.
  5977. Surround a property with a simple cobblestone curtain with some mechanism for opening/closing the entry point.
  5978. Care must be taken when exiting such a fortification, as creepers that are nearby or have targeted the player and are silently tracking them through the wall will set upon the player immediately. Any damage to this curtain is generally easier to repair than a more intricate building or other construction inside it.
  5979. Wooden doors connected to a pressure plate on the inside, are a superb way to control access to a perimeter. The wooden door allows players to easily open and enter, and the pressure plate guarantees that the door is closed upon exiting.
  5980. An iron door can be used in the same manner, but must incorporate a button on the outside. This can make it difficult for new players or players with less than optimum systems/data connections to navigate easily.
  5981. Pressure plates should not be placed outside, as creepers can trigger them and enter the structure.
  5982. Trapdoors will prevent creepers from climbing upwards, and are highly recommended in any situation where they have a chance to make an appearance.
  5983. Soul Sand can be used to make a one-way door. By placing soul sand one block outside of an opening, the sinking effect prevents entry into a 1x2 doorway/opening. Players can circumvent this with a diagonal jump over the Soul Sand and into the doorway itself.
  5984. Drawbridges made with sticky pistons can be employed to deny access to creepers. When used in conjunction with a wall or moat (see below), a drawbridge activated by a switch (not a pressure plate) will temporarily create passage for players as needed.
  5985. Planting some Cactus outside your house as a barricade is a good way to keep creepers out, the damage is minimal if you accidentally touch it unlike lava, and it is unlikely that creeper loot gets destroyed by the cacti, which makes it a good mob farmer as well.
  5986. Building a treehouse is a great way to escape creepers, you just need to use the tree on tree planting trick and lots of complex and thin paths, you can then bump the creeper off the house merely using your fists, this then kills it making it useful for getting it's loot. However the only snag is that you have to kill the creeper before it starts to detonate, or else it will deal significant damage to your treehouse.
  5987. Stopping a ladder two blocks before your destination stops the creeper in it's path since it cant jump up that high
  5988. If a more 'wooden' look is preferred by the player, said player can make a 'blast-proof' wooden house. Said house to make is time-consuming and shouldn't be attempted or even started if dusk is on the way. Players should start by making an inner frame of the desired wood, shape, and size. Just 1 block thick. Then line that frame with a 1-2 block thick layer of obsidian. The obsidian acts as the 'blast-proof' part of a blast proof house. Then make your outer layer of the desired wood and put your various bits and bobs in it and BAM! Blast proof house.
  5989. Specialized Methods: Cactus Field = Cactus can be grown in a checkerboard or diagonal formation to provide an effective deterrent for most mobs, including creepers. A creeper walking into cactus will take damage and eventually die. When using this strategy, it is best for the player to move in such as way as to keep cactus between themselves and the mob in question as they can weave through before taking lethal damage if their trajectory to the player is aligned properly.
  5990. Deadfall Field: Basically, this is an inverse of the cactus checkerboard mentioned above. Creating a checkerboard pattern of holes 1 block by 3+ blocks deep will prevent single-block mobs from approaching player buildings. It will capture the mob and hold them in each hole. Undead mobs will burn when the sun is overhead, and creepers will despawn at noon. It is best to create deadfall fields at least 10 meters wide, and long enough to screen the entire property. Potential issues include capturing livestock and other players. Piston-based drawbridges or button activated doors can allow safe passage for players. An effective compromise is to create "S" shaped paths through the fields. As mobs walk directly toward their active target, they will still fall into a hole while players can navigate the path safely.
  5991. Deadfall Variants (all potentially lethal to players, so use caution)
  5992. Drowner/Burner
  5993. By placing water or lava in deadfall field pits, a player can protect their buildings while also disposing of the creeper entirely. Lava can be placed at the surface (1 block deep) or at the bottom of the 3+ deep pit. While highly dangerous to any player or mob, this will quickly eliminate any creeper threat. Any items dropped will of course be consumed by the lava.
  5994. Cactus Deadfall Combination
  5995. By widening the bottom of each deadfall hole and placing a sand block directly under the pit itself, cactus can be planted to damage anything falling into the hole. To accomplish this, the cactus must have clearance. The builder must ensure that there is only one block of space between the lowest pit opening and the cactus itself. This configuration requires more time, but can allow the player to access the lower area to collect loot (and cactus as they will break off when they attempt to grow upward).
  5996. True Deadfall
  5997. Though time consuming, a player can dig each pit deep enough to ensure creeper death on impact.
  5998. Piston Trap
  5999. By putting a (stone) pressure plate at the bottom of the hole, and linking it up to a piston 1 block above the pressure plate and 1 to the side, it is possible to kill creepers while keeping their items easily. However, the complicated wiring needed to keep the piston down long enough to suffocate the creeper consumes redstone.
  6000. Netherrack Burner
  6001. A deadfall can also end in netherrack that is infinitely burning. This makes an effective alternative to lava-filled pitfalls. Since a player may have plenty of netherrack on them at any given time, but lava takes up a full bucket for each distribution, players may find this variant to be more convenient to make.
  6002. Moats: As an alternative to a deadfall field, a player can simply dig a moat encompassing their property, spanning it with bridges equipped with secured entries (Doors, pistons, etc.). Moats can be dry, or filled with water/lava or lined with burning netherrack.
  6003. A 3 block deep dry moat will trap creepers, and a ladder with trap door can provide hapless players with a method to escape while preventing creepers from also doing so. Note: one caveat to simple dry moats, is the potential for a player to fall into a moat already containing creepers, resulting in explosion damage to the surrounding area.
  6004. Filling the moat with water can be more aesthetically pleasing, but the builder must ensure that the waterline is deeper than the lip of the moat to ensure creepers cannot escape once trapped. Water, as previously noted, has the side effect of mitigating block (but not entity) damage as well.
  6005. Filling a moat with lava has the same benefits and drawbacks as lava filled deadfalls, mentioned above.
  6006. Variants
  6007. Piston Crusher
  6008. With moats one or two meters wide, sticky pistons can be used to automatically or selectively crush mobs that fall into a trap. Depending upon the size of a given moat, this can be extremely resource and time intensive. One option is to combine this with water to channel creepers into the crusher itself. Another drawback is that in the event that a player somehow sets off a creeper inside or near the moat, the damage can be difficult to repair.
  6009. Arrow Dispenser
  6010. A dry moat lined with pressure plates wired to arrow filled dispensers is an expensive but effective and interesting method of dealing with creepers. One must ensure that the dispensers are periodically refilled. This method can also be configured for manual activation, an option that is less dangerous to players and easier to recover spent arrows and loot.
  6011. MCedit
  6012. There is one more way that is not expensive but requires the download of MCedit, now for this process you must place a sand block covering a four block pit(with mcedit). The sand will not fall as no physics are applied but once a mob interacts with it, such as step on it, it will regain its normal physics. Therefore trapping the mob without harming yourself.
  6013. History: Creepers were first introduced in Survival Test version 0.24 on August 24, 2009. They were based on a failed pig model Notch had created.
  6014. In Survival Test, the creeper's default look was a darker shade of green and flashed to a lighter green upon being hit. Before creepers spotted the player their heads would droop down. Creepers behaved much like zombies except their attacks dealt only two hearts worth of damage rather than the zombies' three (or the more recent range of 8+). After taking damage, it would flash as an indicator of impending detonation. When killed, this creeper caused a 4x4x4 spherical explosion that left a sizable crater, destroyed plenty of blocks (with the exception of stone) and hurt any players nearby. The creeper was worth 250 points when killed, but this was later decreased to 200 points.
  6015. As of Beta 1.4, the 'A' in the Minecraft logo included a Creeper's face.
  6016. Before Beta 1.6, creepers (and other mobs) could be attacked through the windows of both iron and wooden doors as long as the doors were placed from the outside of the shelter.
  6017. When the ability to sprint and hit mobs was introduced in Beta 1.8, creepers could be quickly knocked out of detonation range by an unarmed player.
  6018. Trivia: Like all explosions, if a creeper detonates whilst surrounded/in water, its explosion has no effect on blocks, but will still cause damage to entities.
  6019. Creepers are the only mob that a tamed wolf won't attack.
  6020. It is possible to detonate a creeper without taking damage.
  6021. Strangely, even with their explosive properties and the fact that they drop gunpowder when killed, Creepers will not detonate when exposed to lava or fire.
  6022. The Minecraft profile picture on Facebook looks like a creeper face, but smoother. It used to almost exactly be a creeper face.
  6023. Creepers were given a new taking damage sound after the Halloween Update.
  6024. Creepers are the only mob that randomly move in packs of 2-5
  6025. As a creeper approaches a player, it tends to circle to their right (player's left). This behavior, which is also seen in skeletons, makes them slightly more challenging to kill than many other mobs, particularly if the player is using a sword or other melee distance tool rather than a bow.
  6026. A creeper's fuse countdown lasts a little longer if it encounters a cobweb, buying a little time for a player to flee if they are low on health.
  6027. In SMP, if a creeper is attacked by another player, and the other player runs out of sight, it will not attack any other players.
  6028. Creepers have a separate "armor". When they are normal creepers, they are in their un-armored state. When hit by lightning, the charged field of electricity i their armor. This "armor" does not protect them and has infinite durability.
  6029. In the Minecraft files, this "armor" is found in the Armor files and is labeled as "power.png"
  6030. Despite having no arms, creepers can climb up ladders like any other mob.
  6031. There is a possibility that a creeper's countdown timer will not decrement, thus creating a "peaceful" creeper. However, in most cases, attacking the creeper will cause its countdown timer to revert and blow up the creeper and possibly damage you.
  6032. Creepers are one of the mobs in 1.9 Pre-release 5's Creative mode that will not attack the player unless provoked.
  6033. As of Beta 1.8 Pre-release, Creepers are much more deadly and will definitely kill the player if in a radius of 4 to 5 blocks around the Creeper. This damage is also difficulty-independent.
  6034. Creepers can actually be helpful by expanding caves, killing any other enemies in the area, or revealing hidden tunnels/dungeons.
  6035. As of November 12, 2011 creeper explosions have a new sound.
  6036. In Minecraft 1.0, creepers sometimes only do one heart of damage, but still damage blocks. It is probably a bug.
  6037. There have been several arguments over whether the Creeper or the Enderman is the better, or more iconic mob. The Creeper, however, has won the majority of polls due to its popularity.
  6038. Creepers do drop gunpowder when blown up by TNT.
  6039. Creepers are called Creepus Explodus on one of the T-shirts.
  6040. In the goodie-bags given out at Minecon 2011, creepers were given as a foldable and tapable decoration for ones room or collection, along with diamond and grass.
  6041. Creepers won't see you through glass even though you can see them. A cheap way to see the sky and keep creepers from destroying your house when you have no bed is to make a window on each wall (so you can also check if you can get out of it safely).
  6042. On certain occasions, if a Creeper is on a high ledge (i.e. stuck on a high spot in a ravine) and you are more than 1 block above them and more than 2 blocks away, if you throw an item down the cliff edge that the Creeper is standing on, they will follow it and fall off (note that this will only work if the Creeper is not paying attention to the player). Although possible, this is an extremely rare occurrence, as the creeper would almost always be provoked if the player was in the position required to perform the maneuver.
  6043. The creepers path finding allows for it to notice lava, and it will not attempt to chase the player if they are on the other side of the lava. This happens regardless of how close the player is(as long as they are not withtin detonation range).
  6044. ]])
  6045. creeper.close()
  6046. datavalues=fs.open("mem/redworks/minepedia/datavalues","w")
  6047. datavalues.write([[These data values refer to the different types of blocks and items. They are used in many, many places in Minecraft. Block IDs are used to define blocks placed in the world and inventory items (including items in chests and items dropped in the world). Item IDs are only valid for items. Each inventory slot has a unique slot number. In a Beta world, Block data further defines blocks placed, describing for example the height of water or the direction a torch points.
  6048. Icon  Dec  Hex  Block type  
  6049. 00  00  Air  
  6050.  01  01  Stone  
  6051.  02  02  Grass  
  6052.  03  03  Dirt  
  6053.  04  04  Cobblestone  
  6054.  05  05  Wooden Planks  
  6055.  06  06  Saplings D B  
  6056.  07  07  Bedrock  
  6057.  08  08  Water D  
  6058.  09  09  Stationary water D  
  6059.  10  0A  Lava D  
  6060.  11  0B  Stationary lava D  
  6061.  12  0C  Sand  
  6062.  13  0D  Gravel  
  6063.  14  0E  Gold Ore  
  6064.  15  0F  Iron Ore  
  6065.  16  10  Coal Ore  
  6066.  17  11  Wood D B  
  6067.  18  12  Leaves D B  
  6068.  19  13  Sponge  
  6069.  20  14  Glass  
  6070.  21  15  Lapis Lazuli Ore  
  6071.  22  16  Lapis Lazuli Block  
  6072.  23  17  Dispenser D T  
  6073.  24  18  Sandstone  
  6074.  25  19  Note Block T  
  6075.  26  1A  Bed D I  
  6076.  27  1B  Powered Rail D  
  6077.  28  1C  Detector Rail D  
  6078.  29  1D  Sticky Piston D  
  6079.  30  1E  Cobweb  
  6080.  31  1F  Tall Grass D  
  6081. Icon  Dec  Hex  Block type  
  6082.  32  20  Dead Bush  
  6083.  33  21  Piston D  
  6084.  34  22  Piston Extension D  
  6085.  35  23  Wool D B  
  6086.  36  24  Block moved by Piston T  
  6087.  37  25  Dandelion  
  6088.  38  26  Rose  
  6089.  39  27  Brown Mushroom  
  6090.  40  28  Red Mushroom  
  6091.  41  29  Block of Gold  
  6092.  42  2A  Block of Iron  
  6093.  43  2B  Double Slabs D B  
  6094.  44  2C  Slabs D B  
  6095.  45  2D  Bricks  
  6096.  46  2E  TNT  
  6097.  47  2F  Bookshelf  
  6098.  48  30  Moss Stone  
  6099.  49  31  Obsidian  
  6100.  50  32  Torch D  
  6101.  51  33  Fire D  
  6102.  52  34  Monster Spawner T  
  6103.  53  35  Wooden Stairs D  
  6104.  54  36  Chest D T  
  6105.  55  37  Redstone Wire D I  
  6106.  56  38  Diamond Ore  
  6107.  57  39  Block of Diamond  
  6108.  58  3A  Crafting Table  
  6109.  59  3B  Wheat Seeds D  
  6110.  60  3C  Farmland D  
  6111.  61  3D  Furnace D T  
  6112.  62  3E  Burning Furnace D T  
  6113.  63  3F  Sign Post D I T  
  6114. Icon  Dec  Hex  Block type  
  6115.  64  40  Wooden Door D I  
  6116.  65  41  Ladders D  
  6117.  66  42  Rails D  
  6118.  67  43  Cobblestone Stairs D  
  6119.  68  44  Wall Sign D T  
  6120.  69  45  Lever D  
  6121.  70  46  Stone Pressure Plate D  
  6122.  71  47  Iron Door D I  
  6123.  72  48  Wooden Pressure Plate D  
  6124.  73  49  Redstone Ore  
  6125.  74  4A  Glowing Redstone Ore  
  6126.  75  4B  Redstone Torch ("off" state) D  
  6127.  76  4C  Redstone Torch ("on" state) D  
  6128.  77  4D  Stone Button D  
  6129.  78  4E  Snow D  
  6130.  79  4F  Ice  
  6131.  80  50  Snow Block  
  6132.  81  51  Cactus D  
  6133.  82  52  Clay Block  
  6134.  83  53  Sugar Cane D I  
  6135.  84  54  Jukebox D T  
  6136.  85  55  Fence  
  6137.  86  56  Pumpkin D  
  6138.  87  57  Netherrack  
  6139.  88  58  Soul Sand  
  6140.  89  59  Glowstone Block  
  6141.  90  5A  Portal  
  6142.  91  5B  Jack-O-Lantern D  
  6143.  92  5C  Cake Block D I  
  6144.  93  5D  Redstone Repeater ("off" state) D I  
  6145.  94  5E  Redstone Repeater ("on" state) D I  
  6146.  95  5F  Locked Chest  
  6147. Icon  Dec  Hex  Block type  
  6148.  96  60  Trapdoor D  
  6149.  97  61  Hidden Silverfish D  
  6150.  98  62  Stone Bricks D B  
  6151.  99  63  Huge Brown Mushroom D  
  6152.  100  64  Huge Red Mushroom D  
  6153.  101  65  Iron Bars  
  6154.  102  66  Glass Pane  
  6155.  103  67  Melon  
  6156.  104  68  Pumpkin Stem D  
  6157.  105  69  Melon Stem D  
  6158.  106  6A  Vines D  
  6159.  107  6B  Fence Gate D  
  6160.  108  6C  Brick Stairs D  
  6161.  109  6D  Stone Brick Stairs D  
  6162.  110  6E  Mycelium  
  6163.  111  6F  Lily Pad  
  6164.  112  70  Nether Brick  
  6165.  113  71  Nether Brick Fence  
  6166.  114  72  Nether Brick Stairs D  
  6167.  115  73  Nether Wart D I  
  6168.  116  74  Enchantment Table T  
  6169.  117  75  Brewing Stand D T I  
  6170.  118  76  Cauldron D I  
  6171.  119  77  End Portal T  
  6172.  120  78  End Portal Frame D  
  6173.  121  79  End Stone  
  6174.  122  7A  Dragon Egg  
  6175. Item IDs All items have values above 255, making it easy to separate the Block IDs from the Item IDs. Entries marked with a D require additional data to fully define the item in a Beta world. The chainmail set is currently unobtainable in Survival mode without hacking or, in multiplayer, the /give server command. It is available in Creative mode, however. The same applies to all music discs except for 13 and cat.
  6176.  
  6177. Icon  Dec  Hex  Item  
  6178. 256  100  Iron Shovel  
  6179. 257  101  Iron Pickaxe  
  6180. 258  102  Iron Axe  
  6181. 259  103  Flint and Steel  
  6182. 260  104  Red Apple  
  6183. 261  105  Bow  
  6184. 262  106  Arrow  
  6185. 263  107  Coal D  
  6186. 264  108  Diamond  
  6187. 265  109  Iron Ingot  
  6188. 266  10A  Gold Ingot  
  6189. 267  10B  Iron Sword  
  6190. 268  10C  Wooden Sword  
  6191. 269  10D  Wooden Shovel  
  6192. 270  10E  Wooden Pickaxe  
  6193. 271  10F  Wooden Axe  
  6194. 272  110  Stone Sword  
  6195. 273  111  Stone Shovel  
  6196. 274  112  Stone Pickaxe  
  6197. 275  113  Stone Axe  
  6198. 276  114  Diamond Sword  
  6199. 277  115  Diamond Shovel  
  6200. 278  116  Diamond Pickaxe  
  6201. 279  117  Diamond Axe  
  6202. 280  118  Stick  
  6203. 281  119  Bowl  
  6204. 282  11A  Mushroom Soup  
  6205. 283  11B  Gold Sword  
  6206. 284  11C  Gold Shovel  
  6207. 285  11D  Gold Pickaxe  
  6208. 286  11E  Gold Axe  
  6209. 287  11F  String  
  6210. Icon  Dec  Hex  Item  
  6211. 288  120  Feather  
  6212. 289  121  Gunpowder  
  6213. 290  122  Wooden Hoe  
  6214. 291  123  Stone Hoe  
  6215. 292  124  Iron Hoe  
  6216. 293  125  Diamond Hoe  
  6217. 294  126  Gold Hoe  
  6218. 295  127  Seeds  
  6219. 296  128  Wheat  
  6220. 297  129  Bread  
  6221. 298  12A  Leather Cap  
  6222. 299  12B  Leather Tunic  
  6223. 300  12C  Leather Pants  
  6224. 301  12D  Leather Boots  
  6225. 302  12E  Chain Helmet  
  6226. 303  12F  Chain Chestplate  
  6227. 304  130  Chain Leggings  
  6228. 305  131  Chain Boots  
  6229. 306  132  Iron Helmet  
  6230. 307  133  Iron Chestplate  
  6231. 308  134  Iron Leggings  
  6232. 309  135  Iron Boots  
  6233. 310  136  Diamond Helmet  
  6234. 311  137  Diamond Chestplate  
  6235. 312  138  Diamond Leggings  
  6236. 313  139  Diamond Boots  
  6237. 314  13A  Gold Helmet  
  6238. 315  13B  Gold Chestplate  
  6239. 316  13C  Gold Leggings  
  6240. 317  13D  Gold Boots  
  6241. 318  13E  Flint  
  6242. 319  13F  Raw Porkchop  
  6243. Icon  Dec  Hex  Item  
  6244. 320  140  Cooked Porkchop  
  6245. 321  141  Paintings  
  6246. 322  142  Golden Apple  
  6247. 323  143  Sign  
  6248. 324  144  Wooden door  
  6249. 325  145  Bucket  
  6250. 326  146  Water bucket  
  6251. 327  147  Lava bucket  
  6252. 328  148  Minecart  
  6253. 329  149  Saddle  
  6254. 330  14A  Iron door  
  6255. 331  14B  Redstone  
  6256. 332  14C  Snowball  
  6257. 333  14D  Boat  
  6258. 334  14E  Leather  
  6259. 335  14F  Milk  
  6260. 336  150  Clay Brick  
  6261. 337  151  Clay  
  6262. 338  152  Sugar Cane  
  6263. 339  153  Paper  
  6264. 340  154  Book  
  6265. 341  155  Slimeball  
  6266. 342  156  Minecart with Chest  
  6267. 343  157  Minecart with Furnace  
  6268. 344  158  Egg  
  6269. 345  159  Compass  
  6270. 346  15A  Fishing Rod  
  6271. 347  15B  Clock  
  6272. 348  15C  Glowstone Dust  
  6273. 349  15D  Raw Fish  
  6274. 350  15E  Cooked Fish  
  6275. 351  15F  Dye D  
  6276. Icon  Dec  Hex  Item  
  6277. 352  160  Bone  
  6278. 353  161  Sugar  
  6279. 354  162  Cake  
  6280. 355  163  Bed  
  6281. 356  164  Redstone Repeater  
  6282. 357  165  Cookie  
  6283. 358  166  Map  
  6284. 359  167  Shears  
  6285. 360  168  Melon Slice  
  6286. 361  169  Pumpkin Seeds  
  6287. 362  16A  Melon Seeds  
  6288. 363  16B  Raw Beef  
  6289. 364  16C  Steak  
  6290. 365  16D  Raw Chicken  
  6291. 366  16E  Cooked Chicken  
  6292. 367  16F  Rotten Flesh  
  6293. 368  170  Ender Pearl  
  6294. 369  171  Blaze Rod  
  6295. 370  172  Ghast Tear  
  6296. 371  173  Gold Nugget  
  6297. 372  174  Nether Wart  
  6298. 373  175  Potions D  
  6299. 374  176  Glass Bottle  
  6300. 375  177  Spider Eye  
  6301. 376  178  Fermented Spider Eye  
  6302. 377  179  Blaze Powder  
  6303. 378  17A  Magma Cream  
  6304. 379  17B  Brewing Stand  
  6305. 380  17C  Cauldron  
  6306. 381  17D  Eye of Ender  
  6307. 382  17E  Glistering Melon  
  6308. 383  17F  Spawner Egg D  
  6309. Icon  Dec  Hex  Item  
  6310. 2256  8D0  13 Disc  
  6311. 2257  8D1  Cat Disc  
  6312. 2258  8D2  blocks Disc  
  6313. 2259  8D3  chirp Disc  
  6314. 2260  8D4  far Disc  
  6315. 2261  8D5  mall Disc  
  6316. 2262  8D6  mellohi Disc  
  6317. 2263  8D7  stal Disc  
  6318. 2264  8D8  strad Disc  
  6319. 2265  8D9  ward Disc  
  6320. 2266  8DA  11 Disc  
  6321. Entity IDs Icon  Dec  Hex  Entity  
  6322. Drops  
  6323. 1  01  Dropped item  
  6324. 2  02  Experience Orb  
  6325. Projectiles  
  6326. 10  0A  Shot arrow  
  6327. 11  0B  Thrown snowball  
  6328. 12  0C  Ghast fireball  
  6329. 13  0D  Blaze fireball  
  6330. 14  0E  Thrown Ender Pearl  
  6331. 15  0F  Thrown Eye of Ender  
  6332. Blocks  
  6333. 20  14  Primed TNT  
  6334. 21  15  Falling block (gravel, sand)  
  6335. Vehicles  
  6336. 40  28  Minecart  
  6337. 41  29  Boat  
  6338. Icon  Dec  Hex  Entity  
  6339. Hostile mobs  
  6340. 50  32  Creeper  
  6341. 51  33  Skeleton  
  6342. 52  34  Spider  
  6343. 53  35  Giant  
  6344. 54  36  Zombie  
  6345. 55  37  Slime  
  6346. 56  38  Ghast  
  6347. 57  39  Zombie Pigman  
  6348. 58  3A  Enderman  
  6349. 59  3B  Cave Spider  
  6350. 60  3C  Silverfish  
  6351. 61  3D  Blaze  
  6352. 62  3E  Magma Cube  
  6353. 63  3F  Enderdragon  
  6354. Icon  Dec  Hex  Entity  
  6355. Passive mobs  
  6356. 90  5A  Pig  
  6357. 91  5B  Sheep  
  6358. 92  5C  Cow  
  6359. 93  5D  Chicken  
  6360. 94  5E  Squid  
  6361. 95  5F  Wolf  
  6362. 96  60  Mooshroom  
  6363. 97  61  Snow Golem  
  6364. NPCs  
  6365. 120  78  Villager  
  6366. Other  
  6367. 200  C8  Ender Crystal  
  6368. Icon  Dec  Hex  Block type  
  6369. 00  00  Air  
  6370.  01  01  Stone  
  6371.  02  02  Grass  
  6372.  03  03  Dirt  
  6373.  04  04  Cobblestone  
  6374.  05  05  Wooden Planks  
  6375.  06  06  Saplings D B  
  6376.  07  07  Bedrock  
  6377.  08  08  Water D  
  6378.  09  09  Stationary water D  
  6379.  10  0A  Lava D  
  6380.  11  0B  Stationary lava D  
  6381.  12  0C  Sand  
  6382.  13  0D  Gravel  
  6383.  14  0E  Gold Ore  
  6384.  15  0F  Iron Ore  
  6385.  16  10  Coal Ore  
  6386.  17  11  Wood D B  
  6387.  18  12  Leaves D B  
  6388.  19  13  Sponge  
  6389.  20  14  Glass  
  6390.  21  15  Lapis Lazuli Ore  
  6391.  22  16  Lapis Lazuli Block  
  6392.  23  17  Dispenser D T  
  6393.  24  18  Sandstone  
  6394.  25  19  Note Block T  
  6395.  26  1A  Bed D I  
  6396.  27  1B  Powered Rail D  
  6397.  28  1C  Detector Rail D  
  6398.  29  1D  Sticky Piston D  
  6399.  30  1E  Cobweb  
  6400.  31  1F  Tall Grass D  
  6401. Icon  Dec  Hex  Block type  
  6402.  32  20  Dead Bush  
  6403.  33  21  Piston D  
  6404.  34  22  Piston Extension D  
  6405.  35  23  Wool D B  
  6406.  36  24  Block moved by Piston T  
  6407.  37  25  Dandelion  
  6408.  38  26  Rose  
  6409.  39  27  Brown Mushroom  
  6410.  40  28  Red Mushroom  
  6411.  41  29  Block of Gold  
  6412.  42  2A  Block of Iron  
  6413.  43  2B  Double Slabs D B  
  6414.  44  2C  Slabs D B  
  6415.  45  2D  Bricks  
  6416.  46  2E  TNT  
  6417.  47  2F  Bookshelf  
  6418.  48  30  Moss Stone  
  6419.  49  31  Obsidian  
  6420.  50  32  Torch D  
  6421.  51  33  Fire D  
  6422.  52  34  Monster Spawner T  
  6423.  53  35  Wooden Stairs D  
  6424.  54  36  Chest D T  
  6425.  55  37  Redstone Wire D I  
  6426.  56  38  Diamond Ore  
  6427.  57  39  Block of Diamond  
  6428.  58  3A  Crafting Table  
  6429.  59  3B  Wheat Seeds D  
  6430.  60  3C  Farmland D  
  6431.  61  3D  Furnace D T  
  6432.  62  3E  Burning Furnace D T  
  6433.  63  3F  Sign Post D I T  
  6434. Icon  Dec  Hex  Block type  
  6435.  64  40  Wooden Door D I  
  6436.  65  41  Ladders D  
  6437.  66  42  Rails D  
  6438.  67  43  Cobblestone Stairs D  
  6439.  68  44  Wall Sign D T  
  6440.  69  45  Lever D  
  6441.  70  46  Stone Pressure Plate D  
  6442.  71  47  Iron Door D I  
  6443.  72  48  Wooden Pressure Plate D  
  6444.  73  49  Redstone Ore  
  6445.  74  4A  Glowing Redstone Ore  
  6446.  75  4B  Redstone Torch ("off" state) D  
  6447.  76  4C  Redstone Torch ("on" state) D  
  6448.  77  4D  Stone Button D  
  6449.  78  4E  Snow D  
  6450.  79  4F  Ice  
  6451.  80  50  Snow Block  
  6452.  81  51  Cactus D  
  6453.  82  52  Clay Block  
  6454.  83  53  Sugar Cane D I  
  6455.  84  54  Jukebox D T  
  6456.  85  55  Fence  
  6457.  86  56  Pumpkin D  
  6458.  87  57  Netherrack  
  6459.  88  58  Soul Sand  
  6460.  89  59  Glowstone Block  
  6461.  90  5A  Portal  
  6462.  91  5B  Jack-O-Lantern D  
  6463.  92  5C  Cake Block D I  
  6464.  93  5D  Redstone Repeater ("off" state) D I  
  6465.  94  5E  Redstone Repeater ("on" state) D I  
  6466.  95  5F  Locked Chest  
  6467. Icon  Dec  Hex  Block type  
  6468.  96  60  Trapdoor D  
  6469.  97  61  Hidden Silverfish D  
  6470.  98  62  Stone Bricks D B  
  6471.  99  63  Huge Brown Mushroom D  
  6472.  100  64  Huge Red Mushroom D  
  6473.  101  65  Iron Bars  
  6474.  102  66  Glass Pane  
  6475.  103  67  Melon  
  6476.  104  68  Pumpkin Stem D  
  6477.  105  69  Melon Stem D  
  6478.  106  6A  Vines D  
  6479.  107  6B  Fence Gate D  
  6480.  108  6C  Brick Stairs D  
  6481.  109  6D  Stone Brick Stairs D  
  6482.  110  6E  Mycelium  
  6483.  111  6F  Lily Pad  
  6484.  112  70  Nether Brick  
  6485.  113  71  Nether Brick Fence  
  6486.  114  72  Nether Brick Stairs D  
  6487.  115  73  Nether Wart D I  
  6488.  116  74  Enchantment Table T  
  6489.  117  75  Brewing Stand D T I  
  6490.  118  76  Cauldron D I  
  6491.  119  77  End Portal T  
  6492.  120  78  End Portal Frame D  
  6493.  121  79  End Stone  
  6494.  122  7A  Dragon Egg  
  6495. Item IDs All items have values above 255, making it easy to separate the Block IDs from the Item IDs. Entries marked with a D require additional data to fully define the item in a Beta world. The chainmail set is currently unobtainable in Survival mode without hacking or, in multiplayer, the /give server command. It is available in Creative mode, however. The same applies to all music discs except for 13 and cat.
  6496.  
  6497. Icon  Dec  Hex  Item  
  6498. 256  100  Iron Shovel  
  6499. 257  101  Iron Pickaxe  
  6500. 258  102  Iron Axe  
  6501. 259  103  Flint and Steel  
  6502. 260  104  Red Apple  
  6503. 261  105  Bow  
  6504. 262  106  Arrow  
  6505. 263  107  Coal D  
  6506. 264  108  Diamond  
  6507. 265  109  Iron Ingot  
  6508. 266  10A  Gold Ingot  
  6509. 267  10B  Iron Sword  
  6510. 268  10C  Wooden Sword  
  6511. 269  10D  Wooden Shovel  
  6512. 270  10E  Wooden Pickaxe  
  6513. 271  10F  Wooden Axe  
  6514. 272  110  Stone Sword  
  6515. 273  111  Stone Shovel  
  6516. 274  112  Stone Pickaxe  
  6517. 275  113  Stone Axe  
  6518. 276  114  Diamond Sword  
  6519. 277  115  Diamond Shovel  
  6520. 278  116  Diamond Pickaxe  
  6521. 279  117  Diamond Axe  
  6522. 280  118  Stick  
  6523. 281  119  Bowl  
  6524. 282  11A  Mushroom Soup  
  6525. 283  11B  Gold Sword  
  6526. 284  11C  Gold Shovel  
  6527. 285  11D  Gold Pickaxe  
  6528. 286  11E  Gold Axe  
  6529. 287  11F  String  
  6530. Icon  Dec  Hex  Item  
  6531. 288  120  Feather  
  6532. 289  121  Gunpowder  
  6533. 290  122  Wooden Hoe  
  6534. 291  123  Stone Hoe  
  6535. 292  124  Iron Hoe  
  6536. 293  125  Diamond Hoe  
  6537. 294  126  Gold Hoe  
  6538. 295  127  Seeds  
  6539. 296  128  Wheat  
  6540. 297  129  Bread  
  6541. 298  12A  Leather Cap  
  6542. 299  12B  Leather Tunic  
  6543. 300  12C  Leather Pants  
  6544. 301  12D  Leather Boots  
  6545. 302  12E  Chain Helmet  
  6546. 303  12F  Chain Chestplate  
  6547. 304  130  Chain Leggings  
  6548. 305  131  Chain Boots  
  6549. 306  132  Iron Helmet  
  6550. 307  133  Iron Chestplate  
  6551. 308  134  Iron Leggings  
  6552. 309  135  Iron Boots  
  6553. 310  136  Diamond Helmet  
  6554. 311  137  Diamond Chestplate  
  6555. 312  138  Diamond Leggings  
  6556. 313  139  Diamond Boots  
  6557. 314  13A  Gold Helmet  
  6558. 315  13B  Gold Chestplate  
  6559. 316  13C  Gold Leggings  
  6560. 317  13D  Gold Boots  
  6561. 318  13E  Flint  
  6562. 319  13F  Raw Porkchop  
  6563. Icon  Dec  Hex  Item  
  6564. 320  140  Cooked Porkchop  
  6565. 321  141  Paintings  
  6566. 322  142  Golden Apple  
  6567. 323  143  Sign  
  6568. 324  144  Wooden door  
  6569. 325  145  Bucket  
  6570. 326  146  Water bucket  
  6571. 327  147  Lava bucket  
  6572. 328  148  Minecart  
  6573. 329  149  Saddle  
  6574. 330  14A  Iron door  
  6575. 331  14B  Redstone  
  6576. 332  14C  Snowball  
  6577. 333  14D  Boat  
  6578. 334  14E  Leather  
  6579. 335  14F  Milk  
  6580. 336  150  Clay Brick  
  6581. 337  151  Clay  
  6582. 338  152  Sugar Cane  
  6583. 339  153  Paper  
  6584. 340  154  Book  
  6585. 341  155  Slimeball  
  6586. 342  156  Minecart with Chest  
  6587. 343  157  Minecart with Furnace  
  6588. 344  158  Egg  
  6589. 345  159  Compass  
  6590. 346  15A  Fishing Rod  
  6591. 347  15B  Clock  
  6592. 348  15C  Glowstone Dust  
  6593. 349  15D  Raw Fish  
  6594. 350  15E  Cooked Fish  
  6595. 351  15F  Dye D  
  6596. Icon  Dec  Hex  Item  
  6597. 352  160  Bone  
  6598. 353  161  Sugar  
  6599. 354  162  Cake  
  6600. 355  163  Bed  
  6601. 356  164  Redstone Repeater  
  6602. 357  165  Cookie  
  6603. 358  166  Map  
  6604. 359  167  Shears  
  6605. 360  168  Melon Slice  
  6606. 361  169  Pumpkin Seeds  
  6607. 362  16A  Melon Seeds  
  6608. 363  16B  Raw Beef  
  6609. 364  16C  Steak  
  6610. 365  16D  Raw Chicken  
  6611. 366  16E  Cooked Chicken  
  6612. 367  16F  Rotten Flesh  
  6613. 368  170  Ender Pearl  
  6614. 369  171  Blaze Rod  
  6615. 370  172  Ghast Tear  
  6616. 371  173  Gold Nugget  
  6617. 372  174  Nether Wart  
  6618. 373  175  Potions D  
  6619. 374  176  Glass Bottle  
  6620. 375  177  Spider Eye  
  6621. 376  178  Fermented Spider Eye  
  6622. 377  179  Blaze Powder  
  6623. 378  17A  Magma Cream  
  6624. 379  17B  Brewing Stand  
  6625. 380  17C  Cauldron  
  6626. 381  17D  Eye of Ender  
  6627. 382  17E  Glistering Melon  
  6628. 383  17F  Spawner Egg D  
  6629. Icon  Dec  Hex  Item  
  6630. 2256  8D0  13 Disc  
  6631. 2257  8D1  Cat Disc  
  6632. 2258  8D2  blocks Disc  
  6633. 2259  8D3  chirp Disc  
  6634. 2260  8D4  far Disc  
  6635. 2261  8D5  mall Disc  
  6636. 2262  8D6  mellohi Disc  
  6637. 2263  8D7  stal Disc  
  6638. 2264  8D8  strad Disc  
  6639. 2265  8D9  ward Disc  
  6640. 2266  8DA  11 Disc  
  6641. Entity IDs Icon  Dec  Hex  Entity  
  6642. Drops  
  6643. 1  01  Dropped item  
  6644. 2  02  Experience Orb  
  6645. Projectiles  
  6646. 10  0A  Shot arrow  
  6647. 11  0B  Thrown snowball  
  6648. 12  0C  Ghast fireball  
  6649. 13  0D  Blaze fireball  
  6650. 14  0E  Thrown Ender Pearl  
  6651. 15  0F  Thrown Eye of Ender  
  6652. Blocks  
  6653. 20  14  Primed TNT  
  6654. 21  15  Falling block (gravel, sand)  
  6655. Vehicles  
  6656. 40  28  Minecart  
  6657. 41  29  Boat  
  6658. Icon  Dec  Hex  Entity  
  6659. Hostile mobs  
  6660. 50  32  Creeper  
  6661. 51  33  Skeleton  
  6662. 52  34  Spider  
  6663. 53  35  Giant  
  6664. 54  36  Zombie  
  6665. 55  37  Slime  
  6666. 56  38  Ghast  
  6667. 57  39  Zombie Pigman  
  6668. 58  3A  Enderman  
  6669. 59  3B  Cave Spider  
  6670. 60  3C  Silverfish  
  6671. 61  3D  Blaze  
  6672. 62  3E  Magma Cube  
  6673. 63  3F  Enderdragon  
  6674. Icon  Dec  Hex  Entity  
  6675. Passive mobs  
  6676. 90  5A  Pig  
  6677. 91  5B  Sheep  
  6678. 92  5C  Cow  
  6679. 93  5D  Chicken  
  6680. 94  5E  Squid  
  6681. 95  5F  Wolf  
  6682. 96  60  Mooshroom  
  6683. 97  61  Snow Golem  
  6684. NPCs  
  6685. 120  78  Villager  
  6686. Other  
  6687. 200  C8  Ender Crystal  
  6688. 0x2: Facing West
  6689. 0x3: Facing South
  6690. 0x4: Facing North
  6691. Ground levers:
  6692.  
  6693. 0x5: Lever points South when off.
  6694. 0x6: Lever points East when off. (Note that unlike the other types of switch, this version didn't power wires around the block it was sitting on. This bug was fixed in Beta 1.6)
  6695. Doors The two least significant bits are the orientation of the door, that is, the corner in which its hinge is positioned:
  6696.  
  6697. 0x0: Northwest corner
  6698. 0x1: Northeast corner
  6699. 0x2: Southeast corner
  6700. 0x3: Southwest corner
  6701. The two bits above are flags:
  6702.  
  6703. 0x8: If this bit is set, this is the top half of a door (else the lower half).
  6704. 0x4: If this bit is set, the door has swung counterclockwise around its hinge.
  6705. For example, the bottom half of a door with its hinge on the Southwest corner, which is swung so that it is closed when viewed from the West, will have a data value of (3 | 4) = (3 + 4) = 7.
  6706.  
  6707. Buttons 0x8 If this bit is set, the button has been pressed. If this bit is set in a saved level, the button will remain pressed for an undefined length of time after the level is loaded.
  6708. Button direction:
  6709.  
  6710. 0x1: Facing East
  6711. 0x2: Facing West
  6712. 0x3: Facing South
  6713. 0x4: Facing North
  6714. Sign Posts 0x0: South
  6715. 0x1: South-Southwest
  6716. 0x2: Southwest
  6717. 0x3: West-Southwest
  6718. 0x4: West
  6719. 0x5: West-Northwest
  6720. 0x6: Northwest
  6721. 0x7: North-Northwest
  6722. 0x8: North
  6723. 0x9: North-Northeast
  6724. 0xA: Northeast
  6725. 0xB: East-Northeast
  6726. 0xC: East
  6727. 0xD: East-Southeast
  6728. 0xE: Southeast
  6729. 0xF: South-Southeast
  6730. Wall Signs, Furnaces, Dispensers and Chests 0x2: Facing North
  6731. 0x3: Facing South
  6732. 0x4: Facing West
  6733. 0x5: Facing East
  6734. Pumpkins and Jack-O-Lanterns 0x0: Facing South
  6735. 0x1: Facing West
  6736. 0x2: Facing North
  6737. 0x3: Facing East
  6738. Pressure Plates 0x1: If this bit is set, the plate is pressed.
  6739. Slab and Double Slab material Icon  Value  Description  
  6740.  0x0  Stone Slab  
  6741.  0x1  Sandstone Slab  
  6742.  0x2  Wooden Slab  
  6743.  0x3  Cobblestone Slab  
  6744.  0x4  Brick Slab  
  6745.  0x5  Stone Brick Slab  
  6746.  0x6  Stone Slab  
  6747. Snow  
  6748. Heights of snow from 0-7, going from left to right0x0: Normal snowfall height
  6749. ...
  6750. 0x7: Full block size height
  6751. The height repeats for values 8-15. Note that snow does not occur naturally at other heights than 0, but can be edited or hacked in. Values 0-2 has no hitbox, values 3-7 has the same hitbox as a slab.
  6752.  
  6753. Cake 0x0: 0 pieces eaten
  6754. 0x1: 1 piece eaten
  6755. 0x2: 2 pieces eaten
  6756. 0x3: 3 pieces eaten
  6757. 0x4: 4 pieces eaten
  6758. 0x5: 5 pieces eaten
  6759. Beds 0x0: Head is pointing South
  6760. 0x1: Head is pointing West
  6761. 0x2: Head is pointing North
  6762. 0x3: Head is pointing East
  6763. 0x4: (bit flag) - When 0, the bed is empty. When 1, the bed is occupied.
  6764. 0x8: (bit flag) - When 0, the foot of the bed. When 1, the head of the bed.
  6765. Redstone Repeater Low (1st & 2nd) bits:
  6766.  
  6767. 0x0: Facing North
  6768. 0x1: Facing East
  6769. 0x2: Facing South
  6770. 0x3: Facing West
  6771. High (3rd & 4th) bits:
  6772.  
  6773. 0x0: 1 tick delay
  6774. 0x1: 2 tick delay
  6775. 0x2: 3 tick delay
  6776. 0x3: 4 tick delay
  6777. Redstone Wire 0xF is a wire placed right next to a power source (like a redstone torch). The value declines with distance until 0x0, which is a non-powered wire. The direction of the wire is not saved but calculated at runtime.
  6778.  
  6779. Tall Grass Icon  Value  Description  
  6780.  0x0  Dead shrub (identical in appearance to block Dead Bush when placed, but acts like Tall Grass)  
  6781.  0x1  Tall grass  
  6782.  0x2  Fern  
  6783. Trapdoors 0x4 is a bit that determines whether or not the trapdoor is swung open. 0 for closed (on the ground), 1 for open (against its connecting wall). The remaining two bits describe which wall the trapdoor is attached to:
  6784.  
  6785. 0x0: Attached to the South wall
  6786. 0x1: Attached to the North wall
  6787. 0x2: Attached to the East wall
  6788. 0x3: Attached to the West wall
  6789. Piston The top bit (0x8) is a status bit that determines whether the piston is pushed out or not. 1 for pushed out, 0 for retracted.
  6790.  
  6791. The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing)
  6792.  
  6793. 0: Down
  6794. 1: Up
  6795. 2: North
  6796. 3: South
  6797. 4: West
  6798. 5: East
  6799. Piston Extension The top bit (0x8) is a status bit that determines whether the head is sticky or not (note that the Piston Body actually has completely different block types for Sticky and Regular). 1 is sticky, 0 is regular.
  6800.  
  6801. The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing).
  6802.  
  6803. 0: Down
  6804. 1: Up
  6805. 2: North
  6806. 3: South
  6807. 4: West
  6808. 5: East
  6809. Stone Brick 0: Normal
  6810. 1: Mossy
  6811. 2: Cracked
  6812. Huge brown and red mushroom Huge mushrooms consist of the same blocks throughout their structure, the data value of each block decides the texture. The default texture on all sides is porous flesh. The cap texture can be either the brown mushroom or red mushroom texture, the textures for porous and stem sides are identical.
  6813.  
  6814. Value  Description  Textures  
  6815. 0  Fleshy piece  Pores on all sides  
  6816. 1  Corner piece  Cap texture on top, West and North  
  6817. 2  Side piece  Cap texture on top and North  
  6818. 3  Corner piece  Cap texture on top, North and East  
  6819. 4  Side piece  Cap texture on top and West  
  6820. 5  Top piece  Cap texture on top  
  6821. 6  Side piece  Cap texture on top and East  
  6822. 7  Corner piece  Cap texture on top, South and West  
  6823. 8  Side piece  Cap texture on top and South  
  6824. 9  Corner piece  Cap texture on top, East and South  
  6825. 10  Stem piece  Stem texture on all four sides, pores on top and bottom  
  6826. Vines Determines the face against which the vine is anchored. Note that (except for Top) these are testable as bit flags, unlike most of the other directional data for other block types. Multiple sides can contain vines. The "top" attachment is assumed to be present if data is 0 or there is solid block above.
  6827.  
  6828. 1: South
  6829. 2: West
  6830. 4: North
  6831. 8: East
  6832. Fence Gates 0x4 is a bit flag: 1 is open, 0 is closed. The remaining two bits determine in which direction the gate will open.
  6833.  
  6834. 0: To the South
  6835. 1: To the West
  6836. 2: To the North
  6837. 3: To the East
  6838. Hidden Silverfish A silverfish will hide inside a Stone, Cobblestone, or Stone Brick block, changing it into a Hidden Silverfish block. The data value tells us its appearance:
  6839.  
  6840. 0: Stone
  6841. 1: Cobblestone
  6842. 2: Stone Brick
  6843. Potions A Glass Bottle filled with a potion. Potion type is stored in item's damage value as a 16-bit number. Potion effect, name, and other flags are encoded on bits. Effect duration itself isn't there, but can be calculated from other values.
  6844.  
  6845. Current meaning of bits is described below. Note that potion name overlaps with potion effect and tier.
  6846.  
  6847. Bit  Dec  Hex  Meaning  
  6848. 0  1  0001  Potion effect  Potion name  
  6849. 1  2  0002  
  6850. 2  4  0004  
  6851. 3  8  0008  
  6852. 4  16  0010  
  6853. 5  32  0020  Tier  
  6854. 6  64  0040  Extended duration  
  6855. 7  128  0800  (ignored)  
  6856. 8  256  0100  
  6857. 9  512  0200  
  6858. 10  1024  0400  
  6859. 11  2048  0800  
  6860. 12  4096  1000  
  6861. 13  8192  2000  
  6862. 14  16384  4000  Splash potion  
  6863. 15  32768  8000  (ignored)  
  6864.  
  6865. To calculate damage value of potion with desired effect use the following formula:
  6866.  
  6867. DV = potion_effect + tier_bit + extended_bit + splash_bit
  6868. for example:
  6869.  
  6870. potion with "Instant Health" effect has damage value 5 (= 5 + 0 + 0 + 0);
  6871. potion with extended "Slowness" effect has value 74 (= 10 + 0 + 64 + 0);
  6872. splash potion with tier II "Strength" effect has value 16425 (= 9 + 32 + 0 + 16384).
  6873. To get potion with certain name, use the following formula:
  6874.  
  6875. DV = potion_name + extended_bit + splash_bit
  6876. for example:
  6877.  
  6878. "Splash Charming Potion" has damage value 16422 (= 38 + 0 + 16384)
  6879. "Potion name" bits Dec  Hex  Potion  
  6880. 0  00  Water Bottle / Mundane Potion  
  6881. 1  01  Potion of Regeneration  
  6882. 2  02  Potion of Swiftness  
  6883. 3  03  Potion of Fire Resistance  
  6884. 4  04  Potion of Poison  
  6885. 5  05  Potion of Healing  
  6886. 6  06  Clear Potion  
  6887. 7  07  Clear Potion  
  6888. 8  08  Potion of Weakness  
  6889. 9  09  Potion of Strength  
  6890. 10  0a  Potion of Slowness  
  6891. 11  0b  Diffuse Potion  
  6892. 12  0c  Potion of Harming  
  6893. 13  0d  Artless Potion  
  6894. 14  0e  Thin Potion  
  6895. 15  0f  Thin Potion  
  6896. Dec  Hex  Potion  
  6897. 16  10  Awkward Potion  
  6898. 17  11  Potion of Regeneration  
  6899. 18  12  Potion of Swiftness  
  6900. 19  13  Potion of Fire Resistance  
  6901. 20  14  Potion of Poison  
  6902. 21  15  Potion of Healing  
  6903. 22  16  Bungling Potion  
  6904. 23  17  Bungling Potion  
  6905. 24  18  Potion of Weakness  
  6906. 25  19  Potion of Strength  
  6907. 26  1a  Potion of Slowness  
  6908. 27  1b  Smooth Potion  
  6909. 28  1c  Potion of Harming  
  6910. 29  1d  Suave Potion  
  6911. 30  1e  Debonair Potion  
  6912. 31  1f  Debonair Potion  
  6913. Dec  Hex  Potion  
  6914. 32  20  Thick Potion  
  6915. 33  21  Potion of Regeneration II  
  6916. 34  22  Potion of Swiftness II  
  6917. 35  23  Potion of Fire Resistance  
  6918. 36  24  Potion of Poison II  
  6919. 37  25  Potion of Healing II  
  6920. 38  26  Charming Potion  
  6921. 39  27  Charming Potion  
  6922. 40  28  Potion of Weakness  
  6923. 41  29  Potion of Strength II  
  6924. 42  2a  Potion of Slowness  
  6925. 43  2b  Refined Potion  
  6926. 44  2c  Potion of Harming II  
  6927. 45  2d  Cordial Potion  
  6928. 46  2e  Sparkling Potion  
  6929. 47  2f  Sparkling Potion  
  6930. Dec  Hex  Potion  
  6931. 48  30  Potent Potion  
  6932. 49  31  Potion of Regeneration II  
  6933. 50  32  Potion of Swiftness II  
  6934. 51  33  Potion of Fire Resistance  
  6935. 52  34  Potion of Poison II  
  6936. 53  35  Potion of Healing II  
  6937. 54  36  Rank Potion  
  6938. 55  37  Rank Potion  
  6939. 56  38  Potion of Weakness  
  6940. 57  39  Potion of Strength II  
  6941. 58  3a  Potion of Slowness  
  6942. 59  3b  Acrid Potion  
  6943. 60  3c  Potion of Harming II  
  6944. 61  3d  Gross Potion  
  6945. 62  3e  Stinky Potion  
  6946. 63  3f  Stinky Potion  
  6947.  
  6948. Note: potion with name set to 0 is called "Water Bottle" only if no other bit is set. Otherwise, it is called "Mundane Potion".
  6949.  
  6950. Note: potions with splash potion bit set have additional "Splash " prefix.
  6951.  
  6952. "Potion effect" bits Dec  Hex  Effect  Duration  Bottles  Icon  Effect color  
  6953. 0  0  -  -    -  
  6954. 1  1  Regeneration  0:45     Pink  
  6955. 2  2  Speed  3:00     Sky blue  
  6956. 3  3  Fire Resistance  3:00     Orange  
  6957. 4  4  Poison  0:45     Green  
  6958. 5  5  Instant Health  instant    -  -  
  6959. 6  6  -  -    -  -  
  6960. 7  7  -  -    -  -  
  6961. 8  8  Weakness  1:30     Grey  
  6962. 9  9  Strength  3:00     Dark red  
  6963. 10  a  Slowness  1:30     Blue-Grey  
  6964. 11  b  -  -    -  -  
  6965. 12  c  Instant Damage  instant    -  -  
  6966. 13  d  -  -    -  -  
  6967. 14  e  -  -    -  -  
  6968. 15  f  -  -    -  -  
  6969. "Tier" bit Dex  Hex  Meaning  
  6970. 0  0000  Tier I effect.  
  6971. 32  0020  Tier II effect. Multiply duration by 1/2.  
  6972.  
  6973. Note: Fire Resistance, Weakness and Slowness effects have no second tier. Their strength and duration are unaffected by this bit.
  6974.  
  6975. "Extended duration" bit Dex  Hex  Meaning  
  6976. 0  0000  Base duration.  
  6977. 64  0040  Multiply duration by 8/3.  
  6978. "Splash potion" bit Dex  Hex  Meaning  
  6979. 0  0000  Drinkable potion.  
  6980. 16384  4000  Splash potion. Multiply duration by 3/4.  
  6981. Brewing Stand The bottom three bits are bit flags for which bottle slots actually contain bottles. The actual bottle contents (and the reagent at the top) are stored in a TileEntity for this block, not in the data field.
  6982.  
  6983. 0x1: The slot pointing East
  6984. 0x2: The slot pointing Southwest
  6985. 0x4: The slot pointing Northwest
  6986. Cauldron The data value stores the amount of water kept in the cauldron, in units of glass bottles that can be filled.
  6987.  
  6988. 0: Empty
  6989. 1: 1/3 filled
  6990. 2: 2/3 filled
  6991. 3: Fully filled
  6992. End Portal Frame The bottom two bits determine which "side" of the whole portal frame this block is a part of.
  6993.  
  6994. 0x4 is a bit flag: 0 is an "empty" frame block, 1 is a block with an Eye of Ender inserted
  6995.  
  6996.  
  6997. ]])
  6998. datavalues.close()
  6999. dragon=fs.open("mem/redworks/minepedia/dragon","w")
  7000. dragon.write([[The Ender Dragon is the first official mob boss to appear in Minecraft. It only naturally spawns in The End. This mob uses the dragon model Notch created, but utilizes a texture more reminiscent of an Enderman, being black and scaly with purple eyes.
  7001. Strategy: Before entering the End, it is very strongly advised that you first sleep in a bed near the end portal, as you will most likely die your first time in. Upon entering The End, a purple "boss health bar" appears at the top of the player's screen. This bar indicates the remaining health of the resident Ender Dragon. Each End houses a single Ender Dragon who is periodically charged by nearby Ender Crystals. These crystals can be found at the summit of Obsidian pillars which dot the otherwise flat landscape. The healing effect of the Ender Crystals can reverse hard-won damage rather quickly, therefore it is recommended that they be destroyed before the player engages the Ender Dragon. Wearing any armor will make the Ender Dragon unable to hurt you; rather, you will simply be pushed around.
  7002. Destroying an Ender Crystal while the Ender Dragon is being charged by it (indicated by a series of circles appearing between the Ender Crystal and the Ender Dragon) will cause the Ender Dragon to take additional damage instead of being healed (You can destroy an Ender Crystal by either trying to destroy it as you would a regular block, or by attacking it with a sword, a bow and arrow, etc.) When destroyed, the Ender Crystal explodes and is replaced by a chunk of Bedrock. Get the Ender Dragon in the explosion to cause even more damage!
  7003. The Ender Dragon will flee when looked at, except when charging the player, but otherwise will fly directly at the player. When the Ender Dragon is charging the player, it is directly facing the player, giving the player a good chance of attacking its head, which, as mentioned earlier, will do extra damage (but if you do decide to attack it, you will have less time to try and avoid its attack) The Ender Dragon will also destroy any block it comes into contact with except Obsidian, End Stone and Bedrock (passing through them instead), making TNT strategies difficult if not impossible to successfully execute. Due to the Ender Dragon's speed and flight, projectiles are favored over melee approaches. The Ender Dragon's immense health and evasive nature necessitate a large ammunition stockpile. Lava is useless, as they are immune to fire damage. Snowballs have the potential to stun-lock an Ender Dragon as its recovery time is slower than the firing rate of snowballs. The Ender Dragon will take more damage from a melee attack than a ranged attack, thus waiting for it to charge, sidestepping, and then attacking is a viable tactic. Beds, which explode in The End, can be detonated when the Ender Dragon is nearby, causing it considerable damage. Ender Dragons take the most damage from damage dealt to the head. Hitting other areas of the body will not do as much damage.
  7004. Once killed, the Ender Dragon will appear to have beams of light spontaneously erupting from its body. It will then explode, dropping enough experience to bring a player from no experience to level 110 (20000 - 10 drops of 1000 experience, one drop of 10000 experience). If you bring an enchantment table and 30 bookcases with you while killing the Ender dragon, you can set it up after it dies and use it every 50 levels for many level 40+ enchantments. It will also spawn a Dragon Egg on top of an End Portal made of Bedrock. On the second block up, two Torches are placed on either side. Entering the portal will activate an eight minute text cutscene that acts as the end of Minecraft, after which the player will be teleported to their spawn point in The Overworld. The player may return to The End after defeating the Ender Dragon, however there will be no new dragon. In SMP stepping through the portal will wipe all of your unspent experience levels. There are ways, such as teleportation, to avoid the loss of unspent experience levels.
  7005. The offical findings of Mr D.H, one of Notch's personal friends, states that unlike Enderman, the enderdragon is immune to water damage- this only lets off smoke similar to the expolision of TNT. It also states, that before entering The End, taking an Enchanted sword is extremely good: as long as you do not mind that you may lose it. The Enderdragon cannot leave The End and go to the Overload,this was consistered by Notch, but never made the final cut.
  7006. History: Originally, dragons were a possible planned mob, hinted at by Notch during the Spider Jockey update.[1] He also mentioned that dragon lairs may be an addition.[2] They remained a potential work-in-progress until the Ender Dragon was announced.
  7007. Notch has stated in the past that if dragons are added, they will not be mountable as it would put too much pressure on SMP servers.[3]
  7008. In September 2011, Notch stated that "dragons will be added eventually."[4]
  7009. On October 7th 2011, Notch revealed the existence of the Ender Dragon.
  7010. On October 10th 2011, Notch released a video showing a small clip of The End that also shows the Ender Dragon fly into the top of the frame. [1] [2]
  7011. On October 11th 2011 A player named stropping_notch asked Jeb if Dragon riding is an idea, to which he replied it is. It is not clear whether this means it is an idea under consideration or not, however, or whether it would apply to the red Dragons or the Ender Dragon.[5]
  7012. On October 12th 2011, in a Reddit post Notch also said, "They will be different dragons. The Ender Dragon will probably become larger, and the ones in the main world will be this size, won't go through terrain, and will be red because dragons are red."[6]
  7013. On October 12th 2011, Notch stated in a twitter post that "[d]ragons have 6 limbs"[7], consisting of 2 wings, 2 legs and 2 arms.
  7014. On October 13th 2011, Beta 1.9 Pre-release 4 was released along with The End. The Ender Dragon existed in the code, mostly functional, however the dragon had not been enabled ingame yet and players were unable to damage it.
  7015. On October 27th 2011, Beta 1.9 Pre-release 5 was released, including the ability for players to damage Ender Dragons. They required mods or a mob-spawner to be brought into the game however.
  7016. On November 11 2011, Beta 1.9 Pre-release 6 was released, including a single Ender Dragon as a boss battle, spawning naturally when the player first enters The End.
  7017. Trivia: The name "Ender Dragon" was first made known through a tweet by Notch reading "raqreqentba," which could be decoded using the ROT13 cypher, translating to "enderdragon."[8]
  7018. The Ender Dragon has its own separate mob folder containing separate designs: the old gray skin and the newer black skin.
  7019. The Ender Dragon flies at 10 times the player's normal walking speed.
  7020. Made of 61 cuboids, the polycount on the dragon is higher than all models in Minecraft. Notch joked about how Minecraft was "going next gen" when deadmau5 mentioned this.[9]
  7021. Before it was textured, Notch reported that he was afraid to texture it as it was a complicated model.[10] In the end, the dragon model was so complex Notch stated that he gave up making the texture manually and wrote a texture packer tool to aid him in adding the texture to the model. Notch also uploaded the code for the tool so others could use the pack.[11][12]
  7022. As of 1.9 Pre-release 5, Ender Dragons:
  7023. No longer catch fire from lava or the fire aspect enchantment.
  7024. Can only be hurt below the 127 block map height limit. Getting Ender Dragons to fly above the limit (in Creative Mode, Overworld) will prevent any damage to them.
  7025. Phase through the player without causing damage when over block level 127.
  7026. Have their own achievement called "The End," which requires defeating an Ender Dragon.
  7027. In terms of how difficult the Ender Dragon is to defeat, Notch tweeted that his design guideline for the dragon is "[If] I can beat it at all, it's too easy."
  7028. Due to the increase in Diamond Armor's durability since Minecraft 1.0.0, Enderdragon attacks will barely phase the player. However, the launching aspect of their attacks can still subject the player to large amounts of fall damage.
  7029. Notch has uploaded a video showing why Ender Dragons will not spawn in the main world, as they would destroy any block they come into contact with.[13]
  7030. On Reddit, Notch explained why Ender Dragons destroy matter.[14]
  7031. When an Ender Dragon destroys a block by means of flying through it, an explosion effect occurs identical to that of a TNT explosion.
  7032. When hit, an Ender Dragon will make the same pain sounds as the player.
  7033. Ender Dragons spawn on Peaceful.
  7034. The knockback caused by an Ender Dragon's attack is far higher than that of any other mob.
  7035. An Ender Dragon's attack can cause Endermen to chase after it, should they survive the devastating attack.
  7036. Ender Dragons can be damaged by Snowballs, as snow is made of water, which damages Ender-mobs. However, Snow Golems will not attack it.
  7037. When no Ender Dragon is present, a player-placed Ender Dragon mob spawner will cause an empty 'boss health' bar to show.
  7038. Negative splash potions do not seem to affect the Ender Dragon. The potion hits and detonates as per normal, but the dragon does not flash red like when hurt and no apparent effect is seen on it. (Tested in SSP, and with Splash Potions of Poison, Instant Harming, Slowness and Weakness.)
  7039. The Ender Dragon's hitbox seems to be bigger than the Ender Dragon itself.
  7040. Even though Ender-mobs are injured by water, the Ender Dragon will destroy water source blocks as if they were solid.
  7041. If the player uses modifications to spawn an Ender Dragon in the Overworld and uses the portal it creates from its death there, it will lead the player to The End.
  7042. The Ender dragon, alongside the Ghast, and Blaze is one of the only current flying mobs in the game. It is the only one which uses wings to fly.
  7043. ]])
  7044. dragon.close()
  7045. enchanting=fs.open("mem/redworks/minepedia/enchanting","w")
  7046. enchanting.write([[Enchanting is a game mechanic that involves using an Enchantment Table to add special bonuses to tools, weapons or armor. To enchant an item, you will need the required Experience level for the enchantment and an Enchantment Table.
  7047. Notch has stated that Enchanting will work in three stages and the benefits will be based on the spell you choose, but a random loot element will be included as well.[1][2] Each spell will cost the player experience levels but in turn allows the player to enchant armor, swords and tools with one or several random bonus attributes as well as making the items glow with a brilliant hue.
  7048. History: Notch first tweeted about the Enchantment Table on September 30th 2011.[3][4]
  7049. Enchanting was added to the game in 1.9 prerelease 2. However, enchanting was not the same in the 1.9 prerelease 2. Enchanting did NOT require bookshelves to get maximum enchantments. Also, many enchantments were not added back then. Enchantments are labeled in the enchanting table as random words in the Standard Galactic Alphabet.
  7050. Enchantment names are randomly constructed from a long list of words. Three to five words are chosen from the list and appended to each other, creating the enchantment name. Any name can be chosen for any item. Note that the names are not actually saved with the item, they are only displayed in the Enchantment Table interface, albeit with the Standard Galactic Alphabet.
  7051. scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet elder ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale
  7052. Repairing an enchanted weapon/tool will remove the enchantment on it.[6]
  7053. When an enchanted weapon deals bonus damage to a mob, circular blue particles fly off of that mob, similar to getting a critical hit.
  7054. There are several levels on most enchants, and when you enchant you can get several enchants on each weapon/tool/armor.
  7055. Enchanting Basics: To enchant an item, craft an Enchantment Table, place it on the ground, right-click on it and drag an enchantable item from your inventory onto the square under the book icon. Three randomly chosen enchantments will appear on the menu on the right. The only thing you can know for sure about them is their level, which appears as a number; the foreign text is random. You can take the item off and place it on the table again for a different set of enchantments. Or, you can attempt to replace the item on the table with a stack of two or more of any other item from your inventory.
  7056. A chart showing the relative probabilities of the different enchantment levels in the bottom slot with 30 bookshelves.Once you choose an enchantment, it will be applied to your item, giving it a glow and one of the special powers detailed below, and you will lose a number of experience levels equal to the level of the enchantment. Enchantments cannot be undone (unless you repair the item, which removes enchantments) and an item can only be enchanted once (although you may receive multiple enchantments during one instance of enchanting, determined randomly).
  7057. Whenever you place an eligible item on the table, the enchantment levels available are randomly generated for each slot using the formula below. The enchantment level is dependent upon the number of nearby bookshelves (capped at 30) and a "slot factor" of 0.50 for the topmost enchantment slot, 0.66 for the middle slot, and 1.00 for the bottom slot. (If the number of bookshelves is 0, the second two random integers will always be zero. When placing bookshelves around the Enchanting Table they CANNOT be touching the table or the table will not change from 5.
  7058. Enchantment level available = (1..5 + 0..(b/2) + 0..b) �97 s, where b is the number of nearby bookshelves (maximum of 30), s is the slot factor for the given enchantment slot, and x..y generates a random integer between x and y inclusive. (Note that however many bookshelves are being used, 1 is still available as the lowest level.)
  7059. Bookshelves  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  
  7060. Max Level  5  7  8  10  11  13  14  16  17  19  20  22  23  25  26  28  29  31  32  34  35  37  38  40  41  43  44  46  47  49  50
  7061. Bookshelf Placement: Nearby bookshelves increase the level of enchantments further. As of Beta 1.9 Pre-release 4, no enchantments costing above five Experience levels are available unless you place bookshelves near the Enchantment Table. In order to have an effect, a bookshelf must be placed within 2 blocks, laterally, of the enchantment table and be on the same level or one block height above the table. A bookshelf generally has to have a line of sight to the table, although bookshelves placed on the corners of a square will still have an effect. An enchantment table can be surrounded by 30 bookshelves by placing them in a square around the table, with each wall measuring 5 blocks wide and 2 blocks high, with a 2 block high doorway. This arrangement gives access to level 50 recipes.
  7062. Trivia:The Feather Falling enchantment could be from the Dungeons & Dragons wizard spell of the same name.
  7063. Looting enchantment does not process on Wool, Spider Eye, Raw Chicken and Cooked Chicken.
  7064. Items that are enchanted will receive a glowing aura around them. Editing glint.png in .minecraft\bin\minecraft.jar\misc can change the glow accordingly. Enchanted items also cause the hotbar to become semi-transparent whilst they are the selected item. The hotbar will revert to its opaque format when you select a new item.
  7065. Repairing an enchanted item using another item will remove the enchantment it has.
  7066. On October 1st 2011, Notch tweeted an image of the enchantment screen, with enchantments written in the Standard Galactic Alphabet.[12] The first enchantment translates onto "Well Played Internets You Are Good", the second translated into "These Names Will Be Random And Confusing", and the third translates to "Each Spell Costs Experience Levels". The Standard Galactic Alphabet or SGA was originally created by Tom Hall for use in the Commander Keen series of computer games.[13]
  7067. Three of the possible words for enchantments are "the elder scrolls," likely a joke at Bethesda, creator of "The Elder Scrolls" series and whose parent company, Zenimax, was suing Mojang.
  7068. The words "klaatu berata niktu" are a (misspelled) reference to "Klaatu barada nikto", a phrase that originates from the 1951 movie The Day the Earth Stood Still and has been since used as a reference in many other movies, cartoons and games, more popularly in Army of Darkness, Star Wars Episode VI, Teenage Mutant Ninja Turtles(1987) and Duck Tales. Similarly, "Xyzzy" is a magic spell in the game "Colossal Cave Adventure" and has been used in several other games as an Easter Egg or cheat code.
  7069. "Embiggen" is a fictitious word from The Simpsons, from a quote attributed to Springfield's founder, Jebidiah Springfield: "A noble spirit embiggens the smallest man".
  7070. All tools, swords and armour enchanted before 1.9 Prerelease 4 will only have Feather Falling I as their enchantment.
  7071. The Silk Touch enchantment is possible on all levels of enchantment when enchanting a golden pickaxe, although extremely rare on enchantments below level 20.
  7072. Enchanted items still pulsate while you have paused the game
  7073. An enchanted stone shovel or pickaxe with the efficiency level of 1 will do the same efficiency as a standard stone axe
  7074. It is worth noting that when using third-party software it is possible to enchant the Bow, while it is not possible to enchant items such as minecarts, apples etc. This could mean there are future enchantments planned for the bow.
  7075. Bugs:In Beta 1.9pre4 it's possible to get Silk Touch and Fortune on the same tool. (It's a bug! --Jeb 09:58, 15 October 2011 (UTC)) (proof)
  7076. Using the "Silk Touch" enchantment, it is possible to obtain either Redstone Ore or Glowing Redstone Ore, depending on the block's state when broken. These are different blocks and do not stack, but appear to be identical in the user's inventory.
  7077. Mining gravel with a tool with Fortune IV or greater causes the game to crash.
  7078. When a normally unobtainable block is mined using the Silk Touch enchantment, the tile entity of the block is not kept. Therefore when a mob spawner is picked up, (was possible in pre-4, but was removed in pre-5) it will revert to a pig spawner.
  7079. Mining ender dragon egg with Efficiency V will crash the game.
  7080. Sometimes,logging off a server with an enchanted tool on you, will remove the enchantments from the item.
  7081. In multiplayer, players can only see their own enchantment auras, and not those of other players.
  7082. If a enchanted item is dispensed from a dispenser, the enchantment is lost.
  7083. ]])
  7084. enchanting.close()
  7085. enchantments=fs.open("mem/redworks/minepedia/enchantments","w")
  7086. enchantments.write([[Enchanting is a game mechanic that involves using an Enchantment Table to add special bonuses to tools, weapons or armor. To enchant an item, you will need the required Experience level for the enchantment and an Enchantment Table.
  7087. Notch has stated that Enchanting will work in three stages and the benefits will be based on the spell you choose, but a random loot element will be included as well.[1][2] Each spell will cost the player experience levels but in turn allows the player to enchant armor, swords and tools with one or several random bonus attributes as well as making the items glow with a brilliant hue.
  7088. History: Notch first tweeted about the Enchantment Table on September 30th 2011.[3][4]
  7089. Enchanting was added to the game in 1.9 prerelease 2. However, enchanting was not the same in the 1.9 prerelease 2. Enchanting did NOT require bookshelves to get maximum enchantments. Also, many enchantments were not added back then. Enchantments are labeled in the enchanting table as random words in the Standard Galactic Alphabet.
  7090. Enchantment names are randomly constructed from a long list of words. Three to five words are chosen from the list and appended to each other, creating the enchantment name. Any name can be chosen for any item. Note that the names are not actually saved with the item, they are only displayed in the Enchantment Table interface, albeit with the Standard Galactic Alphabet.
  7091. scrolls klaatu berata niktu xyzzy bless curse light darkness fire air earth water hot dry cold wet elder ignite snuff embiggen twist shorten stretch fiddle destroy imbue galvanize enchant free limited range of towards inside sphere cube self other ball mental physical grow shrink demon elemental spirit animal creature beast humanoid undead fresh stale
  7092. Repairing an enchanted weapon/tool will remove the enchantment on it.[6]
  7093. When an enchanted weapon deals bonus damage to a mob, circular blue particles fly off of that mob, similar to getting a critical hit.
  7094. There are several levels on most enchants, and when you enchant you can get several enchants on each weapon/tool/armor.
  7095. Enchanting Basics: To enchant an item, craft an Enchantment Table, place it on the ground, right-click on it and drag an enchantable item from your inventory onto the square under the book icon. Three randomly chosen enchantments will appear on the menu on the right. The only thing you can know for sure about them is their level, which appears as a number; the foreign text is random. You can take the item off and place it on the table again for a different set of enchantments. Or, you can attempt to replace the item on the table with a stack of two or more of any other item from your inventory.
  7096. A chart showing the relative probabilities of the different enchantment levels in the bottom slot with 30 bookshelves.Once you choose an enchantment, it will be applied to your item, giving it a glow and one of the special powers detailed below, and you will lose a number of experience levels equal to the level of the enchantment. Enchantments cannot be undone (unless you repair the item, which removes enchantments) and an item can only be enchanted once (although you may receive multiple enchantments during one instance of enchanting, determined randomly).
  7097. Whenever you place an eligible item on the table, the enchantment levels available are randomly generated for each slot using the formula below. The enchantment level is dependent upon the number of nearby bookshelves (capped at 30) and a "slot factor" of 0.50 for the topmost enchantment slot, 0.66 for the middle slot, and 1.00 for the bottom slot. (If the number of bookshelves is 0, the second two random integers will always be zero. When placing bookshelves around the Enchanting Table they CANNOT be touching the table or the table will not change from 5.
  7098. Enchantment level available = (1..5 + 0..(b/2) + 0..b) �97 s, where b is the number of nearby bookshelves (maximum of 30), s is the slot factor for the given enchantment slot, and x..y generates a random integer between x and y inclusive. (Note that however many bookshelves are being used, 1 is still available as the lowest level.)
  7099. Bookshelves  0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  
  7100. Max Level  5  7  8  10  11  13  14  16  17  19  20  22  23  25  26  28  29  31  32  34  35  37  38  40  41  43  44  46  47  49  50
  7101. Bookshelf Placement: Nearby bookshelves increase the level of enchantments further. As of Beta 1.9 Pre-release 4, no enchantments costing above five Experience levels are available unless you place bookshelves near the Enchantment Table. In order to have an effect, a bookshelf must be placed within 2 blocks, laterally, of the enchantment table and be on the same level or one block height above the table. A bookshelf generally has to have a line of sight to the table, although bookshelves placed on the corners of a square will still have an effect. An enchantment table can be surrounded by 30 bookshelves by placing them in a square around the table, with each wall measuring 5 blocks wide and 2 blocks high, with a 2 block high doorway. This arrangement gives access to level 50 recipes.
  7102. Trivia:The Feather Falling enchantment could be from the Dungeons & Dragons wizard spell of the same name.
  7103. Looting enchantment does not process on Wool, Spider Eye, Raw Chicken and Cooked Chicken.
  7104. Items that are enchanted will receive a glowing aura around them. Editing glint.png in .minecraft\bin\minecraft.jar\misc can change the glow accordingly. Enchanted items also cause the hotbar to become semi-transparent whilst they are the selected item. The hotbar will revert to its opaque format when you select a new item.
  7105. Repairing an enchanted item using another item will remove the enchantment it has.
  7106. On October 1st 2011, Notch tweeted an image of the enchantment screen, with enchantments written in the Standard Galactic Alphabet.[12] The first enchantment translates onto "Well Played Internets You Are Good", the second translated into "These Names Will Be Random And Confusing", and the third translates to "Each Spell Costs Experience Levels". The Standard Galactic Alphabet or SGA was originally created by Tom Hall for use in the Commander Keen series of computer games.[13]
  7107. Three of the possible words for enchantments are "the elder scrolls," likely a joke at Bethesda, creator of "The Elder Scrolls" series and whose parent company, Zenimax, was suing Mojang.
  7108. The words "klaatu berata niktu" are a (misspelled) reference to "Klaatu barada nikto", a phrase that originates from the 1951 movie The Day the Earth Stood Still and has been since used as a reference in many other movies, cartoons and games, more popularly in Army of Darkness, Star Wars Episode VI, Teenage Mutant Ninja Turtles(1987) and Duck Tales. Similarly, "Xyzzy" is a magic spell in the game "Colossal Cave Adventure" and has been used in several other games as an Easter Egg or cheat code.
  7109. "Embiggen" is a fictitious word from The Simpsons, from a quote attributed to Springfield's founder, Jebidiah Springfield: "A noble spirit embiggens the smallest man".
  7110. All tools, swords and armour enchanted before 1.9 Prerelease 4 will only have Feather Falling I as their enchantment.
  7111. The Silk Touch enchantment is possible on all levels of enchantment when enchanting a golden pickaxe, although extremely rare on enchantments below level 20.
  7112. Enchanted items still pulsate while you have paused the game
  7113. An enchanted stone shovel or pickaxe with the efficiency level of 1 will do the same efficiency as a standard stone axe
  7114. It is worth noting that when using third-party software it is possible to enchant the Bow, while it is not possible to enchant items such as minecarts, apples etc. This could mean there are future enchantments planned for the bow.
  7115. Bugs:In Beta 1.9pre4 it's possible to get Silk Touch and Fortune on the same tool. (It's a bug! --Jeb 09:58, 15 October 2011 (UTC)) (proof)
  7116. Using the "Silk Touch" enchantment, it is possible to obtain either Redstone Ore or Glowing Redstone Ore, depending on the block's state when broken. These are different blocks and do not stack, but appear to be identical in the user's inventory.
  7117. Mining gravel with a tool with Fortune IV or greater causes the game to crash.
  7118. When a normally unobtainable block is mined using the Silk Touch enchantment, the tile entity of the block is not kept. Therefore when a mob spawner is picked up, (was possible in pre-4, but was removed in pre-5) it will revert to a pig spawner.
  7119. Mining ender dragon egg with Efficiency V will crash the game.
  7120. Sometimes,logging off a server with an enchanted tool on you, will remove the enchantments from the item.
  7121. In multiplayer, players can only see their own enchantment auras, and not those of other players.
  7122. If a enchanted item is dispensed from a dispenser, the enchantment is lost.
  7123. ]])
  7124. enchantments.close()
  7125. _end=fs.open("mem/redworks/minepedia/end","w")
  7126. _end.write([[The End is a stark, empty plane containing a series of large floating islands of End Stone dotted with Obsidian Spikes. The End Stone is dropped normally when mined. This dimension is populated by a relatively large number of Endermen, which spawn considerably more than in the Overworld, and one Enderdragon, an End exclusive mob. The starless sky and Void are both composed of a dark static pattern, but there are still particle effects within the Void area.
  7127. The day/night cycle is absent in the End, similar to the Nether, being replaced by a constant dim light. Most items and blocks (including Fluids) function in the End exactly as they do in the Overworld, with a few notable exceptions. Compasses will be unable to find the original spawn point, as always when entering any dimension other than the Overworld, and Clocks cannot determine the position of the sun (the arrows and dials will instead spin and flail randomly). Maps don't seem to map correctly, only mapping static; Beds will explode and cause fire when used, and portals to the Nether will not activate in the End.
  7128. As of 1.0, the enderdragon will spawn naturally and float around above a number of obsidian pillars, each of which has an Ender Crystal on top of of them, these crystals appear to regenerate the Enderdragon's health, and as such it is almost impossible to kill the Enderdragon with them active. To destroy these crystals you need to climb all the way to the top of each individual pillar and destroy them, however they explode on destruction so caution is advised. You can also shoot them with a bow and arrow. Once destroyed the Enderdragon will be vulnerable, however defeating it is still almost impossible, the best strategy is to simply climb to the top of a pillar and open fire with a bow and arrow. At the top of the screen it shows the Enderdragon's health. When defeated the Enderdragon will dissolve as seen before and create a shrine of bedrock below it, on top of it there is an Enderdragon egg. Below the egg are four torches and a "pool" of what appears to be the End portal, however when entered it will begin the "End Poem" and the credits will roll shortly afterwards, thus ending the game and earning the player the "The End" achievement.
  7129. The player then respawns in the Overworld and may return to The End through the same portal. The End remains in the state as the player left after the Enderdragon is slain, devoid of any Enderdragon and featuring the portal back to the Overworld.
  7130. Travelling to End: The End is a stark, empty plane containing a series of large floating islands of End Stone dotted with Obsidian Spikes. The End Stone is dropped normally when mined. This dimension is populated by a relatively large number of Endermen, which spawn considerably more than in the Overworld, and one Enderdragon, an End exclusive mob. The starless sky and Void are both composed of a dark static pattern, but there are still particle effects within the Void area.
  7131. The day/night cycle is absent in the End, similar to the Nether, being replaced by a constant dim light. Most items and blocks (including Fluids) function in the End exactly as they do in the Overworld, with a few notable exceptions. Compasses will be unable to find the original spawn point, as always when entering any dimension other than the Overworld, and Clocks cannot determine the position of the sun (the arrows and dials will instead spin and flail randomly). Maps don't seem to map correctly, only mapping static; Beds will explode and cause fire when used, and portals to the Nether will not activate in the End.
  7132. As of 1.0, the enderdragon will spawn naturally and float around above a number of obsidian pillars, each of which has an Ender Crystal on top of of them, these crystals appear to regenerate the Enderdragon's health, and as such it is almost impossible to kill the Enderdragon with them active. To destroy these crystals you need to climb all the way to the top of each individual pillar and destroy them, however they explode on destruction so caution is advised. You can also shoot them with a bow and arrow. Once destroyed the Enderdragon will be vulnerable, however defeating it is still almost impossible, the best strategy is to simply climb to the top of a pillar and open fire with a bow and arrow. At the top of the screen it shows the Enderdragon's health. When defeated the Enderdragon will dissolve as seen before and create a shrine of bedrock below it, on top of it there is an Enderdragon egg. Below the egg are four torches and a "pool" of what appears to be the End portal, however when entered it will begin the "End Poem" and the credits will roll shortly afterwards, thus ending the game and earning the player the "The End" achievement.
  7133. The player then respawns in the Overworld and may return to The End through the same portal. The End remains in the state as the player left after the Enderdragon is slain, devoid of any Enderdragon and featuring the portal back to the Overworld.
  7134. History: In an earlier stage of development, The End was known as the Sky Dimension and had Overworld blocks and mobs.[2]
  7135. Notch first mentioned The End with his comment regarding the name-change petition of the Endermen, when people wanted to change the name of the mob to "Farlanders" (a reference to the area nicknamed the Far Lands). He joked that instead of renaming them Farlanders, he was more likely to change the name of the Far Lands to "The End". In later Beta versions, the Far Lands were accidentally removed and The End became the native land of the Endermen.
  7136. The End was added in Beta 1.9pre4 on October 13th, 2011. Notch tweeted "raqreqentba", which could be decoded using the ROT13 cypher, translating to "enderdragon." A Reddit user under the name of "cptqwashi" posted the idea that the new dimension accessed by the new "Crystal Block Portal" would be called the Ender, and would be home to the Endermen and Enderdragons.[3] Notch soon gave more information and said that cptqwashi was "100% correct," mentioning that it would be called "The Ender" and that there would be Enderdragons.[4] However, it was later revealed that it was just called "The End" and that there would be only one Enderdragon there.[5] In 1.9pre4, an Enderdragon spawned near a portal would destroy it, but End Portal blocks would continue to function even if the frame was destroyed. The ability to create Ender Portal frame blocks in Creative Singleplayer mode was also removed.
  7137. File Save Location: The End is saved in the same way normal worlds are, but instead of mixing the world files inside the save folder, the files for The End are stored in appdata/.Minecraft/Saves/Worldname/DIM1, whereas normal world files in %appdata%/.Minecraft/Saves/Worldname. Note that DIM1 does not contain its own level.dat, as the same level.dat in the upper folder is used for the Overworld, the Nether, and the End. Also, note that the Nether's folder is "DIM-1".'
  7138. End Poem:The End Poem appears to be an exposition of Notch's monistic perennial philosophy which is shown to the player upon completing the game. The speakers of the poem are thought by some to be Endermen (see the talk page for discussion.) The End Poem is approximately 9 minutes and 28 seconds. I see the player you mean.
  7139. [Player Name]?
  7140. Yes. Take care. It has reached a higher level now. It can read our thoughts.
  7141. That doesn't matter. It thinks we are part of the game.
  7142. I like this player. It played well. It did not give up.
  7143. It is reading our thoughts as though they were words on a screen.
  7144. That is how it chooses to imagine many things, when it is deep in the dream of a game.
  7145. Words make a wonderful interface. Very flexible. And less terrifying than staring at the reality behind the screen.
  7146. They used to hear voices. Before players could read. Back in the days when those who did not play called the players witches, and warlocks. And players dreamed they flew through the air, on sticks powered by demons.
  7147. What did this player dream?
  7148. This player dreamed of sunlight and trees. Of fire and water. It dreamed it created. And it dreamed it destroyed. It dreamed it hunted, and was hunted. It dreamed of shelter.
  7149. Hah, the original interface. A million years old, and it still works. But what true structure did this player create, in the reality behind the screen?
  7150. It worked, with a million others, to sculpt a true world in a fold of the [scrambled], and created a [scrambled] for [scrambled], in the [scrambled].
  7151. It cannot read that thought.
  7152. No. It has not yet achieved the highest level. That, it must achieve in the long dream of life, not the short dream of a game.
  7153. Does it know that we love it? That the universe is kind?
  7154. Sometimes, through the noise of its thoughts, it hears the universe, yes.
  7155. But there are times it is sad, in the long dream. It creates worlds that have no summer, and it shivers under a black sun, and it takes its sad creation for reality.
  7156. To cure it of sorrow would destroy it. The sorrow is part of its own private task. We cannot interfere.
  7157. Sometimes when they are deep in dreams, I want to tell them, they are building true worlds in reality. Sometimes I want to tell them of their importance to the universe. Sometimes, when they have not made a true connection in a while, I want to help them to speak the word they fear.
  7158. It reads our thoughts.
  7159. Sometimes I do not care. Sometimes I wish to tell them, this world you take for truth is merely [scrambled] and [scrambled], I wish to tell them that they are [scrambled] in the [scrambled]. They see so little of reality, in their long dream.
  7160. And yet they play the game.
  7161. But it would be so easy to tell them...
  7162. Too strong for this dream. To tell them how to live is to prevent them living.
  7163. I will not tell the player how to live.
  7164. The player is growing restless.
  7165. I will tell the player a story.
  7166. But not the truth.
  7167. No. A story that contains the truth safely, in a cage of words. Not the naked truth that can burn over any distance.
  7168. Give it a body, again.
  7169. Yes. Player...
  7170. Use its name.
  7171. [Player Name]. Player of games.
  7172. Good.
  7173. Take a breath, now. Take another. Feel air in your lungs. Let your limbs return. Yes, move your fingers. Have a body again, under gravity, in air. Respawn in the long dream. There you are. Your body touching the universe again at every point, as though you were separate things. As though we were separate things.
  7174. Who are we? Once we were called the spirit of the mountain. Father sun, mother moon. Ancestral spirits, animal spirits. Jinn. Ghosts. The green man. Then gods, demons. Angels. Poltergeists. Aliens, extraterrestrials. Leptons, quarks. The words change. We do not change.
  7175. We are the universe. We are everything you think isn't you. You are looking at us now, through your skin and your eyes. And why does the universe touch your skin, and throw light on you? To see you, player. To know you. And to be known. I shall tell you a story.
  7176. Once upon a time, there was a player.
  7177. The player was you, [Player Name].
  7178. Sometimes it thought itself human, on the thin crust of a spinning globe of molten rock. The ball of molten rock circled a ball of blazing gas that was three hundred and thirty thousand times more massive than it. They were so far apart that light took eight minutes to cross the gap. The light was information from a star, and it could burn your skin from a hundred and fifty million kilometres away.
  7179. Sometimes the player dreamed it was a miner, on the surface of a world that was flat, and infinite. The sun was a square of white. The days were short; there was much to do; and death was a temporary inconvenience.
  7180. Sometimes the player dreamed it was lost in a story.
  7181. Sometimes the player dreamed it was other things, in other places. Sometimes these dreams were disturbing. Sometimes very beautiful indeed. Sometimes the player woke from one dream into another, then woke from that into a third.
  7182. Sometimes the player dreamed it watched words on a screen.
  7183. Let's go back.
  7184. The atoms of the player were scattered in the grass, in the rivers, in the air, in the ground. A woman gathered the atoms; she drank and ate and inhaled; and the woman assembled the player, in her body.
  7185. And the player awoke, from the warm, dark world of its mother's body, into the long dream.
  7186. And the player was a new story, never told before, written in letters of DNA. And the player was a new program, never run before, generated by a sourcecode a billion years old. And the player was a new human, never alive before, made from nothing but milk and love.
  7187. You are the player. The story. The program. The human. Made from nothing but milk and love.
  7188. Let's go further back.
  7189. The seven billion billion billion atoms of the player's body were created, long before this game, in the heart of a star. So the player, too, is information from a star. And the player moves through a story, which is a forest of information planted by a man called Julian, on a flat, infinite world created by a man called Markus, that exists inside a small, private world created by the player, who inhabits a universe created by...
  7190. Shush. Sometimes the player created a small, private world that was soft and warm and simple. Sometimes hard, and cold, and complicated. Sometimes it built a model of the universe in its head; flecks of energy, moving through vast empty spaces. Sometimes it called those flecks "electrons" and "protons".
  7191. Sometimes it called them "planets" and "stars".
  7192. Sometimes it believed it was in a universe that was made of energy that was made of offs and ons; zeros and ones; lines of code. Sometimes it believed it was playing a game. Sometimes it believed it was reading words on a screen.
  7193. You are the player, reading words...
  7194. Shush... Sometimes the player read lines of code on a screen. Decoded them into words; decoded words into meaning; decoded meaning into feelings, emotions, theories, ideas, and the player started to breathe faster and deeper and realised it was alive, it was alive, those thousand deaths had not been real, the player was alive
  7195. You. You. You are alive.
  7196. and sometimes the player believed the universe had spoken to it through the sunlight that came through the shuffling leaves of the summer trees
  7197. and sometimes the player believed the universe had spoken to it through the light that fell from the crisp night sky of winter, where a fleck of light in the corner of the player's eye might be a star a million times as massive as the sun, boiling its planets to plasma in order to be visible for a moment to the player, walking home at the far side of the universe, suddenly smelling food, almost at the familiar door, about to dream again
  7198. and sometimes the player believed the universe had spoken to it through the zeros and ones, through the electricity of the world, through the scrolling words on a screen at the end of a dream
  7199. and the universe said I love you
  7200. and the universe said you have played the game well
  7201. and the universe said everything you need is within you
  7202. and the universe said you are stronger than you know
  7203. and the universe said you are the daylight
  7204. and the universe said you are the night
  7205. and the universe said the darkness you fight is within you
  7206. and the universe said the light you seek is within you
  7207. and the universe said you are not alone
  7208. and the universe said you are not separate from every other thing
  7209. and the universe said you are the universe tasting itself, talking to itself, reading its own code
  7210. and the universe said I love you because you are love.
  7211. And the game was over and the player woke up from the dream. And the player began a new dream. And the player dreamed again, dreamed better. And the player was the universe. And the player was love.
  7212. You are the player.
  7213. Wake up.
  7214. When an End portal is made in the end (or via defeating the Enderdragon) a strange glitch occurs making the glint of the End portal appear at a distance in the exact shape of the portal.
  7215. Going through a the End portal while in a minecart causes you to go through the portal, possibly into the lava below.
  7216. Quitting the game while in the End without killing the ender dragon will sometimes make multiple dragons spawn.
  7217. Quitting the game while viewing the credits or poem will make the player re-spawn in the End the next time they enter that world.
  7218. The End portal block can only be placed in the normal world dimension, and in the Nether and End, will disappear, however a Nether portal block can be placed in the End.
  7219. ]])
  7220. _end.close()
  7221. end_realm=fs.open("mem/redworks/minepedia/end realm","w")
  7222. end_realm.write([[The End is a stark, empty plane containing a series of large floating islands of End Stone dotted with Obsidian Spikes. The End Stone is dropped normally when mined. This dimension is populated by a relatively large number of Endermen, which spawn considerably more than in the Overworld, and one Enderdragon, an End exclusive mob. The starless sky and Void are both composed of a dark static pattern, but there are still particle effects within the Void area.
  7223. The day/night cycle is absent in the End, similar to the Nether, being replaced by a constant dim light. Most items and blocks (including Fluids) function in the End exactly as they do in the Overworld, with a few notable exceptions. Compasses will be unable to find the original spawn point, as always when entering any dimension other than the Overworld, and Clocks cannot determine the position of the sun (the arrows and dials will instead spin and flail randomly). Maps don't seem to map correctly, only mapping static; Beds will explode and cause fire when used, and portals to the Nether will not activate in the End.
  7224. As of 1.0, the enderdragon will spawn naturally and float around above a number of obsidian pillars, each of which has an Ender Crystal on top of of them, these crystals appear to regenerate the Enderdragon's health, and as such it is almost impossible to kill the Enderdragon with them active. To destroy these crystals you need to climb all the way to the top of each individual pillar and destroy them, however they explode on destruction so caution is advised. You can also shoot them with a bow and arrow. Once destroyed the Enderdragon will be vulnerable, however defeating it is still almost impossible, the best strategy is to simply climb to the top of a pillar and open fire with a bow and arrow. At the top of the screen it shows the Enderdragon's health. When defeated the Enderdragon will dissolve as seen before and create a shrine of bedrock below it, on top of it there is an Enderdragon egg. Below the egg are four torches and a "pool" of what appears to be the End portal, however when entered it will begin the "End Poem" and the credits will roll shortly afterwards, thus ending the game and earning the player the "The End" achievement.
  7225. The player then respawns in the Overworld and may return to The End through the same portal. The End remains in the state as the player left after the Enderdragon is slain, devoid of any Enderdragon and featuring the portal back to the Overworld.
  7226. Travelling to End: The End is a stark, empty plane containing a series of large floating islands of End Stone dotted with Obsidian Spikes. The End Stone is dropped normally when mined. This dimension is populated by a relatively large number of Endermen, which spawn considerably more than in the Overworld, and one Enderdragon, an End exclusive mob. The starless sky and Void are both composed of a dark static pattern, but there are still particle effects within the Void area.
  7227. The day/night cycle is absent in the End, similar to the Nether, being replaced by a constant dim light. Most items and blocks (including Fluids) function in the End exactly as they do in the Overworld, with a few notable exceptions. Compasses will be unable to find the original spawn point, as always when entering any dimension other than the Overworld, and Clocks cannot determine the position of the sun (the arrows and dials will instead spin and flail randomly). Maps don't seem to map correctly, only mapping static; Beds will explode and cause fire when used, and portals to the Nether will not activate in the End.
  7228. As of 1.0, the enderdragon will spawn naturally and float around above a number of obsidian pillars, each of which has an Ender Crystal on top of of them, these crystals appear to regenerate the Enderdragon's health, and as such it is almost impossible to kill the Enderdragon with them active. To destroy these crystals you need to climb all the way to the top of each individual pillar and destroy them, however they explode on destruction so caution is advised. You can also shoot them with a bow and arrow. Once destroyed the Enderdragon will be vulnerable, however defeating it is still almost impossible, the best strategy is to simply climb to the top of a pillar and open fire with a bow and arrow. At the top of the screen it shows the Enderdragon's health. When defeated the Enderdragon will dissolve as seen before and create a shrine of bedrock below it, on top of it there is an Enderdragon egg. Below the egg are four torches and a "pool" of what appears to be the End portal, however when entered it will begin the "End Poem" and the credits will roll shortly afterwards, thus ending the game and earning the player the "The End" achievement.
  7229. The player then respawns in the Overworld and may return to The End through the same portal. The End remains in the state as the player left after the Enderdragon is slain, devoid of any Enderdragon and featuring the portal back to the Overworld.
  7230. History: In an earlier stage of development, The End was known as the Sky Dimension and had Overworld blocks and mobs.[2]
  7231. Notch first mentioned The End with his comment regarding the name-change petition of the Endermen, when people wanted to change the name of the mob to "Farlanders" (a reference to the area nicknamed the Far Lands). He joked that instead of renaming them Farlanders, he was more likely to change the name of the Far Lands to "The End". In later Beta versions, the Far Lands were accidentally removed and The End became the native land of the Endermen.
  7232. The End was added in Beta 1.9pre4 on October 13th, 2011. Notch tweeted "raqreqentba", which could be decoded using the ROT13 cypher, translating to "enderdragon." A Reddit user under the name of "cptqwashi" posted the idea that the new dimension accessed by the new "Crystal Block Portal" would be called the Ender, and would be home to the Endermen and Enderdragons.[3] Notch soon gave more information and said that cptqwashi was "100% correct," mentioning that it would be called "The Ender" and that there would be Enderdragons.[4] However, it was later revealed that it was just called "The End" and that there would be only one Enderdragon there.[5] In 1.9pre4, an Enderdragon spawned near a portal would destroy it, but End Portal blocks would continue to function even if the frame was destroyed. The ability to create Ender Portal frame blocks in Creative Singleplayer mode was also removed.
  7233. File Save Location: The End is saved in the same way normal worlds are, but instead of mixing the world files inside the save folder, the files for The End are stored in appdata/.Minecraft/Saves/Worldname/DIM1, whereas normal world files in %appdata%/.Minecraft/Saves/Worldname. Note that DIM1 does not contain its own level.dat, as the same level.dat in the upper folder is used for the Overworld, the Nether, and the End. Also, note that the Nether's folder is "DIM-1".'
  7234. End Poem:The End Poem appears to be an exposition of Notch's monistic perennial philosophy which is shown to the player upon completing the game. The speakers of the poem are thought by some to be Endermen (see the talk page for discussion.) The End Poem is approximately 9 minutes and 28 seconds. I see the player you mean.
  7235. [Player Name]?
  7236. Yes. Take care. It has reached a higher level now. It can read our thoughts.
  7237. That doesn't matter. It thinks we are part of the game.
  7238. I like this player. It played well. It did not give up.
  7239. It is reading our thoughts as though they were words on a screen.
  7240. That is how it chooses to imagine many things, when it is deep in the dream of a game.
  7241. Words make a wonderful interface. Very flexible. And less terrifying than staring at the reality behind the screen.
  7242. They used to hear voices. Before players could read. Back in the days when those who did not play called the players witches, and warlocks. And players dreamed they flew through the air, on sticks powered by demons.
  7243. What did this player dream?
  7244. This player dreamed of sunlight and trees. Of fire and water. It dreamed it created. And it dreamed it destroyed. It dreamed it hunted, and was hunted. It dreamed of shelter.
  7245. Hah, the original interface. A million years old, and it still works. But what true structure did this player create, in the reality behind the screen?
  7246. It worked, with a million others, to sculpt a true world in a fold of the [scrambled], and created a [scrambled] for [scrambled], in the [scrambled].
  7247. It cannot read that thought.
  7248. No. It has not yet achieved the highest level. That, it must achieve in the long dream of life, not the short dream of a game.
  7249. Does it know that we love it? That the universe is kind?
  7250. Sometimes, through the noise of its thoughts, it hears the universe, yes.
  7251. But there are times it is sad, in the long dream. It creates worlds that have no summer, and it shivers under a black sun, and it takes its sad creation for reality.
  7252. To cure it of sorrow would destroy it. The sorrow is part of its own private task. We cannot interfere.
  7253. Sometimes when they are deep in dreams, I want to tell them, they are building true worlds in reality. Sometimes I want to tell them of their importance to the universe. Sometimes, when they have not made a true connection in a while, I want to help them to speak the word they fear.
  7254. It reads our thoughts.
  7255. Sometimes I do not care. Sometimes I wish to tell them, this world you take for truth is merely [scrambled] and [scrambled], I wish to tell them that they are [scrambled] in the [scrambled]. They see so little of reality, in their long dream.
  7256. And yet they play the game.
  7257. But it would be so easy to tell them...
  7258. Too strong for this dream. To tell them how to live is to prevent them living.
  7259. I will not tell the player how to live.
  7260. The player is growing restless.
  7261. I will tell the player a story.
  7262. But not the truth.
  7263. No. A story that contains the truth safely, in a cage of words. Not the naked truth that can burn over any distance.
  7264. Give it a body, again.
  7265. Yes. Player...
  7266. Use its name.
  7267. [Player Name]. Player of games.
  7268. Good.
  7269. Take a breath, now. Take another. Feel air in your lungs. Let your limbs return. Yes, move your fingers. Have a body again, under gravity, in air. Respawn in the long dream. There you are. Your body touching the universe again at every point, as though you were separate things. As though we were separate things.
  7270. Who are we? Once we were called the spirit of the mountain. Father sun, mother moon. Ancestral spirits, animal spirits. Jinn. Ghosts. The green man. Then gods, demons. Angels. Poltergeists. Aliens, extraterrestrials. Leptons, quarks. The words change. We do not change.
  7271. We are the universe. We are everything you think isn't you. You are looking at us now, through your skin and your eyes. And why does the universe touch your skin, and throw light on you? To see you, player. To know you. And to be known. I shall tell you a story.
  7272. Once upon a time, there was a player.
  7273. The player was you, [Player Name].
  7274. Sometimes it thought itself human, on the thin crust of a spinning globe of molten rock. The ball of molten rock circled a ball of blazing gas that was three hundred and thirty thousand times more massive than it. They were so far apart that light took eight minutes to cross the gap. The light was information from a star, and it could burn your skin from a hundred and fifty million kilometres away.
  7275. Sometimes the player dreamed it was a miner, on the surface of a world that was flat, and infinite. The sun was a square of white. The days were short; there was much to do; and death was a temporary inconvenience.
  7276. Sometimes the player dreamed it was lost in a story.
  7277. Sometimes the player dreamed it was other things, in other places. Sometimes these dreams were disturbing. Sometimes very beautiful indeed. Sometimes the player woke from one dream into another, then woke from that into a third.
  7278. Sometimes the player dreamed it watched words on a screen.
  7279. Let's go back.
  7280. The atoms of the player were scattered in the grass, in the rivers, in the air, in the ground. A woman gathered the atoms; she drank and ate and inhaled; and the woman assembled the player, in her body.
  7281. And the player awoke, from the warm, dark world of its mother's body, into the long dream.
  7282. And the player was a new story, never told before, written in letters of DNA. And the player was a new program, never run before, generated by a sourcecode a billion years old. And the player was a new human, never alive before, made from nothing but milk and love.
  7283. You are the player. The story. The program. The human. Made from nothing but milk and love.
  7284. Let's go further back.
  7285. The seven billion billion billion atoms of the player's body were created, long before this game, in the heart of a star. So the player, too, is information from a star. And the player moves through a story, which is a forest of information planted by a man called Julian, on a flat, infinite world created by a man called Markus, that exists inside a small, private world created by the player, who inhabits a universe created by...
  7286. Shush. Sometimes the player created a small, private world that was soft and warm and simple. Sometimes hard, and cold, and complicated. Sometimes it built a model of the universe in its head; flecks of energy, moving through vast empty spaces. Sometimes it called those flecks "electrons" and "protons".
  7287. Sometimes it called them "planets" and "stars".
  7288. Sometimes it believed it was in a universe that was made of energy that was made of offs and ons; zeros and ones; lines of code. Sometimes it believed it was playing a game. Sometimes it believed it was reading words on a screen.
  7289. You are the player, reading words...
  7290. Shush... Sometimes the player read lines of code on a screen. Decoded them into words; decoded words into meaning; decoded meaning into feelings, emotions, theories, ideas, and the player started to breathe faster and deeper and realised it was alive, it was alive, those thousand deaths had not been real, the player was alive
  7291. You. You. You are alive.
  7292. and sometimes the player believed the universe had spoken to it through the sunlight that came through the shuffling leaves of the summer trees
  7293. and sometimes the player believed the universe had spoken to it through the light that fell from the crisp night sky of winter, where a fleck of light in the corner of the player's eye might be a star a million times as massive as the sun, boiling its planets to plasma in order to be visible for a moment to the player, walking home at the far side of the universe, suddenly smelling food, almost at the familiar door, about to dream again
  7294. and sometimes the player believed the universe had spoken to it through the zeros and ones, through the electricity of the world, through the scrolling words on a screen at the end of a dream
  7295. and the universe said I love you
  7296. and the universe said you have played the game well
  7297. and the universe said everything you need is within you
  7298. and the universe said you are stronger than you know
  7299. and the universe said you are the daylight
  7300. and the universe said you are the night
  7301. and the universe said the darkness you fight is within you
  7302. and the universe said the light you seek is within you
  7303. and the universe said you are not alone
  7304. and the universe said you are not separate from every other thing
  7305. and the universe said you are the universe tasting itself, talking to itself, reading its own code
  7306. and the universe said I love you because you are love.
  7307. And the game was over and the player woke up from the dream. And the player began a new dream. And the player dreamed again, dreamed better. And the player was the universe. And the player was love.
  7308. You are the player.
  7309. Wake up.
  7310. When an End portal is made in the end (or via defeating the Enderdragon) a strange glitch occurs making the glint of the End portal appear at a distance in the exact shape of the portal.
  7311. Going through a the End portal while in a minecart causes you to go through the portal, possibly into the lava below.
  7312. Quitting the game while in the End without killing the ender dragon will sometimes make multiple dragons spawn.
  7313. Quitting the game while viewing the credits or poem will make the player re-spawn in the End the next time they enter that world.
  7314. The End portal block can only be placed in the normal world dimension, and in the Nether and End, will disappear, however a Nether portal block can be placed in the End.
  7315. ]])
  7316. end_realm.close()
  7317. ender_realm=fs.open("mem/redworks/minepedia/ender realm","w")
  7318. ender_realm.write([[The End is a stark, empty plane containing a series of large floating islands of End Stone dotted with Obsidian Spikes. The End Stone is dropped normally when mined. This dimension is populated by a relatively large number of Endermen, which spawn considerably more than in the Overworld, and one Enderdragon, an End exclusive mob. The starless sky and Void are both composed of a dark static pattern, but there are still particle effects within the Void area.
  7319. The day/night cycle is absent in the End, similar to the Nether, being replaced by a constant dim light. Most items and blocks (including Fluids) function in the End exactly as they do in the Overworld, with a few notable exceptions. Compasses will be unable to find the original spawn point, as always when entering any dimension other than the Overworld, and Clocks cannot determine the position of the sun (the arrows and dials will instead spin and flail randomly). Maps don't seem to map correctly, only mapping static; Beds will explode and cause fire when used, and portals to the Nether will not activate in the End.
  7320. As of 1.0, the enderdragon will spawn naturally and float around above a number of obsidian pillars, each of which has an Ender Crystal on top of of them, these crystals appear to regenerate the Enderdragon's health, and as such it is almost impossible to kill the Enderdragon with them active. To destroy these crystals you need to climb all the way to the top of each individual pillar and destroy them, however they explode on destruction so caution is advised. You can also shoot them with a bow and arrow. Once destroyed the Enderdragon will be vulnerable, however defeating it is still almost impossible, the best strategy is to simply climb to the top of a pillar and open fire with a bow and arrow. At the top of the screen it shows the Enderdragon's health. When defeated the Enderdragon will dissolve as seen before and create a shrine of bedrock below it, on top of it there is an Enderdragon egg. Below the egg are four torches and a "pool" of what appears to be the End portal, however when entered it will begin the "End Poem" and the credits will roll shortly afterwards, thus ending the game and earning the player the "The End" achievement.
  7321. The player then respawns in the Overworld and may return to The End through the same portal. The End remains in the state as the player left after the Enderdragon is slain, devoid of any Enderdragon and featuring the portal back to the Overworld.
  7322. Travelling to End: The End is a stark, empty plane containing a series of large floating islands of End Stone dotted with Obsidian Spikes. The End Stone is dropped normally when mined. This dimension is populated by a relatively large number of Endermen, which spawn considerably more than in the Overworld, and one Enderdragon, an End exclusive mob. The starless sky and Void are both composed of a dark static pattern, but there are still particle effects within the Void area.
  7323. The day/night cycle is absent in the End, similar to the Nether, being replaced by a constant dim light. Most items and blocks (including Fluids) function in the End exactly as they do in the Overworld, with a few notable exceptions. Compasses will be unable to find the original spawn point, as always when entering any dimension other than the Overworld, and Clocks cannot determine the position of the sun (the arrows and dials will instead spin and flail randomly). Maps don't seem to map correctly, only mapping static; Beds will explode and cause fire when used, and portals to the Nether will not activate in the End.
  7324. As of 1.0, the enderdragon will spawn naturally and float around above a number of obsidian pillars, each of which has an Ender Crystal on top of of them, these crystals appear to regenerate the Enderdragon's health, and as such it is almost impossible to kill the Enderdragon with them active. To destroy these crystals you need to climb all the way to the top of each individual pillar and destroy them, however they explode on destruction so caution is advised. You can also shoot them with a bow and arrow. Once destroyed the Enderdragon will be vulnerable, however defeating it is still almost impossible, the best strategy is to simply climb to the top of a pillar and open fire with a bow and arrow. At the top of the screen it shows the Enderdragon's health. When defeated the Enderdragon will dissolve as seen before and create a shrine of bedrock below it, on top of it there is an Enderdragon egg. Below the egg are four torches and a "pool" of what appears to be the End portal, however when entered it will begin the "End Poem" and the credits will roll shortly afterwards, thus ending the game and earning the player the "The End" achievement.
  7325. The player then respawns in the Overworld and may return to The End through the same portal. The End remains in the state as the player left after the Enderdragon is slain, devoid of any Enderdragon and featuring the portal back to the Overworld.
  7326. History: In an earlier stage of development, The End was known as the Sky Dimension and had Overworld blocks and mobs.[2]
  7327. Notch first mentioned The End with his comment regarding the name-change petition of the Endermen, when people wanted to change the name of the mob to "Farlanders" (a reference to the area nicknamed the Far Lands). He joked that instead of renaming them Farlanders, he was more likely to change the name of the Far Lands to "The End". In later Beta versions, the Far Lands were accidentally removed and The End became the native land of the Endermen.
  7328. The End was added in Beta 1.9pre4 on October 13th, 2011. Notch tweeted "raqreqentba", which could be decoded using the ROT13 cypher, translating to "enderdragon." A Reddit user under the name of "cptqwashi" posted the idea that the new dimension accessed by the new "Crystal Block Portal" would be called the Ender, and would be home to the Endermen and Enderdragons.[3] Notch soon gave more information and said that cptqwashi was "100% correct," mentioning that it would be called "The Ender" and that there would be Enderdragons.[4] However, it was later revealed that it was just called "The End" and that there would be only one Enderdragon there.[5] In 1.9pre4, an Enderdragon spawned near a portal would destroy it, but End Portal blocks would continue to function even if the frame was destroyed. The ability to create Ender Portal frame blocks in Creative Singleplayer mode was also removed.
  7329. File Save Location: The End is saved in the same way normal worlds are, but instead of mixing the world files inside the save folder, the files for The End are stored in appdata/.Minecraft/Saves/Worldname/DIM1, whereas normal world files in %appdata%/.Minecraft/Saves/Worldname. Note that DIM1 does not contain its own level.dat, as the same level.dat in the upper folder is used for the Overworld, the Nether, and the End. Also, note that the Nether's folder is "DIM-1".'
  7330. End Poem:The End Poem appears to be an exposition of Notch's monistic perennial philosophy which is shown to the player upon completing the game. The speakers of the poem are thought by some to be Endermen (see the talk page for discussion.) The End Poem is approximately 9 minutes and 28 seconds. I see the player you mean.
  7331. [Player Name]?
  7332. Yes. Take care. It has reached a higher level now. It can read our thoughts.
  7333. That doesn't matter. It thinks we are part of the game.
  7334. I like this player. It played well. It did not give up.
  7335. It is reading our thoughts as though they were words on a screen.
  7336. That is how it chooses to imagine many things, when it is deep in the dream of a game.
  7337. Words make a wonderful interface. Very flexible. And less terrifying than staring at the reality behind the screen.
  7338. They used to hear voices. Before players could read. Back in the days when those who did not play called the players witches, and warlocks. And players dreamed they flew through the air, on sticks powered by demons.
  7339. What did this player dream?
  7340. This player dreamed of sunlight and trees. Of fire and water. It dreamed it created. And it dreamed it destroyed. It dreamed it hunted, and was hunted. It dreamed of shelter.
  7341. Hah, the original interface. A million years old, and it still works. But what true structure did this player create, in the reality behind the screen?
  7342. It worked, with a million others, to sculpt a true world in a fold of the [scrambled], and created a [scrambled] for [scrambled], in the [scrambled].
  7343. It cannot read that thought.
  7344. No. It has not yet achieved the highest level. That, it must achieve in the long dream of life, not the short dream of a game.
  7345. Does it know that we love it? That the universe is kind?
  7346. Sometimes, through the noise of its thoughts, it hears the universe, yes.
  7347. But there are times it is sad, in the long dream. It creates worlds that have no summer, and it shivers under a black sun, and it takes its sad creation for reality.
  7348. To cure it of sorrow would destroy it. The sorrow is part of its own private task. We cannot interfere.
  7349. Sometimes when they are deep in dreams, I want to tell them, they are building true worlds in reality. Sometimes I want to tell them of their importance to the universe. Sometimes, when they have not made a true connection in a while, I want to help them to speak the word they fear.
  7350. It reads our thoughts.
  7351. Sometimes I do not care. Sometimes I wish to tell them, this world you take for truth is merely [scrambled] and [scrambled], I wish to tell them that they are [scrambled] in the [scrambled]. They see so little of reality, in their long dream.
  7352. And yet they play the game.
  7353. But it would be so easy to tell them...
  7354. Too strong for this dream. To tell them how to live is to prevent them living.
  7355. I will not tell the player how to live.
  7356. The player is growing restless.
  7357. I will tell the player a story.
  7358. But not the truth.
  7359. No. A story that contains the truth safely, in a cage of words. Not the naked truth that can burn over any distance.
  7360. Give it a body, again.
  7361. Yes. Player...
  7362. Use its name.
  7363. [Player Name]. Player of games.
  7364. Good.
  7365. Take a breath, now. Take another. Feel air in your lungs. Let your limbs return. Yes, move your fingers. Have a body again, under gravity, in air. Respawn in the long dream. There you are. Your body touching the universe again at every point, as though you were separate things. As though we were separate things.
  7366. Who are we? Once we were called the spirit of the mountain. Father sun, mother moon. Ancestral spirits, animal spirits. Jinn. Ghosts. The green man. Then gods, demons. Angels. Poltergeists. Aliens, extraterrestrials. Leptons, quarks. The words change. We do not change.
  7367. We are the universe. We are everything you think isn't you. You are looking at us now, through your skin and your eyes. And why does the universe touch your skin, and throw light on you? To see you, player. To know you. And to be known. I shall tell you a story.
  7368. Once upon a time, there was a player.
  7369. The player was you, [Player Name].
  7370. Sometimes it thought itself human, on the thin crust of a spinning globe of molten rock. The ball of molten rock circled a ball of blazing gas that was three hundred and thirty thousand times more massive than it. They were so far apart that light took eight minutes to cross the gap. The light was information from a star, and it could burn your skin from a hundred and fifty million kilometres away.
  7371. Sometimes the player dreamed it was a miner, on the surface of a world that was flat, and infinite. The sun was a square of white. The days were short; there was much to do; and death was a temporary inconvenience.
  7372. Sometimes the player dreamed it was lost in a story.
  7373. Sometimes the player dreamed it was other things, in other places. Sometimes these dreams were disturbing. Sometimes very beautiful indeed. Sometimes the player woke from one dream into another, then woke from that into a third.
  7374. Sometimes the player dreamed it watched words on a screen.
  7375. Let's go back.
  7376. The atoms of the player were scattered in the grass, in the rivers, in the air, in the ground. A woman gathered the atoms; she drank and ate and inhaled; and the woman assembled the player, in her body.
  7377. And the player awoke, from the warm, dark world of its mother's body, into the long dream.
  7378. And the player was a new story, never told before, written in letters of DNA. And the player was a new program, never run before, generated by a sourcecode a billion years old. And the player was a new human, never alive before, made from nothing but milk and love.
  7379. You are the player. The story. The program. The human. Made from nothing but milk and love.
  7380. Let's go further back.
  7381. The seven billion billion billion atoms of the player's body were created, long before this game, in the heart of a star. So the player, too, is information from a star. And the player moves through a story, which is a forest of information planted by a man called Julian, on a flat, infinite world created by a man called Markus, that exists inside a small, private world created by the player, who inhabits a universe created by...
  7382. Shush. Sometimes the player created a small, private world that was soft and warm and simple. Sometimes hard, and cold, and complicated. Sometimes it built a model of the universe in its head; flecks of energy, moving through vast empty spaces. Sometimes it called those flecks "electrons" and "protons".
  7383. Sometimes it called them "planets" and "stars".
  7384. Sometimes it believed it was in a universe that was made of energy that was made of offs and ons; zeros and ones; lines of code. Sometimes it believed it was playing a game. Sometimes it believed it was reading words on a screen.
  7385. You are the player, reading words...
  7386. Shush... Sometimes the player read lines of code on a screen. Decoded them into words; decoded words into meaning; decoded meaning into feelings, emotions, theories, ideas, and the player started to breathe faster and deeper and realised it was alive, it was alive, those thousand deaths had not been real, the player was alive
  7387. You. You. You are alive.
  7388. and sometimes the player believed the universe had spoken to it through the sunlight that came through the shuffling leaves of the summer trees
  7389. and sometimes the player believed the universe had spoken to it through the light that fell from the crisp night sky of winter, where a fleck of light in the corner of the player's eye might be a star a million times as massive as the sun, boiling its planets to plasma in order to be visible for a moment to the player, walking home at the far side of the universe, suddenly smelling food, almost at the familiar door, about to dream again
  7390. and sometimes the player believed the universe had spoken to it through the zeros and ones, through the electricity of the world, through the scrolling words on a screen at the end of a dream
  7391. and the universe said I love you
  7392. and the universe said you have played the game well
  7393. and the universe said everything you need is within you
  7394. and the universe said you are stronger than you know
  7395. and the universe said you are the daylight
  7396. and the universe said you are the night
  7397. and the universe said the darkness you fight is within you
  7398. and the universe said the light you seek is within you
  7399. and the universe said you are not alone
  7400. and the universe said you are not separate from every other thing
  7401. and the universe said you are the universe tasting itself, talking to itself, reading its own code
  7402. and the universe said I love you because you are love.
  7403. And the game was over and the player woke up from the dream. And the player began a new dream. And the player dreamed again, dreamed better. And the player was the universe. And the player was love.
  7404. You are the player.
  7405. Wake up.
  7406. When an End portal is made in the end (or via defeating the Enderdragon) a strange glitch occurs making the glint of the End portal appear at a distance in the exact shape of the portal.
  7407. Going through a the End portal while in a minecart causes you to go through the portal, possibly into the lava below.
  7408. Quitting the game while in the End without killing the ender dragon will sometimes make multiple dragons spawn.
  7409. Quitting the game while viewing the credits or poem will make the player re-spawn in the End the next time they enter that world.
  7410. The End portal block can only be placed in the normal world dimension, and in the Nether and End, will disappear, however a Nether portal block can be placed in the End.
  7411. ]])
  7412. ender_realm.close()
  7413. enderdragon=fs.open("mem/redworks/minepedia/enderdragon","w")
  7414. enderdragon.write([[The Ender Dragon is the first official mob boss to appear in Minecraft. It only naturally spawns in The End. This mob uses the dragon model Notch created, but utilizes a texture more reminiscent of an Enderman, being black and scaly with purple eyes.
  7415. Strategy: Before entering the End, it is very strongly advised that you first sleep in a bed near the end portal, as you will most likely die your first time in. Upon entering The End, a purple "boss health bar" appears at the top of the player's screen. This bar indicates the remaining health of the resident Ender Dragon. Each End houses a single Ender Dragon who is periodically charged by nearby Ender Crystals. These crystals can be found at the summit of Obsidian pillars which dot the otherwise flat landscape. The healing effect of the Ender Crystals can reverse hard-won damage rather quickly, therefore it is recommended that they be destroyed before the player engages the Ender Dragon. Wearing any armor will make the Ender Dragon unable to hurt you; rather, you will simply be pushed around.
  7416. Destroying an Ender Crystal while the Ender Dragon is being charged by it (indicated by a series of circles appearing between the Ender Crystal and the Ender Dragon) will cause the Ender Dragon to take additional damage instead of being healed (You can destroy an Ender Crystal by either trying to destroy it as you would a regular block, or by attacking it with a sword, a bow and arrow, etc.) When destroyed, the Ender Crystal explodes and is replaced by a chunk of Bedrock. Get the Ender Dragon in the explosion to cause even more damage!
  7417. The Ender Dragon will flee when looked at, except when charging the player, but otherwise will fly directly at the player. When the Ender Dragon is charging the player, it is directly facing the player, giving the player a good chance of attacking its head, which, as mentioned earlier, will do extra damage (but if you do decide to attack it, you will have less time to try and avoid its attack) The Ender Dragon will also destroy any block it comes into contact with except Obsidian, End Stone and Bedrock (passing through them instead), making TNT strategies difficult if not impossible to successfully execute. Due to the Ender Dragon's speed and flight, projectiles are favored over melee approaches. The Ender Dragon's immense health and evasive nature necessitate a large ammunition stockpile. Lava is useless, as they are immune to fire damage. Snowballs have the potential to stun-lock an Ender Dragon as its recovery time is slower than the firing rate of snowballs. The Ender Dragon will take more damage from a melee attack than a ranged attack, thus waiting for it to charge, sidestepping, and then attacking is a viable tactic. Beds, which explode in The End, can be detonated when the Ender Dragon is nearby, causing it considerable damage. Ender Dragons take the most damage from damage dealt to the head. Hitting other areas of the body will not do as much damage.
  7418. Once killed, the Ender Dragon will appear to have beams of light spontaneously erupting from its body. It will then explode, dropping enough experience to bring a player from no experience to level 110 (20000 - 10 drops of 1000 experience, one drop of 10000 experience). If you bring an enchantment table and 30 bookcases with you while killing the Ender dragon, you can set it up after it dies and use it every 50 levels for many level 40+ enchantments. It will also spawn a Dragon Egg on top of an End Portal made of Bedrock. On the second block up, two Torches are placed on either side. Entering the portal will activate an eight minute text cutscene that acts as the end of Minecraft, after which the player will be teleported to their spawn point in The Overworld. The player may return to The End after defeating the Ender Dragon, however there will be no new dragon. In SMP stepping through the portal will wipe all of your unspent experience levels. There are ways, such as teleportation, to avoid the loss of unspent experience levels.
  7419. The offical findings of Mr D.H, one of Notch's personal friends, states that unlike Enderman, the enderdragon is immune to water damage- this only lets off smoke similar to the expolision of TNT. It also states, that before entering The End, taking an Enchanted sword is extremely good: as long as you do not mind that you may lose it. The Enderdragon cannot leave The End and go to the Overload,this was consistered by Notch, but never made the final cut.
  7420. History: Originally, dragons were a possible planned mob, hinted at by Notch during the Spider Jockey update.[1] He also mentioned that dragon lairs may be an addition.[2] They remained a potential work-in-progress until the Ender Dragon was announced.
  7421. Notch has stated in the past that if dragons are added, they will not be mountable as it would put too much pressure on SMP servers.[3]
  7422. In September 2011, Notch stated that "dragons will be added eventually."[4]
  7423. On October 7th 2011, Notch revealed the existence of the Ender Dragon.
  7424. On October 10th 2011, Notch released a video showing a small clip of The End that also shows the Ender Dragon fly into the top of the frame. [1] [2]
  7425. On October 11th 2011 A player named stropping_notch asked Jeb if Dragon riding is an idea, to which he replied it is. It is not clear whether this means it is an idea under consideration or not, however, or whether it would apply to the red Dragons or the Ender Dragon.[5]
  7426. On October 12th 2011, in a Reddit post Notch also said, "They will be different dragons. The Ender Dragon will probably become larger, and the ones in the main world will be this size, won't go through terrain, and will be red because dragons are red."[6]
  7427. On October 12th 2011, Notch stated in a twitter post that "[d]ragons have 6 limbs"[7], consisting of 2 wings, 2 legs and 2 arms.
  7428. On October 13th 2011, Beta 1.9 Pre-release 4 was released along with The End. The Ender Dragon existed in the code, mostly functional, however the dragon had not been enabled ingame yet and players were unable to damage it.
  7429. On October 27th 2011, Beta 1.9 Pre-release 5 was released, including the ability for players to damage Ender Dragons. They required mods or a mob-spawner to be brought into the game however.
  7430. On November 11 2011, Beta 1.9 Pre-release 6 was released, including a single Ender Dragon as a boss battle, spawning naturally when the player first enters The End.
  7431. Trivia: The name "Ender Dragon" was first made known through a tweet by Notch reading "raqreqentba," which could be decoded using the ROT13 cypher, translating to "enderdragon."[8]
  7432. The Ender Dragon has its own separate mob folder containing separate designs: the old gray skin and the newer black skin.
  7433. The Ender Dragon flies at 10 times the player's normal walking speed.
  7434. Made of 61 cuboids, the polycount on the dragon is higher than all models in Minecraft. Notch joked about how Minecraft was "going next gen" when deadmau5 mentioned this.[9]
  7435. Before it was textured, Notch reported that he was afraid to texture it as it was a complicated model.[10] In the end, the dragon model was so complex Notch stated that he gave up making the texture manually and wrote a texture packer tool to aid him in adding the texture to the model. Notch also uploaded the code for the tool so others could use the pack.[11][12]
  7436. As of 1.9 Pre-release 5, Ender Dragons:
  7437. No longer catch fire from lava or the fire aspect enchantment.
  7438. Can only be hurt below the 127 block map height limit. Getting Ender Dragons to fly above the limit (in Creative Mode, Overworld) will prevent any damage to them.
  7439. Phase through the player without causing damage when over block level 127.
  7440. Have their own achievement called "The End," which requires defeating an Ender Dragon.
  7441. In terms of how difficult the Ender Dragon is to defeat, Notch tweeted that his design guideline for the dragon is "[If] I can beat it at all, it's too easy."
  7442. Due to the increase in Diamond Armor's durability since Minecraft 1.0.0, Enderdragon attacks will barely phase the player. However, the launching aspect of their attacks can still subject the player to large amounts of fall damage.
  7443. Notch has uploaded a video showing why Ender Dragons will not spawn in the main world, as they would destroy any block they come into contact with.[13]
  7444. On Reddit, Notch explained why Ender Dragons destroy matter.[14]
  7445. When an Ender Dragon destroys a block by means of flying through it, an explosion effect occurs identical to that of a TNT explosion.
  7446. When hit, an Ender Dragon will make the same pain sounds as the player.
  7447. Ender Dragons spawn on Peaceful.
  7448. The knockback caused by an Ender Dragon's attack is far higher than that of any other mob.
  7449. An Ender Dragon's attack can cause Endermen to chase after it, should they survive the devastating attack.
  7450. Ender Dragons can be damaged by Snowballs, as snow is made of water, which damages Ender-mobs. However, Snow Golems will not attack it.
  7451. When no Ender Dragon is present, a player-placed Ender Dragon mob spawner will cause an empty 'boss health' bar to show.
  7452. Negative splash potions do not seem to affect the Ender Dragon. The potion hits and detonates as per normal, but the dragon does not flash red like when hurt and no apparent effect is seen on it. (Tested in SSP, and with Splash Potions of Poison, Instant Harming, Slowness and Weakness.)
  7453. The Ender Dragon's hitbox seems to be bigger than the Ender Dragon itself.
  7454. Even though Ender-mobs are injured by water, the Ender Dragon will destroy water source blocks as if they were solid.
  7455. If the player uses modifications to spawn an Ender Dragon in the Overworld and uses the portal it creates from its death there, it will lead the player to The End.
  7456. The Ender dragon, alongside the Ghast, and Blaze is one of the only current flying mobs in the game. It is the only one which uses wings to fly.
  7457. ]])
  7458. enderdragon.close()
  7459. enderman=fs.open("mem/redworks/minepedia/enderman","w")
  7460. enderman.write([[The Enderman (plural Endermen or Endermans) is a 3 block-high, black mob with long arms and legs, glowing purple eyes and a purple particle effect similar to a Portal. Endermen will not attack you unless you look at them by pointing your crosshair on them. In creative, they will only attack you if you punch them. They are rare in comparison to other mobs (with the exception of the spawner-only Cave Spider), but can still be seen regularly at night on the Overworld in groups of up to five. Their two iconic abilities are the ability to pick up and move blocks, and to teleport. Endermen are not harmed by sunlight, but will take damage from coming in contact with water (including water blocks and rain).[1] As of Minecraft full version 1.0 Endermen teleport when coming in contact with elements that damage it such as water, lava, and rain.
  7461. Endermen are not hostile until the player looks at them. "Looking at an Enderman" is defined as aiming the crosshair on the Enderman itself.
  7462. Endermen frequently spawn in the End, which is currently believed to be their homeworld, but they still require a light level of at most seven
  7463. History: The Enderman was introduced in Beta 1.8, part one of the Adventure Update.
  7464. Endermen used to burn in sunlight, but as of 1.9 pre-release 4, Endermen won't burn in daylight. They will instead teleport away when the player walks up to them in the daytime, making it extremely hard to get close enough to kill them.
  7465. Endermen were originally planned to have dog-like ears.
  7466. At first, when Notch was still designing the Endermen, he thought they were not 'creepy' enough, coming with the idea that having a situation which the player would want to avoid could make the Enderman significantly more scary. This gave Notch the idea to implement the staring feature where aiming the crosshairs on the Enderman's face would cause a suspense in which breaking eyecontact would trigger an attack, as well as the Enderman having the ability to teleport so that when the player has stared at the Enderman they will have to face a consequence for that action.[4]
  7467. In the Beta 1.8 demo at PAX, Endermen dropped diamonds as a placeholder.
  7468. In Beta 1.8pre1&2, Endermen originally had green eyes and emitted black smoke. The release of Beta 1.8 changed the eyes to purple and black smoke has been replaced with purple particles similar to the particles emitted from Nether portals.
  7469. Before the Sound Update, Endermen used zombie sounds as a place holder.
  7470. As of Beta 1.9pre4, the Endermen have a realm of their own: The End, where they spawn frequently.[5][6]
  7471. Notch stated "Endermen suck because they're annoying, and because I nerfed them and made them too easy. I shall fix this."[7]
  7472. Because of this, Endermen were modified to have 20 hearts of health, requiring 6 hits from a diamond sword to kill. Combined with their teleportation aspect, Endermen are more challenging.
  7473. Strategy: Preventing Attacks The only way to get an Enderman to chase you is to hit it, or look at it with the crosshair. As Endermen are 3 blocks tall, you can keep your house's interior 2 blocks tall to prevent Endermen from teleporting into it. However, if a house/construction is at the same or lower height as a nearby hill, the Enderman can still teleport in. You can perform preemptive strikes against endermen by keeping your crosshair over them, causing them to stand still until you hit them. Also, if the player sits in a pool of water, the Enderman will take damage from the water and then teleport away in response to the damage, and then run back to the player to attack. They will usually repeat this mishap until getting killed, this might be used as a way to make Endermen traps by making a room with 2 block roof height and a water tank on top, allowing the Endermen to glitch through the too low ceiling and into the water. If the player wears a pumpkin on their head, an Enderman will not turn hostile when looked at, though this does limit the player's line of sight. Endermen cannot teleport when they are in minecarts. They will not teleport to you if you are on a sufficiently high tower.
  7474. Killing Endermen: Endermen are damaged by fire, lava, water and attacks. Emptying a bucket of water on the ground will damage the Enderman without it becoming hostile, though it will teleport away. All types of swords can be used to kill an enderman. Cacti will also damage Endermen, so a wall of cacti also serves as a passive defense against Endermen. Cacti are also a fast way to kill them because the Endermen will blindly walk into it without teleporting away.
  7475. Endermen can swim. If the player is in a large body of water, he will teleport toward the player, take damage from the water, then teleport away. They will repeat this loop until they die.
  7476. Before Beta 1.9 Pre-release, Endermen were very easily killed with the use of a bow, however as of all the Pre-releases and the full release; arrows will hit them and they will instantly teleport without taking damage while also causing the arrow to vanish.
  7477. Hostile Endermen will teleport away when the player hits or gets close to the enderman. When this happens in a small underground space, the Enderman may teleport into inaccessible caves or to the surface. They will not teleport back to the player unless they move to an area that has enough space for the Enderman to teleport back. The Endermen also teleport behind the player so it is recommended that the player go into third person point of view by hitting F5.
  7478. When killed, regardless of the method of death, any blocks held by the Enderman disappear. They do not drop or get placed.
  7479. As of Beta 1.9 Pre-release 2, Endermen teleport to avoid being hit by arrows and splash potions and teleport to a new location when hit with one. They are no longer damaged by sunlight in this version, and when they touch water they immediately teleport away.
  7480. An effective way of killing an Enderman is by staring below their torso, preferably attacking the 'feet' of its legs constantly with a sword or an axe. However, because endermen teleport when the player closes in on them, you should either stand still while attacking their legs or move backwards to keep your distance. This can also be done by simply punching them.
  7481. Another effective way of killing an Enderman is to make a 4 high pillar underneath yourself and to look at one. The Enderman will run toward you and come into melee range. You will be in range to attack them, but they will not be in range to attack you. Make sure there are no skeleton nearby (16 blocks or less) as they will shoot you off your pillar and make you a vulnerable target.
  7482. If you hit an Enderman with any kind of sword while having a pumpkin as a helmet, the Enderman will not teleport.
  7483. A useful way to fight an Enderman is with a fishing rod, this is useful because you can hook them when you are fighting, and when they teleport away, you can use the rod to bring them back and then fight them with a weapon of your choice.
  7484. Moving Blocks: Moving blocks Endermen will pick up and move certain blocks, regardless of whether they were natural or placed by the player. They will pick up blocks horizontally and vertically nearby, within a short reaching distance similar to the player's, at heights from just below their feet to just above their head (5 layers). They will not drop the blocks when killed - the blocks disappear.
  7485. Since Beta 1.9 Pre-release 2, Endermen can only pick up the following blocks: [8] [9]
  7486. Grass Block
  7487. Dirt
  7488. Mycelium
  7489. Sand
  7490. Gravel
  7491. Clay  Flower
  7492. Rose
  7493. Brown Mushroom
  7494. Red Mushroom  Cactus
  7495. Pumpkin
  7496. Jack-O-Lantern
  7497. Melon  TNT  
  7498. Endermen cannot pick up entities, such as Boats, Minecarts, primed TNT, and mobs.
  7499. In Beta 1.8 Pre-releases, Endermen were able to pick up any block, including Bedrock.
  7500. Damage to structures and environment: Because Endermen possess the ability to move blocks, they can cause damage to the natural environment and player-built structures. For players with access to significant resources, Endermen may not represent a real threat in combat, and become nuisances when building. Before Beta 1.9 prerelease 2, Endermen were able to move player-placed blocks and the resulting holes could let in other mobs in addition to being simply unsightly. Fortunately, this problem was fixed by severely limiting the endermen's block-moving ability to a handful of block types.
  7501. On the overworld, signs of Endermen activity will soon start to become apparent in frequently loaded chunks. In desert areas, Endermen pollinate cacti by removing blocks and placing them on fresh sand, gradually increasing the population of cactus in frequently loaded deserts.
  7502. A common Enderman defense is to place lava or water moats around well-lit structures. However, this is not impenetrable, since they can still teleport inside when provoked by the player or even randomly by touching some water.
  7503. Notably the Endermen can reach through blocks to grab blocks behind so put anything important two blocks in, or make walls multiple blocks deep.
  7504. A common misconception is that vines prevent Endermen from taking blocks, however Endermen will not pick up vines and will reach through them instead (like stairs).
  7505. Endermen do not spawn in lit areas, but they may wander or teleport into lit areas from adjacent dark ones, so simply lighting structures liberally with torches is not a guaranteed defense.
  7506. Trivia: The exact size of an Enderman is 0.6x0.6x2.9 blocks.
  7507. If a Skeleton shoots an Enderman when attempting to shoot the player, the Enderman will completely stop chasing the player even after it has killed the offending Skeleton.[10]
  7508. A similar nature can be encountered when an Enderman is hit by an Enderdragon; They will ignore the player and chase after the offending Enderdragon, should they survive the attack.
  7509. Endermen located in The End does not pick up endstone.
  7510. The name "Enderman" is a reference to the Internet meme known as "the Slender Man", a similar-looking fictional cryptid. The name was given to the mob by Notch in a Minecraft Reddit thread.
  7511. Endermen have the ability to open their mouths. In their texture, their jaw is separated from their skull[11] and in the 1.8 Official Trailer,[12] an Enderman attacked the camera with its mouth open. This makes the Enderman the first mob with the ability to physically open their mouths without simply switching to a different texture. They only open their mouths when they attack. Due to the player's perspective, the player sees the back of the Enderman's head when they open their mouths. If a player is one block higher, they see through the Enderman's open mouth. They open their mouths by moving their skulls higher than their jaw.
  7512. When first introduced, Endermen had the same set of sound effects as Zombies. This was confirmed to be a placeholder, and that they would receive their own unique set of sounds.[13] In the pre-release of version 1.9, Endermen are completely silent. On November 13th, 2011, in an invisible update, Endermen did in fact receive their own audio scheme, most notably a long moan overlaid with static for while the player stares at them.[14]
  7513. Endermen's eyes glow in the dark, like Spiders', and Endermen's full body glows in the fog, also similar to a Spider's body.
  7514. Contrary to popular belief, there are no other Enderman eye colors besides purple. The mob/enderman_eyes.png file in minecraft.jar only has one color, and what looks like white eyes in mob/enderman.png is actually the spot where the eye texture gets overlaid, to make the eyes glow like spiders'.
  7515. When an Enderman picks up a block, it makes the sound of that block type being destroyed.
  7516. Endermen are quite common above ground, as stated above, spawning in groups of sometimes about 5, while below ground they are a bit rarer and cannot spawn in low roofed areas, such as confined caves. It is not recommended to run underground to get away from them as they may still spawn and will chase you if provoked.
  7517. Endermen spawn in the rain, but will continuously take damage unless they find shelter.
  7518. Like every other creature in the game with the exception of Spiders, Endermen can't see the player through transparent blocks such as Glass.
  7519. In the 1.9 Pre-release 2 Endermen will teleport away whenever they are damaged by anything other than a direct player hit, including sunlight, cacti, other mobs, arrows, and water.
  7520. Endermen can harvest cacti and collapse the entire cactus. However, they are known to replenish the numbers of cacti in the desert by planting their cactus blocks, and since they generally don't take the bottom block, the harvested cactus generally regrows during the day.
  7521. Endermen can teleport very far, even when moving several hundred kilometres from them, they will continue to follow until killed.
  7522. If an Enderman carrying a block is killed, that block is not dropped on death.
  7523. It is unknown if there is a limit to the number of Endermen that can follow a player, but as shown here, 30 is not the maximum amount that can follow.
  7524. An effective way to gain easy experience is to go the End, make a 1x1 tower 4 high, stand on top of it, look at Endermen and have them teleport to you while you slaughter them. They cannot reach you because the tower is too tall.
  7525. Even in an aggressive state, they can still pick up blocks, which at times makes it seem as though they are tearing through walls to reach the player.
  7526. In 1.9 pre-release, if you were to pour water on a hostile Enderman, the Enderman will teleport away and become neutral again.
  7527. When an Enderman picks up a flower or a normal mushroom, those blocks will appear to be floating between their grasp.
  7528. In 1.9 pre-release 4, if you look at an Enderman the inventory bar will be highlighted.
  7529. Since they burned in sunlight before 1.9, like Skeletons and Zombies, but, were not able to cool those flames down by jumping in the water, since that also hurts them, the only way you could have found an Enderman during the day is if he was in a secured dark area.
  7530. Looking at an Enderman at point blank range will not cause it to become hostile.
  7531. On the mysterious track 11, most people think that the player is being chased by an Enderman.
  7532. Even though water/rain is harmful to them, it will still put out a burning Enderman.
  7533. Endermen are the only current mobs which spawn naturally pan-dimensionally, appearing both in The Overworld and The End. Zombie Pigmen can be created in The Overworld if Lightning strikes a Pig, and Snow Golems can be made by the player anywhere. Chickens can be hatched anywhere.
  7534. Bugs: In SMP, Endermen don't open their mouths or shake when aggressive.
  7535. When using a custom texture pack, Endermen will be bright white overlapping their texture. This is caused by the blank spaces of their enderman_eyes.png file. If you create a custom texture pack you must make sure that you only change the 6 pixels actually used by their eyes. An alternative would be to use the original png from the minecraft.jar in your pack. Using the most recent release of MCPatcher also fixes this bug. This can also be avoided by making the enderman_eyes.png translucent, even only slight translucency will fix this.
  7536. If an Enderman is holding a block and the world is exited and then re-entered, the data value of the block is not preserved, and will reset to 0x0. For example, in the case of the wool, it will become white wool, and brown mushroom blocks will display the pores texture on each side. This is due to a mixup in the saving/loading of Endermen entities, it is saved as carryingData and tries to load carriedData.
  7537. If a hostile Enderman is forced to teleport because they have wandered into a water block they will no longer be hostile to the player, it is yet unknown if this is a bug or not.
  7538. Strangely, it looks as if some Endermen teleport to the overworld to avoid falling off a cliff in The End.
  7539. If a hostile Enderman is attacked by another mob and kills the attacker, it resets to being neutral towards the player.
  7540. In the Minecraft Beta 1.9 Pre-Release 2, Endermen commonly teleport away from the player, even if they were just attacking him/her, and become neutral.
  7541. If an Enderman picks up a flaming block (i.e. Wood, Netherrack, etc.) and then places it again, the block will be extinguished, but the Enderman will be on fire.
  7542. During the day in 1.9 pre-release 5, if you look at an Enderman, it will open its mouth and become hostile but if you try to shoot a projectile at it, it will teleport and become neutral. Also if you look at it without shooting it, it will open its mouth, shake, and become hostile then when you look away, it will become neutral again. Only happens during the day.
  7543. If you look at it, it will only stay hostile if it can run toward you; if it has to teleport to get to you, it will become neutral. Only happens during the day.
  7544. On rare occasions, if the player and an Enderman are on opposite sides of a large body of water and the Enderman turns hostile, it will stare back at the player like normal but will never attempt to get closer, even if the player is not staring back. It will continue staring at the player for a while until it suddenly disappears. (Not by teleporting, but by being completely erased. It will not drop any loot.)
  7545. Endermen will rapidly teleport in a maniacal manner to avoid being hit by rain. If there is no areas for them to hide, they will teleport here and there until they finally die. At night, they can be seen flashing red and appearing all over the place.
  7546. In Minecraft 1.0 Enderman sometimes teleport to the surface then immediately teleport away, probably because they got hit by lava or water somewhere in the underground.
  7547. If you quit a game while being attacked by a hostile Enderman, and re-join the game, the Enderman will return to being neutral.
  7548. Where ever the luminance level is 15, i.e. the Sun and Glowstone, If Endermen teleport they will become neutral.
  7549. If caught with a fishing rod while neutral, an Enderman will remain neutral even after being pulled in, and switching to another item. The Enderman will become aggressive again only if it is hit by the player.
  7550. When an Enderman picks up TNT, the TNT block's texture is inverted (Notice the "N" in TNT is reversed(??T)).
  7551. If you fire an arrow at an Enderman who is in a mine cart, it will teleport away and reappear in the same mine cart. Also, at times it will turn red as if it had taken damage, but it will not die from arrow shots.
  7552. ]])
  7553. enderman.close()
  7554. endermen=fs.open("mem/redworks/minepedia/endermen","w")
  7555. endermen.write([[The Enderman (plural Endermen or Endermans) is a 3 block-high, black mob with long arms and legs, glowing purple eyes and a purple particle effect similar to a Portal. Endermen will not attack you unless you look at them by pointing your crosshair on them. In creative, they will only attack you if you punch them. They are rare in comparison to other mobs (with the exception of the spawner-only Cave Spider), but can still be seen regularly at night on the Overworld in groups of up to five. Their two iconic abilities are the ability to pick up and move blocks, and to teleport. Endermen are not harmed by sunlight, but will take damage from coming in contact with water (including water blocks and rain).[1] As of Minecraft full version 1.0 Endermen teleport when coming in contact with elements that damage it such as water, lava, and rain.
  7556. Endermen are not hostile until the player looks at them. "Looking at an Enderman" is defined as aiming the crosshair on the Enderman itself.
  7557. Endermen frequently spawn in the End, which is currently believed to be their homeworld, but they still require a light level of at most seven
  7558. History: The Enderman was introduced in Beta 1.8, part one of the Adventure Update.
  7559. Endermen used to burn in sunlight, but as of 1.9 pre-release 4, Endermen won't burn in daylight. They will instead teleport away when the player walks up to them in the daytime, making it extremely hard to get close enough to kill them.
  7560. Endermen were originally planned to have dog-like ears.
  7561. At first, when Notch was still designing the Endermen, he thought they were not 'creepy' enough, coming with the idea that having a situation which the player would want to avoid could make the Enderman significantly more scary. This gave Notch the idea to implement the staring feature where aiming the crosshairs on the Enderman's face would cause a suspense in which breaking eyecontact would trigger an attack, as well as the Enderman having the ability to teleport so that when the player has stared at the Enderman they will have to face a consequence for that action.[4]
  7562. In the Beta 1.8 demo at PAX, Endermen dropped diamonds as a placeholder.
  7563. In Beta 1.8pre1&2, Endermen originally had green eyes and emitted black smoke. The release of Beta 1.8 changed the eyes to purple and black smoke has been replaced with purple particles similar to the particles emitted from Nether portals.
  7564. Before the Sound Update, Endermen used zombie sounds as a place holder.
  7565. As of Beta 1.9pre4, the Endermen have a realm of their own: The End, where they spawn frequently.[5][6]
  7566. Notch stated "Endermen suck because they're annoying, and because I nerfed them and made them too easy. I shall fix this."[7]
  7567. Because of this, Endermen were modified to have 20 hearts of health, requiring 6 hits from a diamond sword to kill. Combined with their teleportation aspect, Endermen are more challenging.
  7568. Strategy: Preventing Attacks The only way to get an Enderman to chase you is to hit it, or look at it with the crosshair. As Endermen are 3 blocks tall, you can keep your house's interior 2 blocks tall to prevent Endermen from teleporting into it. However, if a house/construction is at the same or lower height as a nearby hill, the Enderman can still teleport in. You can perform preemptive strikes against endermen by keeping your crosshair over them, causing them to stand still until you hit them. Also, if the player sits in a pool of water, the Enderman will take damage from the water and then teleport away in response to the damage, and then run back to the player to attack. They will usually repeat this mishap until getting killed, this might be used as a way to make Endermen traps by making a room with 2 block roof height and a water tank on top, allowing the Endermen to glitch through the too low ceiling and into the water. If the player wears a pumpkin on their head, an Enderman will not turn hostile when looked at, though this does limit the player's line of sight. Endermen cannot teleport when they are in minecarts. They will not teleport to you if you are on a sufficiently high tower.
  7569. Killing Endermen: Endermen are damaged by fire, lava, water and attacks. Emptying a bucket of water on the ground will damage the Enderman without it becoming hostile, though it will teleport away. All types of swords can be used to kill an enderman. Cacti will also damage Endermen, so a wall of cacti also serves as a passive defense against Endermen. Cacti are also a fast way to kill them because the Endermen will blindly walk into it without teleporting away.
  7570. Endermen can swim. If the player is in a large body of water, he will teleport toward the player, take damage from the water, then teleport away. They will repeat this loop until they die.
  7571. Before Beta 1.9 Pre-release, Endermen were very easily killed with the use of a bow, however as of all the Pre-releases and the full release; arrows will hit them and they will instantly teleport without taking damage while also causing the arrow to vanish.
  7572. Hostile Endermen will teleport away when the player hits or gets close to the enderman. When this happens in a small underground space, the Enderman may teleport into inaccessible caves or to the surface. They will not teleport back to the player unless they move to an area that has enough space for the Enderman to teleport back. The Endermen also teleport behind the player so it is recommended that the player go into third person point of view by hitting F5.
  7573. When killed, regardless of the method of death, any blocks held by the Enderman disappear. They do not drop or get placed.
  7574. As of Beta 1.9 Pre-release 2, Endermen teleport to avoid being hit by arrows and splash potions and teleport to a new location when hit with one. They are no longer damaged by sunlight in this version, and when they touch water they immediately teleport away.
  7575. An effective way of killing an Enderman is by staring below their torso, preferably attacking the 'feet' of its legs constantly with a sword or an axe. However, because endermen teleport when the player closes in on them, you should either stand still while attacking their legs or move backwards to keep your distance. This can also be done by simply punching them.
  7576. Another effective way of killing an Enderman is to make a 4 high pillar underneath yourself and to look at one. The Enderman will run toward you and come into melee range. You will be in range to attack them, but they will not be in range to attack you. Make sure there are no skeleton nearby (16 blocks or less) as they will shoot you off your pillar and make you a vulnerable target.
  7577. If you hit an Enderman with any kind of sword while having a pumpkin as a helmet, the Enderman will not teleport.
  7578. A useful way to fight an Enderman is with a fishing rod, this is useful because you can hook them when you are fighting, and when they teleport away, you can use the rod to bring them back and then fight them with a weapon of your choice.
  7579. Moving Blocks: Moving blocks Endermen will pick up and move certain blocks, regardless of whether they were natural or placed by the player. They will pick up blocks horizontally and vertically nearby, within a short reaching distance similar to the player's, at heights from just below their feet to just above their head (5 layers). They will not drop the blocks when killed - the blocks disappear.
  7580. Since Beta 1.9 Pre-release 2, Endermen can only pick up the following blocks: [8] [9]
  7581. Grass Block
  7582. Dirt
  7583. Mycelium
  7584. Sand
  7585. Gravel
  7586. Clay  Flower
  7587. Rose
  7588. Brown Mushroom
  7589. Red Mushroom  Cactus
  7590. Pumpkin
  7591. Jack-O-Lantern
  7592. Melon  TNT  
  7593. Endermen cannot pick up entities, such as Boats, Minecarts, primed TNT, and mobs.
  7594. In Beta 1.8 Pre-releases, Endermen were able to pick up any block, including Bedrock.
  7595. Damage to structures and environment: Because Endermen possess the ability to move blocks, they can cause damage to the natural environment and player-built structures. For players with access to significant resources, Endermen may not represent a real threat in combat, and become nuisances when building. Before Beta 1.9 prerelease 2, Endermen were able to move player-placed blocks and the resulting holes could let in other mobs in addition to being simply unsightly. Fortunately, this problem was fixed by severely limiting the endermen's block-moving ability to a handful of block types.
  7596. On the overworld, signs of Endermen activity will soon start to become apparent in frequently loaded chunks. In desert areas, Endermen pollinate cacti by removing blocks and placing them on fresh sand, gradually increasing the population of cactus in frequently loaded deserts.
  7597. A common Enderman defense is to place lava or water moats around well-lit structures. However, this is not impenetrable, since they can still teleport inside when provoked by the player or even randomly by touching some water.
  7598. Notably the Endermen can reach through blocks to grab blocks behind so put anything important two blocks in, or make walls multiple blocks deep.
  7599. A common misconception is that vines prevent Endermen from taking blocks, however Endermen will not pick up vines and will reach through them instead (like stairs).
  7600. Endermen do not spawn in lit areas, but they may wander or teleport into lit areas from adjacent dark ones, so simply lighting structures liberally with torches is not a guaranteed defense.
  7601. Trivia: The exact size of an Enderman is 0.6x0.6x2.9 blocks.
  7602. If a Skeleton shoots an Enderman when attempting to shoot the player, the Enderman will completely stop chasing the player even after it has killed the offending Skeleton.[10]
  7603. A similar nature can be encountered when an Enderman is hit by an Enderdragon; They will ignore the player and chase after the offending Enderdragon, should they survive the attack.
  7604. Endermen located in The End does not pick up endstone.
  7605. The name "Enderman" is a reference to the Internet meme known as "the Slender Man", a similar-looking fictional cryptid. The name was given to the mob by Notch in a Minecraft Reddit thread.
  7606. Endermen have the ability to open their mouths. In their texture, their jaw is separated from their skull[11] and in the 1.8 Official Trailer,[12] an Enderman attacked the camera with its mouth open. This makes the Enderman the first mob with the ability to physically open their mouths without simply switching to a different texture. They only open their mouths when they attack. Due to the player's perspective, the player sees the back of the Enderman's head when they open their mouths. If a player is one block higher, they see through the Enderman's open mouth. They open their mouths by moving their skulls higher than their jaw.
  7607. When first introduced, Endermen had the same set of sound effects as Zombies. This was confirmed to be a placeholder, and that they would receive their own unique set of sounds.[13] In the pre-release of version 1.9, Endermen are completely silent. On November 13th, 2011, in an invisible update, Endermen did in fact receive their own audio scheme, most notably a long moan overlaid with static for while the player stares at them.[14]
  7608. Endermen's eyes glow in the dark, like Spiders', and Endermen's full body glows in the fog, also similar to a Spider's body.
  7609. Contrary to popular belief, there are no other Enderman eye colors besides purple. The mob/enderman_eyes.png file in minecraft.jar only has one color, and what looks like white eyes in mob/enderman.png is actually the spot where the eye texture gets overlaid, to make the eyes glow like spiders'.
  7610. When an Enderman picks up a block, it makes the sound of that block type being destroyed.
  7611. Endermen are quite common above ground, as stated above, spawning in groups of sometimes about 5, while below ground they are a bit rarer and cannot spawn in low roofed areas, such as confined caves. It is not recommended to run underground to get away from them as they may still spawn and will chase you if provoked.
  7612. Endermen spawn in the rain, but will continuously take damage unless they find shelter.
  7613. Like every other creature in the game with the exception of Spiders, Endermen can't see the player through transparent blocks such as Glass.
  7614. In the 1.9 Pre-release 2 Endermen will teleport away whenever they are damaged by anything other than a direct player hit, including sunlight, cacti, other mobs, arrows, and water.
  7615. Endermen can harvest cacti and collapse the entire cactus. However, they are known to replenish the numbers of cacti in the desert by planting their cactus blocks, and since they generally don't take the bottom block, the harvested cactus generally regrows during the day.
  7616. Endermen can teleport very far, even when moving several hundred kilometres from them, they will continue to follow until killed.
  7617. If an Enderman carrying a block is killed, that block is not dropped on death.
  7618. It is unknown if there is a limit to the number of Endermen that can follow a player, but as shown here, 30 is not the maximum amount that can follow.
  7619. An effective way to gain easy experience is to go the End, make a 1x1 tower 4 high, stand on top of it, look at Endermen and have them teleport to you while you slaughter them. They cannot reach you because the tower is too tall.
  7620. Even in an aggressive state, they can still pick up blocks, which at times makes it seem as though they are tearing through walls to reach the player.
  7621. In 1.9 pre-release, if you were to pour water on a hostile Enderman, the Enderman will teleport away and become neutral again.
  7622. When an Enderman picks up a flower or a normal mushroom, those blocks will appear to be floating between their grasp.
  7623. In 1.9 pre-release 4, if you look at an Enderman the inventory bar will be highlighted.
  7624. Since they burned in sunlight before 1.9, like Skeletons and Zombies, but, were not able to cool those flames down by jumping in the water, since that also hurts them, the only way you could have found an Enderman during the day is if he was in a secured dark area.
  7625. Looking at an Enderman at point blank range will not cause it to become hostile.
  7626. On the mysterious track 11, most people think that the player is being chased by an Enderman.
  7627. Even though water/rain is harmful to them, it will still put out a burning Enderman.
  7628. Endermen are the only current mobs which spawn naturally pan-dimensionally, appearing both in The Overworld and The End. Zombie Pigmen can be created in The Overworld if Lightning strikes a Pig, and Snow Golems can be made by the player anywhere. Chickens can be hatched anywhere.
  7629. Bugs: In SMP, Endermen don't open their mouths or shake when aggressive.
  7630. When using a custom texture pack, Endermen will be bright white overlapping their texture. This is caused by the blank spaces of their enderman_eyes.png file. If you create a custom texture pack you must make sure that you only change the 6 pixels actually used by their eyes. An alternative would be to use the original png from the minecraft.jar in your pack. Using the most recent release of MCPatcher also fixes this bug. This can also be avoided by making the enderman_eyes.png translucent, even only slight translucency will fix this.
  7631. If an Enderman is holding a block and the world is exited and then re-entered, the data value of the block is not preserved, and will reset to 0x0. For example, in the case of the wool, it will become white wool, and brown mushroom blocks will display the pores texture on each side. This is due to a mixup in the saving/loading of Endermen entities, it is saved as carryingData and tries to load carriedData.
  7632. If a hostile Enderman is forced to teleport because they have wandered into a water block they will no longer be hostile to the player, it is yet unknown if this is a bug or not.
  7633. Strangely, it looks as if some Endermen teleport to the overworld to avoid falling off a cliff in The End.
  7634. If a hostile Enderman is attacked by another mob and kills the attacker, it resets to being neutral towards the player.
  7635. In the Minecraft Beta 1.9 Pre-Release 2, Endermen commonly teleport away from the player, even if they were just attacking him/her, and become neutral.
  7636. If an Enderman picks up a flaming block (i.e. Wood, Netherrack, etc.) and then places it again, the block will be extinguished, but the Enderman will be on fire.
  7637. During the day in 1.9 pre-release 5, if you look at an Enderman, it will open its mouth and become hostile but if you try to shoot a projectile at it, it will teleport and become neutral. Also if you look at it without shooting it, it will open its mouth, shake, and become hostile then when you look away, it will become neutral again. Only happens during the day.
  7638. If you look at it, it will only stay hostile if it can run toward you; if it has to teleport to get to you, it will become neutral. Only happens during the day.
  7639. On rare occasions, if the player and an Enderman are on opposite sides of a large body of water and the Enderman turns hostile, it will stare back at the player like normal but will never attempt to get closer, even if the player is not staring back. It will continue staring at the player for a while until it suddenly disappears. (Not by teleporting, but by being completely erased. It will not drop any loot.)
  7640. Endermen will rapidly teleport in a maniacal manner to avoid being hit by rain. If there is no areas for them to hide, they will teleport here and there until they finally die. At night, they can be seen flashing red and appearing all over the place.
  7641. In Minecraft 1.0 Enderman sometimes teleport to the surface then immediately teleport away, probably because they got hit by lava or water somewhere in the underground.
  7642. If you quit a game while being attacked by a hostile Enderman, and re-join the game, the Enderman will return to being neutral.
  7643. Where ever the luminance level is 15, i.e. the Sun and Glowstone, If Endermen teleport they will become neutral.
  7644. If caught with a fishing rod while neutral, an Enderman will remain neutral even after being pulled in, and switching to another item. The Enderman will become aggressive again only if it is hit by the player.
  7645. When an Enderman picks up TNT, the TNT block's texture is inverted (Notice the "N" in TNT is reversed(??T)).
  7646. If you fire an arrow at an Enderman who is in a mine cart, it will teleport away and reappear in the same mine cart. Also, at times it will turn red as if it had taken damage, but it will not die from arrow shots.
  7647. ]])
  7648. endermen.close()
  7649. far_lands=fs.open("mem/redworks/minepedia/far lands","w")
  7650. far_lands.write([[The Far Lands were the area that formed the "edge" of the "infinite" map in versions prior to Beta 1.8. The distance from the center of the Minecraft map to the beginning of the Far Lands, 12,550,820 meters, is about 31% of the circumference of the Earth at its equator. When players made it to the Far Lands, they would experience an excessive amount of lag and the terrain would be severely distorted. According to Notch, the distortion could be fixed, as it was in 1.8, resulting in the disappearance of the Far Lands (Using "The Nostalgia Project", a 1.0.0 Mod, you can restore them). A post on Notch's blog[1] indicates that this fix was accidental, and was probably an unintended side effect of the large changes in terrain generation for 1.8. In 1.8, instead of the Far Lands starting to generate at 12,550,820 meters from the center of the map, the playable abruptly ends at 30,000,000 meters, and fake chunks (they are not solid, they can be fallen through) start generating. A sure sign that one has reached the edge of the map is that lighting no longer works past the 30,000,000th mark. When the player flies about 34 blocks past this perimeter the game freezes and begins to jitter, the player cannot be seen in 3rd person mode and cannot move. There is no way to escape this and the player has to start a new world or edit their position in the level.dat file. Versions between Alpha 1.2.0 (Halloween Update) and Beta 1.7.3 rendered fake chunks outside of a limit of 32,000,000 meters; attempting to walk onto them would cause the player to die in the Void. From the beginning of Infdev all the way to the Halloween Update, the world abruptly ended at 32,000,000 meters, and leaving the boundary caused you to be stuck rather than die.
  7651. Getting to the Far Lands: Getting to the Far Lands without the use of an external program would be a very difficult (or at least time consuming) task, as walking to there from the center of the map would take approximately 820 hours. Instead, a level.dat editor can be used to teleport the player there.
  7652. The boundary between the normal map and the Far Lands (defined by when the map starts generating the distorted terrain) occurs at X/Z of �B112,550,821.
  7653. The hard limit where chunks get overwritten is at X/Z of �B134,359,738,368, which is about 25% of the distance from the Earth to the Sun. At X/Z of �B12,147,483,648, (1/16th of the former distance), item positions, mob pathfinding and other things using 32-bit integers will overflow and act weird, usually resulting in Minecraft crashing.
  7654. At X/Z of �B11.798�B710308, the position of the player, represented by a double-precision floating point number, will overflow.
  7655. Using Single Player Commands, it is very easy to get to the Far Lands using teleportation. After pressing the chat key (default "T") to open up the console-like input window, using the "teleport" command (or its abbreviation, "t") followed by X, Y, and Z coordinates will allow the player to go wherever they want. For example:
  7656. To get to the Edge Far Lands' wall, try "t 12550820 129 0". Make sure either flying is turned on or damage is turned off, as otherwise you'll fall to your death.
  7657. To get to the Corner Far Lands (the walls' intersection), try "t 12550820 129 12550820". Again, make sure you're protected from fall damage.
  7658. Unfortunately there will be severe lag, and slower computers may crash upon this teleportation. Opening a GUI will make the Far Lands render much, much faster. You can do this by pausing (pressing Escape) or opening the Single Player Commands prompt again. When you venture out farther above and into the far lands, the probability increases that a "bad chunk" will appear. A bad chunk is a chunk filled with terribly corrupt data, and is the cause of sudden lag spikes that can easily make minecraft crash.
  7659. Alleviating lag in the Far Lands: If you're using Single Player Commands, you can get rid of the lag by using several commands, which include, but are not limited to:
  7660. the killall command to kill all mobs which will be about 4000 per 20 seconds. This should be used at least thrice per minute to prevent severe lag from occurring.
  7661. the drops command to stop blocks from dropping items, so gravel and sand that falls will not cause any lag.
  7662. the light command to make all blocks as bright as possible so you can actually see the layers underneath the top layer. Also helps with framerate.
  7663. This all will increase your framerate to a value close to what would be experienced in the "normal" world.
  7664. If you don't want to use mods, you can also alleviate some of the lag by setting your game mode to peaceful via options menu.
  7665. Geography of the Far Lands: Both areas of the Far Lands feature extremely strange terrain, although they are significantly different. In both zones, any area beneath sea level, excluding regular caves, will be flooded with water. The Far Lands' structure is dependent on the seed used for generating the map, although the general patterns remain the same. Beyond X/Z of �B132,000,000, chunks are treated as permanently nonexistent, and will not generate, even though they may appear to. This value is hardcoded in the source code of Minecraft. This means it cannot be changed unless Notch does it.
  7666. The Far Lands will generate biomes but most biomes will be indistinguishable except by the color of the grass. Desert biomes will be covered in sand and snow-covered biomes will be covered with snow, excluding the top of the map (because there's no space for the snow cover up there). Trees will generate somewhat normally, but can only be found in the upper areas of the map due to the need for grass, but if you open Single Player Commands, the biome will always be Forest.
  7667. Ores can be found up to their respective maximum heights just like in the normal world. Unfortunately, due to the flooding, everything except for coal is difficult, if not impossible, to acquire. In the solid areas of the Far Lands, normal caves will generate but will be limited and small. Along with the caves, dungeons (extremely rare) and lakes can be found in solid areas. Water and lava springs can be found out in the open and in caves.
  7668. Much of the open space in both areas is shrouded in darkness and thus hostile mobs run rampant, making the Far Lands as a whole incredibly dangerous. This is especially problematic in the Corner Far Lands due to its layered structure. The flooded zones are filled with squid.
  7669. In the Sky Dimension, the Far Lands are not half flooded with water and bedrock does not form at lower levels.
  7670. Edge Far Lands: The boundary of the Far Lands Edge (that is, where it meets the regular map) looks like a solid wall, all the way to the top of the map (Y-coordinate 127) that is filled with gaping holes perpendicular to the edge. These holes are extremely long, perhaps infinite, and on the whole seem to change very little no matter how deep the player ventures. They can be blocked, either partially or completely, but such blockages are rare and temporary. This "wall of Swiss cheese" pattern continues beneath ground level, all the way to the bottom of the map, and seems to be partially caused by a large one-dimensional distortion in the map generator's output.
  7671. Corner Far Lands: At a corner, when two perpendicular Edge Far Lands sections meet, the Corner Far Lands begin to generate. Unlike the infinite-length holes in the Edge Far Lands, the Corner Far Lands contains more normal terrain. This terrain is "stacked" on top of itself to create a bizarre sandwich with layers of ground and air, which gives it its nickname. Each layer looks like a gigantic floating continent, hovering over the next layer, which is shadowed.
  7672. The majority of the generated world is Corner Far Lands, as the "normal" world (before 12,550,821) only makes the center of the world, and the Edge Far Lands only makes its continued sides.
  7673. The number of layers isn't always the same, and varies between three to five. Layers can be grouped into three categories:
  7674. The top layer. This layer exists at the absolute top of the map. Occasionally there can be a lower area that isn't shadowed (this is technically a dry layer). The lower area is where a majority of the trees and passive mobs can be found, as the top layer receives almost all of the sunlight. Due to the lack of space the area at the absolute top can't have trees or mobs.
  7675. The dry layers. These generate slightly flatter than normal terrain and have grass, despite the darkness. At sea level massive floating beaches can be found, which will collapse if modified. Hostile mobs are very common here due to being in the shadow of the top layer. Rarely, there are holes in the top layer that allow sunlight to reach these layers. Caves that have one of these layers as their "surface" can occasionally be carved out of dirt instead of stone. These layers have cave-like ceilings made out of stone, gravel and dirt.
  7676. The flooded layers. Like the dry layers, these generate somewhat flat terrain, but it is comprised primarily of stone. Sand and sandstone will show up down here, even up to 30 meters below sea level. Except for coal, all the ores can only be found in these layers.
  7677. Sometimes there are extremely tall pillars of gravel that stretch from the ground to the ceiling of a layer. Likewise, some of the beaches that collapse will create pillars of sand all the way down to the ground, despite there not being that much sand to begin with. The Corner Far Lands is also prone to having near-perfect diagonal lines being carved into the ceilings or floors of layers. If traced, these lines all intersect at the corner (X/Z �B112,550,821). This seems similar to how the Edge Far Lands have a consistent pattern along lines perpendicular to their edge, but is much less pronounced.
  7678. In the Nether: There are many effects that will be noticed after traveling millions of blocks away from the center of the map. The very first effect that will be noticed is the jumpy or stuttering movement of the map, which isn't directly related to the Far Lands themselves but instead to floating-point precision errors. This jumpy movement is notable even at X/Z of 250,000. Players will experience extreme framerate drops and very high CPU usage, which will continue until Minecraft freezes completely. The framerate drops do not occur in multiplayer servers, though it will, depending on the server computer's RAM, make the server itself lag. In both Single-Player and multiplayer, the intense lag that is characteristic of the Far Lands is caused by massive numbers of falling sand or gravel entities. This in turn is caused (like most of the rest of the Far Lands' strange effects) by more floating-point precision errors.
  7679. As the player journeys even deeper into the Far Lands, the effects worsen to the point where the game is unplayable. At X/Z �B132,000,000,[2] block physics stop functioning correctly. Lighting doesn't work and the blocks, although they appear to be there, aren't solid. If the player tries to walk on these blocks, he or she will fall into the Void. Because of this, it's impossible to get even close to X/Z �B134,359,738,368 or �B12,147,483,648 without the assistance of editors or mods. At excessive X/Z positions, World Renderer no longer works, or takes incredibly long times and uses most, if not all CPU usage. It then becomes almost impossible to close Minecraft without the Task manager.
  7680. Weather is not affected by the Far Lands directly but is by their terrain. Lightning bolts that hit surfaces at the top of the map (Y-coordinate 127) will be invisible and will not cause fire. The particles created when rain hits these surfaces will be black instead of blue. Snow will not accumulate on these surfaces either (because there's no space). As of Beta 1.6, these effects are unique to the Far Lands as it's impossible to artificially place solid blocks at layer 127.
  7681. In beta 1.8 the strange terrain may be gone, but some of the effects aren't. After X/Z �B130,000,000 the world will start generating fake chunks. Going into the fake chunks will result in falling into the Void, and, subsequently, the player's death. If flying is used, going about 34 blocks out of the limit will cause you to be stuck, being able to use your inventory and look around, but not to move. Also, the clouds will act strangely, moving at abnormally high speeds. Reloading the save should fix the clouds, but the position glitch will still be present. Also, at excessive X/Z positions, particles (rain, water, snow, etc.) fail to appear staggered, instead forming rows of flat "panes". The Far Lands do not lag in 1.8. in 1.0.0 the fire of torches will be in/on a block next to it, instead of on the torch. In 1.0.0 explosion clouds look abnormaly big.
  7682. The Nostalgia Project (aka No Biomes X) doesn't downgrade, but removes newer additions to the game, such as shearing, tall grass, and most importantly, new biome generation. It can change the way biomes form, so by making 1.7 biomes generate, it generates the Far Lands. All the same effects occur, there is no sprinting though, and there is twice as much lag as before.
  7683. When Viewing the Far Lands in a Minecraft 3D map editor, you will encounter errors. In MCEdit, the selection cubes start to distort and the map distorts when viewing.
  7684. Very little is known about the Far Lands of older versions of Minecraft for many reasons; they had no official name, and few knew of their existence. Fewer still tried to make them known to the world, and so they remained unknown. When Notch mentioned them on his blog[1] and gave them an official nickname, interest took hold.
  7685. In Infdev, although the Far Lands existed, many of the side effects didn't. However, fire particles and doors would act strange. There was no lag or stuttering movement, and beyond X/Z �B132,000,000, the blocks would simply not render. Walking off the edge would cause the player to become stuck in a glitched position, unable to escape.[3][4]
  7686. It has been confirmed that in Alpha v1.1.2, the blocks would not render beyond X/Z �B132,000,000, like older Infdev versions.[2] The fake chunks started appearing in Alpha 1.2.0, the Halloween Update.
  7687. Trivia: The Far Lands spawn hostile mobs at a rate far higher than any natural chunk, due to the sheer amount of space in absolute darkness. In the Corner Far Lands, the spawn rate likely approaches the maximum possible because the stacked terrain works like a mob tower.
  7688. The flat plane at the very top of the Corner Far Lands tends to light incorrectly in day-night transitions. This is because the sunlight calculation doesn't work when the entire chunk is blocked at Y-coordinate 127.
  7689. Even traveling through the Nether, it would take 102 hours of walking in a straight line to get to the Far Lands.
  7690. Entering a Portal which would take you to either world's Far Lands will cause Minecraft to crash. e.g. Building a portal at 2,000,000 in the Nether would take you to 16,000,000 in the Overworld, but this would cause a crash. The same cannot be done vice versa, because building a Portal which will take you to 12,000,000 in the Nether can only be done at X/Z of over 96,000,000 in the Overworld, that is, a distance 3 times greater than the point beyond which blocks can not be placed anymore.
  7691. The Edge Far Lands' average block composition: 36% Stone, 25% Air, 23% Water, 10% Dirt/Grass, 2% Bedrock, and 4% others. (Based on a 14x14 chunk selection)
  7692. The Corner Far Lands' average block composition: 40% Stone, 16% Air, 28% Water, 10% Dirt/Grass, 2% Bedrock, and 4% others. (Based on a 14x14 chunk selection)
  7693. Even though Beta 1.6 made it impossible to place solid blocks at layer 127, the Far Lands' flat "ceiling" still gets generated there.
  7694. Because of the debates over renaming Endermen to "Far Landers," Notch jokingly suggested to rename the Far Lands to The End instead.[5]
  7695. Notch still hasn't confirmed if he will re-add the Far Lands to the game, since it's almost impossible to get there without hacks or Single Player Commands.
  7696. Kurt ('kurtjmac' at "farlandsorbust"[1]) is attempting to walk to the Far Lands without any hacks, cheats or mods, documenting his progress on video at his website, and has been doing it as a fundraiser for Child's Play Charity for some time now. Because the Far Lands no longer exist as of the 1.8 Pre-release, the Minecraft world in which Kurt is walking to the Far Lands remains in version 1.7.3. As of November 12th, 2011, he is 2.33% of the way, having traveled 292202 blocks west, straying 15181 block North. Kurt has begun to encounter early graphical glitches associated with the Far Lands, such as "block-lag" (caused by floating-point precision errors).
  7697. If you look VERY closely, you may notice jumpiness around x=80000, z=80000
  7698. ]])
  7699. far_lands.close()
  7700. ghast=fs.open("mem/redworks/minepedia/ghast","w")
  7701. ghast.write([[Ghasts are very large jellyfish-like mobs that float through the air and shoot fireballs from their mouths. Their bodies are 4 by 4 by 4 block cubes with 9 tentacle-like limbs hanging from the bottom. They first appeared in the Halloween Update. Ghasts are able to spawn anywhere in the Nether, as long as there is sufficient space (5*5*5 space is required to spawn) and the game is not in Peaceful mode.
  7702. Behavior: Ghasts normally float around with their eyes and mouth closed and periodically make high-pitched, child-like sounds. They open their eyes and mouth when attacking. They make a chirp-like noise when shooting and scream loudly when taking damage. The sounds that Ghasts make have a minimum intensity regardless of their distance, so they often sound closer when they are actually far away. As of Beta 1.8.1, the Ghast will let out a death rattle upon being killed - similar to the death cries that Zombies and Spiders use when killed.
  7703. Unlike most other aggressive mobs, the Ghast does not have a pursuit mode - it does not attempt to draw closer to the player when at long range (and likewise is not particularly likely to float away). Compared to other mobs, the Ghast has a very long search range and can target a player up to 100 blocks away.[1] When the player comes within about sixteen blocks, the Ghast will open range and attempt to gain altitude.
  7704. Ghasts will not fire at the player without a line-of-sight - this can be blocked by Glass, Glass Panes, Leaves, Nether Portals, Vines, Iron Bars, both types of Fences, and Cobwebs - making safe scenic paths through the Nether a viable possibility. When not moving, Ghasts within firing range will face the player, giving the impression that they can see through transparent materials. Ghasts can draw a line-of-sight through curtains of lava, and their fireballs can pass through it meaning players near a pillar of lava can be struck without seeing the source. However, the Ghast can "cancel" its fireball while shooting if the player moves behind an obstruction or builds one.
  7705. Ghasts may drop a Ghast Tear when killed, but this can be hard to collect - because it is a flying mob, the tear may fall into lava or an inaccessible area. Ghast tears are a positive potion ingredient, so Ghast tears are well worth obtaining.
  7706. If shot at by a Ghast just try to hit the fireball back at the ghast, if you happen to hit the ghast it will die in one hit.
  7707. Ghast Fireball: The Ghast's fireball attack has a straight trajectory unaffected by gravity and an unlimited or very long range limited in practice only by the confines of the Nether's caverns. Their explosions can often be heard without the impact being seen. At close range, it is the most powerful mob attack in Minecraft, along with the blast of a Creeper. A direct hit from point blank range will deal a full 10 hearts of damage but damage decreases with distance and is less if the player is simply caught in the blast radius. Additionally, the projectile is fairly slow and aims slightly above the player's head. When two Ghast fireballs collide, one is deflected to a random direction while the other explodes upon impact. Hitting a Ghast fireball with an item held in hand, an empty hand or a fired arrow will deflect the fireball back in the direction it came. Prior to Beta 1.9 Pre-releases, it looked like a flaming snowball. Now it uses the same texture as a Blaze fireball.
  7708. If a Ghast's fireball hits a portal or hits close to it the portal will be closed,[2] requiring re-ignition. If the player manages to get a Ghast to fire at the portal while it is closed, it can be reignited using the fireball. Blocks originally ignited once struck, adding an extra hazard to fighting Ghasts; however, the fire is extinguished immediately afterwards because of a bug (fixed as of 1.9 pre 4.)
  7709. The minimum block resistance required to absorb all blast force of the Ghast's fireballs is 20.17, meaning that fences and other blocks with low blast resistance will be destroyed in a fireball explosion.
  7710. Fighting Ghasts:Ghasts are often considered the most difficult mob to kill in the nether owing to their extreme attack range, explosive attack power, mobility and flight. They are also quite common; players in any exposed area will have to deal with them sooner or later and possibly from the moment they step out of a portal. Ghast fireballs have a profound effect on Nether architecture, making a compelling case to use only materials resistant to their explosions for outer walls and exterior fittings in places where their fire may be drawn. As a result of their large size and the extreme unpleasantness of an indoor Ghast spawn, the primary defense mechanism for buildings in the Nether becomes enclosure rather than lighting. A Ghast's firepower is highly inaccurate at most ranges if one is moving. Players are most vulnerable when they are building in the Nether, when they may well not be moving and possibly standing above a long fall. Ghasts can also break blocks from under the player, often dropping them into lava or causing death through falling damage.
  7711. If the a Ghast is trapped in a small room, the player can make a defensive wall, make the Ghast shoot, and the fireball will kill the Ghast.
  7712. The player can reflect fireballs by hitting them with anything before they impact, even bare hands. Because of their low speed, spamming mouseclicks is often enough to deflect any given attack. It is possible to kill Ghasts by reflecting their attacks back at them, but it can be difficult since ghasts are agile and their hitbox is restricted to their tentacles. A reflected fireball is able to kill an unhurt ghast in one hit. You can make a fireball easily reflect in the direction you want by shooting an arrow, fishing rod, or snowball at the fireball. The fishing rod, when released, slightly affects the fireball's trajectory. This relationship goes both ways and a Ghast's constant stream of fireballs may well interfere with the firing arc of your bow.
  7713. Most Ghast kills are made with a bow and arrows for obvious reasons but a Ghast can be killed with melee weapons if the player can get close enough before it draws away. Ghasts are highly vulnerable when caught on the ground since their attacks can be deflected and their health is quite low - 2 blows from a diamond sword will destroy one. It is possible to use a fishing rod to draw Ghasts near enough to hit them with a sword. A close Ghast is also much easier to hit with a bow, though reaction time against its fireballs is likewise lessened. When aiming your bow, be sure to lead your shots as Ghasts can quickly change trajectory and move quite quickly. Depending on the Ghast's range and relative altitude, it is usually necessary to also aim at a high trajectory to gain extra range. Where possible, having the advantage in altitude (such as shooting from the topmost layer of the Nether) is of enormous help. If ammunition is not a concern, it is advisable to shoot many arrows at differing trajectories in order to find the range to the Ghast. The Ghast's hitbox is mainly its tentacles, and aiming too high may cause a shot to go through the Ghast's body, dealing no damage. However, it is perfectly practical to shoot the hitbox through the ephemeral body from above using plunging fire.
  7714. Much like using neutral or enemy mobs as shields against arrows fired by skeletons in the regular world, it is feasible to use zombie pigmen as shields against Ghasts in the Nether. It is possible to injure or kill zombie pigmen in this fashion without ever making them hostile to the player.
  7715. An effective method of fighting Ghasts in the nether is to make a shelter, preferably out of brick, cobblestone, obsidian, or other explosion-resistant materials. Make a 1x1 hole in the roof and add ladders leading up to it, in such a way that you can poke the upper half of your body through the roof. When a Ghast is near, climb the ladder, shoot an arrow at the Ghast and quickly descend again into your explosion-proof shelter. This should mean that you can kill Ghasts easily with minimal health loss. To improve this even further, add a small 3x3 roof 1 block above the hole in the main roof. Most of the Ghasts' fireballs will now hit this roof rather than you, meaning that you should be safe against most Ghast attacks.
  7716. To solve the issue of drops being impossible to reach, build a large floor to kill the Ghasts over. With a lot of extra time and cobblestone, a large structure with many floors, each tall enough for Ghasts to spawn inside of, can be built. This makes them very easy to farm, though it is very time and material intensive to make such a structure large enough for them to reliably spawn inside of.
  7717. Since the Beta 1.9 Pre-release 3, Ghasts do full 10 hearts damage when a direct hit from a Fireball is taken. Inversely, this means that deflecting a Ghast's fireball against itself will kill it instantly.
  7718. It will take a couple shots to kill a Ghast with a Bow or 2 hits from a diamond sword.
  7719. Resistance to Fire: Ghasts may also be set on fire, but fire and lava don't actually damage them. A similar effect is seen with zombie pigmen. When a Ghast is caught in lava, its movement is impeded, and can then be easily targeted with arrows. At around 23:09 in this video, a Ghast impeded by a lavafall can be seen, and again, but closer and for a longer period of time, at 23:59.  
  7720. A ghast set on fire by lava (not the fall shown on the picture, but lava below, which was cropped out).It is disputed that Ghasts can be killed by lava or fire if continually re-exposed. This is achieved by a Ghast floating in and out of lava. There have been reports of zombie pigmen dying while in lava, due to the fact they "bob" in and out of lava,(a rumor about zombie pigman is that in the lava they gain fall damage which affects them when they exit the pool of lava.) which raises doubt that Ghasts and zombie pigmen are completely lava/fireproof.
  7721. History: Ghasts were introduced in minecraft alpha 1.2.0 and was the first mob introduced to the nether as well as zombie pigman
  7722. Ghasts used to be vulnerable to fire and lava, but since the Alpha 1.2.2 update, this bug has been fixed and they no longer get hurt when they come in contact with lava or fire.[3]
  7723. Until Beta 1.7 Ghasts aimed at the camera, not the player, so by pressing F5, one could easily dodge their fireballs.
  7724. Ghasts used to not be affected by light, and appeared with the same brightness anywhere, but this was changed in Beta 1.9 Pre-release.
  7725. Since the Beta 1.8, Ghasts are more easily killed than in previous versions, due to the reworking of bow mechanics that came with the update.
  7726. Since 1.9, Ghasts are one of the few mobs that will not turn aggressive in creative mode, even when you hit it.
  7727. Since 1.9, Ghasts are killable by their own fireballs thus the achievement Return to sender.
  7728. Trivia: as of 1.1 in .minecraft/resource/newsound/mob/ghast, ghasts have an affectionate scream, which is a high piched horn sound (like the classic cartoon tugboat sounds).
  7729. In Creative Mode, you can go inside of a Ghast by falling through the top of it.
  7730. Contrary to popular belief, ghasts were not given the ability to spawn near portals in the Overworld. It was suggested that Ghasts had a small chance of occurring near a Nether Portal[4], but this was not officially implemented as a feature.[5]
  7731. Despite being fireproof, Ghasts and Zombie Pigmen are capable of drowning if under water or lava for too long. This means they, like the player and other mobs, require air to live.
  7732. Ghasts can cause other mobs to attack it, but the Ghast will never target other mobs; it will only target the Player.
  7733. It is possible to kill Zombie Pigmen by deflecting Ghasts' fireballs at them. It is also possible to deal a Critical hit on a fireball, since it is an entity.
  7734. Prior to the full release of Minecraft, when a Ghast shot a fireball, it looked like a flaming snowball; it has since been updated with a new magma stone texture.
  7735. Ghasts are the largest mob by volume - they are eight times as big as the largest variation of slime, but Enderdragons are longer.
  7736. It is impossible to 'ride' a Ghast as the player will fall right through it.
  7737. If a Ghast is trapped in a cube, it will shoot fireballs through the cube. This is because like all other things that shoot, it spawns the projectile one block in front of it.
  7738. Due to the explosive property of Ghast fireballs, they can be used to mine blocks in the Nether.
  7739. Ghasts (like all other flying mobs, including the Player in creative mode) can actually fly much higher than y-coordinate 128.
  7740. Using a tool to spawn a mob riding a ghast will cause the mob to be inside the ghast, unless it's a giant.
  7741. If hacked into the Overworld, Ghast's fireball can only destroy top layer blocks(grass, gravel, sand, etc...) and anything burnable such as wood and wooden planks
  7742. Ghasts take damage from touching cacti.
  7743. Similarly, for Ghasts on fire, the flame texture will enlarge on the Ghast.
  7744. Some rooms in Nether Ruins are big enough for a Ghast to spawn in. However, this Ghast will likely be trapped, as there may not be an exit large enough for it to fit through.
  7745. A Ghast's eyes appear to be full of tears, it is unknown why they are constantly crying/sobbing.
  7746. Ghasts, even though they can fly, will not spawn above water if it is hacked into the Nether.
  7747. If a Ghast is killed, any Fireball the Ghast has launched will disappear.
  7748. Bugs: Sometimes, if there is a 1-4 space between a platform, they will be trapped, but will still be able to fire at you.
  7749. Their hitbox data seems out of place. Objects will pass through the top of a Ghast, however, hitting its tentacles will hurt it.
  7750. Arrows will sometimes pass through the Ghast during server lag in SMP.
  7751. In SMP, their fireballs often move back and forth, similar to arrows. This is due to lag.
  7752. If spawned in the Overworld (by using hacks) in a glass cage, they will float and stare at the player, but Ghasts will sometimes unexpectedly shoot a fireball in the direction of the player even though there is a glass barrier between them and a player. This bug appears to be absent in the Nether.
  7753. A fireball will not disappear if in flight when switching to peaceful.
  7754. Ghasts' explosions are less "connected" to them in SMP than in SSP. For this reason in SMP mobs damaged by a Ghast's fireballs will not attempt to attack the Ghast and Ghasts that are either spawned or follow a player into the surface world (see below) can become divorced from their explosions and become an essentially peaceful mob. Similarly, Ghast explosions can sometimes follow a player into the real world, without any nearby ghasts, but these normally only appear in the form of apparently random explosion noises not connected to actual damage causing explosions.
  7755. When a player in an SMP server dies near Ghasts or is teleported out of the Nether to the surface world (not via a portal) there is a chance the Ghasts will follow them to their new location in the surface world. These Ghasts may act like normal Ghasts but could also behave radically differently than normal. Changes in teleported Ghasts include the Ghast-less explosions and Ghasts without explosions mentioned above. The teleported Ghast may also freeze in one location or "stalk" a certain player (moving closer to a player until they touch like a normal hostile mob) but both of these are extremely rare.
  7756. Arrows used to look bigger when they were stuck on Ghasts but as of beta 1.9 pre release this no longer happens.
  7757. Similarly, when a Ghast is on fire, the flame texture will be enlarged.
  7758. It is possible to deflect a ghasts fireball with a fishing hook, which will cause your line to move with the deflected fireball.
  7759. Sometimes, when the ghast is hit by an arrow (at full power/draw) at long range or while not in combat it will not die, though the arrow will still appear to become stuck in the ghast.
  7760. Sometimes, attacking a Ghast may not make it attack you when you are at a range of 16 blocks or less.
  7761. If you get too close and touch the ghast, it is so big that you will see yourself inside the ghast, and the body wall and the stubs of tentacles sticking out of the bottom
  7762. ]])
  7763. ghast.close()
  7764. hell=fs.open("mem/redworks/minepedia/hell","w")
  7765. hell.write([[The Nether is a different dimension existing in Minecraft worlds, first existing in Minecraft Alpha version 1.2.0 on October 30th, 2010 (The Minecraft Halloween Update).
  7766. Accessible via Portal, it can be used for travelling large distances on the above ground map quickly. The Nether also contains Block types not seen anywhere else, as well as supplies of Block types found on the normal world, like Mushrooms, Gravel and Lava. The Nether is home to four Mobs: Ghasts, Magma Cubes, Blazes, and Zombie Pigmen. All of these mobs are only found in the nether with the exception of Zombie Pigmen which spawn in the overworld when a pig is struck by lightning.
  7767. The Nether functions as a second map in a player's Minecraft World. When it is entered, the chunks from the above ground map are unloaded and the Nether chunks begin to load. Terrain generates infinitely here just like on the above ground map. If the player dies in the Nether, their items will stay there while the player respawns in the overworld.
  7768. Terrain: The Nether's terrain is largely composed of netherrack, which is arranged into large, smooth outcroppings and niches; it is essentially a cave. There are patches of gravel and soul sand, as well as stalactites of glowstone hanging from the ceiling. Mushrooms grow abundantly in the Nether, and natural fires are a common sight. Small tunnels form in the netherrack, which contain no ores or hidden caverns. Nether fortresses can be found as well. These Nether fortresses are made up of nether brick, Nether Brick Stairs, nether brick fences and crops of nether wart. At the very bottom, beneath an ocean of lava, is a layer of Netherrack and bedrock. The very top of the Nether is similarly bedrock.
  7769. Navigating the Nether can be very dangerous. The strange, dimly lit landscape conceals pits and sudden cliffs. Many lava streams flow from the ceilings, down the netherrack and into a lava ocean. If one dies near this lava or a patch of fire, it is a safe assumption that some of one's items will fall in and be burned.
  7770. The sky and fog in the Nether are dull dark red. Thunderstorms can cause the shade to flicker quickly, a known bug.
  7771. Environment: The Nether has no day/night cycle and no weather. The only natural sources of light are fire, lava, and glowstone. A dim ambient light can be seen throughout the Nether, but this is purely a visual effect and does not affect game mechanics. Contrary to some common myths, light works the same way in the Nether as it does in the Overworld: there are 16 levels of brightness and one level falls off for every block it radiates through.
  7772. Plants with minimum light requirements, such as flowers and Netherwart, can be planted almost anywhere in the Nether, even in complete darkness, because they can technically "see the sky" from any location. The exception, due to a bug, is anywhere below natural veins of glowstone or below lava source blocks that appear naturally in cave walls. Plants at any level below these formations, even if seperated by other terrain, will uproot if not adequately lit.
  7773. Blocks and Structures: Entries marked with a D require additional data to fully define the block in a Beta world. Entries marked with a T have tile entities associated with them to store additional data. Items with IDs in red cannot be legitimately obtained in the player's inventory in the game; they can only be obtained by "hacking" (such as the use of Inventory editors) or, in multi player using the /give server command. Items available only in Creative mode are in blue.  
  7774. Natural Blocks: Naturally Generated includes blocks that are created through the world seed.
  7775.  
  7776. Icon  Dec  Hex  Block type  
  7777. 00  00  Air  
  7778.  07  07  Bedrock  
  7779.  11  0B  Lava (stationary) D  
  7780.  13  0D  Gravel  
  7781.  39  27  Brown Mushroom  
  7782.  40  28  Red Mushroom  
  7783.  115  73  Nether Wart D  
  7784.  51  33  Fire D  
  7785.  87  57  Netherrack  
  7786.  88  58  Soul Sand  
  7787.  89  59  Glowstone Block  
  7788. Naturally CreatedNaturally Created means a combination of events that cause a new block to be placed by natural causes, not the player.
  7789.  
  7790. Icon  Dec  Hex  Block type  
  7791. 00  00  Air  
  7792.  10  0A  Lava (flowing) D  
  7793.  39  27  Brown Mushroom  
  7794.  40  28  Red Mushroom  
  7795.  49  31  Obsidian  
  7796.  90  5A  Portal  
  7797. Structures: Same as Naturally Generated, but these blocks will only be created with the "Generate Structures" option enabled. However, due to a bug, Nether Fortresses still generate even with "Generate Structures" set to "off".
  7798.  
  7799. Icon  Dec  Hex  Block type  
  7800. 00  00  Air  
  7801.  52  34  Monster Spawner T  
  7802.  112  70  Nether Brick  
  7803.  113  71  Nether Brick Fence  
  7804.  114  72  Nether Brick StairsD  
  7805.  115  73  Nether Wart D  
  7806.  
  7807. Nether Affected Materials:
  7808. When Grass blocks are obtained using a tool with the "Silk Touch" enchantment, such as a shovel, and taken into the Nether, it becomes possible to have grass in the nether. Using Water Buckets will only cause the water to sizzle and leave steam. This makes growing Sugar Cane impossible since the plant requires water to survive. Wheat farms are also affected by this. They can survive without water, although they will grow much more slowly.
  7809. Actual blocks of water can be placed in the Nether, but this requires Inventory Hacking or Map Editing. Blocks of Ice that have been hacked into the game, spawned via Creative Mode, or acquired through mods can be placed and broken to leave water blocks behind as well.
  7810. Trees will grow normally, and their leaves will take a dead-looking brownish color, like in Desert biomes. However, they grow in odd formations and occasionally morph shapes when they are altered. This makes Nether-trees useful for traps or endless log harvesting on occasion. Trees are also hard to keep in the Nether because of the substantial amount of lava, which ignites them.
  7811. It is always a good idea to bring paper down into the Nether, and then craft a map. Getting lost is easy and happens frequently. Compasses and Clocks can be brought in freely, but they will not work correctly. As the Nether is in a totally different dimension from the Overworld, Compasses will be unable to find the original spawn point, and Clocks cannot determine the position of the sun. Their arrows and dials will instead spin and flail madly. Maps made on the above ground dimension wont show the player's position in the other dimension. For Maps to display the Nether, they must be Crafted there. Beds will explode when a player attempts to sleep in one. This can be a useful strategy to quickly mine materials in the Nether, but only if the difficulty is set to peaceful.[1]
  7812. Lava flows twice as far in the Nether than in the Overworld (generally 8 blocks, instead of 4 blocks).
  7813. Mobs: The Nether is home to its own share of mobs.
  7814. Ghasts, huge jellyfish-like creatures, will lazily hover around. They are 4974974 blocks large, and have 9 tentacles hanging from them. If they spot the player, they will spit flaming bombs at them, which can be deflected by shooting arrows at them, punching them or hitting them with any tool. The reflected fireballs will instantly kill the Ghast, if it is hit. These will explode and often leave craters, if the blast-site is weak enough. They make screeching and whimpering noises, something like a kitten or an angry baby, and can be heard for great distances.
  7815. Zombie Pigmen spawn in groups and wander aimlessly. They will not harm the player unless attacked. If they are, all the Pigmen within a 32 block radius rush the player, often causing ambushes from behind as the player attempts to attack while fleeing.
  7816. Blazes are able to float and shoot 3 fireballs at the player in a quick succession. They appear to catch fire just before shooting said fireballs, then "cool down" until they can shoot again.
  7817. Magma Cubes are spring-like mobs that slowly hop towards the player. If killed, they split into 2-3 smaller versions of the original one. Magma Cubes are occasinally rare.
  7818. Nether mobs are completely fire-proof and can often be seen wandering into lava, where it will take them a while to get out due to the slowdown it causes on movement.
  7819. Normal World Mobs like Pigs and Zombies will not spawn in the Nether. Chickens can be forced to spawn there if they hatch from a thrown Egg, however, but they will not spawn naturally afterward. Squid will spawn in large amounts in any hacked body of Water due to the fact that the water is the only suitable place in the whole map. Creative mode mob spawning eggs still work in the nether, so if you reach the nether in creative mode, you may have every mob.
  7820. Portals and Fast Travel: Nether Portals are made by creating a 4x5 (2x3 on inside) door frame out of Obsidian and then lighting the inside of the frame on fire with Flint and Steel or a Ghast's fireball. When you stand inside the portal for the first time, it will create a portal in its equivalent area of The Nether. A loading screen will appear during the change of worlds.
  7821. If you create a portal in the Nether and re-enter the normal world, any distance covered in The Nether is multiplied by 8, effectively making The Nether a fast travel zone that allows for greater distances to be covered in a short amount of time in the normal world. Linking a network of portals between the Nether and the Overworld can be tricky though. See the Nether Portal page for the precise details of how this can be done.
  7822. Due to Ghasts, it is recommended that players enclose their portals with a blast-resistant material (Cobblestone is cheap and effective). This will prevent Ghasts from being able to hit the portal and shut it down. Optionally, the player can choose to carry a Flint and Steel with them in case this happens, or just trick a Ghast into shooting the portal again, therefore effectively re-activating the portal.
  7823. It is not possible to get to the Nether via The End.
  7824. History: The Nether was one of the key features to be added in the Minecraft Halloween Update, and was announced on October 4th, 2010. This announcement stated that there would be a "hell world" that could be used for fast travel. It hinted it would utilize Portals and that distance travelled inside the would be multiplied greatly on the map above ground. On October 10, a screenshot was released by Notch depicting what the Nether would look like. With the rest of the Halloween Update's features, the Nether was released on October 30.
  7825. In the original announcement, Notch mentioned "a brand new Hell world." When the preview was sent out on 29 October 2010 to a couple of gaming websites, the new dimension was called the Slip to avoid offending religions and to have a more original name. It was referred to as 'The Nexus' on his personal blog. It was finally changed to ?0�the Nether?0� on the day of the Halloween update release.
  7826. Along with the Nether, Ghasts, Zombie Pigmen, Netherrack, Soul Sand, Glowstone and Portals were added. On November 10th, Lava was made to flow farther than it did on the Overworld.
  7827. There was a glitch where The Nether was a Biome. This was fixed in an unknown update.
  7828. In Beta 1.6, Portals were made to function properly in multi player, allowing players in servers to warp between the Overworld and the Nether.[2] 1.6 also fixed a bug where the player could have menus open while inside Portals. When warping, the text on screen would appear totally grey.
  7829. In Beta 1.6.2 Beds in the Nether were made to explode if used. This can be used as a mining technique.
  7830. With the "Silk Touch" enchantment in the 1.9 pre-release 4, it was possible to legitimately obtain grass and water using ice in the Nether. Because passive mobs and squids will spawn in the only place available, it was possible to use this to control the spawning, which allowed the player to make highly efficient passive mob grinder, something extremely difficult to do in the overworld since animals stopped despawning in 1.8. The ability to pick up ice blocks with the enchantment was removed in a later version . Water also made Nether mob grinders easier as it can transport items without burning them as well as drown Nether mobs that are immune to lava, such as magma cubes and zombie pigmen.
  7831. In Minecraft 1.0.0, many new things were added to the Nether:
  7832. Magma Cubes
  7833. Blazes and Blaze spawners
  7834. Nether Fortresses and the blocks they are made of
  7835. Nether Wart
  7836. Ghast Tears dropped by Ghasts
  7837. File Save Location: The Nether is saved in the same way normal worlds are, but instead of mixing the world files inside the save folder, the files for Nether are stored in %appdata%/.minecraft/saves/Worldname/DIM-1 (on Windows), whereas normal world files in %appdata%/.minecraft/saves/Worldname. Note that DIM-1 does not contain its own level.dat, as the same level.dat in the upper folder is used for both Overworld and Nether. This means that even if a player changes the level data in the /world folder for a particular save, Nether portals will still take the player to the Nether world originally generated for that save.
  7838. ]])
  7839. hell.close()
  7840. hellslime=fs.open("mem/redworks/minepedia/hellslime","w")
  7841. hellslime.write([[Magma Cubes are hostile mobs found around The Nether. When killed, they release 2-4 smaller versions of themselves in addition to Experience Orbs, similar to Slimes. When they move, they jump up and momentarily unravel into several layers, giving them the appearance of a spring and revealing a molten lava core inside. They are slowed by and sink in lava, but do not drown in it.
  7842. Behavior: In their passive state, Magma Cubes move slowly, jumping forward every two seconds or so. Upon spotting a player, magma cubes will jump towards them more quickly, but the player can still outrun them. It seems that Magma Cubes try to eat the player. Also, they will try to damage the player by jumping directly on top of you. However, they cannot damage other mobs like this.
  7843. History: Magma cubes were first seen in Minecraft 1.9 Beta Pre-Release 1. They were also added in the full release of Minecraft.
  7844. Prior to Minecraft 1.0 RC1, Magma Cubes did not make sounds.
  7845. Trivia: Magma Cubes cannot swim in lava, only jump along the bottom. Thus, they can get trapped in deep lava, although they will not drown.
  7846. Magma Cubes seem to be the Nether equivalent of Slimes. Although they appear similar, the components of their texture files are quite different.
  7847. Contrary to popular belief, Magma Cubes are actually less abundant in the Nether Fortresses than in the rest of the Nether due to fewer large flat surfaces to spawn on.
  7848. Every Magma Cube size drops experience orbs, not only the smallest cube. This means that killing a huge cube and all its spawnlings would grant the player 28 experience, as opposed to 5 experience of other hostile mobs.
  7849. Despite trying, Magma Cubes are unable to jump in water, although they can move around. They will drown if completely submerged.
  7850. Unlike tiny slimes, tiny Magma Cubes can still hurt the player.
  7851. Unlike Slimes, which are rare and only appear below layer 40 in certain chunks of the normal world, Magma Cubes can appear anywhere in the Nether.
  7852. Magma cubes are often found in lava, since they are unaffected by it.
  7853. Like Slimes, when a magma cube is not chasing the player it will hop in one direction.
  7854. Magma cubes can be spawned in the overworld if a spawner is hacked to spawn them. They do not require netherrack.
  7855. It seems that Magma cubes (or at least tiny ones) can only damage you using their bottom side.
  7856. Magma cubes do not seem to take fall damage. A large has been witnessed to fall from a ledge that would normally be deadly, yet take no damage. This may be due to their large jumping height.
  7857. Bugs: Magma Cubes do not seem to use their spring-like jump effect in multiplayer.
  7858. They also seem to frequently glitch through walls, ceilings, and floors, to attack players on the other side; dropping down through the solid roof of a tunnel, for example, then glitching back up to the roof out of sword reach. Or they will lunge out through the walls of a tower while a player is descending via a gravel pillar, and push them off said pillar without causing attack damage. They also seem to sink into Soul Sand, being invulnerable while merged inside a Soul Sand block, yet being able to jump up and attack from inside their protective glitch.
  7859.  
  7860. ]])
  7861. hellslime.close()
  7862. herobrine=fs.open("mem/redworks/minepedia/herobrine","w")
  7863. herobrine.write([[Herobrine is the subject of a community-made "creepy-pasta". He is a human entity, but with white eyes, and often seen as a dead miner.
  7864. The Story Behind Herobrine: Herobrine creates random constructions, such as pyramids and long 2-block-high tunnels. He also burns down, or cut off leaves from trees, and creates cobblestone-complexes underground, much like dungeons, lit with redstone torches. He often appears at the edge of fog, in a tiny render distance.
  7865. Variations: There are many variations of Herobrine's behaviour, but they usually fall under two categories.
  7866. The stalker version of Herobrine is Notch's brother, who stalks the player, disappearing if approached.
  7867. The miner version of Herobrine is a vengeful miner that tries to ensnare the player in traps, presumably to steal their items. He waits for people to enter his dungeons, then either seals them inside, or "teleports" behind them, presumably killing them. Some variations of this particular version says he breaks the player's creations, and steals their items from chests.
  7868. Origins and Popularity: Herobrine first appeared in a single image detailing an encounter. It was posted on a thread in the forums, and gained very little attention. It stated how Herobrine had appeared in someone's single-player game, littering the map with various pyramids and tunnels.
  7869. It was only later that Herobrine grew in popularity, when the Brocast staff staged a hoax in one of their live-streams. Herobrine was introduced to the stream here (at 20:45).
  7870. Later on, there was another video showing Herobrine in a user-made lava field. The livestream went down after the player ran and saved, only to resume ten minutes later, where Herobrine had disappeared.
  7871. During this stream, the player can be heard talking to his wife, stating he was trolling, which flooded the livestream chat with outrage. The player then faked a game crash.
  7872. During this crash, all watchers were redirected to another page, featuring Herobrine's face, but with real, frantically rolling eyes in the place of his block eyes, modified to be completely black.
  7873. When viewing the page's source, there were a jumble of characters and letters. after removing all non-alphabet characters, the following message was revealed.
  7874. It has been reported that some victims of torture, during the act, would retreat into a fantasy world from which they could not WAKE UP. In this catatonic state, the victim lived in a world just like their normal one, except they weren't being tortured. The only way that they realized they needed to WAKE UP was a note they found in their fantasy world. It would tell them about their condition, and tell them to WAKE UP. Even then, it would often take months until they were ready to discard their fantasy world and PLEASE WAKE UP.  
  7875. The message keeps telling the viewer to "wake up", implying they're living in a fantasy world, and this text hidden in the page is their "note".
  7876. It is widely believed all of his appearances in the stream and outside are retextured paintings, retextured iron doors or other players, albeit with the name tag removed above their head.
  7877. Since then, there has been a huge increase in his popularity, propelling Herobrine to meme status, making moderators of the wiki and forums need to take extra steps to stem the flow of user-made spam.
  7878. Future Update: Notch posted on twitter about the subject of Herobrine, early in his popularity boost.
  7879.  
  7880. RavenBurga Is "he" a real entity ingame or is it just a successful_troll.swf?  
  7881. Notch It's not real. =) But it might be soon!  
  7882. This confirmed there was no Herobrine, but suggested Notch planned to add him at a later date.
  7883. At Minecraftcon 2010, Notch confirmed Herobrine will be in the game, probably in a "seecret friday update".
  7884. Due to increased drama surrounding the Herobrine page, a wiki moderator asked notch over IRC if Herobrine would be added:
  7885. 12:25 Kizzycocoa [...] is there any confirmation on his upcoming existence in MC?  
  7886. 12:27 Notch i have no plans of adding herobrine as is, but I do like the rumors, haha  
  7887. This shows Notch has decided against adding Herobrine. However, the fact that "as is" suggested that something like Herobrine may be added, fuelling beliefs he will be added even further. So, once again, the same user asked for clarification
  7888. 8:09 AM Oct 20th Kizzycocoa [...] the entire community is getting frustrated by the hero-spam  
  7889. 8:56 AM Oct 20th Notch i have no plans of adding herobrine.[2]  
  7890.  
  7891. ]])
  7892. herobrine.close()
  7893. ids=fs.open("mem/redworks/minepedia/ids","w")
  7894. ids.write([[These data values refer to the different types of blocks and items. They are used in many, many places in Minecraft. Block IDs are used to define blocks placed in the world and inventory items (including items in chests and items dropped in the world). Item IDs are only valid for items. Each inventory slot has a unique slot number. In a Beta world, Block data further defines blocks placed, describing for example the height of water or the direction a torch points.
  7895. Icon  Dec  Hex  Block type  
  7896. 00  00  Air  
  7897.  01  01  Stone  
  7898.  02  02  Grass  
  7899.  03  03  Dirt  
  7900.  04  04  Cobblestone  
  7901.  05  05  Wooden Planks  
  7902.  06  06  Saplings D B  
  7903.  07  07  Bedrock  
  7904.  08  08  Water D  
  7905.  09  09  Stationary water D  
  7906.  10  0A  Lava D  
  7907.  11  0B  Stationary lava D  
  7908.  12  0C  Sand  
  7909.  13  0D  Gravel  
  7910.  14  0E  Gold Ore  
  7911.  15  0F  Iron Ore  
  7912.  16  10  Coal Ore  
  7913.  17  11  Wood D B  
  7914.  18  12  Leaves D B  
  7915.  19  13  Sponge  
  7916.  20  14  Glass  
  7917.  21  15  Lapis Lazuli Ore  
  7918.  22  16  Lapis Lazuli Block  
  7919.  23  17  Dispenser D T  
  7920.  24  18  Sandstone  
  7921.  25  19  Note Block T  
  7922.  26  1A  Bed D I  
  7923.  27  1B  Powered Rail D  
  7924.  28  1C  Detector Rail D  
  7925.  29  1D  Sticky Piston D  
  7926.  30  1E  Cobweb  
  7927.  31  1F  Tall Grass D  
  7928. Icon  Dec  Hex  Block type  
  7929.  32  20  Dead Bush  
  7930.  33  21  Piston D  
  7931.  34  22  Piston Extension D  
  7932.  35  23  Wool D B  
  7933.  36  24  Block moved by Piston T  
  7934.  37  25  Dandelion  
  7935.  38  26  Rose  
  7936.  39  27  Brown Mushroom  
  7937.  40  28  Red Mushroom  
  7938.  41  29  Block of Gold  
  7939.  42  2A  Block of Iron  
  7940.  43  2B  Double Slabs D B  
  7941.  44  2C  Slabs D B  
  7942.  45  2D  Bricks  
  7943.  46  2E  TNT  
  7944.  47  2F  Bookshelf  
  7945.  48  30  Moss Stone  
  7946.  49  31  Obsidian  
  7947.  50  32  Torch D  
  7948.  51  33  Fire D  
  7949.  52  34  Monster Spawner T  
  7950.  53  35  Wooden Stairs D  
  7951.  54  36  Chest D T  
  7952.  55  37  Redstone Wire D I  
  7953.  56  38  Diamond Ore  
  7954.  57  39  Block of Diamond  
  7955.  58  3A  Crafting Table  
  7956.  59  3B  Wheat Seeds D  
  7957.  60  3C  Farmland D  
  7958.  61  3D  Furnace D T  
  7959.  62  3E  Burning Furnace D T  
  7960.  63  3F  Sign Post D I T  
  7961. Icon  Dec  Hex  Block type  
  7962.  64  40  Wooden Door D I  
  7963.  65  41  Ladders D  
  7964.  66  42  Rails D  
  7965.  67  43  Cobblestone Stairs D  
  7966.  68  44  Wall Sign D T  
  7967.  69  45  Lever D  
  7968.  70  46  Stone Pressure Plate D  
  7969.  71  47  Iron Door D I  
  7970.  72  48  Wooden Pressure Plate D  
  7971.  73  49  Redstone Ore  
  7972.  74  4A  Glowing Redstone Ore  
  7973.  75  4B  Redstone Torch ("off" state) D  
  7974.  76  4C  Redstone Torch ("on" state) D  
  7975.  77  4D  Stone Button D  
  7976.  78  4E  Snow D  
  7977.  79  4F  Ice  
  7978.  80  50  Snow Block  
  7979.  81  51  Cactus D  
  7980.  82  52  Clay Block  
  7981.  83  53  Sugar Cane D I  
  7982.  84  54  Jukebox D T  
  7983.  85  55  Fence  
  7984.  86  56  Pumpkin D  
  7985.  87  57  Netherrack  
  7986.  88  58  Soul Sand  
  7987.  89  59  Glowstone Block  
  7988.  90  5A  Portal  
  7989.  91  5B  Jack-O-Lantern D  
  7990.  92  5C  Cake Block D I  
  7991.  93  5D  Redstone Repeater ("off" state) D I  
  7992.  94  5E  Redstone Repeater ("on" state) D I  
  7993.  95  5F  Locked Chest  
  7994. Icon  Dec  Hex  Block type  
  7995.  96  60  Trapdoor D  
  7996.  97  61  Hidden Silverfish D  
  7997.  98  62  Stone Bricks D B  
  7998.  99  63  Huge Brown Mushroom D  
  7999.  100  64  Huge Red Mushroom D  
  8000.  101  65  Iron Bars  
  8001.  102  66  Glass Pane  
  8002.  103  67  Melon  
  8003.  104  68  Pumpkin Stem D  
  8004.  105  69  Melon Stem D  
  8005.  106  6A  Vines D  
  8006.  107  6B  Fence Gate D  
  8007.  108  6C  Brick Stairs D  
  8008.  109  6D  Stone Brick Stairs D  
  8009.  110  6E  Mycelium  
  8010.  111  6F  Lily Pad  
  8011.  112  70  Nether Brick  
  8012.  113  71  Nether Brick Fence  
  8013.  114  72  Nether Brick Stairs D  
  8014.  115  73  Nether Wart D I  
  8015.  116  74  Enchantment Table T  
  8016.  117  75  Brewing Stand D T I  
  8017.  118  76  Cauldron D I  
  8018.  119  77  End Portal T  
  8019.  120  78  End Portal Frame D  
  8020.  121  79  End Stone  
  8021.  122  7A  Dragon Egg  
  8022. Item IDs All items have values above 255, making it easy to separate the Block IDs from the Item IDs. Entries marked with a D require additional data to fully define the item in a Beta world. The chainmail set is currently unobtainable in Survival mode without hacking or, in multiplayer, the /give server command. It is available in Creative mode, however. The same applies to all music discs except for 13 and cat.
  8023.  
  8024. Icon  Dec  Hex  Item  
  8025. 256  100  Iron Shovel  
  8026. 257  101  Iron Pickaxe  
  8027. 258  102  Iron Axe  
  8028. 259  103  Flint and Steel  
  8029. 260  104  Red Apple  
  8030. 261  105  Bow  
  8031. 262  106  Arrow  
  8032. 263  107  Coal D  
  8033. 264  108  Diamond  
  8034. 265  109  Iron Ingot  
  8035. 266  10A  Gold Ingot  
  8036. 267  10B  Iron Sword  
  8037. 268  10C  Wooden Sword  
  8038. 269  10D  Wooden Shovel  
  8039. 270  10E  Wooden Pickaxe  
  8040. 271  10F  Wooden Axe  
  8041. 272  110  Stone Sword  
  8042. 273  111  Stone Shovel  
  8043. 274  112  Stone Pickaxe  
  8044. 275  113  Stone Axe  
  8045. 276  114  Diamond Sword  
  8046. 277  115  Diamond Shovel  
  8047. 278  116  Diamond Pickaxe  
  8048. 279  117  Diamond Axe  
  8049. 280  118  Stick  
  8050. 281  119  Bowl  
  8051. 282  11A  Mushroom Soup  
  8052. 283  11B  Gold Sword  
  8053. 284  11C  Gold Shovel  
  8054. 285  11D  Gold Pickaxe  
  8055. 286  11E  Gold Axe  
  8056. 287  11F  String  
  8057. Icon  Dec  Hex  Item  
  8058. 288  120  Feather  
  8059. 289  121  Gunpowder  
  8060. 290  122  Wooden Hoe  
  8061. 291  123  Stone Hoe  
  8062. 292  124  Iron Hoe  
  8063. 293  125  Diamond Hoe  
  8064. 294  126  Gold Hoe  
  8065. 295  127  Seeds  
  8066. 296  128  Wheat  
  8067. 297  129  Bread  
  8068. 298  12A  Leather Cap  
  8069. 299  12B  Leather Tunic  
  8070. 300  12C  Leather Pants  
  8071. 301  12D  Leather Boots  
  8072. 302  12E  Chain Helmet  
  8073. 303  12F  Chain Chestplate  
  8074. 304  130  Chain Leggings  
  8075. 305  131  Chain Boots  
  8076. 306  132  Iron Helmet  
  8077. 307  133  Iron Chestplate  
  8078. 308  134  Iron Leggings  
  8079. 309  135  Iron Boots  
  8080. 310  136  Diamond Helmet  
  8081. 311  137  Diamond Chestplate  
  8082. 312  138  Diamond Leggings  
  8083. 313  139  Diamond Boots  
  8084. 314  13A  Gold Helmet  
  8085. 315  13B  Gold Chestplate  
  8086. 316  13C  Gold Leggings  
  8087. 317  13D  Gold Boots  
  8088. 318  13E  Flint  
  8089. 319  13F  Raw Porkchop  
  8090. Icon  Dec  Hex  Item  
  8091. 320  140  Cooked Porkchop  
  8092. 321  141  Paintings  
  8093. 322  142  Golden Apple  
  8094. 323  143  Sign  
  8095. 324  144  Wooden door  
  8096. 325  145  Bucket  
  8097. 326  146  Water bucket  
  8098. 327  147  Lava bucket  
  8099. 328  148  Minecart  
  8100. 329  149  Saddle  
  8101. 330  14A  Iron door  
  8102. 331  14B  Redstone  
  8103. 332  14C  Snowball  
  8104. 333  14D  Boat  
  8105. 334  14E  Leather  
  8106. 335  14F  Milk  
  8107. 336  150  Clay Brick  
  8108. 337  151  Clay  
  8109. 338  152  Sugar Cane  
  8110. 339  153  Paper  
  8111. 340  154  Book  
  8112. 341  155  Slimeball  
  8113. 342  156  Minecart with Chest  
  8114. 343  157  Minecart with Furnace  
  8115. 344  158  Egg  
  8116. 345  159  Compass  
  8117. 346  15A  Fishing Rod  
  8118. 347  15B  Clock  
  8119. 348  15C  Glowstone Dust  
  8120. 349  15D  Raw Fish  
  8121. 350  15E  Cooked Fish  
  8122. 351  15F  Dye D  
  8123. Icon  Dec  Hex  Item  
  8124. 352  160  Bone  
  8125. 353  161  Sugar  
  8126. 354  162  Cake  
  8127. 355  163  Bed  
  8128. 356  164  Redstone Repeater  
  8129. 357  165  Cookie  
  8130. 358  166  Map  
  8131. 359  167  Shears  
  8132. 360  168  Melon Slice  
  8133. 361  169  Pumpkin Seeds  
  8134. 362  16A  Melon Seeds  
  8135. 363  16B  Raw Beef  
  8136. 364  16C  Steak  
  8137. 365  16D  Raw Chicken  
  8138. 366  16E  Cooked Chicken  
  8139. 367  16F  Rotten Flesh  
  8140. 368  170  Ender Pearl  
  8141. 369  171  Blaze Rod  
  8142. 370  172  Ghast Tear  
  8143. 371  173  Gold Nugget  
  8144. 372  174  Nether Wart  
  8145. 373  175  Potions D  
  8146. 374  176  Glass Bottle  
  8147. 375  177  Spider Eye  
  8148. 376  178  Fermented Spider Eye  
  8149. 377  179  Blaze Powder  
  8150. 378  17A  Magma Cream  
  8151. 379  17B  Brewing Stand  
  8152. 380  17C  Cauldron  
  8153. 381  17D  Eye of Ender  
  8154. 382  17E  Glistering Melon  
  8155. 383  17F  Spawner Egg D  
  8156. Icon  Dec  Hex  Item  
  8157. 2256  8D0  13 Disc  
  8158. 2257  8D1  Cat Disc  
  8159. 2258  8D2  blocks Disc  
  8160. 2259  8D3  chirp Disc  
  8161. 2260  8D4  far Disc  
  8162. 2261  8D5  mall Disc  
  8163. 2262  8D6  mellohi Disc  
  8164. 2263  8D7  stal Disc  
  8165. 2264  8D8  strad Disc  
  8166. 2265  8D9  ward Disc  
  8167. 2266  8DA  11 Disc  
  8168. Entity IDs Icon  Dec  Hex  Entity  
  8169. Drops  
  8170. 1  01  Dropped item  
  8171. 2  02  Experience Orb  
  8172. Projectiles  
  8173. 10  0A  Shot arrow  
  8174. 11  0B  Thrown snowball  
  8175. 12  0C  Ghast fireball  
  8176. 13  0D  Blaze fireball  
  8177. 14  0E  Thrown Ender Pearl  
  8178. 15  0F  Thrown Eye of Ender  
  8179. Blocks  
  8180. 20  14  Primed TNT  
  8181. 21  15  Falling block (gravel, sand)  
  8182. Vehicles  
  8183. 40  28  Minecart  
  8184. 41  29  Boat  
  8185. Icon  Dec  Hex  Entity  
  8186. Hostile mobs  
  8187. 50  32  Creeper  
  8188. 51  33  Skeleton  
  8189. 52  34  Spider  
  8190. 53  35  Giant  
  8191. 54  36  Zombie  
  8192. 55  37  Slime  
  8193. 56  38  Ghast  
  8194. 57  39  Zombie Pigman  
  8195. 58  3A  Enderman  
  8196. 59  3B  Cave Spider  
  8197. 60  3C  Silverfish  
  8198. 61  3D  Blaze  
  8199. 62  3E  Magma Cube  
  8200. 63  3F  Enderdragon  
  8201. Icon  Dec  Hex  Entity  
  8202. Passive mobs  
  8203. 90  5A  Pig  
  8204. 91  5B  Sheep  
  8205. 92  5C  Cow  
  8206. 93  5D  Chicken  
  8207. 94  5E  Squid  
  8208. 95  5F  Wolf  
  8209. 96  60  Mooshroom  
  8210. 97  61  Snow Golem  
  8211. NPCs  
  8212. 120  78  Villager  
  8213. Other  
  8214. 200  C8  Ender Crystal  
  8215. Icon  Dec  Hex  Block type  
  8216. 00  00  Air  
  8217.  01  01  Stone  
  8218.  02  02  Grass  
  8219.  03  03  Dirt  
  8220.  04  04  Cobblestone  
  8221.  05  05  Wooden Planks  
  8222.  06  06  Saplings D B  
  8223.  07  07  Bedrock  
  8224.  08  08  Water D  
  8225.  09  09  Stationary water D  
  8226.  10  0A  Lava D  
  8227.  11  0B  Stationary lava D  
  8228.  12  0C  Sand  
  8229.  13  0D  Gravel  
  8230.  14  0E  Gold Ore  
  8231.  15  0F  Iron Ore  
  8232.  16  10  Coal Ore  
  8233.  17  11  Wood D B  
  8234.  18  12  Leaves D B  
  8235.  19  13  Sponge  
  8236.  20  14  Glass  
  8237.  21  15  Lapis Lazuli Ore  
  8238.  22  16  Lapis Lazuli Block  
  8239.  23  17  Dispenser D T  
  8240.  24  18  Sandstone  
  8241.  25  19  Note Block T  
  8242.  26  1A  Bed D I  
  8243.  27  1B  Powered Rail D  
  8244.  28  1C  Detector Rail D  
  8245.  29  1D  Sticky Piston D  
  8246.  30  1E  Cobweb  
  8247.  31  1F  Tall Grass D  
  8248. Icon  Dec  Hex  Block type  
  8249.  32  20  Dead Bush  
  8250.  33  21  Piston D  
  8251.  34  22  Piston Extension D  
  8252.  35  23  Wool D B  
  8253.  36  24  Block moved by Piston T  
  8254.  37  25  Dandelion  
  8255.  38  26  Rose  
  8256.  39  27  Brown Mushroom  
  8257.  40  28  Red Mushroom  
  8258.  41  29  Block of Gold  
  8259.  42  2A  Block of Iron  
  8260.  43  2B  Double Slabs D B  
  8261.  44  2C  Slabs D B  
  8262.  45  2D  Bricks  
  8263.  46  2E  TNT  
  8264.  47  2F  Bookshelf  
  8265.  48  30  Moss Stone  
  8266.  49  31  Obsidian  
  8267.  50  32  Torch D  
  8268.  51  33  Fire D  
  8269.  52  34  Monster Spawner T  
  8270.  53  35  Wooden Stairs D  
  8271.  54  36  Chest D T  
  8272.  55  37  Redstone Wire D I  
  8273.  56  38  Diamond Ore  
  8274.  57  39  Block of Diamond  
  8275.  58  3A  Crafting Table  
  8276.  59  3B  Wheat Seeds D  
  8277.  60  3C  Farmland D  
  8278.  61  3D  Furnace D T  
  8279.  62  3E  Burning Furnace D T  
  8280.  63  3F  Sign Post D I T  
  8281. Icon  Dec  Hex  Block type  
  8282.  64  40  Wooden Door D I  
  8283.  65  41  Ladders D  
  8284.  66  42  Rails D  
  8285.  67  43  Cobblestone Stairs D  
  8286.  68  44  Wall Sign D T  
  8287.  69  45  Lever D  
  8288.  70  46  Stone Pressure Plate D  
  8289.  71  47  Iron Door D I  
  8290.  72  48  Wooden Pressure Plate D  
  8291.  73  49  Redstone Ore  
  8292.  74  4A  Glowing Redstone Ore  
  8293.  75  4B  Redstone Torch ("off" state) D  
  8294.  76  4C  Redstone Torch ("on" state) D  
  8295.  77  4D  Stone Button D  
  8296.  78  4E  Snow D  
  8297.  79  4F  Ice  
  8298.  80  50  Snow Block  
  8299.  81  51  Cactus D  
  8300.  82  52  Clay Block  
  8301.  83  53  Sugar Cane D I  
  8302.  84  54  Jukebox D T  
  8303.  85  55  Fence  
  8304.  86  56  Pumpkin D  
  8305.  87  57  Netherrack  
  8306.  88  58  Soul Sand  
  8307.  89  59  Glowstone Block  
  8308.  90  5A  Portal  
  8309.  91  5B  Jack-O-Lantern D  
  8310.  92  5C  Cake Block D I  
  8311.  93  5D  Redstone Repeater ("off" state) D I  
  8312.  94  5E  Redstone Repeater ("on" state) D I  
  8313.  95  5F  Locked Chest  
  8314. Icon  Dec  Hex  Block type  
  8315.  96  60  Trapdoor D  
  8316.  97  61  Hidden Silverfish D  
  8317.  98  62  Stone Bricks D B  
  8318.  99  63  Huge Brown Mushroom D  
  8319.  100  64  Huge Red Mushroom D  
  8320.  101  65  Iron Bars  
  8321.  102  66  Glass Pane  
  8322.  103  67  Melon  
  8323.  104  68  Pumpkin Stem D  
  8324.  105  69  Melon Stem D  
  8325.  106  6A  Vines D  
  8326.  107  6B  Fence Gate D  
  8327.  108  6C  Brick Stairs D  
  8328.  109  6D  Stone Brick Stairs D  
  8329.  110  6E  Mycelium  
  8330.  111  6F  Lily Pad  
  8331.  112  70  Nether Brick  
  8332.  113  71  Nether Brick Fence  
  8333.  114  72  Nether Brick Stairs D  
  8334.  115  73  Nether Wart D I  
  8335.  116  74  Enchantment Table T  
  8336.  117  75  Brewing Stand D T I  
  8337.  118  76  Cauldron D I  
  8338.  119  77  End Portal T  
  8339.  120  78  End Portal Frame D  
  8340.  121  79  End Stone  
  8341.  122  7A  Dragon Egg  
  8342. Item IDs All items have values above 255, making it easy to separate the Block IDs from the Item IDs. Entries marked with a D require additional data to fully define the item in a Beta world. The chainmail set is currently unobtainable in Survival mode without hacking or, in multiplayer, the /give server command. It is available in Creative mode, however. The same applies to all music discs except for 13 and cat.
  8343.  
  8344. Icon  Dec  Hex  Item  
  8345. 256  100  Iron Shovel  
  8346. 257  101  Iron Pickaxe  
  8347. 258  102  Iron Axe  
  8348. 259  103  Flint and Steel  
  8349. 260  104  Red Apple  
  8350. 261  105  Bow  
  8351. 262  106  Arrow  
  8352. 263  107  Coal D  
  8353. 264  108  Diamond  
  8354. 265  109  Iron Ingot  
  8355. 266  10A  Gold Ingot  
  8356. 267  10B  Iron Sword  
  8357. 268  10C  Wooden Sword  
  8358. 269  10D  Wooden Shovel  
  8359. 270  10E  Wooden Pickaxe  
  8360. 271  10F  Wooden Axe  
  8361. 272  110  Stone Sword  
  8362. 273  111  Stone Shovel  
  8363. 274  112  Stone Pickaxe  
  8364. 275  113  Stone Axe  
  8365. 276  114  Diamond Sword  
  8366. 277  115  Diamond Shovel  
  8367. 278  116  Diamond Pickaxe  
  8368. 279  117  Diamond Axe  
  8369. 280  118  Stick  
  8370. 281  119  Bowl  
  8371. 282  11A  Mushroom Soup  
  8372. 283  11B  Gold Sword  
  8373. 284  11C  Gold Shovel  
  8374. 285  11D  Gold Pickaxe  
  8375. 286  11E  Gold Axe  
  8376. 287  11F  String  
  8377. Icon  Dec  Hex  Item  
  8378. 288  120  Feather  
  8379. 289  121  Gunpowder  
  8380. 290  122  Wooden Hoe  
  8381. 291  123  Stone Hoe  
  8382. 292  124  Iron Hoe  
  8383. 293  125  Diamond Hoe  
  8384. 294  126  Gold Hoe  
  8385. 295  127  Seeds  
  8386. 296  128  Wheat  
  8387. 297  129  Bread  
  8388. 298  12A  Leather Cap  
  8389. 299  12B  Leather Tunic  
  8390. 300  12C  Leather Pants  
  8391. 301  12D  Leather Boots  
  8392. 302  12E  Chain Helmet  
  8393. 303  12F  Chain Chestplate  
  8394. 304  130  Chain Leggings  
  8395. 305  131  Chain Boots  
  8396. 306  132  Iron Helmet  
  8397. 307  133  Iron Chestplate  
  8398. 308  134  Iron Leggings  
  8399. 309  135  Iron Boots  
  8400. 310  136  Diamond Helmet  
  8401. 311  137  Diamond Chestplate  
  8402. 312  138  Diamond Leggings  
  8403. 313  139  Diamond Boots  
  8404. 314  13A  Gold Helmet  
  8405. 315  13B  Gold Chestplate  
  8406. 316  13C  Gold Leggings  
  8407. 317  13D  Gold Boots  
  8408. 318  13E  Flint  
  8409. 319  13F  Raw Porkchop  
  8410. Icon  Dec  Hex  Item  
  8411. 320  140  Cooked Porkchop  
  8412. 321  141  Paintings  
  8413. 322  142  Golden Apple  
  8414. 323  143  Sign  
  8415. 324  144  Wooden door  
  8416. 325  145  Bucket  
  8417. 326  146  Water bucket  
  8418. 327  147  Lava bucket  
  8419. 328  148  Minecart  
  8420. 329  149  Saddle  
  8421. 330  14A  Iron door  
  8422. 331  14B  Redstone  
  8423. 332  14C  Snowball  
  8424. 333  14D  Boat  
  8425. 334  14E  Leather  
  8426. 335  14F  Milk  
  8427. 336  150  Clay Brick  
  8428. 337  151  Clay  
  8429. 338  152  Sugar Cane  
  8430. 339  153  Paper  
  8431. 340  154  Book  
  8432. 341  155  Slimeball  
  8433. 342  156  Minecart with Chest  
  8434. 343  157  Minecart with Furnace  
  8435. 344  158  Egg  
  8436. 345  159  Compass  
  8437. 346  15A  Fishing Rod  
  8438. 347  15B  Clock  
  8439. 348  15C  Glowstone Dust  
  8440. 349  15D  Raw Fish  
  8441. 350  15E  Cooked Fish  
  8442. 351  15F  Dye D  
  8443. Icon  Dec  Hex  Item  
  8444. 352  160  Bone  
  8445. 353  161  Sugar  
  8446. 354  162  Cake  
  8447. 355  163  Bed  
  8448. 356  164  Redstone Repeater  
  8449. 357  165  Cookie  
  8450. 358  166  Map  
  8451. 359  167  Shears  
  8452. 360  168  Melon Slice  
  8453. 361  169  Pumpkin Seeds  
  8454. 362  16A  Melon Seeds  
  8455. 363  16B  Raw Beef  
  8456. 364  16C  Steak  
  8457. 365  16D  Raw Chicken  
  8458. 366  16E  Cooked Chicken  
  8459. 367  16F  Rotten Flesh  
  8460. 368  170  Ender Pearl  
  8461. 369  171  Blaze Rod  
  8462. 370  172  Ghast Tear  
  8463. 371  173  Gold Nugget  
  8464. 372  174  Nether Wart  
  8465. 373  175  Potions D  
  8466. 374  176  Glass Bottle  
  8467. 375  177  Spider Eye  
  8468. 376  178  Fermented Spider Eye  
  8469. 377  179  Blaze Powder  
  8470. 378  17A  Magma Cream  
  8471. 379  17B  Brewing Stand  
  8472. 380  17C  Cauldron  
  8473. 381  17D  Eye of Ender  
  8474. 382  17E  Glistering Melon  
  8475. 383  17F  Spawner Egg D  
  8476. Icon  Dec  Hex  Item  
  8477. 2256  8D0  13 Disc  
  8478. 2257  8D1  Cat Disc  
  8479. 2258  8D2  blocks Disc  
  8480. 2259  8D3  chirp Disc  
  8481. 2260  8D4  far Disc  
  8482. 2261  8D5  mall Disc  
  8483. 2262  8D6  mellohi Disc  
  8484. 2263  8D7  stal Disc  
  8485. 2264  8D8  strad Disc  
  8486. 2265  8D9  ward Disc  
  8487. 2266  8DA  11 Disc  
  8488. Entity IDs Icon  Dec  Hex  Entity  
  8489. Drops  
  8490. 1  01  Dropped item  
  8491. 2  02  Experience Orb  
  8492. Projectiles  
  8493. 10  0A  Shot arrow  
  8494. 11  0B  Thrown snowball  
  8495. 12  0C  Ghast fireball  
  8496. 13  0D  Blaze fireball  
  8497. 14  0E  Thrown Ender Pearl  
  8498. 15  0F  Thrown Eye of Ender  
  8499. Blocks  
  8500. 20  14  Primed TNT  
  8501. 21  15  Falling block (gravel, sand)  
  8502. Vehicles  
  8503. 40  28  Minecart  
  8504. 41  29  Boat  
  8505. Icon  Dec  Hex  Entity  
  8506. Hostile mobs  
  8507. 50  32  Creeper  
  8508. 51  33  Skeleton  
  8509. 52  34  Spider  
  8510. 53  35  Giant  
  8511. 54  36  Zombie  
  8512. 55  37  Slime  
  8513. 56  38  Ghast  
  8514. 57  39  Zombie Pigman  
  8515. 58  3A  Enderman  
  8516. 59  3B  Cave Spider  
  8517. 60  3C  Silverfish  
  8518. 61  3D  Blaze  
  8519. 62  3E  Magma Cube  
  8520. 63  3F  Enderdragon  
  8521. Icon  Dec  Hex  Entity  
  8522. Passive mobs  
  8523. 90  5A  Pig  
  8524. 91  5B  Sheep  
  8525. 92  5C  Cow  
  8526. 93  5D  Chicken  
  8527. 94  5E  Squid  
  8528. 95  5F  Wolf  
  8529. 96  60  Mooshroom  
  8530. 97  61  Snow Golem  
  8531. NPCs  
  8532. 120  78  Villager  
  8533. Other  
  8534. 200  C8  Ender Crystal  
  8535. 0x2: Facing West
  8536. 0x3: Facing South
  8537. 0x4: Facing North
  8538. Ground levers:
  8539.  
  8540. 0x5: Lever points South when off.
  8541. 0x6: Lever points East when off. (Note that unlike the other types of switch, this version didn't power wires around the block it was sitting on. This bug was fixed in Beta 1.6)
  8542. Doors The two least significant bits are the orientation of the door, that is, the corner in which its hinge is positioned:
  8543.  
  8544. 0x0: Northwest corner
  8545. 0x1: Northeast corner
  8546. 0x2: Southeast corner
  8547. 0x3: Southwest corner
  8548. The two bits above are flags:
  8549.  
  8550. 0x8: If this bit is set, this is the top half of a door (else the lower half).
  8551. 0x4: If this bit is set, the door has swung counterclockwise around its hinge.
  8552. For example, the bottom half of a door with its hinge on the Southwest corner, which is swung so that it is closed when viewed from the West, will have a data value of (3 | 4) = (3 + 4) = 7.
  8553.  
  8554. Buttons 0x8 If this bit is set, the button has been pressed. If this bit is set in a saved level, the button will remain pressed for an undefined length of time after the level is loaded.
  8555. Button direction:
  8556.  
  8557. 0x1: Facing East
  8558. 0x2: Facing West
  8559. 0x3: Facing South
  8560. 0x4: Facing North
  8561. Sign Posts 0x0: South
  8562. 0x1: South-Southwest
  8563. 0x2: Southwest
  8564. 0x3: West-Southwest
  8565. 0x4: West
  8566. 0x5: West-Northwest
  8567. 0x6: Northwest
  8568. 0x7: North-Northwest
  8569. 0x8: North
  8570. 0x9: North-Northeast
  8571. 0xA: Northeast
  8572. 0xB: East-Northeast
  8573. 0xC: East
  8574. 0xD: East-Southeast
  8575. 0xE: Southeast
  8576. 0xF: South-Southeast
  8577. Wall Signs, Furnaces, Dispensers and Chests 0x2: Facing North
  8578. 0x3: Facing South
  8579. 0x4: Facing West
  8580. 0x5: Facing East
  8581. Pumpkins and Jack-O-Lanterns 0x0: Facing South
  8582. 0x1: Facing West
  8583. 0x2: Facing North
  8584. 0x3: Facing East
  8585. Pressure Plates 0x1: If this bit is set, the plate is pressed.
  8586. Slab and Double Slab material Icon  Value  Description  
  8587.  0x0  Stone Slab  
  8588.  0x1  Sandstone Slab  
  8589.  0x2  Wooden Slab  
  8590.  0x3  Cobblestone Slab  
  8591.  0x4  Brick Slab  
  8592.  0x5  Stone Brick Slab  
  8593.  0x6  Stone Slab  
  8594. Snow  
  8595. Heights of snow from 0-7, going from left to right0x0: Normal snowfall height
  8596. ...
  8597. 0x7: Full block size height
  8598. The height repeats for values 8-15. Note that snow does not occur naturally at other heights than 0, but can be edited or hacked in. Values 0-2 has no hitbox, values 3-7 has the same hitbox as a slab.
  8599.  
  8600. Cake 0x0: 0 pieces eaten
  8601. 0x1: 1 piece eaten
  8602. 0x2: 2 pieces eaten
  8603. 0x3: 3 pieces eaten
  8604. 0x4: 4 pieces eaten
  8605. 0x5: 5 pieces eaten
  8606. Beds 0x0: Head is pointing South
  8607. 0x1: Head is pointing West
  8608. 0x2: Head is pointing North
  8609. 0x3: Head is pointing East
  8610. 0x4: (bit flag) - When 0, the bed is empty. When 1, the bed is occupied.
  8611. 0x8: (bit flag) - When 0, the foot of the bed. When 1, the head of the bed.
  8612. Redstone Repeater Low (1st & 2nd) bits:
  8613.  
  8614. 0x0: Facing North
  8615. 0x1: Facing East
  8616. 0x2: Facing South
  8617. 0x3: Facing West
  8618. High (3rd & 4th) bits:
  8619.  
  8620. 0x0: 1 tick delay
  8621. 0x1: 2 tick delay
  8622. 0x2: 3 tick delay
  8623. 0x3: 4 tick delay
  8624. Redstone Wire 0xF is a wire placed right next to a power source (like a redstone torch). The value declines with distance until 0x0, which is a non-powered wire. The direction of the wire is not saved but calculated at runtime.
  8625.  
  8626. Tall Grass Icon  Value  Description  
  8627.  0x0  Dead shrub (identical in appearance to block Dead Bush when placed, but acts like Tall Grass)  
  8628.  0x1  Tall grass  
  8629.  0x2  Fern  
  8630. Trapdoors 0x4 is a bit that determines whether or not the trapdoor is swung open. 0 for closed (on the ground), 1 for open (against its connecting wall). The remaining two bits describe which wall the trapdoor is attached to:
  8631.  
  8632. 0x0: Attached to the South wall
  8633. 0x1: Attached to the North wall
  8634. 0x2: Attached to the East wall
  8635. 0x3: Attached to the West wall
  8636. Piston The top bit (0x8) is a status bit that determines whether the piston is pushed out or not. 1 for pushed out, 0 for retracted.
  8637.  
  8638. The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing)
  8639.  
  8640. 0: Down
  8641. 1: Up
  8642. 2: North
  8643. 3: South
  8644. 4: West
  8645. 5: East
  8646. Piston Extension The top bit (0x8) is a status bit that determines whether the head is sticky or not (note that the Piston Body actually has completely different block types for Sticky and Regular). 1 is sticky, 0 is regular.
  8647.  
  8648. The bottom three bits are a value from 0 to 5, indicating the direction of the piston (the direction the piston head is pointing).
  8649.  
  8650. 0: Down
  8651. 1: Up
  8652. 2: North
  8653. 3: South
  8654. 4: West
  8655. 5: East
  8656. Stone Brick 0: Normal
  8657. 1: Mossy
  8658. 2: Cracked
  8659. Huge brown and red mushroom Huge mushrooms consist of the same blocks throughout their structure, the data value of each block decides the texture. The default texture on all sides is porous flesh. The cap texture can be either the brown mushroom or red mushroom texture, the textures for porous and stem sides are identical.
  8660.  
  8661. Value  Description  Textures  
  8662. 0  Fleshy piece  Pores on all sides  
  8663. 1  Corner piece  Cap texture on top, West and North  
  8664. 2  Side piece  Cap texture on top and North  
  8665. 3  Corner piece  Cap texture on top, North and East  
  8666. 4  Side piece  Cap texture on top and West  
  8667. 5  Top piece  Cap texture on top  
  8668. 6  Side piece  Cap texture on top and East  
  8669. 7  Corner piece  Cap texture on top, South and West  
  8670. 8  Side piece  Cap texture on top and South  
  8671. 9  Corner piece  Cap texture on top, East and South  
  8672. 10  Stem piece  Stem texture on all four sides, pores on top and bottom  
  8673. Vines Determines the face against which the vine is anchored. Note that (except for Top) these are testable as bit flags, unlike most of the other directional data for other block types. Multiple sides can contain vines. The "top" attachment is assumed to be present if data is 0 or there is solid block above.
  8674.  
  8675. 1: South
  8676. 2: West
  8677. 4: North
  8678. 8: East
  8679. Fence Gates 0x4 is a bit flag: 1 is open, 0 is closed. The remaining two bits determine in which direction the gate will open.
  8680.  
  8681. 0: To the South
  8682. 1: To the West
  8683. 2: To the North
  8684. 3: To the East
  8685. Hidden Silverfish A silverfish will hide inside a Stone, Cobblestone, or Stone Brick block, changing it into a Hidden Silverfish block. The data value tells us its appearance:
  8686.  
  8687. 0: Stone
  8688. 1: Cobblestone
  8689. 2: Stone Brick
  8690. Potions A Glass Bottle filled with a potion. Potion type is stored in item's damage value as a 16-bit number. Potion effect, name, and other flags are encoded on bits. Effect duration itself isn't there, but can be calculated from other values.
  8691.  
  8692. Current meaning of bits is described below. Note that potion name overlaps with potion effect and tier.
  8693.  
  8694. Bit  Dec  Hex  Meaning  
  8695. 0  1  0001  Potion effect  Potion name  
  8696. 1  2  0002  
  8697. 2  4  0004  
  8698. 3  8  0008  
  8699. 4  16  0010  
  8700. 5  32  0020  Tier  
  8701. 6  64  0040  Extended duration  
  8702. 7  128  0800  (ignored)  
  8703. 8  256  0100  
  8704. 9  512  0200  
  8705. 10  1024  0400  
  8706. 11  2048  0800  
  8707. 12  4096  1000  
  8708. 13  8192  2000  
  8709. 14  16384  4000  Splash potion  
  8710. 15  32768  8000  (ignored)  
  8711.  
  8712. To calculate damage value of potion with desired effect use the following formula:
  8713.  
  8714. DV = potion_effect + tier_bit + extended_bit + splash_bit
  8715. for example:
  8716.  
  8717. potion with "Instant Health" effect has damage value 5 (= 5 + 0 + 0 + 0);
  8718. potion with extended "Slowness" effect has value 74 (= 10 + 0 + 64 + 0);
  8719. splash potion with tier II "Strength" effect has value 16425 (= 9 + 32 + 0 + 16384).
  8720. To get potion with certain name, use the following formula:
  8721.  
  8722. DV = potion_name + extended_bit + splash_bit
  8723. for example:
  8724.  
  8725. "Splash Charming Potion" has damage value 16422 (= 38 + 0 + 16384)
  8726. "Potion name" bits Dec  Hex  Potion  
  8727. 0  00  Water Bottle / Mundane Potion  
  8728. 1  01  Potion of Regeneration  
  8729. 2  02  Potion of Swiftness  
  8730. 3  03  Potion of Fire Resistance  
  8731. 4  04  Potion of Poison  
  8732. 5  05  Potion of Healing  
  8733. 6  06  Clear Potion  
  8734. 7  07  Clear Potion  
  8735. 8  08  Potion of Weakness  
  8736. 9  09  Potion of Strength  
  8737. 10  0a  Potion of Slowness  
  8738. 11  0b  Diffuse Potion  
  8739. 12  0c  Potion of Harming  
  8740. 13  0d  Artless Potion  
  8741. 14  0e  Thin Potion  
  8742. 15  0f  Thin Potion  
  8743. Dec  Hex  Potion  
  8744. 16  10  Awkward Potion  
  8745. 17  11  Potion of Regeneration  
  8746. 18  12  Potion of Swiftness  
  8747. 19  13  Potion of Fire Resistance  
  8748. 20  14  Potion of Poison  
  8749. 21  15  Potion of Healing  
  8750. 22  16  Bungling Potion  
  8751. 23  17  Bungling Potion  
  8752. 24  18  Potion of Weakness  
  8753. 25  19  Potion of Strength  
  8754. 26  1a  Potion of Slowness  
  8755. 27  1b  Smooth Potion  
  8756. 28  1c  Potion of Harming  
  8757. 29  1d  Suave Potion  
  8758. 30  1e  Debonair Potion  
  8759. 31  1f  Debonair Potion  
  8760. Dec  Hex  Potion  
  8761. 32  20  Thick Potion  
  8762. 33  21  Potion of Regeneration II  
  8763. 34  22  Potion of Swiftness II  
  8764. 35  23  Potion of Fire Resistance  
  8765. 36  24  Potion of Poison II  
  8766. 37  25  Potion of Healing II  
  8767. 38  26  Charming Potion  
  8768. 39  27  Charming Potion  
  8769. 40  28  Potion of Weakness  
  8770. 41  29  Potion of Strength II  
  8771. 42  2a  Potion of Slowness  
  8772. 43  2b  Refined Potion  
  8773. 44  2c  Potion of Harming II  
  8774. 45  2d  Cordial Potion  
  8775. 46  2e  Sparkling Potion  
  8776. 47  2f  Sparkling Potion  
  8777. Dec  Hex  Potion  
  8778. 48  30  Potent Potion  
  8779. 49  31  Potion of Regeneration II  
  8780. 50  32  Potion of Swiftness II  
  8781. 51  33  Potion of Fire Resistance  
  8782. 52  34  Potion of Poison II  
  8783. 53  35  Potion of Healing II  
  8784. 54  36  Rank Potion  
  8785. 55  37  Rank Potion  
  8786. 56  38  Potion of Weakness  
  8787. 57  39  Potion of Strength II  
  8788. 58  3a  Potion of Slowness  
  8789. 59  3b  Acrid Potion  
  8790. 60  3c  Potion of Harming II  
  8791. 61  3d  Gross Potion  
  8792. 62  3e  Stinky Potion  
  8793. 63  3f  Stinky Potion  
  8794.  
  8795. Note: potion with name set to 0 is called "Water Bottle" only if no other bit is set. Otherwise, it is called "Mundane Potion".
  8796.  
  8797. Note: potions with splash potion bit set have additional "Splash " prefix.
  8798.  
  8799. "Potion effect" bits Dec  Hex  Effect  Duration  Bottles  Icon  Effect color  
  8800. 0  0  -  -    -  
  8801. 1  1  Regeneration  0:45     Pink  
  8802. 2  2  Speed  3:00     Sky blue  
  8803. 3  3  Fire Resistance  3:00     Orange  
  8804. 4  4  Poison  0:45     Green  
  8805. 5  5  Instant Health  instant    -  -  
  8806. 6  6  -  -    -  -  
  8807. 7  7  -  -    -  -  
  8808. 8  8  Weakness  1:30     Grey  
  8809. 9  9  Strength  3:00     Dark red  
  8810. 10  a  Slowness  1:30     Blue-Grey  
  8811. 11  b  -  -    -  -  
  8812. 12  c  Instant Damage  instant    -  -  
  8813. 13  d  -  -    -  -  
  8814. 14  e  -  -    -  -  
  8815. 15  f  -  -    -  -  
  8816. "Tier" bit Dex  Hex  Meaning  
  8817. 0  0000  Tier I effect.  
  8818. 32  0020  Tier II effect. Multiply duration by 1/2.  
  8819.  
  8820. Note: Fire Resistance, Weakness and Slowness effects have no second tier. Their strength and duration are unaffected by this bit.
  8821.  
  8822. "Extended duration" bit Dex  Hex  Meaning  
  8823. 0  0000  Base duration.  
  8824. 64  0040  Multiply duration by 8/3.  
  8825. "Splash potion" bit Dex  Hex  Meaning  
  8826. 0  0000  Drinkable potion.  
  8827. 16384  4000  Splash potion. Multiply duration by 3/4.  
  8828. Brewing Stand The bottom three bits are bit flags for which bottle slots actually contain bottles. The actual bottle contents (and the reagent at the top) are stored in a TileEntity for this block, not in the data field.
  8829.  
  8830. 0x1: The slot pointing East
  8831. 0x2: The slot pointing Southwest
  8832. 0x4: The slot pointing Northwest
  8833. Cauldron The data value stores the amount of water kept in the cauldron, in units of glass bottles that can be filled.
  8834.  
  8835. 0: Empty
  8836. 1: 1/3 filled
  8837. 2: 2/3 filled
  8838. 3: Fully filled
  8839. End Portal Frame The bottom two bits determine which "side" of the whole portal frame this block is a part of.
  8840.  
  8841. 0x4 is a bit flag: 0 is an "empty" frame block, 1 is a block with an Eye of Ender inserted
  8842.  
  8843.  
  8844. ]])
  8845. ids.close()
  8846. lighting=fs.open("mem/redworks/minepedia/lighting","w")
  8847. lighting.write([[Lighting in Minecraft affects visibility, Mob spawning, tree growth, and whether flowers and mushrooms will stay planted. Lighting can be provided by sunlight, torches, fire, lava, in-use furnaces, and certain other objects.
  8848. History: Minecraft has gone through many different ways to light the world. Classic?0�s model is simple and only checks whether a block is exposed to the sky. Indev?0�s model is more complex and considers a block?0�s distance from the nearest sunlight and from the nearest light-emitting block. Alpha?0�s model is a refinement of Indev?0�s, calculating sunlight and block-emitted light separately and using a different scale of light intensities. An earlier Beta update improved upon Alpha's model by adding the smooth lighting option, and in a later Beta update, the whole lighting engine was again rewritten to be much more efficient, have more detail, and be smooth in transition of lighting differentials.
  8849. Classic: In Classic, ?0�sunlight?0� is emitted by the top edge of the map and will hit any block that is under it. It will pass through transparent blocks to light blocks underneath. Blocks that do not receive light are in a dim shadow that remains at the same level of brightness no matter how far they are from a light source.
  8850. Indev/Infdev: In Indev and Infdev versions there are 16 degrees of brightness, with a maximum of 15 for full daylight and a minimum of 0 for almost complete darkness. Brightness is a linear scale and represents its value divided by 15, so for example 15 is 100% (15/15) and 13 is 86.67% (13/15).
  8851. Each block that emits light has its own luminance value and the light value diminishes by one level each block from its source. If the neighbouring block already has a greater light value, it is ignored. The process is repeated for each block whose light value just changed.
  8852. During the day, sunlight has a maximum light value of 15. At dusk, it steadily decreases until it reaches a night-time minimum value of 4 representing moonlight. Sunlight is emitted by the top edge of the map, but does not diminish with distance from its ?0�source?0�. A block lit by sunlight will be equally bright at any height or depth.
  8853. Alpha -Beta 1.2_02: Lighting in Alpha through pre-Beta 1.3 works as Indev and Infdev, except that the scale is different and is not linear.
  8854. Full daylight provides the maximum brightness of 15. Each value below this is 80% as bright as the one above it. For example, 14 is 80% as bright as sunlight, and 13 is 64% bright. This means that Level 0 still has 0.8�B95�B7100% = 3.5% of the maximum brightness.
  8855. Sunlight in Alpha have their own light array and a behind-the-scenes optimization to make dawn and dusk smoother: the amount of light from the sky is pre-calculated and saved along with the blocks, because it never needs to change except when blocks are added or removed. During dusk, nighttime, and dawn, a "darkness" value is subtracted from the sky to create the effects of different times of day.
  8856. In the Nether, light decreases by 10% each level, rather than the normal 20%. This means it will never be totally dark in the Nether. The minimum light value is 20.59%, providing a permanent dim ambiance equivalent to normal world's level 8.
  8857. Beta 1.3 - Beta 1.7.3: Lighting from Beta 1.3 to 1.7.3 works the same as how it was in Alpha, but is greater optimized to allow smooth lighting.
  8858. Beat 1.8 - Present: In Beta 1.8, a new lighting engine was implemented. The new engine has added and changed these following:
  8859. The lighting of an area is influenced by the type of light source that is lighting the block: Moonlight gives a blue tint, torches and lava give a reddish tint, and complete darkness and sunlight are the same as before.
  8860. Changes in lighting are now instant, and can be gradual as changes in the time of day and the state of rainfall now smoothly change the lighting value rather than individually updating the lighting of chunks one by one.
  8861. Using the new instant lighting, non-sunlight lighting now subtly flickers, although this feature is purely cosmetic and has no effect on gameplay.
  8862. Sunset is much more intense and realistic than before, and its intensity dims if the player turns away from it.
  8863. At extreme depths, black fog closes in. At the bedrock level, a torch can no longer be seen from 11 squares distance. This effect is inhibited by proximity to open sky (i.e., the degree to which the place where you are standing would be lit by sunlight), whether or not the sun is currently up.
  8864. When inside the void. lighting operates similar to Classic, where objects in the void will remain at a constant brightness, regardless of how far they travel away from a light source, provided that they remain directly underneath an opening into the void. The brightness of the particular "column" of space is based on the current light level at level 0, the bottom bedrock layer. This applies to all entities, as well as particles.
  8865. Additionally, sitting in the void underneath a shaft which allows sunlight directly into it will remove the void fog, regardless to whether is it daytime or not.
  8866. Smooth Lighting: Smooth Lighting (which includes ambient occlusion as well as interpolating lighting across block faces) is a lighting engine added in Beta 1.3, with the help of MrMessiah.[1] This lighting engine is set on by default, and can be enabled or disabled by accessing Video Options from the Options menu.
  8867. The engine blends lighting to add semi-realistic shadows and glowing from light sources. It darkens inside corners, resulting in small spaces appearing much darker. Before Beta 1.3, the feature could only be obtained by modifying the game with the help of MrMessiah's BetterLight mod.
  8868. Bugs: There are lighting bugs on ice and portal when Smooth Lighting is turned on, since the transparency is made by the game, not the textures.
  8869. The lighting on both still and flowing liquids are not smoothed when Smooth Lighting is on.
  8870. If turned off it will sometimes cause a bug where stairs will turn black. [This has been fixed as of Beta 1.9 Pre-Release 5]
  8871. Smooth lighting doesn't seem to have an effect on paintings.
  8872. Glass, if placed directly on another surface, will cast a shadow.
  8873. Smooth lighting doesn't affect players and items when moving from block to block.
  8874. On rare occasions light can render in areas with no light emitting objects whatsoever. This possibly happens when older Minecraft version worlds are loaded into newer versions.
  8875. ]])
  8876. lighting.close()
  8877. list=fs.open("mem/redworks/minepedia/list","w")
  8878. list.write([[
  8879. Snow Golem
  8880. Chicken
  8881. Cow
  8882. Mooshroom
  8883. Pig
  8884. Sheep
  8885. Squid
  8886. Villager
  8887. Enderman
  8888. Wolf
  8889. Zombie Pigman
  8890. Blaze
  8891. Cave Spider
  8892. Creeper
  8893. Ghast
  8894. Magma Cube
  8895. Silverfish
  8896. Skeleton
  8897. Slime
  8898. Spider
  8899. Spider Jockey
  8900. Zombie
  8901. Enderdragon
  8902. Dragon (Enderdragon)
  8903. End
  8904. Ender Realm
  8905. The End
  8906. The Ender Realm
  8907. Nether
  8908. Hell
  8909. Far Lands
  8910. OverWorld
  8911. Minecraft
  8912. RedWorks
  8913. CraftOS
  8914. Void
  8915. Biomes
  8916. Chunks
  8917. Light
  8918. Time
  8919. Sun
  8920. Moon
  8921. Star(s)
  8922. Alchemy
  8923. Enchanting
  8924. Rain
  8925. Weather
  8926. Snow
  8927. Thunder
  8928. Lightning
  8929. Storm
  8930. Mushroom Farming
  8931. Cactus Farming
  8932. Reed Farming
  8933. Herobrine
  8934. Block IDs
  8935. Wiki
  8936. ]])
  8937. list.close()
  8938. magmacube=fs.open("mem/redworks/minepedia/magmacube","w")
  8939. magmacube.write([[Magma Cubes are hostile mobs found around The Nether. When killed, they release 2-4 smaller versions of themselves in addition to Experience Orbs, similar to Slimes. When they move, they jump up and momentarily unravel into several layers, giving them the appearance of a spring and revealing a molten lava core inside. They are slowed by and sink in lava, but do not drown in it.
  8940. Behavior: In their passive state, Magma Cubes move slowly, jumping forward every two seconds or so. Upon spotting a player, magma cubes will jump towards them more quickly, but the player can still outrun them. It seems that Magma Cubes try to eat the player. Also, they will try to damage the player by jumping directly on top of you. However, they cannot damage other mobs like this.
  8941. History: Magma cubes were first seen in Minecraft 1.9 Beta Pre-Release 1. They were also added in the full release of Minecraft.
  8942. Prior to Minecraft 1.0 RC1, Magma Cubes did not make sounds.
  8943. Trivia: Magma Cubes cannot swim in lava, only jump along the bottom. Thus, they can get trapped in deep lava, although they will not drown.
  8944. Magma Cubes seem to be the Nether equivalent of Slimes. Although they appear similar, the components of their texture files are quite different.
  8945. Contrary to popular belief, Magma Cubes are actually less abundant in the Nether Fortresses than in the rest of the Nether due to fewer large flat surfaces to spawn on.
  8946. Every Magma Cube size drops experience orbs, not only the smallest cube. This means that killing a huge cube and all its spawnlings would grant the player 28 experience, as opposed to 5 experience of other hostile mobs.
  8947. Despite trying, Magma Cubes are unable to jump in water, although they can move around. They will drown if completely submerged.
  8948. Unlike tiny slimes, tiny Magma Cubes can still hurt the player.
  8949. Unlike Slimes, which are rare and only appear below layer 40 in certain chunks of the normal world, Magma Cubes can appear anywhere in the Nether.
  8950. Magma cubes are often found in lava, since they are unaffected by it.
  8951. Like Slimes, when a magma cube is not chasing the player it will hop in one direction.
  8952. Magma cubes can be spawned in the overworld if a spawner is hacked to spawn them. They do not require netherrack.
  8953. It seems that Magma cubes (or at least tiny ones) can only damage you using their bottom side.
  8954. Magma cubes do not seem to take fall damage. A large has been witnessed to fall from a ledge that would normally be deadly, yet take no damage. This may be due to their large jumping height.
  8955. Bugs: Magma Cubes do not seem to use their spring-like jump effect in multiplayer.
  8956. They also seem to frequently glitch through walls, ceilings, and floors, to attack players on the other side; dropping down through the solid roof of a tunnel, for example, then glitching back up to the roof out of sword reach. Or they will lunge out through the walls of a tower while a player is descending via a gravel pillar, and push them off said pillar without causing attack damage. They also seem to sink into Soul Sand, being invulnerable while merged inside a Soul Sand block, yet being able to jump up and attack from inside their protective glitch.
  8957.  
  8958. ]])
  8959. magmacube.close()
  8960. minecraft=fs.open("mem/redworks/minepedia/minecraft","w")
  8961. minecraft.write([[This page is locked. Those allowed: Chuck Norris, Sledger721, Those working on RedWorksOS, God and Your Mom.
  8962. ]])
  8963. minecraft.close()
  8964. moon=fs.open("mem/redworks/minepedia/moon","w")
  8965. moon.write([[Moon: Grass blocks or Saplings do not grow in moonlight, however they won't decay in moonlight either.
  8966. The moon illuminates topmost blocks during the night in the same way that the sun illuminates them in the day, but only illuminates them to a Light level of four, rather than the sun's fifteen.
  8967. Phases of the Moon: In Minecraft Beta 1.9 Pre-release 4, the Moon goes through eight lunar phases.[1][2] The phases are: Full Moon, Waning Gibbous, Last Quarter, Waning Crescent, New Moon, Waxing Crescent, First Quarter, Waxing Gibbous. This would allow the player to keep track of the passage of time via the Lunar calendar after Beta 1.9 Pre-release 4. A full cycle of all eight phases is equal to one Lunar month or Lunation. Twelve lunations is equal to one lunar year.
  8968. Mobs: Hostile Mobs will spawn around dark areas of a normally generated map. When the moon is up, hostile Skeleton, Creeper, Zombie, Endermen and Spider mobs will appear and attack the player. When the sun comes back up Skeleton and Zombies will burn in the sunlight and drop items after death. Spiders will not burn in daylight, but instead become neutral during the day, only to become hostile again if attacked, when it is night, or when it falls into a dark area. Endermen will not burn in daylight, but instead become neutral during the day, only to become hostile again if attacked or looked upon, but will instantly teleport away and become neutral again if the Player approaches them. Creeper and Slime mobs do not burn, and will remain hostile during the day
  8969. Stars: Together with the moon, the night sky also consists of stars. The stars look like little white squares and are an overlay over the Void that rotates as the night progresses.
  8970. Trivia: Night time lasts 7 minutes, plus 1.5 minutes each of sunrising and sunsetting.
  8971. The Moon and Sun are not visible while using the Short or Tiny render distance settings.
  8972. The moon is 8 x 8 pixels.
  8973. In past versions, there was a stars file in the game files, but at some point it was replaced with seed generated stars. They are now unique to the given seed of the map.
  8974. According to Notch, the Minecraft sun and moon actually rose in the north, not in the east.[4] This was a bug, but was left in the game.[5] This was changed in Minecraft Beta 1.9 Pre-release 4, so the sun and moon now rise in the east.[6]
  8975. In Beta 1.9 Pre-release 4, one can find out on which hemisphere his/hers Minecraft world is by studying the moon phases (see gallery). The hemisphere that the world is on seems to be chosen randomly and stays the same, no matter how far the player goes.
  8976. In Minecraft Beta 1.9 Pre-release 6, the Sun and Moon textures were reverted back to their square form. The Moon Phases were redone in a square shape.
  8977. The Moon is rotated 90 degrees. It appears to be lit from a source in the north or south, whereas it should be lit from the east or west.
  8978. The Minecraft Moon progresses in the Sky relative to the sun. Earth's Moon does not do this, which is why it can be seen during the day.
  8979. Minecraft cannot have eclipses due to the above.
  8980. Notch stated back in February 21st, 2010 that he might consider allowing the player to travel to the Moon, similarly to traveling to The Nether.[7] The likelihood of this seems diminished as of this point, however, considering the incorporation into the phases introduced.
  8981. ]])
  8982. moon.close()
  8983. mooshroom=fs.open("mem/redworks/minepedia/mooshroom","w")
  8984. mooshroom.write([[Mooshrooms are cow-like mobs that spawn in the Mushroom Biome. They are covered with red mushroom growths and have 2 mushrooms on their body and one on their head.
  8985. Uses: Mooshrooms can be sheared for 2-5 red mushrooms, which turns them back into normal cows. If killed, they drop leather and raw beef like normal cows do. Mooshrooms can be milked with a bucket like a normal cow, and can be "milked" with an empty bowl to obtain a bowl of Mushroom Stew.
  8986. Behavior: Mooshrooms roam the Overworld Mushroom biome and occasionally other biomes in herds of 4?08. Mooshrooms make no attempt to stay out of water, and will bob up and down to stay afloat. They are extremely aware of cliffs, and will not jump off on purpose unless pushed or attacked. Upon reloading a map a Mooshroom has a chance to respawn on the other side of a fence to which it started.
  8987. Breeding: All passive mobs (Excluding squids and villagers) can be bred using Wheat. Breeding a mooshroom with another mooshroom will make a baby mooshroom, but breeding a regular cow with a mooshroom may make a regular cow or a mooshroom, which is chosen randomly.
  8988. Bugs: On SMP when a Mooshroom is sheared, a server-side cow spawns, as well as a client-side cow that spawns for the player who sheared the Mooshroom.[1] The same thing also happens to the dropped resources as a result of shearing.
  8989. As of 1.9 Pre-release 5, in SMP when a baby mooshroom is sheared, it turns into two normal cows and the two parent mooshrooms stop following them.
  8990. When a Mooshroom is sheared after it has already bred once, it can be breed again immediately.
  8991. Mooshrooms may spawn in non-mushroom biomes as well. It is currently unknown whether this is a bug or not.
  8992. In 1.0.0, right clicking on a Mooshroom with more than one bowl equipped will turn the whole stack into just one bowl of Mushroom Stew.
  8993. Trivia: The Mooshroom's name is a portmanteau of "moo," the sound Cows make, and "mushroom."
  8994. In the Beta 1.9 Pre-release mobs folder in the minecraft.jar, Mooshroom's are referred to as redcows, most likely because their texture is mainly a red color shift of the cow texture. Also, Mooshrooms are referred to as mushroomcows as its entity ID.
  8995. When a Mooshroom transforms into a normal Cow by shearing, it emits smoke particles.
  8996. There are only red mushrooms on mooshrooms, not brown ones.
  8997. When sheared, mooshrooms drop red mushrooms and not brown mushrooms but one can "milk" mooshroom with a bowl to obtain mushroom stew. (Which needs both red mushroom and brown mushrooms.)
  8998. Mooshrooms are the most resourceful mob in Minecraft: Mooshrooms can be "milked" with a bowl for mushroom stew and also can be milked with a Bucket for Milk; shearing them drops 2-5 red mushrooms, which changes them back into a normal cow that can be milked with a bucket; the Milk is used for making cake; and when you kill the cow it can drop 1-3 pieces of raw beef and 0-2 pieces of leather. This is a total of at least 7/5 items that can be directly or indirectly obtained from Mooshrooms/Cows respectively.
  8999. If you breed a mooshroom with a normal cow, either a normal baby cow will be born or a baby mooshroom will be born.
  9000. ]])
  9001. mooshroom.close()
  9002. nether=fs.open("mem/redworks/minepedia/nether","w")
  9003. nether.write([[The Nether is a different dimension existing in Minecraft worlds, first existing in Minecraft Alpha version 1.2.0 on October 30th, 2010 (The Minecraft Halloween Update).
  9004. Accessible via Portal, it can be used for travelling large distances on the above ground map quickly. The Nether also contains Block types not seen anywhere else, as well as supplies of Block types found on the normal world, like Mushrooms, Gravel and Lava. The Nether is home to four Mobs: Ghasts, Magma Cubes, Blazes, and Zombie Pigmen. All of these mobs are only found in the nether with the exception of Zombie Pigmen which spawn in the overworld when a pig is struck by lightning.
  9005. The Nether functions as a second map in a player's Minecraft World. When it is entered, the chunks from the above ground map are unloaded and the Nether chunks begin to load. Terrain generates infinitely here just like on the above ground map. If the player dies in the Nether, their items will stay there while the player respawns in the overworld.
  9006. Terrain: The Nether's terrain is largely composed of netherrack, which is arranged into large, smooth outcroppings and niches; it is essentially a cave. There are patches of gravel and soul sand, as well as stalactites of glowstone hanging from the ceiling. Mushrooms grow abundantly in the Nether, and natural fires are a common sight. Small tunnels form in the netherrack, which contain no ores or hidden caverns. Nether fortresses can be found as well. These Nether fortresses are made up of nether brick, Nether Brick Stairs, nether brick fences and crops of nether wart. At the very bottom, beneath an ocean of lava, is a layer of Netherrack and bedrock. The very top of the Nether is similarly bedrock.
  9007. Navigating the Nether can be very dangerous. The strange, dimly lit landscape conceals pits and sudden cliffs. Many lava streams flow from the ceilings, down the netherrack and into a lava ocean. If one dies near this lava or a patch of fire, it is a safe assumption that some of one's items will fall in and be burned.
  9008. The sky and fog in the Nether are dull dark red. Thunderstorms can cause the shade to flicker quickly, a known bug.
  9009. Environment: The Nether has no day/night cycle and no weather. The only natural sources of light are fire, lava, and glowstone. A dim ambient light can be seen throughout the Nether, but this is purely a visual effect and does not affect game mechanics. Contrary to some common myths, light works the same way in the Nether as it does in the Overworld: there are 16 levels of brightness and one level falls off for every block it radiates through.
  9010. Plants with minimum light requirements, such as flowers and Netherwart, can be planted almost anywhere in the Nether, even in complete darkness, because they can technically "see the sky" from any location. The exception, due to a bug, is anywhere below natural veins of glowstone or below lava source blocks that appear naturally in cave walls. Plants at any level below these formations, even if seperated by other terrain, will uproot if not adequately lit.
  9011. Blocks and Structures: Entries marked with a D require additional data to fully define the block in a Beta world. Entries marked with a T have tile entities associated with them to store additional data. Items with IDs in red cannot be legitimately obtained in the player's inventory in the game; they can only be obtained by "hacking" (such as the use of Inventory editors) or, in multi player using the /give server command. Items available only in Creative mode are in blue.  
  9012. Natural Blocks: Naturally Generated includes blocks that are created through the world seed.
  9013.  
  9014. Icon  Dec  Hex  Block type  
  9015.  00  00  Air  
  9016.   07  07  Bedrock  
  9017.   11  0B  Lava (stationary) D  
  9018.   13  0D  Gravel  
  9019.   39  27  Brown Mushroom  
  9020.   40  28  Red Mushroom  
  9021.   115  73  Nether Wart D  
  9022.   51  33  Fire D  
  9023.   87  57  Netherrack  
  9024.   88  58  Soul Sand  
  9025.   89  59  Glowstone Block  
  9026.  Naturally CreatedNaturally Created means a combination of events that cause a new block to be placed by natural causes, not the player.
  9027.  
  9028. Icon  Dec  Hex  Block type  
  9029.  00  00  Air  
  9030.   10  0A  Lava (flowing) D  
  9031.   39  27  Brown Mushroom  
  9032.   40  28  Red Mushroom  
  9033.   49  31  Obsidian  
  9034.   90  5A  Portal  
  9035.  Structures: Same as Naturally Generated, but these blocks will only be created with the "Generate Structures" option enabled. However, due to a bug, Nether Fortresses still generate even with "Generate Structures" set to "off".
  9036.  
  9037. Icon  Dec  Hex  Block type  
  9038.  00  00  Air  
  9039.   52  34  Monster Spawner T  
  9040.   112  70  Nether Brick  
  9041.   113  71  Nether Brick Fence  
  9042.   114  72  Nether Brick StairsD  
  9043.   115  73  Nether Wart D  
  9044.  
  9045. Nether Affected Materials:
  9046. When Grass blocks are obtained using a tool with the "Silk Touch" enchantment, such as a shovel, and taken into the Nether, it becomes possible to have grass in the nether. Using Water Buckets will only cause the water to sizzle and leave steam. This makes growing Sugar Cane impossible since the plant requires water to survive. Wheat farms are also affected by this. They can survive without water, although they will grow much more slowly.
  9047. Actual blocks of water can be placed in the Nether, but this requires Inventory Hacking or Map Editing. Blocks of Ice that have been hacked into the game, spawned via Creative Mode, or acquired through mods can be placed and broken to leave water blocks behind as well.
  9048. Trees will grow normally, and their leaves will take a dead-looking brownish color, like in Desert biomes. However, they grow in odd formations and occasionally morph shapes when they are altered. This makes Nether-trees useful for traps or endless log harvesting on occasion. Trees are also hard to keep in the Nether because of the substantial amount of lava, which ignites them.
  9049. It is always a good idea to bring paper down into the Nether, and then craft a map. Getting lost is easy and happens frequently. Compasses and Clocks can be brought in freely, but they will not work correctly. As the Nether is in a totally different dimension from the Overworld, Compasses will be unable to find the original spawn point, and Clocks cannot determine the position of the sun. Their arrows and dials will instead spin and flail madly. Maps made on the above ground dimension wont show the player's position in the other dimension. For Maps to display the Nether, they must be Crafted there. Beds will explode when a player attempts to sleep in one. This can be a useful strategy to quickly mine materials in the Nether, but only if the difficulty is set to peaceful.[1]
  9050. Lava flows twice as far in the Nether than in the Overworld (generally 8 blocks, instead of 4 blocks).
  9051. Mobs: The Nether is home to its own share of mobs.
  9052. Ghasts, huge jellyfish-like creatures, will lazily hover around. They are 4�974�974 blocks large, and have 9 tentacles hanging from them. If they spot the player, they will spit flaming bombs at them, which can be deflected by shooting arrows at them, punching them or hitting them with any tool. The reflected fireballs will instantly kill the Ghast, if it is hit. These will explode and often leave craters, if the blast-site is weak enough. They make screeching and whimpering noises, something like a kitten or an angry baby, and can be heard for great distances.
  9053. Zombie Pigmen spawn in groups and wander aimlessly. They will not harm the player unless attacked. If they are, all the Pigmen within a 32 block radius rush the player, often causing ambushes from behind as the player attempts to attack while fleeing.
  9054. Blazes are able to float and shoot 3 fireballs at the player in a quick succession. They appear to catch fire just before shooting said fireballs, then "cool down" until they can shoot again.
  9055. Magma Cubes are spring-like mobs that slowly hop towards the player. If killed, they split into 2-3 smaller versions of the original one. Magma Cubes are occasinally rare.
  9056. Nether mobs are completely fire-proof and can often be seen wandering into lava, where it will take them a while to get out due to the slowdown it causes on movement.
  9057. Normal World Mobs like Pigs and Zombies will not spawn in the Nether. Chickens can be forced to spawn there if they hatch from a thrown Egg, however, but they will not spawn naturally afterward. Squid will spawn in large amounts in any hacked body of Water due to the fact that the water is the only suitable place in the whole map. Creative mode mob spawning eggs still work in the nether, so if you reach the nether in creative mode, you may have every mob.
  9058. Portals and Fast Travel: Nether Portals are made by creating a 4x5 (2x3 on inside) door frame out of Obsidian and then lighting the inside of the frame on fire with Flint and Steel or a Ghast's fireball. When you stand inside the portal for the first time, it will create a portal in its equivalent area of The Nether. A loading screen will appear during the change of worlds.
  9059. If you create a portal in the Nether and re-enter the normal world, any distance covered in The Nether is multiplied by 8, effectively making The Nether a fast travel zone that allows for greater distances to be covered in a short amount of time in the normal world. Linking a network of portals between the Nether and the Overworld can be tricky though. See the Nether Portal page for the precise details of how this can be done.
  9060. Due to Ghasts, it is recommended that players enclose their portals with a blast-resistant material (Cobblestone is cheap and effective). This will prevent Ghasts from being able to hit the portal and shut it down. Optionally, the player can choose to carry a Flint and Steel with them in case this happens, or just trick a Ghast into shooting the portal again, therefore effectively re-activating the portal.
  9061. It is not possible to get to the Nether via The End.
  9062. History: The Nether was one of the key features to be added in the Minecraft Halloween Update, and was announced on October 4th, 2010. This announcement stated that there would be a "hell world" that could be used for fast travel. It hinted it would utilize Portals and that distance travelled inside the would be multiplied greatly on the map above ground. On October 10, a screenshot was released by Notch depicting what the Nether would look like. With the rest of the Halloween Update's features, the Nether was released on October 30.
  9063. In the original announcement, Notch mentioned "a brand new Hell world." When the preview was sent out on 29 October 2010 to a couple of gaming websites, the new dimension was called the Slip to avoid offending religions and to have a more original name. It was referred to as 'The Nexus' on his personal blog. It was finally changed to ?0�the Nether?0� on the day of the Halloween update release.
  9064. Along with the Nether, Ghasts, Zombie Pigmen, Netherrack, Soul Sand, Glowstone and Portals were added. On November 10th, Lava was made to flow farther than it did on the Overworld.
  9065. There was a glitch where The Nether was a Biome. This was fixed in an unknown update.
  9066. In Beta 1.6, Portals were made to function properly in multi player, allowing players in servers to warp between the Overworld and the Nether.[2] 1.6 also fixed a bug where the player could have menus open while inside Portals. When warping, the text on screen would appear totally grey.
  9067. In Beta 1.6.2 Beds in the Nether were made to explode if used. This can be used as a mining technique.
  9068. With the "Silk Touch" enchantment in the 1.9 pre-release 4, it was possible to legitimately obtain grass and water using ice in the Nether. Because passive mobs and squids will spawn in the only place available, it was possible to use this to control the spawning, which allowed the player to make highly efficient passive mob grinder, something extremely difficult to do in the overworld since animals stopped despawning in 1.8. The ability to pick up ice blocks with the enchantment was removed in a later version . Water also made Nether mob grinders easier as it can transport items without burning them as well as drown Nether mobs that are immune to lava, such as magma cubes and zombie pigmen.
  9069. In Minecraft 1.0.0, many new things were added to the Nether:
  9070. Magma Cubes
  9071. Blazes and Blaze spawners
  9072. Nether Fortresses and the blocks they are made of
  9073. Nether Wart
  9074. Ghast Tears dropped by Ghasts
  9075. File Save Location: The Nether is saved in the same way normal worlds are, but instead of mixing the world files inside the save folder, the files for Nether are stored in %appdata%/.minecraft/saves/Worldname/DIM-1 (on Windows), whereas normal world files in %appdata%/.minecraft/saves/Worldname. Note that DIM-1 does not contain its own level.dat, as the same level.dat in the upper folder is used for both Overworld and Nether. This means that even if a player changes the level data in the /world folder for a particular save, Nether portals will still take the player to the Nether world originally generated for that save.
  9076. ]])
  9077. nether.close()
  9078. netherslime=fs.open("mem/redworks/minepedia/netherslime","w")
  9079. netherslime.write([[Magma Cubes are hostile mobs found around The Nether. When killed, they release 2-4 smaller versions of themselves in addition to Experience Orbs, similar to Slimes. When they move, they jump up and momentarily unravel into several layers, giving them the appearance of a spring and revealing a molten lava core inside. They are slowed by and sink in lava, but do not drown in it.
  9080. Behavior: In their passive state, Magma Cubes move slowly, jumping forward every two seconds or so. Upon spotting a player, magma cubes will jump towards them more quickly, but the player can still outrun them. It seems that Magma Cubes try to eat the player. Also, they will try to damage the player by jumping directly on top of you. However, they cannot damage other mobs like this.
  9081. History: Magma cubes were first seen in Minecraft 1.9 Beta Pre-Release 1. They were also added in the full release of Minecraft.
  9082. Prior to Minecraft 1.0 RC1, Magma Cubes did not make sounds.
  9083. Trivia: Magma Cubes cannot swim in lava, only jump along the bottom. Thus, they can get trapped in deep lava, although they will not drown.
  9084. Magma Cubes seem to be the Nether equivalent of Slimes. Although they appear similar, the components of their texture files are quite different.
  9085. Contrary to popular belief, Magma Cubes are actually less abundant in the Nether Fortresses than in the rest of the Nether due to fewer large flat surfaces to spawn on.
  9086. Every Magma Cube size drops experience orbs, not only the smallest cube. This means that killing a huge cube and all its spawnlings would grant the player 28 experience, as opposed to 5 experience of other hostile mobs.
  9087. Despite trying, Magma Cubes are unable to jump in water, although they can move around. They will drown if completely submerged.
  9088. Unlike tiny slimes, tiny Magma Cubes can still hurt the player.
  9089. Unlike Slimes, which are rare and only appear below layer 40 in certain chunks of the normal world, Magma Cubes can appear anywhere in the Nether.
  9090. Magma cubes are often found in lava, since they are unaffected by it.
  9091. Like Slimes, when a magma cube is not chasing the player it will hop in one direction.
  9092. Magma cubes can be spawned in the overworld if a spawner is hacked to spawn them. They do not require netherrack.
  9093. It seems that Magma cubes (or at least tiny ones) can only damage you using their bottom side.
  9094. Magma cubes do not seem to take fall damage. A large has been witnessed to fall from a ledge that would normally be deadly, yet take no damage. This may be due to their large jumping height.
  9095. Bugs: Magma Cubes do not seem to use their spring-like jump effect in multiplayer.
  9096. They also seem to frequently glitch through walls, ceilings, and floors, to attack players on the other side; dropping down through the solid roof of a tunnel, for example, then glitching back up to the roof out of sword reach. Or they will lunge out through the walls of a tower while a player is descending via a gravel pillar, and push them off said pillar without causing attack damage. They also seem to sink into Soul Sand, being invulnerable while merged inside a Soul Sand block, yet being able to jump up and attack from inside their protective glitch.
  9097.  
  9098. ]])
  9099. netherslime.close()
  9100. overworld=fs.open("mem/redworks/minepedia/overworld","w")
  9101. overworld.write([[The Overworld is the starting dimension in Minecraft. It is the only dimension that has existed throughout the development of Minecraft; The Nether was the second dimension to be added, in Alpha 1.2.0, and The End is another dimension that appeared for the first time in Beta 1.9pre4.
  9102. The Overworld is the entire three dimensional space in which in-game construction can occur, encompassing the span from the level ceiling down to bedrock and extending in every direction on the horizontal plane. It is generated through a secret process which creates multiple Noise maps to create differing elevations, general chunk shapes, and complex mountain and cave systems.
  9103. All but four of the mobs in the game can appear in the Overworld: Wolves, Pigs, Sheep, Cows, Mooshrooms, Chickens, Squid, Zombies, Skeletons, Spiders, Spider Jockeys, Endermen, Creepers and Slimes all spawn normally, and Pigs can, very rarely, be hit by lightning, which turns them into Zombie Pigmen. Ghasts, Blazes and Magma Cubes can only spawn in the Nether, and the Enderdragon can only spawn in The End.
  9104. Worlds in Minecraft are generated through a procedural formula that takes a random number as a starting point - a seed, and it will be used to generate all the terrain of the overworld (and the Nether).
  9105. As of Beta 1.3 the option was added for the player to specify the world seed. Using a specific seed generates exactly the same world each time, and thus interesting Minecraft worlds could be shared between players. The spawn is not on exactly the same spot, though, so it is wise to give co-ordinates instead of directions. The seed input is converted into an integer, so, for instance, the word 'Glacier' corresponds to a value of 1772835215, which generates exactly the same world when entered as a seed value.
  9106. Many seeds are chosen simply because they spawn the player near desirable resources, a stronghold or some certain special structure, such as a dungeon.
  9107. As of Beta 1.8, players could find the current map seed by tapping F3.
  9108. In Classic and Indev, maps can be generated in "small" (128�97128�9764), "normal" (256�97256�9764), and "huge" (512�97512�9764) sizes.
  9109. In Infdev, Alpha and Beta maps are somewhat infinitely big - They are made up of chunks; this means that as the player explores the map distant chunks are generated automatically, leading to theoretically infinite maps. In practice, technical reasons (the limits of 32-bit integers[1]) force the maximum map size to be around 8 times the surface area of the Earth [1], which comes out to about 4,080,576,000 km2. Whilst the horizontal planes of the maps are vast in size, the vertical plane remains at a fixed 128-block height [2].
  9110. While the map is infinite, the number of blocks the player may walk on is limited. The map, counting air as a block, and not counting blocks beyond and at where block physics fail (32,000,000 from the center) from top to bottom, and all in between, is essentially always 1.31071992 �97 1017 blocks big. In multiplayer, chunks will also stop generating after the world reaches a certain file size.
  9111. Generated Blocks: Entries marked with a D require additional data to fully define the block in a Beta world. Entries marked with an I have a different ID as an inventory item. Entries marked with a B require additional inventory data to fully define the inventory item. Entries marked with a T have tile entities associated with them to store additional data. Items with IDs in red cannot be legitimately obtained in the player's inventory in the game; they can only be obtained by "hacking" (such as the use of Inventory editors) or, in multiplayer using the /give server command.
  9112. Naturally Generated includes blocks that are created through the world seed.
  9113.  
  9114. Icon  Dec  Hex  Block type  
  9115.  00  00  Air  
  9116.   01  01  Stone  
  9117.   02  02  Grass  
  9118.   03  03  Dirt  
  9119.   07  07  Bedrock  
  9120.   09  09  Water (Stationary) D  
  9121.   11  0B  Lava (Stationary) D  
  9122.   12  0C  Sand  
  9123.   13  0D  Gravel  
  9124.   14  0E  Gold Ore  
  9125.   15  0F  Iron Ore  
  9126.   16  10  Coal Ore  
  9127.   17  11  Wood D B  
  9128.   18  12  Leaves D B  
  9129.   21  15  Lapis Lazuli Ore  
  9130.   24  18  Sandstone  
  9131.   31  1F  Tall Grass D B  
  9132.   32  20  Dead Bush  
  9133. Icon  Dec  Hex  Block type  
  9134.   37  25  Dandelion  
  9135.   38  26  Rose  
  9136.   39  27  Brown Mushroom  
  9137.   40  28  Red Mushroom  
  9138.   56  38  Diamond Ore  
  9139.   73  49  Redstone Ore  
  9140.   78  4E  Snow  
  9141.   79  4F  Ice  
  9142.   81  51  Cactus D  
  9143.   82  52  Clay Block  
  9144.   83  53  Sugar Cane D I  
  9145.   86  56  Pumpkin D  
  9146.   99  63  Huge Brown Mushroom D  
  9147.   100  64  Huge Red Mushroom D  
  9148.   106  6A  Vines D  
  9149.   110  6E  Mycelium  
  9150.   111  6F  Lily Pad  
  9151. Naturally Created means a combination of events that cause a new block to be placed by natural causes, not the player.
  9152.  
  9153. Icon  Dec  Hex  Block type  
  9154.  00  00  Air  
  9155.   02  02  Grass  
  9156.   03  03  Dirt  
  9157.   04  04  Cobblestone  
  9158.   08  08  Water (Flowing) D  
  9159.   10  0A  Lava (Flowing) D  
  9160.   31  1F  Tall Grass D B  
  9161.   39  27  Brown Mushroom  
  9162.   40  28  Red Mushroom  
  9163. Icon  Dec  Hex  Block type  
  9164.   49  31  Obsidian  
  9165.   51  33  Fire D  
  9166.   78  4E  Snow  
  9167.   79  4F  Ice  
  9168.   81  51  Cactus D  
  9169.   83  53  Sugar Cane D I  
  9170.   106  6A  Vines D  
  9171.   110  6E  Mycelium  
  9172. Same as Naturally Generated, but these blocks are only created with the "Generate Structures" option enabled.
  9173.  
  9174. Icon  Dec  Hex  Block type  
  9175.   05  05  Wooden Plank  
  9176.   09  09  Stationary Water D  
  9177.   11  0B  Stationary Lava D  
  9178.   13  0D  Gravel  
  9179.   17  11  Wood D B  
  9180.   30  1E  Cobweb  
  9181.   35  23  Wool (Black) D B  
  9182.   44  2C  Slabs D B  
  9183.   47  2F  Bookshelf  
  9184.   50  32  Torch D  
  9185.   52  34  Monster Spawner T  
  9186.   53  35  Wooden Stairs D  
  9187.   54  36  Chest D T  
  9188.   58  3A  Crafting Table  
  9189. Icon  Dec  Hex  Block type  
  9190.   59  3B  Seeds D  
  9191.   60  3C  Farmland D  
  9192.   61  3D  Furnace D T  
  9193.   64  40  Wooden Door D I  
  9194.   65  41  Ladders D  
  9195.   66  42  Rails D  
  9196.   67  43  Stone Stairs  
  9197.   71  47  Iron Door D I  
  9198.   72  48  Wooden Pressure Plate D  
  9199.   77  4D  Button D  
  9200.   85  55  Fence  
  9201.   97  61  Hidden Silverfish D  
  9202.   98  62  Stone Bricks D B (2)  
  9203.   101  65  Iron Bars  
  9204.   102  66  Glass Pane  
  9205. Chunks are the method used by Notch to divide maps into manageable pieces. They are 16 blocks wide, 16 blocks long, and 128 blocks deep, and encompass 32,768 blocks. By adjusting the render distance, differing numbers of chunks will be loaded into memory, with "far" rendering the maximum of 81 chunks. Only chunks which have been loaded may experience activity such as spawning, despawning, growth, liquid movement, or player interaction. Upon reaching the required distance away from a chunk, it will be unloaded from the memory, however not deleted. Thus, upon re-entering that area, whatever has been changed will remain changed.
  9206. Another subdivision of The Overworld is into Biomes. Biomes may have varying sizes, and each has its own features. For example, a forest biome will have large quantities of trees, where as a snow biome will have snow and ice.
  9207. The Overworld is able to seamlessly create new areas by using patterns found in the surrounding chunks and extend those into the newly created chunk. These patterns, while unique to each world, can be categorized easily by comparing them to a real-world equivalent, such as cliffs or oceans. While Minecraft is based on landforms found on earth, impossible formations, such as floating islands, can be found throughout the Overworld.
  9208. The Overworld can be navigated by use of the position of the sun and the moon, the movement of the clouds, and the movement of the stars. Assuming that the sun and moon rise in the east and go west, the clouds can be observed moving north and stars east.
  9209. Tools used for Navigating The Overworld include the Compass and Map. The Compass points to the spawn point, and the Map shows a fixed area around where it was made, and shows you the area very generically. In the Nether, the Compass needle will spin wildly, and is thus useless. Since Beta 1.9 (Pre-Release 4), the Compass needle and the Clock will spin randomly within The End, similar to the Nether.
  9210. Since Alpha 1.2.3, the F3 key toggles a debug console which shows the player their absolute coordinates, where the X and Z coordinates show longitude and latitude, and the Y coordinate shows height, where Y=64 corresponds to sea level. In addition, in Beta 1.7 an 'f' value was added, which indicates the direction the player is facing, 0 being the direction in which the sun sets, and it goes counter clockwise from there: 1 being the direction in which the clouds move, 2 and 3 are opposite to 0 and 1 respectively.
  9211. Since the sun changed position relative to the clouds (they now move in the same direction) in 1.0.0, if you want to assume that the sun rises in the east and sets in the west, the 'f' values are, 0=west, 1=south, 2=east, and 3=north
  9212. The overworld is the only dimension with a day/night cycle. During the daytime, the sun acts as a light source. This light is strong enough to kill Zombies, and Skeletons, make Endermen disappear and also makes Spiders neutral. The only mobs that survive and stay hostile in the daylight are creepers, slimes and cave spiders. At night time the moon is the only natural light source however it provides only a little light, allowing hostile mobs to spawn.
  9213. The Far Lands used to be an area that formed the "edge" of the "infinite" map, but was later removed accidentally from a patch on 1.8 due to the change in the terrain generation code. When players made it to the Far Lands, they experienced an excessive amount of lag and the map was severely distorted.
  9214. According to Notch, this distortion could be fixed, but since no one was likely to make it to the Far Lands without some form of cheating, he says that he was likely not going to fix it since he liked the idea of a mysterious world beyond a certain distance. When the Beta 1.8 update was released, the newly re-written biome code did in fact remove the Far Lands and will just generate as an extremely large ocean. The far lands may be brought back in a later patch, though it is unlikely.
  9215. Trivia: World seeds can be extracted from the level.dat file by various modes or seeds, such as http://seedscope.net. Alternatively, it can be found in-game on the performance screen accessed by pressing F3.
  9216. There is a bug that sometimes causes the files for deleted worlds to not be deleted from your hard drive. If a new world is created with the same name, this can cause the game to reuse the old files, and thus, parts of the old map, rather than generate an entirely new map.
  9217. ]])
  9218. overworld.close()
  9219. pig=fs.open("mem/redworks/minepedia/pig","w")
  9220. pig.write([[Pigs are passive mobs that are the source of porkchops, and are a renewable source of food. They are 0.875 blocks tall, 0.625 blocks wide and 1.25 blocks long.
  9221. Usage: Each pig will drop 0 - 2 raw porkchops upon death. Since Beta 1.5, Pigs that die while on fire will drop 0 - 2 cooked porkchops instead.
  9222. Behavior: Pigs roam the Overworld in groups of 3 - 4. When they encounter obstacles, they will often try to surmount them by hopping up and down. They make no attempt to stay out of water, bobbing up and down to stay afloat. Pigs have been described as the "stupidest mob" due to their inefficient, sometimes comical, pathing. When leading them with wheat they will often become stuck on the opposite side of a block rather than walking around it.
  9223. By right-clicking on a pig while holding a saddle, a player can ride it. However, the movement of the pig cannot be controlled by the player. Riding a pig off a cliff is one of the more unusual and challenging achievements in Minecraft.
  9224. Pigs tend to move more often, but in smaller strides, towards the North-East, without any other variables coming into play.
  9225. Breeding: Like all passive mobs, excluding squid and villagers, pigs can be bred using Wheat. If you right click a baby pig with a saddle, you will find yourself riding the baby pig.
  9226. Bugs: If you save and quit while riding a pig the "Saving Chunks" bar will not fill up properly and can stop filling up and appear to be frozen before it suddenly opens the main menu (without the bar filling up any more).
  9227. In single player, monster spawners contain a spinning miniature mob of the type that will be spawned. On SMP, on the other hand, monster spawners always contain a miniaturized pig, no matter what mob they spawn.[3]
  9228. When a pig that is being ridden is killed, it will not drop the saddle.
  9229. In 1.8 and 1.9 there is a bug that makes the pigs spawn too much.
  9230. Trivia: For some reason, all Mob Spawners found in SMP have pigs inside them instead of whatever creature they actually spawn, with the singular exception of the Cave Spider.
  9231. In addition, any Spawner placed by a Player will be a Pig Spawner on default. It may be altered via Mods later on.
  9232. Pigs have a separate "armor" file (the saddle), but do not spawn with it.
  9233. If you manage to get a pig with a saddle into a minecart, the pig will boost the minecart.
  9234. By putting a pig with saddle in a minecart, and getting it off the tracks, it acts like a car. But with opposite controls.
  9235. If a ridden pig is hit by lightning, it still turns into a Zombie Pigman. The Player will receive 2 and a half hearts damage and be knocked off the mob.
  9236. It takes one full Minecraft day or 20 minutes for baby piglets to become fully mature pigs.
  9237. Baby Pigs that get hit by lightning turn into Zombie Pigmen, the same as normal pigs do.
  9238. When the player is riding a pig, the player can still sneak.
  9239. One of the splashes which shows up on the title screen reads "Ride the pig!" (Possibly a reference to the TV show Invader Zim).
  9240. ]])
  9241. pig.close()
  9242. rain=fs.open("mem/redworks/minepedia/rain","w")
  9243. rain.write([[Rain is an element in the game. Much like snowfall, it is a type of weather. It currently exists in Classic, Beta and full versions of the game.
  9244. Rain in Classic: Rain is a feature activated by pressing F5 in-game in Classic. Rain can also fall on Multiplayer, but cannot be seen by other players. It will only fall where the sky isn't blocked and has no effect on gameplay. Rain is a single moving sprite. When it falls on a block it makes a splashing effect. To improve frame rate, rain isn't replicated all throughout a map. It is instead one sprite on all sides of the player. When the player goes inside and far away from the falling rain it disappears but reappears when you move close to outside again. Water does not stop rain like a solid block. Instead, it falls through as if there was air. The same applies to lava and small plants. Rain in Classic does not decrease the light level.
  9245. Rain in Beta and Full: Rain and falling snow were included in Beta 1.5. Rain looks identical to the rain in Classic, but also plays two different sound files.
  9246. Precipitation varies by biome. Rain never falls in deserts though the sky still darkens, and in winter biomes snow falls instead of rain. If you are between a biome that produces rain and another that produces snow, you can see both snow and rain.
  9247. Effects:
  9248. Rain and Snow: Rain and snow Rain and snowfall are temporary but global occurrences.[1]
  9249. During rain and snow, thunderstorms become possible.
  9250. Rain and snowfalls decrease the light level by 3, to light level 12 in full daylight. Thunderstorms decrease light level to 7 in full daylight, which allows hostile mobs to spawn aboveground.[2]
  9251. Rain: Rain and snow Rain and snowfall are temporary but global occurrences.[1]
  9252. During rain and snow, thunderstorms become possible.
  9253. Rain and snowfalls decrease the light level by 3, to light level 12 in full daylight. Thunderstorms decrease light level to 7 in full daylight, which allows hostile mobs to spawn aboveground.[2]
  9254. History: In early Classic, rain was introduced to the game to test out this feature. It was purely for cosmetic purposes at that time. The mechanics were simple, only testing if there is a block above to shelter the rain. It could be toggled on and off in-game using the F5 key. This feature later vanished when Indev was introduced.
  9255. After Minecraft Beta 1.5's announcement, a preview video was uploaded onto the TeamMojang YouTube channel showing weather and other future updates. Rain was then introduced the following week.
  9256. Bugs: When going down a ladder exposed to the sky, rain moves slower than it should, and moves at the same pace as if one were normally falling. This makes the rain appear to freeze and the player fall faster than it. In the opinion of some players, this looks really cool. This effect can also be achieved by pressing shift to descend while flying in Creative mode.
  9257. If you are in a cloud, the rain will let you "see" through the cloud.
  9258. When you open your inventory, the sun, moon and stars re-appear.
  9259. If you start to break glass with rain in front of it, the rain will disappear.
  9260. Rain doesn't pass through signs.
  9261. Rain does not extinguish burning mobs when they are standing in doorways.
  9262. In the 1.8 Pre Release, rain can sometimes fall through blocks, such as stone and dirt. This includes Grass.
  9263. Rain can also fall through wooden plank blocks.
  9264. Rain can fall through Jack-O-Lanterns and Pumpkins.
  9265. Rain falls on rivers, even if you are in a desert.
  9266. In some areas (especially in extreme hills biomes), the rain to ground collision effect isn't attached to the rain, which also means the rain sound doesn't play while it is raining.
  9267. Flying above the clouds in Creative Mode allows you to see that the rain doesn't come from the clouds themselves, but from the sky above them.
  9268. Trivia: Rain is a single moving sprite.
  9269. In minecraft 1.0.0 (minecraft release) if you turn particles to minimal then rain wont make any sound.
  9270. Rain falls only in the two middle lines of a block, therefore it looks like it is not raining directly above you, but actually the "square" in the sky is shifted half a block in each direction.
  9271. In the code snow and rain are classified the same.
  9272. Although you cannot see the sun during rain, the glow associated with sunrise and sunset is still visible.
  9273. When the player uses a Bed, the rain stops when they wake up.
  9274. Rain still falls above the clouds. Notch's explanation is that the gray above the clouds during a storm is another layer of clouds and the origin of the rain.[7]
  9275. An Enderman will start to burn to death if it is raining
  9276. Rain only moves with you, but it appears enemies far away, such as Endermen, are affected.
  9277. Although you cannot see the rain sprite in the desert; if it is raining and you are at the edge of the biome, you can still see particles bouncing off the grass or stone in the neighboring biome.
  9278. In some very rare occasions, it appears to be raining in caves. This will only happen if the cave almost, "Touches the Skybox".
  9279. Rain actually falls one block into the void (Layer -1). This can be achieved by digging a vertical shaft down in Creative mode, removing the bottom layers of Bedrock and floating inside the Void (in flying mode). Note that no particles are emitted from the rain, due to the absence of a block below it.
  9280. ]])
  9281. rain.close()
  9282. redworks=fs.open("mem/redworks/minepedia/redworks","w")
  9283. redworks.write([[RedWorks is an Addon-Software for the CraftOS. It was developed to be more user friendly, add new api's, programs, additional content, as well as connect to the real internet.
  9284. It's primary focus is the CC. now known as CCIRC is a chat program in Lua, run through CC that allows you to use a real time chat program online hosted by Casper that can be used through SSP/SMP.
  9285. RedWorks was a project that was thrown together and modded by the entire team, all working together to get the package complete.
  9286.  
  9287. Additional info can be found at our Official website. www.RedWorksOS.com
  9288.  
  9289. RedWorks was created by: Sledger721, Vertex Beta, Islanderon,
  9290. Casper7526, bik1230, iHatePiez, XLC, Sicknezz99999 and Streetstar5.
  9291. Testers: Onionnion, Kingrunes, bess1000, 1lann, & ronin
  9292. Pixel Artist: Javascap, Dry_Taste
  9293.  
  9294. Visit our forums @ http://www.RedworksOS.com
  9295. Get live support and friendly chat with Devs of CC & Redworks!
  9296. Webchat: http://webchat.esper.net/?channels=#computercraft
  9297. IRC: irc.esper.net Port: 5555 room: #ComputerCraft
  9298. ]])
  9299. redworks.close()
  9300. sheep=fs.open("mem/redworks/minepedia/sheep","w")
  9301. sheep.write([[Sheep are a passive mob that supply wool when sheared or killed and can be dyed with any of the 16 colors before shearing to produce colored wool. Sheep are 1.25 blocks tall, 0.625 blocks wide and 1.4375 blocks long, and they naturally spawn in the following colors: white, black, gray, light gray, brown, and pink. Killing a sheep will drop 0-1 wool when killed, where as shearing yields 2-4 (1-3 as of Minecraft Weekly Build 11w49a).
  9302. Usage: Wool is easiest to obtain from sheep, as it can be obtained by shearing them with Shears or killing them. Shearing a sheep will produce 2-4 Wool (1-3 as of Minecraft Weekly Build 11w49a). As of week 49 snapshot sheep can now regrow wool by eating grass turning the grass block into a dirt block. As of week 50 snapshot, Baby Sheep eat grass much faster than adults.
  9303. Sheep will drop one wool when killed even if they are killed by Fire, Cacti or Wolves. Wool can also be crafted using 4 pieces of String, but it is much less dangerous for the player to shear sheep rather than hunt down Spiders constantly.
  9304. A block of white wool can be crafted with a unit of dye to produce colored wool. However, a much more efficient method is to apply the unit of dye directly to an un-sheared sheep by right-clicking on a white sheep while holding it, as the dyed sheep can drop 1-3 blocks of colored wool when sheared.
  9305. Behavior: Breeding two sheep will produce a baby sheep of the same color as one of the parents, chosen at random. Sheep will produce baby sheep of the same wool color as their parent, even if that parent has been sheared. This can be used to obtain large quantities of colored wool, rather than relying as heavily on potentially rare dyes, such as Cocoa Beans or Lapis Lazuli.
  9306. History: Sheep were first introduced in Survival Test mode. Before leather was added to the game, wool was used to craft leather armor. Each sheep dropped 1?03 white wool when hit (but this did not injure them) and 0?02 brown mushroom upon death. In Survival Test sheep used to graze and eat grass, turning it into a dirt block, and after eating three grass blocks, sheep would regrow their wool.[1] In Indev and Infdev, sheep would only drop 2 blocks of white wool when hit. In an old Indev version, sheep would drop a mix of white, gray or black wool blocks. Sheep then reverted to dropping only 1?03 blocks of white wool when hit in Alpha. As of the first Beta update, sheep began to drop 1?03 blocks of the same color of wool as the sheep when it was hit.
  9307. In the Beta 1.2 update, sheep could naturally spawn with black, gray, and light gray wool along with the traditional white. Sheep could also be painted with dye and sheared to obtain colored wool blocks. As of Beta 1.4, brown and pink sheep were added to the naturally appearing colors of sheep. Beta 1.6 changed the recipe for wool from requiring 9 pieces of string to 4. With the inclusion of shears in Beta 1.7, sheep drop 1 block of wool when killed and 2?04 blocks when sheared.
  9308. In Beta 1.9 Pre-releases 2?05, Sheep/Lambs spawned via animal breeding would always be white regardless of their parents' color. From Pre-release 6 and subsequent versions, the baby will take on the color of one of the parents. Having two parents of the same color assures a certain color offspring.
  9309. Sheep were originally planned to drop meat when killed.[2] As of the Beta 1.8 update, Raw Beef, and Raw Chicken are animal drops, but sheep still have yet to be associated with any consumable item. Before the Beta 1.7 update, the Player did not need to kill sheep to obtain wool because hitting them, even with a non-damaging attack such as thrown Snowball or a fish hook from a Fishing Rod, would cause them to drop the wool. Now Sheep do not drop wool or enter a wool-less state until the Player shears them.
  9310. Prior to Beta 1.9 Pre-release 3, Sheep had 10 () health. It was it was changed to 8 () health in that update.
  9311. In Minecraft Snapshot Update 11w49a, sheep reverted to dropping 1-3 wool when sheared. In another snapshot released by Jeb_ Sheep will now eat Grass and regrow wool. Interestingly, they will regrow the color of wool they had before shearing, even if they had been dyed.
  9312. Trivia: Sheep were the second mob to spawn with both a separate body and armor file, the first being the pig; the sheep's "armored" state is wooly, while the pig's "armored" state is when they are wearing a saddle.
  9313. After being sheared, all sheep (regardless of their original color), will have remnants of white wool color on their head and legs.
  9314. Sheared sheep have a more slender head and exposed ears.
  9315. If you damage the sheep 7 hits (3 1/2 hearts) you can get 5 wool blocks by clicking both mouse buttons at the same time while holding shears, though it requires practice as you have 1/20 of a second between each mouse click.
  9316. If a sheep spawner is placed via hacking, there will be a black sheep model spinning inside, but it will spawn only white sheep.
  9317. If you try to shear a baby sheep, it will give you the same wool an adult sheep could drop. When the baby sheep grows up, however, it will remain sheared.
  9318. Currently, if one were to sprint and knock back a sheep while the sheep is in it's grass eating stance, if you were to knock back the sheep before it eats the grass, it will be knocked back, but will not run away. Rather than running, the sheep eats the grass that it was knocked into.
  9319. Bugs: Sheep were the second mob to spawn with both a separate body and armor file, the first being the pig; the sheep's "armored" state is wooly, while the pig's "armored" state is when they are wearing a saddle.
  9320. After being sheared, all sheep (regardless of their original color), will have remnants of white wool color on their head and legs.
  9321. Sheared sheep have a more slender head and exposed ears.
  9322. If you damage the sheep 7 hits (3 1/2 hearts) you can get 5 wool blocks by clicking both mouse buttons at the same time while holding shears, though it requires practice as you have 1/20 of a second between each mouse click.
  9323. If a sheep spawner is placed via hacking, there will be a black sheep model spinning inside, but it will spawn only white sheep.
  9324. If you try to shear a baby sheep, it will give you the same wool an adult sheep could drop. When the baby sheep grows up, however, it will remain sheared.
  9325. Currently, if one were to sprint and knock back a sheep while the sheep is in it's grass eating stance, if you were to knock back the sheep before it eats the grass, it will be knocked back, but will not run away. Rather than running, the sheep eats the grass that it was knocked into.
  9326. Future: Jeb may add mutton to Minecraft.
  9327. Notch stated that sheep and possibly other passive mobs will eat grass, then the blocks will become soil blocks.[citation needed] It was also stated that wool will regrow on sheep, and will happen as of Week 49 release 11w49a.[4] Furthermore, as of 11w50a, Sheep also eat Tall Grass.
  9328. ]])
  9329. sheep.close()
  9330. silverfish=fs.open("mem/redworks/minepedia/silverfish","w")
  9331. silverfish.write([[Silverfish are small, bug-like mobs which have silver skin and black eyes that hide in special blocks found in strongholds. These blocks will look identical to stone bricks, cobblestone, or regular stone but take slightly longer to mine. When the block is mined, the silverfish pops out and attacks. In regular gameplay, Silverfish blocks occur rarely. If left alone, silverfish can re-enter some blocks, namely cobblestone, regular stone, and stone bricks. Silverfish don't damage the player directly, but they will scurry towards the player and push them around, which can be aggravating and sometimes dangerous.
  9332. When attacked, Silverfish may awaken other Silverfish blocks within a 21x11x21 block area around them. This can lead to a terrifying swarm if there are enough in the vicinity, and an uncontrolled swarm can quickly destroy dozens of stone bricks within a Stronghold. They scurry away after the player moves a short distance.
  9333. In addition to the special blocks, monster spawners that spawn silverfish can also be found in strongholds.
  9334. Spawning: Silverfish spawn only from silverfish blocks and monster spawners. In the latter case, they can only spawn in light level 11 or lower, except on top of stone blocks, where they can spawn at any light level. They also cannot spawn within a 5 block distance of any player. These restrictions only apply when spawning from a monster spawner, and not from a Silverfish block.
  9335. History: The texture, silverfish.png, was added in the /mobs folder in the Beta 1.7 update, though the mob itself was not yet present. This was due to Beta 1.7 being most of Jeb's new content at that point for the first part of the Adventure Update, and Silverfish had apparently been completed prior to the release of Beta 1.7 by Jeb.
  9336. In Beta 1.8, Silverfish were properly implemented. They could only be found by mining certain blocks with the appearance of Stone Bricks in Strongholds.
  9337. As of Beta 1.9 Pre-Release 3, a Silverfish Spawner can be found in the End Portal room in Strongholds.
  9338. Trivia: In real life, silverfish are small, wingless insects that are often found in dark areas in buildings. They are infamous for damaging paper-based products.
  9339. There are also small ray-finned fish called Silverfish. These were proven unrelated after a tweet from Jeb.
  9340. The block they spawn from when destroyed is ID 97, which can appear as stone, cobblestone or stone brick.
  9341. Block 97 is mined at the same speed regardless of the tool used.
  9342. As of 1.8, they spawn additional Silverfish from nearby Silverfish blocks (Block 97) and blocks containing escaped Silverfish when attacked. Blocks are destroyed in the process of spawning.
  9343. Silverfish made the same noises as Spiders in 1.8. This was a placeholder and new sounds were made, but not yet implemented at the time.[1]
  9344. Silverfish do drown in water when forced under by a block above or something similar.
  9345. Silverfish can be killed with fire, lava or explosions without the Silverfish turning hostile, preventing them from calling in more allies, so long as the player does not hit them directly.
  9346. Silverfish can ride in minecarts like all mobs but only seem to get into them when jumping, they push them around when just crawling into them.
  9347. The stone-like block that produces silverfish when broken is often used in some servers as a form of griefing, in which the griefer places the stone-like blocks in players' houses, and the player gets attacked by silverfish as soon as they break it. It is also possible to create stairs, bridges or flying platforms out of silverfish blocks. When a player breaks a block (to open a chest, for example) , a silverfish will spawn. Inexperienced players will attack the silverfish on sight, resulting in more spawning, which will cause the death or stranding of the player by falling or silverfish attacks.
  9348. Silverfish blocks can be found by almost breaking blocks in stronghold (though actually breaking them is not a good idea) with your hands, as a silverfish blocks break like wool with your hand.
  9349. Silverfish Blocks can be pushed and pulled with sticky pistons without breaking. This allows for traps with Silverfish blocks exactly where you want them completely legitimately. This is very easy but it takes a long time. To do this you simply place a piston facing a silverfish block (Silverfish Blocks can be found by trying to mine blocks with your hands) and then operating the piston with a power source (for example a redstone torch or a lever), repeating until the block is where you want it.
  9350. When the difficulty is set at peaceful, breaking a block 97 will make a puff of smoke as it would when spawning a silverfish, but the silverfish despawns instantly, similar to how mob spawners act during peaceful difficulty.
  9351. Silverfish do not stop and look around like most other land mobs; they constantly scurry around even when not in chase of anything (Tested in Minecraft Beta RC2)
  9352. If you attack a Silverfish with a Diamond Sword that is enchanted with Sharpness I, it will kill the Silverfish in one hit and it won't call any reinforcements.
  9353. Silverfish are the only mob which have their own sounds for walking. They make a scuttling noise, regardless of what kind of block they are stood upon.
  9354. A silverfish block can be mined much faster than a normal stone block, which can be used to tell the difference
  9355. The silverfish, and the spider are the only real hostile animals. (However spiders are smaller)
  9356. Bugs: Silverfish will suffocate and can die if they crawl through a Portal block.
  9357. In SMP, even when mobs are turned off, Silverfish will still spawn.
  9358. In SMP, when a silverfish breaks out of a block, the dust effect is not visible.
  9359. In SMP, sometimes when a silverfish spawns, the silverfish appears to be completely black (this might be due to a poor quality graphics card).
  9360. ]])
  9361. silverfish.close()
  9362. skeleton=fs.open("mem/redworks/minepedia/skeleton","w")
  9363. skeleton.write([[A skeleton is a fairly fast-paced enemy that will shoot arrows at the player and any mobs that attacks it. Like zombies, skeletons spawn in dimly lit areas, and will burn in daylight (when the sun is 15 degrees or greater above the ground) unless they are swimming in water or are standing in the shade. For example, underneath a tree, outcropping of a mountain or player-built structure.
  9364. Uses: skeletons are the sole source of bones (and bone meal) and can also drop fully formed arrows. Each skeleton will drop 0 - 2 bones and/or 0 - 2 arrows upon death. Although skeletons will fire arrows into walls and the ground, the player cannot pick up and re-use these arrows. Because of its valuable drops, skeleton dungeons are well sought-out for mob grinding purposes.
  9365. Creepers must be killed by a skeleton's arrow in order to drop a Music Disc.
  9366. Behavior: The presence of a skeleton is identifiable by the soft rattling sound of its bones. It will walk and jump around aimlessly until it spots the player. At that point, it will start firing arrows in the player's direction with moderate accuracy, aiming at head level when it is at full health and at torso level when injured. When approaching a target, a skeleton will strafe to its right and bunny-hop, making itself more difficult to hit. However, these tendencies often get skeletons stuck in small alcoves and caves.
  9367. If a skeleton's arrow hits another hostile mob, that mob will then attack the skeleton the same way it would attack the player - creepers will detonate near the skeleton after being hit. The skeleton will continue to attack the player until it is damaged by the mob. In short, mobs will always attempt to attack the last mob (including a player) that cause damage to them. Skeletons will also attack the last mob they hit with an arrow, as in, if a skeleton shot another skeleton, both skeletons will attack the other, not just one. If the player intervenes, however, they will both attack the player.
  9368. Combat: Skeletons pose more of a threat because they have ranged attacks and will strafe, jump, and dodge when approaching the player. This can prove especially problematic if the player does not have a bow. By carefully maneuvering behind corners, skeletons can be trapped against the walls and cautiously dispatched with a sword.
  9369. Going after skeletons while swimming is not advised, as the water will slow the player's movement down to the point of making them an easy target for the skeleton's arrows. Their arrows travel in a straight line as of 1.8, however, pre 1.8 their arrows use to travel to in a wide arc, which would sometimes causes the arrows to get stuck in the ceiling. If skeletons are in a 2 block high area, they could almost never hit you unless they were very close, or if their health was low, and they were shooting from their torso.
  9370. As of Beta 1.9 Pre-release 5 Skeletons, Zombie Pigmen, and Zombies can be damaged by Splash Potions of healing.
  9371. Defensive Measures: Skeletons are vulnerable to daylight (when not standing in water), lava, fire, falling, and contact with cacti. They are also able to climb ladders. Surface skeleton populations can be controlled if the player regularly sleeps in a bed at dusk, since skeletons will spawn in the dark if given the chance to. Players can keep an ear out for the clicking and xylophone-like sounds of nearby skeletons in caves and use certain corners and tight spaces to their advantage.
  9372. If skeletons do get close to your home, the player must note that a door is not an adequate safety barrier, unless it was placed from the outside. Skeletons can shoot arrows through doors if placed from the inside and will not desist until daytime, and the player is advised to have some form of preliminary defenses to prevent a skeleton getting so close.
  9373. Construction Safeguards: Proper lighting around and inside structures is essential to preventing skeletons (and other hostile mobs) from spawning.
  9374. History: Skeletons were a hostile mob introduced to the game in Survival Test. They spawned randomly in new Survival maps and followed players when approached, much like zombies. They fired purple arrows, appeared to fire arrows at a faster and more random rate and shot 6 arrows outward a short range in all directions when dying. Arrows fired by skeletons at that time could be picked up and used by players. Skeletons took 5 hits to kill and could appear wearing NPC armor (that gave them no additional protection) and gave 120 points when killed.
  9375. In Alpha, skeletons would drop 0 - 2 arrows upon death. As of Alpha 1.2.0(Also known as the Halloween Update), skeletons hold a bow in their right hand.
  9376. As of Beta 1.2, skeletons can drop 0 - 2 bones in addition to arrows. These bones can be turned into bone meal, and mixed with other ingredients to make dyes or applied to wheat and saplings to mature the crop instantly. In Beta 1.4, skeleton bones could be used to tame wolves. As of Beta 1.6.6, bone meal applied to grass blocks will grow tall grass and flowers. As of Beta 1.8, they now hold full-sized bows and their rate of fire is reduced. Their arrows however, will be shot with more force. Also as of Beta 1.8, bone meal can also be used on a mushroom to create Huge Mushrooms.
  9377. As of Beta 1.8, a skeleton's bow is now larger and held more realistically, and they also fire arrows slightly slower. This update also fixed a bug where skeletons would fire their arrows from above their heads.
  9378. Trivia: Skeletons cannot hit the player if they stand perfectly still and the skeleton doesn't move.
  9379. Skeletons have the same face as zombies, but with a different color.
  9380. Skeletons' legs have the same texture as their arms.
  9381. If the player is under a skeleton, it will shoot itself.
  9382. Though they have the same pose as a zombie, they will not damage the player through contact (touching).
  9383. In terms of potential threat, this makes little difference; while skeletons cannot fire arrows as rapidly as zombies will hit, they will continue to fire their bows at the player from point-blank range.
  9384. A skeleton in a Minecart will burn on contact with sunlight.
  9385. Despite holding a bow, they do not drop it when they die.
  9386. Since Beta 1.8, Skeletons hold their bows more realistically (two-handed, ready to use) than in previous versions (in one hand).
  9387. Skeletons may spawn on top of a spider creating a "Spider Jockey"
  9388. In Creative Mode, when a skeleton shoots an arrow at the player, the arrow bounces off and can hit the skeleton or other mobs. If it hits another hostile mob, it causes it to become hostile to the skeleton.
  9389. Skeletons can climb up ladders, but they will not shoot the players while climbing up. They do not use ladders to their advantage, and often simply use it if it is directly in front of them while in pursuit of the player.
  9390. In Survival Test, Skeletons shot arrows with a magenta colored shaft. This texture is currently unused but it still can be seen in arrows.png.
  9391. A Skeleton can kill itself with its own arrows if the player stays directly above it while flying in Creative Mode.
  9392. If a skeleton shoots itself with its own arrow, the arrow does not stick to the skeleton.
  9393. Since Beta 1.9 pre 5, a splash potion of fire resistance can be used to spare skeletons from burning to death in the sun.
  9394. A skeleton hit by a splash potion of harming will gain health, however, when it is hit by a splash potion of healing it will lose health. It is also unaffected by potions of regeneration and poison. This is because skeletons are undead.
  9395. The only way to obtain a music disc, not counting a chest found in a dungeon or mine, is for a skeleton to kill a creeper who will then drop one.
  9396. ]])
  9397. skeleton.close()
  9398. slime=fs.open("mem/redworks/minepedia/slime","w")
  9399. slime.write([[A slime is an animate, green, gelatinous, yet relatively rare mob in the shape of an ordinary cube that can appear in various sizes. They will follow and attack a player who comes close enough. When killed, a slime will split into smaller slimes, except for the smallest slime which will drop slimeballs instead. Slimes are found only in the lowest 40 layers of the map, and only in certain areas.
  9400. Usage: A tiny slime will yield 0 - 2 slimeballs upon death. Slimeballs are a key ingredient of sticky pistons[1] and magma cream.
  9401. Behavior: Slimes move by hopping. They will always hop toward the closest player within 16 blocks (spherical) distance, even if they can't see that player. If no player is in range, they will simply hop in a straight line in whatever direction they were left facing. When they first spawn, they are facing in a randomly chosen direction.
  9402. Tiny slimes deal no direct damage to the player or other entities, but can push them, occasionally into lava or other hazards. The larger slimes cause damage on contact proportional to their size.
  9403. Slimes can take damage in all the usual ways: burning, falling, drowning, suffocating inside blocks, being attacked, falling into The Void, etc. When slimes are killed, they will split into 2-4 slimes of the next size down. Tiny slimes will not split, but will drop 0-2 slime balls on death.
  9404. In shallow water, slimes can hop fast enough to fight the current, as long as their hopping is not obstructed by a low ceiling. They will sink in deep water and won't be able to hop while submerged. They can also climb ladders, and be pushed over slabs but not stairs.
  9405. While big and small slimes make a wet slapping noise, tiny slimes create the same sound as a player would walking on the block they are hopping on. Larger slimes make a splattering sound distinct from their movement noises when damaging a player. Slimes do not grow larger or smaller over time.
  9406. Spawning: Slimes spawn only below layer 40, and only in certain chunks that are determined pseudo-randomly by the seed of the world. Roughly 10% of chunks will be able to spawn slimes, based on the formula:
  9407. Random rnd = new Random((long) seed
  9408.                        + xChunk * xChunk * 0x4c1906L
  9409.                        + xChunk * 0x5ac0dbL
  9410.                        + zChunk * zChunk * 0x4307a7L
  9411.                        + zChunk * 0x5f24fL
  9412.                        ^ 0x3ad8025fL);
  9413. return rnd.nextInt(10) == 0;
  9414. That is, Java's random number generator is first seeded by the value (long) seed + xChunk * xChunk * 0x4c1906L + xChunk * 0x5ac0dbL + zChunk * zChunk * 0x4307a7L + zChunk * 0x5f24fL ^ 0x3ad8025fL, then the random number generator is asked to generate its first random number between 0 to 9. If this number is equal to 0, the chunk with coordinates (xChunk, zChunk) is able to spawn slimes. To convert world coordinates to chunk coordinates, divide by 16 and round down.
  9415. Tools exist to calculate which chunks are slime chunks?0�see #Slime Finding Tools.
  9416. Like most other mobs, Slimes require two vertical non-opaque blocks (e.g., air, signs, torches) to spawn in, with an opaque block underneath. The space they spawn in must also be clear of solid obstructions and liquids. Big Slimes require a 3x3x3 space to spawn, Medium Slimes require a 3x3x2 space, and Small Slimes require a 1x1x2 space (or 1x1x1 if the upper block is not opaque).[2] Slimes are equally likely to spawn at all sizes. Slimes are much more likely to spawn in a 3 high room.
  9417. Slimes spawn only 1/10th as often as other hostile mobs, so they can be hard to find. Slimes can spawn in any light level and lighting does not affect their spawn rate. However, lighting up the surrounding area does decrease the chances of non-slime mobs spawning and thus indirectly increases slime spawning rates.
  9418. Slimes have equal chances to spawn at any size. They do NOT spawn in peaceful mode.
  9419. Like any hostile mob, slimes will not spawn within 24 meters (spherical) of any player. Similarly, slimes will despawn after some time if no player is within 32 meters, and despawn instantly if no player is within 128 meters.
  9420. The slime spawning algorithm is discussed in greater detail in this forum topic, but note that the algorithm has changed many times and older information may no longer be accurate.
  9421. Farming: Once a slime spawning chunk has been determined the process of encouraging slime spawning is relatively simple. The player can proceed in clearing out large rooms - typically 3 x 3 x 3 or larger - and should light them as to prevent the spawning of additional unwanted mobs. Waiting for slimes to spawn in these rooms can be lengthy at times, however. See the [Slime spawning page on minecraftforum.net] mentioned above for more information on how to increase this rate.
  9422. A similar method can also be used to players intending to play the game "legit" and avoid resorting to tools and mods. The player can simply go down the below the maximum height allowed for slime spawning and strip mine a cavern. Assuming this cavern is large enough, there is a chance that at least one chunk will be allowed to spawn slimes. Considering the number of chunks allowed to spawn slimes is around 10% (or 1 in 10 probability), it is advised the the cavern encompass a minimum of 10 chunks so that at least one will theoretically be allowed to spawn slimes. This method is not recommended but does work.
  9423. History: Slimes were the fifth hostile mob added to the game on July 23, 2010 (Seecret Friday 6! Alpha 1.0.11). Notch limited slime spawning shortly afterwards because they would appear in abundance. A miscalculation in the new limit caused slimes to only spawn in strange locations, so Notch then disabled natural slime spawning.
  9424. Small slimes started to drop 0 - 2 slimeballs in Beta. Notch confirmed in Coestar's livestream that slimes had been reskinned and returned in Beta 1.2_01 but were still very rare.[3]   Slimes became more common in Beta 1.3  A bug remedied in Beta 1.5 caused slimes to spawn in Peaceful mode[4] and attack without any provocation. An SMP bug fixed in Beta 1.4 caused slimes that split to be visible only to the player that caused them to split and would not take any damage.[5] Because these slimes were client-side, the player could only remove them by exiting and logging back into the server.
  9425. Since 1.9 prerelease, slimes always split upon death even if they take overkill damage. Before Beta 1.9 Pre-release 5, Slimes only appeared
  9426. Bugs: Slimes are notorious for causing severe localized lag in multiplayer when they split into several smaller entities.
  9427. Slimes in SMP sometimes display as the wrong size, so it is often the case that you take damage from what looks like a harmless tiny slime.
  9428. Slimes in SMP often animate strangely, jittering up and down, and in some servers, disappear altogether sometimes(but can still be attacked and attack), though this is not always the case.
  9429. When you shoot an arrow at a huge slime, the arrow will appear like a large arrow.
  9430. Trivia: Third party software can be used to create arbitrarily large slimes.
  9431. Slimes may have been inspired by a number of classic gaming monsters. Their shape and size resemble that of Gelatinous Cubes from Dungeons & Dragons (though admittedly that probably comes more from Minecraft's cubic art design than as a direct homage), and their splitting behavior resembles that of Zols from The Legend of Zelda and Puddings from Nethack. The name and the large, cartoonish face may be a homage to Yuji Horii's iconic Slimes from the Dragon Quest series.
  9432. Slimes will only attack the player, even if a skeleton accidentally shoots it.
  9433. There's a line in the code that's meant to allow tiny slimes to spawn on Peaceful, but the natural spawning algorithm skips hostile spawning entirely on Peaceful. As a result, this line won't even be reached. However, there are illegitimate ways to spawn tiny slimes on Peaceful, e.g. with a Slime Monster Spawner.
  9434. Magma Cubes, added in Beta 1.9, could be seen as the Nether equivalent of Slimes.
  9435. The block a Slime is standing on will drip green liquid if looked at from below, similarly to lava and water.
  9436. Slimes hop faster when pursuing a player.
  9437. Despite Slimes being hostile mobs, many players have tiny Slimes as pets since they follow and can't directly damage players.
  9438. Before Beta 1.7, when peaceful was turned on, slimes would not despawn.
  9439. ]])
  9440. slime.close()
  9441. snow=fs.open("mem/redworks/minepedia/snow","w")
  9442. snow.write([[Snowfall is an element in the game. Much like rain, it is a type of weather. It currently exists in the full version of the game.
  9443. Behavior: Snowfall happens occasionally and will only fall in the Tundra biome and causes water that does not have a block above it to become ice, as well as gradually covering all blocks in snow with the exception of transparent blocks. Snowfall will happen at the same time as rain is falling. If you are between a biome that produces rain and another that produces snow, you can see both snow and rain.
  9444. Trivia: If it is snowing and you go to sleep it will most likely have stopped before you wake.
  9445. When it rains, it also snows in different biomes, despite the fact that the effects of each are not similar. (Snowfall generating snow/re-frosting ice, and rainfall causing thunderstorms from time to time.
  9446. History: Snowfall was reintroduced in Beta 1.5 after having been removed during Alpha with the Halloween Update.
  9447. ]])
  9448. snow.close()
  9449. snowGolem=fs.open("mem/redworks/minepedia/snowGolem","w")
  9450. snowGolem.write([[Snow Golems are the game's first "utility mobs," which Notch defines as any player-created mob.[1] They are by nature friendly to their creator. Snow Golems are created using Pumpkins and Snow Blocks, and will throw snowballs at enemy mobs. In cold biomes, they will not melt even when lava or fire is near them. As Snow Golems move, they leave a trail of snow on the ground, except in the Nether.[2][3] Snow Golems will not leave snow over blocks such as Redstone dust or torches, but they will wreck farmland by walking on it, and then leave snow over the resulting dirt. If a Snow Golem walks over a mushroom, the mushroom will be destroyed and dropped as an item. Once killed, the Snow Golem will drop approximately 10 snowballs.
  9451. To create a Snow Golem, the player must vertically stack two Snow Blocks on the ground and then place a Pumpkin on top of them. Snow Golems are not made on the Crafting Table. They are only created when the pumpkin is placed last. Pistons cannot create Snow Golems because they cannot push pumpkin blocks. Snow Golems can also be created using a Jack-O-Lantern, although there is no visual difference. Endermen are also capable of creating Snow Golems by placing the necessary blocks, although this is an extremely rare event because they do not do so purposefully.
  9452. Farming: Because Snow Golems leave a constant trail of snow as they move, it is possible to farm that snow. However, due to their behavior of attacking hostile mobs, it would be wise to ensure the Snow Golem is in an enclosed, safe place before beginning. The simplest method is to create a 1x1 hole that is 2 blocks deep, and to put both the player and the Snow Golem in. Then the player would look straight down and farm the snow that is produced. This creates an infinite amount of snow in the shortest time possible, because the instant the snow breaks, another one spawns in its place.
  9453. It is also possible to create a generator by placing 2 blocks of snow on a stone and then surrounding the top block with any resource. Once this is done, place a pumpkin on top and start digging at the corner of the block where the snow is being generated. Holding down the mouse is the fastest way to gather.
  9454. Snow is not created on Desert nor warm Plains Biomes
  9455. Defense: A horde of Snow Golems kept between two lines of fence provides a wall that keeps mobs at a distance. The Snow Golems can still be killed by Skeletons. A 1x1x2 area can be used to store a horde of Snow Golems. In an emergency, the Snow Golems can be released to push back approaching enemies.
  9456. Snow Golems may also be placed into Guard Towers, shielding them from damage. To create such a guard tower, make a small 3x3, 1-4 block high tower. Surround the top with fencing and create a Snow Golem in the center.
  9457. Snow Golems may also be suspended atop lava pits to lure mobs into them, passively protecting an area. This method can also prevent mobs from hiding around the player's home.
  9458. Luring: Snow Golems can also be used to lure hostile mobs into traps. This can create a better flow of mob drops for the player to collect, speeding up mob harvesting. To do this, fence Snow Golems in just beyond the entrance of a trap. Mobs will then wander in as they attempt to attack the Snow Golems.
  9459. A single Snow Golem kept between four fences under a 3x3 two block high ceiling can be used to distract attacking Endermen. Once the Enderman is within reach of the Snow Golem, the Snow Golem will pelt it with snowballs. The Endermen will stop attacking the player, but will be unable to reach the Snow Golem due to the ceiling. A moat filled with lava or water around the Snow Golem enclosure can be used to kill the Endermen instead of simply distracting them.
  9460. Behavior: Snow Golems throw snowballs at hostile mobs, provoking them. This gives them an almost suicidal nature, as the thrown snowballs do not do significant damage, except to Blazes. Snow Golems attract enemies, making them useful for luring enemies into traps. They are also capable of drawing enemies away from the player. In Beta 1.9 Pre-release, Snow Golems sometimes forget to attack monsters. Snow Golems have good pathing skills, and will not jump off cliffs or into lava. They will attempt to move towards hostile mobs, and, as of 1.0.0, will even open and go through doors to reach them.
  9461. History: Snow Golems (previously known as Snowmen) were first mentioned by Notch on September 21, 2011, and were slated to appear in Beta 1.9.
  9462. In The Story of Mojang, Notch briefly mentioned adding "snowmen that throw snowballs."
  9463. Notch originally planned to call this mob Snowmen. However, very soon after revealing the name, Reddit user Cuttleman stated he would call them Snow Golems, a name Notch approved of and made official.[
  9464. Bugs: Snow Golems do not leave snow trails in Mushroom Biomes.
  9465. In SMP, Snow Golems do not make sounds when throwing snowballs.
  9466. Snow Golems are not hostile towards Enderdragons.
  9467. Snow Golems do not produce snow underneath them when near Bedrock.
  9468. Snow Golems can and will jump over fences given the chance, thus spreading snow everywhere.
  9469. Trivia: Snow Golems do not de-spawn if the player leaves the area.
  9470. Snow Golems will not spawn snow on glass.
  9471. A few hundred Snow Golems can in fact kill mobs, but will understandably take quite a while and result in heavy losses.
  9472. Snow Golems are the second mob the player can cause to spawn, the first being Chickens spawning from eggs thrown by the player.
  9473. Four Snow Golems throw snowballs quickly enough to continuously push a Zombie back.
  9474. Snow Golems are not affected by fall damage.
  9475. Snow Golems wear their Pumpkin as a hat. Their actual Snowman-type head is hidden beneath it.
  9476. If a Snow Golem is lit on fire, it will speed up and move toward a water source.
  9477. Snow Golems do not attack aggressive wolves even if they attack the player.
  9478. Snow Golems will attack Zombie Pigmen regardless of whether or not they attacked the player, thus making the whole pack attack them.
  9479. Snow Golems sometimes survive creeper explosions.
  9480. The throwing sound is actually the Bow firing sound, even though Snowballs have their own throwing sound.
  9481. Snow Golems do not leave snow trails in the Nether, but do leave them in The End.
  9482. If a Snow Golem is trapped somewhere and there is an exit, the Snow Golem will try to escape.
  9483. Since the full release (1.0), Snow Golems no longer have the ability to breed. This is possibly due to the fact the Snow Golems attack each other when in love mode.
  9484. Snow Golems can only be crafted by placing a pumpkin on top of two snow blocks; placing the pumpkin then snow underneath will produce no snow golem.
  9485. If trapped underwater, Snow Golems can drown.
  9486. If the player occupies the same space as a Snow Golem, the Snow Golem's Pumpkin helmet will be seen through, revealing their face.
  9487. Snow Golems do not create ice when moving onto a water block.
  9488. Snow Golems distract hostile mobs completely, allowing the player to walk up and easily kill them.
  9489. The amount of Snowballs dropped when a Snow Golem dies, 10-15, is more than what was needed to create it, 8.
  9490. ]])
  9491. snowGolem.close()
  9492. spider=fs.open("mem/redworks/minepedia/spider","w")
  9493. spider.write([[The spider is a bug-like monster and also is a mob that is neutral in sufficient light levels and hostile towards the player at night and in dark, shadowy areas. They are able to see the player through solid blocks. A spider measures 2 x 2 x 1 blocks, with very dark brown skin and red eyes that glow eerily in the dark. Because of their dimensions, spiders cannot enter 1-block wide spaces that zombies, skeletons, and creepers can, but it can crawl into 1-block high gaps (as long as they are 2 or more blocks wide). Spiders' distinctive hissing noises can alert a player to their presence - creepers make a similar, much shorter noise when damaged. Spiders are easier to hit with arrows due to their size, but can quickly catch up to the player with their leaping (they can cover 2 - 3 blocks in a bound) and wall-climbing abilities. Spiders will often jump around when attacking, making them a moving target and harder to hit. When hunting, spiders move at a pace slightly slower than the player's walking speed. Unlike zombies and skeletons, spiders will not catch fire in daylight.
  9494. There is a 1% chance that a spider will spawn with a skeleton on its back, forming the dreaded Spider Jockey. The skeleton's ability to fire arrows combined with the speed, leaping, and wall-climbing of the spider makes this a very dangerous opponent.
  9495. In the 1.8 update, there is a new, superior, blue variety called Cave Spiders which spawn in Abandoned Mine Shafts and are able to poison their targets.
  9496. Uses: Spiders are the main sources of string, which is a critical ingredient of bows and fishing rods as well as for (white) wool (simply shearing a sheep is a lot more effective, as using string to make wool is a waste, although if you kill enough spiders and you cannot find sheep, string can be very effective for wool because it only takes 4). Each spider drops 0 - 2 pieces of string upon death. As of 1.9 pre-release 2, they also drop spider eyes used to make certain potions. However, they will only drop spider eyes when directly killed by the player.
  9497. Dungeons that contain a spider monster spawner can be fitted with cactus blocks so the player can harvest spider string. Because spiders are two blocks wide, they cannot pass through a one-block gap between two cactus blocks (or a cactus and a wall) and will press themselves to death against a cactus trying to chase the player. Dungeon doorways can also be modified to trap spiders inside, allowing the player to kill them and obtain spider eyes and experience orbs, as well as the string.
  9498. Behavior: Spiders are hostile so long as the light level immediately around them is 9 or less. If they are found in an area with a higher light level, they won't attack unless a player attacks first. Hostile spiders will continue to chase the player even if they are exposed to daytime or other well-lit locations. Conversely, a spider won't become hostile around a player when roaming in daylight, but if it wanders into a moderately shaded area (i.e. under a tree or rocky overhang) it will turn hostile and remain that way. If a spider sustains damage from a source other than the player, such as falling, its hostility will be reset, so that if it is in a well-lit area, it will not be hostile towards the player.
  9499. Spiders can draw line of sight through solid objects, so they will pursue the player even when completely cut off from them, so long as they are within the standard aggressive mob's 16 block search radius. The spider will then approach as close as possible and ambush the player even if it subsequently becomes light. Spiders on the surface can also track a player in a cave or tunnel if there is a clear path above the player they can follow and vice versa.
  9500. Spiders can climb up over walls and other obstacles as if all blocks had ladders on them. However spiders are careless climbers and will often fall off other blocks, (taking fall damage,) while in pursuit of the player. Spiders cannot climb soul sand covered with vines.
  9501. Combat: Since they can pounce and move almost as fast as the player can when hunting at night or aggravated, spiders should never be underestimated. As the only naturally occurring source of string apart from dungeon chests and cobwebs in abandoned mine shafts, preparation and effort can pay off when hunting them. Wearing armor and carrying a stone or iron sword or bow is recommended. A bow is the preferred weapon, as arrows can damage a spider at a safe distance and spiders present a large and visible target due to their size and glowing eyes. When attacking a group of spiders, pick off the ones that aren't too close to others in order to avoid aggravating several at once.
  9502. Alternatively, the player can dig a narrow trench with a depth of 2 blocks in order to be able to attack spiders safely from underneath, trapping them above the gap. This strategy has mixed results, as some players have reported spiders waiting for them to exit the trench before pouncing, a behavior possibly caused by the AI that makes the spider lose track of the player after a number of unsuccessful attacks and therefore become neutral until the player is visible. Players should also keep in mind that trench warfare leaves them vulnerable to other mobs (skeletons, zombies, and especially creepers) in the vicinity.
  9503. When attacking or being attacked by spiders, prepared or unprepared, your first priority should be to have the high ground or if that is not possible, to at least ensure the spider does not have the high ground. When on higher ground the player can spam attack the spider preventing it from jumping and avoiding the attack while also ensuring the spider does not have a clear jump on the player, if the spider has the high ground on a player it is advisable that the player retreat to flat ground before engaging with the spider because if the spider has the high ground it will be able to jump on the players head with the extra height, causing an almost unavoidable attack and thus causing unnecessary damage.
  9504. Defensive Measures:Like other hostile mobs, spiders are vulnerable to fire, fall damage, lava, and are injured by contact with cacti blocks. They can be set on fire with a flint and steel in the day time, taking damage but remaining neutral towards the player. Surface spider populations can be controlled if the player sleeps regularly in a bed at dusk, since spiders will spawn during the night if given the chance to do so. When travelling at night, the player is advised to watch for active spiders' glowing red eyes in the darkness.
  9505. Construction Safeguards: Spiders can climb any vertical solid surface. One way to deal with this is to make sure the roof is accessible through only a 1x1 hole (or a 1x2 high doorway with or without a door, although other hostile mobs will be able to fit through this gap) that spiders cannot crawl into. Alternatively, a lip or overhang on a wall will stop them from breaching it. The player can alternate an overhang every other block to conserve materials, as spiders are 2 blocks wide and cannot climb walls sideways. A third deterrent to spiders is to place ladders on a wall 4 blocks above the ground level, as the edges of the ladders will block the spiders' climbing. For more tips on spider-proofing, please consult this guide.
  9506. History: The spider was the second mob added to Minecraft in Survival Test. Spiders were originally brown in early development. They did not jump as far (compared to their range in the Beta update) and killing them gave the player 105 points. In Indev, spiders began to drop 0 - 2 pieces of string upon death.
  9507. In the Beta 1.2 update, Spiders were given the ability to climb vertical walls made of any block and could "see" the player through solid blocks to track them down (creepers used to have this ability before it was transferred to the spiders). As of Beta 1.4, spiders will not trample crops,[1] nor will they make step sounds (if they do, they will be much quieter).[2]
  9508. As of Beta 1.5, a cobweb block has been added to the game files. Cobwebs did not naturally occur at the time, but they were fully functional if hacked into the game. As of Beta 1.8, cobwebs are generated in Abandoned Mine Shafts.
  9509. Trivia: If a player throws an egg at a docile spider and hits, the spider will stay neutral.
  9510. Sometimes spiders can be found inside blocks. Once the block is removed or destroyed the spider will attack regardless of whether or not it was hit in the process.
  9511. Causing a spider to take fall damage or damage from a cactus after attacking it during the day causes it to become neutral again.
  9512. Sometimes after attacking a spider in sunlight, the spider will cease attacking the player; this is presumably the high light levels turning the spider neutral.
  9513. Spiders slow down when climbing vertical surfaces, making it easier for a player to outrun them around steep mountains and cliffs.
  9514. Because the code controlling the spider's facing and jumping are not linked, it is possible for a spider to jump sideways or backwards if it was previously attacking the player, halted because it could not find a way to them, started looking in other directions, and then became capable of attacking the player again.
  9515. Spiders will not drop onto fences. If a spider climbs over the fence and on top of a house is surrounded by fences, the spider will be trapped on the roof.
  9516. Spiders require an area at least 3 blocks wide by 3 blocks long and two blocks tall for spawning. The top block in this arrangement however can be filled with a transparent block such as glass.
  9517. They appear to be based on real life jumping spiders due to their eye pattern, the fact that they pounce to attack, and that they become neutral in daylight, since they're nocturnal (a mistake being that most jumping spiders hunt in the day).
  9518. Spiders can travel through a space that is 1�BD blocks wide. This can happen when glass panes are part of a wall composed mostly of solid blocks. If a glass pane on the end of a line of panes is removed, spiders can crawl through the gap that is created.
  9519. When you set fire to a spider, it will be surrounded by a giant fireball
  9520. Due to Spiders having a separate 'spider_eyes' file (this includes Endermen) they can be seen bright red as if constantly being hurt as if you were inside lava.
  9521. Spiders have a lower chance than other mobs to make a footstep noise when they walk on a block. However, since they are wider, they touch more blocks at once, which causes about the same amount of footstep sounds as any other mob.
  9522. Spiders are unaffected by Splash Potions of Poison.
  9523. When below level 28 (the level that will cause fog to appear underground) spiders that are approximately 30 blocks away will appear pure white.
  9524.  
  9525. ]])
  9526. spider.close()
  9527. spiderjockey=fs.open("mem/redworks/minepedia/spiderjockey","w")
  9528. spiderjockey.write([[A Spider Jockey is the rare appearance of a Spider being ridden by a Skeleton. A Spider Jockey possesses the ranged arrow attack of a Skeleton plus the vision, agility, and wall-climbing ability of a Spider, with the sum of their aggression and respective health capacities. The Skeleton and Spider are treated as separate entities in the game (i.e. if the Spider is killed, the Skeleton will continue to attack and move, and vice-versa). A Spider has a 1% chance to spawn with a Skeleton rider, but the rare Spider Jockey is one of the most dangerous enemies the player can encounter.
  9529. A Spider Jockey can spawn above and below ground. However, generally underground Skeleton riders die of suffocation, due to spiders scaling walls, causing the skeleton to suffocate.
  9530. Uses: The death of a Spider Jockey offers a potential four-in-one item drop special. Each Jockey, when completely killed, will yield 0 - 1 Spider eyes plus 0 - 2 string from the Spider, and 0 - 2 bones plus 0 - 2 arrows from the Skeleton.
  9531. Combat: Without some kind of armor, a bow and arrows, and plenty of space, the player is advised to make a tactical retreat when faced with a Spider Jockey as it can kill in seconds. Despite the Spider's decreased leaping ability, this monster otherwise retains the Spider's agility and sight, the Skeleton's ranged attack, and the health of both, making it an unwise candidate for resource harvesting. Arrows can be crafted, and bones and string can be obtained in a less hazardous way by hunting individual Spiders and Skeletons. Spider Jockeys are usually considered the hardest mob to kill, above even the monstrous Ghasts. The only monster that is obviously harder to kill than the Spider Jockey is the Enderdragon.
  9532. Spider Jockeys are hardly a threat in SMP because of their bugginess. The Skeleton rarely appears to be riding on the Spider but rather next to it, so it usually shoots the Spider. They are so glitchy that they sometimes disappear or suffocate.
  9533. Bolder players are advised to take out the Skeleton first at a distance, taking care not to land any arrows on the Spider before the Skeleton dies. Even when armed with a Diamond Sword, the player is heavily disadvantaged when fighting a Spider Jockey. Another way to kill it is to get the Spider Jockey on a block above you, but in a way so that it doesn't fall, leading to the Skeleton shooting the Spider; the lone Skeleton can then be dispatched easily.
  9534. An advisory on using Wolves: An advisory on using Wolves Spider Jockey battles involving Wolves are slow and messy at best, and fatal to everyone but the Spider Jockey at worst. Wolves are not recommended as a method of defense against one since they will not attack the Jockey as a whole - they will aim for either the Spider or the Skeleton, depending on which the player hit or was attacked by. Conversely, when a Wolf attacks a Spider Jockey only the individual it managed to injure will try to go after it. Once hit, a Wolf will focus its hostility on the mob that last attacked it. Since a Skeleton's ranged attack makes it more likely to hit the player or a Wolf, it will often be the first targeted. The Wolves will then have a harder time attacking the Skeleton because of its lofty arachnid perch, causing them to crowd around the Spider in a futile effort to get at the Skeleton while the Spider continues to injure the player.
  9535. Defensive Measures: A Spider Jockey is vulnerable to falling, fire, lava, and contact with cacti. The player can decrease the chance of running into a Spider Jockey on the surface by regularly sleeping in a well-lit, sheltered bed at dusk since Spider Jockeys, like regular Spiders, can only spawn during the night.
  9536. If cornered or trapped in a cave with a Spider Jockey, the player can use a shovel or pick to quickly dig a 1-block shaft 3 blocks deep and seal off the top with another block before tunnelling away to a safe location.
  9537. Construction Safeguards: Because a Spider Jockey can only spawn where an ordinary Spider can, a Spider-proofed area is also Spider Jockey-proof. Consult the Spider article for more in-depth explanation. The usual guidelines of good lighting and installing doors from the outside apply.
  9538. If an overhang is built into a wall, not only will the Spider Jockey be unable to climb over it, but the Skeleton will be suffocated in the process of being pressed into the overhang.
  9539. History: Spider Jockeys were introduced in the Seecret Friday update 8. In Alpha, a Spider Jockey would drop 0 - 2 pieces of string from the Spider and 0 - 2 arrows from the Skeleton. This remained unchanged in Beta, but the Skeleton could now drop 0 - 2 bones in addition to the arrows. When Spiders were given the ability to climb and "see" the player through walls in Beta 1.2 Spider Jockeys became a much more formidable enemy.
  9540. Spider Jockeys can be "neutral-aggressive" with the addition of rain in Beta 1.5. The light level is low enough in a rainstorm for the Skeleton to not combust, but high enough for the Spider to not be actively hunting. In this state, the Skeleton will shoot the player with arrows but the Spider will not give chase (unless the Spider Jockey wanders into a shady area) because movement is controlled by the Spider. The player can safely observe this kind of Spider Jockey from a distance of 8 or more blocks away.
  9541. Trivia: A Skeleton does not have a 1% chance of spawning riding a Spider - a dungeon with a Spider spawner can create a Spider Jockey, but a Skeleton dungeon cannot.
  9542. A Spider Jockey can kill itself - sometimes the Skeleton arrows will injure the Spider and other times the Spider's pouncing will run the Skeleton into its own arrow.
  9543. If the player exits a game and then returns while a Spider Jockey is spawned, the Skeleton will stop riding the Spider.
  9544. A Spider Jockey can attack two different players in SMP - this is caused by one player damaging one half of the Spider Jockey and not the other. This usually happens when a player chased by a Spider Jockey enters a structure that the Spider can not crawl through. Because the Spider can see through the walls, it will continue to target this player. Because the Skeleton can't see through the walls it will look for a new target (such as another player walking by) and then fire arrows at them.
  9545. The world can create up to 3 Spider Jockeys at a time, but the spawn percentage is still 1%.
  9546. In earlier updates the Spider Jockey would move in glitched movement, often the Skeleton would "bob" in and out of the Spider. This bug still happens in SMP, especially with large amounts of lag.
  9547. When a Spider Jockey rides a minecart, the Spider will suffocate and the Skeleton will remain.
  9548. Spider Jockeys can't be spawned in the game with the use of mods, because they are, strictly speaking, two mobs.
  9549. ]])
  9550. spiderjockey.close()
  9551. squid=fs.open("mem/redworks/minepedia/squid","w")
  9552. squid.write([[Squid are 8-armed mobs that spawn in water. Squid are always passive towards the player, akin to the other passive mobs found on land. They can be found in water of any depth, in any biome, and spawn on any difficulty.
  9553. Uses: When killed, each squid will drop 0 - 3 Ink Sacs that can be used to dye wool. The ink sac, like a unit of dye, can be applied directly to sheep before shearing to make black wool or mixed with varying proportions of Bone Meal beforehand to yield light gray and gray dyes (that can also be used on sheep before shearing).
  9554. Beahvior: When moving about, the squid's tentacles open and close, giving them an appearance of pushing themselves forward. Squid will hover in place and wander around one layer aimlessly and do not deliberately interact with the player, even if attacked.
  9555. Squid seem to be confused with light under water, they are attracted to lights like glowstone.
  9556. Squid stay alive but become immobile when beached on the land. They can take fall damage and burn like any land mob, but (due to being aquatic) they cannot drown.
  9557. History: Squid were introduced in the Beta 1.2 update.
  9558. As of Beta 1.3, squid were given the ability to move in three dimensions (rather than only along the bottom of the body of water).
  9559. As of Beta 1.5, squid are incapable of swimming upward. When they do manage to swim upward, they drift down with a zero net gain in altitude, resulting in a jittery animation. This seems to have been fixed as of Beta 1.7.
  9560. As of Beta 1.8 Pre-release 1, squid are the only mob that doesn't drop an Experience Orb when killed by the player. This has been since fixed in 1.8 Pre-Release 2.
  9561. Bugs: Despite not having feet, Squid make footstep sounds when swimming across blocks.
  9562. When logging into a multiplayer server, Squid may appear above the clouds. However, they will later disappear.
  9563. During multiplayer lag, mobs' positions are not updated by the server, causing especially irregular movement in Squid, such as flying and passing through blocks.
  9564. In RC 2, if the player stands far away, Squid will shift so that their heads point straight up and float in place until the player gets closer again.
  9565. When killed, Squid drop Ink Sacs, but take a second to disappear.
  9566. During multiplayer lag Squid are temporarily invulnerable to T.N.T.
  9567. During multiplayer lag, Squid will also fly up in the air if you hit them with any specified item
  9568. Squid, when killed, may not drop experience orbs.
  9569. If you look at a Squid's tentacles without the head on-screen too his tentacles do not appear.
  9570. Trivia: Squid are the first passive water mob to appear in Minecraft.
  9571. Hitting a squid underwater causes them to rise approximately 1/3 to 1/2 a block.
  9572. Squid cannot be damaged by attacking their tentacles (unlike Ghasts).
  9573. Before 1.4, using a bucket on a squid while the squid was not touching another block would yield milk.
  9574. Before 1.9, Squid cannot spawn in the Nether without the aid of inventory hacks, as there is no water in the Nether. As of 1.9 pre-release 4 they can spawn in water created by Ice in the Nether, and will spawn very frequently due to there being nowhere else to spawn.
  9575. Real squid have eight arms and two tentacles, while Minecraft squid just have eight arms, making them more akin to octopi. This may be a mis-translation due to the fact that squid and octopus have the same name in Swedish (Bl�A4ckfisk).
  9576. Squid behave like some land mobs and attempt to ride a Minecart. However this is not always useful as rails and water cannot occupy the same block.
  9577. Squid are the first passive mob that spawn at any light level, in water, and without grass.
  9578. When the world is loaded, all squid are aligned with the tentacles facing east.
  9579. It is possible to punch a squid onto land.
  9580. It is possible for squid to spawn in underground lakes or waterfalls due to their ability to spawn in any water, source block or not.
  9581. It is possible for a squid to trample a farmland block.
  9582. In RC2, When Squid come out of water and are hurt, they make the new player hurt sounds.
  9583. Squid spawners will only spawn them on the 60 depth, as the large water bodies (such as oceans, rivers and ground lakes) appear only on that depth. This means squids can no longer spawn in mountain springs or underground lakes.
  9584. ]])
  9585. squid.close()
  9586. star=fs.open("mem/redworks/minepedia/star","w")
  9587. star.write([[Stars: Together with the moon, the night sky also consists of stars. The stars look like little white squares and are an overlay over the Void that rotates as the night progresses.
  9588. ]])
  9589. star.close()
  9590. stars=fs.open("mem/redworks/minepedia/stars","w")
  9591. stars.write([[Stars: Together with the moon, the night sky also consists of stars. The stars look like little white squares and are an overlay over the Void that rotates as the night progresses.
  9592. ]])
  9593. stars.close()
  9594. storm=fs.open("mem/redworks/minepedia/storm","w")
  9595. storm.write([[A thunderstorm is a weather condition which takes place randomly during rain, snowfall, or dry desert storms. All changes from these weathers apply, though since lightning occurs and the light level falls to 7, thunderstorms are distinct. Even in the middle of the daytime, hostile mobs will be able to spawn. However, far fewer mobs will spawn relative to night as it is barely dark enough for them to spawn.
  9596. Lightning is a lethal element to the storm. It strikes randomly across the map, creating brief fires. While most are put out almost immediately by the rain, it is possible for it to ignite wood and other flammable blocks. Lightning striking uses the same sound as TNT or a Creeper exploding, or at least until the 1.8.1 update which changed the sound of a TNT explosion, as well as a few other sounds.
  9597. Effects: Thunderstorms are much darker than normal rain, at light level 7 during daytime. This is dark enough to spawn hostile mobs.[1] However, thunderstorms won't reduce the light levels to 0 during night.
  9598. Lightning creates fire where it strikes. The accompanying rain can usually put out fires before they spread. Overhangs can prevent rain from putting out lightning fires, allowing the fire to spread. If the player is playing on Peaceful or easy, no fire will be created by lightning strikes.
  9599. If lightning strikes a pig, it morphs into a zombie pigman.[2]
  9600. If lightning strikes a creeper, it becomes supercharged and has a much more powerful explosion.[3]
  9601. Being struck by lightning or standing near a lightning strike deals two and a half hearts of damage, not including damage from the fire.
  9602. If lightning manages to strike a portal frame, it will activate the portal. Conversely, if it strikes an active portal, the portal will be deactivated.
  9603. The player can sleep in a bed during a thunderstorm, regardless of the time of day.
  9604. If lightning strikes a boat, the boat will disappear without dropping anything, as opposed to two sticks and three planks.
  9605. If lightning strikes a dropped item, the item will disappear, the same goes to experience orbs
  9606. Lightning that strikes floating sand or gravel will cause it to fall.
  9607. Trivia: Lightning, unlike other weather, does not have an image file associated with it. Thus, it is coded directly into the game engine.
  9608. Lightning does not cause damage to Zombie Pigmen or Ghasts, as those mobs don't spawn in the Overworld, and there aren't any thunderstorms in The Nether.
  9609. Lightning can go directly through blocks to hit the ground.
  9610. It doesn't matter how far you are away from the lightning, you will hear it the same time as you see it.
  9611. You can hear thunder all the way down to the bedrock layer.
  9612. The new lighting system in Beta 1.8 introduced dynamic lighting effects. Each lightning strike will now briefly light up all the topmost blocks, creating a more noticeable flash.
  9613. Lightning cannot be viewed through water.
  9614. When a Creeper is hit a second time by lightning after it became supercharged, it will cause the Charged Creeper to die.
  9615. Forest fires made by lightning are rare unless the lightning strikes underneath a tree.
  9616. Bugs: In SMP, Thunderstorms and Rain storms are at the same light level.[4]
  9617. If you summon lightning in The End, it crashes the game.
  9618. ]])
  9619. storm.close()
  9620. sun=fs.open("mem/redworks/minepedia/sun","w")
  9621. sun.write([[The Sun is a sprite appearing in every version of Minecraft except Classic that lights up all top-most blocks while it is in the sky. When the player creates a new map the sun starts on the eastern horizon at dawn. As time passes, it will slowly moves westward across the sky and over the horizon while the moon rises on the opposing horizon. Daytime lasts 10 minutes and grass blocks will spread most quickly when exposed to sunlight. The deeper underground the player is, the less sunlight will illuminate the ground, and ultimately there will be no sunlight at all. A gap or a vertical shaft in the ceiling of a cavern will allow sunlight to filter in.
  9622. In the 1.9 pre-release 4, both the sun and the moon have been changed from being square to having a more rounded look to them. However, since 1.9 pre-release 6 they are square-shaped again, although it is unknown whether they will be back to being exactly like they were or will somehow be modified. Notch said in a Twitter post that it was for 'consistency' purposes.
  9623. Sunlight: Sunlight, in game, is the name given to the light which illuminates all blocks which do not have a shadow cast over them by a non-transparent block positioned vertically above them in the sky, or if it's raining. Clouds do not cast shadows, and shadows are not affected by the position of the sun in the sky. As of Beta 1.5, however, clouds in weather like rain or snow will be darker, and the light coming from the sunlight will not be as bright. During these storms the ambient light value during the day will be reduced to 12 from the usual 15, and in thunderstorms the light level will be reduced to 7, allowing aggressive mobs to spawn.
  9624. Sunlight (or torchlight) can be used to turn dirt blocks into grass blocks, as long as there is an illuminated grass block adjacent to the dirt.
  9625. Mobs: Hostile mobs will not spawn in sunlight, although existing mobs are affected in different ways by it. Sunlight is harmful to skeletons and zombies will be set on fire upon entering an area illuminated by sunlight. Endermen will teleport away at dawn. Note that it is possible for skeletons and zombies to survive in direct sunlight if they are in a body of water or standing in rain. Spiders turn neutral during the day, until damaged by a player. Existing slimes and creepers are unaffected by sunlight.
  9626. Trivia: When the sun rises and sets the blocks change their light level depending on what angle the sun is at (giving the effect of gradually getting lighter at dawn and gradually getting darker at dusk).
  9627. You can't see the Sun or Moon with a render distance set to Short or Tiny.
  9628. The sun is also larger during sunrise and sunset.
  9629. The position of the sun in the sky does not affect lighting and shadows, so a device such as a sundial would be impossible.
  9630. According to Notch, the Minecraft sun actually used to rise in the north, not in the east.[1] This was a bug, but was left in the game.[2] This was changed in Minecraft Beta 1.9 prerelease 4, so the sun and moon now both rise in the east.[3]
  9631. As of Minecraft Beta 1.9 prerelease 4, the sun and moon are round.[4]
  9632. As of Minecraft Beta 1.9 prerelease 6, the sun and moon are square again.
  9633. You can't see the sun on Pocket Edition.
  9634. In Creative Mode, it is possible to reach very high y-values using the flying feature. At a y-value of about 576, the moon will appear opposite the sun, or, at night, the sun becomes visible opposite the moon.
  9635. ]])
  9636. sun.close()
  9637. testificate=fs.open("mem/redworks/minepedia/testificate","w")
  9638. testificate.write([[A Villager, also known by many players as a Testificate, or Squidward, is a passive NPC (non-player character) that spawns and moves about in NPC Villages. Their characteristic look is dominated by their large, bald heads, green eyes, unibrows, and long, protruding noses. There are different types, distinguished by their attire and signifying their role in the community. Some spawn around the village, although most spawn inside buildings and leave once the door is opened. They spawn at their respective buildings corresponding to the role they have. As of 1.9 Pre-Release 3, there are 6 unique skins for the villagers which are found in the minecraft.jar file. Another, unused villager skin is a file called "villager.png" that appears to be the skin of "Steve" with some modifications.
  9639. Behavior: NPCs act more like passive mobs. They will randomly look at the player, and wander the area of the village. They do not attack if attacked, however they will be knocked back. When attacked, they will not run away like other passive mobs, and Hostile mobs do not see them. If the player does happen to kill one, they drop nothing. Villagers also act like squid not being attracted to wheat. They will leave buildings if the door is open and randomly wander outside. They currently have the same AI programming as a Pig. It is less likely for a villager to spawn in a village that has been altered by a player.
  9640. Professions: Each Villager's profession can be identified by its clothing: (Note that all Villagers have brown clothing under their robes/aprons)
  9641. Profession  Robe Color  
  9642. Butcher  White Apron  
  9643. Farmer  Brown Robe  
  9644. Librarian  White Robe  
  9645. Priest  Purple Robe  
  9646. Blacksmith  Black Apron  
  9647. Villager  Green Robe  
  9648. History: Villagers were first introduced in Beta 1.9 Pre-release 1. They had "TESTIFICATE" over their heads the same way player names are applied in Multiplayer, which was removed in Beta 1.9 Pre-release 2.
  9649. Future: It has been confirmed that there will be more villager AI applied in a future update.
  9650. Trivia: Originally, Notch had mentioned possibly using Pigman as a villager skin, although it seems unlikely now.
  9651. Since the Villager's introduction, there has been a texture in the game files indicating a standard Villager type due to their filename. However, this role seems to be filled by the Farmer type instead, with no Villager of this type ever spawning.
  9652. A texture in the main mob directory of Minecraft appears to be the default character texture ("Steve") reoriented to be a Villager texture. As is expected, applying it to the current Villager model produces a very broken look, as seen above.
  9653. Villagers do not despawn.
  9654. Villager's arms are implied to be jointed, with two parts each to create folded arms. Another likely implication is that the arms are tucked inside the sleeves of the robes (or shirts for blacksmiths and butchers) so that the sleeves touch.
  9655. It has been proven that Villagers can climb ladders if they are in their path, like other mobs[2]
  9656. Due to their peculiar look villagers have been ridiculed by the fanbase, sometimes comparing them to Squidward from SpongeBob SquarePants or Bert from Sesame Street. Notch himself agreed they look like "caveman Squidwards".[3]
  9657. Jeb has confirmed that more Villager AI will be added in an update some time in January 2012.
  9658. ]])
  9659. testificate.close()
  9660. thunderstorm=fs.open("mem/redworks/minepedia/thunderstorm","w")
  9661. thunderstorm.write([[A thunderstorm is a weather condition which takes place randomly during rain, snowfall, or dry desert storms. All changes from these weathers apply, though since lightning occurs and the light level falls to 7, thunderstorms are distinct. Even in the middle of the daytime, hostile mobs will be able to spawn. However, far fewer mobs will spawn relative to night as it is barely dark enough for them to spawn.
  9662. Lightning is a lethal element to the storm. It strikes randomly across the map, creating brief fires. While most are put out almost immediately by the rain, it is possible for it to ignite wood and other flammable blocks. Lightning striking uses the same sound as TNT or a Creeper exploding, or at least until the 1.8.1 update which changed the sound of a TNT explosion, as well as a few other sounds.
  9663. Effects: Thunderstorms are much darker than normal rain, at light level 7 during daytime. This is dark enough to spawn hostile mobs.[1] However, thunderstorms won't reduce the light levels to 0 during night.
  9664. Lightning creates fire where it strikes. The accompanying rain can usually put out fires before they spread. Overhangs can prevent rain from putting out lightning fires, allowing the fire to spread. If the player is playing on Peaceful or easy, no fire will be created by lightning strikes.
  9665. If lightning strikes a pig, it morphs into a zombie pigman.[2]
  9666. If lightning strikes a creeper, it becomes supercharged and has a much more powerful explosion.[3]
  9667. Being struck by lightning or standing near a lightning strike deals two and a half hearts of damage, not including damage from the fire.
  9668. If lightning manages to strike a portal frame, it will activate the portal. Conversely, if it strikes an active portal, the portal will be deactivated.
  9669. The player can sleep in a bed during a thunderstorm, regardless of the time of day.
  9670. If lightning strikes a boat, the boat will disappear without dropping anything, as opposed to two sticks and three planks.
  9671. If lightning strikes a dropped item, the item will disappear, the same goes to experience orbs
  9672. Lightning that strikes floating sand or gravel will cause it to fall.
  9673. Trivia: Lightning, unlike other weather, does not have an image file associated with it. Thus, it is coded directly into the game engine.
  9674. Lightning does not cause damage to Zombie Pigmen or Ghasts, as those mobs don't spawn in the Overworld, and there aren't any thunderstorms in The Nether.
  9675. Lightning can go directly through blocks to hit the ground.
  9676. It doesn't matter how far you are away from the lightning, you will hear it the same time as you see it.
  9677. You can hear thunder all the way down to the bedrock layer.
  9678. The new lighting system in Beta 1.8 introduced dynamic lighting effects. Each lightning strike will now briefly light up all the topmost blocks, creating a more noticeable flash.
  9679. Lightning cannot be viewed through water.
  9680. When a Creeper is hit a second time by lightning after it became supercharged, it will cause the Charged Creeper to die.
  9681. Forest fires made by lightning are rare unless the lightning strikes underneath a tree.
  9682. Bugs: In SMP, Thunderstorms and Rain storms are at the same light level.[4]
  9683. If you summon lightning in The End, it crashes the game.
  9684. ]])
  9685. thunderstorm.close()
  9686. villager=fs.open("mem/redworks/minepedia/villager","w")
  9687. villager.write([[A Villager, also known by many players as a Testificate, or Squidward, is a passive NPC (non-player character) that spawns and moves about in NPC Villages. Their characteristic look is dominated by their large, bald heads, green eyes, unibrows, and long, protruding noses. There are different types, distinguished by their attire and signifying their role in the community. Some spawn around the village, although most spawn inside buildings and leave once the door is opened. They spawn at their respective buildings corresponding to the role they have. As of 1.9 Pre-Release 3, there are 6 unique skins for the villagers which are found in the minecraft.jar file. Another, unused villager skin is a file called "villager.png" that appears to be the skin of "Steve" with some modifications.
  9688. Behavior: NPCs act more like passive mobs. They will randomly look at the player, and wander the area of the village. They do not attack if attacked, however they will be knocked back. When attacked, they will not run away like other passive mobs, and Hostile mobs do not see them. If the player does happen to kill one, they drop nothing. Villagers also act like squid not being attracted to wheat. They will leave buildings if the door is open and randomly wander outside. They currently have the same AI programming as a Pig. It is less likely for a villager to spawn in a village that has been altered by a player.
  9689. Professions: Each Villager's profession can be identified by its clothing: (Note that all Villagers have brown clothing under their robes/aprons)
  9690. Profession  Robe Color  
  9691. Butcher  White Apron  
  9692. Farmer  Brown Robe  
  9693. Librarian  White Robe  
  9694. Priest  Purple Robe  
  9695. Blacksmith  Black Apron  
  9696. Villager  Green Robe  
  9697. History: Villagers were first introduced in Beta 1.9 Pre-release 1. They had "TESTIFICATE" over their heads the same way player names are applied in Multiplayer, which was removed in Beta 1.9 Pre-release 2.
  9698. Future: It has been confirmed that there will be more villager AI applied in a future update.
  9699. Trivia: Originally, Notch had mentioned possibly using Pigman as a villager skin, although it seems unlikely now.
  9700. Since the Villager's introduction, there has been a texture in the game files indicating a standard Villager type due to their filename. However, this role seems to be filled by the Farmer type instead, with no Villager of this type ever spawning.
  9701. A texture in the main mob directory of Minecraft appears to be the default character texture ("Steve") reoriented to be a Villager texture. As is expected, applying it to the current Villager model produces a very broken look, as seen above.
  9702. Villagers do not despawn.
  9703. Villager's arms are implied to be jointed, with two parts each to create folded arms. Another likely implication is that the arms are tucked inside the sleeves of the robes (or shirts for blacksmiths and butchers) so that the sleeves touch.
  9704. It has been proven that Villagers can climb ladders if they are in their path, like other mobs[2]
  9705. Due to their peculiar look villagers have been ridiculed by the fanbase, sometimes comparing them to Squidward from SpongeBob SquarePants or Bert from Sesame Street. Notch himself agreed they look like "caveman Squidwards".[3]
  9706. Jeb has confirmed that more Villager AI will be added in an update some time in January 2012.
  9707. ]])
  9708. villager.close()
  9709. void=fs.open("mem/redworks/minepedia/void","w")
  9710. void.write([[The Void is the term given to the empty space beyond the generated boundaries of each map. It can be seen through gaps in the lowest layer of Bedrock on maps generated prior to the Halloween Update. As per a recent update, when lava generates on layer 2, the bedrock on layer 1 below it is replaced by smooth stone, meaning it is possible to enter the void again through much larger entrances than before without hacking.It can be entered if one uses a map editor or creative mode to make a hole in the top bedrock layer of the Nether. Or, like in the overworld, you can dig straight down to enter the black void.
  9711. It is potentially endless, however, falling into the Void causes the player's health to be depleted by about 4 hearts per second, leading to the player's death in 2.5 seconds or less, should he or she drop.
  9712. Entities (mobs and items, excluding the player) entering the Void will be deleted in the following tick (as soon as possible). This may be due to the Void not being part of a Chunk, although it is most likely a deliberate optimization/crash prevention method implemented by Notch. This is no longer the case as of 11w49a. Mobs will fall through the Void until it reached Y=-64 at which point they receive the same damage as the player (4 hearts per second). Items will fall until they reach Y=-64 where they disappear.
  9713. Blocks cannot be built on the underside of the Bedrock layer, and although Water and Lava appear to flow into it, they will not actually spread and form beneath the lowest layer. This prevents players from descending into the Void safely via swimming.
  9714. There is currently a bug in SMP that will remove chunks client-side, so while the data is still there, the client cannot see it and will glitch if they step on it. This can be fixed by reconnecting or placing a torch next to the missing chunk. If you ride a Minecart into this missing chunk, and then you step out of the Minecart, you will fall to the void and die, regardless if you disconnect and reconnect.
  9715. Light cannot travel out or through into The Void.
  9716. Destination: In a map generated prior to the Halloween update, it is possible to find holes in the bedrock that lead into the void.
  9717. Create a Creative world and dig straight down, since in Creative you can destroy bedrock.
  9718. In the End, it is possible to merely jump off the islands. This will immediately drop you into the Void.
  9719. Notes: Any entity above layer 127 or below layer 0 will be black. This includes dropped/held items, boats/minecarts and players/mobs.
  9720. If water touches the boundary of the Void, the particle effect of the Void will be transmitted through all of the water it is touching.
  9721. If someone joins a server with high latency, it can look like they spawned inside "The Void", as the chunks have not spawned yet.
  9722. Since 1.8, when joining a server with high latency, since the chunks haven't spawned, "The Void" can glitch between the old blue-sky void and the new black void.
  9723. History: Prior to Beta 1.6, things that fall into the void became black because there is no lighting in there.
  9724. Before Creative mode The Void was much more difficult to access, since Bedrock is impossible to destroy in Survival mode.
  9725. Prior to 1.8, the void was the same color as the sky.
  9726. Prior to 11w48wa the void fog was in all of the modes.
  9727. Trivia: If you open a hole to the void and block off all light sources, you can see that the void does in fact give off light. (Rather, it is the blocks themselves having a light level higher than 0, not the light "shining out of the hole" as it appears to be). However, the bottom of the bedrock on the last layer is completely dark.
  9728. When you fall through the void, you don't get hurt until you reach the Y-coordinate of -64, and then you get hurt for two hearts per halfsecond.
  9729. When you fall into the void on a server with anti flying measures, you are kicked regardless of having a flying mod/hack.
  9730. As of 1.8, entities are now lit in the void.
  9731. The Void can be seen under The Nether, above The Nether and under the overworld. There is also a discussion about if the sky above the clouds can be also counted as The Void.
  9732. TNT can fall into the void, however it doesn't explode.
  9733. Riding a vehicle into the void will result in the player being stuck in the vehicle until he/she dies.
  9734. As of 1.8 the void is now always pitch black and a particle effect occurs below bedrock.
  9735. If flying is enabled in Creative mode (patch 1.8), you can travel around in the top layers of the void without taking damage.
  9736. Falling into the void is the only possible way to die in Creative Mode.
  9737. A view of the render distance near bedrock.When the player is at a Y coordinate above 64, the void appears blue, and the black fog is not rendered. When the player is at a Y coordinate below 64, the void will change color to black and the fog will get closer to the player.
  9738. If one was to pass the 32 million block limit the player would no longer clip (the blocks become non-solid) and fall through to the void resulting in the players eventual death.
  9739. Shot arrows can stick to the bottom of the lowest level of bedrock (they are stuck on a block in the Void).
  9740. Arrows on fire (that have gone through lava) will disappear once it enters the Void while normal arrows fired by the player do not immediately disappear.
  9741. Pistons do not work at the lowest level of bedrock (or the level above the Void).
  9742. If you destroy bedrock in creative mode and replace it with another block, particles such as rain will still fall through that block.
  9743. In creative mode, you can destroy a block of bedrock, place a torch on the inside of a surrounding block, and, if flying is on, float directly below the open space. you will be able to see much farther in the void. This stops, however, when you move out from under the space.
  9744. If you have flying on in creative mode and start destroying blocks on the bottom bedrock layer, the orange horizon line of the sun will slowly start to appear. Where the horizon line appears depends on what time of day it is when you do this. This appears to be a glitch.
  9745. As of 1.8, if you are in within 5 or so blocks of the void, the particle effect will be visible, along with limited visibility, as if you were on render distance tiny.
  9746. When you die from falling into The Void, your Y position will be -194.83139904585364.
  9747. The top layer of bedrock in the Nether is generated one block higher than the player can place blocks in the Void.
  9748. In The Nether, the Void is red.
  9749.  
  9750. ]])
  9751. void.close()
  9752. weather=fs.open("mem/redworks/minepedia/weather","w")
  9753. weather.write([[Weather was announced at April 7th 2011 and added in the Beta 1.5 update, which was released on April 19th 2011.[1] The type of weather can depend on the biome; snow falls on arctic biomes, while others get rain. Deserts get no precipitation whatsoever. Weather is fairly rare and does not occur often. It makes the sky darker, blocks out the sun, stars, and moon. Intances of weather typically occur every 7 minecraft days (might differ in some worlds), and last for 15 minutes. When you sleep in a bed, the timer for weather resets. If it is already raining or snowing, upon waking up the weather will stop.
  9754. History: In early Classic, rain was introduced to the game to test out this feature. It was purely for cosmetic purposes at that time. The mechanics were simple, only testing if there is a block above to shelter the rain. It could be toggled on and off in-game using the F5 key. This feature later vanished when Indev was introduced.
  9755. Minecraft Alpha brought a test for snow. Generating a world during that time brings a 50% chance to get a snowy world, where ice and snow will regenerate. This feature was removed with the introduction of biomes. Despite this, mods could easily re-enable this feature by accessing the particle effects file.
  9756. After Minecraft Beta 1.5's announcement, a preview video [1] was uploaded onto the TeamMojang YouTube channel showing weather and other future updates. Weather was then introduced the following week.
  9757. Types of Weather: Rain occurs in all biomes except Tundra, Taiga, and Desert. It causes Wolves to get wet, crops to grow and will put out fires (except burning netherrack). It will not cause lava to turn into cobblestone or obsidian. Rain hitting the ground near the player can be heard as a sound effect. Snow will only fall in the Tundra and Taiga biomes. It causes water that does not have a block above it to become ice, as well as covering the top surface of all blocks exposed to the sky in the biome in snow, with the exception of transparent blocks.
  9758. During both weather conditions, dark thunderstorms might occur, during which lightning strikes and thunder rumbles. Getting hit by lightning will result in the loss of two and a half hearts while playing on normal.
  9759. Effects of Rain and Snow: Rain and snowfall are temporary but global occurrences.[2]
  9760. During rain and snow, thunderstorms become possible.
  9761. Rain and snow decrease the light level by 3, to light level 12 in full daylight.[3]
  9762. Notch has said that in a future update rain will cause flowers to regrow.
  9763. Rain and snow cannot be seen through glass that is being broken.
  9764. Effects of a Thunderstorm: Thunderstorms are much darker than normal rain, at light level 7 or less. This is dark enough to spawn hostile mobs.[4]
  9765. Lightning creates fire where it strikes, but the rain usually puts the fire out before it can spread. This can set fire to wooden structures.
  9766. If Lightning strikes a pig, it morphs into a zombie pigman.
  9767. If lightning strikes a creeper, it becomes supercharged and has a much more powerful explosion.[6]
  9768. Being struck by lightning or standing near a lightning strike deals two and a half hearts of damage, not including damage from the fire.
  9769. Effects of Snow Only: Ice and snow regenerate during snowfall.
  9770. Bugs: Occasionally, in an area with many biome changes, the rain will appear to fall onto snow without melting it.
  9771. Sometimes rain falls in snow biomes.
  9772. The area illuminated by a fire will stay lit if the fire is put out by rain (in Advanced OpenGL mode only).
  9773. When lightning strikes, ice, water, portals, rain, snow, and other particles behind it become see through.
  9774. Ice regenerates all of the time - this is a temporary fix for ice not regenerating in snow.
  9775. Some mobs have been killed during weather activities such as snow and rain in a manner similar to daylight, even at night.
  9776. Snow does not accumulate on bedrock.
  9777. Rain and snow originally fell through certain blocks like glass, stairs and slabs. This was fixed a day after the release of 1.5.
  9778. Sometimes rain won't fall on beaches or over the sea.
  9779. Trivia: Rain is needed for a thunderstorm, even though in the game's files, thunderstorms can be activated separately.
  9780. Tamed wolves will run away to shelter during a thunderstorm.
  9781. Usually it starts to rain/snow at night or at dusk.
  9782. If it is raining/snowing and you go to sleep it will most likely have stopped before you wake.
  9783. Mobs that burn at dawn will not burn if it is raining because they are not in direct sunlight.
  9784. Rain and Snow will still fall even if you are above the cloud layer.
  9785. Snow and Rain are both considered the same weather effect. The appearance of rain vs. snow is dependant on biome type.
  9786. When climbing down a ladder, the rain previously seemed to freeze until you reached the bottom or changed direction, possibly indicating that you climbed at same speed as the rain fell. This was fixed in 1.6.
  9787. Rain and snow used to fall underwater in 1.5. This bug was also fixed in 1.6.
  9788. If weather occurs in the Nether and the void is visible, the void will constantly flash brightly and no rain, snow, or lightning will be present.
  9789. ]])
  9790. weather.close()
  9791. wiki=fs.open("mem/redworks/minepedia/wiki","w")
  9792. wiki.write([[The wiki website is for the ever expanding minecraft mod known as ComputerCraft
  9793. that has the amazing ability to allow you to use LUA to code your own programs,
  9794. which can be linked to redstone, and automate your creations. Find more info here:
  9795.  
  9796. www.minecraftcomputercraft.wikia.com/wiki/Minecraft_ComputerCraft_Wiki
  9797.  
  9798. Feel free to edit or add to the wiki to keep it stored with the most up to date information available.
  9799. ]])
  9800. wiki.close()
  9801. wolf=fs.open("mem/redworks/minepedia/wolf","w")
  9802. wolf.write([[Wolves are a type of mob that can be allied with the player once tamed (fed bones). They are agile creatures, as they jump and run on land and swim in lakes and oceans. They will shake themselves dry when they reach the shore after a swim or if drenched by a rainstorm, or otherwise come in contact with water. Wolves are 1 block in height, 2 in length, and 1 in width (1 x 2 x 1).
  9803. Like almost all mobs, Wolves are vulnerable to drowning, suffocation, falling (from heights greater than 15 blocks), contact with cacti or lava, and will actively take damage from being set on fire or coming in contact with attacking hostile mobs.
  9804. Wolves will spawn in all difficulty levels (including peaceful), and only in Forest, Pine Forest, and Taiga biomes.
  9805. Depending on if and how they are interacted with, wolves can be in one of three states: wild (untamed), hostile, or tamed.
  9806. Behavior: Wild wolves are neutral towards the player and spawn untamed in packs of 1-8, occasionally attacking nearby Sheep while roaming around. Randomly dropped blocks of Wool (especially in a Pine Forest biome) can be good indicator of their presence. Untamed wolves will tilt their head to the side to indicate their interest in a bone or porkchop held by a nearby player.
  9807. Hostile wolves will coordinate their attacks on a target (sheep or a player that has injured a wild wolf in the pack) and will not revert from this state once aggravated, unless you die and respawn. Aggravated wolves will attack any and all players in range. These wolves can be distinguished from their constant growling and appearance: the eyes become red and the contrast level of the fur increases, revealing dark patches of bristling hair and a mouth line raised in a slight snarl. Note that a wolf hooked with a fishing rod or hit by a thrown snowball or egg will also become hostile.
  9808. Tame wolves can be distinguished from wild or hostile wolves from their eyes as they change to look less aggressive (two white pixels and one black pixel), as well as a red collar-like line around their neck. Friendly wolves will also bark occasionally at any nearby players. When standing, these wolves will engage any mob the player hits with melee attacks (the notable exception being creepers). Sitting wolves will idly observe their surroundings and will not attack anything unless the player is hit, in which case they will engage the player's attacker in defense. Like their wild counterparts, tamed wolves will tilt their head to beg for a porkchop held by a nearby player. Tamed wolves will sit when you right click them. They will remain sitting unless you click them again. A glitch was encountered where if your wolf was not sitting when you logged off, it would become wild and you would have to tame it again. This problem was fixed a couple of updates after wolves were first introduced.
  9809. Taming:
  9810. First, find an untamed wolf or wolf pack. Each individual wolf can be tamed by feeding (right-clicking) it bones until a puff of hearts appears and the wolf sits down. Once tamed, a wolf will not accept any more bones. It will also gain a red collar to indicate that it has been tamed. Note that the number of bones required is random - some wolves respond to a single bone while others require more to tame.[1] At the moment, there is no limit[2] on the number of wolves the player can tame.
  9811. Benefits: When told to sit (right-clicking), tamed wolves will remain in place while the player is free to move around. Sitting wolves will never despawn,[3] no matter how far away the player wanders, and if the player leaves the game they won't despawn either. They also will resume following the player when he/she returns and tells them to stand up again.
  9812. Tamed wolves (when standing) always follow the player around the Overworld, teleporting to him/her if they become too distant. They will attack any non-environmental entities that injure the player - even idle sitting wolves will stand up and descend upon an attacker to defend the player when he/she is hit by someone else or a hostile mob. When the player hits a mob with melee attacks (non-arrow),[4] tamed wolves will engage in combat with it, focusing on one target at a time and switching to another only when the first has been killed.
  9813. The notable exception to the rule is the Creeper. Tamed wolves will never engage a creeper even if the player hits the creeper.[5]
  9814. Care and Feeding: A bunch of begging wolves.A wolf's tail will rise and lower depending on its health. The exact health of an individual wolf can be determined by measuring the angle between its hind legs and tail. The angle indicates the percentage of health the wolf has (100 degrees for 100%, or 10 hearts; 90 degrees for 90%, etc.). Health can be restored by feeding wolves a cooked porkchop, a raw porkchop, steak, raw beef, cooked chicken, raw chicken and rotten flesh (feed them by right-clicking while holding the meat). Rotten flesh does not seem to make wolves sick, making it a viable and easy source of food for them. A cooked porkchop will restore 4 food points to the player, but cooked meat gives no added benefit when eaten by wolves, so they can be satisfied with fresh meat from wandering pigs, cows and chickens on-the-go.
  9815. As of Beta 1.9 Pre-release 4, Splash Potions of healing or regeneration can be thrown at wolves to heal them.
  9816. Since wild wolves have a maximum health of 4 hearts, their tails will always remain significantly lower than those of tamed wolves, which gain 100% health (10 hearts) instantly upon being successfully tamed.
  9817. Attempting to feed a tamed wolf when its health is full will start the eating animation instead.
  9818. Movement: In general, tame wolves follow the player in a wandering manner (as opposed to walking directly towards him/her) to avoid falling, but will continue to jump and move around even if the player stands still.
  9819. Wolves have extreme difficulty walking through open doors. The best workaround is to install "doggie doors" by destroying a single block to the bottom left/right of a Door, or to use double doors.
  9820. Tamed wolves will attempt to walk through obstacles to attack mobs, but will not find a way around them.
  9821. Because they are continually moving, wolves can receive fall damage when the player travels near cliff edges or gradual descents.
  9822. They will not actively avoid lava, cacti, fire, falling, or traps - even if the player navigates around these hazards, tamed wolves can be killed or severely injured en route to him/her.[6]
  9823. Wolves will stand up and follow the player if pushed into water or injured while sitting.
  9824. Wolves can navigate and turn around in 1 x 1 horizontal tunnels.
  9825. Teleportation: Tamed wolves will teleport to the player if a large enough gap (roughly a 20 x 20 x 10 block area) is created between them and the player with a few exceptions.
  9826. Teleporting resets the focus of a tamed wolf, so if a wolf is attacking a mob and teleports beside a player, it will resume following him/her.
  9827. It is possible for tamed wolves to teleport to an inaccessible location (e.g. under ice) and be injured or die of suffocation as a result.
  9828. A wolf will not teleport:
  9829. if the wolf has been ordered to sit
  9830. if the wolf is in a moving minecart
  9831. if the player is swimming/boating in deep water (but they will teleport as the player approaches land or shallow one block deep water)
  9832. if the player is standing on ice (but they will teleport as the player approaches land)
  9833. if the player enters a portal and travels to the Nether (the wolves will remain in the Overworld until the player returns)
  9834. from unloaded chunk (if you move far enough from the wolf or into different dimension)
  9835. if the player is flying a certain distance above the land
  9836. History: Wolves were first introduced in Beta 1.4 on March 31, 2011.
  9837. Notch confirmed their addition after having breakfast with an idol of his (likely Peter Molyneux).[8] Jeb posted a video preview of the wolves he was working on on March 18th, 2011.
  9838. Bugs: If an aggressive wolf is attacked by a different mob, then it becomes neutral to the player again.
  9839. A tamed wolf that falls far enough away from the player to teleport back may still take damage upon landing.
  9840. Wolves don't stand up if you are playing in offline mode if the game was saved while in online mode, as well as the reverse instance of saving while offline and playing online. However, doing the above may fix the problem.[citation needed]
  9841. If you carry your save data in a flash drive, and play on a computer you didn't start the world on, your wolf will not stand up at all. It may only happen on very rare occasions.[citation needed]
  9842. If Minecraft crashes, the number of tamed wolves you have may increase. However, some might also disappear.
  9843. There is a glitch that when a tamed wolf is inside a minecart (standing), if you go too far away from your wolf, the wolf will teleport to you and it will immediately fly back into the minecart, this will happen repeatedly. This can be fixed by destroying the minecart.
  9844. If a wolf is swimming, Minecraft will sometimes play the "shaking" sound.
  9845. If you tame a wolf while it's in the middle of jumping, the wolf will go into a "sitting" pose, but continue to bounce up and down indefinitely. This can be fixed by making the wolf sit.
  9846. Wolves can push you out of your bed, but you will still sleep.
  9847. In multiplayer, a player who logs in will see all sitting wolves as standing until they are removed and put back into position.
  9848. Tamed wolves can teleport inside transparent blocks such as slabs. This can mean they can get stuck, or not follow you.
  9849. It is possible to push a wolf into a block and therefore suffocate it, done by having two wolves sit, and then pushing one wolf by the other into a solid block. Wolves lose health while in the block, so make sure to be careful!
  9850. A rare glitch has been known to occur when you save while a tamed wolf is sitting. When you come back to the game and make it stand up, then just right after you've clicked (you need to be very quick), hold up a porkchop, and the wolf will run towards you in sitting position.
  9851. If a tamed wolf attacks a mob and you right-click on the wolf, it jumps towards the mob in sitting position.
  9852. Sitting wolves tamed before Beta 1.5_01 that are pushed into water, or that water runs over, will start to jump in place in the sitting position while they shake the water off. They will no longer be able to be told to stand, thus will continue to jump up and down in the sitting position until hit, after which will cause them to attack you until death on either side. This can be fixed by exiting the world and then reloading it again.
  9853. Wolves could be found in the "Shrubland" biome, which was probably a bug.
  9854. Trying to get a wolf to stand up if it was tame before 1.5_01 will cause it to attack you if you dealt it damage, just as a hostile wolf. However, it will still have the friendly appearance. It will begin to bounce and attack you. even if you walk away, then walk back you will be dealt damage, even if the wolf is not looking at you.
  9855. Tamed wolves count against the passive mob limit. In SMP, an individual player with an excessive number of tamed wolves can prevent ALL players on the server from encountering passive mobs regardless of type. (cows, chickens, pigs, etc.)
  9856. Sometimes, saving and quitting to the menu screen and then reloading the world immediately afterwards will cause some or all of your wolves to become wild again.
  9857. A wolf will attack its owner rarely if hit 3 times.
  9858. In SMP, a tame wolf will not beg when Raw Porkchop is held.
  9859. In 1.8 if you hit a non-tamed wolf, it will try to attack you but deals no damage.[citation needed]
  9860. In 1.8 Creative mode if you are flying, tamed wolves will not follow you. They will follow you again if you land close enough to where you left them while on the ground. However, if you land too far away they will not follow or teleport to you.[citation needed]
  9861. In 1.8.1 survival there is an uncommon bug that when you die, while your wolves are sitting,when you respawn and attack your wolves they will attack you, they don't run, but instead they move by sitting while jumping.
  9862. If a sheep spawns under a tree and is unable to move because it's head is in the leaves, wolves will lock on but not attack. They may be aiming for the head which is in the leaves, and therefore appear to look at the sheep.
  9863. If an untamed wolf is attacked by any mob, it will still attack the aggressor, but they won't switch to their hostile texture.
  9864. Trivia: Wolves appear to be based on the grey wolf.
  9865. If you order a wolf to attack an untamed member of its own pack, it will kill it, but turn hostile towards you.
  9866. If you try to use breeding on wolves, They will enter Love mode but in some cases they do not make baby wolves.
  9867. When a wolf attacks a big (23) slime, they simply push the slime around.
  9868. With 2.5 times the health and double the attack power, tamed wolves are 5 times stronger than wild ones, and can kill 4 one at a time without dying.
  9869. Wolves cannot go into the Nether unless hacked in and behave no differently than if they were in the normal world.
  9870. Wolves are the first official tameable mob in Minecraft.
  9871. Jeb has said that wolves may have color variations, but he "would have to run that through Notch".[12]
  9872. Wolves do not trample crops,[13] and they do not make step sounds.[14]
  9873. If a hostile mob (besides a creeper) attacks a player, the wolf will react and attack the mob to defend the player, even if the wolf was told to sit. This can be extremely useful if the player is trying to sleep and is attacked in their sleep, as it's more than likely the wolves will be beside the player at the time.
  9874. If you attack another player on SMP, even if PvP is off, a tamed wolf will attack the opposing player. They will continue to attack even if made to sit by the wolf's owner.
  9875. Similarly, if a player attacks a tamed wolf that isn't their own, then the wolf will attack.
  9876. If a wolf is in a downward water current, they will not float and, if not removed, will drown.
  9877. Wolves and Slimes are the only mobs that can be hostile to the player on peaceful mode.
  9878. Hostile wolves respond similarly to zombie pigmen, as attacking one will make the whole pack attack you.
  9879. If you attack a mob, then order a wolf to sit while it is approaching the mob, the wolf will attack the mob by bouncing toward it while sitting.
  9880. Wolves can teleport into transparent blocks. Therefore, it is not recommended to bring a wolf underground or near lava/fire.
  9881. Water breaks have no effect on wolves falling from high positions.
  9882. There is a glitch in which a tame sitting wolf will attack its master, still in sitting position. [citation needed] The cause is unknown, but can usually be fixed by logging out and back in, switching to "fast" graphics, or allowing the wolf to kill you and then returning to the death point.
  9883. Prior to 1.5, wolves continuously made whimpering noises even when they were at full health in SMP because Jeb mistakenly used client-side health instead of synced health.[15]
  9884. Tamed Wolves will teleport to their owner when close enough, if their owner is attacked. This will happen even if the Wolf has been ordered to sit.
  9885. Sitting tamed wolves that are pushed off of a ledge by anything or anyone will teleport to the owner.
  9886. In SMP, tamed wolves slowly move while sitting. It is not advised to put your tamed wolves on a roof as they usually fall off eventually.
  9887. Wolves have sound files for howling, but they aren't currently used in the game.
  9888. Wolves, sheared sheep, Magma Cubes, Silverfish and Villagers are currently the only five mobs that don't drop anything when killed. Sheared sheep drop one wool as of the 1.9 pre4 update when killed.
  9889. Wolves will remain sitting, although untamed, if a player has logged out and back in again.
  9890. Tamed wolves will attack villagers, if the player attacks one.
  9891. Wolves can spawn inside leaves. They will be stuck as long as there are leaf blocks on all sides.
  9892. Jeb has stated that once the AI Specialist helps in cleaning up Minecraft's AI Code, he will consider including Puppies in the game.
  9893. ]])
  9894. wolf.close()
  9895. world=fs.open("mem/redworks/minepedia/world","w")
  9896. world.write([[The Overworld is the starting dimension in Minecraft. It is the only dimension that has existed throughout the development of Minecraft; The Nether was the second dimension to be added, in Alpha 1.2.0, and The End is another dimension that appeared for the first time in Beta 1.9pre4.
  9897. The Overworld is the entire three dimensional space in which in-game construction can occur, encompassing the span from the level ceiling down to bedrock and extending in every direction on the horizontal plane. It is generated through a secret process which creates multiple Noise maps to create differing elevations, general chunk shapes, and complex mountain and cave systems.
  9898. All but four of the mobs in the game can appear in the Overworld: Wolves, Pigs, Sheep, Cows, Mooshrooms, Chickens, Squid, Zombies, Skeletons, Spiders, Spider Jockeys, Endermen, Creepers and Slimes all spawn normally, and Pigs can, very rarely, be hit by lightning, which turns them into Zombie Pigmen. Ghasts, Blazes and Magma Cubes can only spawn in the Nether, and the Enderdragon can only spawn in The End.
  9899. Worlds in Minecraft are generated through a procedural formula that takes a random number as a starting point - a seed, and it will be used to generate all the terrain of the overworld (and the Nether).
  9900. As of Beta 1.3 the option was added for the player to specify the world seed. Using a specific seed generates exactly the same world each time, and thus interesting Minecraft worlds could be shared between players. The spawn is not on exactly the same spot, though, so it is wise to give co-ordinates instead of directions. The seed input is converted into an integer, so, for instance, the word 'Glacier' corresponds to a value of 1772835215, which generates exactly the same world when entered as a seed value.
  9901. Many seeds are chosen simply because they spawn the player near desirable resources, a stronghold or some certain special structure, such as a dungeon.
  9902. As of Beta 1.8, players could find the current map seed by tapping F3.
  9903. In Classic and Indev, maps can be generated in "small" (128971289764), "normal" (256972569764), and "huge" (512975129764) sizes.
  9904. In Infdev, Alpha and Beta maps are somewhat infinitely big - They are made up of chunks; this means that as the player explores the map distant chunks are generated automatically, leading to theoretically infinite maps. In practice, technical reasons (the limits of 32-bit integers[1]) force the maximum map size to be around 8 times the surface area of the Earth [1], which comes out to about 4,080,576,000 km2. Whilst the horizontal planes of the maps are vast in size, the vertical plane remains at a fixed 128-block height [2].
  9905. While the map is infinite, the number of blocks the player may walk on is limited. The map, counting air as a block, and not counting blocks beyond and at where block physics fail (32,000,000 from the center) from top to bottom, and all in between, is essentially always 1.3107199297 1017 blocks big. In multiplayer, chunks will also stop generating after the world reaches a certain file size.
  9906. Generated Blocks: Entries marked with a D require additional data to fully define the block in a Beta world. Entries marked with an I have a different ID as an inventory item. Entries marked with a B require additional inventory data to fully define the inventory item. Entries marked with a T have tile entities associated with them to store additional data. Items with IDs in red cannot be legitimately obtained in the player's inventory in the game; they can only be obtained by "hacking" (such as the use of Inventory editors) or, in multiplayer using the /give server command.
  9907. Naturally Generated includes blocks that are created through the world seed.
  9908.  
  9909. Icon  Dec  Hex  Block type  
  9910. 00  00  Air  
  9911.  01  01  Stone  
  9912.  02  02  Grass  
  9913.  03  03  Dirt  
  9914.  07  07  Bedrock  
  9915.  09  09  Water (Stationary) D  
  9916.  11  0B  Lava (Stationary) D  
  9917.  12  0C  Sand  
  9918.  13  0D  Gravel  
  9919.  14  0E  Gold Ore  
  9920.  15  0F  Iron Ore  
  9921.  16  10  Coal Ore  
  9922.  17  11  Wood D B  
  9923.  18  12  Leaves D B  
  9924.  21  15  Lapis Lazuli Ore  
  9925.  24  18  Sandstone  
  9926.  31  1F  Tall Grass D B  
  9927.  32  20  Dead Bush  
  9928. Icon  Dec  Hex  Block type  
  9929.  37  25  Dandelion  
  9930.  38  26  Rose  
  9931.  39  27  Brown Mushroom  
  9932.  40  28  Red Mushroom  
  9933.  56  38  Diamond Ore  
  9934.  73  49  Redstone Ore  
  9935.  78  4E  Snow  
  9936.  79  4F  Ice  
  9937.  81  51  Cactus D  
  9938.  82  52  Clay Block  
  9939.  83  53  Sugar Cane D I  
  9940.  86  56  Pumpkin D  
  9941.  99  63  Huge Brown Mushroom D  
  9942.  100  64  Huge Red Mushroom D  
  9943.  106  6A  Vines D  
  9944.  110  6E  Mycelium  
  9945.  111  6F  Lily Pad  
  9946. Naturally Created means a combination of events that cause a new block to be placed by natural causes, not the player.
  9947.  
  9948. Icon  Dec  Hex  Block type  
  9949. 00  00  Air  
  9950.  02  02  Grass  
  9951.  03  03  Dirt  
  9952.  04  04  Cobblestone  
  9953.  08  08  Water (Flowing) D  
  9954.  10  0A  Lava (Flowing) D  
  9955.  31  1F  Tall Grass D B  
  9956.  39  27  Brown Mushroom  
  9957.  40  28  Red Mushroom  
  9958. Icon  Dec  Hex  Block type  
  9959.  49  31  Obsidian  
  9960.  51  33  Fire D  
  9961.  78  4E  Snow  
  9962.  79  4F  Ice  
  9963.  81  51  Cactus D  
  9964.  83  53  Sugar Cane D I  
  9965.  106  6A  Vines D  
  9966.  110  6E  Mycelium  
  9967. Same as Naturally Generated, but these blocks are only created with the "Generate Structures" option enabled.
  9968.  
  9969. Icon  Dec  Hex  Block type  
  9970.  05  05  Wooden Plank  
  9971.  09  09  Stationary Water D  
  9972.  11  0B  Stationary Lava D  
  9973.  13  0D  Gravel  
  9974.  17  11  Wood D B  
  9975.  30  1E  Cobweb  
  9976.  35  23  Wool (Black) D B  
  9977.  44  2C  Slabs D B  
  9978.  47  2F  Bookshelf  
  9979.  50  32  Torch D  
  9980.  52  34  Monster Spawner T  
  9981.  53  35  Wooden Stairs D  
  9982.  54  36  Chest D T  
  9983.  58  3A  Crafting Table  
  9984. Icon  Dec  Hex  Block type  
  9985.  59  3B  Seeds D  
  9986.  60  3C  Farmland D  
  9987.  61  3D  Furnace D T  
  9988.  64  40  Wooden Door D I  
  9989.  65  41  Ladders D  
  9990.  66  42  Rails D  
  9991.  67  43  Stone Stairs  
  9992.  71  47  Iron Door D I  
  9993.  72  48  Wooden Pressure Plate D  
  9994.  77  4D  Button D  
  9995.  85  55  Fence  
  9996.  97  61  Hidden Silverfish D  
  9997.  98  62  Stone Bricks D B (2)  
  9998.  101  65  Iron Bars  
  9999.  102  66  Glass Pane  
  10000. Chunks are the method used by Notch to divide maps into manageable pieces. They are 16 blocks wide, 16 blocks long, and 128 blocks deep, and encompass 32,768 blocks. By adjusting the render distance, differing numbers of chunks will be loaded into memory, with "far" rendering the maximum of 81 chunks. Only chunks which have been loaded may experience activity such as spawning, despawning, growth, liquid movement, or player interaction. Upon reaching the required distance away from a chunk, it will be unloaded from the memory, however not deleted. Thus, upon re-entering that area, whatever has been changed will remain changed.
  10001. Another subdivision of The Overworld is into Biomes. Biomes may have varying sizes, and each has its own features. For example, a forest biome will have large quantities of trees, where as a snow biome will have snow and ice.
  10002. The Overworld is able to seamlessly create new areas by using patterns found in the surrounding chunks and extend those into the newly created chunk. These patterns, while unique to each world, can be categorized easily by comparing them to a real-world equivalent, such as cliffs or oceans. While Minecraft is based on landforms found on earth, impossible formations, such as floating islands, can be found throughout the Overworld.
  10003. The Overworld can be navigated by use of the position of the sun and the moon, the movement of the clouds, and the movement of the stars. Assuming that the sun and moon rise in the east and go west, the clouds can be observed moving north and stars east.
  10004. Tools used for Navigating The Overworld include the Compass and Map. The Compass points to the spawn point, and the Map shows a fixed area around where it was made, and shows you the area very generically. In the Nether, the Compass needle will spin wildly, and is thus useless. Since Beta 1.9 (Pre-Release 4), the Compass needle and the Clock will spin randomly within The End, similar to the Nether.
  10005. Since Alpha 1.2.3, the F3 key toggles a debug console which shows the player their absolute coordinates, where the X and Z coordinates show longitude and latitude, and the Y coordinate shows height, where Y=64 corresponds to sea level. In addition, in Beta 1.7 an 'f' value was added, which indicates the direction the player is facing, 0 being the direction in which the sun sets, and it goes counter clockwise from there: 1 being the direction in which the clouds move, 2 and 3 are opposite to 0 and 1 respectively.
  10006. Since the sun changed position relative to the clouds (they now move in the same direction) in 1.0.0, if you want to assume that the sun rises in the east and sets in the west, the 'f' values are, 0=west, 1=south, 2=east, and 3=north
  10007. The overworld is the only dimension with a day/night cycle. During the daytime, the sun acts as a light source. This light is strong enough to kill Zombies, and Skeletons, make Endermen disappear and also makes Spiders neutral. The only mobs that survive and stay hostile in the daylight are creepers, slimes and cave spiders. At night time the moon is the only natural light source however it provides only a little light, allowing hostile mobs to spawn.
  10008. The Far Lands used to be an area that formed the "edge" of the "infinite" map, but was later removed accidentally from a patch on 1.8 due to the change in the terrain generation code. When players made it to the Far Lands, they experienced an excessive amount of lag and the map was severely distorted.
  10009. According to Notch, this distortion could be fixed, but since no one was likely to make it to the Far Lands without some form of cheating, he says that he was likely not going to fix it since he liked the idea of a mysterious world beyond a certain distance. When the Beta 1.8 update was released, the newly re-written biome code did in fact remove the Far Lands and will just generate as an extremely large ocean. The far lands may be brought back in a later patch, though it is unlikely.
  10010. Trivia: World seeds can be extracted from the level.dat file by various modes or seeds, such as http://seedscope.net. Alternatively, it can be found in-game on the performance screen accessed by pressing F3.
  10011. There is a bug that sometimes causes the files for deleted worlds to not be deleted from your hard drive. If a new world is created with the same name, this can cause the game to reuse the old files, and thus, parts of the old map, rather than generate an entirely new map.
  10012. ]])
  10013. world.close()
  10014. zombie=fs.open("mem/redworks/minepedia/zombie","w")
  10015. zombie.write([[A zombie is a hostile mob with green skin and clothes that closely resembles the player. A zombie measures 2 blocks tall, 1 block wide, and 0.25 blocks thick. Zombies spawn in dimly lit areas and attack players by shambling towards them and touching them. A zombie, along with skeletons will catch on fire when in sunlight
  10016. Uses: The zombie does not have very many uses. However, as of Minecraft Beta 1.8, zombies drop 0-2 pieces of Rotten Flesh.[1] Before the 1.8 update, they gave 0-2 Feathers instead.
  10017. Behavior: Zombies moan when wandering around aimlessly, but snarl and gurgle when attacking and injured. Zombies spawn in groups of 2 - 6 and will pursue the player on sight, making no attempt to avoid cliffs or other obstacles, which they will try to breach by hopping. Unlike skeletons, zombies do not try to avoid being hit, and will continue to pursue the player.
  10018. At dawn (when the Sun is 15 degrees or more above the ground), zombies will catch on fire and burn. However, if they are in a body of water when this time comes, they will not be burned, as the water will douse the flames. If they exit the water and the conditions for them burning still are true, then they will catch on fire, although if they are in enough shade (under a tree, cave, etc.), they will not catch fire.
  10019. Combat: Zombies are one of the easiest enemies to deal with and don't pose much of a threat unless encountered in a narrow space or in large groups. A player on sufficiently high ground can repeatedly hit a zombie again and again as it approaches. If the player is being pursued by several zombies, they can use a sword to push them back with each hit, alternating targets so no single zombie can close in. If a player is in a small room with several zombies with no escape route, it is recommended to use blocking and slashing at the zombies to half damage and slowly kill the zombies.
  10020. As of Beta 1.9 Pre-release 5 Zombies, Zombie Pigmen, and Skeletons can be damaged by Splash Potions of healing.
  10021. One other good way to deal with them is to go on sneak mode, slowly go back and wait for the zombie to aproach, as they are faster then the player on sneak mode, they shall come faster and you can hit them everytime he is in range with a sword. As of that, they wont hit you almost everytime you slash them
  10022. Defensive Measures: Like skeletons, zombies are vulnerable to daylight, lava, fire, and contact with cacti. Surface zombie populations can be controlled if the player regularly sleeps in a bed at dusk, since zombies will spawn at night if given the chance to do so.
  10023. Should a player be trapped on the surface outside at dusk, they can dig a single block wide pit 3 blocks deep, seal off the top with a block, place a torch at their feet, and wait for morning light to burn away the undead before climbing out.
  10024. History: Zombies were the first and fastest mob in Survival Test in the game until spiders were added, and could run as fast as the player. They would occasionally appear wearing armor, but this had no protective effect on their health. When killed, zombies gave 80 points each to the player.
  10025. The zombies' armor was removed in Indev. From Indev through Beta 1.7.3, zombies dropped 0 - 2 feathers upon death. Before chickens existed in Minecraft, Notch confessed[2] that he made zombies drop feathers because he had no idea what they should have dropped when killed.
  10026. Trivia: Zombies are known to spawn when the map is being built inside various caves and caverns.
  10027. Because a zombie has identical dimensions to the player model, the zombie's skin can easily be used as a player skin and vice versa.
  10028. A Giant is an unused variation of a zombie that can only be spawned through third party programs. Its behavior is identical to the zombie's, but it has 50 hearts of health, deals 8.5 damage in one single hit, and is unable to damage you unless you are right under it.
  10029. Since Beta 1.9 pre 5, a splash potion of fire resistance can be used to spare zombies from burning to death in the sun.
  10030. A zombie hit by a splash potion of harming will gain health, however, when it is hit by a splash potion of healing it will lose health. It is also unaffected by potions of regeneration and poison. This is because zombies are undead.
  10031. Zombies are easily detected through walls and blocks, due to their constant growling and moaning.
  10032. ]])
  10033. zombie.close()
  10034. zombiepigman=fs.open("mem/redworks/minepedia/zombiepigman","w")
  10035. zombiepigman.write([[A Zombie Pigman is an irregular mob that spawns naturally in the Nether and appears in the Overworld when a pig is struck by lightning, which is a very rare occurence. Like wild wolves, zombie pigmen are not initially hostile, but they will converge on the mob or player as a group to attack them if a single member is attacked.
  10036. Behavior: A Zombie Pigman is an irregular mob that spawns naturally in the Nether and appears in the Overworld when a pig is struck by lightning, which is a very rare occurence. Like wild wolves, zombie pigmen are not initially hostile, but they will converge on the mob or player as a group to attack them if a single member is attacked.
  10037. Combat: To an unprepared or careless player, a charging group of zombie pigmen can mean a swift death. However, fighting zombie pigmen becomes feasible when you can manage which of them become hostile and which remain neutral. Zombie pigmen attack on the basis of 'seeing is believing', meaning that they only become hostile when they see one of their own being attacked by the player. Once this happens, all zombie pigmen within a certain radius (about a dozen blocks) become hostile, and will charge the player IF he is within range. Zombie pigmen will also notice attacks from behind walls. The hostility radius is centered around the zombie pigmen that is attacked, not the player, meaning that you can attack a far-away zombie pigman with a bow without nearby zombie pigmen becoming hostile (although this is not advisable).
  10038. By keeping these rules in mind, it is possible to safely pick off groups of zombie pigmen with a bow, or to kill isolated zombie pigmen, provided that the other members of the group are outside their aggressive range, which is rather short. This can be used to collect Gold Nuggets and Rotten Flesh, despite there being only a small chance of them dropping these items.
  10039. Despite the visual effect of their gold sword they deal no greater damage than a zombie.
  10040. A way to kill them without great difficulty is to create a "booth"--a structure with four walls each three blocks tall, two of them (that must meet at a corner) having gaps at the second block up. A player can mine one block out of the bottom of one of the partial walls and attack a Zombie Pigman, then quickly go back inside and close the way in, then use strike-and-run tactics, running up to the walls with the gaps in them, hitting a Zombie Pigman, then running to the closed corner before it can retaliate, continuing until they are all dead. A bow or stone/iron/diamond sword speeds this process up significantly, the first by allowing the player just to sit in the closed corner and shoot, and the second by reducing the number of hits required. If possible, the booth should be made out of Cobblestone as this will make it invulnerable to Ghasts.
  10041. An easier tactic is to build a column three blocks high. From here, you can either hit the Zombie Pigmen or shoot arrows. They will swarm you, as well as push you around, but you will not receive any damage as long as you remain on the column.
  10042. As of Beta 1.9 Pre-release 5 Zombie Pigmen, Skeletons and Zombies can be damaged by Splash Potions of Healing, and will be healed by Splash Potions of Harming. In addition, a sword enchanted with Smite will do extra damage to Zombie Pigmen.
  10043. Another great way to deal with a pack of charging Zombie Pigmen is to either have a sword enchanted with the knock-back ability, or to backpedal while attacking them, as they can outrun you if you don't sprint.
  10044. Another technique is to agitate them, then lead them into a pool or fountain of lava. This will cause them to return to their docile state. They will not swim around in the lava, only stay in one spot. If you hit them out of the lava from another side, they will return to their hostile state. They will run at you, and fall into the lava, thus calming them again. If there are other pigmen nearby who are also in lava, they will not react. However this is not a good tactic for getting their drops as their drops are burned when they fall into the lava.
  10045. Another way to kill zombie pigmen is to place a bed next to one and right click on it this will make it explode and kill the zombie pigman and other zombie pigmen will not become hostile but it also risks killing yourself because of the explosion.
  10046. History: Zombie pigmen, the first completely neutral, non-passive mob, was introduced in Alpha as a part of the Nether update along with ghasts. The green liquid in the zombie pigman skin was originally blood red, but this was changed because players expressed a preference for the lack of conventional blood and gore in Minecraft. The skin file has "thx xaphobia" written on it as a credit by Notch to the skin's original creator, XaPhobia, also known as X__x.  
  10047. Zombie pigmen were originally presented as unarmed passive creatures in a preview before the Halloween update. After Alpha 1.2, their temperament was changed to neutral and they wielded gold swords. Pigmen would never forgive the player for attacking them, but after the Nov. 10, 2010 update, they would revert to a neutral state  after a certain amount of time (if left alone).
  10048. After the Beta 1.5 update, pigs struck by lightning in the Overworld would transform into zombie pigmen.[1]
  10049. After the 1.0 update, Zombie Pigmen no longer drop cooked porkchops upon death, but instead drop rotten flesh. Also, they have a chance to drop Gold Nuggets, which can be crafted into Gold Ingots or Glistering Melons.
  10050. Trivia: If a player attacks a zombie pigman in multiplayer, they turn hostile to ALL players. If the player who attacked them dies or goes away, the zombie pigmen attack the next player who is closest to them.
  10051. In multiplayer, if the server has monsters and a pig is struck by lightning, it may result in a glitched zombie pigman object that behaves similar to the client-side TNT glitch, it can be passed through, does not move or obey physics and cannot be hit.
  10052. In the Beta 1.9 pre-releases, upon looking straight at the Zombie Pigmen with fast graphics turned on, the hotbar seems to change colors.
  10053. ]])
  10054. zombiepigman.close()
  10055. zombiepigmen=fs.open("mem/redworks/minepedia/zombiepigmen","w")
  10056. zombiepigmen.write([[A Zombie Pigman is an irregular mob that spawns naturally in the Nether and appears in the Overworld when a pig is struck by lightning, which is a very rare occurence. Like wild wolves, zombie pigmen are not initially hostile, but they will converge on the mob or player as a group to attack them if a single member is attacked.
  10057. Behavior: A Zombie Pigman is an irregular mob that spawns naturally in the Nether and appears in the Overworld when a pig is struck by lightning, which is a very rare occurence. Like wild wolves, zombie pigmen are not initially hostile, but they will converge on the mob or player as a group to attack them if a single member is attacked.
  10058. Combat: To an unprepared or careless player, a charging group of zombie pigmen can mean a swift death. However, fighting zombie pigmen becomes feasible when you can manage which of them become hostile and which remain neutral. Zombie pigmen attack on the basis of 'seeing is believing', meaning that they only become hostile when they see one of their own being attacked by the player. Once this happens, all zombie pigmen within a certain radius (about a dozen blocks) become hostile, and will charge the player IF he is within range. Zombie pigmen will also notice attacks from behind walls. The hostility radius is centered around the zombie pigmen that is attacked, not the player, meaning that you can attack a far-away zombie pigman with a bow without nearby zombie pigmen becoming hostile (although this is not advisable).
  10059. By keeping these rules in mind, it is possible to safely pick off groups of zombie pigmen with a bow, or to kill isolated zombie pigmen, provided that the other members of the group are outside their aggressive range, which is rather short. This can be used to collect Gold Nuggets and Rotten Flesh, despite there being only a small chance of them dropping these items.
  10060. Despite the visual effect of their gold sword they deal no greater damage than a zombie.
  10061. A way to kill them without great difficulty is to create a "booth"--a structure with four walls each three blocks tall, two of them (that must meet at a corner) having gaps at the second block up. A player can mine one block out of the bottom of one of the partial walls and attack a Zombie Pigman, then quickly go back inside and close the way in, then use strike-and-run tactics, running up to the walls with the gaps in them, hitting a Zombie Pigman, then running to the closed corner before it can retaliate, continuing until they are all dead. A bow or stone/iron/diamond sword speeds this process up significantly, the first by allowing the player just to sit in the closed corner and shoot, and the second by reducing the number of hits required. If possible, the booth should be made out of Cobblestone as this will make it invulnerable to Ghasts.
  10062. An easier tactic is to build a column three blocks high. From here, you can either hit the Zombie Pigmen or shoot arrows. They will swarm you, as well as push you around, but you will not receive any damage as long as you remain on the column.
  10063. As of Beta 1.9 Pre-release 5 Zombie Pigmen, Skeletons and Zombies can be damaged by Splash Potions of Healing, and will be healed by Splash Potions of Harming. In addition, a sword enchanted with Smite will do extra damage to Zombie Pigmen.
  10064. Another great way to deal with a pack of charging Zombie Pigmen is to either have a sword enchanted with the knock-back ability, or to backpedal while attacking them, as they can outrun you if you don't sprint.
  10065. Another technique is to agitate them, then lead them into a pool or fountain of lava. This will cause them to return to their docile state. They will not swim around in the lava, only stay in one spot. If you hit them out of the lava from another side, they will return to their hostile state. They will run at you, and fall into the lava, thus calming them again. If there are other pigmen nearby who are also in lava, they will not react. However this is not a good tactic for getting their drops as their drops are burned when they fall into the lava.
  10066. Another way to kill zombie pigmen is to place a bed next to one and right click on it this will make it explode and kill the zombie pigman and other zombie pigmen will not become hostile but it also risks killing yourself because of the explosion.
  10067. History: Zombie pigmen, the first completely neutral, non-passive mob, was introduced in Alpha as a part of the Nether update along with ghasts. The green liquid in the zombie pigman skin was originally blood red, but this was changed because players expressed a preference for the lack of conventional blood and gore in Minecraft. The skin file has "thx xaphobia" written on it as a credit by Notch to the skin's original creator, XaPhobia, also known as X__x.  
  10068. Zombie pigmen were originally presented as unarmed passive creatures in a preview before the Halloween update. After Alpha 1.2, their temperament was changed to neutral and they wielded gold swords. Pigmen would never forgive the player for attacking them, but after the Nov. 10, 2010 update, they would revert to a neutral state  after a certain amount of time (if left alone).
  10069. After the Beta 1.5 update, pigs struck by lightning in the Overworld would transform into zombie pigmen.[1]
  10070. After the 1.0 update, Zombie Pigmen no longer drop cooked porkchops upon death, but instead drop rotten flesh. Also, they have a chance to drop Gold Nuggets, which can be crafted into Gold Ingots or Glistering Melons.
  10071. Trivia: If a player attacks a zombie pigman in multiplayer, they turn hostile to ALL players. If the player who attacked them dies or goes away, the zombie pigmen attack the next player who is closest to them.
  10072. In multiplayer, if the server has monsters and a pig is struck by lightning, it may result in a glitched zombie pigman object that behaves similar to the client-side TNT glitch, it can be passed through, does not move or obey physics and cannot be hit.
  10073. In the Beta 1.9 pre-releases, upon looking straight at the Zombie Pigmen with fast graphics turned on, the hotbar seems to change colors.
  10074. ]])
  10075. zombiepigmen.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement