Skip to content

Instantly share code, notes, and snippets.

@BomBardyGamer
Last active April 20, 2022 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BomBardyGamer/fa9040fbf72f4c36b3b75437f364e799 to your computer and use it in GitHub Desktop.
Save BomBardyGamer/fa9040fbf72f4c36b3b75437f364e799 to your computer and use it in GitHub Desktop.
Krypton proposed changes

API Changes:

  • Remove wrapped field from AdventureMessage.
  • Remove many methods from GameProfile - not required.
    • Possibly remove with - use toBuilder to convert to a builder and edit in bulk.
    • Remove withName - changing the name of a GameProfile is hardly ever going to be required.
    • Remove withUUID - changing the UUID of a GameProfile is hardly ever going to be required.
  • Remove ProfileCache and replace with ProfileProvider - removes dependency on modified vanilla names, and removes the requirement for implementations to need a cache for GameProfiles.
  • Remove many implementation details and unclear fields from Block.
    • Remove id and stateId - unstable network IDs, subject to change, huge implementation details.
    • Remove speedFactor and jumpFactor - unclear, used to do specific calculations, implementation details.
    • Remove isSolidBlocking and isReplaceable - unclear, implementation detail.
    • Remove lightEmission, hasDynamicShape, useShapeForOcclusion, propagatesSkylightDown, lightBlock, isConditionallyFullyOpaque, isSolidRender, hasLargeCollisionShape, and isCollisionShapeFullBlock - implementation details used for light.
  • Rearrange the order of BlockFace constants to align with natural order - current order doesn't make sense, as it's an implementation detail.
  • Remove PushReaction and RenderShape and related fields - implementation detail.
  • Remove isValid from BlockEntity - implementation detail.
  • Make world of BlockEntity be non-null - it being null is a broken implementation detail.
  • Remove isAscending from RailShape - not required.
  • Remove isConnected from RedstoneSide - not required.
  • Replace the properties map of PropertyHolder with something that makes more sense, and isn't reliant on implementation details.
  • Address the issue of different properties with the same name but different ranges in Properties.
  • Make BrigadierCommand an interface in the API for consistency with the rest of the API.
  • Assess whether name of Sender being a Component is a good idea.
  • Assess whether having a separate concrete type for each particle type is a good idea.
    • Particles should probably not be built using a builder retrieved from the type.
  • Assess everything that is exposed by all entities and determine whether they are necessary.
  • Rework the event API to be more unique, and also better support different execution scopes.
  • Remove id and stateId from Fluid - unstable network IDs, subject to change, huge implementation details.
  • Rename colors in FireworkEffect to primaryColors
  • Remove all fromId functions from enum classes - implementation details.
  • Remove eatingSound and drinkingSound from ItemType - implementation details.
  • Review the ResourceKey and Registry API and remove a lot of unnecessary vanilla Minecraft and implementation details.
  • Review the services system and decide whether more things should be services, such as authentication.
  • Look at possibly introducing a CustomStatistic, to differentiate custom statistics from regular Keys.
  • Remove StatisticFormatter and related fields/methods - not necessary, implementation detail.
  • Clarify/rename fields in Statistic - value is actually the type that the statistic applies to, not to be confused with the actual value of the statistic, which is per player.
  • Clarify what User actually is - current wording suggests it can represent an online or offline player, but a user is actually the representation of a player's persisted data.
  • Potentially rework the ban API to remove it from vanilla attachment, and allow it to better be used and hooked in to by third-party ban plugins.
  • Reorder the Direction enum constants to match natural ordering.
  • Consider whether StringSerializable fits in the API at all.
  • Rework AmbientMoodSettings to remove implementation details, such as tickDelay, blockSearchExtent, and offset - consider alternatives that still allow modification of client calculations, but don't expose what is actually going on.
  • Rework AmbientParticleSettings to avoid needing to provide ParticleData directly.
  • Rework BiomeEffects to remove implementation details - consider alternatives that still allow modification of client calculations, but don't expose what is actually going on.
  • Remove GrassColorModifier, Precipitation, and TemperatureModifier if possible - replace with alternatives that still allow the features provided, but remove the implementation details.
  • Remove lastUpdate from Chunk - implementation detail.
  • Rework the DamageType API to feel less vanilla, and include less implementation details.
    • Possibly make DamageType the actual type of damage, e.g. fire, magic, projectile, etc.
    • Possibly add a new DamageSettings that allows one to configure what the source actually damages.
    • Possibly allow users to calculate damage themselves by using a DamageCalculator, or similar.
    • Possibly even allow users to override the entire damage system and do all the damage calculations themselves through a damage service.
  • Rework DimensionEffect, which purely exists for access to the settings, and doesn't actually affect anything.
  • Remove canBuild from GameMode - used in internal calculations, implementation detail.
  • Remove folder and dimension from World - implementation details.
  • Review whether difficulty and gameMode in World make any sense.
  • Remove the rain and thunder settings from World - replace with better Weather API.
  • Review the getChunkAt/getChunk mess - having both types that use different types of coordinates, with no way to ensure the correct coordinates are entered is confusing and error prone.
  • Remove the force parameter from unloadChunk - implementation detail.
  • Remove the ResourceKey<World> constants from World - implementation details.
  • Possibly rework parts or all of the World system to remove the details on dimensions, and how worlds can be linked with other worlds, and also part of a heirarchy.
  • Remove save from WorldManager - saving is an implementation detail that assumes all worlds are saved on disk, which may not always be the case.
  • Make the Krypton object internal - should only be used internally.
  • Remove isStable from Platform - variable, ambiguous as it depends on platform, implementation detail, and not necessary.
  • Remove dataPackVersion from Platform - Krypton doesn't even have data packs, let alone this being an implementation detail.
  • Move a few server settings to a new ServerSettings type, specifically maxPlayers, motd, isOnline, and address.
  • Create an abstraction over Spark to make it an implementation detail, rather than part of the API.

Server changes:

  • Rewrite anything that was outright stolen from vanilla Minecraft. Seriously. It all needs to go.
    • Look at Minestom and other server projects for help on replacements.
  • Rework KryptonProfileCache to fit the ProfileCache -> ProfileProvider change, and also stop using usercache.json, which is something we really don't need.
  • Try and rework a lot of the built-in arguments, so they take less from vanilla, and more from the wiki.
  • Try and split entity logic in to separate parts, to avoid God objects.
  • Rework the whole item handling system to remove vanilla parts, and clean it up.
  • Try and use Guice much more on the backend.
  • Rewrite the entire LegacyQueryHandler, as it's a mess, and also can likely fire ping events when the server list ping API exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment