ornithemc / feather-mappings Goto Github PK
View Code? Open in Web Editor NEWMinecraft mappings for legacy versions, from indev-20091223-2 to 1.14.4
Home Page: https://discord.gg/JbRbRf62pn
License: Creative Commons Zero v1.0 Universal
Minecraft mappings for legacy versions, from indev-20091223-2 to 1.14.4
Home Page: https://discord.gg/JbRbRf62pn
License: Creative Commons Zero v1.0 Universal
C_5577922
and C_7492943
, currently named Box
and StructureBox
respectively, are two classes used to define axis aligned bounding boxes. While Box
is used in a variety of contexts like entity and block shapes, collisions, and rendering, StructureBox
on the other hand is used exclusively for structure bounding boxes.
For reference, modern mojmaps uses AABB
and BoundingBox
respectively for these classes.
Should we adopt the mojmaps convention? Stick with our current names? Or do something in between?
Minecraft Version
Anything between 1.14.4 and down to Beta, probably further but I haven't checked Alpha or below.
Type
Method
Describe where the element is
These are the methods in 1.13.2, the names and descriptors are different in older versions.
World.onBlockChanged(BlockPos, BlockState, BlockState, int)V
World.onBlockChanged(BlockPos, Block)V
Description of the element
setBlockState
on both the client and server side, depending on the given flags. On the server, the server world event listener notifies the chunk map, which will send the block change to the client. On the client, this method notifies the world renderer of the block change.neighborChanged
updates (i.e. block updates) that this block has changed . This method is called from setBlockState
if and only if the 0x1
flag is set and the world is server side.Current name
m_0384893
-> onBlockChanged
m_5170064
-> onBlockChanged
Expected name
I propose we rename the first method to sendBlockChanged
or notifyBlockChanged
. Perhaps "notify" makes the most sense considering "send" is not correct for the client side.
Type
Class
Describe where the element is
net/minecraft/client/render/texture/
Description of the element
In 1.5 and above, it describes a single texture sprite, which the game then stitches together into an atlas. However, in prior versions this class represents the entire atlas.
Expected name
TextureAtlas
Minecraft Version
beta 1.7.3
Type
Field
Describe where the element is
Entity.java
Description of the element
Sets the minimum brightness of an entity, used to make the player model in the inventory render fullbright, also acts as a fallback brightness for entities which are in unloaded areas.
Expected name
minimumBrightness
We have had some discussions on Discord about naming and style conventions, and the numerous inconsistencies in the current mappings. The style guide should be updated to include the things we discussed and then the mappings should be updated to make sure it follows these guidelines correctly.
Suggested changes/additions:
random
, not rand
.world
, not level
.parentBlockEntity
for block entities owned by screens.client
for MinecraftClient
fields.connection
for ClientConnection
fieldsTEXTURE
for static final Identifier
fields which store the main/default texture used for a model/screen/similar thing.<PREFIX>_TEXTURE
for static final Identifier
fields which store non-default/-main textures or textures which would not make sense to name with the above convention (for example INVULNERABLE_TEXTURE
in WitherEntityRenderer
or SHADOW_TEXTURE
in EntityRenderer
).MODEL
for static final Model
fields which store the main/default model of a class.<PREFIX>_MODEL
for static final Model fields which store extra/alternative models for a class, or for all models in a class where there is no clear "main" model.Abstract
prefix when naming abstract classes if possible.dir
for Direction
objects (1.8+) or ints representing any of the six possible directions.
face
when referring to a specific side of a block.facing
for ints representing cardinal directions.INSTANCE
(all capitalized, even if the field is not final).toNbt
for non static methods that convert the object to NBT.fromNbt
for static methods that take in NBT and create an object from it.writeNbt
for non static methods that take in NBT and write data to it.readNbt
for non static methods that take in NBT and read data from it.buffer
for ByteBuf
and PacketByteBuf
parameters.font
for TextRenderer
fields/parameters.Feel free to suggest other changes or additions in the comments and I will keep this post updated with the changes we agree upon.
In 1.8, the method Block#updateShape
is overloaded, and does two related, but distinct things:
The method with the signature BlockState updateShape(BlockState state, WorldView world, BlockPos pos)
updates the properties of the blockstate. For most blocks, it does nothing, but for blocks that have blockstates with "virtual properties", it resolves these properties by looking at the neighboring blocks using the WorldView
parameter. This method is used for 4 things:
ParticleManager#addBlockMiningParticles
- however, this call is redundant and does nothing, as no block mining particles are affected by any virtual propertiesDoublePlantBlock#getVariant/canBeReplaced
to resolve the VARIANT
property, because for the upper half of double plant blocks, VARIANT
is a virtual property that depends on the blockstate below it. This usage is technically also superfluous, because the virtual property of the block does not actually have to be updated.The method with the signature void updateShape(WorldView world, BlockPos pos)
instead sets the boundaries of the block by calling setShape
. The usages of this method are harder to categorize, but the major usages are as follows:
Block#rayTrace
calls it to update the boundaries of the block for raytracing a HitResult
. Blocks with multiple hitboxes, such as stairs (but not hoppers or cauldrons), override Block#rayTrace
, calling the super method multiple times, also overriding updateShape
to update the hitbox between multiple calls.Block#getOutlineShape
to call this method.A proposed renaming of these methods:
resolveVirtualProperties
- I feel this name is quite self explanatory to anybody who understands what virtual properties areupdateHitboxBounds
, or stay as is.Minecraft Version
Beta 1.7.3
Names of the field
f_9892467 in Dimension.java
Additional Context
Every place in the code where this is used is stuff that the Nether effects so I'm 99% sure this is nether related, stuff like determining if the bed should blow up or if the compass and clock should spin
Minecraft Version
1.12.2 (probably starts around 1.9, possibly earlier)
Type
Method
Describe where the element is
getName()Ljava/lang/String;
in net/minecraft/world/chunk/ChunkSource
Description of the element
It returns the debug info for that chunk source.
Current name
getName
Expected name
getDebugInfo
Currently, the Feather buildscript uses Gradle to execute all of its tasks, from running the main feather task, mapping generation, and name propagation, to downloading necessary libraries and publishing the mappings to the Ornithe maven repository. This has mostly worked, but Gradle has a tendency to time out or reset its connection randomly for no discernable reason. This was previously a really significant issue when we would publish every version in the same task sequentially, but #134 has significantly improved that situation by running every publish task in parallel, publishing up to 20 versions at a time concurrently.
This solved the issue of having to restart the whole publish task for every version if one of the versions failed, but the second time the new publish workflow was run, many versions failed to publish because the publish tasks would try to upload an artifact version that was already on the repository, because the maven-metadata.xml
file didn't have those versions listed in them. We believe the concurrent nature of the workflow is causing a race condition with reading and writing the maven-metadata.xml
file, preventing it from getting accurately updated for every version.
When thinking of ways to resolve the first issue, I had the idea of transferring most, if not all, of Gradle's workload to Pure Java Code; I shelved this idea when @Kahzerx refactored the workflow, but this race condition issue is making me consider bringing up this ussie again.
There are a couple things to consider:
maven-metadata.xml
file, until the very end.I'm getting to the point where I've written so much that I'm losing track of my thoughts, so I'll stop here, I might edit this more later. Please feel free to share your thoughts about this.
The idea is to remove the insertAutoGeneratedEnumMappings
task. This task currently runs stitchs CommandProposeV2FieldNames
to generate names from the non-stripped enum variants (at least that's what I think it does). Removing this would require us to map these enum variants ourself. This is not hard, we already do this (I think).
In for example 1.12.2 the task only replaced 16, but detected 2184 "interesting names".
In 12w30e-client it replaced 0 names, and detected 130 "interesting names".
Therefore I think we should just remove that task and simpify the building process.
In the image you can see what would be replaced: the two red arrows to and the one from the insertAutoGeneratedEnumMappings
task would be replaced with the green one that directly connects buildFeatherTiny
with v2UnmergedFeatherJar
.
Note: I plan to open a PR in the future containing that graph.
In terms of code changes:
The task to be removed is:
Lines 1079 to 1098 in e28cce1
v2UnmergedFeatherJar
task:Lines 1130 to 1140 in e28cce1
dependsOn
would need to change to buildFeatherTiny
, and def mappings
also needs to use buildFeatherTiny
.
This issue is created to discuss how much this would break, since I do not currently know how dependant the mappings are on this feature.
for the future PR: (just using this as notes for later on)
insertAutoGeneratedEnumMappings
gradle task and instead map these directly; see #142Type
Class
Describe where the element is
net/minecraft/client/render/model/entity/EnderDragonRenderer
net/minecraft/client/render/model/entity/EndermanRenderer
Expected position
net/minecraft/client/render/entity/EnderDragonRenderer
net/minecraft/client/render/entity/EndermanRenderer
Additional Context
net/minecraft/client/render/model is reserved for models, renderers, especially entity renderers, should be in net/minecraft/client/render/entity
This file is very much outdated and should be updated to list the maintainers of Feather.
Type
Field
Describe where the element is
Lnet/minecraft/client/Minecraft;paused:Z
Description of the element
Stores whether the game is running in an applet
Expected name
appletMode
Additional Context
It is unknown to me how this mapping affects other versions
Some people have brought up the topic of making a Github organization to better organize all the repositories associated with the Ornithe project, but there are a couple things that have to be ironed out at the time repository transfer occurs in order to reduce any possible issues that could arise from this, and I'd want to hear some opinions from others that have contributed to the project.
Current repositories would likely be moved to the organization would be:
After repositories are moved, we have to make sure any forks referencing this repository don't somehow break, and that git remote references to this repository are changed accordingly, and to remember to change the link pointing to the Intermediary repository.
As we are not using the so-called "cleanroom policy" that Yarn is, the contributing guidelines should be updated to reflect that.
Type
Method
Describe where the element is
Lnet/minecraft/client/render/entity/EntityRenderer;renderAreaEffectCloud(Lnet/minecraft/util/math/Box;DDD)V
Description of the element
It is used in DefaultRenderer with the first parameter set to entity.shape, this results in a white cube of the size of the hitbox being rendered. It is not used anywhere else.
Expected name
renderWhiteBox
Additional Context
beta 1.7.3
image of DefaultRenderer, whose only purpose is to invoke "renderAreaEffectCloud"
can look at both Yarn and QM for how this needs to be implemented
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.