How Mod / Code updates are made (in general)

A place to talk to other users about the mod.
Post Reply
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

How Mod / Code updates are made (in general)

Post by finite8 »

I was in the middle of a reply when the original post got locked. Therefore, to the person who asked the below question, here is my response.

--------------------------------------------------------------------------------
tundragrass wrote:How do you update a mod to a new version? do you have to go into the coding and mess with some stuff? Iam not that great at coding. Infact i dont understand it at all mainly because iam not a :ugeek: xD
I am not an expert at MC modding but i am familiar (i believe) with how it is done in a general sense.

Just like when you build it from scratch, you will have a set of classes (both static and instantiable) that allow your code to run. This includes:
(1) A set of Code that ModLoader looks for.
(2) Code for particular Items, Entities, Blocks or other programmatic Classes to be included in the game.
(3) In some cases overrides (or outright replacements) of existing code to alter the functionality of existing components.

In all cases that use Modloader, (1) is essential. For games that add new items, mobs, blocks, etc, (2) is done. For things that alter the functionality of existing elements (i.e, the old Minecart mod that makes a minecart always move at full speed), (3) must be done.

When an Update occurs, the source code is regenerated and is now different from original ones. While a decompile is a straight forward process, it will be obfusicated (http://en.wikipedia.org/wiki/Obfuscation) and thus, unreadable. The Minecraft Coders pack serves to translate this back into something we can understand and thus, make the required changes.

There is also the problem of changes to how base elements work. i.e: If Mojang change how an Item works, and a Modder has made code that adds a new item, then their item will no longer work as it doesn't match the NEW item. If you want to udnerstand this concept more, read here: http://en.wikipedia.org/wiki/Inheritanc ... ogramming)

However, in the case of (3) where the Modder has altered existing functionality, the Modder will have to look at the new/altered Methods and Classes, and in some cases painstakingly go through each line finding out where they need to re-inject their changes. In some cases, the changes may be so radical that the original code they had will not work, and they will need to figure out a new way to make it work. It is all very situational and can be very difficult. So while from the players perspective, new lighting just seems like a simple visual thing, the actual implementation may have massive ramifications on the way the Modders have done their work.

This is why we all want Mojang to supply their Modding API: an officially supported method of Modding so that changes made by the company have a reduced impact on Mods.

Therefore, the amount of work required to update a Mod will be very dependant on how significant the change is.

I hope that answers your question.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: How Mod / Code updates are made (in general)

Post by FlowerChild »

Yeah, sorry about the lock/delete but I wanted the post to remain intact and not diluted with the responses that followed.

Feel free to discuss this stuff at will here, given that I am no longer obliged to read it ;)
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: How Mod / Code updates are made (in general)

Post by finite8 »

FlowerChild wrote:Yeah, sorry about the lock/delete but I wanted the post to remain intact and not diluted with the responses that followed.

Feel free to discuss this stuff at will here, given that I am no longer obliged to read it ;)
lol. Yeah, not fussed in the slightest. Just thought tundragrass would be curious with the answer.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
tundragrass
Posts: 14
Joined: Tue Jul 05, 2011 12:02 am

Re: How Mod / Code updates are made (in general)

Post by tundragrass »

Thanks for the answer! But dident Mojang say they were releaseing the Mod API out to a select group of people? I think it was on notch's blog.
tundragrass
Posts: 14
Joined: Tue Jul 05, 2011 12:02 am

Re: How Mod / Code updates are made (in general)

Post by tundragrass »

Just found it
Spoiler
Show
May
26
2011
Minecraft Beta 1.6.4
* Fixed 1.6.3 using more CPU despite it claiming to use less
* Totally professional

posted 1 month ago
.May
26
2011
Minecraft Beta 1.6.3
THREE bug update releases today!

I highly recommend you update both your servers and your clients.

1.6.3:

+ The renderer is now capped at 100 fps while there are chunks to be generated. The excess time will be spent generating chunks instead of rendering frames
+ The “limit framerate” option now limits the game to 40 fps and will spend at least 10 ms per frame sleeping
+ The “limit framerate” option has been reset to “off” for all players, enable it again if you want it
* Fixed some block updates not updating lighting properly under some circumstances by reverting the “don’t always send block data” fix in 1.6
* Fixed a major CPU load issue in the server where a very tight loop would starve all other threads
* Fixed furnaces dropping/duplicating their contents when they change state from lit to unlit or back

1.6.2:

* Fixed an ACTUAL item duplication bug while picking up some items

1.6.1:

* Fixed a visual item duplication bug when trying to pick up items while the inventory is full

posted 1 month ago
.May
26
2011
Minecraft Beta 1.6
This update requires both a client and a server update.

Changelist:

1.6:

New features:
+ Added Nether support to multiplayer
+ The client will ask minecraft.net if the current login is valid. If the server says “no”, a warning message appears in the client. You can still play the game even if this happens.
+ Added craftable maps
+ Added hatches
+ Added tall grass in some biomes
+ Mushrooms now spreads (very) slowly
+ Added server property view-distance. Sets the radius of terrain updates (in chunks) to send to the players. Range 3-15, default 10.
+ Added dead shrubs in deserts
+ Added allow-nether (set to true or false) in server.properties
+ Blocks destroyed by other players in multiplayer now shows the breaking block particle effect
+ Doors make sound for other players in multiplayer
+ The record player now supports more than 15 different songs (you can’t get the records yet, though)
+ Activated dispensers make sounds and trigger particles in multiplayer
+ Players stuck in walls will slide towards the nearest gap if there is one

Changes:
* Disabled Advanced OpenGL until we can fix some bugs with it
* It’s no longer possible to build solid blocks on the top layer of the maps (sorry!)
* Made booster tracks speedier
* Severely nerfed fire so it spread slower, and doesn’t spread infinitely
* Seeds are now found in tall grass, using a hoe on the ground no longer works
* Compressed network traffic more agressively
* Blocks that don’t change appearance when the data changes don’t send block updates when their data changes now
* Arrows shot by players can now be picked up by all players
* Nothing riding anything or being ridden by anything can enter portals

Bugfixes:
* Fixed running out of memory corrupting the current level
* Fixed the side textures of grass getting extra dark when mining them
* Fixed anaglyph 3d rendering mode having severe visual bugs
* Fixed the crash screen vanishing immediately
* Fixed not being able to target blocks when at x or z pos 1000
* Fixed the achievements screen messing up the sky color
* Fixed saving while sneaking dropping the player through the ground
* Fixed a system clock change messing up the game speed
* Fixed rain sounds not playing with fast graphics enabled
* Fixed hair and cloaks being rendered in the wrong locations on sneaking players
* Fixed the attack/swing animation not being applied to the armor layer
* Fixed player rotation not being loaded correctly when loading a saved game
* Fixed arrow physics, making them not get stuck midair when you open a door
* Fixed arrows hitting reeds, portals, and other non-solid blocks
* Fixed keybindings not getting saved properly under certain conditions
* Fixed the player not being able to sneak off lowered blocks like cacti
* Fixed a bug where the player could mine without swinging their arm
* Fixed boats placed on snow being placed too far up
* Fixed submerged boats rising very very fast
* Fixed sand dropping onto boats getting stuck in a falling animation
* Fixed a game crash when riding a vehicle or animal into the nether
* Fixed falling while riding not dealing damage to the rider
* Fixed buttons and levers too close to the player being impossible to use
* Fixed dispensers shooting through walls
* Fixed fire hurting through wall corners
* Fixed entities reaching water through wall corners
* Fixed placing doors next to cacti creating half-doors
* Fixed buttons and levers being placeable on leaves in “fast graphics” mode
* Fixed furnaces and dispensers not dropping their contents when destroyed
* Fixed dispensers biasing later slots
* Fixed farmland taking too long to dig
* Fixed tilling below some blocks being possible
* Fixed tilling the underside of blocks somehow working
* Fixed fences and stairs sometimes becoming invisible
* Fixed walking on top of fences not producing step sounds
* Fixed fire sometimes existing mid-air as an invisible block of pain
* Fixed fences and wooden stairs not being flammable
* Fixed fire effect on burning entities sometimes getting rendered in the wrong location
* Fixed fishing rod rendering being a bit lacking
* Fixed fishing rods being stackable
* Fixed mining glass hiding the clouds behind the glass
* Fixed rain falling through liquids
* Fixed items in glass blocks not getting ejected properly
* Fixed water interacting strangely with glass
* Fixed glass not blocking rain sound
* Fixed fences and signs preventing grass from growing
* Fixed rain and snow being incorrectly lit
* Fixed grass staying alive below stair blocks
* Fixed the achievement screen not pausing the game
* Fixed some screens breaking the sky tint color
* Fixed fullscreen mode switching causing mouse issues and screen closes
* Fixed chat messages surviving through game switches
* Fixed ice so it regenerates regardless of whether it’s snowing or not
* Fixed rain falling too slowly
* Fixed levers being placeable on weird locations
* Fixed floor levers sometimes not delivering a signal downwards
* Fixed floor levers sometimes not being removed when the floor is removed
* Fixed rail tiles sometimes not properly connecting to a new neighbor
* Fixed minecarts next to each other causing extreme velocities (sorry!)
* Fixed wolves not following their owner if the name has different caps
* Fixed creepers retaining charge level when they can’t see their target
* Fixed dying in the nether spawning new portals
* “Fixed” beds in the nether
* Fixed inventory acting weird when portaling by making the portal close all screens
* Fixed wooden pressure plates being mined with pickaxes
* Fixed redstone repeaters having the wrong particles
* Fixed saplings being plantable through snow onto non-grass blocks
* Fixed ore density varying per quadrant from the center of the world
* Fixed dispenser graphics being one pixel off. ONE PIXEL!!!
* Fixed mushrooms spawning everywhere during nights
* Fixed animals only spawning near light during the night
* Fixed the multiplayer join screen input field being too short
* Fixed IPv6 addresses being parsed wrongly. To connect to a specific port in IPv6, use the format [1234:567::1]:25565
* Fixed network packets being sent unbuffered, causing huge amounts of packets being sent
* Fixed entity positions going out of synch sometimes. They get re-synched every 20 seconds now.
* Fixed inventory icons not animating after being picked up in multiplayer
* Fixed mushroom soup not leaving a bowl in multiplayer
* Fixed entities above the map height limit becoming invisible
* Fixed healing not flashing the health bar in multiplayer
* Fixed arrows being animated really strangely in multiplayer
* Fixed arrows triggering too many entity move updates in multiplayer
* Fixed the compass not pointing at the spawn location in multiplayer
* Fixed fires being impossible to put out in multiplayer
* Fixed record players spawning client-side fake records in multiplayer
* Fixed records not playing for other players in multiplayer
* Fixed players spawning in the wrong location and quickly lerping to the correct location
* Fixed monsters not being visible for players with their difficulty set to peaceful
* Fixed pigs getting hit by lightning in multiplayer spawning client-side zombie pigmen
* Fixed loads of exploding tnt generating way too many particles, possibly crashing the client
* Fixed bonemeal use in multiplayer sometimes spawning fake client-side trees
* Fixed saplings sometimes spawning trees client-side in multiplayer
* Fixed weather sometimes changing client-side in multiplayer
* Fixed grasscolor.png and foliagecolor.png not being read from texture packs
* Fixed stats getting saved to different files in offline mode if the caps in the player name differ from the true spelling
* Fixed fireballs not being visible in multiplayer
* Fixed ghasts’ fireing animation not being visible in multiplayer
* Fixed receiving more items than the maximum stack size sometimes causing an oversized stack in the inventory

posted 1 month ago
.May
23
2011
The changelist for 1.6
Minecraft Beta 1.6 is getting release later this week.

Here’s the changelist so far:


Read More

posted 1 month ago
.May
11
2011
Since polls are fun, here’s another one!
I personally want MinecraftCon 2011 to be in Vegas because I freaking love that place, but there’s been some feedback about how it should be elsewhere. So here’s a poll:


Where would you want MinecraftCon 2011?
Anywhere, I'll come no matter what

USA

Scandinavia

Mainland Europe

Australia

Nowhere, I'm not going

Other:

Vote
View Results
Share ThisPolldaddy.com



(If you can’t click the radio buttons, try clicking the text)

posted 1 month ago
.May
11
2011
MinecraftCon 2011 in Vegas?
We’re thinking about how to celebrate reaching the release on 2011/11/11. There’s also a significant lack of a MinecraftCon this year. Perhaps we can combine them?

So we’re thinking of perhaps setting up a MinecraftCon in Las Vegas on 2011/11/11, with all of Mojang going there, and us pushing out the final release live on stage or something. There’d be contests (costume, speed building, whatever else), Q&A sessions, parties and awesome food and such. This would be a great opportunity to both celebrate the release, and to meet the fans up close again.

It’d probably cost about 90 dollars per person, excluding hotel room and travel costs, although it’s possible we might be able to set up bulk deals with some hotel.

It’s a bit hard to guess how many people would be interested in something like this, so here’s a poll:

Would you pay 90 dollars for a MinecraftCon 2011 in Las Vegas? (hotel room and travel cost not included)
Yes, absolutely!

Maybe!

No, definitely not!

Vote
View Results
Share ThisPolldaddy.com

posted 1 month ago
.May
02
2011
Fixing bugs, enabling nether.
1.6 officially has a release date of “not soon”. The main features will be the maps, bug fixes, and now a functioning Nether in multiplayer.

Nether. In smp. Fun!

posted 2 months ago
.Apr
27
2011
The maps!
I’m currently working on 1.6, which will be mostly a bug fix update. I will be going through bug lists (including the great one on the Minecraft wiki) and fixing as many as I can. There’s no set date for the update yet as I don’t know how long it’ll take to go through the list.

The only new feature that will appear is the mapping.

When you craft a map, you will be able to somehow select how “zoomed in” you want the map to be. It will be centered on the location where you craft it, and it will fill in as you explore the land. If you go outside the edges of the map, it will stop updating, so each map is of a specific area. (like real maps!)

Here’s a screenshot of a fully zooomed in map (good for town maps, for example):



And here’s a screenshot of a fully zoomed out map:



If you drop a map and someone else picks it up, they will be able to see your progress. You will also be able to (somehow) CLONE maps so that two separate map items link to the same map data. That means you can see what other players carrying the same map explores, and both you and them will show up as blinking dots or similar on the maps.

Currently, the map will only update if you’re holding it in your hands, but the map will kind of hide away when you’re looking straight forward. To see the map properly, you have to look down, thisly:



Any changes you make to the terrain will show up on the maps, but only once someone carrying the map gets near that area. In other words, you won’t magically get to see changes far away on the map.

At the moment the map doesn’t work at all in multiplayer, but that’s my next task. The code I write to support that will also be possible to reuse in the future for things like books and notes written by players, and possibly even custom paintings/hand drawn signs.

There’s a hard limit of 65536 unique maps per world, though, and I don’t think I can get around that without breaking the code very bad. I’m trying to figure out if the limit is high enough or if I should spend the time rewriting the code..

posted 2 months ago
.Apr
26
2011
The cost of the mod api
Because of overwhelming feedback, the cost of the mod api access will be 0 dollars.

Our intention wasn’t to make money off selling the access, only to ensure some level of quality. Obviously that wasn’t the most popular idea in the world. ;)

Can I go back to working on the maps now?

posted 2 months ago
.Apr
26
2011
The plan for mods
After some internal discussion and general anxiety, we’ve arrived at a
plan for supporting mods. It’s still a bit vague and the details might
change after we’ve run it by our lawyers, but here’s what we want to
do:

* Let players sign up as “mod developers”. This will cost money (edit: no longer costs money!), and
will require you agreeing to a license deal (you only need one per
mod team).
* Mod developers can download the source code from our SVN repository.
As soon as we commit a change, it will be available to all mod
developers, unobfuscated and uncensored.
* Mod developers get a unique certificate for signing their mods. This
means players can see who made what mod and choose to trust individual
developers. The cost of signing up makes sure only serious developers
have access to this certificate.

The rules of the license deal will contain:

* Mods must only be playable by people who have bought Minecraft
* You can’t sell your mods or make money off them unless you’ve got a
separate license deal with us
* The mods must not be malicious (obviously)
* We retain the right to use your mod idea and implement it ourselves
in Minecraft. This is to prevent the situation where we have to avoid
adding a feature just because there’s a mod out there that does
something similar. It’s also great for dealing with bug fixes provided
by the community.

In the long term, we hope this means people will do awesome new things
with the Minecraft engine and play around with it. We want to buy
and/or license good mods and/or total conversions and sell them
ourselves. It’s possible we might have a mod marketplace for selling
and buying mods that fans have written, or we might purchase and
integrate nice mods that fit the main theme of Minecraft.

[edit:]

Just to clear up two things:

The access cost won’t be prohibitively expensive, and if you make a good mod or something else based on the source code, it’s highly likely we will want to license it.
Last edited by sargunv on Tue Jul 05, 2011 1:41 pm, edited 2 times in total.
Reason: Put the post in a spoiler.
tundragrass
Posts: 14
Joined: Tue Jul 05, 2011 12:02 am

Re: How Mod / Code updates are made (in general)

Post by tundragrass »

Oh uhh how did that happen? well if you can pick out the spam (sorry bout that) you can see that they are giving out the mod source code if you get a deal with them. Once agian sorry about the copy/paste fail.
Danyo
Posts: 35
Joined: Mon Jul 04, 2011 11:28 pm

Re: How Mod / Code updates are made (in general)

Post by Danyo »

tundragrass wrote:Oh uhh how did that happen? well if you can pick out the spam (sorry bout that) you can see that they are giving out the mod source code if you get a deal with them. Once agian sorry about the copy/paste fail.
Yeah, they did say they were gonna give out the mod API to a select amount of modders. I'd like to bet that flowerchild is a very good contender for getting acces to it, seeing how his mod is the first and only mod that has ever been even acknowledged by notch, let alone "featured" on one of his social networking sites ( wich I think google+ is, I'm not exactly sure :P )
User avatar
FlowerChild
Site Admin
Posts: 18753
Joined: Mon Jul 04, 2011 7:24 pm

Re: How Mod / Code updates are made (in general)

Post by FlowerChild »

Danyo wrote: Yeah, they did say they were gonna give out the mod API to a select amount of modders. I'd like to bet that flowerchild is a very good contender for getting acces to it, seeing how his mod is the first and only mod that has ever been even acknowledged by notch, let alone "featured" on one of his social networking sites ( wich I think google+ is, I'm not exactly sure :P )
Maybe, but I dunno as I've never even spoken to Notch :)

Also, keep in mind that when they announced the mod api for 1.7, it was when 1.7 was still planned as the Adventure Update, not this quick "Piston Release" they just did.

In other words, I don't think the mod API yet exists, and will likely only be coming around for 1.8 (if even then).
User avatar
finite8
Posts: 587
Joined: Mon Jul 04, 2011 9:31 pm
Location: Melbourne, Australia

Re: How Mod / Code updates are made (in general)

Post by finite8 »

From how i interpret it, they are going to make the Source Code available to Modders as he felt that making a pre-defined API would do more harm to the modding community than good (creating very strict limits to what people could access and mod).

This would mean that MCP would be retired. There would however still be a need for something similar to Modloader to create a standard method to implement a Mod. Wether Mojang provide their own, or again leave that to the Modders as well (keeping Modloader in buisness) is unknown.

Therefore, it isn't really going to be an API as such. My guess is he just calls it that so the peasants know what he is referring to.
Flowerchild (IRC) wrote:I'm not trying to stop you BTW ..., I'm saying that I think you're a piece of shit...not the same thing
User avatar
RegularX
Posts: 44
Joined: Tue Jul 05, 2011 11:35 am

Re: How Mod / Code updates are made (in general)

Post by RegularX »

finite8 wrote:From how i interpret it, they are going to make the Source Code available to Modders as he felt that making a pre-defined API would do more harm to the modding community than good (creating very strict limits to what people could access and mod).

This would mean that MCP would be retired. There would however still be a need for something similar to Modloader to create a standard method to implement a Mod. Wether Mojang provide their own, or again leave that to the Modders as well (keeping Modloader in buisness) is unknown.

Therefore, it isn't really going to be an API as such. My guess is he just calls it that so the peasants know what he is referring to.
That's how I have read it as well. API is really a misnomer, it's just a mod license for the source code. Which is pretty dandy, but I think users would benefit with a real mod interface as well. But :shrug:, perhaps with time.
Post Reply