Coder Social home page Coder Social logo

mcpconfig's Introduction

MCPConfig

Public facing repo for MCP SRG mappings.

This is NOT intended for end users to use. This is NOT a replacement for MCP. This will NOT allow you to make Mods. DO NOT ASK. This is ONLY intended for making part of the process of updating MC obfuscation mappings public. As well as publishing those mappings to the Forge Maven so that others may access them in a standard way.

License

The data contained here is released under a modified zlib license. The brands and names of the project and packages are still reserved. This means you are allowed to create and publish derivative works. However, those publications must be done under a different group and name. This is intended to prevent conflicting mappings from being published as that does nothing but hurt stability. We also appreciate if you give acknowledgement or credits in someway. But this is not required.

How to Use:

This is INTENTIONALLY not holding your hand because this is a powerful tool that if used incorrectly can cause a lot of issues. Spend a few minutes reading the gradle and you can figure things out. If you wish to work on MCPConfig, and know what you are doing. You are free to join the #mcpconfig channel in the Forge discord and discuss it there.

mcpconfig's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mcpconfig's Issues

Fernflower, Mergetool and Renametool don't apply jvmargs

The following jars allow specifying jvmargs in the config.json file, but do not apply them when running the task. Especially for fernflower this might be rather important.

This could probably be solved by adding jvmArgs <config>.jvmargs to the respective taks, for example

task renameClient(type: RemapJar, dependsOn: [downloadRenameTool, downloadLibraries, filterClient]) {
    jar downloadRenameTool.dest
    // Use jvmargs
    jvmArgs RENAMETOOL.jvmargs
    input filterClient.archivePath
    mappings file(PATH_VERSION + 'joined.tsrg')
    args RENAMETOOL.args
    dest file(PATH_CACHED_VERSION + project.version + '.client.mapped.jar')
}

Support for CSV mapping files

Since there is currently no support for CSV mapping files I created the project [removed]. The README file should hopefully explain it a little bit (might not display correctly at the moment because Github has some issues).

Let me know if there is interest in using the project or parts of it for MCPConfig.

Fernflower should be started with increased max heap space

Currently when running gradlew it appears that fernflower has only the default maximum heap space of about 1GB. At least for Minecraft 1.13.1 this is too less and causes

  • Empty source files
  • Empty method bodies
  • Slow execution because the GC is busy trying to free memory

This could be solved by changing the config.json to specify -Xmx2G as JVM argument (depends on #24).

ClippingHelperImpl -> ClippingHelper

  • net/minecraft/client/renderer/culling/ClippingHelperImpl -> ClippingHelper

ClippingHelperImpl was previously extending ClippingHelper, but ClippingHelper got removed in 1.15 so there is not really any reason to have the "Impl" suffix anymore

Give "parent" blocks their own package

All classes in the list are in net/minecraft/block/ and i propose moving them to net/minecraft/block/parents/ (although the "parent" name can change)

  • Abstract_* (anything prefixed with Abstract)
  • StemGrownBlock
  • SpreadableSnowyDirtBlock
  • RedstoneDiodeBlock
  • HorizontalBlock
  • DirectionalBlock
  • ContainerBlock

A name change was proposed in #78 so putting it here so it is not forgotten just in case

  • AbstractCoralPlantBlock

These classes are not abstract but never created directly in vanilla

  • FourWayBlock
  • SixWayBlock
  • HorizontalFaceBlock
  • FallingBlock

Coral Stuff

  • net/minecraft/block/CoralFinBlock -> LivingCoralFanBlock
  • net/minecraft/block/AbstractCoralPlantBlock -> CoralPlantBlock
  • net/minecraft/block/CoralPlantBlock -> LivingCoralPlantBlock
  • net/minecraft/block/DeadCoralWallFanBlock -> CoralWallFanBlock
  • net/minecraft/block/CoralWallFanBlock -> LivingCoralWallFanBlock

To better identify all the different coral blocks. See MCPConfig google sheet for more details

ExtractInheritance Gradle task annotations might be ignored

According to the Gradle documentation of the annotations InputFile and OutputFile the annotations used for the ExtractInheritance task might be ignored:

This annotation should be attached to the getter method in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

Therefore the annotations for the fields input and dest should probably be moved to the respective getters instead.

However, I am not that familiar with Gradle and since version 4.8.1 is used and the docs are for 4.10.2, I am not sure if this really applies. Therefore it would be good if someone with more experience could confirm and change it if necessary.

Use of 4 spaces for indentation

Currently fernflower uses the default value of 3 spaces for indentation. What do you think about changing it to 4 spaces using the argument ind?

Endless Loop in ModelBackery if model errors exist

[First reported in forge discord by Gegy)
It seems due to a decompiler bug, that ModelBakery spins indefinitly if there are any model errors (which is really bad for modders). Decompiled using ForgeFlower:

                  if (flag) {
                     Iterator iterator = map.entrySet().iterator();

                     while(true) {
                        if (!iterator.hasNext()) {
                           ;
                        } else {
                           Entry<ModelResourceLocation, BlockState> entry = (Entry)iterator.next();
                           IUnbakedModel iunbakedmodel1 = map1.get(entry.getValue());
                           if (iunbakedmodel1 == null) {
                              LOGGER.warn("Exception loading blockstate definition: '{}' missing model for variant: '{}'", resourcelocation1, entry.getKey());
                              iunbakedmodel1 = this.field_217849_F.get(MODEL_MISSING);
                           }

                           this.putModel(entry.getKey(), iunbakedmodel1);
                        }
                     }
                  }

Using idea to decompile it shows another code:

                    } finally {
                        if (var24) {
                            if (flag) {
                                Iterator iterator = map.entrySet().iterator();
                                while(true) {
                                    while(true) {
                                        if (iterator.hasNext()) {
                                            Entry<ModelResourceLocation, BlockState> entry = (Entry)iterator.next();
                                            IUnbakedModel iunbakedmodel1 = (IUnbakedModel)map1.get(entry.getValue());
                                            if (iunbakedmodel1 == null) {
                                                field_177603_c.warn("Exception loading blockstate definition: '{}' missing model for variant: '{}'", resourcelocation1, entry.getKey());
                                                iunbakedmodel1 = (IUnbakedModel)this.field_217849_F.get(field_177604_a);
                                            }
                                            this.func_209593_a((ResourceLocation)entry.getKey(), iunbakedmodel1);
                                        }
                                    }
                                }
                            }
                        }
                    }

Maybe MinecraftForge/ForgeFlower#38 can fix this issue.

TallgrassFeature -> VillageConfig

Looking through the mappings, I saw that there is class TallgrassFeature and class TallGrassFeature. The following snippet from net.minecraft.world.gen.feature.Feature suggest that TallgrassFeature should be VillageConfig (or something like that).

public abstract class Feature<C extends IFeatureConfig>
{
    public static final ArrayList<Biome.SpawnListEntry> field_202327_e = Lists.<Biome.SpawnListEntry>newArrayList();
    public static final Structure<TallgrassFeature> field_202328_f = new VillageStructure();
    public static final Structure<MineshaftConfig> field_202329_g = new MineshaftStructure();
    public static final Structure<WoodlandMansionConfig> field_202330_h = new WoodlandMansionStructure();
...
}

Biome class name typo and some renames suggested.

Not actually sure if this is where to submit name changes for classes, or if you're still accepting name change requests. ¯\_(ツ)_/¯

Typo in joined.tsrg:
baj net/minecraft/world/biome/SnoowyTiagaHillsBiome
should be SnowyTaigaHillsBiome typo in Snowy and Taiga

And some suggested renames to remain alphabetical with the obfuscated names:
OceanColdBiome -> ColdOceanBiome
OceanColdDeepBiome -> DeepColdOceanBiome
OceanFrozenDeepBiome -> DeepFrozenOceanBiome
OceanLukewarmDeepBiome -> DeepLukewarmOceanBiome
OceanWarmDeepBiome -> DeepWarmOceanBiome
OceanLukewarmBiome -> LukewarmOceanBiome
MountainsBiome -> MountainBiome OR MountainEdgeBiome -> MountainsEdgeBiome
MushroomFieldsBiome -> MushroomFieldBiome OR MushroomFieldShoreBiome -> MushroomFieldsShoreBiome
OceanWarmBiome -> WarmOceanBiome

Renaming oceans would be consistent with some other names of current ocean classes:
DeepOceanBiome
FrozenOceanBiome

If there's a better place to suggest changes like this I'd love to know. :)

LeavesFix.java error

I have generated the source for MC 1.13.1 and have applied most patches, yet I come across an error in
net.minecraft.util.datafix.fixes.LeavesFix.java

The error is on line 246 (for me) and is in the following function:
private int func_208459_d(int p_208459_1_)

Eclipse states that the "type Dynamic does not define getStringValue(Object) that is applicable here." I myself have little experience with patching Minecraft code, so I could not figure out how to fix the error alone.

If anybody has a fix for this, it would be most helpful.

Matrix3f, Vector3f client -> common

Matrix3f and Vector3f have lost their class-level @onlyin annotations.

Additionally, C_1000_c (current suggested name: net/minecraft/util/Orientation) has references to protected fields in Matrix3f, indicating that it shares the same package as Matrix3f, Vector3f has similar references.

Create net/minecraft/block/behaviour package

For stuff that determine/help block behaviour, such as interfaces like IGrowable.

These classes are in net/minecraft/block/ and should move to net/minecraft/block/behaviour/

  • IBeaconBeamColorProvider
  • IBucketPickupHandler
  • IGrowable
  • ILiquidContainer
  • ITileEntityProvider
  • IWaterLoggable
  • WoodType
  • WallHeight
  • RailState
  • PistonBlockStructureHelper
  • BlockRenderType
  • BlockEventData

Also, would move net/minecraft/dispenser/* to net/minecraft/block/behaviour/dispenser/* since it contains all the dispenser related behaviour.

AbstractGUI -> GUIObject

Widgets inherit from AbstractGUI, but I would not consider them an actual GUI. GUIObject seems more encompassing and a bit clearer. At first, I thought only Screens and such inherited from AbstractGUI, since they are GUIs.

Class renames

The ChunkGeneratorType class (and also the names in the Buffet GUI) gives us names for the chunk generator classes:

static {
    SURFACE = registerChunkGenerator("surface", ChunkGeneratorOverworld::new, Settings.SURFACE, true);
    CAVES = registerChunkGenerator("caves", ChunkGeneratorNether::new, Settings.CAVES, true);
    FLOATING_ISLANDS = registerChunkGenerator("floating_islands", ChunkGeneratorEnd::new, Settings.FLOATING_ISLANDS, true);
    DEBUG = registerChunkGenerator("debug", ChunkGeneratorDebug::new, Settings.DEBUG, false);
    FLAT = registerChunkGenerator("flat", ChunkGeneratorFlat::new, Settings.FLAT, false);
}
  • ChunkGeneratorOverworld-> ChunkGeneratorSurface
  • ChunkGeneratorEnd -> ChunkGeneratorFloatingIslands
  • ChunkGeneratorNether -> ChunkGeneratorCaves

Until 1.12, these were used only to generate the overworld/end/nether, but they should be renamed now that they've become more flexible in 1.13.

The Biome.BiomeBuilder.toString() contains names for every field in the biome builder. It seems like "rainType" is actually named "precipitation", so maybe the RainType class should be renamed to "Precipitation".

GlowStoneFeature should be changed to GlowstoneFeature, since the block is named "Glowstone" rather than "Glow Stone".

SeaPickelFeature -> SeaPickleFeature

Obviously a typo. GlowStoneFeature should be changed to GlowstoneFeature, since the block is named "Glowstone" rather than "Glow Stone".

Also, the ChunkGeneratorType class (and also the names in the Buffet GUI) gives us names for the chunk generator classes:

static {
    SURFACE = registerChunkGenerator("surface", ChunkGeneratorOverworld::new, Settings.SURFACE, true);
    CAVES = registerChunkGenerator("caves", ChunkGeneratorNether::new, Settings.CAVES, true);
    FLOATING_ISLANDS = registerChunkGenerator("floating_islands", ChunkGeneratorEnd::new, Settings.FLOATING_ISLANDS, true);
    DEBUG = registerChunkGenerator("debug", ChunkGeneratorDebug::new, Settings.DEBUG, false);
    FLAT = registerChunkGenerator("flat", ChunkGeneratorFlat::new, Settings.FLAT, false);
}
  • ChunkGeneratorOverworld-> ChunkGeneratorSurface
  • ChunkGeneratorEnd -> ChunkGeneratorFloatingIslands
  • ChunkGeneratorNether -> ChunkGeneratorCaves

Until 1.12, these were used only to generate the overworld/end/nether, but they should be renamed now that they've become more flexible in 1.13.

Edit: Biome.BiomeBuilder.toString() contains names for every field in the biome builder. It seems like "rainType" is actually named "precipitation", so maybe the RainType class should be renamed to "Precipitation".

Differentiate the two Material classes

Having two classes called simply "Material" is a recipe for confusion. They should have different names:

  • net/minecraft/block/Material -> net/minecraft/block/PhysicsMaterial
  • net/minecraft/client/renderer/model/Material -> net/minecraft/client/renderer/model/RenderMaterial

Repackaging vector math classes

In 1.15 the vanilla vector math classes (Vector3f, Matrix3f, Quaternion, etc) are much more fleshed out and deserve to be available on the server as well. This would also allow forge to drop the javax.vecmath dependency. The first step towards this is to move them into a common package.

I suggest a new package, net.minecraft.util.math.vector to house these classes.

  • net/minecraft/client/renderer/Matrix3f -> net/minecraft/util/math/vector/Matrix3f
  • net/minecraft/client/renderer/Matrix4f -> net/minecraft/util/math/vector/Matrix4f
  • net/minecraft/client/renderer/Quaternion -> net/minecraft/util/math/vector/Quaternion
  • net/minecraft/client/renderer/Vector3d -> net/minecraft/util/math/Tuple3d (not in the vector package, as it has no functionality and is just a holder for 3 doubles)
  • net/minecraft/client/renderer/Vector3f -> net/minecraft/util/math/vector/Vector3f
  • net/minecraft/client/renderer/Vector4f -> net/minecraft/util/math/vector/Vector4f

In addition to these, we should probably clean up the "Vec" classes. They seem to fit more with the vecmath types,

  • net/minecraft/tuil/math/Vec2f -> net/minecraft/util/math/vector/Vector2f
  • net/minecraft/util/math/Vec3d -> net/minecraft/util/math/vector/Vector3d

but Vec3i is for a position, not a vector. I think it should be renamed to match this (and BlockPos).

  • net/minecraft/tuil/math/Vec3i -> net/minecraft/util/math/Pos3i

Palette class names are not suffixed

These were applied with the suggested names from before the suffix change.

  • net/minecraft/util/palette/PaletteArray -> ArrayPalette
  • net/minecraft/util/palette/PaletteHashMap -> HashMapPalette
  • net/minecraft/util/palette/PaletteIdentity -> IdentityPalette

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.