Railcraft

Railcraft

34M Downloads

Force Track can be purchased in a Railcraft Villager Shop

MyNameIsKodos opened this issue ยท 4 comments

commented

I can successfully purchase the Force Track, as well as placing it. The first track that's placed will stay, but when I place a second one adjacent to the first, it causes a block update which forces both tracks to disappear.

commented

This should no longer be an issue.

commented

My guess would be the function adding the trades for tracks is in Railcraft/src/main/java/mods/railcraft/common/worldgen/VillagerTradeHandler.java and that it's adding all the tracks available. Maybe low hanging fruit for anyone who feels like they want to contribute.

for (EnumTrack track : EnumTrack.VALUES) {
            if (track.isEnabled())
                addTrade(recipeList, rand, 0.1F, new Offer(track.getItem(), track.recipeOutput - 2, track.recipeOutput + 2), new Offer(Items.emerald, 2, 3));
        }
commented

Add something like EnumTrack#isCraftable() to limit the presense of the track in the creative menu and trade and other survival usages?

commented

I have to rewrite this code for 1.8 anyway. Don't worry about it.

FYI, the creative menu is actually a hardcoded list of variants on all my blocks because I don't like the default sorting very much.