Page 1 of 1

Java is Hard

Posted: Fri Jul 22, 2011 11:17 am
by jacek
Last night, I tried to learn some Java. Turns out it's pretty hard.

I was looking for a plugin for Bukkit to make wool glow when powered, there did not seem to be any. So like a crazy person I decided to try and make one. Luckily there is a good tutorial on the basics of plugin development http://wiki.bukkit.org/HUGE_Plugin_Tutorial so using that, I made a plugin that makes wool blocks change to wood when powered. At the time (1AM) this felt like an amazing achievement. I then had a go at making the light level for that block change, much harder ! But by decompiling http://forums.bukkit.org/threads/mech-p ... -740.9601/ I found a way to do it, now wool blocks flash when powered and I am totally stuck on how to make the light persist.

At the risk of sounding entirely lame, this is what I love about programming, being stuck :D

Re: Java is Hard

Posted: Fri Jul 22, 2011 11:40 am
by jacek
Image

Progress :D

Re: Java is Hard

Posted: Fri Jul 22, 2011 1:25 pm
by EcazS
I was going to learn Java just because of Minecraft but I gave up when my brain malfunctioned.

I also don't like how redstone looks on your texture pack... :lol:

Re: Java is Hard

Posted: Fri Jul 22, 2011 1:37 pm
by jacek
EcazS wrote:I was going to learn Java just because of Minecraft but I gave up when my brain malfunctioned.
You should try Bukkit, it's actually pretty easy to do simple stuff like change blocks.
EcazS wrote:I also don't like how redstone looks on your texture pack... :lol:
Then I do not recommend you use my texturepack ;)

Re: Java is Hard

Posted: Fri Jul 22, 2011 6:53 pm
by jacek
Spent 3 hours today trying to work out why blocks were not being lit on one side.
for (int i = 0; i < 6; ++i){
I changed the number of blocks that got light added from 6 to 18 and forgot to change this number.

with it as
for (int i = 0; i < blockList.length; ++i){
It works perfectly !

*goes to make glow in the dark pixel art*

Re: Java is Hard

Posted: Fri Jul 22, 2011 7:30 pm
by DomC
I learnt Java as my first programming language so might have a go at making a plugin!

EDIT: I agree it is hard to learn!

Re: Java is Hard

Posted: Fri Jul 22, 2011 7:33 pm
by jacek
DomC wrote:I learnt Java as my first programming language so might have a go at making a plugin!
I would recommend it ! Pretty fun ;)
DomC wrote:EDIT: I agree it is hard to learn!
Indeed ! :( Not much documentation for developers really. I guess Eclipse tells you what methods are available.

Re: Java is Hard

Posted: Fri Jul 22, 2011 7:39 pm
by DomC
Also, do I recall you have a server I can sign up to?

Anyway minecraft is a great game!

Re: Java is Hard

Posted: Fri Jul 22, 2011 8:00 pm
by jacek
DomC wrote:Also, do I recall you have a server I can sign up to?
I do, if you post your username I can whitelist you.

Re: Java is Hard

Posted: Fri Jul 22, 2011 9:30 pm
by DomC
OK,
My username is:
DomChester

Thanks

Re: Java is Hard

Posted: Sat Jul 23, 2011 10:53 am
by jacek
Added :D

The server address is sv2.xhcp.co.uk.

Re: Java is Hard

Posted: Sat Jul 23, 2011 11:04 am
by DomC
Cool, thanks

Re: Java is Hard

Posted: Sun Jul 24, 2011 12:07 am
by jacek
So I made some progress


Re: Java is Hard

Posted: Sun Jul 24, 2011 12:44 am
by DomC
Awesome - i am going to start on a plugin tonight after having a quick refresh of my Java!

Have you got any more ideas for plugins you will make? I can't wait to see what you can come up with!

Re: Java is Hard

Posted: Sun Jul 24, 2011 10:28 am
by jacek
DomC wrote:Have you got any more ideas for plugins you will make? I can't wait to see what you can come up with!
Not at the moment, I like the idea of extending the redstone mechanic though.

Re: Java is Hard

Posted: Sun Jul 24, 2011 3:30 pm
by JelvinJS7
jacek wrote:So I made some progress

J6uqIaBgwgM
This is via java?
I should really learn it…

Also, what are the words that are glowing at the beginning?

Re: Java is Hard

Posted: Sun Jul 24, 2011 7:18 pm
by jacek
JelvinJS7 wrote:Also, what are the words that are glowing at the beginning?
"Bukkit" it's the name of the server wrapper mod thing.

Re: Java is Hard

Posted: Thu Jul 28, 2011 6:14 pm
by Kamal
Can you please add my friend TacticalScrewUp to the server?

Re: Java is Hard

Posted: Thu Jul 28, 2011 8:04 pm
by jacek
Kamal wrote:Can you please add my friend TacticalScrewUp to the server?
No unless he joins the forum, makes a few less-than-useless posts and then asks for himself ;)

Re: Java is Hard

Posted: Thu Jul 28, 2011 9:45 pm
by JelvinJS7
jacek wrote:
Kamal wrote:Can you please add my friend TacticalScrewUp to the server?
No unless he joins the forum, makes a few less-than-useless posts and then asks for himself ;)
There a reason for that, you being difficult, or just you and your goofy self?

Re: Java is Hard

Posted: Fri Jul 29, 2011 2:21 pm
by jacek
JelvinJS7 wrote:There a reason for that, you being difficult, or just you and your goofy self?
Well the server is meant to be for forum members ;)

Plus I will know how likely he is to follow the rules if he is a member here.