[1.7.10, 1.8.9, 1.9] Glass Shards and Ice Shards

ljfa

New Member
Jul 29, 2019
2,808
0
0
Version 1.3.1 is out with small changes:
  • Tweaked glass break speed, it now takes Efficiency enchant into account
  • Added...stuff...
  • Removed some unused code
  • Minor internal changes
 

Strikingwolf

New Member
Jul 29, 2019
3,785
0
1
Delete the placeWater code there and do a simple dropItem
Not as simple as that :p

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 :p
 
  • Like
Reactions: ljfa and xTordX

ljfa

New Member
Jul 29, 2019
2,808
0
0
Oddly enough, ice only reverts to water when it has some block underneath it.
 

CoolSquid

New Member
Jul 29, 2019
1,971
0
0
Not as simple as that :p

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 :p
The Minecraft code is full of bad practice, a bit more won't hurt.
 

Strikingwolf

New Member
Jul 29, 2019
3,785
0
1
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
  1. Better understanding of mod code among developers thus allowing us to share ideas about how to solve certain problems
  2. 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
 

xTordX

New Member
Jul 29, 2019
577
-1
1
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.

Balanced enough?
 

Strikingwolf

New Member
Jul 29, 2019
3,785
0
1
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.

Balanced enough?
You can turn water into ice. Thus you would get 1 ice + the shards dropped. Infinite loop right there :S
 

Padfoote

Brick Thrower
Team Member
Forum Moderator
Dec 11, 2013
5,155
5,914
563
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.

Balanced enough?
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.
 
  • Like
Reactions: xTordX

Strikingwolf

New Member
Jul 29, 2019
3,785
0
1
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
 

Padfoote

Brick Thrower
Team Member
Forum Moderator
Dec 11, 2013
5,155
5,914
563
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.
 

ljfa

New Member
Jul 29, 2019
2,808
0
0
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.
 

Strikingwolf

New Member
Jul 29, 2019
3,785
0
1
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.