Tinker's Construct is a remarkably well documented mod compared to most Minecraft mods, especially those in FTB. In fact, it even gives you pretty awesome in-game manuals. However, it took me forever to figure out what you actually have to do to get making custom tools.
As you probably gathered from the first in-game book, you need some workshop blocks. However, what you might not have understood is that, to start out, you just need a Stencil Table, Part Builder, and Tool Station. They're all just wood. Make a couple of spare blank patterns as well.
Shove a blank pattern in the Stencil Table and click Next and/or Previous until you find a fragment that looks useful (I recommend pickaxe head). Take it out. Shove that into a square slot in the Part Builder and some wood or cobble in the ingot-like slot. Take the new piece out. This does not work with metals. For metal, you need a Smeltery. You can do similar things using just this set-up to make pretty lame composite tools if you figure out the Tool Station. In the Tool Station, you click the type of tool you want to make on the left and then put in the components in the slots which will appear.
However, I think it's pretty easy to advance to the next stage: smelting. Gather a whole bunch of clay, sand, and gravel. Combine it into grout and smelt that into Seared Bricks. Create exactly 18 Seared Brick blocks, 1 Smeltery Controller, 1 Seared Tank, 1 Seared Faucet, 1 Smeltery Drain, and 1 Casting Table. Put a 3x3 square of the Seared Brick blocks on the ground to start. Then, up one level and not directly above the bricks, place the Controller, Tank, and Drain facing in. Complete a ring around the outside (corners unnecessary) with the rest of the bricks. Attach the Faucet to the outside of the Drain and place the Casting Table directly underneath it.
Once that's all done, grab a bucket of lava and use it on the Tank. It should light up the Controller as well. You now have a functional Smeltery! Now, find those tool parts you made earlier and right-click the Casting Table with one. It should insert itself. Pop in 2 gold ingots or 1 ore into the Controller and let it melt. Right-click the Faucet and the liquid should pour into the Table. If you've set things up correctly, it will cool after three seconds, producing a solid cast around the part. Pop both of them out, and you have a cast! I'm fairly certain you can just throw out the cheap part.
Now, it's time to make a part with metal. If your Smeltery still had liquid metal in it, break and replace the Controller. Casts must be filled with a different material than was used to make them. Put in metal of your choice (I did iron the first time). Pop the cast back into the Casting Table and, once the metal is liquid, right-click the Faucet. If it doesn't cool into the part after a few seconds, put in more metal. Once solid, pop both of them out and you have a metal part!
Once you've made enough parts for a tool, put them together in the Tool Station. You can also modify them there by adding unusual substances found in the second book you got.
Various technical articles, IT-related tutorials, software information, and development journals
Friday, November 29, 2013
Wednesday, November 27, 2013
Creating Extension Methods in VB .NET
An "extension method" is a method of a class or interface that is actually defined in a different module, usually by a different author. They are usually used to "extend" the functionality of existing types without creating new ones.
In C#, creating extension methods is pretty easy. Simply put a "this" before the type on the first argument, which indicates that it is the instance on which the method is running. In VB, it's slightly different but still pretty simple. First, import System.Runtime.CompilerServices at the top of the file containing the module. Then, apply the <Extension> attribute to the Sub or Function. When writing the method body, write as if the first argument is the current object. It obviously has to be the same type as the type to which you'd like to apply the extension.
Here's one I like to add to the string type:
Imports System.Runtime.CompilerServices
Module Extensions
<Extension> Public Function EqCaseless(This As String, _
Other As String) As Boolean
Return String.Equals(This, Other, _
StringComparison.InvariantCultureIgnoreCase)
End Sub
End Module
Then, I can compare strings caselessly like this:
If input.EqCaseless("splosions") Then End
In C#, creating extension methods is pretty easy. Simply put a "this" before the type on the first argument, which indicates that it is the instance on which the method is running. In VB, it's slightly different but still pretty simple. First, import System.Runtime.CompilerServices at the top of the file containing the module. Then, apply the <Extension> attribute to the Sub or Function. When writing the method body, write as if the first argument is the current object. It obviously has to be the same type as the type to which you'd like to apply the extension.
Here's one I like to add to the string type:
Imports System.Runtime.CompilerServices
Module Extensions
<Extension> Public Function EqCaseless(This As String, _
Other As String) As Boolean
Return String.Equals(This, Other, _
StringComparison.InvariantCultureIgnoreCase)
End Sub
End Module
Then, I can compare strings caselessly like this:
If input.EqCaseless("splosions") Then End
Tuesday, November 26, 2013
Fixing SupaChat
A couple of years ago, I wrote a chat server called SupaChat Server and a lightweight client for it. A project I did for World Literature - a Beowulf text-based RPG as a SupaChat Server snap-in - reminded me of it. Like I wrote a few weeks ago, it's really not that bad. However, it has a major problem. Instead of multithreading it myself, I just had timers in the main form that triggered read and ping events. While it was pinging all the clients and actually waiting for a reply, no messages would be processed. That caused all manner of ping timeout disconnections (especially because it happened every three seconds) in my presentation. I then decided that I should refactor it to resolve those problems. It'll take a lot of rewriting to implement a proper threading and queue system, but the server should run a lot better.
Monday, November 25, 2013
Tour of Interesting Registry Places, Part II
Open up your Registry Editor or registry inspector of your choice and check out these cool places in Windows! All of these things start in \HKCU\Software\Microsoft\Windows\CurrentVersion
- \AccountPicture points to, obviously, your account picture, but also your name. Your name doesn't have to be the same as the name of your Microsoft account. Those parts are stored in FirstName and LastName, both of which will be overridden if DisplayName is not blank.
- \Authentication\LogonUI\Notifications\Badge contains one folder for each application that can display a notification on the lock screen. There are keys for the version, rank in the list, and what looks like a COM+ package descriptor.
- \Explorer\Advanced has settings for Windows Explorer that aren't usually accessible. Most of them seem to be Booleans, but there are some that take integers, all as a REG_DWORD. Notable are DontPrettyPath, IconsOnly, ServerAdminUI, and ShowInfoTip.
- \Explorer\BitBucket\Volume\ keeps the Recycle Bin settings for your drives, each of which gets its own folder. Each folder contains MaxCapacity, the number of megabytes your RB can hold, and NukeOnDelete, which specifies whether or not to permadelete all the time.
- \Explorer\FileExts, which might be the target of HKCR, manages the "Open With" list for each file extension. It can contain the folders OpenWithList and OpenWithProgids for each extension. In OpenWithList, MRUList is a list of characters, the key named by each of which contains one entry. OpenWithProgids contains the friendly name of the file type.
- \Explorer\Ribbon contains QatItems, an XML string stored as a REG_BINARY. It appears to be where the Explorer ribbon loads its items from.
- \Explorer\RunMRU lists the autocomplete items in the Run box, stored in a manner similar to that of OpenWithList under FileExts.
- \Policies\Explorer has a single entry, NoDriveTypeAutoRun. I'm fairly certain it will switch off auto-run for all removable drives, a wise security measure.
Sunday, November 24, 2013
Tour of Interesting Registry Places, Part I
The Windows Registry was an idea that looked really good on paper and is moderately decent in practice. Over the years, it has become a convoluted place full of no-ops, interesting structures, settings that you can't find anywhere else, and a whole lot of confusing keys. I did a little poking around there today and discovered that it is pretty awesome just to see what you can do there. Let's do a tour!
All you need is a copy of Windows! Even a fresh install should have the structure and a lot of stuff in place. To begin our tour, launch the Registry Editor by typing "regedit" in the Run box (press Windows+R). If you've had it open before, collapse the open keys to start from the beginning.
All you need is a copy of Windows! Even a fresh install should have the structure and a lot of stuff in place. To begin our tour, launch the Registry Editor by typing "regedit" in the Run box (press Windows+R). If you've had it open before, collapse the open keys to start from the beginning.
- HKCU\Environment contains your environment variables. An example of these is PATH. You can add REG_SZ values to allow expansion of %pathvariables% in the Address Bar.
- HKCU\Control Panel\Colors specifies the RGB colors of Windows controls in various states. They are stores as REG_SZ which consist of three numbers (red, green, blue) delimited by spaces. Adding new entries won't do anything.
- HKCU\Control Panel\Mouse contains settings that are usually configured with the Mouse dialog in Control Panel. However, you can also set the rectangle in which a second click in rapid succession will count as a double click, whether the computer will beep when the mouse is clicked, and some other interesting things I don't know about. Most are numbers stored as REG_SZ.
- HKCU\Console changes the visual properties of the command prompt. The most interesting entries are the ones beginning with "ColorTable", for they map the QuickBASIC/DOS 16 colors to RGB Windows colors. They are stored as REG_DWORD with only the last six hex digits used. Boolean flags in this folder are also REG_DWORD, simply 0x0 or 0x1.
As I continue exploring, I will write more!
Friday, November 22, 2013
Intro to Boolean Algebra: A PowerPoint
For a book presentation (on Randall Hyde's The Art of Assembly Language), I created a small PowerPoint to give an introduction to Boolean algebra. It requires some talking on stuff that's not actually on the screen, but is that not how presentations are supposed to be? Anyway, it might be useful for a CS class. It starts with the 0/1 closedness and ends with minterms and simplification.
Download Ben Nordick's Intro to Boolean Algebra
Download Ben Nordick's Intro to Boolean Algebra
Thursday, November 21, 2013
Install IIS on Windows XP without CD
IIS 6.0 is a very solid HTTP server (among a bunch of other Web-related services) that can be run on any Windows XP Pro computer. It's installation is usually pretty simple: Turn it on, put in your Windows install disc, and watch it install. However, you can't do the normal installation without your CD. After a little searching on the web, I have discovered a way by which IIS can be (legally) installed without having to track down that disc.
First, you'll need to download a disc image that contains the necessary files, for example this one for 32-bit SP2 (will work for installing IIS on SP3). Open a command prompt, navigate to the folder containing it and run it with the /extract switch with the destination folder path as an argument. An i386 folder will be created there, which will contain the files necessary to install IIS. Point the snap-in installer to that place and you'll be going!
First, you'll need to download a disc image that contains the necessary files, for example this one for 32-bit SP2 (will work for installing IIS on SP3). Open a command prompt, navigate to the folder containing it and run it with the /extract switch with the destination folder path as an argument. An i386 folder will be created there, which will contain the files necessary to install IIS. Point the snap-in installer to that place and you'll be going!
Subscribe to:
Posts (Atom)