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

Discussion in 'Mod Discussion' started by ljfa, Jan 8, 2015.

  1. xTordX

    xTordX New Member

    POST UPDATES HERE TOO GOD DAMMIT!
    @ljfa
     
  2. ljfa

    ljfa New Member

    Alright ^^
    But not before I pour this bucket of water over your head :p
     
  3. xTordX

    xTordX New Member

    Brrrring-it-own!
     
  4. ljfa

    ljfa New Member

    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
     
  5. xTordX

    xTordX New Member

    What stuff?

    Also, are ice shards a good idea?
     
  6. ljfa

    ljfa New Member

    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.
     
  7. xTordX

    xTordX New Member

    Delete the placeWater code there and do a simple dropItem
     
  8. Strikingwolf

    Strikingwolf New Member

    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
     
    ljfa and xTordX like this.
  9. ljfa

    ljfa New Member

    Oddly enough, ice only reverts to water when it has some block underneath it.
     
  10. CoolSquid

    CoolSquid New Member

    The Minecraft code is full of bad practice, a bit more won't hurt.
     
  11. Strikingwolf

    Strikingwolf New Member

    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
     
    Lethosos and SatanicSanta like this.
  12. Strikingwolf

    Strikingwolf New Member

    Just to make the problem more complicated right :p
     
  13. xTordX

    xTordX New Member

    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?
     
  14. Strikingwolf

    Strikingwolf New Member

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

    Padfoote Brick Thrower Team Member Forum Moderator

    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.
     
    xTordX likes this.
  16. Strikingwolf

    Strikingwolf New Member

    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
     
  17. Padfoote

    Padfoote Brick Thrower Team Member Forum Moderator

    Not needed. It would be vMC ice until placed, at which point it's changed to this other ice.
     
  18. Strikingwolf

    Strikingwolf New Member

    Ah I understand your point then. That does seem to be an optimal solution
     
  19. ljfa

    ljfa New Member

    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.
     
  20. Strikingwolf

    Strikingwolf New Member

    You wouldn't replace it. It would just change the block upon being placed. Then you craft shards back into regular ice.
     

Share This Page