Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If(%HITID%=="IC2:blockRubWood")
- #x=%HITX%
- #y=%HITY%
- #z=%HITZ%
- // max rubber tree height is 8
- #y_max=#y+8
- #latex_count=0
- &info="Latex not found."
- For(#y_index,%#y%,%#y_max%)
- GetID(%#x%,%#y_index%,%#z%,&id,#data)
- If(%&id%=="IC2:blockRubWood")
- Dec(#data,1)
- If(%#data%>0)
- Inc(#latex_count,1)
- // get latex state
- If(%#data%>6)
- Dec(#data,6)
- &info="Empty latex"
- Else
- &info="Full latex"
- EndIf
- // get relative height
- #block_pos=#y_index
- Dec(#block_pos,%#y%)
- Inc(#block_pos,1)
- &info="%&info% on the block %#block_pos%"
- // get latex side
- If(%#data%==1)
- &info="%&info%, north."
- ElseIf(%#data%==2)
- &info="%&info%, south."
- ElseIf(%#data%==3)
- &info="%&info%, west."
- ElseIf(%#data%==4)
- &info="%&info%, east."
- EndIf
- Log(%&info%)
- EndIf
- EndIf
- Next
- If(%#latex_count%>0)
- &info="%#latex_count% latex found."
- EndIf
- Log(%&info%)
- EndIf
Add Comment
Please, Sign In to add comment