Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

collapse

Author Topic: Thoughts on Minecraft 1.13  (Read 490 times)

CodeCrafter47

  • Administrator
  • Hero Member

  • Offline
  • *****

  • 521
  • Reputation:
    +131/-2
    • View Profile
Thoughts on Minecraft 1.13
« on: January 20, 2018, 06:27:24 AM »
Hello everyone,

I've been looking at the latest snapshot, and thought a bit about the implications it has for Rainbow. There are lots of technical changes which are not really in line with our API. The greatest impact is caused by the removal of block ids and item ids. That is bad since numeric ids are just how Rainbow plugins identify blocks and items. The way I see it we have three options going forward:

  • Don't update Rainbow to 1.13
    This means there won't be any versions of Rainbow supporting Minecraft 1.13 and beyond. It doesn't mean this website, the source code or the downloads are going to disappear. These resources will remain available online indefinitely (or for a very long time).
  • Implement our own ID -> Block/Item mapping
    Implementing our own ids allows plugins to continue to function (more or less), despite of the changes in the underlying Minecraft server code. While this keeps old plugins functional it increases the distance between the Minecraft code and our API, also there will be issues, mostly concerning newly added blocks.
  • Change the Rainbow API to no longer use magic numbers
    This way the changes are reflected in the API giving plugins full access to all features, but breaking compatibility with old plugins. I kind of dislike this solutions, it's like re-inventing the wheel. Both Sponge and Spigot already provide APIs not relying on magic numbers.
Any opinions welcome. I'd love to hear some of your opinions before making any decision.

BlackScorpion

  • Full Member

  • Offline
  • ***

  • 206
  • Reputation:
    +22/-2
  • Personal Text
    Loving Rainbow 1.8 + 1.9 + 1.10
    • View Profile
Re: Thoughts on Minecraft 1.13
« Reply #1 on: January 20, 2018, 04:00:58 PM »
Honestly, we should be moving forward with Minecraft, why not do like Sponge and spigot did? Would this be a big undertaking?

UnknownUser500

  • Member

  • Offline
  • *

  • 31
  • Reputation:
    +1/-0
  • Personal Text
    Who am I?
    • View Profile
    • My Blog
Re: Thoughts on Minecraft 1.13
« Reply #2 on: January 21, 2018, 12:36:40 PM »
Not number 1.

JD9999

  • Plug-in Maker
  • Hero Member

  • Offline
  • ****

  • 754
  • Reputation:
    +45/-0
    • View Profile
Re: Thoughts on Minecraft 1.13
« Reply #3 on: January 23, 2018, 05:38:41 AM »
Short answer: 2nd one much easier.

Here are my thoughts:

Lots of plugins and commands <1.13 use those block and item ids. Then again, most of those plugins aren't even updated anymore, and those that are could be easily updated to match a name only system.

On the other hand, no one wants to update 50 plugins because of one API change.

I wonder if the ID stores inside the PluginReference (ID, BlockId, ItemId) could be mapped (as your suggestion 2). I assume this would be:

<1.13
MC_Server.getBlock(int) --> minecraft.getBlock(int) --> Block --> MC_Block

to...

1.13+
MC_Server.getBlock(int) --> MC_ID.stringValue(int) --> minecraft.getBlock(String) --> Block --> MC_Block

And dependant on how well each ID has been named...

Code: [Select]
public String stringValue(int magicNumber){
String constantName = getConstantName(int); //I don't know how you could use the value to get the variable's name, or if this is the most efficient way
String blockName = constantName.startsWith("BLOCK_") ? constantName.substring(6) : constantName.substring(5);
return blockName;
}

For example, if the id was 0, the method above would realise that 0 = BLOCK_AIR, and take the BLOCK_ bit off it so that it is just AIR, which I assume would be OK.

While I'm here, there are a couple of other concerns I have:
-Data packs: This would mean Rainbow would need a way to add recipes, blocks, etc.
-New co-ordinate syntax: May have to use formatting in our FloatTriplet class, or to parse other commands for plugin compatibility

Thanks for working on this!

CodeCrafter47

  • Administrator
  • Hero Member

  • Offline
  • *****

  • 521
  • Reputation:
    +131/-2
    • View Profile
Re: Thoughts on Minecraft 1.13
« Reply #4 on: February 07, 2018, 09:29:50 AM »
Honestly, we should be moving forward with Minecraft, why not do like Sponge and spigot did? Would this be a big undertaking?
Creating an actually useful API for interacting with blocks would require quite some work. If you take a look at the part of the Sponge API for interacting with blocks you'll find that there are ton's of classes and it's awfully complex. I most certainly won't create something like that.

Not number 1.
I suggested that because I think stopping development is better than continuing while breaking all existing plugins. Without plugins Rainbow really loses the last bit of its usefulness.

Short answer: 2nd one much easier.

Here are my thoughts:

Lots of plugins and commands <1.13 use those block and item ids. Then again, most of those plugins aren't even updated anymore, and those that are could be easily updated to match a name only system.

On the other hand, no one wants to update 50 plugins because of one API change.

I wonder if the ID stores inside the PluginReference (ID, BlockId, ItemId) could be mapped (as your suggestion 2). I assume this would be:

<1.13
MC_Server.getBlock(int) --> minecraft.getBlock(int) --> Block --> MC_Block

to...

1.13+
MC_Server.getBlock(int) --> MC_ID.stringValue(int) --> minecraft.getBlock(String) --> Block --> MC_Block

And dependant on how well each ID has been named...

Code: [Select]
public String stringValue(int magicNumber){
String constantName = getConstantName(int); //I don't know how you could use the value to get the variable's name, or if this is the most efficient way
String blockName = constantName.startsWith("BLOCK_") ? constantName.substring(6) : constantName.substring(5);
return blockName;
}

For example, if the id was 0, the method above would realise that 0 = BLOCK_AIR, and take the BLOCK_ bit off it so that it is just AIR, which I assume would be OK.

While I'm here, there are a couple of other concerns I have:
-Data packs: This would mean Rainbow would need a way to add recipes, blocks, etc.
-New co-ordinate syntax: May have to use formatting in our FloatTriplet class, or to parse other commands for plugin compatibility

Thanks for working on this!
Such a mapping is certainly something I can implement. Though there will be quite a few problematic cases like wool which currently is one block with 16 "subblocks" but it 1.13 will be 16 blocks.

Regarding data-packs:
 * there is already a way to add recipes via the API (no need for change there)
 * data packs can't add blocks

The coordinate syntax is a change only in how players can interact with commands. It doesn't change how minecraft works internally. So I don't think the API needs to change because of it.

Fredashay

  • Plug-in Maker
  • Sr. Member

  • Offline
  • ****

  • 269
  • Reputation:
    +26/-1
  • Personal Text
    "Tira mah! This graw is fredashay!"
    • View Profile
    • ClockPie
Re: Thoughts on Minecraft 1.13
« Reply #5 on: February 07, 2018, 06:24:46 PM »
Anything but #1. 

- Perhaps a combination of #2 and #3 so you can use either mechanism (or both)?  I'm not sure if that's possible, though cuz I don't know the internals of Minecraft or the Rainbow API. 

- Or have two interfaces, and you choose one or the other, but that's prolly impractical cuz you'll essentially be supporting 2 versions of Rainbow, bleh.  And CodeCrafter already said that updating Rainbow is gonna be a Hurclean task.

- Or Some mechanism like what JD9999 suggested. 

- Or do #3 and then write a Rainbow/Rainbow bridge...

- Okay, I guess I vote for #2, but assign our own block IDs to the new blocks (and all the variants of wool) so we can use the new blocks. 
« Last Edit: February 07, 2018, 06:40:29 PM by Fredashay »

 

* Notifications

* Member Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Recent Topics

Re: MultiWorld doesn't load worlds properly by EdibleTortilla
[April 22, 2018, 05:23:44 PM]


MultiWorld doesn't load worlds properly by EdibleTortilla
[April 20, 2018, 08:05:05 PM]


Re: Interacting with Bungeecord by CodeCrafter47
[April 20, 2018, 03:15:05 AM]


[Request] SkinRestorer by EdibleTortilla
[April 19, 2018, 06:40:50 PM]


Re: Interacting with Bungeecord by EdibleTortilla
[April 19, 2018, 04:02:18 PM]

* Forum Stats

  • stats Total Members: 3686
  • stats Total Posts: 12322
  • stats Total Topics: 1666
  • stats Total Categories: 5
  • stats Total Boards: 16
  • stats Most Online: 568