Better Than Wolves Source Code (Version 4.B0000003)

This sub-forum is dedicated to add-ons and texture packs for Better Than Wolves.
Post Reply
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Better Than Wolves Source Code (Version 4.B0000003)

Post by FlowerChild »

See the comment linked below for an easier method of obtaining the 4.B0000003 source code:

viewtopic.php?f=12&t=9863#p159106

- Dawn


The source code for the last release of Better Than Wolves can be downloaded here:

Download Link

Better Than Wolves and its source code are made freely available under the creative commons attribution license:

https://creativecommons.org/licenses/by/4.0/

You are free to modify and redistribute portions of BTW and its code as you wish, but I (FlowerChild) would appreciate acknowledgment if you do so. Keep in mind however that parts of BTW may be based on modified versions of Mojang's code and assets, and it is left to anyone redistributing portions of BTW to make sure they are appropriately considering Mojang's intellectual property and licensing as well.
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: Better Than Wolves Source Code

Post by dawnraider »

Woo! What an anniversary present :)

I did un into some issues applying the patch files though:

1. The patch is backwards. The patches provided would turn BTW source into vanilla, so I had to reverse the patch to make it work.
2. Numerous syntax errors showed up in ItemRenderer, GuiIngame, NetServerHandler, RenderItem, RenderPlayer, and SpawnerAnimals which appear to be related to commented out code and/or missing methods.
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Better Than Wolves Source Code

Post by FlowerChild »

Is the reverse patch a big deal or just a matter of setting a flag to apply it in the correct order?

I suspect the errors may be a result of the version of mcp being used to decompile the source being different. I didn't update mcp since one of the first 1.5.2 releases in order to avoid dealing with the mass of compile errors that would result in. It would be my guess those are the errors you are seeing now.
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: Better Than Wolves Source Code

Post by dawnraider »

No the patch being reversed is not a big deal. I figured I'd call attention to it in case you did update things but it is just one flag in eclipse to fix it so if you do not update anything then it is no problem.

I will see what I can find for old releases of mcp for 1.5.2 and see if I can get a matching version. If not I can certainly fix the errors myself given a little time.
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: Better Than Wolves Source Code

Post by FlowerChild »

dawnraider wrote: Fri Apr 09, 2021 3:58 pm I will see what I can find for old releases of mcp for 1.5.2 and see if I can get a matching version. If not I can certainly fix the errors myself given a little time.
I was just trying to find some version info within mcp. Best I could come up with was 7.51, although I don't think that covers the specific md5 used. If there's a specific number somewhere that would help, let me know before end of day and I'll look it up.
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: Better Than Wolves Source Code

Post by dawnraider »

Best I have immediately is that the last time the runtime and conf folders were modified on the version I have was April 27th, 2013. I'll dig around and see if I can get more info.
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
dawnraider
Posts: 1876
Joined: Sun Dec 11, 2011 7:00 pm

Re: Better Than Wolves Source Code

Post by dawnraider »

So a few notes about the future of what is being done with the source code:
  • The source code provided by FC is currently non-functional. Several patches fail due to differences in dev environment, so those will all need to be fixed by comparing source code to decompiled code.
  • We are going to be trying to convert the source code over to legacy fabric to make addon creation easier (since mcp sucks for modding mods, and also has an incredibly restrictive license).
  • However, fabric for 1.5.2 is not ready yet so we are first creating mappings for the decompiled VMC code to convert it to meaningful names.
  • After fabric mappings have been created and BTW has been ported to use them, we are going to modify BTW naming conventions to be consistent with fabric's naming conventions to reduce confusion.
Anyone who wishes to contribute to this effort feel free. We're still setting up some of the required things to be able to work on all this though.

Edit October 2021: Fabric is no longer being pursued currently due to the massive amount of work to get it ready making it easier to spin up our own solution
Come join us on discord! https://discord.gg/fhMK5kx
Get the Deco Addon here!
Get the Better Terrain Addon here!
Get the Vanilla Mix TP here!
Get the Conquest TP here!
User avatar
magikeh
Posts: 945
Joined: Mon Jul 04, 2011 9:57 pm
Location: Top -o- the Tower

Re: Better Than Wolves Source Code

Post by magikeh »

Here's a guide to do the setup of the BTW source code for development:

This guide will show you how to patch the BTW Sources into a decompiled 1.5.2 VMC environment using MCP and Eclipse. This guide was written using a win10 machine but can be very easily be adapted to OSX/Linux machines.
First we need to download and install a bunch of development stuff: Now we must be sure that we have everything setup and ready to go:
  1. Download BTW Source and Patches and unzip
  2. Download The last BTW version released.
  3. Download MCP751 (link from the wiki) and unzip
  4. Download the 1.5.2 VMC Client and rename it to

    Code: Select all

    minecraft.jar
  5. Download the 1.5.2 VMC Server and rename it to

    Code: Select all

    minecraft_server.jar
  6. Download and appropriately rename (remove the version numbers) the:
  7. Download the jinput natives for windows. (OSX/Linux links are on the wiki) Extract the .dll files from the jar. (I personally use 7-zip)
  8. Download the lwjgl natives for windows. (OSX/Linux links are on the wiki) Extract the .dll files from the jar. (I personally use 7-zip)
Screenshot
Show
Image

In the mcp751 folder, make a new folder in 'jars' called 'bin' and another new folder in that 'bin' folder called 'natives'.
Now we copy over all the above files to setup our MCP folder structure as follows:

Now we setup our MCP folder structure as follows:

Code: Select all

└───mcp751
    └───jars
        │   minecraft_server.jar
        │   server.properties
        │   servers.dat
        │
        └───bin
            │   jinput.jar
            │   lwjgl.jar
            │   lwjgl_util.jar
            │   minecraft.jar
            │
            └───natives
                │   jinput-dx8.dll
                │   jinput-dx8_64.dll
                │   jinput-raw.dll
                │   jinput-raw_64.dll
                │   jinput-wintab.dll
                │   lwjgl.dll
                │   lwjgl64.dll
                │   OpenAL32.dll
                │   OpenAL64.dll
Next we get to pull sounds from an existing 1.5.2 install. Simply run the minecraft launcher, create a 1.5.2 instance and run it at least once to the start menu. Then navigate to '%AppData%\Roaming\.minecraft\resources' and copy the '/resources/' folder and its contents over to '/mcp751/jars/'.

Now we get to tell minecraft how to name and texture all these BTW blocks and items that we're about to patch in. We need to get a bit old school and directly mod the jar files here.
  • Copy the following folders and their contents from BTWMod4-B0000003.zip/MINECRAFT-JAR/ into the mcp751/jars/minecraft.jar.
    • btwmodtex
    • lang
    • textures
    • title
  • Delete the META-INF folder from the mcp751/jars/bin/minecraft.jar.
  • Copy the BTWMod4-B0000003.zip/MINECRAFT_SERVER-JAR/lang folder and its contents into the mcp751/jars/bin/minecraft_server.jar.
Now we have the environment setup and ready to decompile. Run the 'mcp751/decompile.bat' file and wait 1-30 minutes for it to complete.
Screenshot
Show
Image
Now open Eclipse and point it at the '/mcp751/eclipse' folder.
Screenshot
Show
Image
When Eclipse has loaded, in the Left Panel Labeled 'Package Explorer' open 'Client > src ' and right click 'net.minecraft.src > Team > Apply Patch..'
Screenshot
Show
Image
Browse for the file located 'FCMod4-B0000003Src\Src\patch.txt' and click Next. Be sure the 'Client > src > net > minecraft > src' folder is selected then click Next.
Screenshot
Show
Image
At the top, select the 'Reverse patch' button to make all the red boo boos go away. Click Finish.
Screenshot
Show
Image
--------------------------------

Again in the Left Panel Labeled 'Package Explorer' open 'Client > src ' and right click 'net.minecraft.client> Team > Apply Patch..'
Screenshot
Show
Image
Browse for the file located 'FCMod4-B0000003Src\SrcClient\patch.txt' and click Next. Be sure the 'Client > src > net > minecraft > client' folder is selected then click Next.
Screenshot
Show
Image
At the top, select the 'Reverse patch' button to make all the red boo boos go away. Click Finish.
Screenshot
Show
Image
--------------------------------

Finally in the Left Panel Labeled 'Package Explorer' open 'Server > src' and right click 'net.minecraft.src > Team > Apply Patch..'
Screenshot
Show
Image
Browse for the file located 'FCMod4-B0000003Src\SrcServer\patch.txt' and click Next. Be sure the 'Server > src > net > minecraft > src' folder is selected then click Next.
Screenshot
Show
Image
At the top, select the 'Reverse patch' button to make all the red boo boos go away. Click Finish. (Getting Deja-vu yet?)
Screenshot
Show
Image


Now that the BTW patches have been applied to the VMC source we must copy over the BTW sources. In Window's File explorer:
  • Copy all the contents of 'FCMod4-B0000003Src\Src\' (except for patch.txt) to 'mcp751\src\minecraft\net\minecraft\src'
  • Copy all the contents of 'FCMod4-B0000003Src\SrcServer\' (except for patch.txt) to 'mcp751\src\minecraft_server\net\minecraft\src'

Finally to wrap everything up in a pretty little bow we must tell MCP and Eclipse that we have a baseline dev environment setup and ready to roll.

In Eclipse click 'Project > Clean..' and be sure the 'Clean all projects' box is checked before cleaning. Progress will be displayed in the bottom right hand corner of Eclipse.
Screenshot
Show
Image
Exit/Close Eclipse after it has finished cleaning/building and run the 'mcp751/recompile.bat' followed by the 'mcp751/updatemd5.bat' scripts. Further information may be found on the wiki.

:) Now go make some crazy shit!
Magical Shit
Show
Syruse|Work: i like magic shit
MagikEh: ...
MagikEh: >.>
MagikEh: <.<
»» MagikEh walks to the bathroom
Syruse|Work: hahaaaaaaaaa
Syruse|Work: wait
MagikEh: xD
Syruse|Work: fuck
Syruse|Work: NO
Syruse|Work: DONT
User avatar
Gilberreke
Posts: 4486
Joined: Thu Jul 14, 2011 3:12 pm
Location: Belgium

Re: Better Than Wolves Source Code (Version 4.B0000003)

Post by Gilberreke »

New easy method of getting access to the BTW 4.B0000003 source:

Download this zip file:
https://github.com/BTW-Community/BTW-Pu ... 000003.zip

Run the gradlew bat file and it will create an MCP folder with the source set up (takes about 5 minutes on my machine)
Come join us at Vioki's Discord! discord.gg/fhMK5kx
AeonScotte
Posts: 1
Joined: Sat Sep 10, 2022 2:47 am

Re: Better Than Wolves Source Code (Version 4.B0000003)

Post by AeonScotte »

I'm having some trouble getting BTW specific textures and resources in general to show up when test-running my mod add on in eclipse. I'm using the gradlew.bat method for decompiling and merging source code. Is there something I'm missing? The resources folder where I can see all the BTW textures is outside my working directory (BTW-Public/mcp). Any help?

(Edit:)
This is the warning I get in the console for every texture file not found:
2022-09-09 22:00:17 [CLIENT] [WARNING] TextureManager.createTexture called for file textures/blocks/fcBlockTorchIdle.png, but that file does not exist. Ignoring.
Last edited by AeonScotte on Sat Sep 10, 2022 3:04 am, edited 2 times in total.
User avatar
Sockthing
Posts: 414
Joined: Mon Jan 07, 2013 2:13 pm

Re: Better Than Wolves Source Code (Version 4.B0000003)

Post by Sockthing »

You'll need to copy the contents of the resource folder into eclipse/client/bin for them to show up in eclipse. Hope that helps!
Rob wrote:Sock-ilocks then tried the momma bear's pixel size and thought that it was just right.
BTW Community SMP Server: Discord | Sock's Crops: Thread
Post Reply