├── .gitignore ├── unmapped ├── MultiplayerLockState.c ├── ClassID.c ├── SkinAdjustments.c ├── OnHitSubcomponent.c ├── EmptyProgressHandler.c ├── PropertyDescription.c ├── ComponentDescription.c ├── AdventureSettings.c ├── CaretMeasureData.c ├── ClassroomModeNetworkHandler.c ├── RangeIndices.c ├── EntityRenderData.c ├── LayerData.c ├── AutoPlaceResult.c ├── AgentRenderData.c ├── NpcDescription.c ├── SharedLock.c ├── JumpInfo.c ├── ShulkerBodyControl.c ├── MoveInput.c ├── UniqueLock.c ├── TextMeasureData.c ├── TripodCameraDescription.c ├── IsBabyDescription.c ├── ItemIndexPair.c ├── MinecraftGraphicsPipeline.c ├── DistanceFieldCullingStep.c ├── IsTamedDescription.c ├── NullLogger.c ├── CanClimbDescription.c ├── HopperDescription.c ├── IsChargedDescription.c ├── IsIgnitedDescription.c ├── IsSaddledDescription.c ├── IsShakingDescription.c ├── IsShearedDescription.c ├── SkinPackMeta.c ├── IsStackableDescription.c ├── JumpControlDescription.c ├── IsChestedDescription.c ├── FireImmuneDescription.c ├── WantsJockeyDescription.c ├── Amplifier.c ├── DimensionConversionData.c ├── OverloadSyntaxInformation.c ├── HurtWhenWetDescription.c ├── MoveControlFlyDescription.c ├── FloatsInLiquidDescription.c ├── CanPowerJumpDescription.c ├── MoveControlSkipDescription.c ├── BurnsInSunlightDescription.c ├── MoveControlBasicDescription.c ├── SelectedSlotData.c ├── MenuPointer.c ├── MobSpawnInfo.c ├── ToastMessage.c ├── ExpandoModelElement.c ├── MoveControlSwayDescription.c ├── BehaviorTreeDefinition.c ├── CanFlyDescription.c ├── WASDControlledDescription.c ├── DownloadStateObject.c ├── EffectDisplayInfo.c ├── PushNotificationMessage.c ├── DynamicJumpControlDescription.c ├── DevAssertConsoleListener.c ├── ParticleRenderContext.c ├── AgentBodyControl.c ├── LocalConnectivitySystem.c ├── CallbackTokenCancelState.c ├── LootItemKilledByPlayerCondition.c ├── BeaconBeamSection.c ├── CachedScene.c ├── PatternEntry.c ├── AgentServerCommands.c ├── ThrownPotionEffectSubcomponent.c ├── RelativeFloat.c ├── TessellatorProxy.c ├── PhysicsComponent.c ├── AutoCompleteOption.c ├── MultiplyValueAmplifier.c ├── PendingRemovalInfo.c ├── FitDoubleXRoom.c ├── FitDoubleYRoom.c ├── ShaderColor.c ├── FitSimpleRoom.c ├── RopePointsRef.c ├── DefinitionTrigger.c ├── LegacyWorldInfo.c ├── DefaultMobSpawner.c ├── WorldMultiplayerLockState.c ├── Remapping.c ├── PurchaseInfo.c ├── RemoveOnHitSubcomponent.c ├── MinecartRideable.c ├── StringByteInput.c ├── FitSimpleTopRoom.c ├── logger.c ├── HTTPResponse.c ├── Easing.c ├── MossStoneSelector.c ├── MossyStoneSelector.c ├── RandomThreadCheckManager.c ├── PingedCompatibleServer.c ├── ScreenContext.c ├── SharedConstants.c ├── ItemTransferData.c ├── DBChunkStorageKey.c ├── DirtyTicksCounter.c ├── LootPoolTiers.c ├── PrintStream.c ├── PackErrorFactory.c ├── EnumOption.c ├── JumpControl.c ├── FetchImageParams.c ├── Music.c ├── ShiftedDurationAmplifier.c ├── MeasureResult.c ├── MinecraftGraphics.c ├── MCRESULT.c ├── ShiftedValueAmplifier.c ├── Ability.c ├── DevAssertListenerCollection.c ├── VindicationIllager.c ├── InventoryTransactionItemGroup.c ├── MouseAction.c ├── DefaultUIScreenSetupCleanupStrategy.c ├── ActivationUri.c ├── DefaultMonoscopicScreenSetupCleanupStrategy.c ├── CapacitorComponent.c ├── JStringToString.c ├── PixelCalc.c ├── Facing.c ├── DragonFireball.c ├── VariantParameterList.c └── BehaviorNode.c ├── Minecraft ├── Block │ ├── FullBlock.c │ ├── BlockSourceListener.c │ ├── BlockID.c │ ├── Entity │ │ ├── BlockEntityRenderData.c │ │ └── EndPortalBlockEntity.c │ ├── WoodButtonBlock.c │ ├── StoneButtonBlock.c │ ├── MetalBlock.c │ ├── BlockState.c │ ├── HayBlockBlock.c │ ├── GlassBlock.c │ ├── BookshelfBlock.c │ ├── ClayBlock.c │ ├── UndyedShulkerBoxBlock.c │ ├── BedrockBlock.c │ ├── RailBlock.c │ ├── MelonBlock.c │ ├── InvisibleBlock.c │ ├── LightGemBlock.c │ └── WorkbenchBlock.c ├── Command │ ├── ServerCommand.c │ ├── ClientCommand.c │ ├── HostOptionSubCommand.c │ ├── CommandContext.c │ ├── CommandArea.c │ ├── CommandVersion.c │ ├── CommandSyntaxInformation.c │ ├── CommandParameterData.c │ └── CommandOriginData.c ├── IO │ ├── IFileChunkDownloader.c │ └── ZlibFileAccessWrapper.c ├── Attributes │ ├── AttributeDescription.c │ └── AttributeBuffInfo.c ├── Level │ ├── Generator │ │ └── GUIDGenerator.c │ ├── Biome │ │ ├── RiverBiome.c │ │ ├── FilterTestBiome.c │ │ ├── MutatedBirchForest.c │ │ ├── BeachBiome.c │ │ └── StoneBeachBiome.c │ ├── Chunk │ │ ├── TagMemoryChunk.c │ │ ├── ChunkBlockPos.c │ │ └── EmptyChunkSource.c │ ├── Structure │ │ ├── MineshaftData.c │ │ └── Feature │ │ │ ├── OakFeature.c │ │ │ ├── JungleTreeFeature.c │ │ │ └── BirchFeature.c │ ├── LevelChunkPhase1Deleter.c │ └── DefaultLevelDrawSetupCleanupStrategy.c ├── Client │ ├── Sound │ │ ├── MinecraftUISoundPlayer.c │ │ └── DeferredSound.c │ └── UI │ │ ├── UIScreenContext.c │ │ └── UIComponent.c ├── Recipe │ └── MultiRecipe.c ├── Item │ ├── AutoPlaceItem.c │ ├── DataItem.c │ ├── SoundItem.c │ ├── ComplexItem.c │ ├── EmptyLootItem.c │ ├── SaplingBlockItem.c │ ├── EnchantedBookItem.c │ └── CarrotOnAStickItem.c ├── Network │ ├── RakNet │ │ ├── RakDataOutput.c │ │ ├── RakDataInput.c │ │ └── RakStringCleanup.c │ ├── Packet │ │ ├── SetTimePacket.c │ │ ├── HurtArmorPacket.c │ │ ├── RiderJumpPacket.c │ │ ├── SetHealthPacket.c │ │ ├── PlayStatusPacket.c │ │ ├── SimpleEventPacket.c │ │ ├── ServerSettingsRequestPacket.c │ │ ├── SetLastHurtByPacket.c │ │ ├── ContainerClosePacket.c │ │ ├── SetDifficultyPacket.c │ │ ├── ClientToServerHandshakePacket.c │ │ ├── SetPlayerGameTypePacket.c │ │ ├── SetCommandsEnabledPacket.c │ │ ├── ChunkRadiusUpdatedPacket.c │ │ ├── RequestChunkRadiusPacket.c │ │ ├── RemoveEntityPacket.c │ │ ├── MapInfoRequestPacket.c │ │ ├── RespawnPacket.c │ │ ├── Packet.c │ │ ├── ItemFrameDropItemPacket.c │ │ ├── SetDefaultGameTypePacket.c │ │ ├── MoveEntityPacket.c │ │ ├── EntityPickRequestPacket.c │ │ ├── CameraPacket.c │ │ └── ShowCreditsPacket.c │ └── Nbt │ │ ├── EndTag.c │ │ └── NbtIo.c ├── Renderer │ ├── DebugRenderer.c │ ├── EmptyRenderer.c │ ├── CommandBlockRenderer.c │ ├── MinecraftUICustomRenderer.c │ └── UICustomRenderer.c ├── Goal │ ├── Goal.c │ ├── WitherDoNothingGoal.c │ └── SitGoal.c ├── Utils │ ├── JavaUtil.c │ └── PacketUtil.c ├── Enchant │ ├── EnchantmentInstance.c │ ├── LootEnchant.c │ ├── FishingEnchant.c │ ├── MendingEnchant.c │ └── FrostWalkerEnchant.c ├── Entity │ ├── LargeFireball.c │ ├── SmallFireball.c │ └── ExperiencePotion.c ├── CommandBlock │ └── CommandBlockDescription.c └── Player │ └── PlayerListInfo.c ├── UnitTest ├── ClientInstanceTestInterface.c ├── FilterTestAltitude.c ├── SimpleIntFilterTest.c ├── SimpleFloatFilterTest.c ├── SimpleBoolFilterTest.c ├── EntityInCloudsTest.c ├── EntityIsMovingTest.c ├── EntityIsRidingTest.c ├── EntityOnLadderTest.c ├── EntityIsClimbingTest.c ├── EntityInLavaTest.c ├── EntityInWaterTest.c ├── EntityIsColorTest.c ├── FilterTestDaytime.c ├── EntityInCaravanTest.c ├── EntityIsImmobileTest.c ├── EntityIsSneakingTest.c ├── EntityIsVariantTest.c ├── EntityUnderwaterTest.c ├── FilterTestDifficulty.c ├── FilterTestClock.c ├── FilterTestMoonIntensity.c ├── FilterTestBrightness.c ├── FilterTestBiomeHumid.c ├── FilterTestBiomeSnowCovered.c ├── FilterTestMoonPhase.c ├── FilterTestTemperatureType.c ├── FilterTestTemperatureValue.c ├── EntityHasDamageTest.c ├── TestKeyboardManager.c ├── EntityIsOwnerTest.c ├── EntityIsTargetTest.c ├── EntityUndergroundTest.c └── EntityHasAbilityTest.c └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | extractor-0.0.1.jar 2 | libminecraftpe.c 3 | desktop.ini -------------------------------------------------------------------------------- /unmapped/MultiplayerLockState.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MultiplayerLockState::isLocked(MultiplayerLockState *this) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /Minecraft/Block/FullBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall FullBlock::getBlock(FullBlock *this) 4 | { 5 | return Block::mBlocks[*(_BYTE *)this]; 6 | } 7 | -------------------------------------------------------------------------------- /unmapped/ClassID.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed __int64 __fastcall ClassID::getNextID(ClassID *this) 4 | { 5 | return (*(_QWORD *)&dword_28261C8)++ + 1LL; 6 | } 7 | -------------------------------------------------------------------------------- /unmapped/SkinAdjustments.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall SkinAdjustments::SkinAdjustments(_DWORD *result) 4 | { 5 | *result = 0; 6 | return result; 7 | } 8 | -------------------------------------------------------------------------------- /unmapped/OnHitSubcomponent.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall OnHitSubcomponent::OnHitSubcomponent(_DWORD *result) 4 | { 5 | *result = &off_271EC90; 6 | return result; 7 | } 8 | -------------------------------------------------------------------------------- /Minecraft/Command/ServerCommand.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ServerCommand::setup(int result, Minecraft *a2) 4 | { 5 | ServerCommand::mGame = result; 6 | return result; 7 | } 8 | -------------------------------------------------------------------------------- /unmapped/EmptyProgressHandler.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EmptyProgressHandler::getLoadingState(EmptyProgressHandler *this, MinecraftScreenModel *a2) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /unmapped/PropertyDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PropertyDescription::getNodeName(PropertyDescription *this) 4 | { 5 | return DocumentationSystem::NODE_PROPERTIES; 6 | } 7 | -------------------------------------------------------------------------------- /unmapped/ComponentDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ComponentDescription::getNodeName(ComponentDescription *this) 4 | { 5 | return DocumentationSystem::NODE_COMPONENTS; 6 | } 7 | -------------------------------------------------------------------------------- /Minecraft/IO/IFileChunkDownloader.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall IFileChunkDownloader::IFileChunkDownloader(_DWORD *result) 4 | { 5 | *result = &off_271A310; 6 | return result; 7 | } 8 | -------------------------------------------------------------------------------- /Minecraft/Attributes/AttributeDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall AttributeDescription::getNodeName(AttributeDescription *this) 4 | { 5 | return DocumentationSystem::NODE_ATTRIBUTES; 6 | } 7 | -------------------------------------------------------------------------------- /Minecraft/Command/ClientCommand.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ClientCommand::setup(int result, MinecraftGame *a2) 4 | { 5 | ClientCommand::mGame = (MinecraftGame *)result; 6 | return result; 7 | } 8 | -------------------------------------------------------------------------------- /unmapped/AdventureSettings.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall AdventureSettings::AdventureSettings(int result) 4 | { 5 | *(_DWORD *)result = 0; 6 | *(_BYTE *)(result + 4) = 1; 7 | return result; 8 | } 9 | -------------------------------------------------------------------------------- /Minecraft/Level/Generator/GUIDGenerator.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall GUIDGenerator::InitOnceImpl(GUIDGenerator *this) 4 | { 5 | __int32 v1; // r0@1 6 | 7 | v1 = time(0); 8 | srand48(v1); 9 | } 10 | -------------------------------------------------------------------------------- /unmapped/CaretMeasureData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall CaretMeasureData::CaretMeasureData(int result, int a2, char a3) 4 | { 5 | *(_DWORD *)result = a2; 6 | *(_BYTE *)(result + 4) = a3; 7 | return result; 8 | } 9 | -------------------------------------------------------------------------------- /unmapped/ClassroomModeNetworkHandler.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall ClassroomModeNetworkHandler::allowIncomingPacketId(ClassroomModeNetworkHandler *this, const NetworkIdentifier *a2, int a3) 4 | { 5 | return 1; 6 | } 7 | -------------------------------------------------------------------------------- /Minecraft/Client/Sound/MinecraftUISoundPlayer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MinecraftUISoundPlayer::MinecraftUISoundPlayer(int result, int a2) 4 | { 5 | *(_DWORD *)result = &off_26DFF40; 6 | *(_DWORD *)(result + 4) = a2; 7 | return result; 8 | } 9 | -------------------------------------------------------------------------------- /UnitTest/ClientInstanceTestInterface.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ClientInstanceTestInterface::ClientInstanceTestInterface(int result, int a2) 4 | { 5 | *(_DWORD *)result = &off_26D6450; 6 | *(_DWORD *)(result + 4) = a2; 7 | return result; 8 | } 9 | -------------------------------------------------------------------------------- /Minecraft/Recipe/MultiRecipe.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall MultiRecipe::isMultiRecipe(MultiRecipe *this) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | int __fastcall MultiRecipe::isShapeless(MultiRecipe *this) 10 | { 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/RangeIndices.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | unsigned int __fastcall RangeIndices::getPolyCount(RangeIndices *this) 4 | { 5 | _R0 = *((_DWORD *)this + 1); 6 | _R1 = 1431655766; 7 | __asm { SMMUL.W R0, R0, R1 } 8 | return _R0 + (_R0 >> 31); 9 | } 10 | -------------------------------------------------------------------------------- /Minecraft/Attributes/AttributeBuffInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall AttributeBuffInfo::AttributeBuffInfo(int result, int a2) 4 | { 5 | *(_DWORD *)result = a2; 6 | *(_DWORD *)(result + 8) = -1; 7 | *(_DWORD *)(result + 12) = -1; 8 | return result; 9 | } 10 | -------------------------------------------------------------------------------- /unmapped/EntityRenderData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityRenderData::EntityRenderData(int result, int a2, int a3, int a4) 4 | { 5 | *(_DWORD *)result = a2; 6 | *(_DWORD *)(result + 4) = a3; 7 | *(_DWORD *)(result + 8) = a4; 8 | return result; 9 | } 10 | -------------------------------------------------------------------------------- /unmapped/LayerData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall LayerData::swap(int result) 4 | { 5 | __int64 v1; // r1@1 6 | 7 | v1 = *(_QWORD *)result; 8 | *(_DWORD *)result = *(_QWORD *)result >> 32; 9 | *(_DWORD *)(result + 4) = v1; 10 | return result; 11 | } 12 | -------------------------------------------------------------------------------- /Minecraft/Block/BlockSourceListener.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall BlockSourceListener::onBlockEntityRemoved(_DWORD *result, int a2, int a3, int *a4) 4 | { 5 | int v4; // r1@1 6 | 7 | v4 = *a4; 8 | *a4 = 0; 9 | *result = v4; 10 | return result; 11 | } 12 | -------------------------------------------------------------------------------- /Minecraft/Client/UI/UIScreenContext.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall UIScreenContext::UIScreenContext(int result, int a2, int a3, int a4) 4 | { 5 | *(_DWORD *)result = a2; 6 | *(_DWORD *)(result + 4) = a3; 7 | *(_DWORD *)(result + 8) = a4; 8 | return result; 9 | } 10 | -------------------------------------------------------------------------------- /unmapped/AutoPlaceResult.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall AutoPlaceResult::AutoPlaceResult(int *a1, int *a2, int a3) 4 | { 5 | int v3; // r4@1 6 | int *result; // r0@1 7 | 8 | v3 = a3; 9 | result = sub_21E8AF4(a1, a2); 10 | result[1] = v3; 11 | return result; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/AgentRenderData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | AgentRenderData *__fastcall AgentRenderData::AgentRenderData(AgentRenderData *this) 4 | { 5 | AgentRenderData *v1; // r4@1 6 | 7 | v1 = this; 8 | *(_DWORD *)this = 0; 9 | *((_DWORD *)this + 1) = getTimeMs(); 10 | return v1; 11 | } 12 | -------------------------------------------------------------------------------- /unmapped/NpcDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall NpcDescription::getDescription(NpcDescription *this) 4 | { 5 | return "[EDU] "; 6 | } 7 | 8 | 9 | const char *__fastcall NpcDescription::getJsonName(NpcDescription *this) 10 | { 11 | return "minecraft:npc"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/SharedLock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SharedLock::SharedLock(int a1, pthread_mutex_t *a2) 4 | { 5 | int v2; // r4@1 6 | 7 | v2 = a1; 8 | *(_DWORD *)a1 = a2; 9 | *(_BYTE *)(a1 + 4) = 1; 10 | j_std::shared_timed_mutex::lock_shared(a2); 11 | return v2; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/JumpInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall JumpInfo::JumpInfo(int result, int a2, int a3, int a4, int a5) 4 | { 5 | *(_DWORD *)result = a2; 6 | *(_DWORD *)(result + 4) = a3; 7 | *(_DWORD *)(result + 8) = a4; 8 | *(_DWORD *)(result + 12) = a5; 9 | return result; 10 | } 11 | -------------------------------------------------------------------------------- /unmapped/ShulkerBodyControl.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall ShulkerBodyControl::ShulkerBodyControl(BodyControl *a1, Mob *a2) 4 | { 5 | _DWORD *result; // r0@1 6 | 7 | result = (_DWORD *)j_BodyControl::BodyControl(a1, a2); 8 | *result = &off_271A584; 9 | return result; 10 | } 11 | -------------------------------------------------------------------------------- /Minecraft/Item/AutoPlaceItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall AutoPlaceItem::AutoPlaceItem(int *a1, int *a2, char a3) 4 | { 5 | char v3; // r4@1 6 | int *result; // r0@1 7 | 8 | v3 = a3; 9 | result = sub_21E8AF4(a1, a2); 10 | *((_BYTE *)result + 4) = v3; 11 | return result; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/MoveInput.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall MoveInput::allowPicking(MoveInput *this, float a2, float a3) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | int __fastcall MoveInput::setJumping(int result, bool a2) 10 | { 11 | *(_BYTE *)(result + 67) = a2; 12 | return result; 13 | } 14 | -------------------------------------------------------------------------------- /UnitTest/FilterTestAltitude.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestAltitude::evaluate(int a1, int a2) 4 | { 5 | return j_j_j__ZNK10FilterTest23_testValuesWithOperatorEii_0( 6 | (FilterTest *)a1, 7 | *(_DWORD *)(a2 + 28), 8 | *(_DWORD *)(a1 + 8)); 9 | } 10 | -------------------------------------------------------------------------------- /unmapped/UniqueLock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall UniqueLock::UniqueLock(int a1, pthread_mutex_t *a2) 4 | { 5 | int v2; // r4@1 6 | 7 | v2 = a1; 8 | *(_DWORD *)a1 = a2; 9 | *(_BYTE *)(a1 + 4) = 0; 10 | j_std::shared_timed_mutex::lock(a2); 11 | *(_BYTE *)(v2 + 4) = 1; 12 | return v2; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/TextMeasureData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall TextMeasureData::TextMeasureData(int result, __int64 a2, char a3, char a4, char a5) 4 | { 5 | *(_QWORD *)result = a2; 6 | *(_BYTE *)(result + 8) = a3; 7 | *(_BYTE *)(result + 9) = a4; 8 | *(_BYTE *)(result + 10) = a5; 9 | return result; 10 | } 11 | -------------------------------------------------------------------------------- /UnitTest/SimpleIntFilterTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SimpleIntFilterTest::setup(int a1, int a2, int a3) 4 | { 5 | int v3; // r4@1 6 | int v4; // r5@1 7 | 8 | v3 = a3; 9 | v4 = a1; 10 | FilterTest::setup(a1, a2, a3); 11 | *(_DWORD *)(v4 + 8) = *(_DWORD *)(v3 + 32); 12 | return 1; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/TripodCameraDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void *__fastcall TripodCameraDescription::getJsonName(TripodCameraDescription *this) 4 | { 5 | return &unk_257BC67; 6 | } 7 | 8 | 9 | void *__fastcall TripodCameraDescription::getDescription(TripodCameraDescription *this) 10 | { 11 | return &unk_257BC67; 12 | } 13 | -------------------------------------------------------------------------------- /UnitTest/SimpleFloatFilterTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SimpleFloatFilterTest::setup(int a1, int a2, int a3) 4 | { 5 | int v3; // r4@1 6 | int v4; // r5@1 7 | 8 | v3 = a3; 9 | v4 = a1; 10 | FilterTest::setup(a1, a2, a3); 11 | *(_DWORD *)(v4 + 8) = *(_DWORD *)(v3 + 36); 12 | return 1; 13 | } 14 | -------------------------------------------------------------------------------- /Minecraft/Item/DataItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall DataItem::isDataEqual(DataItem *this, const DataItem *a2) 4 | { 5 | int v2; // r2@1 6 | signed int result; // r0@1 7 | 8 | v2 = *((_BYTE *)this + 4); 9 | result = 0; 10 | if ( v2 == *((_BYTE *)a2 + 4) ) 11 | result = 1; 12 | return result; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/IsBabyDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsBabyDescription::getDescription(IsBabyDescription *this) 4 | { 5 | return "Sets that this entity is a baby."; 6 | } 7 | 8 | 9 | const char *__fastcall IsBabyDescription::getJsonName(IsBabyDescription *this) 10 | { 11 | return "minecraft:is_baby"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/ItemIndexPair.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | ItemInstance *__fastcall ItemIndexPair::ItemIndexPair(ItemInstance *a1, int a2, int a3) 4 | { 5 | int v3; // r4@1 6 | ItemInstance *result; // r0@1 7 | 8 | v3 = a3; 9 | result = ItemInstance::ItemInstance(a1, a2); 10 | *((_DWORD *)result + 18) = v3; 11 | return result; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/MinecraftGraphicsPipeline.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | mce::Texture *__fastcall MinecraftGraphicsPipeline::MinecraftGraphicsPipeline(mce::Texture *a1) 4 | { 5 | mce::Texture *v1; // r4@1 6 | 7 | v1 = a1; 8 | mce::Texture::Texture(a1); 9 | mce::Texture::Texture((mce::Texture *)((char *)v1 + 64)); 10 | return v1; 11 | } 12 | -------------------------------------------------------------------------------- /unmapped/DistanceFieldCullingStep.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DistanceFieldCullingStep::DistanceFieldCullingStep(int result, char a2, char a3, char a4, int a5) 4 | { 5 | *(_DWORD *)result = a5; 6 | *(_BYTE *)(result + 4) = a2; 7 | *(_BYTE *)(result + 5) = a3; 8 | *(_BYTE *)(result + 6) = a4; 9 | return result; 10 | } 11 | -------------------------------------------------------------------------------- /Minecraft/Command/HostOptionSubCommand.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall HostOptionSubCommand::HostOptionSubCommand(int *a1, int *a2) 4 | { 5 | int *v2; // r4@1 6 | int *v3; // r5@1 7 | 8 | v2 = a2; 9 | v3 = a1; 10 | sub_119C854(a1, a2); 11 | sub_119C854(v3 + 1, v2 + 1); 12 | sub_119C854(v3 + 2, v2 + 2); 13 | return v3; 14 | } 15 | -------------------------------------------------------------------------------- /Minecraft/Level/Biome/RiverBiome.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall RiverBiome::~RiverBiome(RiverBiome *this) 4 | { 5 | Biome *v1; // r0@1 6 | 7 | v1 = Biome::~Biome(this); 8 | j_j_j__ZdlPv_6((void *)v1); 9 | } 10 | 11 | 12 | void __fastcall RiverBiome::~RiverBiome(RiverBiome *this) 13 | { 14 | RiverBiome::~RiverBiome(this); 15 | } 16 | -------------------------------------------------------------------------------- /unmapped/IsTamedDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsTamedDescription::getJsonName(IsTamedDescription *this) 4 | { 5 | return "minecraft:is_tamed"; 6 | } 7 | 8 | 9 | const char *__fastcall IsTamedDescription::getDescription(IsTamedDescription *this) 10 | { 11 | return "Sets that this entity is currently tamed."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/NullLogger.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall NullLogger::~NullLogger(NullLogger *this) 4 | { 5 | NullLogger::~NullLogger(this); 6 | } 7 | 8 | 9 | void __fastcall NullLogger::~NullLogger(NullLogger *this) 10 | { 11 | void *v1; // r0@1 12 | 13 | v1 = (void *)j_leveldb::Logger::~Logger(this); 14 | j_j_j__ZdlPv_7(v1); 15 | } 16 | -------------------------------------------------------------------------------- /unmapped/CanClimbDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall CanClimbDescription::getDescription(CanClimbDescription *this) 4 | { 5 | return "Allows this entity to climb up ladders."; 6 | } 7 | 8 | 9 | const char *__fastcall CanClimbDescription::getJsonName(CanClimbDescription *this) 10 | { 11 | return "minecraft:can_climb"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/HopperDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall HopperDescription::getDescription(HopperDescription *this) 4 | { 5 | return "Determines that this entity is an item hopper"; 6 | } 7 | 8 | 9 | const char *__fastcall HopperDescription::getJsonName(HopperDescription *this) 10 | { 11 | return "minecraft:item_hopper"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/IsChargedDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsChargedDescription::getJsonName(IsChargedDescription *this) 4 | { 5 | return "minecraft:is_charged"; 6 | } 7 | 8 | 9 | const char *__fastcall IsChargedDescription::getDescription(IsChargedDescription *this) 10 | { 11 | return "Sets that this entity is charged."; 12 | } 13 | -------------------------------------------------------------------------------- /Minecraft/Network/RakNet/RakDataOutput.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall RakDataOutput::writeBytes(RakDataOutput *this, const void *a2, unsigned int a3) 4 | { 5 | return j_j_j__ZN6RakNet9BitStream9WriteBitsEPKhjb_0( 6 | *((RakNet::BitStream **)this + 1), 7 | (const unsigned __int8 *)a2, 8 | 8 * a3, 9 | 1); 10 | } 11 | -------------------------------------------------------------------------------- /unmapped/IsIgnitedDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsIgnitedDescription::getDescription(IsIgnitedDescription *this) 4 | { 5 | return "Sets that this entity is currently on fire."; 6 | } 7 | 8 | 9 | const char *__fastcall IsIgnitedDescription::getJsonName(IsIgnitedDescription *this) 10 | { 11 | return "minecraft:is_ignited"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/IsSaddledDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsSaddledDescription::getJsonName(IsSaddledDescription *this) 4 | { 5 | return "minecraft:is_saddled"; 6 | } 7 | 8 | 9 | const char *__fastcall IsSaddledDescription::getDescription(IsSaddledDescription *this) 10 | { 11 | return "Sets that this entity is currently saddled."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/IsShakingDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsShakingDescription::getDescription(IsShakingDescription *this) 4 | { 5 | return "Sets that this entity is currently shaking."; 6 | } 7 | 8 | 9 | const char *__fastcall IsShakingDescription::getJsonName(IsShakingDescription *this) 10 | { 11 | return "minecraft:is_shaking"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/IsShearedDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsShearedDescription::getDescription(IsShearedDescription *this) 4 | { 5 | return "Sets that this entity is currently sheared."; 6 | } 7 | 8 | 9 | const char *__fastcall IsShearedDescription::getJsonName(IsShearedDescription *this) 10 | { 11 | return "minecraft:is_sheared"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/SkinPackMeta.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall SkinPackMeta::SkinPackMeta(int *a1, int *a2) 4 | { 5 | int *v2; // r4@1 6 | int *v3; // r5@1 7 | 8 | v2 = a2; 9 | v3 = a1; 10 | sub_DA73B4(a1, a2); 11 | sub_DA73B4(v3 + 1, v2 + 1); 12 | Json::Value::Value((Json::Value *)(v3 + 2), (const Json::Value *)(v2 + 2)); 13 | return v3; 14 | } 15 | -------------------------------------------------------------------------------- /Minecraft/Block/BlockID.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _BOOL4 __fastcall BlockID::hasProperty(_BYTE *a1, int a2, int a3, int a4) 4 | { 5 | int v4; // r4@1 6 | int v5; // r5@1 7 | __int64 v6; // r0@1 8 | 9 | v4 = a4; 10 | v5 = a3; 11 | v6 = Block::getProperties((Block *)Block::mBlocks[*a1]); 12 | return ((unsigned int)v6 & v5 | HIDWORD(v6) & v4) != 0; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/IsStackableDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsStackableDescription::getJsonName(IsStackableDescription *this) 4 | { 5 | return "minecraft:is_stackable"; 6 | } 7 | 8 | 9 | const char *__fastcall IsStackableDescription::getDescription(IsStackableDescription *this) 10 | { 11 | return "Sets that this entity can be stacked."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/JumpControlDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall JumpControlDescription::getDescription(JumpControlDescription *this) 4 | { 5 | return "Gives the entity the ability to jump."; 6 | } 7 | 8 | 9 | const char *__fastcall JumpControlDescription::getJsonName(JumpControlDescription *this) 10 | { 11 | return "minecraft:jump.static"; 12 | } 13 | -------------------------------------------------------------------------------- /Minecraft/Level/Chunk/TagMemoryChunk.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | TagMemoryChunk *__fastcall TagMemoryChunk::~TagMemoryChunk(TagMemoryChunk *this) 4 | { 5 | TagMemoryChunk *v1; // r4@1 6 | void *v2; // r0@1 7 | 8 | v1 = this; 9 | v2 = (void *)*((_DWORD *)this + 2); 10 | if ( v2 ) 11 | operator delete[](v2); 12 | *((_DWORD *)v1 + 2) = 0; 13 | return v1; 14 | } 15 | -------------------------------------------------------------------------------- /unmapped/IsChestedDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall IsChestedDescription::getJsonName(IsChestedDescription *this) 4 | { 5 | return "minecraft:is_chested"; 6 | } 7 | 8 | 9 | const char *__fastcall IsChestedDescription::getDescription(IsChestedDescription *this) 10 | { 11 | return "Sets that this entity is currently carrying a chest."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/FireImmuneDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall FireImmuneDescription::getJsonName(FireImmuneDescription *this) 4 | { 5 | return "minecraft:fire_immune"; 6 | } 7 | 8 | 9 | const char *__fastcall FireImmuneDescription::getDescription(FireImmuneDescription *this) 10 | { 11 | return "Sets that this entity doesn't take damage from fire."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/WantsJockeyDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall WantsJockeyDescription::getDescription(WantsJockeyDescription *this) 4 | { 5 | return "Sets that this entity wants to become a jockey."; 6 | } 7 | 8 | 9 | const char *__fastcall WantsJockeyDescription::getJsonName(WantsJockeyDescription *this) 10 | { 11 | return "minecraft:wants_jockey"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/Amplifier.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall Amplifier::getTickInterval(Amplifier *this, int a2) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | int __fastcall Amplifier::getAmount(Amplifier *this, int a2, float a3) 10 | { 11 | return 0; 12 | } 13 | 14 | 15 | signed int __fastcall Amplifier::shouldBuff(Amplifier *this, int a2, int a3) 16 | { 17 | return 1; 18 | } 19 | -------------------------------------------------------------------------------- /unmapped/DimensionConversionData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DimensionConversionData::DimensionConversionData(int result, int a2, int a3) 4 | { 5 | __int64 v3; // kr00_8@1 6 | int v4; // r1@1 7 | 8 | v3 = *(_QWORD *)a2; 9 | v4 = *(_DWORD *)(a2 + 8); 10 | *(_QWORD *)result = v3; 11 | *(_QWORD *)(result + 8) = *(_QWORD *)(&a3 - 1); 12 | return result; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/OverloadSyntaxInformation.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall OverloadSyntaxInformation::OverloadSyntaxInformation(int *a1, int *a2, int a3, int a4) 4 | { 5 | int v4; // r4@1 6 | int v5; // r5@1 7 | int *result; // r0@1 8 | 9 | v4 = a4; 10 | v5 = a3; 11 | result = sub_21E8AF4(a1, a2); 12 | result[1] = v5; 13 | result[2] = v4; 14 | return result; 15 | } 16 | -------------------------------------------------------------------------------- /Minecraft/Level/Chunk/ChunkBlockPos.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ChunkBlockPos::ChunkBlockPos(int result, int a2) 4 | { 5 | __int64 v2; // r2@1 6 | int v3; // r1@1 7 | 8 | v2 = *(_QWORD *)a2; 9 | v3 = *(_DWORD *)(a2 + 8); 10 | *(_BYTE *)result = v2 & 0xF; 11 | *(_BYTE *)(result + 1) = v3 & 0xF; 12 | *(_WORD *)(result + 2) = WORD2(v2); 13 | return result; 14 | } 15 | -------------------------------------------------------------------------------- /unmapped/HurtWhenWetDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall HurtWhenWetDescription::getDescription(HurtWhenWetDescription *this) 4 | { 5 | return "Sets that this entity will take damage when it is wet."; 6 | } 7 | 8 | 9 | const char *__fastcall HurtWhenWetDescription::getJsonName(HurtWhenWetDescription *this) 10 | { 11 | return "minecraft:hurt_when_wet"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/MoveControlFlyDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall MoveControlFlyDescription::getJsonName(MoveControlFlyDescription *this) 4 | { 5 | return "minecraft:movement.fly"; 6 | } 7 | 8 | 9 | const char *__fastcall MoveControlFlyDescription::getDescription(MoveControlFlyDescription *this) 10 | { 11 | return "This move control causes the mob to fly."; 12 | } 13 | -------------------------------------------------------------------------------- /Minecraft/Item/SoundItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | char *__fastcall SoundItem::getSoundName(SoundItem *this) 4 | { 5 | return (char *)this + 4; 6 | } 7 | 8 | 9 | int __fastcall SoundItem::getLoaded(SoundItem *this) 10 | { 11 | return *(_BYTE *)this; 12 | } 13 | 14 | 15 | int __fastcall SoundItem::setLoaded(int result, bool a2) 16 | { 17 | *(_BYTE *)result = a2; 18 | return result; 19 | } 20 | -------------------------------------------------------------------------------- /unmapped/FloatsInLiquidDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall FloatsInLiquidDescription::getJsonName(FloatsInLiquidDescription *this) 4 | { 5 | return "minecraft:floats_in_liquid"; 6 | } 7 | 8 | 9 | const char *__fastcall FloatsInLiquidDescription::getDescription(FloatsInLiquidDescription *this) 10 | { 11 | return "Sets that this entity can float in liquid blocks."; 12 | } 13 | -------------------------------------------------------------------------------- /UnitTest/SimpleBoolFilterTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SimpleBoolFilterTest::setup(int a1, int a2, int a3) 4 | { 5 | int v3; // r4@1 6 | int v4; // r5@1 7 | int v5; // r0@1 8 | 9 | v3 = a3; 10 | v4 = a1; 11 | FilterTest::setup(a1, a2, a3); 12 | v5 = *(_DWORD *)(v3 + 32); 13 | if ( v5 ) 14 | LOBYTE(v5) = 1; 15 | *(_BYTE *)(v4 + 8) = v5; 16 | return 1; 17 | } 18 | -------------------------------------------------------------------------------- /unmapped/CanPowerJumpDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall CanPowerJumpDescription::getJsonName(CanPowerJumpDescription *this) 4 | { 5 | return "minecraft:can_power_jump"; 6 | } 7 | 8 | 9 | const char *__fastcall CanPowerJumpDescription::getDescription(CanPowerJumpDescription *this) 10 | { 11 | return "Allows the entity to power jump like the horse does in vanilla."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/MoveControlSkipDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall MoveControlSkipDescription::getJsonName(MoveControlSkipDescription *this) 4 | { 5 | return "minecraft:movement.skip"; 6 | } 7 | 8 | 9 | const char *__fastcall MoveControlSkipDescription::getDescription(MoveControlSkipDescription *this) 10 | { 11 | return "This move control causes the mob to hop as it moves."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/BurnsInSunlightDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall BurnsInSunlightDescription::getJsonName(BurnsInSunlightDescription *this) 4 | { 5 | return "minecraft:burns_in_daylight"; 6 | } 7 | 8 | 9 | const char *__fastcall BurnsInSunlightDescription::getDescription(BurnsInSunlightDescription *this) 10 | { 11 | return "Sets that this entity burns if exposed to daylight."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/MoveControlBasicDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall MoveControlBasicDescription::getJsonName(MoveControlBasicDescription *this) 4 | { 5 | return "minecraft:movement.basic"; 6 | } 7 | 8 | 9 | const char *__fastcall MoveControlBasicDescription::getDescription(MoveControlBasicDescription *this) 10 | { 11 | return "This component accents the movement of an entity."; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/SelectedSlotData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SelectedSlotData::clear(SelectedSlotData *this) 4 | { 5 | SelectedSlotData *v1; // r4@1 6 | signed int result; // r0@1 7 | 8 | v1 = this; 9 | sub_119CA68((const void **)this, 0, *(_BYTE **)(*(_DWORD *)this - 12), 0); 10 | result = -1; 11 | *((_DWORD *)v1 + 1) = -1; 12 | *((_BYTE *)v1 + 8) = 0; 13 | return result; 14 | } 15 | -------------------------------------------------------------------------------- /unmapped/MenuPointer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _BYTE *__fastcall MenuPointer::MenuPointer(_BYTE *result) 4 | { 5 | *result = 0; 6 | return result; 7 | } 8 | 9 | 10 | int __fastcall MenuPointer::isPressed(MenuPointer *this) 11 | { 12 | return *(_BYTE *)this; 13 | } 14 | 15 | 16 | int __fastcall MenuPointer::setPressed(int result, bool a2) 17 | { 18 | *(_BYTE *)result = a2; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /Minecraft/Command/CommandContext.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall CommandContext::CommandContext(int *a1, int *a2, int *a3, int a4) 4 | { 5 | int v4; // r4@1 6 | int *v5; // r5@1 7 | int *result; // r0@1 8 | int v7; // r1@1 9 | 10 | v4 = a4; 11 | v5 = a3; 12 | result = sub_21E8AF4(a1, a2); 13 | v7 = *v5; 14 | *v5 = 0; 15 | result[1] = v7; 16 | result[2] = v4; 17 | return result; 18 | } 19 | -------------------------------------------------------------------------------- /unmapped/MobSpawnInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall MobSpawnInfo::categoryID(signed int a1) 4 | { 5 | if ( a1 < 4864 ) 6 | { 7 | if ( a1 == 783 ) 8 | return 3; 9 | if ( a1 == 2816 ) 10 | return 1; 11 | } 12 | else 13 | if ( a1 == 4864 ) 14 | return 0; 15 | if ( a1 == 8960 ) 16 | return 2; 17 | if ( a1 == 33024 ) 18 | return 4; 19 | return -1; 20 | } 21 | -------------------------------------------------------------------------------- /Minecraft/Renderer/DebugRenderer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DebugRenderer::DebugRenderer(int result) 4 | { 5 | DebugRenderer::sInstance = result; 6 | DebugRenderer::sDebugEntity = 0; 7 | DebugRenderer::sDebugBlockPos = BlockPos::MAX; 8 | dword_27E3F34 = unk_2816260; 9 | dword_27E3F38 = dword_2816264; 10 | DebugRenderer::sDebugBlockEntity = 0; 11 | DebugRenderer::sDebugBlock = 0; 12 | return result; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/ToastMessage.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ToastMessage::ToastMessage(int a1, int a2, int *a3, int *a4, int *a5) 4 | { 5 | int v5; // r4@1 6 | int *v6; // r7@1 7 | int *v7; // r6@1 8 | 9 | v5 = a1; 10 | v6 = a4; 11 | *(_DWORD *)a1 = a2; 12 | v7 = (int *)(a1 + 8); 13 | sub_119C854((int *)(a1 + 4), a3); 14 | sub_119C854(v7, v6); 15 | sub_119C854((int *)(v5 + 12), a5); 16 | return v5; 17 | } 18 | -------------------------------------------------------------------------------- /unmapped/ExpandoModelElement.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | ItemInstance *__fastcall ExpandoModelElement::ExpandoModelElement(ItemInstance *a1, int a2, int a3, int *a4) 4 | { 5 | int *v4; // r5@1 6 | int v5; // r6@1 7 | ItemInstance *v6; // r4@1 8 | 9 | v4 = a4; 10 | v5 = a3; 11 | v6 = a1; 12 | ItemInstance::ItemInstance(a1, a2); 13 | *((_DWORD *)v6 + 18) = v5; 14 | sub_21E8AF4((int *)v6 + 19, v4); 15 | return v6; 16 | } 17 | -------------------------------------------------------------------------------- /unmapped/MoveControlSwayDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall MoveControlSwayDescription::getDescription(MoveControlSwayDescription *this) 4 | { 5 | return "This move control causes the mob to sway side to side giving the impression it is swimming."; 6 | } 7 | 8 | 9 | const char *__fastcall MoveControlSwayDescription::getJsonName(MoveControlSwayDescription *this) 10 | { 11 | return "minecraft:movement.sway"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/BehaviorTreeDefinition.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | char *__fastcall BehaviorTreeDefinition::getStringInput(BehaviorTreeDefinition *this) 4 | { 5 | return (char *)this + 4; 6 | } 7 | 8 | 9 | int *__fastcall BehaviorTreeDefinition::BehaviorTreeDefinition(int *a1, int *a2) 10 | { 11 | int *result; // r0@1 12 | 13 | result = sub_21E8AF4(a1, a2); 14 | *(_QWORD *)(result + 1) = (unsigned int)&unk_28898CC; 15 | return result; 16 | } 17 | -------------------------------------------------------------------------------- /unmapped/CanFlyDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall CanFlyDescription::getJsonName(CanFlyDescription *this) 4 | { 5 | return "minecraft:can_fly"; 6 | } 7 | 8 | 9 | const char *__fastcall CanFlyDescription::getDescription(CanFlyDescription *this) 10 | { 11 | return "Marks the entity as being able to fly, the pathfinder won't be restricted to paths where a solid block is requi" 12 | "red underneath it."; 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/WASDControlledDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall WASDControlledDescription::getDescription(WASDControlledDescription *this) 4 | { 5 | return "When configured as a rideable entity, the entity will be controlled using WASD controls."; 6 | } 7 | 8 | 9 | const char *__fastcall WASDControlledDescription::getJsonName(WASDControlledDescription *this) 10 | { 11 | return "minecraft:input_ground_controlled"; 12 | } 13 | -------------------------------------------------------------------------------- /unmapped/DownloadStateObject.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall DownloadStateObject::DownloadStateObject(int *a1, int *a2, unsigned __int64 *a3, int a4) 4 | { 5 | int v4; // r4@1 6 | unsigned __int64 *v5; // r6@1 7 | int *v6; // r5@1 8 | 9 | v4 = a4; 10 | v5 = a3; 11 | v6 = a1; 12 | sub_119C854(a1, a2); 13 | std::vector>::vector((int)(v6 + 1), v5); 14 | v6[4] = v4; 15 | return v6; 16 | } 17 | -------------------------------------------------------------------------------- /unmapped/EffectDisplayInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | EffectDisplayInfo *__fastcall EffectDisplayInfo::EffectDisplayInfo(EffectDisplayInfo *this) 4 | { 5 | EffectDisplayInfo *v1; // r4@1 6 | RectangleArea *v2; // r5@1 7 | 8 | v1 = this; 9 | *(_DWORD *)this = 0; 10 | v2 = (EffectDisplayInfo *)((char *)this + 20); 11 | RectangleArea::RectangleArea((EffectDisplayInfo *)((char *)this + 4)); 12 | RectangleArea::RectangleArea(v2); 13 | return v1; 14 | } 15 | -------------------------------------------------------------------------------- /unmapped/PushNotificationMessage.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PushNotificationMessage::PushNotificationMessage(int a1, int a2, int *a3, int *a4, int *a5) 4 | { 5 | int v5; // r4@1 6 | int *v6; // r7@1 7 | int *v7; // r6@1 8 | 9 | v5 = a1; 10 | v6 = a4; 11 | *(_DWORD *)a1 = a2; 12 | v7 = (int *)(a1 + 8); 13 | sub_DA73B4((int *)(a1 + 4), a3); 14 | sub_DA73B4(v7, v6); 15 | sub_DA73B4((int *)(v5 + 12), a5); 16 | return v5; 17 | } 18 | -------------------------------------------------------------------------------- /unmapped/DynamicJumpControlDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const char *__fastcall DynamicJumpControlDescription::getJsonName(DynamicJumpControlDescription *this) 4 | { 5 | return "minecraft:jump.dynamic"; 6 | } 7 | 8 | 9 | const char *__fastcall DynamicJumpControlDescription::getDescription(DynamicJumpControlDescription *this) 10 | { 11 | return "Defines a dynamic type jump control that will change jump properties based on the speed modifier of the mob."; 12 | } 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Minecraft: Bedrock Source 2 | Class names are mapped with the mappings.txt This was mainly generated by a program so it may contain some classes in the wrong directories. 3 | If you notice any missplaced mappings or know where an unmapped class can be appropriately mapped then send us a pull request. 4 | 5 | ### mappings.txt 6 | Format: `ClassName|Path/To/Mapping` 7 | 8 | ### TODO 9 | 10 | - Finish mapping class names correctly 11 | - Make the source readable. 12 | -------------------------------------------------------------------------------- /unmapped/DevAssertConsoleListener.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | MinecraftGame *__fastcall DevAssertConsoleListener::print(int a1, int *a2) 4 | { 5 | MinecraftGame *result; // r0@1 6 | int *v3; // r4@1 7 | int v4; // r0@2 8 | 9 | result = *(MinecraftGame **)(a1 + 4); 10 | v3 = a2; 11 | if ( result ) 12 | { 13 | v4 = MinecraftGame::getPrimaryGuiData(result); 14 | result = (MinecraftGame *)j_j_j__ZN7GuiData20addDevConsoleMessageERKSs_0(v4, v3); 15 | } 16 | return result; 17 | } 18 | -------------------------------------------------------------------------------- /unmapped/ParticleRenderContext.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ParticleRenderContext::ParticleRenderContext(int result, int a2, int a3, int a4, int a5) 4 | { 5 | *(_DWORD *)result = a2; 6 | __asm { VLDR S0, [SP,#arg_0] } 7 | *(_DWORD *)(result + 4) = *(_DWORD *)(a2 + 40); 8 | *(_DWORD *)(result + 8) = a3; 9 | *(_DWORD *)(result + 12) = a4; 10 | __asm { VSTR S0, [R0,#0x10] } 11 | *(_DWORD *)(result + 20) = *(_DWORD *)(a2 + 8); 12 | return result; 13 | } 14 | -------------------------------------------------------------------------------- /Minecraft/Block/Entity/BlockEntityRenderData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall BlockEntityRenderData::BlockEntityRenderData(int result, BlockSource *a2, BlockEntity *a3, const Vec3 *a4, const mce::MaterialPtr *a5, const mce::TexturePtr *a6, int a7) 4 | { 5 | *(_DWORD *)result = a2; 6 | *(_DWORD *)(result + 4) = a3; 7 | *(_DWORD *)(result + 8) = a4; 8 | *(_DWORD *)(result + 12) = a5; 9 | *(_DWORD *)(result + 16) = a6; 10 | *(_DWORD *)(result + 20) = a7; 11 | return result; 12 | } 13 | -------------------------------------------------------------------------------- /UnitTest/EntityInCloudsTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityInCloudsTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::isInClouds(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsMovingTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsMovingTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::isMoving(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsRidingTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsRidingTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::isRiding(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityOnLadderTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityOnLadderTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::onLadder(v3, 1); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsClimbingTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsClimbingTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::isClimbing(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /Minecraft/Goal/Goal.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall Goal::setRequiredControlFlags(int result, int a2) 4 | { 5 | *(_DWORD *)(result + 4) = a2; 6 | return result; 7 | } 8 | 9 | 10 | int __fastcall Goal::isTargetGoal(Goal *this) 11 | { 12 | return 0; 13 | } 14 | 15 | 16 | signed int __fastcall Goal::canInterrupt(Goal *this) 17 | { 18 | return 1; 19 | } 20 | 21 | 22 | _QWORD *__fastcall Goal::Goal(_QWORD *result) 23 | { 24 | *result = (unsigned int)&off_26EDCF4; 25 | return result; 26 | } 27 | -------------------------------------------------------------------------------- /UnitTest/EntityInLavaTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityInLavaTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 216))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityInWaterTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityInWaterTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 208))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsColorTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall EntityIsColorTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::getColor(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_DWORD *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/FilterTestDaytime.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall FilterTestDaytime::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 16); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 196))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /Minecraft/Utils/JavaUtil.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall JavaUtil::getVM(JavaUtil *this) 4 | { 5 | return dword_27C4B54; 6 | } 7 | 8 | 9 | int __fastcall JavaUtil::getActivityObject(JavaUtil *this) 10 | { 11 | return dword_27C4B58; 12 | } 13 | 14 | 15 | int __fastcall JavaUtil::setActivityObject(int result) 16 | { 17 | dword_27C4B58 = result; 18 | return result; 19 | } 20 | 21 | 22 | int __fastcall JavaUtil::setVM(int result) 23 | { 24 | dword_27C4B54 = result; 25 | return result; 26 | } 27 | -------------------------------------------------------------------------------- /UnitTest/EntityInCaravanTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityInCaravanTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 572))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsImmobileTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsImmobileTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 284))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsSneakingTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsSneakingTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 312))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityIsVariantTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall EntityIsVariantTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Entity **)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = j_Entity::getVariant(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_DWORD *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/EntityUnderwaterTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityUnderwaterTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(_DWORD *)(a2 + 4); 12 | if ( v3 ) 13 | { 14 | v5 = (*(int (**)(void))(*(_DWORD *)v3 + 220))(); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_BYTE *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/FilterTestDifficulty.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestDifficulty::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Level *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Level **)(a2 + 20); 12 | if ( v3 ) 13 | { 14 | v5 = Level::getDifficulty(v3); 15 | result = FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, *(_DWORD *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /UnitTest/FilterTestClock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestClock::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Dimension *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Dimension **)(a2 + 16); 12 | if ( v3 ) 13 | { 14 | v5 = j_Dimension::getTimeOfDay(v3, 1.0); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, *(float *)&v5, *(float *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /unmapped/AgentBodyControl.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall AgentBodyControl::AgentBodyControl(BodyControl *a1, Mob *a2) 4 | { 5 | _DWORD *result; // r0@1 6 | 7 | result = (_DWORD *)BodyControl::BodyControl(a1, a2); 8 | *result = &off_26EDC54; 9 | return result; 10 | } 11 | 12 | 13 | int __fastcall AgentBodyControl::clientTick(AgentBodyControl *this) 14 | { 15 | int result; // r0@1 16 | 17 | result = *((_DWORD *)this + 1); 18 | *(_DWORD *)(result + 3412) = *(_DWORD *)(result + 124); 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /Minecraft/Command/CommandArea.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | ChunkSource **__fastcall CommandArea::CommandArea(ChunkSource **a1, ChunkSource **a2) 4 | { 5 | ChunkSource **v2; // r4@1 6 | ChunkSource *v3; // r0@1 7 | BlockSourceListener *v4; // r6@1 8 | int v5; // r0@1 9 | 10 | v2 = a1; 11 | v3 = *a2; 12 | *a2 = 0; 13 | *v2 = v3; 14 | v4 = (BlockSourceListener *)j_ChunkSource::getLevel(v3); 15 | v5 = j_ChunkSource::getDimension(*v2); 16 | j_BlockSource::BlockSource((int)(v2 + 2), v4, v5, (int)*v2, 1, 0); 17 | return v2; 18 | } 19 | -------------------------------------------------------------------------------- /UnitTest/FilterTestMoonIntensity.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestMoonIntensity::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Dimension *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(Dimension **)(a2 + 16); 12 | if ( v3 ) 13 | { 14 | v5 = j_Dimension::getMoonBrightness(v3); 15 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, *(float *)&v5, *(float *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /unmapped/LocalConnectivitySystem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall LocalConnectivitySystem::removeHost(int result, LocalConnector *a2) 4 | { 5 | if ( *(LocalConnector **)result == a2 ) 6 | *(_DWORD *)result = 0; 7 | return result; 8 | } 9 | 10 | 11 | int __fastcall LocalConnectivitySystem::addHost(int result, LocalConnector *a2) 12 | { 13 | *(_DWORD *)result = a2; 14 | return result; 15 | } 16 | 17 | 18 | int __fastcall LocalConnectivitySystem::getHost(LocalConnectivitySystem *this) 19 | { 20 | return *(_DWORD *)this; 21 | } 22 | -------------------------------------------------------------------------------- /unmapped/CallbackTokenCancelState.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall CallbackTokenCancelState::cancel(int result) 4 | { 5 | __dmb(); 6 | *(_BYTE *)result = 1; 7 | return result; 8 | } 9 | 10 | 11 | int __fastcall CallbackTokenCancelState::wasCanceled(CallbackTokenCancelState *this) 12 | { 13 | char v1; // r0@1 14 | 15 | v1 = *(_BYTE *)this; 16 | __dmb(); 17 | return v1 & 1; 18 | } 19 | 20 | 21 | _BYTE *__fastcall CallbackTokenCancelState::CallbackTokenCancelState(_BYTE *result) 22 | { 23 | *result = 0; 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/LootItemKilledByPlayerCondition.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _BOOL4 __fastcall LootItemKilledByPlayerCondition::applies(LootItemKilledByPlayerCondition *this, Random *a2, LootTableContext *a3) 4 | { 5 | return j_LootTableContext::getKillerPlayer(a3) != 0; 6 | } 7 | 8 | 9 | _DWORD *__fastcall LootItemKilledByPlayerCondition::deserialize(_DWORD *a1) 10 | { 11 | _DWORD *v1; // r4@1 12 | _DWORD *result; // r0@1 13 | 14 | v1 = a1; 15 | result = j_operator new(4u); 16 | *v1 = result; 17 | *result = &off_2725A88; 18 | return result; 19 | } 20 | -------------------------------------------------------------------------------- /unmapped/BeaconBeamSection.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall BeaconBeamSection::BeaconBeamSection(int result) 4 | { 5 | __int64 v1; // kr00_8@1 6 | int v2; // r1@1 7 | 8 | *(_DWORD *)result = 0; 9 | *(_DWORD *)(result + 4) = 0; 10 | *(_DWORD *)(result + 8) = 0; 11 | *(_DWORD *)(result + 12) = 0; 12 | *(_DWORD *)(result + 16) = 0; 13 | v1 = *(_QWORD *)&qword_283E614; 14 | v2 = unk_283E61C; 15 | *(_DWORD *)(result + 4) = Color::WHITE; 16 | *(_QWORD *)(result + 8) = v1; 17 | *(_DWORD *)(result + 16) = v2; 18 | return result; 19 | } 20 | -------------------------------------------------------------------------------- /unmapped/CachedScene.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall CachedScene::CachedScene(int result, int *a2, int a3, int *a4) 4 | { 5 | int v4; // r12@1 6 | int v5; // r1@1 7 | int v6; // r1@1 8 | 9 | v4 = *a2; 10 | *a2 = 0; 11 | *(_DWORD *)result = v4; 12 | *(_DWORD *)(result + 4) = *(_DWORD *)a3; 13 | *(_DWORD *)(result + 8) = 0; 14 | v5 = *(_DWORD *)(a3 + 4); 15 | *(_DWORD *)(a3 + 4) = 0; 16 | *(_DWORD *)(result + 8) = v5; 17 | *(_DWORD *)a3 = 0; 18 | v6 = *a4; 19 | *a4 = 0; 20 | *(_DWORD *)(result + 12) = v6; 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Level/Structure/MineshaftData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MineshaftData::MineshaftData(int result, bool a2) 4 | { 5 | __asm 6 | { 7 | VMOV.F32 S2, #0.5 8 | VMOV.F32 S0, #1.0 9 | } 10 | if ( !_ZF ) 11 | a2 = 5; 12 | __asm { VMOVNE.F32 S0, S2 } 13 | *(_BYTE *)result = *(_BYTE *)(Block::mWoodPlanks + 4); 14 | *(_BYTE *)(result + 1) = a2; 15 | *(_BYTE *)(result + 2) = *(_BYTE *)(Block::mFence + 4); 16 | *(_BYTE *)(result + 3) = a2; 17 | __asm { VSTR S0, [R0,#4] } 18 | return result; 19 | } 20 | -------------------------------------------------------------------------------- /UnitTest/FilterTestBrightness.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestBrightness::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | BlockSource *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | 10 | v2 = a1; 11 | v3 = *(BlockSource **)(a2 + 12); 12 | if ( v3 ) 13 | { 14 | v5 = BlockSource::getBrightness(v3, (const BlockPos *)(a2 + 24)); 15 | result = FilterTest::_testValuesWithOperator((FilterTest *)v2, *(float *)&v5, *(float *)(v2 + 8)); 16 | } 17 | else 18 | result = 0; 19 | return result; 20 | } 21 | -------------------------------------------------------------------------------- /unmapped/PatternEntry.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PatternEntry::PatternEntry(int a1, _BYTE *a2, int a3) 4 | { 5 | int v3; // r4@1 6 | int v4; // r5@1 7 | void (__fastcall *v5)(int, int, signed int); // r3@1 8 | 9 | v3 = a1; 10 | *(_BYTE *)a1 = *a2; 11 | v4 = a3; 12 | *(_DWORD *)(a1 + 12) = 0; 13 | v5 = *(void (__fastcall **)(int, int, signed int))(a3 + 8); 14 | if ( v5 ) 15 | { 16 | v5(a1 + 4, a3, 2); 17 | *(_DWORD *)(v3 + 16) = *(_DWORD *)(v4 + 12); 18 | *(_DWORD *)(v3 + 12) = *(_DWORD *)(v4 + 8); 19 | } 20 | return v3; 21 | } 22 | -------------------------------------------------------------------------------- /unmapped/AgentServerCommands.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall AgentServerCommands::setupStandardServer(Minecraft *a1) 4 | { 5 | AgentServerCommands::setupStandardServer(a1); 6 | } 7 | 8 | 9 | void __fastcall AgentServerCommands::setupStandardServer(Minecraft *a1) 10 | { 11 | MinecraftCommands *v1; // r0@1 12 | AgentCommand *v2; // r0@1 13 | CommandRegistry *v3; // r1@1 14 | 15 | v1 = (MinecraftCommands *)j_Minecraft::getCommands(a1); 16 | v2 = (AgentCommand *)j_MinecraftCommands::getRegistry(v1); 17 | j_j_j__ZN12AgentCommand5setupER15CommandRegistry(v2, v3); 18 | } 19 | -------------------------------------------------------------------------------- /unmapped/ThrownPotionEffectSubcomponent.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | Potion *__fastcall ThrownPotionEffectSubcomponent::doOnHitEffect(ThrownPotionEffectSubcomponent *this, ProjectileComponent *a2) 4 | { 5 | ProjectileComponent *v2; // r4@1 6 | ThrownPotionEffectSubcomponent *v3; // r5@1 7 | 8 | v2 = a2; 9 | v3 = this; 10 | if ( (*(int (**)(void))(**((_DWORD **)a2 + 4) + 488))() == 4194390 ) 11 | *((_DWORD *)v3 + 1) = j_ThrownPotion::getPotionId(*((ThrownPotion **)v2 + 4)); 12 | return j_j_j__ZN30SplashPotionEffectSubcomponent13doOnHitEffectER19ProjectileComponent(v3, v2); 13 | } 14 | -------------------------------------------------------------------------------- /unmapped/RelativeFloat.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall RelativeFloat::RelativeFloat(int result) 4 | { 5 | *(_DWORD *)result = 0; 6 | *(_BYTE *)(result + 4) = 1; 7 | return result; 8 | } 9 | 10 | 11 | int __fastcall RelativeFloat::getValue(RelativeFloat *this, float _R1) 12 | { 13 | int result; // r0@3 14 | 15 | __asm 16 | { 17 | VLDR S2, [R0] 18 | VMOV S0, R1 19 | VADD.F32 S0, S2, S0 20 | } 21 | if ( !*((_BYTE *)this + 4) ) 22 | __asm { VMOVEQ.F32 S0, S2 } 23 | __asm { VMOV R0, S0 } 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/TessellatorProxy.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall TessellatorProxy::TessellatorProxy(_DWORD *result, int a2) 4 | { 5 | *result = a2; 6 | return result; 7 | } 8 | 9 | 10 | int __fastcall TessellatorProxy::getVertexFormat(TessellatorProxy *this) 11 | { 12 | return *(_DWORD *)this + 52; 13 | } 14 | 15 | 16 | int __fastcall TessellatorProxy::getPrimitiveMode(TessellatorProxy *this) 17 | { 18 | return *(_DWORD *)this + 267; 19 | } 20 | 21 | 22 | int __fastcall TessellatorProxy::getVertexArrayRef(TessellatorProxy *this) 23 | { 24 | return *(_DWORD *)this + 28; 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/PhysicsComponent.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall PhysicsComponent::PhysicsComponent(_DWORD *result, int a2) 4 | { 5 | *result = a2; 6 | return result; 7 | } 8 | 9 | 10 | unsigned int __fastcall PhysicsComponent::initFromDefinition(PhysicsComponent *this) 11 | { 12 | int *v1; // r4@1 13 | int v2; // r0@1 14 | int v3; // r5@1 15 | 16 | v1 = (int *)this; 17 | v2 = *(_DWORD *)this; 18 | v3 = *(_DWORD *)(*(_DWORD *)(v2 + 48) + 460); 19 | j_Entity::setStatusFlag(v2, 46, *(_BYTE *)(v3 + 4)); 20 | return j_j_j__ZN6Entity13setStatusFlagE11EntityFlagsb_1(*v1, 45, *(_BYTE *)(v3 + 5)); 21 | } 22 | -------------------------------------------------------------------------------- /UnitTest/FilterTestBiomeHumid.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall FilterTestBiomeHumid::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | BlockSource *v3; // r0@1 7 | int result; // r0@2 8 | int v5; // r0@3 9 | int v6; // r0@3 10 | 11 | v2 = a1; 12 | v3 = *(BlockSource **)(a2 + 12); 13 | if ( v3 ) 14 | { 15 | v5 = BlockSource::getConstBiome(v3, (const BlockPos *)(a2 + 24)); 16 | v6 = (*(int (**)(void))(*(_DWORD *)v5 + 100))(); 17 | result = FilterTest::_testValuesWithOperator((FilterTest *)v2, v6, *(_BYTE *)(v2 + 8)); 18 | } 19 | else 20 | result = 0; 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /UnitTest/FilterTestBiomeSnowCovered.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall FilterTestBiomeSnowCovered::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | BlockSource *v3; // r0@1 7 | int result; // r0@2 8 | Biome *v5; // r0@3 9 | int v6; // r0@3 10 | 11 | v2 = a1; 12 | v3 = *(BlockSource **)(a2 + 12); 13 | if ( v3 ) 14 | { 15 | v5 = (Biome *)BlockSource::getConstBiome(v3, (const BlockPos *)(a2 + 24)); 16 | v6 = Biome::isSnowCovered(v5); 17 | result = FilterTest::_testValuesWithOperator((FilterTest *)v2, v6, *(_BYTE *)(v2 + 8)); 18 | } 19 | else 20 | result = 0; 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Level/Biome/FilterTestBiome.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestBiome::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | BlockSource *v3; // r0@1 7 | signed int result; // r0@2 8 | Biome *v5; // r0@3 9 | int v6; // r0@3 10 | 11 | v2 = a1; 12 | v3 = *(BlockSource **)(a2 + 12); 13 | if ( v3 ) 14 | { 15 | v5 = (Biome *)BlockSource::getConstBiome(v3, (const BlockPos *)(a2 + 24)); 16 | v6 = Biome::getBiomeType(v5); 17 | result = FilterTest::_testValuesWithOperator((FilterTest *)v2, v6, *(_DWORD *)(v2 + 8)); 18 | } 19 | else 20 | result = 0; 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /UnitTest/FilterTestMoonPhase.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestMoonPhase::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Dimension *v3; // r0@1 7 | signed int result; // r0@2 8 | 9 | v2 = a1; 10 | v3 = *(Dimension **)(a2 + 16); 11 | if ( v3 ) 12 | { 13 | _R0 = j_Dimension::getMoonPhase(v3); 14 | __asm 15 | { 16 | VMOV S0, R0 17 | VCVT.F32.S32 S0, S0 18 | VMOV R1, S0 19 | } 20 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, _R1, *(float *)(v2 + 8)); 21 | } 22 | else 23 | result = 0; 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/AutoCompleteOption.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall AutoCompleteOption::AutoCompleteOption(int *a1, int *a2, int *a3, int *a4, int a5, int a6, int a7) 4 | { 5 | int *v7; // r6@1 6 | int *v8; // r5@1 7 | int *v9; // r7@1 8 | int *v10; // r4@1 9 | 10 | v7 = a4; 11 | v8 = a3; 12 | v9 = a2; 13 | v10 = a1; 14 | sub_21E8AF4(a1, a2); 15 | if ( *(_DWORD *)(*v7 - 12) ) 16 | v9 = v7; 17 | sub_21E8AF4(v10 + 1, v9); 18 | sub_21E8AF4(v10 + 2, v8); 19 | v10[3] = a5; 20 | v10[4] = a6; 21 | v10[5] = a7; 22 | CommandItem::CommandItem((int)(v10 + 6)); 23 | *((_BYTE *)v10 + 32) = 0; 24 | return v10; 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/MultiplyValueAmplifier.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MultiplyValueAmplifier::MultiplyValueAmplifier(int result, int a2) 4 | { 5 | *(_DWORD *)result = &off_271A340; 6 | *(_DWORD *)(result + 4) = a2; 7 | return result; 8 | } 9 | 10 | 11 | int __fastcall MultiplyValueAmplifier::getAmount(MultiplyValueAmplifier *this, int a2, float a3) 12 | { 13 | int result; // r0@1 14 | 15 | _R1 = a2 + 1; 16 | __asm 17 | { 18 | VMOV S0, R1 19 | VCVT.F32.S32 S0, S0 20 | VLDR S2, [R0,#4] 21 | VMUL.F32 S0, S2, S0 22 | VMOV R0, S0 23 | } 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/PendingRemovalInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PendingRemovalInfo::PendingRemovalInfo(int result, int *a2, int a3) 4 | { 5 | int v3; // r12@1 6 | 7 | v3 = *a2; 8 | *a2 = 0; 9 | *(_DWORD *)result = v3; 10 | *(_DWORD *)(result + 4) = a3; 11 | return result; 12 | } 13 | 14 | 15 | PendingRemovalInfo *__fastcall PendingRemovalInfo::~PendingRemovalInfo(PendingRemovalInfo *this) 16 | { 17 | PendingRemovalInfo *v1; // r4@1 18 | int v2; // r0@1 19 | 20 | v1 = this; 21 | v2 = *(_DWORD *)this; 22 | if ( v2 ) 23 | (*(void (**)(void))(*(_DWORD *)v2 + 32))(); 24 | *(_DWORD *)v1 = 0; 25 | return v1; 26 | } 27 | -------------------------------------------------------------------------------- /UnitTest/FilterTestTemperatureType.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestTemperatureType::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | BlockSource *v3; // r0@1 7 | signed int result; // r0@2 8 | int v5; // r0@3 9 | int v6; // r0@3 10 | 11 | v2 = a1; 12 | v3 = *(BlockSource **)(a2 + 12); 13 | if ( v3 ) 14 | { 15 | v5 = BlockSource::getConstBiome(v3, (const BlockPos *)(a2 + 24)); 16 | v6 = (*(int (**)(void))(*(_DWORD *)v5 + 92))(); 17 | result = FilterTest::_testValuesWithOperator((FilterTest *)v2, v6, *(_DWORD *)(v2 + 8)); 18 | } 19 | else 20 | result = 0; 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Block/WoodButtonBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall WoodButtonBlock::WoodButtonBlock(int a1, const void **a2, char a3) 4 | { 5 | _DWORD *result; // r0@1 6 | 7 | result = (_DWORD *)ButtonBlock::ButtonBlock(a1, a2, a3, 1); 8 | *result = &off_2717920; 9 | return result; 10 | } 11 | 12 | 13 | void __fastcall WoodButtonBlock::~WoodButtonBlock(WoodButtonBlock *this) 14 | { 15 | Block *v1; // r0@1 16 | 17 | v1 = Block::~Block(this); 18 | j_j_j__ZdlPv_6((void *)v1); 19 | } 20 | 21 | 22 | void __fastcall WoodButtonBlock::~WoodButtonBlock(WoodButtonBlock *this) 23 | { 24 | WoodButtonBlock::~WoodButtonBlock(this); 25 | } 26 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetTimePacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SetTimePacket::read(SetTimePacket *this, BinaryStream *a2) 4 | { 5 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 6 | return 0; 7 | } 8 | 9 | 10 | int __fastcall SetTimePacket::handle(SetTimePacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 11 | { 12 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetTimePacket *))(*(_DWORD *)a3 + 76))( 13 | a3, 14 | a2, 15 | this); 16 | } 17 | 18 | 19 | signed int __fastcall SetTimePacket::getId(SetTimePacket *this) 20 | { 21 | return 10; 22 | } 23 | -------------------------------------------------------------------------------- /unmapped/FitDoubleXRoom.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall FitDoubleXRoom::create(_DWORD *a1, int a2, int *a3, int *a4) 4 | { 5 | int *v4; // r4@1 6 | _DWORD *v5; // r6@1 7 | int v6; // r0@1 8 | int *v7; // r5@1 9 | void *v8; // r0@1 10 | _DWORD *result; // r0@1 11 | 12 | v4 = a4; 13 | v5 = a1; 14 | v6 = *a4; 15 | v7 = a3; 16 | *(_BYTE *)(v6 + 44) = 1; 17 | *(_BYTE *)(*(_DWORD *)(*(_DWORD *)(v6 + 12) + 40) + 44) = 1; 18 | v8 = j_operator new(0x30u); 19 | result = (_DWORD *)OceanMonumentPiece::OceanMonumentPiece((int)v8, 1, v7, (int)v4, 2, 1, 1); 20 | *v5 = result; 21 | *result = &off_2718F34; 22 | return result; 23 | } 24 | -------------------------------------------------------------------------------- /unmapped/FitDoubleYRoom.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall FitDoubleYRoom::create(_DWORD *a1, int a2, int *a3, int *a4) 4 | { 5 | int *v4; // r4@1 6 | _DWORD *v5; // r6@1 7 | int v6; // r0@1 8 | int *v7; // r5@1 9 | void *v8; // r0@1 10 | _DWORD *result; // r0@1 11 | 12 | v4 = a4; 13 | v5 = a1; 14 | v6 = *a4; 15 | v7 = a3; 16 | *(_BYTE *)(v6 + 44) = 1; 17 | *(_BYTE *)(*(_DWORD *)(*(_DWORD *)(v6 + 12) + 8) + 44) = 1; 18 | v8 = j_operator new(0x30u); 19 | result = (_DWORD *)OceanMonumentPiece::OceanMonumentPiece((int)v8, 1, v7, (int)v4, 1, 2, 1); 20 | *v5 = result; 21 | *result = &off_2718EEC; 22 | return result; 23 | } 24 | -------------------------------------------------------------------------------- /Minecraft/Block/StoneButtonBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall StoneButtonBlock::~StoneButtonBlock(StoneButtonBlock *this) 4 | { 5 | StoneButtonBlock::~StoneButtonBlock(this); 6 | } 7 | 8 | 9 | _DWORD *__fastcall StoneButtonBlock::StoneButtonBlock(int a1, const void **a2, char a3) 10 | { 11 | _DWORD *result; // r0@1 12 | 13 | result = (_DWORD *)ButtonBlock::ButtonBlock(a1, a2, a3, 0); 14 | *result = &off_27150EC; 15 | return result; 16 | } 17 | 18 | 19 | void __fastcall StoneButtonBlock::~StoneButtonBlock(StoneButtonBlock *this) 20 | { 21 | Block *v1; // r0@1 22 | 23 | v1 = Block::~Block(this); 24 | j_j_j__ZdlPv_6((void *)v1); 25 | } 26 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/HurtArmorPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall HurtArmorPacket::handle(HurtArmorPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, HurtArmorPacket *))(*(_DWORD *)a3 + 216))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | signed int __fastcall HurtArmorPacket::getId(HurtArmorPacket *this) 13 | { 14 | return 38; 15 | } 16 | 17 | 18 | int __fastcall HurtArmorPacket::read(HurtArmorPacket *this, BinaryStream *a2) 19 | { 20 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/RiderJumpPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall RiderJumpPacket::handle(RiderJumpPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, RiderJumpPacket *))(*(_DWORD *)a3 + 124))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | int __fastcall RiderJumpPacket::read(RiderJumpPacket *this, BinaryStream *a2) 13 | { 14 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 15 | return 0; 16 | } 17 | 18 | 19 | signed int __fastcall RiderJumpPacket::getId(RiderJumpPacket *this) 20 | { 21 | return 20; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetHealthPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SetHealthPacket::handle(SetHealthPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetHealthPacket *))(*(_DWORD *)a3 + 192))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | signed int __fastcall SetHealthPacket::getId(SetHealthPacket *this) 13 | { 14 | return 42; 15 | } 16 | 17 | 18 | int __fastcall SetHealthPacket::read(SetHealthPacket *this, BinaryStream *a2) 19 | { 20 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /unmapped/ShaderColor.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ShaderColor::setColor(int result, const Color *a2) 4 | { 5 | int v2; // r2@1 6 | int v3; // r3@1 7 | int v4; // r12@1 8 | int v5; // r1@1 9 | 10 | v2 = *(_DWORD *)a2; 11 | v3 = *((_DWORD *)a2 + 1); 12 | v4 = *((_DWORD *)a2 + 2); 13 | v5 = *((_DWORD *)a2 + 3); 14 | *(_DWORD *)result = v2; 15 | *(_DWORD *)(result + 4) = v3; 16 | *(_DWORD *)(result + 8) = v4; 17 | *(_DWORD *)(result + 12) = v5; 18 | *(_BYTE *)(result + 16) = 1; 19 | return result; 20 | } 21 | 22 | 23 | int __fastcall ShaderColor::makeClean(int result) 24 | { 25 | *(_BYTE *)(result + 16) = 0; 26 | return result; 27 | } 28 | -------------------------------------------------------------------------------- /unmapped/FitSimpleRoom.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | unsigned int __fastcall FitSimpleRoom::create(Random *a1, int a2, int *a3, int a4, Random *a5) 4 | { 5 | int v5; // r6@1 6 | Random *v6; // r8@1 7 | int *v7; // r7@1 8 | _DWORD *v8; // r4@1 9 | unsigned int v9; // r0@1 10 | unsigned int result; // r0@1 11 | 12 | v5 = a4; 13 | v6 = a1; 14 | v7 = a3; 15 | *(_BYTE *)(*(_DWORD *)a4 + 44) = 1; 16 | v8 = j_operator new(0x34u); 17 | OceanMonumentPiece::OceanMonumentPiece((int)v8, 1, v7, v5, 1, 1, 1); 18 | *v8 = &off_2718E5C; 19 | v9 = j_Random::_genRandInt32(a5); 20 | *(_DWORD *)v6 = v8; 21 | result = v9 % 3; 22 | v8[12] = result; 23 | return result; 24 | } 25 | -------------------------------------------------------------------------------- /unmapped/RopePointsRef.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall RopePointsRef::RopePointsRef(int a1, int a2, pthread_mutex_t *a3) 4 | { 5 | int v3; // r4@1 6 | int v4; // r0@2 7 | 8 | v3 = a1; 9 | *(_DWORD *)a1 = a2; 10 | *(_DWORD *)(a1 + 4) = a3; 11 | if ( &pthread_create ) 12 | { 13 | v4 = j_pthread_mutex_lock(a3); 14 | if ( v4 ) 15 | sub_21E5E14(v4); 16 | } 17 | return v3; 18 | } 19 | 20 | 21 | RopePointsRef *__fastcall RopePointsRef::~RopePointsRef(RopePointsRef *this) 22 | { 23 | RopePointsRef *v1; // r4@1 24 | 25 | v1 = this; 26 | if ( &pthread_create ) 27 | j_pthread_mutex_unlock(*((pthread_mutex_t **)this + 1)); 28 | return v1; 29 | } 30 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/PlayStatusPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PlayStatusPacket::handle(PlayStatusPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, PlayStatusPacket *))(*(_DWORD *)a3 + 72))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | int __fastcall PlayStatusPacket::read(PlayStatusPacket *this, BinaryStream *a2) 13 | { 14 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getSignedBigEndianInt(a2); 15 | return 0; 16 | } 17 | 18 | 19 | signed int __fastcall PlayStatusPacket::getId(PlayStatusPacket *this) 20 | { 21 | return 2; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SimpleEventPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SimpleEventPacket::getId(SimpleEventPacket *this) 4 | { 5 | return 64; 6 | } 7 | 8 | 9 | int __fastcall SimpleEventPacket::handle(SimpleEventPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 10 | { 11 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SimpleEventPacket *))(*(_DWORD *)a3 + 284))( 12 | a3, 13 | a2, 14 | this); 15 | } 16 | 17 | 18 | int __fastcall SimpleEventPacket::read(SimpleEventPacket *this, BinaryStream *a2) 19 | { 20 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getUnsignedShort(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/ServerSettingsRequestPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ServerSettingsRequestPacket::handle(ServerSettingsRequestPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, ServerSettingsRequestPacket *))(*(_DWORD *)a3 + 424))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | int __fastcall ServerSettingsRequestPacket::read(ServerSettingsRequestPacket *this, BinaryStream *a2) 13 | { 14 | return 0; 15 | } 16 | 17 | 18 | signed int __fastcall ServerSettingsRequestPacket::getId(ServerSettingsRequestPacket *this) 19 | { 20 | return 102; 21 | } 22 | -------------------------------------------------------------------------------- /Minecraft/Renderer/EmptyRenderer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall EmptyRenderer::~EmptyRenderer(EmptyRenderer *this) 4 | { 5 | EmptyRenderer::~EmptyRenderer(this); 6 | } 7 | 8 | 9 | void __fastcall EmptyRenderer::~EmptyRenderer(EmptyRenderer *this) 10 | { 11 | BaseEntityRenderer *v1; // r0@1 12 | 13 | v1 = EntityRenderer::~EntityRenderer(this); 14 | j_j_j__ZdlPv_5((void *)v1); 15 | } 16 | 17 | 18 | BaseEntityRenderer *__fastcall EmptyRenderer::EmptyRenderer(BaseEntityRenderer *a1, mce::TextureGroup *a2) 19 | { 20 | BaseEntityRenderer *result; // r0@1 21 | 22 | result = EntityRenderer::EntityRenderer(a1, a2, 0); 23 | *(_DWORD *)result = &off_26E6B50; 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetLastHurtByPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SetLastHurtByPacket::handle(SetLastHurtByPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetLastHurtByPacket *))(*(_DWORD *)a3 + 448))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | int __fastcall SetLastHurtByPacket::read(SetLastHurtByPacket *this, BinaryStream *a2) 13 | { 14 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 15 | return 0; 16 | } 17 | 18 | 19 | signed int __fastcall SetLastHurtByPacket::getId(SetLastHurtByPacket *this) 20 | { 21 | return 96; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/ContainerClosePacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall ContainerClosePacket::getId(ContainerClosePacket *this) 4 | { 5 | return 47; 6 | } 7 | 8 | 9 | int __fastcall ContainerClosePacket::handle(ContainerClosePacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 10 | { 11 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, ContainerClosePacket *))(*(_DWORD *)a3 + 228))( 12 | a3, 13 | a2, 14 | this); 15 | } 16 | 17 | 18 | int __fastcall ContainerClosePacket::read(ContainerClosePacket *this, BinaryStream *a2) 19 | { 20 | *((_BYTE *)this + 13) = ReadOnlyBinaryStream::getByte(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetDifficultyPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SetDifficultyPacket::getId(SetDifficultyPacket *this) 4 | { 5 | return 60; 6 | } 7 | 8 | 9 | int __fastcall SetDifficultyPacket::handle(SetDifficultyPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 10 | { 11 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetDifficultyPacket *))(*(_DWORD *)a3 + 280))( 12 | a3, 13 | a2, 14 | this); 15 | } 16 | 17 | 18 | int __fastcall SetDifficultyPacket::read(SetDifficultyPacket *this, BinaryStream *a2) 19 | { 20 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getUnsignedVarInt(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/ClientToServerHandshakePacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ClientToServerHandshakePacket::handle(ClientToServerHandshakePacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, ClientToServerHandshakePacket *))(*(_DWORD *)a3 + 52))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | signed int __fastcall ClientToServerHandshakePacket::getId(ClientToServerHandshakePacket *this) 13 | { 14 | return 4; 15 | } 16 | 17 | 18 | int __fastcall ClientToServerHandshakePacket::read(ClientToServerHandshakePacket *this, BinaryStream *a2) 19 | { 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /Minecraft/Renderer/CommandBlockRenderer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall CommandBlockRenderer::CommandBlockRenderer(BaseEntityRenderer *a1) 4 | { 5 | _DWORD *result; // r0@1 6 | 7 | result = BaseEntityRenderer::BaseEntityRenderer(a1); 8 | *result = &off_26DAFB0; 9 | return result; 10 | } 11 | 12 | 13 | void __fastcall CommandBlockRenderer::~CommandBlockRenderer(CommandBlockRenderer *this) 14 | { 15 | void *v1; // r0@1 16 | 17 | v1 = (void *)BlockEntityRenderer::~BlockEntityRenderer(this); 18 | j_j_j__ZdlPv_4(v1); 19 | } 20 | 21 | 22 | void __fastcall CommandBlockRenderer::~CommandBlockRenderer(CommandBlockRenderer *this) 23 | { 24 | CommandBlockRenderer::~CommandBlockRenderer(this); 25 | } 26 | -------------------------------------------------------------------------------- /unmapped/DefinitionTrigger.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DefinitionTrigger::canTrigger(DefinitionTrigger *this, const Entity *a2, const VariantParameterList *a3) 4 | { 5 | return j_j_j__ZNK17EntityFilterGroup8evaluateERK6EntityRK20VariantParameterList_0( 6 | (DefinitionTrigger *)((char *)this + 8), 7 | a2, 8 | a3); 9 | } 10 | 11 | 12 | int *__fastcall DefinitionTrigger::DefinitionTrigger(int *a1, int *a2) 13 | { 14 | int *v2; // r4@1 15 | int *v3; // r5@1 16 | 17 | v2 = a2; 18 | v3 = a1; 19 | sub_21E8AF4(a1, a2); 20 | sub_21E8AF4(v3 + 1, v2 + 1); 21 | FilterGroup::FilterGroup((int)(v3 + 2), (int)(v2 + 2)); 22 | v3[2] = (int)&off_26F1930; 23 | return v3; 24 | } 25 | -------------------------------------------------------------------------------- /Minecraft/Block/MetalBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall MetalBlock::~MetalBlock(MetalBlock *this) 4 | { 5 | Block *v1; // r0@1 6 | 7 | v1 = Block::~Block(this); 8 | j_j_j__ZdlPv_6((void *)v1); 9 | } 10 | 11 | 12 | _DWORD *__fastcall MetalBlock::MetalBlock(_DWORD *a1, const void **a2, char a3) 13 | { 14 | _DWORD *v3; // r6@1 15 | char v4; // r4@1 16 | const void **v5; // r5@1 17 | int v6; // r0@1 18 | 19 | v3 = a1; 20 | v4 = a3; 21 | v5 = a2; 22 | v6 = Material::getMaterial(4); 23 | Block::Block((int)v3, v5, v4, v6); 24 | *v3 = &off_270E858; 25 | return v3; 26 | } 27 | 28 | 29 | void __fastcall MetalBlock::~MetalBlock(MetalBlock *this) 30 | { 31 | MetalBlock::~MetalBlock(this); 32 | } 33 | -------------------------------------------------------------------------------- /Minecraft/Level/LevelChunkPhase1Deleter.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall LevelChunkPhase1Deleter::operator()(int a1, LevelChunk *a2) 4 | { 5 | LevelChunkPhase1Deleter::operator()(a1, a2); 6 | } 7 | 8 | 9 | void __fastcall LevelChunkPhase1Deleter::operator()(int a1, LevelChunk *a2) 10 | { 11 | LevelChunk *v2; // r4@1 12 | int v3; // r0@2 13 | LevelChunk *v4; // r0@3 14 | LevelChunk *v5; // [sp+4h] [bp-Ch]@2 15 | 16 | v2 = a2; 17 | if ( a2 ) 18 | { 19 | v3 = LevelChunk::getDimension(a2); 20 | v5 = v2; 21 | Dimension::acquireDiscardedChunk(v3, &v5); 22 | if ( v5 ) 23 | { 24 | v4 = LevelChunk::~LevelChunk(v5); 25 | LevelChunk::operator delete((void *)v4); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Minecraft/Utils/PacketUtil.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PacketUtil::byteToDegrees(PacketUtil *this, signed __int8 a2) 4 | { 5 | int result; // r0@1 6 | 7 | __asm 8 | { 9 | VMOV S0, R0 10 | VLDR S2, =1.4062 11 | VCVT.F32.S32 S0, S0 12 | VMUL.F32 S0, S0, S2 13 | VMOV R0, S0 14 | } 15 | return result; 16 | } 17 | 18 | 19 | int __fastcall PacketUtil::degreesToByte(PacketUtil *this, float a2) 20 | { 21 | int result; // r0@1 22 | 23 | __asm 24 | { 25 | VLDR S0, =0.71111 26 | VMOV S2, R0 27 | VMUL.F32 S0, S2, S0 28 | VCVTR.S32.F32 S0, S0 29 | VMOV R0, S0 30 | } 31 | return result; 32 | } 33 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetPlayerGameTypePacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SetPlayerGameTypePacket::read(SetPlayerGameTypePacket *this, BinaryStream *a2) 4 | { 5 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 6 | return 0; 7 | } 8 | 9 | 10 | signed int __fastcall SetPlayerGameTypePacket::getId(SetPlayerGameTypePacket *this) 11 | { 12 | return 62; 13 | } 14 | 15 | 16 | int __fastcall SetPlayerGameTypePacket::handle(SetPlayerGameTypePacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 17 | { 18 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetPlayerGameTypePacket *))(*(_DWORD *)a3 + 128))( 19 | a3, 20 | a2, 21 | this); 22 | } 23 | -------------------------------------------------------------------------------- /unmapped/LegacyWorldInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | LocalWorldInfo *__fastcall LegacyWorldInfo::LegacyWorldInfo(LocalWorldInfo *a1) 4 | { 5 | LocalWorldInfo *v1; // r4@1 6 | 7 | v1 = a1; 8 | LocalWorldInfo::LocalWorldInfo(a1); 9 | sub_119C884((void **)v1 + 24, (const char *)&unk_257BC67); 10 | return v1; 11 | } 12 | 13 | 14 | char *__fastcall LegacyWorldInfo::getIdentifier(LegacyWorldInfo *this) 15 | { 16 | return (char *)this + 96; 17 | } 18 | 19 | 20 | int __fastcall LegacyWorldInfo::LegacyWorldInfo(int a1, int *a2, int a3) 21 | { 22 | int *v3; // r5@1 23 | int v4; // r4@1 24 | 25 | v3 = a2; 26 | v4 = a1; 27 | LocalWorldInfo::LocalWorldInfo(a1, a3); 28 | sub_119C854((int *)(v4 + 96), v3); 29 | return v4; 30 | } 31 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetCommandsEnabledPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SetCommandsEnabledPacket::getId(SetCommandsEnabledPacket *this) 4 | { 5 | return 59; 6 | } 7 | 8 | 9 | int __fastcall SetCommandsEnabledPacket::read(SetCommandsEnabledPacket *this, BinaryStream *a2) 10 | { 11 | *((_BYTE *)this + 13) = ReadOnlyBinaryStream::getBool(a2); 12 | return 0; 13 | } 14 | 15 | 16 | int __fastcall SetCommandsEnabledPacket::handle(SetCommandsEnabledPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 17 | { 18 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetCommandsEnabledPacket *))(*(_DWORD *)a3 + 276))( 19 | a3, 20 | a2, 21 | this); 22 | } 23 | -------------------------------------------------------------------------------- /unmapped/DefaultMobSpawner.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DefaultMobSpawner::DefaultMobSpawner(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int result; // r0@1 7 | 8 | v2 = a2; 9 | result = BaseMobSpawner::BaseMobSpawner(a1, 1); 10 | *(_DWORD *)result = &off_270A070; 11 | *(_DWORD *)(result + 76) = v2; 12 | return result; 13 | } 14 | 15 | 16 | void __fastcall DefaultMobSpawner::~DefaultMobSpawner(DefaultMobSpawner *this) 17 | { 18 | DefaultMobSpawner::~DefaultMobSpawner(this); 19 | } 20 | 21 | 22 | void __fastcall DefaultMobSpawner::~DefaultMobSpawner(DefaultMobSpawner *this) 23 | { 24 | BaseMobSpawner *v1; // r0@1 25 | 26 | v1 = BaseMobSpawner::~BaseMobSpawner(this); 27 | j_j_j__ZdlPv_6((void *)v1); 28 | } 29 | -------------------------------------------------------------------------------- /Minecraft/Block/BlockState.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall BlockState::initState(int result, unsigned int *a2, unsigned int a3) 4 | { 5 | if ( !*(_BYTE *)(result + 8) ) 6 | { 7 | *(_DWORD *)(result + 4) = a3; 8 | *(_DWORD *)result = *a2 + a3 - 1; 9 | *(_BYTE *)(result + 8) = 1; 10 | result = *a2 + a3; 11 | *a2 = result; 12 | } 13 | return result; 14 | } 15 | 16 | 17 | _BOOL4 __fastcall BlockState::getBool(BlockState *this, const unsigned __int8 *a2) 18 | { 19 | return ((1 << *(_DWORD *)this) & *a2) != 0; 20 | } 21 | 22 | 23 | int __fastcall BlockState::BlockState(int result) 24 | { 25 | *(_DWORD *)result = 0; 26 | *(_DWORD *)(result + 4) = 0; 27 | *(_BYTE *)(result + 8) = 0; 28 | return result; 29 | } 30 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/ChunkRadiusUpdatedPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall ChunkRadiusUpdatedPacket::getId(ChunkRadiusUpdatedPacket *this) 4 | { 5 | return 70; 6 | } 7 | 8 | 9 | int __fastcall ChunkRadiusUpdatedPacket::handle(ChunkRadiusUpdatedPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 10 | { 11 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, ChunkRadiusUpdatedPacket *))(*(_DWORD *)a3 + 320))( 12 | a3, 13 | a2, 14 | this); 15 | } 16 | 17 | 18 | int __fastcall ChunkRadiusUpdatedPacket::read(ChunkRadiusUpdatedPacket *this, BinaryStream *a2) 19 | { 20 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/RequestChunkRadiusPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall RequestChunkRadiusPacket::getId(RequestChunkRadiusPacket *this) 4 | { 5 | return 69; 6 | } 7 | 8 | 9 | int __fastcall RequestChunkRadiusPacket::handle(RequestChunkRadiusPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 10 | { 11 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, RequestChunkRadiusPacket *))(*(_DWORD *)a3 + 312))( 12 | a3, 13 | a2, 14 | this); 15 | } 16 | 17 | 18 | int __fastcall RequestChunkRadiusPacket::read(RequestChunkRadiusPacket *this, BinaryStream *a2) 19 | { 20 | *((_DWORD *)this + 4) = ReadOnlyBinaryStream::getVarInt(a2); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /unmapped/WorldMultiplayerLockState.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall WorldMultiplayerLockState::isLocked(WorldMultiplayerLockState *this) 4 | { 5 | WorldMultiplayerLockState *v1; // r4@1 6 | int result; // r0@3 7 | 8 | v1 = this; 9 | if ( LevelData::hasLockedBehaviorPack(*((LevelData **)this + 1)) 10 | || LevelData::hasLockedResourcePack(*((LevelData **)v1 + 1)) ) 11 | { 12 | result = 1; 13 | } 14 | else 15 | result = LevelData::isFromLockedTemplate(*((LevelData **)v1 + 1)); 16 | return result; 17 | } 18 | 19 | 20 | int __fastcall WorldMultiplayerLockState::WorldMultiplayerLockState(int result, int a2) 21 | { 22 | *(_DWORD *)result = &off_26E4110; 23 | *(_DWORD *)(result + 4) = a2; 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /UnitTest/FilterTestTemperatureValue.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FilterTestTemperatureValue::evaluate(int a1, int a2) 4 | { 5 | int v2; // r5@1 6 | int v3; // r4@1 7 | BlockSource *v4; // r0@1 8 | Biome *v5; // r0@2 9 | int v6; // r0@2 10 | signed int result; // r0@2 11 | 12 | v2 = a2; 13 | v3 = a1; 14 | v4 = *(BlockSource **)(a2 + 12); 15 | if ( v4 ) 16 | { 17 | v5 = (Biome *)BlockSource::getConstBiome(v4, (const BlockPos *)(a2 + 24)); 18 | v6 = Biome::getTemperature(v5, *(const BlockSource **)(v2 + 12), (const BlockPos *)(v2 + 24)); 19 | result = FilterTest::_testValuesWithOperator((FilterTest *)v3, *(float *)&v6, *(float *)(v3 + 8)); 20 | } 21 | else 22 | result = 0; 23 | return result; 24 | } 25 | -------------------------------------------------------------------------------- /unmapped/Remapping.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall Remapping::allowRemap(const void **a1) 4 | { 5 | const void **v1; // r4@1 6 | int v2; // r5@1 7 | char *v3; // r7@2 8 | int v4; // r0@2 9 | char v5; // r1@4 10 | 11 | v1 = a1; 12 | v2 = 0; 13 | while ( 1 ) 14 | { 15 | v3 = (char *)&unk_26D93B0 + v2; 16 | v4 = sub_119C9E8(v1, *(const char **)((char *)&unk_26D93B0 + v2 + 4)); 17 | if ( !v4 ) 18 | break; 19 | v2 += 12; 20 | if ( v2 == 396 ) 21 | { 22 | v5 = 1; 23 | return ((unsigned __int8)v4 | (unsigned __int8)v5) & 1; 24 | } 25 | } 26 | LOBYTE(v4) = v3[8]; 27 | v5 = 0; 28 | if ( v3[8] ) 29 | LOBYTE(v4) = 1; 30 | return ((unsigned __int8)v4 | (unsigned __int8)v5) & 1; 31 | } 32 | -------------------------------------------------------------------------------- /Minecraft/Renderer/MinecraftUICustomRenderer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall MinecraftUICustomRenderer::~MinecraftUICustomRenderer(MinecraftUICustomRenderer *this) 4 | { 5 | MinecraftUICustomRenderer::~MinecraftUICustomRenderer(this); 6 | } 7 | 8 | 9 | void __fastcall MinecraftUICustomRenderer::~MinecraftUICustomRenderer(MinecraftUICustomRenderer *this) 10 | { 11 | void *v1; // r0@1 12 | 13 | v1 = (void *)UICustomRenderer::~UICustomRenderer(this); 14 | j_j_j__ZdlPv_3(v1); 15 | } 16 | 17 | 18 | _QWORD *__fastcall MinecraftUICustomRenderer::MinecraftUICustomRenderer(_QWORD *a1) 19 | { 20 | _QWORD *result; // r0@1 21 | 22 | result = UICustomRenderer::UICustomRenderer(a1); 23 | *(_DWORD *)result = &off_26D6CDC; 24 | return result; 25 | } 26 | -------------------------------------------------------------------------------- /Minecraft/Level/DefaultLevelDrawSetupCleanupStrategy.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall DefaultLevelDrawSetupCleanupStrategy::getEyeRenderingMode(DefaultLevelDrawSetupCleanupStrategy *this) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | int __fastcall DefaultLevelDrawSetupCleanupStrategy::setupScreen(int a1, int a2) 10 | { 11 | int v2; // r4@1 12 | 13 | v2 = *(_DWORD *)(a2 + 12); 14 | ClientInstance::getViewportInfo(*(ClientInstance **)(a1 + 4)); 15 | return j_j_j__ZN3mce13RenderContext11setViewportERKNS_12ViewportInfoE(); 16 | } 17 | 18 | 19 | int __fastcall DefaultLevelDrawSetupCleanupStrategy::DefaultLevelDrawSetupCleanupStrategy(int result, int a2) 20 | { 21 | *(_DWORD *)result = &off_26E4770; 22 | *(_DWORD *)(result + 4) = a2; 23 | return result; 24 | } 25 | -------------------------------------------------------------------------------- /unmapped/PurchaseInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall PurchaseInfo::PurchaseInfo(int *a1, int *a2, int *a3, int *a4, int a5, char a6) 4 | { 5 | int *v6; // r4@1 6 | int *v7; // r7@1 7 | int *v8; // r5@1 8 | 9 | v6 = a4; 10 | v7 = a3; 11 | v8 = a1; 12 | sub_DA73B4(a1, a2); 13 | sub_DA73B4(v8 + 1, v7); 14 | sub_DA73B4(v8 + 2, v6); 15 | *((_BYTE *)v8 + 12) = a5; 16 | *((_BYTE *)v8 + 13) = a6; 17 | return v8; 18 | } 19 | 20 | 21 | int *__fastcall PurchaseInfo::PurchaseInfo(int *a1, int *a2) 22 | { 23 | int *v2; // r4@1 24 | int *v3; // r5@1 25 | 26 | v2 = a2; 27 | v3 = a1; 28 | sub_DA73B4(a1, a2); 29 | sub_DA73B4(v3 + 1, v2 + 1); 30 | sub_DA73B4(v3 + 2, v2 + 2); 31 | *((_WORD *)v3 + 6) = *((_WORD *)v2 + 6); 32 | return v3; 33 | } 34 | -------------------------------------------------------------------------------- /unmapped/RemoveOnHitSubcomponent.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall RemoveOnHitSubcomponent::RemoveOnHitSubcomponent(_DWORD *result) 4 | { 5 | *result = &off_271ECA8; 6 | return result; 7 | } 8 | 9 | 10 | unsigned int __fastcall RemoveOnHitSubcomponent::doOnHitEffect(RemoveOnHitSubcomponent *this, ProjectileComponent *a2) 11 | { 12 | int v2; // r4@1 13 | int v3; // r0@1 14 | unsigned int result; // r0@1 15 | int v5; // [sp+4h] [bp-4Ch]@1 16 | 17 | v2 = *((_DWORD *)a2 + 4); 18 | v3 = j_Entity::getProjectileComponent(*((Entity **)a2 + 4)); 19 | j_HitResult::HitResult((int)&v5, v3 + 108); 20 | result = v5 & 0xFFFFFFFE; 21 | if ( (v5 & 0xFFFFFFFE) != 2 ) 22 | result = (*(int (__fastcall **)(int))(*(_DWORD *)v2 + 44))(v2); 23 | return result; 24 | } 25 | -------------------------------------------------------------------------------- /Minecraft/Block/HayBlockBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall HayBlockBlock::HayBlockBlock(_DWORD *a1, const void **a2, char a3) 4 | { 5 | _DWORD *v3; // r6@1 6 | char v4; // r4@1 7 | const void **v5; // r5@1 8 | int v6; // r0@1 9 | 10 | v3 = a1; 11 | v4 = a3; 12 | v5 = a2; 13 | v6 = Material::getMaterial(1); 14 | RotatedPillarBlock::RotatedPillarBlock((int)v3, v5, v4, v6); 15 | *v3 = &off_270C840; 16 | return v3; 17 | } 18 | 19 | 20 | void __fastcall HayBlockBlock::~HayBlockBlock(HayBlockBlock *this) 21 | { 22 | Block *v1; // r0@1 23 | 24 | v1 = Block::~Block(this); 25 | j_j_j__ZdlPv_6((void *)v1); 26 | } 27 | 28 | 29 | void __fastcall HayBlockBlock::~HayBlockBlock(HayBlockBlock *this) 30 | { 31 | HayBlockBlock::~HayBlockBlock(this); 32 | } 33 | -------------------------------------------------------------------------------- /unmapped/MinecartRideable.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MinecartRideable::MinecartRideable(int a1, int a2, int *a3) 4 | { 5 | int result; // r0@1 6 | 7 | result = Minecart::Minecart(a1, a2, a3); 8 | *(_DWORD *)result = &off_26F3E44; 9 | *(_DWORD *)(result + 172) |= 0x100u; 10 | return result; 11 | } 12 | 13 | 14 | int __fastcall MinecartRideable::getType(MinecartRideable *this) 15 | { 16 | return 0; 17 | } 18 | 19 | 20 | void __fastcall MinecartRideable::~MinecartRideable(MinecartRideable *this) 21 | { 22 | MinecartRideable::~MinecartRideable(this); 23 | } 24 | 25 | 26 | void __fastcall MinecartRideable::~MinecartRideable(MinecartRideable *this) 27 | { 28 | Minecart *v1; // r0@1 29 | 30 | v1 = Minecart::~Minecart(this); 31 | j_j_j__ZdlPv_6((void *)v1); 32 | } 33 | -------------------------------------------------------------------------------- /unmapped/StringByteInput.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall StringByteInput::readBytes(StringByteInput *this, void *a2, unsigned int a3) 4 | { 5 | StringByteInput *v3; // r4@1 6 | void *v4; // r5@1 7 | unsigned int v5; // r6@1 8 | signed int result; // r0@2 9 | unsigned int v7; // r7@3 10 | 11 | v3 = this; 12 | v4 = a2; 13 | v5 = a3; 14 | if ( *((_DWORD *)this + 1) == *(_DWORD *)(**((_DWORD **)this + 3) - 12) ) 15 | { 16 | result = 0; 17 | } 18 | else 19 | v7 = (*(int (__fastcall **)(StringByteInput *))(*(_DWORD *)this + 44))(this); 20 | if ( v7 > v5 ) 21 | v7 = v5; 22 | _aeabi_memcpy(v4, (const char *)(**((_DWORD **)v3 + 3) + *((_DWORD *)v3 + 1)), v7); 23 | *((_DWORD *)v3 + 1) += v7; 24 | result = 1; 25 | return result; 26 | } 27 | -------------------------------------------------------------------------------- /Minecraft/Enchant/EnchantmentInstance.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EnchantmentInstance::getEnchantType(EnchantmentInstance *this) 4 | { 5 | return *(_DWORD *)this; 6 | } 7 | 8 | 9 | int __fastcall EnchantmentInstance::setEnchantLevel(int result, int a2) 10 | { 11 | *(_DWORD *)(result + 4) = a2; 12 | return result; 13 | } 14 | 15 | 16 | int __fastcall EnchantmentInstance::setEnchantType(int result, int a2) 17 | { 18 | *(_DWORD *)result = a2; 19 | return result; 20 | } 21 | 22 | 23 | _QWORD *__fastcall EnchantmentInstance::EnchantmentInstance(_QWORD *result) 24 | { 25 | *result = 28LL; 26 | return result; 27 | } 28 | 29 | 30 | _QWORD *__fastcall EnchantmentInstance::EnchantmentInstance(_QWORD *result, __int64 a2) 31 | { 32 | *result = a2; 33 | return result; 34 | } 35 | -------------------------------------------------------------------------------- /Minecraft/Network/RakNet/RakDataInput.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall RakDataInput::readBytes(RakDataInput *this, void *a2, unsigned int a3) 4 | { 5 | RakDataInput *v3; // r6@1 6 | unsigned __int8 *v4; // r4@1 7 | unsigned int v5; // r5@1 8 | signed int result; // r0@2 9 | 10 | v3 = this; 11 | v4 = (unsigned __int8 *)a2; 12 | v5 = a3; 13 | if ( (*(int (**)(void))(*(_DWORD *)this + 44))() >= a3 ) 14 | { 15 | j_RakNet::BitStream::ReadBits(*((RakNet::BitStream **)v3 + 1), v4, 8 * v5, 1); 16 | result = 1; 17 | } 18 | else 19 | result = 0; 20 | return result; 21 | } 22 | 23 | 24 | unsigned int __fastcall RakDataInput::numBytesLeft(RakDataInput *this) 25 | { 26 | return (unsigned int)(**((_DWORD **)this + 1) - *(_DWORD *)(*((_DWORD *)this + 1) + 8)) >> 3; 27 | } 28 | -------------------------------------------------------------------------------- /unmapped/FitSimpleTopRoom.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall FitSimpleTopRoom::fits(int a1, int a2) 4 | { 5 | signed int result; // r0@1 6 | 7 | result = 0; 8 | if ( !(**(_BYTE **)(*(_DWORD *)a2 + 24) & 0x3E) ) 9 | result = 1; 10 | return result; 11 | } 12 | 13 | 14 | _DWORD *__fastcall FitSimpleTopRoom::create(_DWORD *a1, int a2, int *a3, int a4) 15 | { 16 | int v4; // r4@1 17 | _DWORD *v5; // r6@1 18 | int *v6; // r5@1 19 | void *v7; // r0@1 20 | _DWORD *result; // r0@1 21 | 22 | v4 = a4; 23 | v5 = a1; 24 | v6 = a3; 25 | *(_BYTE *)(*(_DWORD *)a4 + 44) = 1; 26 | v7 = j_operator new(0x30u); 27 | result = (_DWORD *)OceanMonumentPiece::OceanMonumentPiece((int)v7, 1, v6, v4, 1, 1, 1); 28 | *v5 = result; 29 | *result = &off_2718EA4; 30 | return result; 31 | } 32 | -------------------------------------------------------------------------------- /unmapped/logger.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall logger::initializeCrashLogWriter(logger *this) 4 | { 5 | logger::initializeCrashLogWriter(this); 6 | } 7 | 8 | 9 | void __fastcall logger::initializeCrashLogWriter(logger *this) 10 | { 11 | void *v1; // r0@2 12 | 13 | if ( !byte_27C58B8 ) 14 | { 15 | v1 = dlsym((void *)0xFFFFFFFF, "__android_log_buf_write"); 16 | byte_27C58B8 = 1; 17 | dword_27C58BC = (int (__fastcall *)(_DWORD, _DWORD, _DWORD, _DWORD))v1; 18 | } 19 | } 20 | 21 | 22 | int __fastcall logger::writeToCrashLog(logger *this, const char *a2) 23 | { 24 | int result; // r0@2 25 | 26 | if ( dword_27C58BC ) 27 | result = dword_27C58BC(4, 7, "google-breakpad", this); 28 | else 29 | result = _android_log_write(7, "google-breakpad", this); 30 | return result; 31 | } 32 | -------------------------------------------------------------------------------- /unmapped/HTTPResponse.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void **__fastcall HTTPResponse::HTTPResponse(void **a1) 4 | { 5 | void **v1; // r4@1 6 | double v2; // r0@1 7 | unsigned int v3; // r0@1 8 | int v4; // r6@3 9 | void *v5; // r5@3 10 | 11 | v1 = a1; 12 | sub_DA7364(a1, (const char *)&unk_257BC67); 13 | v1[3] = 0; 14 | v1[4] = 0; 15 | v1[5] = (void *)1065353216; 16 | LODWORD(v2) = v1 + 5; 17 | *(_DWORD *)(LODWORD(v2) + 4) = 0; 18 | v3 = sub_DA7744(v2); 19 | v1[2] = (void *)v3; 20 | if ( v3 == 1 ) 21 | { 22 | v1[7] = 0; 23 | v5 = v1 + 7; 24 | } 25 | else 26 | if ( v3 >= 0x40000000 ) 27 | sub_DA7414(); 28 | v4 = 4 * v3; 29 | v5 = operator new(4 * v3); 30 | _aeabi_memclr4(v5, v4); 31 | v1[1] = v5; 32 | *((_QWORD *)v1 + 4) = 4294967196LL; 33 | return v1; 34 | } 35 | -------------------------------------------------------------------------------- /Minecraft/Level/Structure/Feature/OakFeature.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall OakFeature::place(OakFeature *this, BlockSource *a2, const BlockPos *a3, Random *a4) 4 | { 5 | Random *v4; // r4@1 6 | TreeFeature *v5; // r7@1 7 | const BlockPos *v6; // r5@1 8 | BlockSource *v7; // r6@1 9 | unsigned int v8; // kr00_4@1 10 | 11 | v4 = a4; 12 | v5 = this; 13 | v6 = a3; 14 | v7 = a2; 15 | v8 = Random::_genRandInt32(a4); 16 | return TreeFeature::place(v5, v7, v6, v4, v8 % 3 | 4); 17 | } 18 | 19 | 20 | void __fastcall OakFeature::~OakFeature(OakFeature *this) 21 | { 22 | void *v1; // r0@1 23 | 24 | v1 = (void *)Feature::~Feature(this); 25 | j_j_j__ZdlPv_6(v1); 26 | } 27 | 28 | 29 | void __fastcall OakFeature::~OakFeature(OakFeature *this) 30 | { 31 | OakFeature::~OakFeature(this); 32 | } 33 | -------------------------------------------------------------------------------- /Minecraft/Block/GlassBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall GlassBlock::getResourceCount(GlassBlock *this, Random *a2, int a3, int a4) 4 | { 5 | return 0; 6 | } 7 | 8 | 9 | void __fastcall GlassBlock::~GlassBlock(GlassBlock *this) 10 | { 11 | GlassBlock::~GlassBlock(this); 12 | } 13 | 14 | 15 | int __fastcall GlassBlock::GlassBlock(int a1, const void **a2, char a3, int a4) 16 | { 17 | int v4; // r4@1 18 | 19 | v4 = a1; 20 | Block::Block(a1, a2, a3, a4); 21 | *(_DWORD *)v4 = &off_270BE2C; 22 | *(_DWORD *)(v4 + 20) = 1; 23 | Block::setSolid((Block *)v4, 0); 24 | Block::setPushesOutItems((Block *)v4, 1); 25 | return v4; 26 | } 27 | 28 | 29 | void __fastcall GlassBlock::~GlassBlock(GlassBlock *this) 30 | { 31 | Block *v1; // r0@1 32 | 33 | v1 = Block::~Block(this); 34 | j_j_j__ZdlPv_6((void *)v1); 35 | } 36 | -------------------------------------------------------------------------------- /unmapped/Easing.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall Easing::getEasingFunc(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int result; // r0@1 7 | int v4; // r5@1 8 | int v5; // r6@1 9 | void (__fastcall *v6)(int, int, signed int); // r3@1 10 | int *v7; // r6@1 11 | void (__fastcall *v8)(int, int, signed int); // t1@1 12 | 13 | v2 = a1; 14 | *(_DWORD *)(a1 + 8) = 0; 15 | result = Easing::mEasingFuncs; 16 | v4 = Easing::mEasingFuncs + 16 * a2; 17 | v5 = Easing::mEasingFuncs + 16 * a2; 18 | v8 = *(void (__fastcall **)(int, int, signed int))(v5 + 8); 19 | v7 = (int *)(v5 + 8); 20 | v6 = v8; 21 | if ( v8 ) 22 | { 23 | v6(v2, Easing::mEasingFuncs + 16 * a2, 2); 24 | *(_DWORD *)(v2 + 12) = *(_DWORD *)(v4 + 12); 25 | result = *v7; 26 | *(_DWORD *)(v2 + 8) = *v7; 27 | } 28 | return result; 29 | } 30 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/RemoveEntityPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall RemoveEntityPacket::read(RemoveEntityPacket *this, BinaryStream *a2) 4 | { 5 | RemoveEntityPacket *v2; // r4@1 6 | int v4; // [sp+0h] [bp-10h]@1 7 | 8 | v2 = this; 9 | ReadOnlyBinaryStream::getType((int)&v4, (int)a2); 10 | *((_QWORD *)v2 + 2) = *(_QWORD *)&v4; 11 | return 0; 12 | } 13 | 14 | 15 | signed int __fastcall RemoveEntityPacket::getId(RemoveEntityPacket *this) 16 | { 17 | return 14; 18 | } 19 | 20 | 21 | int __fastcall RemoveEntityPacket::handle(RemoveEntityPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 22 | { 23 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, RemoveEntityPacket *))(*(_DWORD *)a3 + 112))( 24 | a3, 25 | a2, 26 | this); 27 | } 28 | -------------------------------------------------------------------------------- /unmapped/MossStoneSelector.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MossStoneSelector::next(MossStoneSelector *this, Random *a2, int a3, int a4, int a5, bool a6) 4 | { 5 | MossStoneSelector *v6; // r4@1 6 | _DWORD *v12; // r0@1 7 | int result; // r0@3 8 | 9 | v6 = this; 10 | _R0 = j_Random::_genRandInt32(a2); 11 | __asm 12 | { 13 | VMOV S0, R0 14 | VLDR D1, =2.32830644e-10 15 | VCVT.F64.U32 D0, S0 16 | } 17 | v12 = &Block::mMossyCobblestone; 18 | VMUL.F64 D0, D0, D1 19 | VCVT.F32.F64 S0, D0 20 | VLDR S2, =0.4 21 | VCMPE.F32 S0, S2 22 | VMRS APSR_nzcv, FPSCR 23 | if ( _NF ^ _VF ) 24 | v12 = &Block::mCobblestone; 25 | *((_BYTE *)v6 + 4) = *(_BYTE *)(*v12 + 4); 26 | result = 0; 27 | *((_BYTE *)v6 + 5) = 0; 28 | return result; 29 | } 30 | -------------------------------------------------------------------------------- /UnitTest/EntityHasDamageTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityHasDamageTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | Entity *v3; // r0@1 7 | DamageSensorComponent *v4; // r0@2 8 | signed int v5; // r1@4 9 | int result; // r0@5 10 | int v7; // r0@6 11 | 12 | v2 = a1; 13 | v3 = *(Entity **)(a2 + 4); 14 | if ( v3 && (v4 = (DamageSensorComponent *)j_Entity::getDamageSensorComponent(v3)) != 0 ) 15 | { 16 | if ( *(_DWORD *)(v2 + 8) == -2 ) 17 | { 18 | v5 = j_DamageSensorComponent::isFatal(v4); 19 | } 20 | else 21 | v7 = j_DamageSensorComponent::getCause(v4); 22 | v5 = 0; 23 | if ( v7 == *(_DWORD *)(v2 + 8) ) 24 | v5 = 1; 25 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v2, v5, 1); 26 | } 27 | else 28 | result = 0; 29 | return result; 30 | } 31 | -------------------------------------------------------------------------------- /unmapped/MossyStoneSelector.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MossyStoneSelector::next(MossyStoneSelector *this, Random *a2, int a3, int a4, int a5, bool a6) 4 | { 5 | MossyStoneSelector *v6; // r4@1 6 | _DWORD *v12; // r0@1 7 | int result; // r0@3 8 | 9 | v6 = this; 10 | _R0 = j_Random::_genRandInt32(a2); 11 | __asm 12 | { 13 | VMOV S0, R0 14 | VLDR D1, =2.32830644e-10 15 | VCVT.F64.U32 D0, S0 16 | } 17 | v12 = &Block::mMossyCobblestone; 18 | VMUL.F64 D0, D0, D1 19 | VCVT.F32.F64 S0, D0 20 | VLDR S2, =0.4 21 | VCMPE.F32 S0, S2 22 | VMRS APSR_nzcv, FPSCR 23 | if ( _NF ^ _VF ) 24 | v12 = &Block::mCobblestone; 25 | *((_BYTE *)v6 + 4) = *(_BYTE *)(*v12 + 4); 26 | result = 0; 27 | *((_BYTE *)v6 + 5) = 0; 28 | return result; 29 | } 30 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/MapInfoRequestPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MapInfoRequestPacket::read(MapInfoRequestPacket *this, BinaryStream *a2) 4 | { 5 | MapInfoRequestPacket *v2; // r4@1 6 | int v4; // [sp+0h] [bp-10h]@1 7 | 8 | v2 = this; 9 | ReadOnlyBinaryStream::getType((int)&v4, (int)a2); 10 | *((_QWORD *)v2 + 2) = *(_QWORD *)&v4; 11 | return 0; 12 | } 13 | 14 | 15 | int __fastcall MapInfoRequestPacket::handle(MapInfoRequestPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 16 | { 17 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, MapInfoRequestPacket *))(*(_DWORD *)a3 + 316))( 18 | a3, 19 | a2, 20 | this); 21 | } 22 | 23 | 24 | signed int __fastcall MapInfoRequestPacket::getId(MapInfoRequestPacket *this) 25 | { 26 | return 68; 27 | } 28 | -------------------------------------------------------------------------------- /unmapped/RandomThreadCheckManager.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall RandomThreadCheckManager::~RandomThreadCheckManager(RandomThreadCheckManager *this) 4 | { 5 | RandomThreadCheckManager::~RandomThreadCheckManager(this); 6 | } 7 | 8 | 9 | unsigned int *__fastcall RandomThreadCheckManager::onAppResumed(RandomThreadCheckManager *this) 10 | { 11 | unsigned int *result; // r0@1 12 | unsigned int v2; // r1@2 13 | 14 | result = (unsigned int *)((char *)this + 8); 15 | __dmb(); 16 | do 17 | v2 = __ldrex(result); 18 | while ( __strex(v2 + 1, result) ); 19 | return result; 20 | } 21 | 22 | 23 | void __fastcall RandomThreadCheckManager::~RandomThreadCheckManager(RandomThreadCheckManager *this) 24 | { 25 | AppPlatformListener *v1; // r0@1 26 | 27 | v1 = AppPlatformListener::~AppPlatformListener(this); 28 | j_j_j__ZdlPv_3((void *)v1); 29 | } 30 | -------------------------------------------------------------------------------- /Minecraft/Item/ComplexItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall ComplexItem::~ComplexItem(ComplexItem *this) 4 | { 5 | ComplexItem::~ComplexItem(this); 6 | } 7 | 8 | 9 | int __fastcall ComplexItem::getUpdatePacket(int result, const ItemInstance *a2, Level *a3, Entity *a4) 10 | { 11 | *(_DWORD *)result = 0; 12 | return result; 13 | } 14 | 15 | 16 | void __fastcall ComplexItem::~ComplexItem(ComplexItem *this) 17 | { 18 | Item *v1; // r0@1 19 | 20 | v1 = j_Item::~Item(this); 21 | j_j_j__ZdlPv_7((void *)v1); 22 | } 23 | 24 | 25 | _DWORD *__fastcall ComplexItem::ComplexItem(int a1, const void **a2, __int16 a3) 26 | { 27 | _DWORD *result; // r0@1 28 | 29 | result = (_DWORD *)j_Item::Item(a1, a2, a3); 30 | *result = &off_2720AB0; 31 | return result; 32 | } 33 | 34 | 35 | signed int __fastcall ComplexItem::isComplex(ComplexItem *this) 36 | { 37 | return 1; 38 | } 39 | -------------------------------------------------------------------------------- /Minecraft/IO/ZlibFileAccessWrapper.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ZlibFileAccessWrapper::getZipFunctions(ZlibFileAccessWrapper *this) 4 | { 5 | return *(_DWORD *)this; 6 | } 7 | 8 | 9 | int __fastcall ZlibFileAccessWrapper::ZlibFileAccessWrapper(__int64 a1) 10 | { 11 | int v1; // r4@1 12 | _DWORD *v2; // r5@2 13 | 14 | v1 = a1; 15 | LODWORD(a1) = 0; 16 | *(_QWORD *)v1 = a1; 17 | if ( HIDWORD(a1) ) 18 | { 19 | v2 = operator new(0x2Cu); 20 | _aeabi_memclr4(v2, 44); 21 | *(_DWORD *)v1 = v2; 22 | *v2 = sub_15E7008; 23 | v2[1] = sub_15E7130; 24 | v2[2] = sub_15E7154; 25 | *(_DWORD *)(*(_DWORD *)v1 + 12) = sub_15E7178; 26 | *(_DWORD *)(*(_DWORD *)v1 + 16) = sub_15E7180; 27 | *(_DWORD *)(*(_DWORD *)v1 + 20) = sub_15E719C; 28 | *(_DWORD *)(*(_DWORD *)v1 + 24) = sub_15E71A4; 29 | *(_DWORD *)(*(_DWORD *)v1 + 28) = v1; 30 | } 31 | return v1; 32 | } 33 | -------------------------------------------------------------------------------- /unmapped/PingedCompatibleServer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PingedCompatibleServer::PingedCompatibleServer(int a1) 4 | { 5 | int v1; // r5@1 6 | 7 | v1 = a1; 8 | *(_DWORD *)(a1 + 16) = &unk_28898CC; 9 | *(_DWORD *)a1 = &unk_28898CC; 10 | *(_DWORD *)(a1 + 4) = &unk_28898CC; 11 | RakNet::SystemAddress::SystemAddress((RakNet::SystemAddress *)(a1 + 28)); 12 | *(_DWORD *)(v1 + 164) = -1082130432; 13 | RakNet::RakNetGUID::RakNetGUID((RakNet::RakNetGUID *)(v1 + 168)); 14 | return v1; 15 | } 16 | 17 | 18 | int *__fastcall PingedCompatibleServer::PingedCompatibleServer(int *a1, int *a2) 19 | { 20 | int *v2; // r4@1 21 | int *v3; // r5@1 22 | 23 | v2 = a2; 24 | v3 = a1; 25 | sub_119C854(a1, a2); 26 | sub_119C854(v3 + 1, v2 + 1); 27 | *((_QWORD *)v3 + 1) = *((_QWORD *)v2 + 1); 28 | sub_119C854(v3 + 4, v2 + 4); 29 | _aeabi_memcpy4(v3 + 5, v2 + 5, 164); 30 | return v3; 31 | } 32 | -------------------------------------------------------------------------------- /Minecraft/Block/BookshelfBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall BookshelfBlock::BookshelfBlock(_DWORD *a1, const void **a2, char a3) 4 | { 5 | _DWORD *v3; // r6@1 6 | char v4; // r4@1 7 | const void **v5; // r5@1 8 | int v6; // r0@1 9 | 10 | v3 = a1; 11 | v4 = a3; 12 | v5 = a2; 13 | v6 = Material::getMaterial(2); 14 | Block::Block((int)v3, v5, v4, v6); 15 | *v3 = &loc_2704CC0; 16 | return v3; 17 | } 18 | 19 | 20 | void __fastcall BookshelfBlock::~BookshelfBlock(BookshelfBlock *this) 21 | { 22 | BookshelfBlock::~BookshelfBlock(this); 23 | } 24 | 25 | 26 | void __fastcall BookshelfBlock::~BookshelfBlock(BookshelfBlock *this) 27 | { 28 | Block *v1; // r0@1 29 | 30 | v1 = Block::~Block(this); 31 | j_j_j__ZdlPv_6((void *)v1); 32 | } 33 | 34 | 35 | signed int __fastcall BookshelfBlock::getResourceCount(BookshelfBlock *this, Random *a2, int a3, int a4) 36 | { 37 | return 3; 38 | } 39 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/RespawnPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall RespawnPacket::handle(RespawnPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, RespawnPacket *))(*(_DWORD *)a3 + 436))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | int __fastcall RespawnPacket::read(RespawnPacket *this, BinaryStream *a2) 13 | { 14 | RespawnPacket *v2; // r4@1 15 | int v4; // [sp+4h] [bp-14h]@1 16 | int v5; // [sp+8h] [bp-10h]@1 17 | int v6; // [sp+Ch] [bp-Ch]@1 18 | 19 | v2 = this; 20 | ReadOnlyBinaryStream::getType((int)&v4, (int)a2); 21 | *((_DWORD *)v2 + 4) = v4; 22 | *((_DWORD *)v2 + 5) = v5; 23 | *((_DWORD *)v2 + 6) = v6; 24 | return 0; 25 | } 26 | 27 | 28 | signed int __fastcall RespawnPacket::getId(RespawnPacket *this) 29 | { 30 | return 45; 31 | } 32 | -------------------------------------------------------------------------------- /Minecraft/Client/Sound/DeferredSound.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall DeferredSound::DeferredSound(float a1, int *a2, int a3, int a4, int a5) 4 | { 5 | int v5; // r4@1 6 | int v6; // r5@1 7 | int *result; // r0@1 8 | int *v12; // r12@1 9 | int v13; // r2@1 10 | int v14; // r3@1 11 | 12 | v5 = a4; 13 | v6 = a3; 14 | result = sub_21E8AF4((int *)LODWORD(a1), a2); 15 | __asm { VLDR S0, [SP,#0x10+arg_0] } 16 | v12 = result + 1; 17 | v13 = *(_DWORD *)(v6 + 4); 18 | v14 = *(_DWORD *)(v6 + 8); 19 | *v12 = *(_DWORD *)v6; 20 | v12[1] = v13; 21 | v12[2] = v14; 22 | v12[3] = v5; 23 | __asm { VSTR S0, [R0,#0x14] } 24 | return result; 25 | } 26 | 27 | 28 | int __fastcall DeferredSound::DeferredSound(int result) 29 | { 30 | *(_QWORD *)result = (unsigned int)&unk_28898CC; 31 | *(_DWORD *)(result + 8) = 0; 32 | *(_DWORD *)(result + 12) = 0; 33 | return result; 34 | } 35 | -------------------------------------------------------------------------------- /unmapped/ScreenContext.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ScreenContext::ScreenContext(UIScreenContext *a1, int a2, int a3, int a4, __int64 a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12, int a13, int a14, float a15) 4 | { 5 | int v15; // r4@1 6 | int v16; // r5@1 7 | int v17; // r6@1 8 | int result; // r0@1 9 | int v19; // r2@1 10 | 11 | v15 = a4; 12 | v16 = a3; 13 | v17 = a2; 14 | result = UIScreenContext::UIScreenContext(a1, a13, a14, a15); 15 | *(_DWORD *)(result + 12) = v17; 16 | *(_DWORD *)(result + 16) = v16; 17 | *(_DWORD *)(result + 20) = v15; 18 | *(_QWORD *)(result + 24) = a5; 19 | *(_DWORD *)(result + 32) = a6; 20 | v19 = result + 36; 21 | *(_DWORD *)v19 = a7; 22 | *(_DWORD *)(v19 + 4) = a8; 23 | *(_DWORD *)(v19 + 8) = a11; 24 | *(_DWORD *)(result + 48) = a9; 25 | *(_DWORD *)(result + 52) = a10; 26 | *(_DWORD *)(result + 56) = a12; 27 | return result; 28 | } 29 | -------------------------------------------------------------------------------- /UnitTest/TestKeyboardManager.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall TestKeyboardManager::getKeyboardHeight(TestKeyboardManager *this) 4 | { 5 | return 0; 6 | } 7 | 8 | 9 | int __fastcall TestKeyboardManager::tryClaimKeyboardOwnership(TestKeyboardManager *this) 10 | { 11 | return 0; 12 | } 13 | 14 | 15 | int __fastcall TestKeyboardManager::isKeyboardActive(TestKeyboardManager *this) 16 | { 17 | return 0; 18 | } 19 | 20 | 21 | int __fastcall TestKeyboardManager::isFullScreenKeyboard(TestKeyboardManager *this) 22 | { 23 | return 0; 24 | } 25 | 26 | 27 | int __fastcall TestKeyboardManager::canActivateKeyboard(TestKeyboardManager *this) 28 | { 29 | return 0; 30 | } 31 | 32 | 33 | int __fastcall TestKeyboardManager::getKeyboardClosedEvent(TestKeyboardManager *this) 34 | { 35 | return 0; 36 | } 37 | 38 | 39 | int __fastcall TestKeyboardManager::isKeyboardEnabled(TestKeyboardManager *this) 40 | { 41 | return 0; 42 | } 43 | -------------------------------------------------------------------------------- /UnitTest/EntityIsOwnerTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsOwnerTest::evaluate(int a1, int a2) 4 | { 5 | Entity *v2; // r6@0 6 | Entity *v3; // r7@1 7 | int v4; // r4@1 8 | bool v5; // zf@1 9 | int v6; // r5@4 10 | Entity *v7; // r0@5 11 | char *v8; // r7@5 12 | int result; // r0@7 13 | 14 | v3 = *(Entity **)a2; 15 | v4 = a1; 16 | v5 = *(_DWORD *)a2 == 0; 17 | if ( *(_DWORD *)a2 ) 18 | { 19 | v2 = *(Entity **)(a2 + 4); 20 | v5 = v2 == 0; 21 | } 22 | if ( v5 ) 23 | result = 0; 24 | else 25 | v6 = 0; 26 | if ( j_Entity::getOwner(*(Entity **)a2) ) 27 | { 28 | v7 = (Entity *)j_Entity::getOwner(v3); 29 | v8 = j_Entity::getUniqueID(v7); 30 | if ( *(_QWORD *)v8 == *(_QWORD *)j_Entity::getUniqueID(v2) ) 31 | v6 = 1; 32 | } 33 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v4, v6, *(_BYTE *)(v4 + 8)); 34 | return result; 35 | } 36 | -------------------------------------------------------------------------------- /unmapped/SharedConstants.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SharedConstants::getVersionCode(SharedConstants *this) 4 | { 5 | return 10200081; 6 | } 7 | 8 | 9 | unsigned int __fastcall SharedConstants::isVersion(SharedConstants *this, int a2, int a3, int a4, int a5) 10 | { 11 | bool v5; // zf@1 12 | signed int v6; // r2@1 13 | signed int v7; // r1@3 14 | signed int v8; // r12@3 15 | unsigned int v9; // r0@7 16 | 17 | v5 = a3 == 0; 18 | v6 = 0; 19 | if ( v5 ) 20 | v6 = 1; 21 | v5 = a2 == 2; 22 | v7 = 0; 23 | v8 = 0; 24 | v7 = 1; 25 | if ( this != (SharedConstants *)1 ) 26 | this = 0; 27 | v9 = (unsigned int)this & v7; 28 | if ( a4 == 81 ) 29 | v8 = 1; 30 | return v9 & v6 & v8; 31 | } 32 | 33 | 34 | int __fastcall SharedConstants::getVersionCode(SharedConstants *this, int a2, int a3, int a4, int a5) 35 | { 36 | return 10000000 * (_DWORD)this + 100000 * a2 + 1000 * a3 + a4; 37 | } 38 | -------------------------------------------------------------------------------- /UnitTest/EntityIsTargetTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityIsTargetTest::evaluate(int a1, int a2) 4 | { 5 | Entity *v2; // r6@0 6 | Entity *v3; // r7@1 7 | int v4; // r4@1 8 | bool v5; // zf@1 9 | int v6; // r5@4 10 | Entity *v7; // r0@5 11 | char *v8; // r7@5 12 | int result; // r0@7 13 | 14 | v3 = *(Entity **)a2; 15 | v4 = a1; 16 | v5 = *(_DWORD *)a2 == 0; 17 | if ( *(_DWORD *)a2 ) 18 | { 19 | v2 = *(Entity **)(a2 + 4); 20 | v5 = v2 == 0; 21 | } 22 | if ( v5 ) 23 | result = 0; 24 | else 25 | v6 = 0; 26 | if ( j_Entity::getTarget(*(Entity **)a2) ) 27 | { 28 | v7 = (Entity *)j_Entity::getTarget(v3); 29 | v8 = j_Entity::getUniqueID(v7); 30 | if ( *(_QWORD *)v8 == *(_QWORD *)j_Entity::getUniqueID(v2) ) 31 | v6 = 1; 32 | } 33 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v4, v6, *(_BYTE *)(v4 + 8)); 34 | return result; 35 | } 36 | -------------------------------------------------------------------------------- /unmapped/ItemTransferData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | ItemInstance *__fastcall ItemTransferData::ItemTransferData(ItemInstance *a1, int a2) 4 | { 5 | int v2; // r5@1 6 | ItemInstance *v3; // r4@1 7 | 8 | v2 = a2; 9 | v3 = a1; 10 | ItemInstance::ItemInstance(a1, a2); 11 | sub_21E8AF4((int *)v3 + 18, (int *)(v2 + 72)); 12 | *((_DWORD *)v3 + 19) = *(_DWORD *)(v2 + 76); 13 | sub_21E8AF4((int *)v3 + 20, (int *)(v2 + 80)); 14 | *((_DWORD *)v3 + 21) = *(_DWORD *)(v2 + 84); 15 | return v3; 16 | } 17 | 18 | 19 | ItemInstance *__fastcall ItemTransferData::ItemTransferData(ItemInstance *a1) 20 | { 21 | ItemInstance *v1; // r4@1 22 | 23 | v1 = a1; 24 | ItemInstance::ItemInstance(a1, (int)&ItemInstance::EMPTY_ITEM); 25 | sub_21E8AF4((int *)v1 + 18, (int *)&Util::EMPTY_STRING); 26 | *((_DWORD *)v1 + 19) = -1; 27 | sub_21E8AF4((int *)v1 + 20, (int *)&Util::EMPTY_STRING); 28 | *((_DWORD *)v1 + 21) = -1; 29 | return v1; 30 | } 31 | -------------------------------------------------------------------------------- /unmapped/DBChunkStorageKey.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DBChunkStorageKey::DBChunkStorageKey(int a1, LevelChunk *a2) 4 | { 5 | LevelChunk *v2; // r4@1 6 | int v3; // r5@1 7 | char *v4; // r6@1 8 | int v5; // r0@1 9 | 10 | v2 = a2; 11 | v3 = a1; 12 | v4 = j_LevelChunk::getPosition(a2); 13 | v5 = j_LevelChunk::getDimensionId(v2); 14 | *(_QWORD *)v3 = *(_QWORD *)v4; 15 | *(_DWORD *)(v3 + 8) = v5; 16 | return v3; 17 | } 18 | 19 | 20 | int __fastcall DBChunkStorageKey::asSpan(int result, int a2) 21 | { 22 | signed int v2; // r3@1 23 | 24 | v2 = 12; 25 | if ( !*(_DWORD *)(a2 + 8) ) 26 | v2 = 8; 27 | *(_DWORD *)result = v2; 28 | *(_DWORD *)(result + 4) = a2; 29 | return result; 30 | } 31 | 32 | 33 | int __fastcall DBChunkStorageKey::DBChunkStorageKey(int result, const ChunkPos *a2, int a3) 34 | { 35 | *(_QWORD *)result = *(_QWORD *)a2; 36 | *(_DWORD *)(result + 8) = a3; 37 | return result; 38 | } 39 | -------------------------------------------------------------------------------- /unmapped/DirtyTicksCounter.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DirtyTicksCounter::touch(int result) 4 | { 5 | int v1; // r1@1 6 | 7 | v1 = *(_DWORD *)result; 8 | if ( *(_DWORD *)result <= -1 ) 9 | { 10 | v1 = 0; 11 | *(_DWORD *)result = 0; 12 | } 13 | *(_DWORD *)(result + 4) = v1; 14 | return result; 15 | } 16 | 17 | 18 | _QWORD *__fastcall DirtyTicksCounter::DirtyTicksCounter(_QWORD *result) 19 | { 20 | *result = 0x80000000LL; 21 | return result; 22 | } 23 | 24 | 25 | int __fastcall DirtyTicksCounter::getTotalDirtyTicks(DirtyTicksCounter *this) 26 | { 27 | return *(_DWORD *)this; 28 | } 29 | 30 | 31 | int __fastcall DirtyTicksCounter::max(int result) 32 | { 33 | *(_DWORD *)result = 0x7FFFFFFF; 34 | *(_DWORD *)(result + 4) = 0x7FFFFFFF; 35 | return result; 36 | } 37 | 38 | 39 | int __fastcall DirtyTicksCounter::reset(int result) 40 | { 41 | *(_QWORD *)result = 0x80000000LL; 42 | return result; 43 | } 44 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/Packet.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall Packet::readWithHeader(Packet *this, BinaryStream *a2) 4 | { 5 | BinaryStream *v2; // r4@1 6 | Packet *v3; // r5@1 7 | int v4; // r0@1 8 | signed int v5; // r1@1 9 | 10 | v2 = a2; 11 | v3 = this; 12 | *((_BYTE *)this + 12) = ReadOnlyBinaryStream::getByte(a2); 13 | v4 = (*(int (__fastcall **)(Packet *, BinaryStream *))(*(_DWORD *)v3 + 20))(v3, v2); 14 | v5 = 0; 15 | if ( v4 != 1 ) 16 | v5 = 1; 17 | return v5; 18 | } 19 | 20 | 21 | int __fastcall Packet::disallowBatching(Packet *this) 22 | { 23 | return 0; 24 | } 25 | 26 | 27 | int __fastcall Packet::writeWithHeader(Packet *this, BinaryStream *a2) 28 | { 29 | Packet *v2; // r5@1 30 | BinaryStream *v3; // r4@1 31 | 32 | v2 = this; 33 | v3 = a2; 34 | BinaryStream::writeByte(a2, *((_BYTE *)this + 12)); 35 | return (*(int (__fastcall **)(Packet *, BinaryStream *))(*(_DWORD *)v2 + 16))(v2, v3); 36 | } 37 | -------------------------------------------------------------------------------- /UnitTest/EntityUndergroundTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityUndergroundTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r5@1 6 | int v3; // r4@1 7 | int v4; // r6@2 8 | float v5; // r1@2 9 | int v6; // r8@2 10 | float v7; // r1@2 11 | int v8; // r7@2 12 | float v9; // r1@2 13 | int v10; // r0@2 14 | signed int v11; // r0@2 15 | int result; // r0@2 16 | 17 | v2 = a2; 18 | v3 = a1; 19 | if ( *(_DWORD *)(a2 + 12) ) 20 | { 21 | v4 = (*(int (**)(void))(**(_DWORD **)(a2 + 4) + 52))(); 22 | v6 = j_mce::Math::floor(*(mce::Math **)v4, v5); 23 | v8 = j_mce::Math::floor(*(mce::Math **)(v4 + 4), v7); 24 | v10 = j_mce::Math::floor(*(mce::Math **)(v4 + 8), v9); 25 | v11 = j_BlockSource::canSeeSky(*(BlockSource **)(v2 + 12), v6, v8, v10); 26 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v3, v11 ^ 1, *(_BYTE *)(v3 + 8)); 27 | } 28 | else 29 | result = 0; 30 | return result; 31 | } 32 | -------------------------------------------------------------------------------- /Minecraft/Block/ClayBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall ClayBlock::getResourceCount(ClayBlock *this, Random *a2, int a3, int a4) 4 | { 5 | return 4; 6 | } 7 | 8 | 9 | void __fastcall ClayBlock::~ClayBlock(ClayBlock *this) 10 | { 11 | ClayBlock::~ClayBlock(this); 12 | } 13 | 14 | 15 | signed int __fastcall ClayBlock::canBeOriginalSurface(ClayBlock *this) 16 | { 17 | return 1; 18 | } 19 | 20 | 21 | _DWORD *__fastcall ClayBlock::ClayBlock(_DWORD *a1, const void **a2, char a3) 22 | { 23 | _DWORD *v3; // r6@1 24 | char v4; // r4@1 25 | const void **v5; // r5@1 26 | int v6; // r0@1 27 | 28 | v3 = a1; 29 | v4 = a3; 30 | v5 = a2; 31 | v6 = Material::getMaterial(23); 32 | Block::Block((int)v3, v5, v4, v6); 33 | *v3 = &loc_2705ECC; 34 | return v3; 35 | } 36 | 37 | 38 | void __fastcall ClayBlock::~ClayBlock(ClayBlock *this) 39 | { 40 | Block *v1; // r0@1 41 | 42 | v1 = Block::~Block(this); 43 | j_j_j__ZdlPv_6((void *)v1); 44 | } 45 | -------------------------------------------------------------------------------- /unmapped/LootPoolTiers.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall LootPoolTiers::deserialize(int **a1, Json::Value *a2) 4 | { 5 | int **v2; // r4@1 6 | Json::Value *v3; // r6@1 7 | int *v4; // r0@1 8 | int *v5; // r5@1 9 | Json::Value *v6; // r0@1 10 | Json::Value *v7; // r0@1 11 | Json::Value *v8; // r0@1 12 | int result; // r0@1 13 | 14 | v2 = a1; 15 | v3 = a2; 16 | v4 = (int *)j_operator new(0xCu); 17 | v5 = v4; 18 | *v4 = 0; 19 | v4[1] = 0; 20 | v4[2] = 0; 21 | *v2 = v4; 22 | v6 = (Json::Value *)j_Json::Value::operator[](v3, "initial_range"); 23 | *v5 = j_Json::Value::asInt(v6, 0); 24 | v7 = (Json::Value *)j_Json::Value::operator[](v3, "bonus_rolls"); 25 | v5[1] = j_Json::Value::asInt(v7, 0); 26 | v8 = (Json::Value *)j_Json::Value::operator[](v3, "bonus_chance"); 27 | result = j_Json::Value::asFloat(v8, 0.0); 28 | __asm 29 | { 30 | VMOV S0, R0 31 | VSTR S0, [R5,#8] 32 | } 33 | return result; 34 | } 35 | -------------------------------------------------------------------------------- /unmapped/PrintStream.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall PrintStream::println(int a1) 4 | { 5 | int v1; // r4@1 6 | void (__fastcall *v2)(int, int *); // r5@1 7 | void *v3; // r0@1 8 | unsigned int *v4; // r2@3 9 | signed int v5; // r1@5 10 | int v6; // [sp+4h] [bp-1Ch]@1 11 | 12 | v1 = a1; 13 | (*(void (**)(void))(*(_DWORD *)a1 + 8))(); 14 | v2 = *(void (__fastcall **)(int, int *))(*(_DWORD *)v1 + 8); 15 | sub_21E94B4((void **)&v6, "\n"); 16 | v2(v1, &v6); 17 | v3 = (void *)(v6 - 12); 18 | if ( (int *)(v6 - 12) != &dword_28898C0 ) 19 | { 20 | v4 = (unsigned int *)(v6 - 4); 21 | if ( &pthread_create ) 22 | { 23 | __dmb(); 24 | do 25 | v5 = __ldrex(v4); 26 | while ( __strex(v5 - 1, v4) ); 27 | } 28 | else 29 | v5 = (*v4)--; 30 | if ( v5 <= 0 ) 31 | j_j_j_j__ZdlPv_9(v3); 32 | } 33 | } 34 | 35 | 36 | void __fastcall PrintStream::println(int a1) 37 | { 38 | PrintStream::println(a1); 39 | } 40 | -------------------------------------------------------------------------------- /unmapped/PackErrorFactory.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PackErrorFactory::createPackError(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int result; // r0@3 7 | int v4; // [sp+4h] [bp-1Ch]@4 8 | int v5; // [sp+8h] [bp-18h]@4 9 | int v6; // [sp+Ch] [bp-14h]@3 10 | int v7; // [sp+10h] [bp-10h]@3 11 | 12 | v2 = a1; 13 | if ( a2 == 4 ) 14 | { 15 | j__ZNSt12__shared_ptrI11UIPackErrorLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt19_Sp_make_shared_tagRKT_DpOT0_((int)&v4); 16 | *(_DWORD *)v2 = v4; 17 | result = v5; 18 | v5 = 0; 19 | *(_DWORD *)(v2 + 4) = result; 20 | v4 = 0; 21 | } 22 | else if ( a2 == 2 ) 23 | j__ZNSt12__shared_ptrI18PackDiscoveryErrorLN9__gnu_cxx12_Lock_policyE2EEC2ISaIS0_EJEEESt19_Sp_make_shared_tagRKT_DpOT0_((int)&v6); 24 | *(_DWORD *)v2 = v6; 25 | result = v7; 26 | v7 = 0; 27 | v6 = 0; 28 | else 29 | result = 0; 30 | *(_DWORD *)v2 = 0; 31 | *(_DWORD *)(v2 + 4) = 0; 32 | return result; 33 | } 34 | -------------------------------------------------------------------------------- /unmapped/EnumOption.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall EnumOption::~EnumOption(EnumOption *this) 4 | { 5 | EnumOption::~EnumOption(this); 6 | } 7 | 8 | 9 | void __fastcall EnumOption::~EnumOption(EnumOption *this) 10 | { 11 | EnumOption *v1; // r4@1 12 | void (*v2)(void); // r3@1 13 | void *v3; // r0@3 14 | 15 | v1 = this; 16 | *(_DWORD *)this = &off_26D9A6C; 17 | v2 = (void (*)(void))*((_DWORD *)this + 27); 18 | if ( v2 ) 19 | v2(); 20 | v3 = (void *)*((_DWORD *)v1 + 22); 21 | if ( v3 ) 22 | operator delete(v3); 23 | Option::~Option(v1); 24 | j_j_j__ZdlPv_4((void *)v1); 25 | } 26 | 27 | 28 | int __fastcall EnumOption::EnumOption(int a1, unsigned int a2, unsigned int a3, int a4, int *a5, int *a6, int a7, __int64 *a8, int a9) 29 | { 30 | int v9; // r4@1 31 | 32 | v9 = a1; 33 | IntOption::IntOption(a1, a2, a3, a4, a5, a6, a7, a8, 1); 34 | *(_DWORD *)v9 = &off_26D9A88; 35 | *(_DWORD *)(v9 + 116) = a9; 36 | Option::setOptionType(v9, 6); 37 | return v9; 38 | } 39 | -------------------------------------------------------------------------------- /unmapped/JumpControl.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall JumpControl::tick(JumpControl *this) 4 | { 5 | JumpControl *v1; // r4@1 6 | int result; // r0@1 7 | 8 | v1 = this; 9 | j_Mob::setJumping(*((Mob **)this + 1), *((_BYTE *)this + 8)); 10 | result = 0; 11 | *((_BYTE *)v1 + 8) = 0; 12 | return result; 13 | } 14 | 15 | 16 | int __fastcall JumpControl::getJumpType(JumpControl *this) 17 | { 18 | return 0; 19 | } 20 | 21 | 22 | int __fastcall JumpControl::jump(int result) 23 | { 24 | *(_BYTE *)(result + 8) = 1; 25 | return result; 26 | } 27 | 28 | 29 | signed int __fastcall JumpControl::getJumpPower(JumpControl *this) 30 | { 31 | return 1054280253; 32 | } 33 | 34 | 35 | int __fastcall JumpControl::JumpControl(int result, int a2) 36 | { 37 | *(_DWORD *)result = &off_271A530; 38 | *(_DWORD *)(result + 4) = a2; 39 | *(_BYTE *)(result + 8) = 0; 40 | return result; 41 | } 42 | 43 | 44 | int __fastcall JumpControl::getJumpDelay(JumpControl *this) 45 | { 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /Minecraft/Command/CommandVersion.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall CommandVersion::overlaps(CommandVersion *this, const CommandVersion *a2) 4 | { 5 | int v2; // r2@1 6 | int v3; // r3@1 7 | signed int result; // r0@3 8 | 9 | v2 = *(_DWORD *)this; 10 | v3 = *(_DWORD *)a2; 11 | if ( *(_DWORD *)this > *(_DWORD *)a2 || *((_DWORD *)this + 1) < v3 ) 12 | { 13 | result = 0; 14 | if ( v3 <= v2 && *((_DWORD *)a2 + 1) >= v2 ) 15 | result = 1; 16 | } 17 | else 18 | result = 1; 19 | return result; 20 | } 21 | 22 | 23 | signed int __fastcall CommandVersion::isCompatible(CommandVersion *this, int a2) 24 | { 25 | CommandVersion *v2; // r2@1 26 | signed int result; // r0@1 27 | 28 | v2 = this; 29 | result = 0; 30 | if ( *(_DWORD *)v2 <= a2 && *((_DWORD *)v2 + 1) >= a2 ) 31 | result = 1; 32 | return result; 33 | } 34 | 35 | 36 | _QWORD *__fastcall CommandVersion::CommandVersion(_QWORD *result, __int64 a2) 37 | { 38 | *result = a2; 39 | return result; 40 | } 41 | -------------------------------------------------------------------------------- /unmapped/FetchImageParams.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const void **__fastcall FetchImageParams::FetchImageParams(const void **a1, unsigned int *a2, __int64 a3) 4 | { 5 | unsigned int *v3; // r5@1 6 | const void **v4; // r4@1 7 | const void **v5; // r0@1 8 | void *v6; // r0@1 9 | unsigned int *v8; // r2@3 10 | signed int v9; // r1@5 11 | int v10; // [sp+4h] [bp-1Ch]@1 12 | 13 | v3 = a2; 14 | v4 = a1; 15 | Util::format((Util *)&v10, "?w=%d&h=%d&mode=scale", a3); 16 | v5 = sub_119C984((const void **)&v10, 0, *v3, *(_BYTE **)(*v3 - 12)); 17 | *v4 = *v5; 18 | *v5 = &unk_28898CC; 19 | v6 = (void *)(v10 - 12); 20 | if ( (int *)(v10 - 12) != &dword_28898C0 ) 21 | { 22 | v8 = (unsigned int *)(v10 - 4); 23 | if ( &pthread_create ) 24 | { 25 | __dmb(); 26 | do 27 | v9 = __ldrex(v8); 28 | while ( __strex(v9 - 1, v8) ); 29 | } 30 | else 31 | v9 = (*v8)--; 32 | if ( v9 <= 0 ) 33 | j_j_j_j_j__ZdlPv_9_1(v6); 34 | } 35 | return v4; 36 | } 37 | -------------------------------------------------------------------------------- /Minecraft/Entity/LargeFireball.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall LargeFireball::~LargeFireball(LargeFireball *this) 4 | { 5 | Entity *v1; // r0@1 6 | 7 | v1 = Entity::~Entity(this); 8 | j_j_j__ZdlPv_6((void *)v1); 9 | } 10 | 11 | 12 | int __fastcall LargeFireball::setExplosionPower(int result, int a2) 13 | { 14 | *(_DWORD *)(result + 3476) = a2; 15 | return result; 16 | } 17 | 18 | 19 | int __fastcall LargeFireball::LargeFireball(Fireball *a1, EntityDefinitionGroup *a2, const EntityDefinitionIdentifier *a3) 20 | { 21 | int result; // r0@1 22 | 23 | result = Fireball::Fireball(a1, a2, a3); 24 | *(_DWORD *)result = &off_26FE51C; 25 | *(_DWORD *)(result + 3476) = 1; 26 | *(_DWORD *)(result + 248) = 41; 27 | return result; 28 | } 29 | 30 | 31 | signed int __fastcall LargeFireball::getEntityTypeId(LargeFireball *this) 32 | { 33 | return 4194389; 34 | } 35 | 36 | 37 | void __fastcall LargeFireball::~LargeFireball(LargeFireball *this) 38 | { 39 | LargeFireball::~LargeFireball(this); 40 | } 41 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/ItemFrameDropItemPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ItemFrameDropItemPacket::handle(ItemFrameDropItemPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 4 | { 5 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, ItemFrameDropItemPacket *))(*(_DWORD *)a3 + 220))( 6 | a3, 7 | a2, 8 | this); 9 | } 10 | 11 | 12 | signed int __fastcall ItemFrameDropItemPacket::getId(ItemFrameDropItemPacket *this) 13 | { 14 | return 71; 15 | } 16 | 17 | 18 | int __fastcall ItemFrameDropItemPacket::read(ItemFrameDropItemPacket *this, BinaryStream *a2) 19 | { 20 | ItemFrameDropItemPacket *v2; // r4@1 21 | int v4; // [sp+4h] [bp-14h]@1 22 | int v5; // [sp+8h] [bp-10h]@1 23 | int v6; // [sp+Ch] [bp-Ch]@1 24 | 25 | v2 = this; 26 | ReadOnlyBinaryStream::getType((int)&v4, (int)a2); 27 | *((_DWORD *)v2 + 4) = v4; 28 | *((_DWORD *)v2 + 5) = v5; 29 | *((_DWORD *)v2 + 6) = v6; 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /unmapped/Music.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall Music::Music(int a1, int a2, int *a3, int a4, int a5) 4 | { 5 | int v5; // r5@1 6 | int v6; // r4@1 7 | 8 | v5 = a1; 9 | *(_DWORD *)a1 = a2; 10 | v6 = a4; 11 | sub_119C854((int *)(a1 + 4), a3); 12 | *(_DWORD *)(v5 + 8) = v6; 13 | *(_DWORD *)(v5 + 12) = a5; 14 | return v5; 15 | } 16 | 17 | 18 | Music *__fastcall Music::~Music(Music *this) 19 | { 20 | Music *v1; // r5@1 21 | int v2; // r1@1 22 | void *v3; // r0@1 23 | unsigned int *v5; // r2@3 24 | signed int v6; // r1@5 25 | 26 | v1 = this; 27 | v2 = *((_DWORD *)this + 1); 28 | v3 = (void *)(v2 - 12); 29 | if ( (int *)(v2 - 12) != &dword_28898C0 ) 30 | { 31 | v5 = (unsigned int *)(v2 - 4); 32 | if ( &pthread_create ) 33 | { 34 | __dmb(); 35 | do 36 | v6 = __ldrex(v5); 37 | while ( __strex(v6 - 1, v5) ); 38 | } 39 | else 40 | v6 = (*v5)--; 41 | if ( v6 <= 0 ) 42 | j_j_j_j_j__ZdlPv_9_1(v3); 43 | } 44 | return v1; 45 | } 46 | -------------------------------------------------------------------------------- /Minecraft/Block/UndyedShulkerBoxBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | Block *__fastcall UndyedShulkerBoxBlock::UndyedShulkerBoxBlock(int a1, const void **a2, char a3) 4 | { 5 | Block *result; // r0@1 6 | 7 | result = ShulkerBoxBlock::ShulkerBoxBlock(a1, a2, a3); 8 | *(_DWORD *)result = &off_2716B04; 9 | return result; 10 | } 11 | 12 | 13 | void __fastcall UndyedShulkerBoxBlock::~UndyedShulkerBoxBlock(UndyedShulkerBoxBlock *this) 14 | { 15 | UndyedShulkerBoxBlock::~UndyedShulkerBoxBlock(this); 16 | } 17 | 18 | 19 | signed int __fastcall UndyedShulkerBoxBlock::getColor(UndyedShulkerBoxBlock *this, int a2) 20 | { 21 | return -5606230; 22 | } 23 | 24 | 25 | void __fastcall UndyedShulkerBoxBlock::~UndyedShulkerBoxBlock(UndyedShulkerBoxBlock *this) 26 | { 27 | Block *v1; // r0@1 28 | 29 | v1 = Block::~Block(this); 30 | j_j_j__ZdlPv_6((void *)v1); 31 | } 32 | 33 | 34 | signed int __fastcall UndyedShulkerBoxBlock::getSpawnResourcesAuxValue(UndyedShulkerBoxBlock *this, unsigned __int8 a2) 35 | { 36 | return 16; 37 | } 38 | -------------------------------------------------------------------------------- /Minecraft/Enchant/LootEnchant.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall LootEnchant::~LootEnchant(LootEnchant *this) 4 | { 5 | LootEnchant::~LootEnchant(this); 6 | } 7 | 8 | 9 | int __fastcall LootEnchant::getMaxCost(LootEnchant *this, int a2) 10 | { 11 | return Enchant::getMinCost(this, a2) + 50; 12 | } 13 | 14 | 15 | void __fastcall LootEnchant::~LootEnchant(LootEnchant *this) 16 | { 17 | Enchant *v1; // r0@1 18 | 19 | v1 = Enchant::~Enchant(this); 20 | j_j_j__ZdlPv_6((void *)v1); 21 | } 22 | 23 | 24 | _DWORD *__fastcall LootEnchant::LootEnchant(int a1, EnchantUtils *a2, int a3, int a4, int a5, int a6, int a7) 25 | { 26 | _DWORD *result; // r0@1 27 | 28 | result = (_DWORD *)Enchant::Enchant(a1, a2, a3, a4, a5, a6, a7); 29 | *result = &off_2701730; 30 | return result; 31 | } 32 | 33 | 34 | int __fastcall LootEnchant::getMinCost(LootEnchant *this, int a2) 35 | { 36 | return 9 * a2 + 6; 37 | } 38 | 39 | 40 | signed int __fastcall LootEnchant::getMaxLevel(LootEnchant *this) 41 | { 42 | return 3; 43 | } 44 | -------------------------------------------------------------------------------- /unmapped/ShiftedDurationAmplifier.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall ShiftedDurationAmplifier::shouldBuff(ShiftedDurationAmplifier *this, int a2, int a3) 4 | { 5 | int v3; // r4@1 6 | signed int v4; // r0@1 7 | signed int result; // r0@2 8 | int v6; // r1@3 9 | 10 | v3 = a2; 11 | v4 = (*(int (**)(void))(*(_DWORD *)this + 16))(); 12 | if ( v4 >= 1 ) 13 | { 14 | v6 = v3 % v4; 15 | result = 0; 16 | if ( !v6 ) 17 | result = 1; 18 | } 19 | else 20 | result = 1; 21 | return result; 22 | } 23 | 24 | 25 | int __fastcall ShiftedDurationAmplifier::ShiftedDurationAmplifier(int result, int a2) 26 | { 27 | *(_DWORD *)result = &off_271A378; 28 | *(_DWORD *)(result + 4) = a2; 29 | return result; 30 | } 31 | 32 | 33 | signed int __fastcall ShiftedDurationAmplifier::getTickInterval(ShiftedDurationAmplifier *this, int a2) 34 | { 35 | signed int result; // r0@1 36 | 37 | result = *((_DWORD *)this + 1) >> a2; 38 | if ( result <= 1 ) 39 | result = 1; 40 | return result; 41 | } 42 | -------------------------------------------------------------------------------- /Minecraft/Item/EmptyLootItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall EmptyLootItem::~EmptyLootItem(EmptyLootItem *this) 4 | { 5 | EmptyLootItem *v1; // r4@1 6 | int v2; // r0@1 7 | char *v3; // r5@3 8 | char *v4; // r7@3 9 | 10 | v1 = this; 11 | *(_DWORD *)this = &off_2725A4C; 12 | v2 = *((_DWORD *)this + 6); 13 | if ( v2 ) 14 | (*(void (**)(void))(*(_DWORD *)v2 + 8))(); 15 | *((_DWORD *)v1 + 6) = 0; 16 | v4 = (char *)(*(_QWORD *)((char *)v1 + 12) >> 32); 17 | v3 = (char *)*(_QWORD *)((char *)v1 + 12); 18 | if ( v3 != v4 ) 19 | { 20 | do 21 | { 22 | if ( *(_DWORD *)v3 ) 23 | (*(void (**)(void))(**(_DWORD **)v3 + 4))(); 24 | *(_DWORD *)v3 = 0; 25 | v3 += 4; 26 | } 27 | while ( v4 != v3 ); 28 | v3 = (char *)*((_DWORD *)v1 + 3); 29 | } 30 | if ( v3 ) 31 | j_operator delete(v3); 32 | j_j_j__ZdlPv_7((void *)v1); 33 | } 34 | 35 | 36 | void __fastcall EmptyLootItem::~EmptyLootItem(EmptyLootItem *this) 37 | { 38 | EmptyLootItem::~EmptyLootItem(this); 39 | } 40 | -------------------------------------------------------------------------------- /Minecraft/Block/BedrockBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | unsigned int __fastcall BedrockBlock::isInfiniburnBlock(BedrockBlock *this, int a2) 4 | { 5 | unsigned int result; // r0@2 6 | 7 | if ( a2 == 1 ) 8 | result = 1; 9 | else 10 | result = j_Block::isInfiniburnBlock(this, a2); 11 | return result; 12 | } 13 | 14 | 15 | void __fastcall BedrockBlock::~BedrockBlock(BedrockBlock *this) 16 | { 17 | BedrockBlock::~BedrockBlock(this); 18 | } 19 | 20 | 21 | _DWORD *__fastcall BedrockBlock::BedrockBlock(_DWORD *a1, const void **a2, char a3) 22 | { 23 | _DWORD *v3; // r6@1 24 | char v4; // r4@1 25 | const void **v5; // r5@1 26 | int v6; // r0@1 27 | 28 | v3 = a1; 29 | v4 = a3; 30 | v5 = a2; 31 | v6 = j_Material::getMaterial(3); 32 | j_Block::Block((int)v3, v5, v4, v6); 33 | *v3 = &off_272268C; 34 | return v3; 35 | } 36 | 37 | 38 | void __fastcall BedrockBlock::~BedrockBlock(BedrockBlock *this) 39 | { 40 | Block *v1; // r0@1 41 | 42 | v1 = j_Block::~Block(this); 43 | j_j_j__ZdlPv_7((void *)v1); 44 | } 45 | -------------------------------------------------------------------------------- /unmapped/MeasureResult.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | float __fastcall MeasureResult::MeasureResult(float a1, int *a2, int a3, int a4, int a5) 4 | { 5 | int *v5; // r4@1 6 | int v6; // r6@1 7 | float v7; // r5@1 8 | __int64 v8; // r0@1 9 | float result; // r0@1 10 | 11 | v5 = a2; 12 | v6 = a3; 13 | v7 = a1; 14 | sub_119C884((void **)LODWORD(a1), (const char *)&unk_257BC67); 15 | *(_DWORD *)(LODWORD(v7) + 16) = 0; 16 | *(_DWORD *)(LODWORD(v7) + 20) = 0; 17 | *(_DWORD *)(LODWORD(v7) + 24) = 0; 18 | *(_DWORD *)(LODWORD(v7) + 4) = 0; 19 | *(_DWORD *)(LODWORD(v7) + 8) = 0; 20 | *(_DWORD *)(LODWORD(v7) + 12) = 0; 21 | EntityInteraction::setInteractText((int *)LODWORD(v7), v5); 22 | *(_DWORD *)(LODWORD(v7) + 4) = *(_DWORD *)v6; 23 | *(_DWORD *)(LODWORD(v7) + 8) = *(_DWORD *)(v6 + 4); 24 | LODWORD(v8) = LODWORD(v7) + 12; 25 | std::vector>::operator=(v8); 26 | __asm { VLDR S0, [SP,#0x20+arg_0] } 27 | result = v7; 28 | __asm { VSTR S0, [R5,#0x18] } 29 | return result; 30 | } 31 | -------------------------------------------------------------------------------- /Minecraft/Item/SaplingBlockItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SaplingBlockItem::buildDescriptionId(SaplingBlockItem *this, const ItemInstance *a2, ItemInstance *a3) 4 | { 5 | SaplingBlockItem *v3; // r4@1 6 | int v4; // r5@1 7 | int (__fastcall *v5)(SaplingBlockItem *, int, _DWORD); // r6@1 8 | unsigned __int8 v6; // r0@1 9 | 10 | v3 = this; 11 | v4 = Block::mSapling; 12 | v5 = *(int (__fastcall **)(SaplingBlockItem *, int, _DWORD))(*(_DWORD *)Block::mSapling + 380); 13 | v6 = ItemInstance::getAuxValue(a3); 14 | return v5(v3, v4, v6); 15 | } 16 | 17 | 18 | void __fastcall SaplingBlockItem::~SaplingBlockItem(SaplingBlockItem *this) 19 | { 20 | SaplingBlockItem::~SaplingBlockItem(this); 21 | } 22 | 23 | 24 | int __fastcall SaplingBlockItem::getLevelDataForAuxValue(SaplingBlockItem *this, int a2) 25 | { 26 | return a2; 27 | } 28 | 29 | 30 | void __fastcall SaplingBlockItem::~SaplingBlockItem(SaplingBlockItem *this) 31 | { 32 | Item *v1; // r0@1 33 | 34 | v1 = Item::~Item(this); 35 | j_j_j__ZdlPv_6((void *)v1); 36 | } 37 | -------------------------------------------------------------------------------- /unmapped/MinecraftGraphics.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall MinecraftGraphics::~MinecraftGraphics(MinecraftGraphics *this) 4 | { 5 | MinecraftGraphics::~MinecraftGraphics(this); 6 | } 7 | 8 | 9 | AppPlatformListener *__fastcall MinecraftGraphics::MinecraftGraphics(AppPlatformListener *a1) 10 | { 11 | AppPlatformListener *v1; // r4@1 12 | 13 | v1 = a1; 14 | AppPlatformListener::AppPlatformListener(a1); 15 | *(_DWORD *)v1 = &off_26DCC04; 16 | AppPlatformListener::initListener(v1, -3.4028e38); 17 | return v1; 18 | } 19 | 20 | 21 | void __fastcall MinecraftGraphics::~MinecraftGraphics(MinecraftGraphics *this) 22 | { 23 | AppPlatformListener *v1; // r0@1 24 | 25 | v1 = AppPlatformListener::~AppPlatformListener(this); 26 | j_j_j__ZdlPv_4((void *)v1); 27 | } 28 | 29 | 30 | int __fastcall MinecraftGraphics::onAppSuspended(MinecraftGraphics *this) 31 | { 32 | mce::RenderContext *v1; // r0@1 33 | 34 | v1 = (mce::RenderContext *)mce::RenderContextImmediate::get(this); 35 | return j_j_j__ZN3mce13RenderContext5flushEv(v1); 36 | } 37 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/SetDefaultGameTypePacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall SetDefaultGameTypePacket::read(SetDefaultGameTypePacket *this, BinaryStream *a2) 4 | { 5 | SetDefaultGameTypePacket *v2; // r4@1 6 | GameTypeConv *v3; // r0@1 7 | int v4; // r1@1 8 | int v5; // r0@1 9 | signed int v6; // r1@1 10 | 11 | v2 = this; 12 | v3 = (GameTypeConv *)ReadOnlyBinaryStream::getVarInt(a2); 13 | v5 = GameTypeConv::intToGameType(v3, v4); 14 | v6 = 0; 15 | *((_DWORD *)v2 + 4) = v5; 16 | if ( v5 == -1 ) 17 | v6 = 1; 18 | return v6; 19 | } 20 | 21 | 22 | int __fastcall SetDefaultGameTypePacket::handle(SetDefaultGameTypePacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 23 | { 24 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, SetDefaultGameTypePacket *))(*(_DWORD *)a3 + 132))( 25 | a3, 26 | a2, 27 | this); 28 | } 29 | 30 | 31 | signed int __fastcall SetDefaultGameTypePacket::getId(SetDefaultGameTypePacket *this) 32 | { 33 | return 105; 34 | } 35 | -------------------------------------------------------------------------------- /Minecraft/Block/RailBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall RailBlock::~RailBlock(RailBlock *this) 4 | { 5 | RailBlock::~RailBlock(this); 6 | } 7 | 8 | 9 | void __fastcall RailBlock::~RailBlock(RailBlock *this) 10 | { 11 | Block *v1; // r0@1 12 | 13 | v1 = Block::~Block(this); 14 | j_j_j__ZdlPv_6((void *)v1); 15 | } 16 | 17 | 18 | signed int __fastcall RailBlock::getVariant(RailBlock *this, int a2) 19 | { 20 | unsigned __int8 v2; // r4@1 21 | unsigned __int64 *v3; // r0@1 22 | signed int v4; // r1@1 23 | signed int result; // r0@1 24 | 25 | v2 = a2; 26 | v3 = (unsigned __int64 *)Block::getBlockState((int)this, 32); 27 | v4 = (v2 >> (*v3 + 1 - (*v3 >> 32))) & (0xFu >> (4 - (*v3 >> 32))); 28 | result = 0; 29 | if ( v4 > 5 ) 30 | result = 1; 31 | return result; 32 | } 33 | 34 | 35 | _DWORD *__fastcall RailBlock::RailBlock(int a1, const void **a2, int a3) 36 | { 37 | _DWORD *result; // r0@1 38 | 39 | result = (_DWORD *)BaseRailBlock::BaseRailBlock(a1, a2, a3, 0); 40 | *result = &off_2711C8C; 41 | return result; 42 | } 43 | -------------------------------------------------------------------------------- /Minecraft/Command/CommandSyntaxInformation.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall CommandSyntaxInformation::CommandSyntaxInformation(int result) 4 | { 5 | *(_BYTE *)result = 0; 6 | *(_QWORD *)(result + 4) = (unsigned int)&unk_28898CC; 7 | *(_DWORD *)(result + 12) = 0; 8 | *(_DWORD *)(result + 16) = 0; 9 | return result; 10 | } 11 | 12 | 13 | int __fastcall CommandSyntaxInformation::CommandSyntaxInformation(int a1, char a2, int *a3, int a4) 14 | { 15 | int v4; // r5@1 16 | int v5; // r4@1 17 | int v6; // r0@1 18 | int v7; // r0@1 19 | 20 | v4 = a1; 21 | *(_BYTE *)a1 = a2; 22 | v5 = a4; 23 | sub_21E8AF4((int *)(a1 + 4), a3); 24 | *(_DWORD *)(v4 + 8) = 0; 25 | *(_DWORD *)(v4 + 12) = 0; 26 | *(_DWORD *)(v4 + 16) = 0; 27 | *(_DWORD *)(v4 + 8) = *(_DWORD *)v5; 28 | *(_DWORD *)v5 = 0; 29 | v6 = *(_DWORD *)(v4 + 12); 30 | *(_DWORD *)(v4 + 12) = *(_DWORD *)(v5 + 4); 31 | *(_DWORD *)(v5 + 4) = v6; 32 | v7 = *(_DWORD *)(v4 + 16); 33 | *(_DWORD *)(v4 + 16) = *(_DWORD *)(v5 + 8); 34 | *(_DWORD *)(v5 + 8) = v7; 35 | return v4; 36 | } 37 | -------------------------------------------------------------------------------- /Minecraft/Enchant/FishingEnchant.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall FishingEnchant::~FishingEnchant(FishingEnchant *this) 4 | { 5 | Enchant *v1; // r0@1 6 | 7 | v1 = Enchant::~Enchant(this); 8 | j_j_j__ZdlPv_6((void *)v1); 9 | } 10 | 11 | 12 | int __fastcall FishingEnchant::getMaxCost(FishingEnchant *this, int a2) 13 | { 14 | return Enchant::getMinCost(this, a2) + 50; 15 | } 16 | 17 | 18 | signed int __fastcall FishingEnchant::getMaxLevel(FishingEnchant *this) 19 | { 20 | return 3; 21 | } 22 | 23 | 24 | _DWORD *__fastcall FishingEnchant::FishingEnchant(int a1, EnchantUtils *a2, int a3, int a4, int a5, int a6, int a7) 25 | { 26 | _DWORD *result; // r0@1 27 | 28 | result = (_DWORD *)Enchant::Enchant(a1, a2, a3, a4, a5, a6, a7); 29 | *result = &off_27016B8; 30 | return result; 31 | } 32 | 33 | 34 | int __fastcall FishingEnchant::getMinCost(FishingEnchant *this, int a2) 35 | { 36 | return 9 * a2 + 6; 37 | } 38 | 39 | 40 | void __fastcall FishingEnchant::~FishingEnchant(FishingEnchant *this) 41 | { 42 | FishingEnchant::~FishingEnchant(this); 43 | } 44 | -------------------------------------------------------------------------------- /unmapped/MCRESULT.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | unsigned int __fastcall MCRESULT::getFullCode(MCRESULT *this) 4 | { 5 | int v1; // r1@1 6 | 7 | v1 = *(_WORD *)this; 8 | _R2 = v1 << 8; 9 | __asm { UXTB16.W R2, R2 } 10 | return (*((_WORD *)this + 1) | _R2 | (v1 << 31)) ^ 0x80000000; 11 | } 12 | 13 | 14 | signed int __fastcall MCRESULT::isSuccess(MCRESULT *this, int a2) 15 | { 16 | signed int v2; // r1@1 17 | 18 | v2 = 0; 19 | if ( (signed int)this > -1 ) 20 | v2 = 1; 21 | return v2; 22 | } 23 | 24 | 25 | int __fastcall MCRESULT::isSuccess(MCRESULT *this) 26 | { 27 | return *(_BYTE *)this; 28 | } 29 | 30 | 31 | int __fastcall MCRESULT::MCRESULT(int result, unsigned int a2) 32 | { 33 | *(_BYTE *)result = (a2 >> 31) ^ 1; 34 | *(_BYTE *)(result + 1) = a2 >> 16; 35 | *(_WORD *)(result + 2) = a2; 36 | return result; 37 | } 38 | 39 | 40 | int __fastcall MCRESULT::MCRESULT(int result, char a2, char a3, __int16 a4) 41 | { 42 | *(_BYTE *)result = a2; 43 | *(_BYTE *)(result + 1) = a3; 44 | *(_WORD *)(result + 2) = a4; 45 | return result; 46 | } 47 | -------------------------------------------------------------------------------- /unmapped/ShiftedValueAmplifier.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ShiftedValueAmplifier::ShiftedValueAmplifier(int result, int a2, int a3) 4 | { 5 | *(_DWORD *)result = &off_271A35C; 6 | *(_DWORD *)(result + 4) = a2; 7 | *(_DWORD *)(result + 8) = a3; 8 | return result; 9 | } 10 | 11 | 12 | int __fastcall ShiftedValueAmplifier::getAmount(ShiftedValueAmplifier *this, int a2, float a3) 13 | { 14 | unsigned int v4; // r0@1 15 | int v6; // r2@3 16 | int result; // r0@5 17 | 18 | _R5 = this; 19 | v4 = *((_DWORD *)this + 1); 20 | if ( a2 > 32 ) 21 | a2 = 32; 22 | _R4 = a3; 23 | v6 = (v4 >> (32 - a2)) | ((signed int)v4 >> 31 << a2); 24 | if ( a2 - 32 >= 0 ) 25 | v6 = v4 << (a2 - 32); 26 | _R0 = j___aeabi_l2f_0(v4 << a2, v6); 27 | __asm 28 | { 29 | VMOV S0, R4 30 | VMOV S2, R0 31 | VMOV.F32 S4, #0.5 32 | VMUL.F32 S0, S2, S0 33 | VADD.F32 S0, S0, S4 34 | VMOV R0, S0 35 | } 36 | _R0 = j_floorf_0(_R0); 37 | VLDR S0, [R5,#8] 38 | return result; 39 | } 40 | -------------------------------------------------------------------------------- /Minecraft/Goal/WitherDoNothingGoal.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | Goal *__fastcall WitherDoNothingGoal::WitherDoNothingGoal(Goal *a1, int a2) 4 | { 5 | int v2; // r5@1 6 | Goal *v3; // r4@1 7 | 8 | v2 = a2; 9 | v3 = a1; 10 | Goal::Goal(a1); 11 | *(_DWORD *)v3 = &off_26F0D94; 12 | *((_DWORD *)v3 + 2) = v2; 13 | Goal::setRequiredControlFlags(v3, 7); 14 | return v3; 15 | } 16 | 17 | 18 | void __fastcall WitherDoNothingGoal::~WitherDoNothingGoal(WitherDoNothingGoal *this) 19 | { 20 | void *v1; // r0@1 21 | 22 | v1 = (void *)Goal::~Goal(this); 23 | j_j_j__ZdlPv_6(v1); 24 | } 25 | 26 | 27 | signed int __fastcall WitherDoNothingGoal::canUse(WitherDoNothingGoal *this) 28 | { 29 | int v1; // r0@1 30 | signed int v2; // r1@1 31 | 32 | v1 = SynchedEntityData::getInt((SynchedEntityData *)(*((_DWORD *)this + 2) + 176), 49); 33 | v2 = 0; 34 | if ( v1 > 0 ) 35 | v2 = 1; 36 | return v2; 37 | } 38 | 39 | 40 | void __fastcall WitherDoNothingGoal::~WitherDoNothingGoal(WitherDoNothingGoal *this) 41 | { 42 | WitherDoNothingGoal::~WitherDoNothingGoal(this); 43 | } 44 | -------------------------------------------------------------------------------- /Minecraft/Item/EnchantedBookItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall EnchantedBookItem::getEnchantSlot(EnchantedBookItem *this) 4 | { 5 | return 0x7FFF; 6 | } 7 | 8 | 9 | void __fastcall EnchantedBookItem::~EnchantedBookItem(EnchantedBookItem *this) 10 | { 11 | EnchantedBookItem::~EnchantedBookItem(this); 12 | } 13 | 14 | 15 | int __fastcall EnchantedBookItem::EnchantedBookItem(int a1, const void **a2, __int16 a3) 16 | { 17 | int result; // r0@1 18 | 19 | result = j_Item::Item(a1, a2, a3); 20 | *(_DWORD *)result = &off_2720D14; 21 | *(_BYTE *)(result + 4) = 1; 22 | return result; 23 | } 24 | 25 | 26 | signed int __fastcall EnchantedBookItem::getEnchantValue(EnchantedBookItem *this) 27 | { 28 | return 1; 29 | } 30 | 31 | 32 | void __fastcall EnchantedBookItem::~EnchantedBookItem(EnchantedBookItem *this) 33 | { 34 | Item *v1; // r0@1 35 | 36 | v1 = j_Item::~Item(this); 37 | j_j_j__ZdlPv_7((void *)v1); 38 | } 39 | 40 | 41 | signed int __fastcall EnchantedBookItem::isGlint(EnchantedBookItem *this, const ItemInstance *a2) 42 | { 43 | return 1; 44 | } 45 | -------------------------------------------------------------------------------- /Minecraft/Level/Biome/MutatedBirchForest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MutatedBirchForest::getTreeFeature(MutatedBirchForest *this, Random *a2) 4 | { 5 | MutatedBirchForest *v2; // r4@1 6 | unsigned int v3; // r0@1 7 | int v4; // r2@1 8 | int v5; // r1@1 9 | 10 | v2 = this; 11 | v3 = Random::_genRandInt32(a2); 12 | v4 = *((_DWORD *)v2 + 31); 13 | v5 = v4 + 120; 14 | if ( v3 & 0x8000000 ) 15 | v5 = v4 + 196; 16 | return v5; 17 | } 18 | 19 | 20 | void __fastcall MutatedBirchForest::~MutatedBirchForest(MutatedBirchForest *this) 21 | { 22 | MutatedBirchForest::~MutatedBirchForest(this); 23 | } 24 | 25 | 26 | _DWORD *__fastcall MutatedBirchForest::MutatedBirchForest(int a1, int a2, int a3) 27 | { 28 | _DWORD *result; // r0@1 29 | 30 | result = (_DWORD *)MutatedBiome::MutatedBiome(a1, a2, a3); 31 | *result = &off_2704148; 32 | return result; 33 | } 34 | 35 | 36 | void __fastcall MutatedBirchForest::~MutatedBirchForest(MutatedBirchForest *this) 37 | { 38 | Biome *v1; // r0@1 39 | 40 | v1 = Biome::~Biome(this); 41 | j_j_j__ZdlPv_6((void *)v1); 42 | } 43 | -------------------------------------------------------------------------------- /unmapped/Ability.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _BYTE *__fastcall Ability::Ability(_BYTE *result) 4 | { 5 | *result = 0; 6 | return result; 7 | } 8 | 9 | 10 | int __fastcall Ability::setBool(int result, bool a2) 11 | { 12 | *(_BYTE *)(result + 4) = a2; 13 | return result; 14 | } 15 | 16 | 17 | _BOOL4 __fastcall Ability::hasOption(int a1, char a2) 18 | { 19 | return (unsigned __int8)(*(_BYTE *)(a1 + 8) & a2) != 0; 20 | } 21 | 22 | 23 | int __fastcall Ability::Ability(int result, char a2, char a3) 24 | { 25 | *(_BYTE *)result = 1; 26 | *(_BYTE *)(result + 4) = a2; 27 | *(_BYTE *)(result + 8) = a3; 28 | return result; 29 | } 30 | 31 | 32 | int __fastcall Ability::setFloat(int result, float a2) 33 | { 34 | *(float *)(result + 4) = a2; 35 | return result; 36 | } 37 | 38 | 39 | int __fastcall Ability::Ability(int result, int a2, char a3) 40 | { 41 | *(_BYTE *)result = 2; 42 | *(_DWORD *)(result + 4) = a2; 43 | *(_BYTE *)(result + 8) = a3; 44 | return result; 45 | } 46 | 47 | 48 | int __fastcall Ability::getType(Ability *this) 49 | { 50 | return *(_BYTE *)this; 51 | } 52 | -------------------------------------------------------------------------------- /unmapped/DevAssertListenerCollection.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall DevAssertListenerCollection::get(DevAssertListenerCollection *this) 4 | { 5 | _DWORD *result; // r0@1 6 | 7 | result = (_DWORD *)DevAssertListenerCollection::mInstance; 8 | if ( !DevAssertListenerCollection::mInstance ) 9 | { 10 | result = j_operator new(0xCu); 11 | *result = 0; 12 | result[1] = 0; 13 | result[2] = 0; 14 | DevAssertListenerCollection::mInstance = result; 15 | } 16 | return result; 17 | } 18 | 19 | 20 | int __fastcall DevAssertListenerCollection::add(int result, int *a2) 21 | { 22 | __int64 v2; // r2@1 23 | int v3; // r12@3 24 | 25 | v2 = *(_QWORD *)(result + 4); 26 | if ( (_DWORD)v2 == HIDWORD(v2) ) 27 | { 28 | result = (int)j_j_j__ZNSt6vectorISt10unique_ptrI17DevAssertListenerSt14default_deleteIS1_EESaIS4_EE19_M_emplace_back_auxIJS4_EEEvDpOT_( 29 | (_QWORD *)result, 30 | a2); 31 | } 32 | else 33 | v3 = *a2; 34 | *a2 = 0; 35 | *(_DWORD *)v2 = v3; 36 | *(_DWORD *)(result + 4) += 4; 37 | return result; 38 | } 39 | -------------------------------------------------------------------------------- /Minecraft/Entity/SmallFireball.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall SmallFireball::isPickable(SmallFireball *this) 4 | { 5 | return 0; 6 | } 7 | 8 | 9 | signed int __fastcall SmallFireball::getEntityTypeId(SmallFireball *this) 10 | { 11 | return 4194398; 12 | } 13 | 14 | 15 | int __fastcall SmallFireball::_hurt(SmallFireball *this, const EntityDamageSource *a2, int a3, bool a4, bool a5) 16 | { 17 | return 0; 18 | } 19 | 20 | 21 | void __fastcall SmallFireball::~SmallFireball(SmallFireball *this) 22 | { 23 | SmallFireball::~SmallFireball(this); 24 | } 25 | 26 | 27 | Fireball *__fastcall SmallFireball::SmallFireball(Fireball *a1, EntityDefinitionGroup *a2, const EntityDefinitionIdentifier *a3) 28 | { 29 | Fireball *v3; // r4@1 30 | 31 | v3 = a1; 32 | Fireball::Fireball(a1, a2, a3); 33 | *(_DWORD *)v3 = &off_26FEE44; 34 | *((_DWORD *)v3 + 62) = 42; 35 | Entity::setSize(v3, 0.3125, 0.3125); 36 | return v3; 37 | } 38 | 39 | 40 | void __fastcall SmallFireball::~SmallFireball(SmallFireball *this) 41 | { 42 | Entity *v1; // r0@1 43 | 44 | v1 = Entity::~Entity(this); 45 | j_j_j__ZdlPv_6((void *)v1); 46 | } 47 | -------------------------------------------------------------------------------- /Minecraft/Block/MelonBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall MelonBlock::~MelonBlock(MelonBlock *this) 4 | { 5 | Block *v1; // r0@1 6 | 7 | v1 = Block::~Block(this); 8 | j_j_j__ZdlPv_6((void *)v1); 9 | } 10 | 11 | 12 | void __fastcall MelonBlock::~MelonBlock(MelonBlock *this) 13 | { 14 | MelonBlock::~MelonBlock(this); 15 | } 16 | 17 | 18 | signed int __fastcall MelonBlock::getResourceCount(MelonBlock *this, Random *a2, int a3, int a4) 19 | { 20 | signed int result; // r0@2 21 | 22 | if ( a4 == -5 ) 23 | result = 3; 24 | else 25 | result = Random::_genRandInt32(a2) % (a4 + 5) + 3; 26 | if ( result >= 9 ) 27 | result = 9; 28 | return result; 29 | } 30 | 31 | 32 | int __fastcall MelonBlock::MelonBlock(int a1, const void **a2, char a3) 33 | { 34 | int v3; // r6@1 35 | char v4; // r4@1 36 | const void **v5; // r5@1 37 | int v6; // r0@1 38 | 39 | v3 = a1; 40 | v4 = a3; 41 | v5 = a2; 42 | v6 = Material::getMaterial(24); 43 | Block::Block(v3, v5, v4, v6); 44 | *(_DWORD *)v3 = &off_270E658; 45 | *(_DWORD *)(v3 + 24) = 35651584; 46 | *(_DWORD *)(v3 + 28) = 0; 47 | return v3; 48 | } 49 | -------------------------------------------------------------------------------- /unmapped/VindicationIllager.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall VindicationIllager::canExistInPeaceful(VindicationIllager *this) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | void __fastcall VindicationIllager::~VindicationIllager(VindicationIllager *this) 10 | { 11 | Entity *v1; // r0@1 12 | 13 | v1 = Mob::~Mob(this); 14 | j_j_j__ZdlPv_6((void *)v1); 15 | } 16 | 17 | 18 | signed int __fastcall VindicationIllager::getEntityTypeId(VindicationIllager *this) 19 | { 20 | return 2873; 21 | } 22 | 23 | 24 | int __fastcall VindicationIllager::VindicationIllager(HumanoidMonster *a1, EntityDefinitionGroup *a2, const EntityDefinitionIdentifier *a3) 25 | { 26 | int result; // r0@1 27 | 28 | result = HumanoidMonster::HumanoidMonster(a1, a2, a3); 29 | *(_DWORD *)result = &off_26FAF28; 30 | *(_DWORD *)(result + 248) = 77; 31 | return result; 32 | } 33 | 34 | 35 | void __fastcall VindicationIllager::~VindicationIllager(VindicationIllager *this) 36 | { 37 | VindicationIllager::~VindicationIllager(this); 38 | } 39 | 40 | 41 | signed int __fastcall VindicationIllager::useNewAi(VindicationIllager *this) 42 | { 43 | return 1; 44 | } 45 | -------------------------------------------------------------------------------- /Minecraft/Level/Chunk/EmptyChunkSource.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall EmptyChunkSource::postProcess(EmptyChunkSource *this, ChunkViewSource *a2) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | void __fastcall EmptyChunkSource::~EmptyChunkSource(EmptyChunkSource *this) 10 | { 11 | EmptyChunkSource::~EmptyChunkSource(this); 12 | } 13 | 14 | 15 | unsigned __int8 *__fastcall EmptyChunkSource::loadChunk(EmptyChunkSource *this, LevelChunk *a2, bool a3) 16 | { 17 | LevelChunk *v3; // r4@1 18 | 19 | v3 = a2; 20 | LevelChunk::setFinalized((int)a2, 2); 21 | LevelChunk::setSaved(v3); 22 | return j_j_j__ZN10LevelChunk11changeStateE10ChunkStateS0__0((int)v3, 1, 8u); 23 | } 24 | 25 | 26 | void __fastcall EmptyChunkSource::~EmptyChunkSource(EmptyChunkSource *this) 27 | { 28 | ChunkSource *v1; // r0@1 29 | 30 | v1 = ChunkSource::~ChunkSource(this); 31 | j_j_j__ZdlPv_6((void *)v1); 32 | } 33 | 34 | 35 | _DWORD *__fastcall EmptyChunkSource::EmptyChunkSource(int a1, Dimension *a2) 36 | { 37 | _DWORD *result; // r0@1 38 | 39 | result = (_DWORD *)ChunkSource::ChunkSource(a1, a2, 16); 40 | *result = &off_2718360; 41 | return result; 42 | } 43 | -------------------------------------------------------------------------------- /unmapped/InventoryTransactionItemGroup.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int *__fastcall InventoryTransactionItemGroup::InventoryTransactionItemGroup(signed int *a1, ItemInstance *a2, int a3) 4 | { 5 | ItemInstance *v3; // r5@1 6 | signed int *v4; // r4@1 7 | int v5; // r6@1 8 | int v6; // r0@1 9 | int v7; // r2@1 10 | int *v8; // r0@2 11 | int v9; // r1@2 12 | signed int v10; // r0@2 13 | int v12; // [sp+4h] [bp-14h]@2 14 | 15 | v3 = a2; 16 | v4 = a1; 17 | v5 = a3; 18 | *a1 = ItemInstance::getId(a2); 19 | v6 = ItemInstance::getAuxValue(v3); 20 | v7 = (int)(v4 + 1); 21 | *(_DWORD *)v7 = v6; 22 | *(_DWORD *)(v7 + 4) = 0; 23 | *(_DWORD *)(v7 + 8) = v5; 24 | *((_BYTE *)v4 + 16) = 0; 25 | if ( *(_DWORD *)ItemInstance::getUserData(v3) ) 26 | { 27 | v8 = (int *)ItemInstance::getUserData(v3); 28 | CompoundTag::clone((CompoundTag *)&v12, *v8); 29 | v9 = v12; 30 | v12 = 0; 31 | v10 = v4[2]; 32 | v4[2] = v9; 33 | if ( v10 ) 34 | { 35 | (*(void (**)(void))(*(_DWORD *)v10 + 4))(); 36 | if ( v12 ) 37 | (*(void (**)(void))(*(_DWORD *)v12 + 4))(); 38 | } 39 | } 40 | return v4; 41 | } 42 | -------------------------------------------------------------------------------- /Minecraft/Level/Structure/Feature/JungleTreeFeature.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall JungleTreeFeature::JungleTreeFeature(TreeFeature *a1, Entity *a2) 4 | { 5 | _DWORD *result; // r0@1 6 | 7 | result = (_DWORD *)TreeFeature::TreeFeature(a1, a2, 3, 3, 1); 8 | *result = &off_2718B18; 9 | return result; 10 | } 11 | 12 | 13 | void __fastcall JungleTreeFeature::~JungleTreeFeature(JungleTreeFeature *this) 14 | { 15 | void *v1; // r0@1 16 | 17 | v1 = (void *)Feature::~Feature(this); 18 | j_j_j__ZdlPv_6(v1); 19 | } 20 | 21 | 22 | void __fastcall JungleTreeFeature::~JungleTreeFeature(JungleTreeFeature *this) 23 | { 24 | JungleTreeFeature::~JungleTreeFeature(this); 25 | } 26 | 27 | 28 | signed int __fastcall JungleTreeFeature::place(JungleTreeFeature *this, BlockSource *a2, const BlockPos *a3, Random *a4) 29 | { 30 | Random *v4; // r4@1 31 | TreeFeature *v5; // r7@1 32 | const BlockPos *v6; // r5@1 33 | BlockSource *v7; // r6@1 34 | unsigned int v8; // kr00_4@1 35 | 36 | v4 = a4; 37 | v5 = this; 38 | v6 = a3; 39 | v7 = a2; 40 | v8 = j_Random::_genRandInt32(a4); 41 | return TreeFeature::place(v5, v7, v6, v4, v8 % 7 + 4); 42 | } 43 | -------------------------------------------------------------------------------- /unmapped/MouseAction.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MouseAction::MouseAction(int result, char a2, char a3, __int16 a4, __int16 a5, int a6) 4 | { 5 | *(_BYTE *)(result + 8) = a2; 6 | *(_BYTE *)(result + 9) = a3; 7 | *(_WORD *)result = a4; 8 | *(_WORD *)(result + 2) = a5; 9 | *(_WORD *)(result + 6) = 0; 10 | *(_WORD *)(result + 4) = 0; 11 | *(_DWORD *)(result + 12) = a6; 12 | return result; 13 | } 14 | 15 | 16 | signed int __fastcall MouseAction::isButton(MouseAction *this) 17 | { 18 | unsigned int v1; // r1@1 19 | signed int result; // r0@1 20 | 21 | v1 = (unsigned __int8)(*((_BYTE *)this + 8) - 1); 22 | result = 0; 23 | if ( v1 < 3 ) 24 | result = 1; 25 | return result; 26 | } 27 | 28 | 29 | int __fastcall MouseAction::MouseAction(int result, char a2, char a3, __int16 a4, __int16 a5, __int16 a6, __int16 a7, int a8, char a9) 30 | { 31 | *(_BYTE *)(result + 8) = a2; 32 | *(_BYTE *)(result + 9) = a3; 33 | *(_WORD *)result = a4; 34 | *(_WORD *)(result + 2) = a5; 35 | *(_WORD *)(result + 4) = a6; 36 | *(_WORD *)(result + 6) = a7; 37 | *(_DWORD *)(result + 12) = a8; 38 | *(_BYTE *)(result + 16) = a9; 39 | return result; 40 | } 41 | -------------------------------------------------------------------------------- /Minecraft/Goal/SitGoal.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | unsigned int __fastcall SitGoal::canUse(SitGoal *this) 4 | { 5 | SitGoal *v1; // r4@1 6 | unsigned int result; // r0@2 7 | 8 | v1 = this; 9 | if ( j_Mob::getNavigation(*((Mob **)this + 2)) ) 10 | result = j_Entity::isSitting(*((Entity **)v1 + 2)); 11 | else 12 | result = 0; 13 | return result; 14 | } 15 | 16 | 17 | Goal *__fastcall SitGoal::SitGoal(Goal *a1, int a2) 18 | { 19 | int v2; // r5@1 20 | Goal *v3; // r4@1 21 | 22 | v2 = a2; 23 | v3 = a1; 24 | j_Goal::Goal(a1); 25 | *(_DWORD *)v3 = &off_271AD80; 26 | *((_DWORD *)v3 + 2) = v2; 27 | j_Goal::setRequiredControlFlags(v3, 5); 28 | return v3; 29 | } 30 | 31 | 32 | void __fastcall SitGoal::~SitGoal(SitGoal *this) 33 | { 34 | SitGoal::~SitGoal(this); 35 | } 36 | 37 | 38 | void __fastcall SitGoal::~SitGoal(SitGoal *this) 39 | { 40 | void *v1; // r0@1 41 | 42 | v1 = (void *)j_Goal::~Goal(this); 43 | j_j_j__ZdlPv_7(v1); 44 | } 45 | 46 | 47 | int __fastcall SitGoal::start(SitGoal *this) 48 | { 49 | int v1; // r0@1 50 | 51 | v1 = j_Mob::getNavigation(*((Mob **)this + 2)); 52 | return (*(int (**)(void))(*(_DWORD *)v1 + 40))(); 53 | } 54 | -------------------------------------------------------------------------------- /Minecraft/Network/Nbt/EndTag.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _DWORD *__fastcall EndTag::EndTag(_DWORD *a1) 4 | { 5 | _DWORD *v1; // r5@1 6 | void *v2; // r0@1 7 | unsigned int *v4; // r2@3 8 | signed int v5; // r1@5 9 | int v6; // [sp+4h] [bp-1Ch]@1 10 | 11 | v1 = a1; 12 | sub_DA7364((void **)&v6, (const char *)&unk_257BC67); 13 | Tag::Tag(v1); 14 | v2 = (void *)(v6 - 12); 15 | if ( (int *)(v6 - 12) != &dword_28898C0 ) 16 | { 17 | v4 = (unsigned int *)(v6 - 4); 18 | if ( &pthread_create ) 19 | { 20 | __dmb(); 21 | do 22 | v5 = __ldrex(v4); 23 | while ( __strex(v5 - 1, v4) ); 24 | } 25 | else 26 | v5 = (*v4)--; 27 | if ( v5 <= 0 ) 28 | j_j_j_j_j__ZdlPv_9(v2); 29 | } 30 | *v1 = &off_26D5430; 31 | return v1; 32 | } 33 | 34 | 35 | int __fastcall EndTag::getId(EndTag *this) 36 | { 37 | return 0; 38 | } 39 | 40 | 41 | _DWORD *__fastcall EndTag::copy(EndTag *this) 42 | { 43 | EndTag *v1; // r4@1 44 | EndTag *v2; // r5@1 45 | _DWORD *result; // r0@1 46 | 47 | v1 = this; 48 | v2 = (EndTag *)operator new(4u); 49 | result = EndTag::EndTag(v2); 50 | *(_DWORD *)v1 = v2; 51 | return result; 52 | } 53 | -------------------------------------------------------------------------------- /unmapped/DefaultUIScreenSetupCleanupStrategy.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall DefaultUIScreenSetupCleanupStrategy::setupScreen(int a1, int a2) 4 | { 5 | int v2; // r2@1 6 | 7 | v2 = *(_DWORD *)(a1 + 4); 8 | return j_j_j__ZN24ScreenSetupCleanupHelper25setupForStandardUIDrawingER13ScreenContextR14ClientInstance(a2); 9 | } 10 | 11 | 12 | int __fastcall DefaultUIScreenSetupCleanupStrategy::DefaultUIScreenSetupCleanupStrategy(int result, int a2) 13 | { 14 | *(_DWORD *)result = &off_26E47A8; 15 | *(_DWORD *)(result + 4) = a2; 16 | return result; 17 | } 18 | 19 | 20 | signed int __fastcall DefaultUIScreenSetupCleanupStrategy::getEyeRenderingMode(DefaultUIScreenSetupCleanupStrategy *this) 21 | { 22 | DefaultUIScreenSetupCleanupStrategy *v1; // r4@1 23 | signed int result; // r0@2 24 | signed int v3; // r0@3 25 | signed int v4; // r1@3 26 | 27 | v1 = this; 28 | if ( ClientInstance::isLivingroomMode(*((ClientInstance **)this + 1)) ) 29 | { 30 | result = 8; 31 | } 32 | else 33 | v3 = ClientInstance::useLowFrequencyUIRender(*((ClientInstance **)v1 + 1)); 34 | v4 = 64; 35 | if ( v3 ) 36 | v4 = 8; 37 | result = v4; 38 | return result; 39 | } 40 | -------------------------------------------------------------------------------- /unmapped/ActivationUri.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | ActivationUri *__fastcall ActivationUri::~ActivationUri(ActivationUri *this) 4 | { 5 | ActivationUri *v1; // r4@1 6 | char *v2; // r0@1 7 | int *v3; // r0@4 8 | unsigned int *v5; // r12@6 9 | signed int v6; // r1@8 10 | 11 | v1 = this; 12 | std::_Hashtable,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::clear((int)this + 4); 13 | v2 = (char *)*((_DWORD *)v1 + 1); 14 | if ( v2 && (char *)v1 + 28 != v2 ) 15 | operator delete(v2); 16 | v3 = (int *)(*(_DWORD *)v1 - 12); 17 | if ( v3 != &dword_28898C0 ) 18 | { 19 | v5 = (unsigned int *)(*(_DWORD *)v1 - 4); 20 | if ( &pthread_create ) 21 | { 22 | __dmb(); 23 | do 24 | v6 = __ldrex(v5); 25 | while ( __strex(v6 - 1, v5) ); 26 | } 27 | else 28 | v6 = (*v5)--; 29 | if ( v6 <= 0 ) 30 | j_j_j_j__ZdlPv_9(v3); 31 | } 32 | return v1; 33 | } 34 | -------------------------------------------------------------------------------- /Minecraft/Client/UI/UIComponent.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall UIComponent::onLayoutChange(UIComponent *this) 4 | { 5 | return 0; 6 | } 7 | 8 | 9 | int __fastcall UIComponent::isRenderableComponent(UIComponent *this) 10 | { 11 | return 0; 12 | } 13 | 14 | 15 | int __fastcall UIComponent::UIComponent(int result, int a2) 16 | { 17 | *(_DWORD *)result = &off_26D6FD4; 18 | *(_DWORD *)(result + 4) = a2; 19 | return result; 20 | } 21 | 22 | 23 | unsigned int __fastcall UIComponent::isLocked(UIComponent *this) 24 | { 25 | UIComponent *v1; // r4@1 26 | unsigned int result; // r0@2 27 | 28 | v1 = this; 29 | if ( UIControl::getEnabled(*((UIControl **)this + 1)) == 1 ) 30 | result = UIControl::areAllAncestorsEnabled(*((UIControl **)v1 + 1)) ^ 1; 31 | else 32 | result = 1; 33 | return result; 34 | } 35 | 36 | 37 | unsigned int __fastcall UIComponent::isHidden(UIComponent *this) 38 | { 39 | UIComponent *v1; // r4@1 40 | unsigned int result; // r0@2 41 | 42 | v1 = this; 43 | if ( UIControl::getVisible(*((UIControl **)this + 1)) == 1 ) 44 | result = UIControl::isVisibleInTree(*((UIControl **)v1 + 1)) ^ 1; 45 | else 46 | result = 1; 47 | return result; 48 | } 49 | -------------------------------------------------------------------------------- /Minecraft/Enchant/MendingEnchant.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall MendingEnchant::~MendingEnchant(MendingEnchant *this) 4 | { 5 | MendingEnchant::~MendingEnchant(this); 6 | } 7 | 8 | 9 | _DWORD *__fastcall MendingEnchant::MendingEnchant(int a1, EnchantUtils *a2, int a3, int a4, int a5, int a6, int a7) 10 | { 11 | _DWORD *result; // r0@1 12 | 13 | result = (_DWORD *)Enchant::Enchant(a1, a2, a3, a4, a5, a6, a7); 14 | *result = &off_27017A8; 15 | return result; 16 | } 17 | 18 | 19 | int __fastcall MendingEnchant::getMinCost(MendingEnchant *this, int a2) 20 | { 21 | return 25 * a2; 22 | } 23 | 24 | 25 | int __fastcall MendingEnchant::getMaxCost(MendingEnchant *this, int a2) 26 | { 27 | return (*(int (**)(void))(*(_DWORD *)this + 8))() + 50; 28 | } 29 | 30 | 31 | signed int __fastcall MendingEnchant::getMaxLevel(MendingEnchant *this) 32 | { 33 | return 1; 34 | } 35 | 36 | 37 | void __fastcall MendingEnchant::~MendingEnchant(MendingEnchant *this) 38 | { 39 | Enchant *v1; // r0@1 40 | 41 | v1 = Enchant::~Enchant(this); 42 | j_j_j__ZdlPv_6((void *)v1); 43 | } 44 | 45 | 46 | signed int __fastcall MendingEnchant::isTreasureOnly(MendingEnchant *this) 47 | { 48 | return 1; 49 | } 50 | -------------------------------------------------------------------------------- /unmapped/DefaultMonoscopicScreenSetupCleanupStrategy.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall DefaultMonoscopicScreenSetupCleanupStrategy::getEyeRenderingMode(DefaultMonoscopicScreenSetupCleanupStrategy *this) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | void __fastcall DefaultMonoscopicScreenSetupCleanupStrategy::~DefaultMonoscopicScreenSetupCleanupStrategy(DefaultMonoscopicScreenSetupCleanupStrategy *this) 10 | { 11 | DefaultMonoscopicScreenSetupCleanupStrategy::~DefaultMonoscopicScreenSetupCleanupStrategy(this); 12 | } 13 | 14 | 15 | void __fastcall DefaultMonoscopicScreenSetupCleanupStrategy::~DefaultMonoscopicScreenSetupCleanupStrategy(DefaultMonoscopicScreenSetupCleanupStrategy *this) 16 | { 17 | void *v1; // r0@1 18 | 19 | v1 = (void *)DefaultUIScreenSetupCleanupStrategy::~DefaultUIScreenSetupCleanupStrategy(this); 20 | j_j_j__ZdlPv_5(v1); 21 | } 22 | 23 | 24 | _DWORD *__fastcall DefaultMonoscopicScreenSetupCleanupStrategy::DefaultMonoscopicScreenSetupCleanupStrategy(int a1, int a2) 25 | { 26 | _DWORD *result; // r0@1 27 | 28 | result = (_DWORD *)DefaultUIScreenSetupCleanupStrategy::DefaultUIScreenSetupCleanupStrategy(a1, a2); 29 | *result = &off_26E478C; 30 | return result; 31 | } 32 | -------------------------------------------------------------------------------- /Minecraft/Level/Biome/BeachBiome.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall BeachBiome::~BeachBiome(BeachBiome *this) 4 | { 5 | BeachBiome::~BeachBiome(this); 6 | } 7 | 8 | 9 | void __fastcall BeachBiome::~BeachBiome(BeachBiome *this) 10 | { 11 | Biome *v1; // r0@1 12 | 13 | v1 = j_Biome::~Biome(this); 14 | j_j_j__ZdlPv_7((void *)v1); 15 | } 16 | 17 | 18 | int __fastcall BeachBiome::BeachBiome(int a1, int a2) 19 | { 20 | int v2; // r4@1 21 | __int64 v3; // kr00_8@3 22 | int v4; // r0@3 23 | int v5; // r0@3 24 | int v7; // [sp+4h] [bp-14h]@1 25 | 26 | v2 = a1; 27 | v7 = 0; 28 | j_Biome::Biome(a1, a2, 0, &v7); 29 | if ( v7 ) 30 | (*(void (**)(void))(*(_DWORD *)v7 + 12))(); 31 | *(_DWORD *)v2 = &off_2721B14; 32 | v3 = *(_QWORD *)(v2 + 140); 33 | j_std::_Destroy(*(_QWORD *)(v2 + 140), SHIDWORD(v3)); 34 | *(_DWORD *)(v2 + 144) = v3; 35 | v4 = Block::mSand; 36 | *(_BYTE *)(v2 + 188) = *(_BYTE *)(Block::mSand + 4); 37 | *(_BYTE *)(v2 + 190) = *(_BYTE *)(v4 + 4); 38 | v5 = *(_DWORD *)(v2 + 124); 39 | *(_DWORD *)(v5 + 208) = -998653952; 40 | *(_DWORD *)(v5 + 220) = 0; 41 | *(_DWORD *)(v5 + 228) = 0; 42 | *(_DWORD *)(v5 + 232) = 0; 43 | return v2; 44 | } 45 | -------------------------------------------------------------------------------- /Minecraft/Block/InvisibleBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall InvisibleBlock::InvisibleBlock(int a1, const void **a2, int a3, int a4) 4 | { 5 | int v4; // r5@1 6 | int v5; // r4@1 7 | int *v11; // r2@1 8 | float v13; // [sp+0h] [bp-18h]@1 9 | int v14; // [sp+4h] [bp-14h]@1 10 | 11 | v4 = a3; 12 | v5 = a1; 13 | Block::Block(a1, a2, a3, a4); 14 | *(_DWORD *)v5 = &off_270D254; 15 | Block::setSolid((Block *)v5, 0); 16 | v14 = 1061997773; 17 | _R0 = Material::getTranslucency(*(Material **)(v5 + 56)); 18 | __asm 19 | { 20 | VMOV S0, R0 21 | VLDR S2, =0.8 22 | VCMPE.F32 S0, S2 23 | } 24 | v11 = (int *)&v13; 25 | VMRS APSR_nzcv, FPSCR 26 | VSTR S0, [SP,#0x18+var_18] 27 | if ( (unsigned __int8)(_NF ^ _VF) | _ZF ) 28 | v11 = &v14; 29 | Block::mTranslucency[v4] = *v11; 30 | return v5; 31 | } 32 | 33 | 34 | void __fastcall InvisibleBlock::~InvisibleBlock(InvisibleBlock *this) 35 | { 36 | Block *v1; // r0@1 37 | 38 | v1 = Block::~Block(this); 39 | j_j_j__ZdlPv_6((void *)v1); 40 | } 41 | 42 | 43 | void __fastcall InvisibleBlock::~InvisibleBlock(InvisibleBlock *this) 44 | { 45 | InvisibleBlock::~InvisibleBlock(this); 46 | } 47 | -------------------------------------------------------------------------------- /unmapped/CapacitorComponent.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall CapacitorComponent::~CapacitorComponent(CapacitorComponent *this) 4 | { 5 | CapacitorComponent *v1; // r4@1 6 | void *v2; // r0@1 7 | 8 | v1 = this; 9 | *(_DWORD *)this = &off_2719990; 10 | v2 = (void *)*((_DWORD *)this + 1); 11 | if ( v2 ) 12 | j_operator delete(v2); 13 | j_j_j__ZdlPv_7((void *)v1); 14 | } 15 | 16 | 17 | _DWORD *__fastcall CapacitorComponent::CapacitorComponent(BaseCircuitComponent *a1) 18 | { 19 | _DWORD *result; // r0@1 20 | 21 | result = (_DWORD *)j_ProducerComponent::ProducerComponent(a1); 22 | *result = &off_2724EA0; 23 | return result; 24 | } 25 | 26 | 27 | signed __int64 __fastcall CapacitorComponent::getInstanceType(CapacitorComponent *this) 28 | { 29 | return 1129530177LL; 30 | } 31 | 32 | 33 | signed int __fastcall CapacitorComponent::getPoweroutDirection(CapacitorComponent *this) 34 | { 35 | return 6; 36 | } 37 | 38 | 39 | signed __int64 __fastcall CapacitorComponent::getBaseType(CapacitorComponent *this) 40 | { 41 | return 1129530177LL; 42 | } 43 | 44 | 45 | void __fastcall CapacitorComponent::~CapacitorComponent(CapacitorComponent *this) 46 | { 47 | CapacitorComponent::~CapacitorComponent(this); 48 | } 49 | -------------------------------------------------------------------------------- /Minecraft/Level/Structure/Feature/BirchFeature.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall BirchFeature::~BirchFeature(BirchFeature *this) 4 | { 5 | BirchFeature::~BirchFeature(this); 6 | } 7 | 8 | 9 | void __fastcall BirchFeature::~BirchFeature(BirchFeature *this) 10 | { 11 | void *v1; // r0@1 12 | 13 | v1 = (void *)Feature::~Feature(this); 14 | j_j_j__ZdlPv_6(v1); 15 | } 16 | 17 | 18 | signed int __fastcall BirchFeature::place(BirchFeature *this, BlockSource *a2, const BlockPos *a3, Random *a4) 19 | { 20 | Random *v4; // r4@1 21 | BirchFeature *v5; // r7@1 22 | const BlockPos *v6; // r8@1 23 | BlockSource *v7; // r6@1 24 | int v8; // r5@1 25 | 26 | v4 = a4; 27 | v5 = this; 28 | v6 = a3; 29 | v7 = a2; 30 | v8 = Random::_genRandInt32(a4) % 3 + 5; 31 | if ( *((_BYTE *)v5 + 21) ) 32 | v8 += Random::_genRandInt32(v4) % 7; 33 | return TreeFeature::place(v5, v7, v6, v4, v8); 34 | } 35 | 36 | 37 | int __fastcall BirchFeature::BirchFeature(TreeFeature *a1, Entity *a2, char a3) 38 | { 39 | char v3; // r4@1 40 | int result; // r0@1 41 | 42 | v3 = a3; 43 | result = TreeFeature::TreeFeature(a1, a2, 2, 2, 0); 44 | *(_DWORD *)result = &off_27189C4; 45 | *(_BYTE *)(result + 21) = v3; 46 | return result; 47 | } 48 | -------------------------------------------------------------------------------- /Minecraft/Renderer/UICustomRenderer.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall UICustomRenderer::getCustomId(UICustomRenderer *this) 4 | { 5 | return 0; 6 | } 7 | 8 | 9 | signed int __fastcall UICustomRenderer::getNumRenderPasses(UICustomRenderer *this) 10 | { 11 | return 1; 12 | } 13 | 14 | 15 | int __fastcall UICustomRenderer::getBatchType(UICustomRenderer *this) 16 | { 17 | return 0; 18 | } 19 | 20 | 21 | int __fastcall UICustomRenderer::getRequiresPreRenderSetup(UICustomRenderer *this, int a2) 22 | { 23 | return 0; 24 | } 25 | 26 | 27 | void *__fastcall UICustomRenderer::getMaterialName(UICustomRenderer *this, int a2) 28 | { 29 | return &unk_257BC67; 30 | } 31 | 32 | 33 | int __fastcall UICustomRenderer::getResourceLocation(int result, int a2, int a3) 34 | { 35 | *(_QWORD *)result = (unsigned int)&unk_28898CC; 36 | return result; 37 | } 38 | 39 | 40 | _QWORD *__fastcall UICustomRenderer::UICustomRenderer(_QWORD *result) 41 | { 42 | __int64 v1; // r1@1 43 | 44 | HIDWORD(v1) = 1065353216; 45 | LODWORD(v1) = &off_26D6D1C; 46 | *result = v1; 47 | return result; 48 | } 49 | 50 | 51 | signed int __fastcall UICustomRenderer::update(UICustomRenderer *this, ClientInstance *a2, UIControl *a3) 52 | { 53 | return 1; 54 | } 55 | -------------------------------------------------------------------------------- /Minecraft/Level/Biome/StoneBeachBiome.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall StoneBeachBiome::~StoneBeachBiome(StoneBeachBiome *this) 4 | { 5 | StoneBeachBiome::~StoneBeachBiome(this); 6 | } 7 | 8 | 9 | int __fastcall StoneBeachBiome::StoneBeachBiome(int a1, int a2) 10 | { 11 | int v2; // r4@1 12 | __int64 v3; // kr00_8@3 13 | int v4; // r0@3 14 | int v5; // r0@3 15 | int v7; // [sp+4h] [bp-14h]@1 16 | 17 | v2 = a1; 18 | v7 = 0; 19 | Biome::Biome(a1, a2, 14, &v7); 20 | if ( v7 ) 21 | (*(void (**)(void))(*(_DWORD *)v7 + 12))(); 22 | *(_DWORD *)v2 = &loc_27042A4; 23 | v3 = *(_QWORD *)(v2 + 140); 24 | std::_Destroy(*(_QWORD *)(v2 + 140), SHIDWORD(v3)); 25 | *(_DWORD *)(v2 + 144) = v3; 26 | v4 = Block::mStone; 27 | *(_BYTE *)(v2 + 188) = *(_BYTE *)(Block::mStone + 4); 28 | *(_BYTE *)(v2 + 190) = *(_BYTE *)(v4 + 4); 29 | v5 = *(_DWORD *)(v2 + 124); 30 | *(_DWORD *)(v5 + 208) = -998653952; 31 | *(_DWORD *)(v5 + 220) = 0; 32 | *(_DWORD *)(v5 + 228) = 0; 33 | *(_DWORD *)(v5 + 232) = 0; 34 | return v2; 35 | } 36 | 37 | 38 | void __fastcall StoneBeachBiome::~StoneBeachBiome(StoneBeachBiome *this) 39 | { 40 | Biome *v1; // r0@1 41 | 42 | v1 = Biome::~Biome(this); 43 | j_j_j__ZdlPv_6((void *)v1); 44 | } 45 | -------------------------------------------------------------------------------- /unmapped/JStringToString.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall JStringToString::JStringToString(int *a1, int a2, int a3) 4 | { 5 | int *v3; // r8@1 6 | int v4; // r6@1 7 | int v5; // r5@1 8 | const char *v6; // r7@1 9 | void *v7; // r0@2 10 | unsigned int *v9; // r2@4 11 | signed int v10; // r1@6 12 | int v11; // [sp+8h] [bp-28h]@2 13 | 14 | v3 = a1; 15 | v4 = a2; 16 | v5 = a3; 17 | *a1 = (int)&unk_28898CC; 18 | v6 = (const char *)(*(int (__fastcall **)(int, int, _DWORD))(*(_DWORD *)a2 + 676))(a2, a3, 0); 19 | if ( v6 ) 20 | { 21 | sub_DA7364((void **)&v11, v6); 22 | xbox::services::user_statistics::service_configuration_statistic::_Set_input_service_configuration_id(v3, &v11); 23 | v7 = (void *)(v11 - 12); 24 | if ( (int *)(v11 - 12) != &dword_28898C0 ) 25 | { 26 | v9 = (unsigned int *)(v11 - 4); 27 | if ( &pthread_create ) 28 | { 29 | __dmb(); 30 | do 31 | v10 = __ldrex(v9); 32 | while ( __strex(v10 - 1, v9) ); 33 | } 34 | else 35 | v10 = (*v9)--; 36 | if ( v10 <= 0 ) 37 | j_j_j_j_j__ZdlPv_9(v7); 38 | } 39 | } 40 | (*(void (__fastcall **)(int, int, const char *))(*(_DWORD *)v4 + 680))(v4, v5, v6); 41 | return v3; 42 | } 43 | -------------------------------------------------------------------------------- /Minecraft/Command/CommandParameterData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall CommandParameterData::CommandParameterData(int a1, int a2) 4 | { 5 | int v2; // r4@1 6 | int v3; // r5@1 7 | 8 | v2 = a2; 9 | v3 = a1; 10 | *(_WORD *)a1 = *(_WORD *)a2; 11 | *(_QWORD *)(a1 + 4) = *(_QWORD *)(a2 + 4); 12 | sub_21E8AF4((int *)(a1 + 12), (int *)(a2 + 12)); 13 | *(_DWORD *)(v3 + 16) = *(_DWORD *)(v2 + 16); 14 | *(_DWORD *)(v3 + 20) = *(_DWORD *)(v2 + 20); 15 | *(_DWORD *)(v3 + 24) = *(_DWORD *)(v2 + 24); 16 | *(_DWORD *)(v3 + 28) = *(_DWORD *)(v2 + 28); 17 | *(_DWORD *)(v3 + 32) = *(_DWORD *)(v2 + 32); 18 | *(_BYTE *)(v3 + 36) = *(_BYTE *)(v2 + 36); 19 | return v3; 20 | } 21 | 22 | 23 | int __fastcall CommandParameterData::CommandParameterData(int a1, _WORD *a2, __int64 a3, const char *a4, int a5, int a6, int a7, char a8, int a9) 24 | { 25 | int v9; // r4@1 26 | int result; // r0@1 27 | 28 | v9 = a1; 29 | *(_WORD *)a1 = *a2; 30 | *(_QWORD *)(a1 + 4) = a3; 31 | sub_21E94B4((void **)(a1 + 12), a4); 32 | *(_DWORD *)(v9 + 16) = a6; 33 | result = v9; 34 | *(_DWORD *)(v9 + 20) = -1; 35 | *(_DWORD *)(v9 + 24) = a5; 36 | *(_DWORD *)(v9 + 28) = a7; 37 | *(_DWORD *)(v9 + 32) = a9; 38 | *(_BYTE *)(v9 + 36) = a8; 39 | return result; 40 | } 41 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/MoveEntityPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall MoveEntityPacket::read(MoveEntityPacket *this, BinaryStream *a2) 4 | { 5 | MoveEntityPacket *v2; // r4@1 6 | int v3; // r1@1 7 | int result; // r0@1 8 | int v5; // [sp+0h] [bp-28h]@1 9 | int v6; // [sp+8h] [bp-20h]@1 10 | int v7; // [sp+Ch] [bp-1Ch]@1 11 | int v8; // [sp+10h] [bp-18h]@1 12 | int v9; // [sp+14h] [bp-14h]@1 13 | char v10; // [sp+18h] [bp-10h]@1 14 | 15 | v2 = this; 16 | ReadOnlyBinaryStream::getType((int)&v5, (int)a2); 17 | *((_QWORD *)v2 + 2) = *(_QWORD *)&v5; 18 | *((_DWORD *)v2 + 6) = v6; 19 | *((_DWORD *)v2 + 7) = v7; 20 | *((_DWORD *)v2 + 8) = v8; 21 | v3 = v9; 22 | *((_BYTE *)v2 + 40) = v10; 23 | result = 0; 24 | *((_DWORD *)v2 + 9) = v3; 25 | return result; 26 | } 27 | 28 | 29 | int __fastcall MoveEntityPacket::handle(MoveEntityPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 30 | { 31 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, MoveEntityPacket *))(*(_DWORD *)a3 + 116))( 32 | a3, 33 | a2, 34 | this); 35 | } 36 | 37 | 38 | signed int __fastcall MoveEntityPacket::getId(MoveEntityPacket *this) 39 | { 40 | return 18; 41 | } 42 | -------------------------------------------------------------------------------- /Minecraft/CommandBlock/CommandBlockDescription.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void *__fastcall CommandBlockDescription::getDescription(CommandBlockDescription *this) 4 | { 5 | return &unk_257BC67; 6 | } 7 | 8 | 9 | void *__fastcall CommandBlockDescription::getJsonName(CommandBlockDescription *this) 10 | { 11 | return &unk_257BC67; 12 | } 13 | 14 | 15 | void __fastcall CommandBlockDescription::parseData(CommandBlockDescription *this, Json::Value *a2, int a3, int a4, bool a5) 16 | { 17 | CommandBlockDescription::parseData(this, a2, a3, a4, a5); 18 | } 19 | 20 | 21 | void __fastcall CommandBlockDescription::parseData(CommandBlockDescription *this, Json::Value *a2, int a3, int a4, bool a5) 22 | { 23 | Json::Value *v5; // r4@1 24 | CommandBlockDescription *v6; // r5@1 25 | int v7; // ST00_4@1 26 | int v8; // [sp+0h] [bp-10h]@0 27 | 28 | v5 = a2; 29 | v6 = this; 30 | Parser::parse(a2, (CommandBlockDescription *)((char *)this + 8), (int *)"ticks_per_command", (const char *)1, v8); 31 | Parser::parse(v5, (CommandBlockDescription *)((char *)v6 + 4), (int *)"current_tick_count", 0, v7); 32 | j_j_j__ZN6Parser5parseERKN4Json5ValueERbPKcb_0( 33 | v5, 34 | (CommandBlockDescription *)((char *)v6 + 12), 35 | (bool *)"ticking", 36 | 0, 37 | a5); 38 | } 39 | -------------------------------------------------------------------------------- /Minecraft/Entity/ExperiencePotion.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall ExperiencePotion::getEntityTypeId(ExperiencePotion *this) 4 | { 5 | return 4194372; 6 | } 7 | 8 | 9 | void __fastcall ExperiencePotion::~ExperiencePotion(ExperiencePotion *this) 10 | { 11 | ExperiencePotion::~ExperiencePotion(this); 12 | } 13 | 14 | 15 | void __fastcall ExperiencePotion::~ExperiencePotion(ExperiencePotion *this) 16 | { 17 | Entity *v1; // r0@1 18 | 19 | v1 = Entity::~Entity(this); 20 | j_j_j__ZdlPv_6((void *)v1); 21 | } 22 | 23 | 24 | signed int __fastcall ExperiencePotion::getGravity(ExperiencePotion *this) 25 | { 26 | return 1028443341; 27 | } 28 | 29 | 30 | signed int __fastcall ExperiencePotion::getThrowUpAngleOffset(ExperiencePotion *this) 31 | { 32 | return -1046478848; 33 | } 34 | 35 | 36 | signed int __fastcall ExperiencePotion::getThrowPower(ExperiencePotion *this) 37 | { 38 | return 1056964608; 39 | } 40 | 41 | 42 | Entity *__fastcall ExperiencePotion::ExperiencePotion(Throwable *a1, EntityDefinitionGroup *a2, const EntityDefinitionIdentifier *a3) 43 | { 44 | Entity *result; // r0@1 45 | 46 | result = Throwable::Throwable(a1, a2, a3); 47 | *(_DWORD *)result = &off_26FDEE4; 48 | *((_DWORD *)result + 62) = 52; 49 | return result; 50 | } 51 | -------------------------------------------------------------------------------- /Minecraft/Enchant/FrostWalkerEnchant.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall FrostWalkerEnchant::getMaxCost(FrostWalkerEnchant *this, int a2) 4 | { 5 | return (*(int (**)(void))(*(_DWORD *)this + 8))() + 15; 6 | } 7 | 8 | 9 | void __fastcall FrostWalkerEnchant::~FrostWalkerEnchant(FrostWalkerEnchant *this) 10 | { 11 | FrostWalkerEnchant::~FrostWalkerEnchant(this); 12 | } 13 | 14 | 15 | void __fastcall FrostWalkerEnchant::~FrostWalkerEnchant(FrostWalkerEnchant *this) 16 | { 17 | Enchant *v1; // r0@1 18 | 19 | v1 = Enchant::~Enchant(this); 20 | j_j_j__ZdlPv_6((void *)v1); 21 | } 22 | 23 | 24 | _DWORD *__fastcall FrostWalkerEnchant::FrostWalkerEnchant(int a1, EnchantUtils *a2, int a3, int a4, int a5, int a6, int a7) 25 | { 26 | _DWORD *result; // r0@1 27 | 28 | result = (_DWORD *)Enchant::Enchant(a1, a2, a3, a4, a5, a6, a7); 29 | *result = &off_27016F4; 30 | return result; 31 | } 32 | 33 | 34 | signed int __fastcall FrostWalkerEnchant::isTreasureOnly(FrostWalkerEnchant *this) 35 | { 36 | return 1; 37 | } 38 | 39 | 40 | int __fastcall FrostWalkerEnchant::getMinCost(FrostWalkerEnchant *this, int a2) 41 | { 42 | return 10 * a2; 43 | } 44 | 45 | 46 | signed int __fastcall FrostWalkerEnchant::getMaxLevel(FrostWalkerEnchant *this) 47 | { 48 | return 2; 49 | } 50 | -------------------------------------------------------------------------------- /Minecraft/Network/RakNet/RakStringCleanup.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | RakStringCleanup *__fastcall RakStringCleanup::~RakStringCleanup(RakStringCleanup *this) 4 | { 5 | RakStringCleanup *v1; // r8@1 6 | unsigned int v2; // r6@2 7 | _DWORD *v3; // r1@3 8 | RakNet::SimpleMutex *v4; // r0@3 9 | RakNet::SimpleMutex *v5; // r0@4 10 | 11 | v1 = this; 12 | if ( dword_283C398 ) 13 | { 14 | v2 = 0; 15 | do 16 | { 17 | v3 = RakNet::RakString::freeList; 18 | v4 = (RakNet::SimpleMutex *)**((_DWORD **)RakNet::RakString::freeList + v2); 19 | if ( v4 ) 20 | { 21 | v5 = j_RakNet::SimpleMutex::~SimpleMutex(v4); 22 | j_operator delete((void *)v5); 23 | v3 = RakNet::RakString::freeList; 24 | } 25 | rakFree_Ex( 26 | v3[v2++], 27 | "F:\\DarwinWork\\22\\s\\handheld\\project\\VS2015\\dependencies\\Raknet\\Raknet.Shared\\..\\..\\..\\..\\..\\src-d" 28 | "eps\\raknet\\RakString.cpp", 29 | 1212); 30 | } 31 | while ( v2 < dword_283C398 ); 32 | } 33 | if ( unk_283C39C ) 34 | if ( RakNet::RakString::freeList ) 35 | j_operator delete[](RakNet::RakString::freeList); 36 | RakNet::RakString::freeList = 0; 37 | dword_283C398 = 0; 38 | unk_283C39C = 0; 39 | return v1; 40 | } 41 | -------------------------------------------------------------------------------- /Minecraft/Player/PlayerListInfo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int *__fastcall PlayerListInfo::PlayerListInfo(int *a1, int *a2) 4 | { 5 | int *v2; // r9@1 6 | int *v3; // r8@1 7 | int v4; // r1@1 8 | int v5; // r3@1 9 | int v6; // r4@1 10 | int v7; // r5@1 11 | int v8; // r6@1 12 | int v9; // r7@1 13 | 14 | v2 = a2; 15 | v3 = a1; 16 | sub_21E8AF4(a1, a2); 17 | v4 = (int)(v3 + 2); 18 | v5 = v2[3]; 19 | v6 = v2[4]; 20 | v7 = v2[5]; 21 | v8 = v2[6]; 22 | v9 = v2[7]; 23 | *(_DWORD *)v4 = v2[2]; 24 | *(_DWORD *)(v4 + 4) = v5; 25 | *(_DWORD *)(v4 + 8) = v6; 26 | *(_DWORD *)(v4 + 12) = v7; 27 | *(_DWORD *)(v4 + 16) = v8; 28 | *(_DWORD *)(v4 + 20) = v9; 29 | sub_21E8AF4(v3 + 8, v2 + 8); 30 | sub_21E8AF4(v3 + 9, v2 + 9); 31 | *((_WORD *)v3 + 20) = *((_WORD *)v2 + 20); 32 | return v3; 33 | } 34 | 35 | 36 | int *__fastcall PlayerListInfo::PlayerListInfo(int *a1) 37 | { 38 | int *v1; // r5@1 39 | 40 | v1 = a1; 41 | sub_21E8AF4(a1, (int *)&Util::EMPTY_STRING); 42 | v1[2] = -1; 43 | v1[3] = -1; 44 | v1[4] = 0; 45 | v1[5] = 0; 46 | v1[6] = 0; 47 | v1[7] = 0; 48 | sub_21E8AF4(v1 + 8, (int *)&Util::EMPTY_STRING); 49 | sub_21E8AF4(v1 + 9, (int *)&Core::PathBuffer::EMPTY); 50 | *((_WORD *)v1 + 20) = 0; 51 | return v1; 52 | } 53 | -------------------------------------------------------------------------------- /unmapped/PixelCalc.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall PixelCalc::millimetersToPixels(PixelCalc *this, float _R1) 4 | { 5 | int result; // r0@1 6 | 7 | __asm 8 | { 9 | VMOV S0, R1 10 | VLDR S2, [R0] 11 | VMUL.F32 S0, S2, S0 12 | VMOV R0, S0 13 | } 14 | return result; 15 | } 16 | 17 | 18 | int __fastcall PixelCalc::setPixelsPerMillimeter(int result, float _R1) 19 | { 20 | __asm { VMOV.F32 S0, #1.0 } 21 | *(float *)result = _R1; 22 | __asm 23 | { 24 | VMOV S2, R1 25 | VDIV.F32 S0, S0, S2 26 | VSTR S0, [R0,#4] 27 | } 28 | return result; 29 | } 30 | 31 | 32 | int __fastcall PixelCalc::pixelsToMillimeters(PixelCalc *this, float _R1) 33 | { 34 | int result; // r0@1 35 | 36 | __asm 37 | { 38 | VMOV S0, R1 39 | VLDR S2, [R0,#4] 40 | VMUL.F32 S0, S2, S0 41 | VMOV R0, S0 42 | } 43 | return result; 44 | } 45 | 46 | 47 | _DWORD *__fastcall PixelCalc::PixelCalc(_DWORD *result, int _R1) 48 | { 49 | __asm { VMOV.F32 S0, #1.0 } 50 | *result = _R1; 51 | __asm 52 | { 53 | VMOV S2, R1 54 | VDIV.F32 S0, S0, S2 55 | VSTR S0, [R0,#4] 56 | } 57 | return result; 58 | } 59 | -------------------------------------------------------------------------------- /Minecraft/Network/Nbt/NbtIo.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall NbtIo::read(NbtIo *this, IDataInput *a2) 4 | { 5 | NbtIo::read(this, a2); 6 | } 7 | 8 | 9 | void __fastcall NbtIo::read(NbtIo *this, IDataInput *a2) 10 | { 11 | NbtIo *v2; // r4@1 12 | int v3; // r0@3 13 | void *v4; // r5@4 14 | int v5; // r0@4 15 | char *v6; // r0@6 16 | unsigned int *v7; // r2@8 17 | signed int v8; // r1@10 18 | int v9; // [sp+0h] [bp-20h]@1 19 | char *v10; // [sp+4h] [bp-1Ch]@1 20 | 21 | v2 = this; 22 | v10 = (char *)&unk_28898CC; 23 | Tag::readNamedTag(&v9, (int)a2, (int *)&v10); 24 | if ( v9 && (*(int (**)(void))(*(_DWORD *)v9 + 24))() == 10 ) 25 | { 26 | v3 = v9; 27 | v9 = 0; 28 | *(_DWORD *)v2 = v3; 29 | } 30 | else 31 | v4 = operator new(0x1Cu); 32 | CompoundTag::CompoundTag((int)v4); 33 | v5 = v9; 34 | *(_DWORD *)v2 = v4; 35 | if ( v5 ) 36 | (*(void (**)(void))(*(_DWORD *)v5 + 4))(); 37 | v6 = v10 - 12; 38 | if ( (int *)(v10 - 12) != &dword_28898C0 ) 39 | v7 = (unsigned int *)(v10 - 4); 40 | if ( &pthread_create ) 41 | { 42 | __dmb(); 43 | do 44 | v8 = __ldrex(v7); 45 | while ( __strex(v8 - 1, v7) ); 46 | } 47 | else 48 | v8 = (*v7)--; 49 | if ( v8 <= 0 ) 50 | j_j_j_j__ZdlPv_9(v6); 51 | } 52 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/EntityPickRequestPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityPickRequestPacket::read(EntityPickRequestPacket *this, BinaryStream *a2) 4 | { 5 | BinaryStream *v2; // r4@1 6 | EntityPickRequestPacket *v3; // r5@1 7 | 8 | v2 = a2; 9 | v3 = this; 10 | *((_QWORD *)this + 2) = ReadOnlyBinaryStream::getSignedInt64(a2); 11 | *((_BYTE *)v3 + 24) = ReadOnlyBinaryStream::getByte(v2); 12 | return 0; 13 | } 14 | 15 | 16 | signed int __fastcall EntityPickRequestPacket::getId(EntityPickRequestPacket *this) 17 | { 18 | return 35; 19 | } 20 | 21 | 22 | int __fastcall EntityPickRequestPacket::handle(EntityPickRequestPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 23 | { 24 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, EntityPickRequestPacket *))(*(_DWORD *)a3 + 160))( 25 | a3, 26 | a2, 27 | this); 28 | } 29 | 30 | 31 | const void **__fastcall EntityPickRequestPacket::write(EntityPickRequestPacket *this, BinaryStream *a2) 32 | { 33 | EntityPickRequestPacket *v2; // r5@1 34 | BinaryStream *v3; // r4@1 35 | 36 | v2 = this; 37 | v3 = a2; 38 | BinaryStream::writeSignedInt64(a2, (int)a2, *((_QWORD *)this + 2)); 39 | return j_j_j__ZN12BinaryStream9writeByteEh_0(v3, *((_BYTE *)v2 + 24)); 40 | } 41 | -------------------------------------------------------------------------------- /unmapped/Facing.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | Facing *__fastcall Facing::getOpposite(Facing *this, signed __int8 a2) 4 | { 5 | Facing *v2; // r1@1 6 | Facing *result; // r0@1 7 | 8 | v2 = this; 9 | result = (Facing *)1; 10 | switch ( v2 ) 11 | { 12 | case 1u: 13 | result = 0; 14 | break; 15 | case 0u: 16 | return result; 17 | case 2u: 18 | result = (Facing *)3; 19 | case 3u: 20 | result = (Facing *)2; 21 | case 4u: 22 | result = (Facing *)5; 23 | case 5u: 24 | result = (Facing *)4; 25 | default: 26 | result = v2; 27 | } 28 | return result; 29 | } 30 | 31 | 32 | signed int __fastcall Facing::getCounterClockWise(Facing *this, signed __int8 a2) 33 | { 34 | char *v2; // r0@1 35 | signed int result; // r0@2 36 | 37 | v2 = (char *)this - 2; 38 | if ( (unsigned int)v2 <= 3 ) 39 | result = (char)(0x2030504u >> 8 * (_BYTE)v2); 40 | else 41 | result = 2; 42 | return result; 43 | } 44 | 45 | 46 | signed int __fastcall Facing::getClockWise(Facing *this, signed __int8 a2) 47 | { 48 | char *v2; // r0@1 49 | signed int result; // r0@2 50 | 51 | v2 = (char *)this - 2; 52 | if ( (unsigned int)v2 <= 3 ) 53 | result = (char)(0x3020405u >> 8 * (_BYTE)v2); 54 | else 55 | result = 2; 56 | return result; 57 | } 58 | -------------------------------------------------------------------------------- /Minecraft/Block/Entity/EndPortalBlockEntity.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall EndPortalBlockEntity::~EndPortalBlockEntity(EndPortalBlockEntity *this) 4 | { 5 | EndPortalBlockEntity::~EndPortalBlockEntity(this); 6 | } 7 | 8 | 9 | void __fastcall EndPortalBlockEntity::~EndPortalBlockEntity(EndPortalBlockEntity *this) 10 | { 11 | BlockEntity *v1; // r0@1 12 | 13 | v1 = BlockEntity::~BlockEntity(this); 14 | j_j_j__ZdlPv_6((void *)v1); 15 | } 16 | 17 | 18 | int __fastcall EndPortalBlockEntity::EndPortalBlockEntity(int a1, int a2) 19 | { 20 | int v2; // r5@1 21 | int v3; // r4@1 22 | void *v4; // r0@1 23 | unsigned int *v6; // r2@3 24 | signed int v7; // r1@5 25 | int v8; // [sp+4h] [bp-1Ch]@1 26 | 27 | v2 = a2; 28 | v3 = a1; 29 | sub_21E94B4((void **)&v8, "EndPortal"); 30 | BlockEntity::BlockEntity(v3, 22, v2); 31 | v4 = (void *)(v8 - 12); 32 | if ( (int *)(v8 - 12) != &dword_28898C0 ) 33 | { 34 | v6 = (unsigned int *)(v8 - 4); 35 | if ( &pthread_create ) 36 | { 37 | __dmb(); 38 | do 39 | v7 = __ldrex(v6); 40 | while ( __strex(v7 - 1, v6) ); 41 | } 42 | else 43 | v7 = (*v6)--; 44 | if ( v7 <= 0 ) 45 | j_j_j_j__ZdlPv_9(v4); 46 | } 47 | *(_DWORD *)v3 = &off_2709B40; 48 | *(_DWORD *)(v3 + 84) = 11; 49 | return v3; 50 | } 51 | -------------------------------------------------------------------------------- /Minecraft/Block/LightGemBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall LightGemBlock::~LightGemBlock(LightGemBlock *this) 4 | { 5 | LightGemBlock::~LightGemBlock(this); 6 | } 7 | 8 | 9 | int __fastcall LightGemBlock::LightGemBlock(int a1, const void **a2, char a3, int a4) 10 | { 11 | int result; // r0@1 12 | int v5; // lr@1 13 | __int64 v6; // r1@1 14 | 15 | result = Block::Block(a1, a2, a3, a4); 16 | v5 = result + 60; 17 | *(_DWORD *)result = &off_270DC58; 18 | v6 = *(_QWORD *)(result + 24); 19 | *(_DWORD *)(result + 28) = HIDWORD(v6); 20 | *(_DWORD *)(result + 24) = v6 | 0xC00000; 21 | *(_DWORD *)v5 = 1065353216; 22 | *(_DWORD *)(v5 + 4) = 1060945085; 23 | *(_DWORD *)(v5 + 8) = 1052556477; 24 | *(_DWORD *)(v5 + 12) = 0; 25 | return result; 26 | } 27 | 28 | 29 | void __fastcall LightGemBlock::~LightGemBlock(LightGemBlock *this) 30 | { 31 | Block *v1; // r0@1 32 | 33 | v1 = Block::~Block(this); 34 | j_j_j__ZdlPv_6((void *)v1); 35 | } 36 | 37 | 38 | signed int __fastcall LightGemBlock::getResourceCount(LightGemBlock *this, Random *a2, int a3, int a4) 39 | { 40 | signed int result; // r0@2 41 | 42 | if ( a4 == -3 ) 43 | result = 2; 44 | else 45 | result = Random::_genRandInt32(a2) % (a4 + 3) + 2; 46 | if ( result >= 4 ) 47 | result = 4; 48 | return result; 49 | } 50 | -------------------------------------------------------------------------------- /UnitTest/EntityHasAbilityTest.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall EntityHasAbilityTest::evaluate(int a1, int a2) 4 | { 5 | int v2; // r5@1 6 | int v3; // r4@1 7 | void **v4; // r0@4 8 | int result; // r0@5 9 | int v6; // r1@6 10 | 11 | v2 = *(_DWORD *)(a2 + 4); 12 | v3 = a1; 13 | if ( v2 && j_Entity::hasCategory(*(_DWORD *)(a2 + 4), 1) == 1 ) 14 | { 15 | switch ( *(_DWORD *)(v3 + 8) ) 16 | { 17 | case 0: 18 | v4 = &Abilities::INVULNERABLE; 19 | goto LABEL_16; 20 | case 1: 21 | v4 = &Abilities::FLYING; 22 | case 2: 23 | v4 = &Abilities::INSTABUILD; 24 | case 3: 25 | v4 = &Abilities::LIGHTNING; 26 | case 4: 27 | v4 = &Abilities::FLYSPEED; 28 | case 5: 29 | v4 = &Abilities::WALKSPEED; 30 | case 6: 31 | v4 = &Abilities::NOCLIP; 32 | case 7: 33 | v4 = &Abilities::MAYFLY; 34 | case 8: 35 | v4 = &Abilities::WORLDBUILDER; 36 | case 9: 37 | v4 = &Abilities::MUTED; 38 | LABEL_16: 39 | v6 = j_Abilities::getBool(v2 + 4320, (int **)*v4); 40 | break; 41 | default: 42 | v6 = 0; 43 | } 44 | result = j_FilterTest::_testValuesWithOperator((FilterTest *)v3, v6, 1); 45 | } 46 | else 47 | result = 0; 48 | return result; 49 | } 50 | -------------------------------------------------------------------------------- /Minecraft/Item/CarrotOnAStickItem.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall CarrotOnAStickItem::CarrotOnAStickItem(int a1, const void **a2, __int16 a3) 4 | { 5 | int v3; // r4@1 6 | 7 | v3 = a1; 8 | j_Item::Item(a1, a2, a3); 9 | *(_DWORD *)v3 = &off_2720878; 10 | *(_BYTE *)(v3 + 113) = 1; 11 | j_Item::setMaxStackSize((Item *)v3, 1u); 12 | (*(void (__fastcall **)(int, signed int))(*(_DWORD *)v3 + 28))(v3, 26); 13 | return v3; 14 | } 15 | 16 | 17 | void __fastcall CarrotOnAStickItem::~CarrotOnAStickItem(CarrotOnAStickItem *this) 18 | { 19 | Item *v1; // r0@1 20 | 21 | v1 = j_Item::~Item(this); 22 | j_j_j__ZdlPv_7((void *)v1); 23 | } 24 | 25 | 26 | void __fastcall CarrotOnAStickItem::~CarrotOnAStickItem(CarrotOnAStickItem *this) 27 | { 28 | CarrotOnAStickItem::~CarrotOnAStickItem(this); 29 | } 30 | 31 | 32 | signed int __fastcall CarrotOnAStickItem::requiresInteract(CarrotOnAStickItem *this) 33 | { 34 | return 1; 35 | } 36 | 37 | 38 | signed int __fastcall CarrotOnAStickItem::getEnchantSlot(CarrotOnAStickItem *this) 39 | { 40 | return 0x2000; 41 | } 42 | 43 | 44 | signed int __fastcall CarrotOnAStickItem::isHandEquipped(CarrotOnAStickItem *this) 45 | { 46 | return 1; 47 | } 48 | 49 | 50 | signed int __fastcall CarrotOnAStickItem::getEnchantValue(CarrotOnAStickItem *this) 51 | { 52 | return 1; 53 | } 54 | -------------------------------------------------------------------------------- /unmapped/DragonFireball.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall DragonFireball::~DragonFireball(DragonFireball *this) 4 | { 5 | DragonFireball::~DragonFireball(this); 6 | } 7 | 8 | 9 | void __fastcall DragonFireball::~DragonFireball(DragonFireball *this) 10 | { 11 | Entity *v1; // r0@1 12 | 13 | v1 = Entity::~Entity(this); 14 | j_j_j__ZdlPv_6((void *)v1); 15 | } 16 | 17 | 18 | signed int __fastcall DragonFireball::getEntityTypeId(DragonFireball *this) 19 | { 20 | return 4194383; 21 | } 22 | 23 | 24 | int __fastcall DragonFireball::_hurt(DragonFireball *this, const EntityDamageSource *a2, int a3, bool a4, bool a5) 25 | { 26 | return 0; 27 | } 28 | 29 | 30 | int __fastcall DragonFireball::DragonFireball(Fireball *a1, EntityDefinitionGroup *a2, const EntityDefinitionIdentifier *a3) 31 | { 32 | int result; // r0@1 33 | 34 | result = Fireball::Fireball(a1, a2, a3); 35 | *(_DWORD *)result = &off_26FD8C4; 36 | *(_DWORD *)(result + 248) = 43; 37 | return result; 38 | } 39 | 40 | 41 | signed int __fastcall DragonFireball::getTrailParticle(DragonFireball *this) 42 | { 43 | return 41; 44 | } 45 | 46 | 47 | int __fastcall DragonFireball::isPickable(DragonFireball *this) 48 | { 49 | return 0; 50 | } 51 | 52 | 53 | int __fastcall DragonFireball::shouldBurn(DragonFireball *this) 54 | { 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /unmapped/VariantParameterList.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | _BOOL4 __fastcall VariantParameterList::hasParameter(unsigned __int64 *a1, int **a2) 4 | { 5 | return j_std::_Hashtable,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::find( 6 | a1, 7 | a2) != 0; 8 | } 9 | 10 | 11 | __int64 __fastcall VariantParameterList::getParameterType(unsigned __int64 *a1, int **a2) 12 | { 13 | int v2; // r0@1 14 | __int64 result; // r0@2 15 | 16 | v2 = j_std::_Hashtable,std::allocator>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::find( 17 | a1, 18 | a2); 19 | if ( v2 ) 20 | result = *(_QWORD *)(v2 + 16); 21 | else 22 | result = 0LL; 23 | return result; 24 | } 25 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/CameraPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | const void **__fastcall CameraPacket::write(CameraPacket *this, BinaryStream *a2) 4 | { 5 | BinaryStream *v2; // r4@1 6 | CameraPacket *v3; // r5@1 7 | 8 | v2 = a2; 9 | v3 = this; 10 | BinaryStream::writeType((int)a2, (__int64 *)this + 2); 11 | return j_j_j__ZN12BinaryStream9writeTypeI14EntityUniqueIDEEvRKT_((int)v2, (__int64 *)v3 + 3); 12 | } 13 | 14 | 15 | int __fastcall CameraPacket::read(CameraPacket *this, BinaryStream *a2) 16 | { 17 | CameraPacket *v2; // r5@1 18 | BinaryStream *v3; // r4@1 19 | int v5; // [sp+0h] [bp-18h]@1 20 | 21 | v2 = this; 22 | v3 = a2; 23 | ReadOnlyBinaryStream::getType((int)&v5, (int)a2); 24 | *((_QWORD *)v2 + 2) = *(_QWORD *)&v5; 25 | ReadOnlyBinaryStream::getType((int)&v5, (int)v3); 26 | *((_QWORD *)v2 + 3) = *(_QWORD *)&v5; 27 | return 0; 28 | } 29 | 30 | 31 | signed int __fastcall CameraPacket::getId(CameraPacket *this) 32 | { 33 | return 73; 34 | } 35 | 36 | 37 | int __fastcall CameraPacket::handle(CameraPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 38 | { 39 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, CameraPacket *))(*(_DWORD *)a3 + 352))( 40 | a3, 41 | a2, 42 | this); 43 | } 44 | -------------------------------------------------------------------------------- /Minecraft/Network/Packet/ShowCreditsPacket.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | int __fastcall ShowCreditsPacket::read(ShowCreditsPacket *this, BinaryStream *a2) 4 | { 5 | ShowCreditsPacket *v2; // r5@1 6 | BinaryStream *v3; // r4@1 7 | int v5; // [sp+0h] [bp-18h]@1 8 | 9 | v2 = this; 10 | v3 = a2; 11 | ReadOnlyBinaryStream::getType((int)&v5, (int)a2); 12 | *((_QWORD *)v2 + 2) = *(_QWORD *)&v5; 13 | *((_DWORD *)v2 + 6) = ReadOnlyBinaryStream::getVarInt(v3); 14 | return 0; 15 | } 16 | 17 | 18 | signed int __fastcall ShowCreditsPacket::getId(ShowCreditsPacket *this) 19 | { 20 | return 75; 21 | } 22 | 23 | 24 | int __fastcall ShowCreditsPacket::handle(ShowCreditsPacket *this, const NetworkIdentifier *a2, NetEventCallback *a3) 25 | { 26 | return (*(int (__fastcall **)(NetEventCallback *, const NetworkIdentifier *, ShowCreditsPacket *))(*(_DWORD *)a3 + 440))( 27 | a3, 28 | a2, 29 | this); 30 | } 31 | 32 | 33 | unsigned int __fastcall ShowCreditsPacket::write(ShowCreditsPacket *this, BinaryStream *a2) 34 | { 35 | BinaryStream *v2; // r4@1 36 | ShowCreditsPacket *v3; // r5@1 37 | 38 | v2 = a2; 39 | v3 = this; 40 | BinaryStream::writeType((int)a2, (unsigned __int64 *)this + 2); 41 | return j_j_j__ZN12BinaryStream11writeVarIntEi_1(v2, *((_DWORD *)v3 + 6)); 42 | } 43 | -------------------------------------------------------------------------------- /Minecraft/Command/CommandOriginData.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | CommandOriginData *__fastcall CommandOriginData::~CommandOriginData(CommandOriginData *this) 4 | { 5 | CommandOriginData *v1; // r5@1 6 | int v2; // r1@1 7 | void *v3; // r0@1 8 | unsigned int *v5; // r2@3 9 | signed int v6; // r1@5 10 | 11 | v1 = this; 12 | v2 = *((_DWORD *)this + 1); 13 | v3 = (void *)(v2 - 12); 14 | if ( (int *)(v2 - 12) != &dword_28898C0 ) 15 | { 16 | v5 = (unsigned int *)(v2 - 4); 17 | if ( &pthread_create ) 18 | { 19 | __dmb(); 20 | do 21 | v6 = __ldrex(v5); 22 | while ( __strex(v6 - 1, v5) ); 23 | } 24 | else 25 | v6 = (*v5)--; 26 | if ( v6 <= 0 ) 27 | j_j_j_j__ZdlPv_9(v3); 28 | } 29 | return v1; 30 | } 31 | 32 | 33 | int __fastcall CommandOriginData::CommandOriginData(int result) 34 | { 35 | *(_DWORD *)(result + 4) = &unk_28898CC; 36 | return result; 37 | } 38 | 39 | 40 | int __fastcall CommandOriginData::CommandOriginData(int a1, int a2) 41 | { 42 | int v2; // r4@1 43 | int v3; // r5@1 44 | 45 | v2 = a1; 46 | v3 = a2; 47 | *(_DWORD *)(a1 + 4) = &unk_28898CC; 48 | *(_BYTE *)a1 = *(_BYTE *)a2; 49 | EntityInteraction::setInteractText((int *)(a1 + 4), (int *)(a2 + 4)); 50 | if ( *(_BYTE *)v2 == 3 ) 51 | *(_QWORD *)(v2 + 8) = *(_QWORD *)(v3 + 8); 52 | return v2; 53 | } 54 | -------------------------------------------------------------------------------- /Minecraft/Block/WorkbenchBlock.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | signed int __fastcall WorkbenchBlock::isCraftingBlock(WorkbenchBlock *this) 4 | { 5 | return 1; 6 | } 7 | 8 | 9 | signed int __fastcall WorkbenchBlock::use(WorkbenchBlock *this, Player *a2, const BlockPos *a3, ItemUseCallback *a4) 10 | { 11 | Player *v4; // r5@1 12 | const BlockPos *v5; // r4@1 13 | 14 | v4 = a2; 15 | v5 = a3; 16 | if ( Player::canUseAbility((int)a2, &Abilities::OPEN_CONTAINERS) == 1 ) 17 | (*(void (__fastcall **)(Player *, const BlockPos *, signed int))(*(_DWORD *)v4 + 1268))(v4, v5, 1); 18 | return 1; 19 | } 20 | 21 | 22 | void __fastcall WorkbenchBlock::~WorkbenchBlock(WorkbenchBlock *this) 23 | { 24 | Block *v1; // r0@1 25 | 26 | v1 = Block::~Block(this); 27 | j_j_j__ZdlPv_6((void *)v1); 28 | } 29 | 30 | 31 | Block *__fastcall WorkbenchBlock::WorkbenchBlock(Block *a1, const void **a2, char a3) 32 | { 33 | Block *v3; // r4@1 34 | char v4; // r5@1 35 | const void **v5; // r6@1 36 | int v6; // r0@1 37 | 38 | v3 = a1; 39 | v4 = a3; 40 | v5 = a2; 41 | v6 = Material::getMaterial(2); 42 | Block::Block((int)v3, v5, v4, v6); 43 | *(_DWORD *)v3 = &off_271803C; 44 | Block::setIsInteraction(v3, 1); 45 | return v3; 46 | } 47 | 48 | 49 | void __fastcall WorkbenchBlock::~WorkbenchBlock(WorkbenchBlock *this) 50 | { 51 | WorkbenchBlock::~WorkbenchBlock(this); 52 | } 53 | -------------------------------------------------------------------------------- /unmapped/BehaviorNode.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | void __fastcall BehaviorNode::~BehaviorNode(BehaviorNode *this) 4 | { 5 | BehaviorNode::~BehaviorNode(this); 6 | } 7 | 8 | 9 | BehaviorNode *__fastcall BehaviorNode::~BehaviorNode(BehaviorNode *this) 10 | { 11 | BehaviorNode *v1; // r4@1 12 | 13 | v1 = this; 14 | *(_DWORD *)this = &off_271E268; 15 | j_BehaviorTreeDefinitionPtr::~BehaviorTreeDefinitionPtr((BehaviorNode *)((char *)this + 8)); 16 | return v1; 17 | } 18 | 19 | 20 | int __fastcall BehaviorNode::setComponent(int result, BehaviorComponent *a2) 21 | { 22 | *(_DWORD *)(result + 20) = a2; 23 | return result; 24 | } 25 | 26 | 27 | int __fastcall BehaviorNode::BehaviorNode(int a1) 28 | { 29 | int v1; // r4@1 30 | int result; // r0@1 31 | 32 | v1 = a1; 33 | *(_DWORD *)a1 = &off_271E268; 34 | *(_DWORD *)(a1 + 4) = 0; 35 | j_BehaviorTreeDefinitionPtr::BehaviorTreeDefinitionPtr(a1 + 8); 36 | *(_DWORD *)(v1 + 28) = 1; 37 | result = v1; 38 | *(_DWORD *)(v1 + 16) = 0; 39 | *(_DWORD *)(v1 + 20) = 0; 40 | return result; 41 | } 42 | 43 | 44 | void __fastcall BehaviorNode::~BehaviorNode(BehaviorNode *this) 45 | { 46 | BehaviorNode *v1; // r4@1 47 | 48 | v1 = this; 49 | *(_DWORD *)this = &off_271E268; 50 | j_BehaviorTreeDefinitionPtr::~BehaviorTreeDefinitionPtr((BehaviorNode *)((char *)this + 8)); 51 | j_j_j__ZdlPv_7((void *)v1); 52 | } 53 | --------------------------------------------------------------------------------