YogCraft and Server Texture Packs

Note: This post was originally published on iamianwright.com it’s been moved here for archival purposes.

I have been running a private Minecraft server for myself and some friends for a while now.  We have been playing through a variety of Modpacks, starting with Tekkit then Voltz and yesterday we switched over to YogCraft.

On Minecraft servers you have the option to force users to download and automagically install a texture pack when they join.  I’ve never tried this before but I thought I’d give it a go as I was starting a new server.  The way it works is that you need a zip file containing the texture pack somewhere publicly accessible on the internet and you modify the server.properties file to tell it where to find it.  I tried this but immediately realised that there is a limit of 10Mb for texture packs served in this way and the one I had was 38Mb!

A little research showed me that there are some command line utilities to optimize PNG files which might help reduce the file size. A guy who knows a lot about PNGs has made them more user friendly by making a free drag and drop PNG optimiser called ImageOptim. I gave it the texture pack to chew on, 1200+ images that come to 40.7Mb before zipping, and left it to cook overnight.  I knew I was being overly optimistic seeing as I would need a 74% reduction overall to get it within the maximum allowed file size.

Additionally I found out that when you compress files on a Mac it includes all of the hidden system files (resource forks) in the archive. For a texture pack the system files are redundant and potentially increase the overall file size. Fortunately there are several applications available that allow you to create zip archives without the system files. I already use a free application called Keka to deal with archives and found that it offers this facility.

So after running all of the images through ImageOptim I was left with a folder weighing in at 32.1Mb.  I then compressed it at the highest setting with with Keka telling it to “exclude Mac resource forks” and was rewarded with a 29.9Mb file. For the sake of comparison using the built in Compress command in OS X created a 30.5Mb zip file so excluding the resource forks saved 0.6Mb.

The net result is a decrease in file size of a little over 21% which although significant is sadly shy of the 74% saving required. So I guess I’ll just email my friends a link to the zip and instructions on how to install texture packs for Minecraft.

For the sake of anyone arriving here from google the folder for texture packs in YogCraft on the Mac is: /Applications/YogCraft/minecraft/texturepacks

Lepai LP-2020A+ Amp Review

Note: This post was originally published on iamianwright.com it’s been moved here for archival purposes.

My new Lepai LP-2020A+ amp arrived yesterday and I promised a quick review so here goes.  I expected it to be adequate at best but it’s excellent!  I am not an audiophile but I can definitely appreciate the difference between good and bad audio.  The only complaint I have is that the amp does sound a bit muddy if you switch on the tone controls so I have left them disabled.  It’s not much of a concern though as I’m streaming the audio from iTunes so I’m using the built in equaliser and it sounds great.

For less than thirty quid I cannot praise the Lepai LP-2020A+ enough.  As I already had the speakers and Airport Express it’s a no-brainer.

Airplay Amp on a Budget

Note: This post was originally published on iamianwright.com it’s been moved here for archival purposes.

I bought some Mordaunt Short Avanti 902i’s to use as rears for a surround sound set several years ago but have only ever had one living room large enough to accommodate the whole setup.  As we now have a large swedish shelving system in our home office I was hoping to finally be able to use these bookshelf speakers that have been nestled in their box for the last four years.

Ideally I wanted to be able to stream to them from iTunes and iOS devices.  As they are passive speakers I knew I would require an amp and I was hopeful that by now network streaming might be a fairly standard feature.  Sadly this is not the case, at least not in the section my budget would stretch too.

Above right is the Denon stack a DNP720AE Network Music Player atop a PMA520AE Stereo Amp.  When I first saw the Denon streamer I misunderstood it to be a self contained amp with network connections.  Unfortunately for nearly £200 this device only generates an unamplified signal so it still requires the amp below before it can power speakers. Interestingly Denon do make a single device solution in the form of an AV receiver – an amp that deals with video as well as audio – that includes wireless streaming for around the £260 mark.

Sadly everything I looked at was still way beyond my budget and it became apparent that there is no such thing as a cheap Hi-Fi amplifier.  Even on eBay old amps go for upwards of £100.  After much searching I came across a mini amplifier on Amazon for the princely sum of £26.99!  It’s called a Lepai TA2020+ and it has surprisingly good reviews.  I called in an old Airport Express that I had loaned out to a friend and I am now eagerly awaiting delivery of this tiny amp.  I will let you know how this budget option turns out.

Figuring out FreePBX

Note: This post was originally published on iamianwright.com it’s been moved here for archival purposes.

In a moment of clarity I realised I was massively overcomplicating how to go about directing calls.  I had wanted the PBX to know if I was out of the house and route calls to the extension on my iPhone instead of my Mac.  When I thought about it this evening I realised that’s completely unnecessary as FreePBX lets you set a rule for what to do if an extension is unreachable.  So I have now set it up so that if the softphone on my Mac isn’t signed in then the call forwards to the extension for my iPhone.

On the subject of the iPhone, it turns out there are a number of SIP clients out there.  I’ve tried a few of them but so far the most reliable one has been 3CXPhone as it has the ability to accept calls in the background and when the device is on standby.  The only downside is that the ringtone is Marimba which I can’t stand and sadly there is no option to change it.

It’s all coming together quicker than I expected but there are still a few things to tick off:-

  • Setup a VPN so I can connect externally.
  • Configure the PBX to only allow calls through between 9am and 5pm Monday to Friday.  All other calls should go to voicemail and the messages forwarded to my email account.
  • Record better messages for any of the greetings or menus I’ll be using rather than the robotic American voice currently being used.

Raspberry Pi PBX

Note: This post was originally published on iamianwright.com it’s been moved here for archival purposes.

I’ve been looking at a cheap and flexible solution to having a separate phone number for business calls. I recently came across a post detailing how to use the Raspberry Pi as a PBX. It seems like it will more than cover my needs and as it comes in at under £50 for everything I figured it was worth a go.

I had planned to write a detailed post explaining what was involved in setting it up but it was much easier than I expected.  Essentially you download the image for the SD card use PiWriter to copy img to SD card from the Mac.  Plug in power and ethernet, SSH into the Pi to make a few changes and then everything else can be done via the web interface.

I followed the instructions for installing Incredible PBX on the Raspberry Pi from Nerd Vittles.  Next I needed a VoIP account and as I’m in the UK sadly google voice wasn’t an option.  So I signed up for a free SIP account at Sipgate and then followed these steps to set up a Sipgate trunk.

I’m using X-Lite on my macbook air as my soft phone at the moment.  I have incoming and outgoing calling working perfectly.  Currently calls do go to voicemail if unanswered but no messages are recorded.

The next plan is to set up a VPN tunnel into my home network so I can run a SIP client on my iPhone that will work as an extension of the PBX.  The upside is that as it’s an internal extension there won’t be any charge to pass the call on.  The downside is that it requires my phone to have an internet connection which is a rare thing in Thanet.

Ultimately I want the system to recognise if I’m home or not and automatically divert calls to the appropriate extension.  I’m sure this should be possible by looking to see if my iPhone’s MAC address is connected to the network.  Now I just need to figure out how to make a change in asterisk based on network information.

The project continues…