[ANN] Minecraft Bindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
45 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[ANN] Minecraft Bindings

Bert Freudenberg
I'm happy to announce my Smalltalk bindings for "Minecraft: Pi Edition":


Find out more at

- Bert -




Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Minecraft Bindings

Louis LaBrunda
Hi Bert,

Thanks for the Minecraft bindings.  My son, Alex plays Minecraft a lot.
Since I'm trying to get him to learn a little Smalltalk, we would like to
add the Minecraft codes (for things like wool) to your bindings.

If this was VA Smalltalk, I would create a pool dictionary via a pragma but
I'm not sure how to do this in Squeak.  Any guidance would be welcome.

Typically pool dictionary entries start with a capital letter, is that okay
by you?

Lou

>I'm happy to announce my Smalltalk bindings for "Minecraft: Pi Edition":
>Find out more at
>http://croquetweak.blogspot.com/2013/02/smalltalk-bindings-for-minecraft-pi.html
>- Bert -
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Minecraft Bindings

Bert Freudenberg
Pool vars sound okay, except that you couldn't use these then from a workspace.

Another idea would be to just use symbols or strings, and look them up in a dictionary in the API methods (blockId isNumber ifFalse: [...]).

Or, add them as methods to the Minecraft object so you could say "mc glowStone".

Do what feels right to you, all these would even be compatible :)

- Bert -


On 04.03.2013, at 20:55, Louis LaBrunda <[hidden email]> wrote:

> Hi Bert,
>
> Thanks for the Minecraft bindings.  My son, Alex plays Minecraft a lot.
> Since I'm trying to get him to learn a little Smalltalk, we would like to
> add the Minecraft codes (for things like wool) to your bindings.
>
> If this was VA Smalltalk, I would create a pool dictionary via a pragma but
> I'm not sure how to do this in Squeak.  Any guidance would be welcome.
>
> Typically pool dictionary entries start with a capital letter, is that okay
> by you?
>
> Lou
>
>> I'm happy to announce my Smalltalk bindings for "Minecraft: Pi Edition":
>> Find out more at
>> http://croquetweak.blogspot.com/2013/02/smalltalk-bindings-for-minecraft-pi.html
>> - Bert -
> -----------------------------------------------------------
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
> mailto:[hidden email] http://www.Keystone-Software.com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
Hi Bert,

>Pool vars sound okay,

I decided to start with the pool dictionary.  Attached you will find a zip
of two files.  One is a fileout of the pool dictionary.

Alex (my son) found a list of about 485 Minecraft textures and colors.  We
put them all in the pool dictionary, MinecraftConstants.

>except that you couldn't use these them from a workspace.

I thought this was a problem too but I'm pleased to say that if you look at
the replies to my post "How to use pool dictionaries in a workspace?" you
will see a way around it.

>Or, add them as methods to the Minecraft object so you could say "mc glowStone".

I like this too.  But I need a little help.  Below is a snippet of code
(unfinished) that I will use to create the instance methods to Minecraft
from the MinecraftConstants pool dictionary.  For now the code fills
#testStream with all the methods so we can see what they will look like.

What I need is (what I expect is one) line of code that will compile the
contents of #stream as a method of Minecraft. Can you help with that?

Will adding 485 methods to Minecraft for these values be a good idea?  I
have no reason to think not but it is a large number of methods.

Lou

        | testStream |

        testStream := WriteStream on: ''.
        MinecraftConstants bindingsDo: [:b | | key methodName stream |
                key := b key.
                methodName := key asString copy.
                methodName at: 1 put: ((methodName at: 1) asLowercase).
                stream := WriteStream on: ''.
                stream nextPutAll: methodName; cr; cr; tab; nextPut: $^; nextPutAll:
key; nextPut: $.; cr.
                       
                testStream nextPutAll: stream contents; cr.
        ].
        testStream inspect.
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (1/1)

Louis LaBrunda
In reply to this post by Bert Freudenberg

begin 644 Minecraft.zip
M4$L#!!0``@`(`"MX94+BX&B:1!8``*!*```5````36EN96-R869T0V]N<W1A
M;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^L-=,%L<D
MW@NATD)I`G'''W,.#44P(N<=W_>#;A?^XQ]@[C,>KNPKN\&$S@L94'"[4+DY
M=@Q#RA@W1I3S$,S?!OJ(I1:X4=_[Z18+8G8F)(%)*!6CTD7":0?<;/_NEZ/?
M//0Z.8&TU[9*!F2XCZTT%66FEGT"FN:BQA&#IV5;`($T#GSO%@H&E3)PZWMH
MD0.X1^-1E6C:2T7`<#D#QS5RNC`.Y_(D77-]*21'=PP6@>E>#-G:%8]BZ+4<
M(,?(A%0+`;?X6\$:KEU#[^:BUI7DWU%I$7R2=6N=B/G"/OXL6NL'EU(M-_:Y
MIN6\]7_EN3/N8"GLXDN9\]6HZ<B45!J(:)IY*T=[NZ6T"V('/H#CE/.YYOQ(
MF<BAUJ^BQJ)L4-<.M0%%7I"+C8I@YJ[Y9BV!@VWCEC(\Z*M#2YHU[\+-*H)U
M!-=W.W``AT*C("YUC?=]XA*\5Q*@JM'9S#2=3J/FP)A4!K??".C-^GFJU01?
ME`<!O0O];&TG,>#3F>(+.8`$+\'.NY-`#`$5.GBK#&[2(01+%'T0;21Q]Y(F
M_@!02P$"%``4``(`"``K>&5"XN!HFD06``"@2@``%0`````````!`"``````
M````36EN96-R869T0V]N<W1A;G1S+G-T4$L!`A0`%``"``@`JGAE0I_HF7&`
M`@``>`8``!```````````0`@````=Q8``$UI;F5C<F%F=$1E;6\N<W102P4&
2``````(``@"!````)1D`````
`
end


Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
In reply to this post by Louis LaBrunda
P.S.  I didn't mean to dump the code we wrote on you.  I just wanted you to
see it and get a little help before asking you for the best way to share
it.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Bob Arning-2
In reply to this post by Louis LaBrunda
compileGetters
"
MinecraftConstants compileGetters
"

    MinecraftConstants bindingsDo: [:b |
        MinecraftConstants class
            compile:
b key asString withFirstCharacterDownshifted,'

    ^',b key
            classified: 'magic accessors'
            notifying: nil.
    ].


although I wasn't sure exactly where you wanted the methods.

On 3/5/13 3:38 PM, Louis LaBrunda wrote:
What I need is (what I expect is one) line of code that will compile the
contents of #stream as a method of Minecraft. Can you help with that?



Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
Thanks Bob,

That did the trick.  Bert had suggested the getters be added on the
instance side of Minecraft, so that's what I did (at least on my image, if
Bert likes it, we will go with it).  As you suggested, I added the code to
generate the getters on the class side of MinecraftConstants.

Is there a way to add MinecraftConstants to the Minecraft poolDictionaries
list if it isn't there already?

Lou

>compileGetters
>"
>MinecraftConstants compileGetters
>"
>
>     MinecraftConstants bindingsDo: [:b |
>         MinecraftConstants class
>             compile:
>b key asString withFirstCharacterDownshifted,'
>
>     ^',b key
>             classified: 'magic accessors'
>             notifying: nil.
>     ].
>
>
>although I wasn't sure exactly where you wanted the methods.
>
>On 3/5/13 3:38 PM, Louis LaBrunda wrote:
>> What I need is (what I expect is one) line of code that will compile the
>> contents of #stream as a method of Minecraft. Can you help with that?
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Bert Freudenberg
Actually, having both the constants and the getters seems kind-of redundant, no? I'd just use the constants and see how far we get. That dictionary could be used e.g. for printing block names ...

Also, why did you split up the initialization? Filling in the pool from a literal array would seem much more natural to me ...

And why are these so many? Are you sure that's for the Pocket edition (which the Pi edition is based on)? I see a lot fewer I think:
http://www.minecraftwiki.net/wiki/Data_values_(Pocket_Edition)

- Bert -

On 2013-03-05, at 23:22, Louis LaBrunda <[hidden email]> wrote:

> Thanks Bob,
>
> That did the trick.  Bert had suggested the getters be added on the
> instance side of Minecraft, so that's what I did (at least on my image, if
> Bert likes it, we will go with it).  As you suggested, I added the code to
> generate the getters on the class side of MinecraftConstants.
>
> Is there a way to add MinecraftConstants to the Minecraft poolDictionaries
> list if it isn't there already?
>
> Lou
>
>> compileGetters
>> "
>> MinecraftConstants compileGetters
>> "
>>
>>    MinecraftConstants bindingsDo: [:b |
>>        MinecraftConstants class
>>            compile:
>> b key asString withFirstCharacterDownshifted,'
>>
>>    ^',b key
>>            classified: 'magic accessors'
>>            notifying: nil.
>>    ].
>>
>>
>> although I wasn't sure exactly where you wanted the methods.
>>
>> On 3/5/13 3:38 PM, Louis LaBrunda wrote:
>>> What I need is (what I expect is one) line of code that will compile the
>>> contents of #stream as a method of Minecraft. Can you help with that?
> -----------------------------------------------------------
> Louis LaBrunda
> Keystone Software Corp.
> SkypeMe callto://PhotonDemon
> mailto:[hidden email] http://www.Keystone-Software.com
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Bob Arning-2
In reply to this post by Louis LaBrunda
Well, there's a poolDictionaries: argument in the class definition. Put it there.

On 3/5/13 5:22 PM, Louis LaBrunda wrote:
Is there a way to add MinecraftConstants to the Minecraft poolDictionaries
list if it isn't there already?



Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
On Tue, 05 Mar 2013 18:02:40 -0500, Bob Arning <[hidden email]>
wrote:

>Well, there's a poolDictionaries: argument in the class definition. Put
>it there.

I meant from within the same code that was generating the getters or am I
not understanding what you are saying?

>On 3/5/13 5:22 PM, Louis LaBrunda wrote:
>> Is there a way to add MinecraftConstants to the Minecraft poolDictionaries
>> list if it isn't there already?
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
In reply to this post by Bert Freudenberg
>Actually, having both the constants and the getters seems kind-of redundant, no? I'd just use the constants and see how far we get. That dictionary could be used e.g. for printing block names ...

I guess it is redundant.  I was just trying to supply whatever people might
want to use.

>Also, why did you split up the initialization?

When I tried to set all at once the compiler complained on saving the
method.

>Filling in the pool from a literal array would seem much more natural to me ...

I just followed what ChronologyConstants did.  VA Smalltalk and Squeak are
very different in how they make pool dictionaries.  Can you give me an
example.

>And why are these so many? Are you sure that's for the Pocket edition (which the Pi edition is based on)? I see a lot fewer I think:
>http://www.minecraftwiki.net/wiki/Data_values_(Pocket_Edition)

I'm not sure where Alex found it.  I expect it is not for the Pocket
edition.  We have a RasPi but are playing with the Minecraft Bukkit server
that Casey pointed us to and a windows version of Squeak.  We will probably
play with it on the Pi later.  Would there be some value in splitting it
into two pools so the Pi edition could have a smaller pool?

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Bob Arning-2
initFromArray
"
MinecraftConstants initFromArray
"
    | input |
    input _ #(
        ActivatorRail  157
        Air  0
        Anvil  145
        Apple  260
        Arrow  262
        AwkwardPotion  (373 16)
        "etc..."
    ).
    input pairsDo: [ :k :v |
        MinecraftConstants classPool at: k put: v.
    ].


On 3/5/13 6:49 PM, Louis LaBrunda wrote:
>Filling in the pool from a literal array would seem much more natural to me ...
I just followed what ChronologyConstants did.  VA Smalltalk and Squeak are
very different in how they make pool dictionaries.  Can you give me an
example.




Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Bob Arning-2
In reply to this post by Louis LaBrunda
Well, you could...

addPoolToMinecraftTest
"
MinecraftConstants addPoolToMinecraftTest
"
    | newPoolNames |
   
    (MinecraftTest sharedPools includes: MinecraftConstants) ifTrue: [^self].
    newPoolNames _ String streamContents: [ :strm |
        MinecraftTest sharedPools,{MinecraftConstants} do: [ :e | strm nextPutAll: e asString,' '].
    ].
    MinecraftTest sharing: newPoolNames.
    MinecraftTest withAllSubclassesDo: [ :e | e compileAll].

but I'm not clear why you'd want to. Isn't easier to just edit the class definition in a browser and save it?

Cheers,
Bob

P.S. it's Brunhilda

On 3/5/13 6:26 PM, Louis LaBrunda wrote:
On Tue, 05 Mar 2013 18:02:40 -0500, Bob Arning [hidden email]
wrote:

Well, there's a poolDictionaries: argument in the class definition. Put 
it there.
I meant from within the same code that was generating the getters or am I
not understanding what you are saying?

On 3/5/13 5:22 PM, Louis LaBrunda wrote:
Is there a way to add MinecraftConstants to the Minecraft poolDictionaries
list if it isn't there already?
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
[hidden email] http://www.Keystone-Software.com






Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
Hey Bob,

>Well, you could...
>addPoolToMinecraftTest
>"
>MinecraftConstants addPoolToMinecraftTest
>"
>     | newPoolNames |
>
>     (MinecraftTest sharedPools includes: MinecraftConstants) ifTrue:
>[^self].
>     newPoolNames _ String streamContents: [ :strm |
>         MinecraftTest sharedPools,{MinecraftConstants} do: [ :e | strm
>nextPutAll: e asString,' '].
>     ].
>     MinecraftTest sharing: newPoolNames.
>     MinecraftTest withAllSubclassesDo: [ :e | e compileAll].
>
>but I'm not clear why you'd want to. Isn't easier to just edit the class
>definition in a browser and save it?

Yes it is.  But at the time I thought (my mistake) Bert wanted/suggested
that I create instance side messages to his Minecraft class.  That would
require it having the pool dictionary defined before the methods could be
added and I kind of wanted it to be all automatic.  As it turns out Bert is
happy with just the pool dictionary and people can add/use it wherever they
like.

Anyway, I'm happy to learn about things that are different between VA
Smalltalk and Squeak.

>P.S. it's Brunhilda

That was good for a laugh, thanks.  But as I think about it, it's not too
flattering.

Lou
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Bob Arning-2
The pool approach is probably good, but I'm always a little leery of things stored in different ways and places. Since the system browser, optimized for looking at classes and methods, is the primary tool for most of us, I tend to prefer ways to work within that context. Defining pool variables and then defining methods to return those variables does seem a bit much, but what about dispensing with the pool variables and auto-generating methods like:

brownWool

    ^#(35 12)

These methods could be grouped in categories to facilitate browsing for interesting textures/objects/whatchamacallums. For most of us browsing for senders is a bit more natural than browsing for references to pool variables. FWIW.

Cheers,
Bob


On 3/6/13 9:43 AM, Louis LaBrunda wrote:
Yes it is.  But at the time I thought (my mistake) Bert wanted/suggested
that I create instance side messages to his Minecraft class.  That would
require it having the pool dictionary defined before the methods could be
added and I kind of wanted it to be all automatic.  As it turns out Bert is
happy with just the pool dictionary and people can add/use it wherever they
like.



Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Nicolas Cellier
2013/3/6 Bob Arning <[hidden email]>:

> The pool approach is probably good, but I'm always a little leery of things
> stored in different ways and places. Since the system browser, optimized for
> looking at classes and methods, is the primary tool for most of us, I tend
> to prefer ways to work within that context. Defining pool variables and then
> defining methods to return those variables does seem a bit much, but what
> about dispensing with the pool variables and auto-generating methods like:
>
> brownWool
>
>     ^#(35 12)
>
> These methods could be grouped in categories to facilitate browsing for
> interesting textures/objects/whatchamacallums. For most of us browsing for
> senders is a bit more natural than browsing for references to pool
> variables. FWIW.
>

But in a trunk image nowadays, cmd+shift+N should catch the references
to ivars/class var/pool var as easily as cmd+n would catch senders,
right?

Nicolas

> Cheers,
> Bob
>
>
>
> On 3/6/13 9:43 AM, Louis LaBrunda wrote:
>
> Yes it is.  But at the time I thought (my mistake) Bert wanted/suggested
> that I create instance side messages to his Minecraft class.  That would
> require it having the pool dictionary defined before the methods could be
> added and I kind of wanted it to be all automatic.  As it turns out Bert is
> happy with just the pool dictionary and people can add/use it wherever they
> like.
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Shared Pools (was: [ANN] Minecraft Bindings - Minecraft.zip (0/1))

Bert Freudenberg

On 2013-03-06, at 16:34, Nicolas Cellier <[hidden email]> wrote:

> 2013/3/6 Bob Arning <[hidden email]>:
>> The pool approach is probably good, but I'm always a little leery of things
>> stored in different ways and places. Since the system browser, optimized for
>> looking at classes and methods, is the primary tool for most of us, I tend
>> to prefer ways to work within that context. Defining pool variables and then
>> defining methods to return those variables does seem a bit much, but what
>> about dispensing with the pool variables and auto-generating methods like:
>>
>> brownWool
>>
>>    ^#(35 12)
>>
>> These methods could be grouped in categories to facilitate browsing for
>> interesting textures/objects/whatchamacallums. For most of us browsing for
>> senders is a bit more natural than browsing for references to pool
>> variables. FWIW.
>>
>
> But in a trunk image nowadays, cmd+shift+N should catch the references
> to ivars/class var/pool var as easily as cmd+n would catch senders,
> right?
>
> Nicolas

Even a simple cmd-n does find them, e.g. BlueButtonBit.

- Bert -

>> Cheers,
>> Bob
>>
>>
>>
>> On 3/6/13 9:43 AM, Louis LaBrunda wrote:
>>
>> Yes it is.  But at the time I thought (my mistake) Bert wanted/suggested
>> that I create instance side messages to his Minecraft class.  That would
>> require it having the pool dictionary defined before the methods could be
>> added and I kind of wanted it to be all automatic.  As it turns out Bert is
>> happy with just the pool dictionary and people can add/use it wherever they
>> like.

Reply | Threaded
Open this post in threaded view
|

[ANN] Minecraft Bindings - Minecraft.zip (0/1)

Louis LaBrunda
In reply to this post by Bob Arning-2
Hey Bob,

I will have to think about this for awhile.  I like how values in a pool
dictionary look in code.  But I take your point about being able to browse
methods and group them in categories (I would have to get Alex to work on
the categories and what goes in them).  Bert seems to like pool but also
thought instance methods would be good.  Someone also said they would
prefer class side methods.  I could go with the pool dictionary I have (I
fixed the initialize as you suggested, thanks) and add class methods to
create the instance/class methods and let people run them if they like.

I will think about it and I'm still open to suggestions.

Lou

>The pool approach is probably good, but I'm always a little leery of
>things stored in different ways and places. Since the system browser,
>optimized for looking at classes and methods, is the primary tool for
>most of us, I tend to prefer ways to work within that context. Defining
>pool variables and then defining methods to return those variables does
>seem a bit much, but what about dispensing with the pool variables and
>auto-generating methods like:
>
>brownWool
>
>     ^#(35 12)
>
>These methods could be grouped in categories to facilitate browsing for
>interesting textures/objects/whatchamacallums. For most of us browsing
>for senders is a bit more natural than browsing for references to pool
>variables. FWIW.
>
>Cheers,
>Bob
>
>
>On 3/6/13 9:43 AM, Louis LaBrunda wrote:
>> Yes it is.  But at the time I thought (my mistake) Bert wanted/suggested
>> that I create instance side messages to his Minecraft class.  That would
>> require it having the pool dictionary defined before the methods could be
>> added and I kind of wanted it to be all automatic.  As it turns out Bert is
>> happy with just the pool dictionary and people can add/use it wherever they
>> like.
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:[hidden email] http://www.Keystone-Software.com


Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Re: Re: Re: [ANN] Minecraft Bindings - Minecraft.zip (0/1)

Karl Ramberg
In reply to this post by Bob Arning-2
+1 
If it is hard to discover with the current tools one either have to adjust to the tools or build better tools.
Class Color have many class side methods that make them easy to look through with a class browser.

Karl



On Wed, Mar 6, 2013 at 4:06 PM, Bob Arning <[hidden email]> wrote:
The pool approach is probably good, but I'm always a little leery of things stored in different ways and places. Since the system browser, optimized for looking at classes and methods, is the primary tool for most of us, I tend to prefer ways to work within that context. Defining pool variables and then defining methods to return those variables does seem a bit much, but what about dispensing with the pool variables and auto-generating methods like:

brownWool

    ^#(35 12)

These methods could be grouped in categories to facilitate browsing for interesting textures/objects/whatchamacallums. For most of us browsing for senders is a bit more natural than browsing for references to pool variables. FWIW.

Cheers,
Bob



On 3/6/13 9:43 AM, Louis LaBrunda wrote:
Yes it is.  But at the time I thought (my mistake) Bert wanted/suggested
that I create instance side messages to his Minecraft class.  That would
require it having the pool dictionary defined before the methods could be
added and I kind of wanted it to be all automatic.  As it turns out Bert is
happy with just the pool dictionary and people can add/use it wherever they
like.







123