Discussion in 'Mod Discussion' started by ljfa, Jan 8, 2015.
POST UPDATES HERE TOO GOD DAMMIT!
But not before I pour this bucket of water over your head
Version 1.3.1 is out with small changes:
Tweaked glass break speed, it now takes Efficiency enchant into account
Removed some unused code
Minor internal changes
Also, are ice shards a good idea?
You'll see soon enough ^^
Maybe. I already thought about this and I might make an addon there. It might be a bit problematic as ice normally turns into water when broken.
Delete the placeWater code there and do a simple dropItem
Not as simple as that
That is core MC code. Thus you would either need to do ASM into the ice, which is bad practice. Or cancel the break event when you get it after you drop an item. That makes all other mods targeting breaking ice and then something happening break. Thus a more clever solution then these two is probably best
Oddly enough, ice only reverts to water when it has some block underneath it.
The Minecraft code is full of bad practice, a bit more won't hurt.
While the beggining of this statement is true. I believe that as developers we should try to make our code as good as possible. Especially in a large community of devs like this one where it is not guranteed that everyone is communicating. Using good practice will allow two things
Better understanding of mod code among developers thus allowing us to share ideas about how to solve certain problems
Better working code due to less crashes and more inter-mod compatibility.
The fact is that at times bad practice is the only way you can do something. However, we should always strive to make our code better for everyone's sake
Just to make the problem more complicated right
Well maybe juat add a drop when it breaks and leave it turning into water? It wouldn't hurt.
How ice shards would work (to make it balanced) :
-very small chance of drop when broken
- 9 ice shards make an ice "lump" which then needs to be crafted in a 3x3 grid once again with a snow block in the middle. That would result in a single ice block.
You can turn water into ice. Thus you would get 1 ice + the shards dropped. Infinite loop right there :S
Or have it setup to change ice into another block that is only different in the code when it's placed by a player. This allows for everything to work as before except when placed as a player, as that would then drop items.
I've seen it done the way I mentioned before but to deal with finite water. Wouldn't be hard to change it for items.
That would be a good solution. You would need to oredict your ice to MC's ice so that it would be compatible with other mods. The rest is good
Not needed. It would be vMC ice until placed, at which point it's changed to this other ice.
Ah I understand your point then. That does seem to be an optimal solution
I have to look into these options. I don't really want to replace vanilla ice though.
I would also be adding a way to get packed ice.
You wouldn't replace it. It would just change the block upon being placed. Then you craft shards back into regular ice.