├── .editorconfig ├── .gitattributes ├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE.txt ├── Readme.md ├── build.gradle ├── dependencies.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── jitpack.yml ├── repositories.gradle ├── settings.gradle └── src └── main ├── java ├── com │ └── prupe │ │ └── mcpatcher │ │ ├── MCLogger.java │ │ ├── MCPatcherUtils.java │ │ ├── cc │ │ ├── ColorizeBlock.java │ │ ├── ColorizeEntity.java │ │ ├── ColorizeItem.java │ │ ├── ColorizeWorld.java │ │ ├── Colorizer.java │ │ └── Lightmap.java │ │ ├── cit │ │ ├── ArmorOverride.java │ │ ├── CITUtils.java │ │ ├── Enchantment.java │ │ ├── EnchantmentList.java │ │ ├── ItemOverride.java │ │ ├── OverrideBase.java │ │ └── PotionReplacer.java │ │ ├── ctm │ │ ├── BlockFaceMatcher.java │ │ ├── BlockOrientation.java │ │ ├── CTMUtils.java │ │ ├── GlassPaneRenderer.java │ │ ├── RenderBlockState.java │ │ ├── TileOverride.java │ │ ├── TileOverrideImpl.java │ │ └── TileOverrideIterator.java │ │ ├── hd │ │ ├── CustomAnimation.java │ │ ├── FancyDial.java │ │ ├── FontUtils.java │ │ └── MipmapHelper.java │ │ ├── mal │ │ ├── biome │ │ │ ├── BiomeAPI.java │ │ │ ├── ColorMap.java │ │ │ ├── ColorMapBase.java │ │ │ ├── ColorUtils.java │ │ │ └── IColorMap.java │ │ ├── block │ │ │ ├── BlockAPI.java │ │ │ ├── BlockStateMatcher.java │ │ │ ├── RenderBlocksUtils.java │ │ │ └── RenderPassAPI.java │ │ ├── item │ │ │ └── ItemAPI.java │ │ ├── nbt │ │ │ └── NBTRule.java │ │ ├── resource │ │ │ ├── BlendMethod.java │ │ │ ├── GLAPI.java │ │ │ ├── PropertiesFile.java │ │ │ ├── ResourceList.java │ │ │ ├── ResourceLocationWithSource.java │ │ │ ├── TexturePackAPI.java │ │ │ └── TexturePackChangeHandler.java │ │ ├── tile │ │ │ └── TileLoader.java │ │ └── util │ │ │ ├── InputHandler.java │ │ │ └── WeightedIndex.java │ │ ├── mob │ │ ├── LineRenderer.java │ │ ├── MobOverlay.java │ │ ├── MobRandomizer.java │ │ └── MobRuleList.java │ │ ├── renderpass │ │ ├── RenderPass.java │ │ └── RenderPassMap.java │ │ └── sky │ │ ├── FireworksHelper.java │ │ └── SkyRenderer.java ├── jss │ ├── notfine │ │ ├── McPatcherForge.java │ │ ├── NotFine.java │ │ ├── asm │ │ │ ├── ASMUtils.java │ │ │ ├── AsmTransformers.java │ │ │ ├── RenderBlocksTransformer.java │ │ │ ├── WorldRendererTransformer.java │ │ │ └── mappings │ │ │ │ ├── Namer.java │ │ │ │ ├── NamerMcp.java │ │ │ │ ├── NamerObf.java │ │ │ │ ├── NamerSrg.java │ │ │ │ └── Names.java │ │ ├── config │ │ │ ├── MCPatcherForgeConfig.java │ │ │ ├── NotFineConfig.java │ │ │ └── VideoSettings.java │ │ ├── core │ │ │ ├── LoadMenuButtons.java │ │ │ ├── Settings.java │ │ │ └── SettingsManager.java │ │ ├── gui │ │ │ ├── GuiCustomMenu.java │ │ │ ├── GuiCustomMenuButton.java │ │ │ ├── GuiCustomOptionsRowList.java │ │ │ ├── NotFineGameOptionPages.java │ │ │ └── options │ │ │ │ ├── control │ │ │ │ ├── NotFineControlValueFormatter.java │ │ │ │ └── element │ │ │ │ │ ├── CyclingControlElement.java │ │ │ │ │ ├── NotFineControlElement.java │ │ │ │ │ ├── NotFineControlElementFactory.java │ │ │ │ │ ├── SliderControlElement.java │ │ │ │ │ └── TickBoxControlElement.java │ │ │ │ ├── named │ │ │ │ ├── AlwaysNever.java │ │ │ │ ├── BackgroundSelect.java │ │ │ │ ├── DownfallQuality.java │ │ │ │ ├── GraphicsQualityOff.java │ │ │ │ ├── GraphicsToggle.java │ │ │ │ └── LeavesQuality.java │ │ │ │ └── storage │ │ │ │ ├── NotFineMinecraftOptionsStorage.java │ │ │ │ └── OptionStorageDummy.java │ │ ├── mixinplugin │ │ │ ├── Mixins.java │ │ │ ├── NotFineEarlyMixins.java │ │ │ ├── NotFineLateMixins.java │ │ │ └── TargetedMod.java │ │ ├── mixins │ │ │ ├── early │ │ │ │ ├── mcpatcherforge │ │ │ │ │ ├── base │ │ │ │ │ │ ├── MixinAbstractTexture.java │ │ │ │ │ │ ├── MixinBlockGrass.java │ │ │ │ │ │ ├── MixinBlockMycelium.java │ │ │ │ │ │ ├── MixinMinecraft.java │ │ │ │ │ │ ├── MixinSimpleReloadableResourceManager.java │ │ │ │ │ │ └── MixinTextureAtlasSprite.java │ │ │ │ │ ├── cc │ │ │ │ │ │ ├── block │ │ │ │ │ │ │ ├── MixinBlock.java │ │ │ │ │ │ │ ├── MixinBlockDoublePlant.java │ │ │ │ │ │ │ ├── MixinBlockGrass.java │ │ │ │ │ │ │ ├── MixinBlockLeaves.java │ │ │ │ │ │ │ ├── MixinBlockLilyPad.java │ │ │ │ │ │ │ ├── MixinBlockLiquid.java │ │ │ │ │ │ │ ├── MixinBlockOldLeaf.java │ │ │ │ │ │ │ ├── MixinBlockRedstoneWire.java │ │ │ │ │ │ │ ├── MixinBlockReed.java │ │ │ │ │ │ │ ├── MixinBlockStem.java │ │ │ │ │ │ │ ├── MixinBlockTallGrass.java │ │ │ │ │ │ │ ├── MixinBlockVine.java │ │ │ │ │ │ │ └── material │ │ │ │ │ │ │ │ └── MixinMapColor.java │ │ │ │ │ │ ├── client │ │ │ │ │ │ │ ├── particle │ │ │ │ │ │ │ │ ├── MixinEntityAuraFX.java │ │ │ │ │ │ │ │ ├── MixinEntityBubbleFX.java │ │ │ │ │ │ │ │ ├── MixinEntityDropParticleFX.java │ │ │ │ │ │ │ │ ├── MixinEntityPortalFX.java │ │ │ │ │ │ │ │ ├── MixinEntityRainFX.java │ │ │ │ │ │ │ │ ├── MixinEntityRedDustFX.java │ │ │ │ │ │ │ │ ├── MixinEntitySplashFX.java │ │ │ │ │ │ │ │ └── MixinEntitySuspendFX.java │ │ │ │ │ │ │ └── renderer │ │ │ │ │ │ │ │ ├── MixinEntityRenderer.java │ │ │ │ │ │ │ │ ├── MixinItemRenderer.java │ │ │ │ │ │ │ │ ├── MixinRenderBlocks.java │ │ │ │ │ │ │ │ ├── MixinRenderGlobal.java │ │ │ │ │ │ │ │ ├── entity │ │ │ │ │ │ │ │ ├── MixinRenderWolf.java │ │ │ │ │ │ │ │ └── MixinRenderXPOrb.java │ │ │ │ │ │ │ │ └── tileentity │ │ │ │ │ │ │ │ └── MixinTileEntitySignRenderer.java │ │ │ │ │ │ ├── entity │ │ │ │ │ │ │ └── MixinEntityList.java │ │ │ │ │ │ ├── item │ │ │ │ │ │ │ ├── MixinItemArmor.java │ │ │ │ │ │ │ ├── MixinItemBlock.java │ │ │ │ │ │ │ ├── MixinItemMonsterPlacer.java │ │ │ │ │ │ │ └── crafting │ │ │ │ │ │ │ │ └── MixinRecipesArmorDyes.java │ │ │ │ │ │ ├── potion │ │ │ │ │ │ │ ├── MixinPotion.java │ │ │ │ │ │ │ └── MixinPotionHelper.java │ │ │ │ │ │ └── world │ │ │ │ │ │ │ ├── MixinWorld.java │ │ │ │ │ │ │ ├── MixinWorldProvider.java │ │ │ │ │ │ │ ├── MixinWorldProviderEnd.java │ │ │ │ │ │ │ └── MixinWorldProviderHell.java │ │ │ │ │ ├── cit │ │ │ │ │ │ ├── client │ │ │ │ │ │ │ └── renderer │ │ │ │ │ │ │ │ ├── MixinItemRenderer.java │ │ │ │ │ │ │ │ ├── MixinRenderGlobal.java │ │ │ │ │ │ │ │ └── entity │ │ │ │ │ │ │ │ ├── MixinRenderBiped.java │ │ │ │ │ │ │ │ ├── MixinRenderEntityLiving.java │ │ │ │ │ │ │ │ ├── MixinRenderItem.java │ │ │ │ │ │ │ │ ├── MixinRenderPlayer.java │ │ │ │ │ │ │ │ └── MixinRenderSnowball.java │ │ │ │ │ │ ├── entity │ │ │ │ │ │ │ └── MixinEntityLivingBase.java │ │ │ │ │ │ ├── item │ │ │ │ │ │ │ └── MixinItem.java │ │ │ │ │ │ ├── nbt │ │ │ │ │ │ │ ├── MixinNBTTagCompound.java │ │ │ │ │ │ │ └── MixinNBTTagList.java │ │ │ │ │ │ └── world │ │ │ │ │ │ │ └── MixinWorld.java │ │ │ │ │ ├── ctm │ │ │ │ │ │ └── MixinRenderBlocks.java │ │ │ │ │ ├── ctm_cc │ │ │ │ │ │ ├── MixinRenderBlocks.java │ │ │ │ │ │ ├── MixinRenderBlocksNoCC.java │ │ │ │ │ │ ├── MixinRenderBlocksNoCTM.java │ │ │ │ │ │ └── MixinTextureMap.java │ │ │ │ │ ├── hd │ │ │ │ │ │ ├── MixinFontRenderer.java │ │ │ │ │ │ ├── MixinTextureClock.java │ │ │ │ │ │ ├── MixinTextureCompass.java │ │ │ │ │ │ └── MixinTextureManager.java │ │ │ │ │ ├── mob │ │ │ │ │ │ ├── MixinEntityLivingBase.java │ │ │ │ │ │ ├── MixinRender.java │ │ │ │ │ │ ├── MixinRenderEnderman.java │ │ │ │ │ │ ├── MixinRenderFish.java │ │ │ │ │ │ ├── MixinRenderLiving.java │ │ │ │ │ │ ├── MixinRenderMooshroom.java │ │ │ │ │ │ ├── MixinRenderSheep.java │ │ │ │ │ │ ├── MixinRenderSnowMan.java │ │ │ │ │ │ ├── MixinRenderSpider.java │ │ │ │ │ │ └── MixinRenderWolf.java │ │ │ │ │ ├── renderpass │ │ │ │ │ │ ├── MixinEntityRenderer.java │ │ │ │ │ │ ├── MixinRenderBlocks.java │ │ │ │ │ │ ├── MixinRenderGlobal.java │ │ │ │ │ │ └── MixinWorldRenderer.java │ │ │ │ │ └── sky │ │ │ │ │ │ ├── MixinEffectRenderer.java │ │ │ │ │ │ └── MixinRenderGlobal.java │ │ │ │ └── minecraft │ │ │ │ │ ├── clouds │ │ │ │ │ ├── MixinEntityRenderer.java │ │ │ │ │ ├── MixinGameSettings.java │ │ │ │ │ ├── MixinRenderGlobal.java │ │ │ │ │ └── MixinWorldType.java │ │ │ │ │ ├── faceculling │ │ │ │ │ ├── MixinBlock.java │ │ │ │ │ ├── MixinBlockCactus.java │ │ │ │ │ ├── MixinBlockCarpet.java │ │ │ │ │ ├── MixinBlockEnchantmentTable.java │ │ │ │ │ ├── MixinBlockFarmland.java │ │ │ │ │ ├── MixinBlockSlab.java │ │ │ │ │ ├── MixinBlockSnow.java │ │ │ │ │ ├── MixinBlockStairs.java │ │ │ │ │ └── MixinRenderBlocks.java │ │ │ │ │ ├── fix │ │ │ │ │ └── MixinRenderItem.java │ │ │ │ │ ├── glint │ │ │ │ │ ├── MixinItemRenderer.java │ │ │ │ │ ├── MixinRenderBiped.java │ │ │ │ │ ├── MixinRenderItem.java │ │ │ │ │ └── MixinRenderPlayer.java │ │ │ │ │ ├── gui │ │ │ │ │ └── MixinGuiSlot.java │ │ │ │ │ ├── interpolatedtexturemap │ │ │ │ │ └── MixinTextureMap.java │ │ │ │ │ ├── leaves │ │ │ │ │ ├── MixinBlockLeaves.java │ │ │ │ │ └── MixinBlockLeavesBase.java │ │ │ │ │ ├── optimization │ │ │ │ │ └── MixinRenderItemFrame.java │ │ │ │ │ ├── particles │ │ │ │ │ ├── MixinBlockEnchantmentTable.java │ │ │ │ │ ├── MixinEffectRenderer.java │ │ │ │ │ └── MixinWorldClient.java │ │ │ │ │ ├── renderer │ │ │ │ │ └── MixinRenderGlobal.java │ │ │ │ │ └── toggle │ │ │ │ │ ├── MixinEntityRenderer$RenderRainSnow.java │ │ │ │ │ ├── MixinEntityRenderer.java │ │ │ │ │ ├── MixinGuiIngame.java │ │ │ │ │ ├── MixinRender.java │ │ │ │ │ └── MixinRenderItem.java │ │ │ └── late │ │ │ │ ├── faceculling │ │ │ │ └── thaumcraft │ │ │ │ │ ├── MixinBlockStoneDevice.java │ │ │ │ │ ├── MixinBlockTable.java │ │ │ │ │ └── MixinBlockWoodenDevice.java │ │ │ │ └── leaves │ │ │ │ ├── natura │ │ │ │ ├── MixinBerryBush.java │ │ │ │ └── MixinNetherBerryBush.java │ │ │ │ ├── tconstruct │ │ │ │ └── MixinOreberryBush.java │ │ │ │ ├── thaumcraft │ │ │ │ └── MixinBlockMagicalLeaves.java │ │ │ │ ├── twilightforest │ │ │ │ ├── MixinBlockTFLeaves.java │ │ │ │ ├── MixinBlockTFLeaves3.java │ │ │ │ └── MixinBlockTFMagicLeaves.java │ │ │ │ └── witchery │ │ │ │ └── MixinBlockWitchLeaves.java │ │ ├── proxy │ │ │ ├── ClientProxy.java │ │ │ └── CommonProxy.java │ │ ├── render │ │ │ ├── InterpolatedIcon.java │ │ │ └── RenderStars.java │ │ └── util │ │ │ ├── AbstractTextureExpansion.java │ │ │ ├── EntityAuraFXExpansion.java │ │ │ ├── FontRendererExpansion.java │ │ │ ├── IFaceObstructionCheckHelper.java │ │ │ ├── ILeafBlock.java │ │ │ ├── LeafRenderUtil.java │ │ │ ├── MapColorExpansion.java │ │ │ ├── NBTTagCompoundExpansion.java │ │ │ ├── NBTTagListExpansion.java │ │ │ ├── PotionExpansion.java │ │ │ └── itembreakparticles │ │ │ ├── IRenderGlobalSpawnItemBreakParticle.java │ │ │ └── IWorldSpawnItemBreakParticle.java │ └── util │ │ └── RandomXoshiro256StarStar.java └── me │ └── jellysquid │ └── mods │ └── sodium │ └── client │ ├── gui │ └── options │ │ ├── Option.java │ │ ├── OptionFlag.java │ │ ├── OptionGroup.java │ │ ├── OptionImpact.java │ │ ├── OptionImpl.java │ │ ├── OptionPage.java │ │ ├── binding │ │ ├── GenericBinding.java │ │ └── OptionBinding.java │ │ ├── control │ │ ├── Control.java │ │ ├── ControlElement.java │ │ ├── ControlValueFormatter.java │ │ ├── CyclingControl.java │ │ ├── SliderControl.java │ │ ├── TickBoxControl.java │ │ └── element │ │ │ └── ControlElementFactory.java │ │ ├── named │ │ ├── GraphicsMode.java │ │ ├── GraphicsQuality.java │ │ ├── LightingQuality.java │ │ ├── NamedState.java │ │ └── ParticleMode.java │ │ └── storage │ │ ├── MinecraftOptionsStorage.java │ │ └── OptionStorage.java │ └── util │ └── Dim2i.java └── resources ├── META-INF ├── mcpatcherforge_at.cfg └── notfine_at.cfg ├── assets ├── minecraft │ ├── mcpatcher │ │ ├── blank_00000000.png │ │ ├── blank_80808080.png │ │ ├── blank_ffffffff.png │ │ └── ctm │ │ │ ├── bookshelf │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ └── bookshelf.properties │ │ │ ├── glass │ │ │ ├── 0.png │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 15.png │ │ │ ├── 16.png │ │ │ ├── 17.png │ │ │ ├── 18.png │ │ │ ├── 19.png │ │ │ ├── 2.png │ │ │ ├── 20.png │ │ │ ├── 21.png │ │ │ ├── 22.png │ │ │ ├── 23.png │ │ │ ├── 24.png │ │ │ ├── 25.png │ │ │ ├── 26.png │ │ │ ├── 27.png │ │ │ ├── 28.png │ │ │ ├── 29.png │ │ │ ├── 3.png │ │ │ ├── 30.png │ │ │ ├── 31.png │ │ │ ├── 32.png │ │ │ ├── 33.png │ │ │ ├── 34.png │ │ │ ├── 35.png │ │ │ ├── 36.png │ │ │ ├── 37.png │ │ │ ├── 38.png │ │ │ ├── 39.png │ │ │ ├── 4.png │ │ │ ├── 40.png │ │ │ ├── 41.png │ │ │ ├── 42.png │ │ │ ├── 43.png │ │ │ ├── 44.png │ │ │ ├── 45.png │ │ │ ├── 46.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ ├── 9.png │ │ │ └── glass.properties │ │ │ └── sandstone │ │ │ ├── 0.png │ │ │ └── sandstone_normal.properties │ └── textures │ │ └── particle │ │ └── particles.png └── notfine │ └── lang │ ├── de_DE.lang │ ├── en_US.lang │ ├── pl_PL.lang │ ├── ru_RU.lang │ └── zh_CN.lang ├── mcmod.info ├── mixins.notfine.early.json ├── mixins.notfine.json └── mixins.notfine.late.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # This is the universal Text Editor Configuration 2 | # for all GTNewHorizons projects 3 | # See: https://editorconfig.org/ 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 4 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | [*.{bat,ini}] 16 | end_of_line = crlf 17 | 18 | [*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}] 19 | indent_size = 2 20 | 21 | [*.lang] 22 | trim_trailing_whitespace = false 23 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | 3 | *.[jJ][aA][rR] binary 4 | 5 | *.[pP][nN][gG] binary 6 | *.[jJ][pP][gG] binary 7 | *.[jJ][pP][eE][gG] binary 8 | *.[gG][iI][fF] binary 9 | *.[tT][iI][fF] binary 10 | *.[tT][iI][fF][fF] binary 11 | *.[iI][cC][oO] binary 12 | *.[sS][vV][gG] text 13 | *.[eE][pP][sS] binary 14 | *.[xX][cC][fF] binary 15 | 16 | *.[kK][aA][rR] binary 17 | *.[mM]4[aA] binary 18 | *.[mM][iI][dD] binary 19 | *.[mM][iI][dD][iI] binary 20 | *.[mM][pP]3 binary 21 | *.[oO][gG][gG] binary 22 | *.[rR][aA] binary 23 | 24 | *.7[zZ] binary 25 | *.[gG][zZ] binary 26 | *.[tT][aA][rR] binary 27 | *.[tT][gG][zZ] binary 28 | *.[zZ][iI][pP] binary 29 | 30 | *.[tT][cC][nN] binary 31 | *.[sS][oO] binary 32 | *.[dD][lL][lL] binary 33 | *.[dD][yY][lL][iI][bB] binary 34 | *.[pP][sS][dD] binary 35 | *.[tT][tT][fF] binary 36 | *.[oO][tT][fF] binary 37 | 38 | *.[pP][aA][tT][cC][hH] -text 39 | 40 | *.[bB][aA][tT] text eol=crlf 41 | *.[cC][mM][dD] text eol=crlf 42 | *.[pP][sS]1 text eol=crlf 43 | 44 | *[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary 45 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # Build Workflow 2 | 3 | name: Build 4 | 5 | on: 6 | pull_request: 7 | workflow_dispatch: 8 | push: 9 | 10 | concurrency: 11 | group: ${{ github.head_ref || format('{0}-{1}', github.ref, github.run_number) }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | build: 16 | name: Build 17 | 18 | runs-on: ubuntu-latest 19 | 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v2 23 | with: 24 | fetch-depth: 0 25 | 26 | - name: Set up JDK 8 27 | uses: actions/setup-java@v2 28 | with: 29 | java-version: 8 30 | distribution: temurin 31 | cache: 'gradle' 32 | 33 | - uses: actions/cache@v2 34 | with: 35 | path: | 36 | ~/.gradle/caches 37 | ~/.gradle/wrapper 38 | **/loom-cache 39 | **/prebundled-jars 40 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} 41 | restore-keys: | 42 | ${{ runner.os }}-gradle- 43 | - name: Chmod Gradle 44 | run: chmod +x ./gradlew 45 | 46 | - name: Build 47 | run: ./gradlew build --no-daemon 48 | 49 | - name: Upload Build Artifacts 50 | uses: actions/upload-artifact@v2 51 | with: 52 | name: artifacts 53 | path: build/libs/ 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | .settings 3 | /.idea/ 4 | /.vscode/ 5 | /run/ 6 | /build/ 7 | /eclipse/ 8 | .classpath 9 | .project 10 | /bin/ 11 | /config/ 12 | /crash-reports/ 13 | /logs/ 14 | options.txt 15 | /saves/ 16 | usernamecache.json 17 | banned-ips.json 18 | banned-players.json 19 | eula.txt 20 | ops.json 21 | server.properties 22 | servers.dat 23 | usercache.json 24 | whitelist.json 25 | /out/ 26 | *.iml 27 | *.ipr 28 | *.iws 29 | src/main/resources/mixins.*([!.]).json 30 | *.bat 31 | *.DS_Store 32 | !gradlew.bat 33 | .factorypath 34 | addon.local.gradle 35 | addon.local.gradle.kts 36 | addon.late.local.gradle 37 | addon.late.local.gradle.kts 38 | layout.json 39 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | //version: 1707058017 2 | 3 | plugins { 4 | id 'com.gtnewhorizons.gtnhconvention' 5 | } 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | before_install: 2 | - ./gradlew setupCIWorkspace -------------------------------------------------------------------------------- /repositories.gradle: -------------------------------------------------------------------------------- 1 | // Add any additional repositories for your dependencies here 2 | 3 | repositories { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | 2 | pluginManagement { 3 | repositories { 4 | maven { 5 | // RetroFuturaGradle 6 | name "GTNH Maven" 7 | url "https://nexus.gtnewhorizons.com/repository/public/" 8 | mavenContent { 9 | includeGroup("com.gtnewhorizons") 10 | includeGroupByRegex("com\\.gtnewhorizons\\..+") 11 | } 12 | } 13 | gradlePluginPortal() 14 | mavenCentral() 15 | mavenLocal() 16 | } 17 | } 18 | 19 | plugins { 20 | id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27' 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/prupe/mcpatcher/cit/ArmorOverride.java: -------------------------------------------------------------------------------- 1 | package com.prupe.mcpatcher.cit; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import net.minecraft.util.ResourceLocation; 7 | 8 | import com.prupe.mcpatcher.mal.resource.PropertiesFile; 9 | import com.prupe.mcpatcher.mal.resource.TexturePackAPI; 10 | 11 | final class ArmorOverride extends OverrideBase { 12 | 13 | private final Map armorMap; 14 | 15 | ArmorOverride(PropertiesFile properties) { 16 | super(properties); 17 | 18 | if (items == null) { 19 | properties.error("no matching items specified"); 20 | } 21 | if (textureName == null && alternateTextures == null) { 22 | properties.error("no replacement textures specified"); 23 | } 24 | 25 | if (alternateTextures == null) { 26 | armorMap = null; 27 | } else { 28 | armorMap = new HashMap<>(); 29 | for (Map.Entry entry : alternateTextures.entrySet()) { 30 | String key = entry.getKey(); 31 | ResourceLocation value = entry.getValue(); 32 | armorMap.put(TexturePackAPI.parseResourceLocation(CITUtils.FIXED_ARMOR_RESOURCE, key), value); 33 | } 34 | } 35 | } 36 | 37 | @Override 38 | String getType() { 39 | return "armor"; 40 | } 41 | 42 | ResourceLocation getReplacementTexture(ResourceLocation origResource) { 43 | if (armorMap != null) { 44 | ResourceLocation newResource = armorMap.get(origResource); 45 | if (newResource != null) { 46 | return newResource; 47 | } 48 | } 49 | return textureName; 50 | } 51 | 52 | @Override 53 | String preprocessAltTextureKey(String name) { 54 | if (!name.endsWith(".png")) { 55 | name += ".png"; 56 | } 57 | if (!name.contains("/")) { 58 | name = "./" + name; 59 | } 60 | return TexturePackAPI.parseResourceLocation(CITUtils.FIXED_ARMOR_RESOURCE, name) 61 | .toString(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/prupe/mcpatcher/mal/biome/ColorUtils.java: -------------------------------------------------------------------------------- 1 | package com.prupe.mcpatcher.mal.biome; 2 | 3 | import net.minecraft.util.MathHelper; 4 | 5 | public class ColorUtils { 6 | 7 | public static void intToFloat3(int rgb, float[] f, int offset) { 8 | if ((rgb & 0xffffff) == 0xffffff) { 9 | f[offset] = f[offset + 1] = f[offset + 2] = 1.0f; 10 | } else { 11 | f[offset] = (float) (rgb & 0xff0000) / (float) 0xff0000; 12 | f[offset + 1] = (float) (rgb & 0xff00) / (float) 0xff00; 13 | f[offset + 2] = (float) (rgb & 0xff) / (float) 0xff; 14 | } 15 | } 16 | 17 | public static void intToFloat3(int rgb, float[] f) { 18 | intToFloat3(rgb, f, 0); 19 | } 20 | 21 | public static int float3ToInt(float[] f, int offset) { 22 | return ((int) (255.0f * f[offset])) << 16 | ((int) (255.0f * f[offset + 1])) << 8 23 | | (int) (255.0f * f[offset + 2]); 24 | } 25 | 26 | public static int float3ToInt(float[] f) { 27 | return float3ToInt(f, 0); 28 | } 29 | 30 | public static float clamp(float f) { 31 | return MathHelper.clamp_float(f, 0.0f, 1.0f); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/prupe/mcpatcher/mal/biome/IColorMap.java: -------------------------------------------------------------------------------- 1 | package com.prupe.mcpatcher.mal.biome; 2 | 3 | import java.util.Collection; 4 | 5 | import net.minecraft.util.ResourceLocation; 6 | import net.minecraft.world.IBlockAccess; 7 | 8 | public interface IColorMap { 9 | 10 | boolean isHeightDependent(); 11 | 12 | int getColorMultiplier(); 13 | 14 | int getColorMultiplier(IBlockAccess blockAccess, int i, int j, int k); 15 | 16 | float[] getColorMultiplierF(IBlockAccess blockAccess, int i, int j, int k); 17 | 18 | void claimResources(Collection resources); 19 | 20 | IColorMap copy(); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/prupe/mcpatcher/mal/resource/GLAPI.java: -------------------------------------------------------------------------------- 1 | package com.prupe.mcpatcher.mal.resource; 2 | 3 | import org.lwjgl.opengl.GL11; 4 | import org.lwjgl.opengl.GL14; 5 | import org.lwjgl.opengl.GLContext; 6 | 7 | public class GLAPI { 8 | 9 | private static final boolean useGlBlendFuncSeparate = GLContext.getCapabilities().OpenGL14; 10 | 11 | public static void glBindTexture(int texture) { 12 | if (texture >= 0) { 13 | GL11.glBindTexture(GL11.GL_TEXTURE_2D, texture); 14 | } 15 | } 16 | 17 | public static void glBlendFuncSeparate(int src, int dst, int srcAlpha, int dstAlpha) { 18 | if (useGlBlendFuncSeparate) { 19 | GL14.glBlendFuncSeparate(src, dst, srcAlpha, dstAlpha); 20 | } else { 21 | GL11.glBlendFunc(src, dst); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/prupe/mcpatcher/mal/util/InputHandler.java: -------------------------------------------------------------------------------- 1 | package com.prupe.mcpatcher.mal.util; 2 | 3 | import java.util.BitSet; 4 | 5 | import org.lwjgl.input.Keyboard; 6 | 7 | public class InputHandler { 8 | 9 | private final BitSet keysDown = new BitSet(); 10 | private final String name; 11 | private final boolean enabled; 12 | 13 | public InputHandler(String name, boolean enabled) { 14 | this.name = name; 15 | this.enabled = enabled; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public boolean isEnabled() { 23 | return enabled; 24 | } 25 | 26 | public boolean isKeyPressed(int key) { 27 | if (!enabled) { 28 | // nothing 29 | } else if (Keyboard.isKeyDown(key)) { 30 | if (!keysDown.get(key)) { 31 | keysDown.set(key); 32 | return true; 33 | } 34 | } else { 35 | keysDown.clear(key); 36 | } 37 | return false; 38 | } 39 | 40 | public boolean isKeyDown(int key) { 41 | return enabled && Keyboard.isKeyDown(key); 42 | } 43 | 44 | @Override 45 | public String toString() { 46 | StringBuilder sb = new StringBuilder(); 47 | sb.append("InputUtils{") 48 | .append(name) 49 | .append(':'); 50 | for (int i = keysDown.nextSetBit(0); i >= 0; i = keysDown.nextSetBit(i + 1)) { 51 | sb.append(' ') 52 | .append(Keyboard.getKeyName(i)); 53 | } 54 | sb.append('}'); 55 | return sb.toString(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/prupe/mcpatcher/renderpass/RenderPassMap.java: -------------------------------------------------------------------------------- 1 | package com.prupe.mcpatcher.renderpass; 2 | 3 | import net.minecraft.block.Block; 4 | 5 | import com.prupe.mcpatcher.mal.block.RenderPassAPI; 6 | 7 | public class RenderPassMap { 8 | 9 | private static final int[] MAP = new int[] { 0, 0, 0, 1, 2, 3 }; 10 | 11 | public static int map18To17(int pass) { 12 | return pass > 1 ? pass < MAP.length ? MAP[pass] : -1 : pass; 13 | } 14 | 15 | public static int map17To18(int pass) { 16 | return pass <= 1 ? vanillaToMCPatcher(pass) : pass; 17 | } 18 | 19 | protected static int vanillaToMCPatcher(int pass) { 20 | for (int i = 0; i < MAP.length; i++) { 21 | if (MAP[i] == pass) { 22 | return i; 23 | } 24 | } 25 | return -1; 26 | } 27 | 28 | protected static int getDefaultRenderPass(Block block) { 29 | return vanillaToMCPatcher(block.getRenderBlockPass()); 30 | } 31 | 32 | protected static int getCutoutRenderPass() { 33 | return RenderPassAPI.SOLID_RENDER_PASS; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/McPatcherForge.java: -------------------------------------------------------------------------------- 1 | package jss.notfine; 2 | 3 | import cpw.mods.fml.common.Mod; 4 | 5 | @Mod( 6 | modid = "mcpatcherforge", 7 | version = "1.0.0-alpha", 8 | name = "MCPatcherForge", 9 | acceptedMinecraftVersions = "[1.7.10]", 10 | acceptableRemoteVersions = "*") 11 | public class McPatcherForge { 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/NotFine.java: -------------------------------------------------------------------------------- 1 | package jss.notfine; 2 | 3 | import cpw.mods.fml.common.Mod; 4 | import cpw.mods.fml.common.SidedProxy; 5 | import cpw.mods.fml.common.event.FMLInitializationEvent; 6 | import cpw.mods.fml.common.event.FMLPostInitializationEvent; 7 | import cpw.mods.fml.common.event.FMLPreInitializationEvent; 8 | import jss.notfine.proxy.CommonProxy; 9 | import org.apache.logging.log4j.LogManager; 10 | import org.apache.logging.log4j.Logger; 11 | 12 | @Mod( 13 | modid = NotFine.MODID, 14 | name = NotFine.NAME, 15 | version = NotFine.VERSION, 16 | acceptableRemoteVersions = "*" 17 | ) 18 | public class NotFine { 19 | public static final String MODID = "notfine"; 20 | public static final String NAME = "NotFine"; 21 | public static final String VERSION = "GRADLETOKEN_VERSION"; 22 | public static final Logger logger = LogManager.getLogger(NAME); 23 | 24 | @SidedProxy(clientSide = "jss.notfine.proxy.ClientProxy", serverSide = "jss.notfine.proxy.CommonProxy") 25 | public static CommonProxy proxy; 26 | 27 | @Mod.EventHandler 28 | public void preInit(FMLPreInitializationEvent event) { 29 | proxy.preInit(event); 30 | } 31 | 32 | @Mod.EventHandler 33 | public void init(FMLInitializationEvent event) { 34 | proxy.init(event); 35 | } 36 | 37 | @Mod.EventHandler 38 | public void postInit(FMLPostInitializationEvent event) { 39 | proxy.postInit(event); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/asm/mappings/Namer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.asm.mappings; 2 | 3 | import java.util.ArrayList; 4 | 5 | import jss.notfine.mixinplugin.NotFineEarlyMixins; 6 | import net.minecraft.launchwrapper.Launch; 7 | 8 | /** 9 | * This class und inherited classes are adapted from 10 | * Angelica/ShadersMod 12 | */ 13 | public class Namer { 14 | 15 | ArrayList ac = new ArrayList<>(); 16 | ArrayList af = new ArrayList<>(); 17 | ArrayList am = new ArrayList<>(); 18 | 19 | Names.Clas c(String name) { 20 | Names.Clas x = new Names.Clas(name); 21 | if (ac != null) ac.add(x); 22 | return x; 23 | } 24 | 25 | Names.Fiel f(Names.Clas clas, String name, String desc) { 26 | Names.Fiel x = new Names.Fiel(clas, name, desc); 27 | if (af != null) af.add(x); 28 | return x; 29 | } 30 | 31 | Names.Fiel f(Names.Clas clas, Names.Fiel fiel) { 32 | Names.Fiel x = new Names.Fiel(clas, fiel.name, fiel.desc); 33 | if (af != null) af.add(x); 34 | return x; 35 | } 36 | 37 | Names.Meth m(Names.Clas clas, String name, String desc) { 38 | Names.Meth x = new Names.Meth(clas, name, desc); 39 | if (am != null) am.add(x); 40 | return x; 41 | } 42 | 43 | Names.Meth m(Names.Clas clas, Names.Meth meth) { 44 | Names.Meth x = new Names.Meth(clas, meth.name, meth.desc); 45 | if (am != null) am.add(x); 46 | return x; 47 | } 48 | 49 | public static void initNames() { 50 | final boolean obfuscated = !(Boolean) Launch.blackboard.get("fml.deobfuscatedEnvironment"); 51 | NotFineEarlyMixins.mcpfLogger.info("Environment obfuscated: {}", obfuscated); 52 | if (obfuscated) { 53 | new NamerObf().setNames(); 54 | } else { 55 | new NamerMcp().setNames(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/asm/mappings/NamerObf.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.asm.mappings; 2 | 3 | public class NamerObf extends Namer { 4 | 5 | public void setNames() { 6 | setNames1_7_10(); 7 | } 8 | 9 | public void setNames1_7_10() { 10 | Names.renderBlocks_ = c("blm"); 11 | Names.block_ = c("aji"); 12 | Names.iBlockAccess_ = c("ahl"); 13 | Names.worldRenderer_ = c("blo"); 14 | Names.entityLivingBase_ = c("sv"); 15 | 16 | Names.renderBlocks_colorBlueTopRight = f(Names.renderBlocks_, "aB", "F"); 17 | Names.renderBlocks_blockAccess = f(Names.renderBlocks_, "a", Names.iBlockAccess_.desc); 18 | 19 | Names.renderBlocks_renderStandardBlockWithAmbientOcclusion = m( 20 | Names.renderBlocks_, 21 | "a", 22 | "(" + Names.block_.desc + "IIIFFF)Z"); 23 | 24 | Names.renderBlocks_renderStandardBlockWithAmbientOcclusionPartial = m( 25 | Names.renderBlocks_, 26 | "b", 27 | "(" + Names.block_.desc + "IIIFFF)Z"); 28 | 29 | Names.worldRenderer_updateRenderer = m(Names.worldRenderer_, "a", "(" + Names.entityLivingBase_.desc + ")V"); 30 | 31 | Names.block_getRenderBlockPass = m(Names.block_, "w", "()I"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/asm/mappings/NamerSrg.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.asm.mappings; 2 | 3 | public class NamerSrg extends Namer { 4 | 5 | public void setNames() { 6 | setNamesSrg(); 7 | } 8 | 9 | public void setNamesSrg() { 10 | Names.renderBlocks_ = c("net/minecraft/client/renderer/RenderBlocks"); 11 | Names.block_ = c("net/minecraft/block/Block"); 12 | Names.iBlockAccess_ = c("net/minecraft/world/IBlockAccess"); 13 | Names.worldRenderer_ = c("net/minecraft/client/renderer/WorldRenderer"); 14 | Names.entityLivingBase_ = c("net/minecraft/entity/EntityLivingBase"); 15 | 16 | Names.renderBlocks_colorBlueTopRight = f(Names.renderBlocks_, "field_147833_aA", "F"); 17 | Names.renderBlocks_blockAccess = f(Names.renderBlocks_, "field_147845_a", Names.iBlockAccess_.desc); 18 | 19 | Names.renderBlocks_renderStandardBlockWithAmbientOcclusion = m( 20 | Names.renderBlocks_, 21 | "func_147751_a", 22 | "(" + Names.block_.desc + "IIIFFF)Z"); 23 | 24 | Names.renderBlocks_renderStandardBlockWithAmbientOcclusionPartial = m( 25 | Names.renderBlocks_, 26 | "func_147808_b", 27 | "(" + Names.block_.desc + "IIIFFF)Z"); 28 | 29 | Names.worldRenderer_updateRenderer = m( 30 | Names.worldRenderer_, 31 | "func_147892_a", 32 | "(" + Names.entityLivingBase_.desc + ")V"); 33 | 34 | Names.block_getRenderBlockPass = m(Names.block_, "func_149701_w", "()I"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/config/VideoSettings.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.config; 2 | 3 | import cpw.mods.fml.client.FMLClientHandler; 4 | import jss.notfine.NotFine; 5 | import jss.notfine.core.Settings; 6 | 7 | import java.io.BufferedReader; 8 | import java.io.File; 9 | import java.io.FileReader; 10 | import java.io.FileWriter; 11 | import java.io.PrintWriter; 12 | 13 | public class VideoSettings { 14 | private final File optionsFile; 15 | 16 | public VideoSettings(File optionsFile) { 17 | this.optionsFile = optionsFile; 18 | } 19 | 20 | public void loadSettings() { 21 | try { 22 | if (!optionsFile.exists()) { 23 | return; 24 | } 25 | BufferedReader bufferedreader = new BufferedReader(new FileReader(optionsFile)); 26 | String settingString; 27 | 28 | while((settingString = bufferedreader.readLine()) != null) { 29 | try { 30 | String[] fragments = settingString.split(":"); 31 | Settings setting = Settings.valueOf(fragments[0]); 32 | setting.option.deserialize(fragments[1]); 33 | setting.applyChanges(); 34 | } catch (Exception exception) { 35 | NotFine.logger.warn("Skipping bad option: " + settingString); 36 | } 37 | 38 | } 39 | bufferedreader.close(); 40 | } catch (Exception exception) { 41 | NotFine.logger.error("Failed to load options", exception); 42 | } 43 | } 44 | 45 | public void saveSettings() { 46 | if (FMLClientHandler.instance().isLoading()) return; 47 | try { 48 | PrintWriter printwriter = new PrintWriter(new FileWriter(optionsFile)); 49 | for(Settings setting : Settings.values()) { 50 | printwriter.println(setting.name() + ':' + setting.option.getStore()); 51 | } 52 | printwriter.close(); 53 | } catch(Exception exception) { 54 | NotFine.logger.error("Failed to save options", exception); 55 | } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/core/LoadMenuButtons.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.core; 2 | 3 | import cpw.mods.fml.common.eventhandler.EventPriority; 4 | import cpw.mods.fml.common.eventhandler.SubscribeEvent; 5 | import jss.notfine.gui.GuiCustomMenuButton; 6 | import jss.notfine.gui.NotFineGameOptionPages; 7 | import net.minecraft.client.gui.GuiButton; 8 | import net.minecraft.client.gui.GuiOptions; 9 | import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent; 10 | 11 | import java.util.List; 12 | 13 | public class LoadMenuButtons { 14 | 15 | public static final LoadMenuButtons INSTANCE = new LoadMenuButtons(); 16 | 17 | @SubscribeEvent(priority = EventPriority.LOWEST) 18 | public void onGui(InitGuiEvent.Post event) { 19 | if(event.gui instanceof GuiOptions) { 20 | GuiButton videoSettings = ((List)event.buttonList).stream().filter(button -> button.id == 101).findFirst().get(); 21 | //Hide vanilla video settings button 22 | videoSettings.visible = false; 23 | //Add new video settings button 24 | event.buttonList.add( 25 | new GuiCustomMenuButton( 26 | videoSettings.xPosition, videoSettings.yPosition, 27 | videoSettings.width, videoSettings.height, 28 | NotFineGameOptionPages.general(), 29 | NotFineGameOptionPages.detail(), NotFineGameOptionPages.atmosphere(), 30 | NotFineGameOptionPages.particles(), NotFineGameOptionPages.other() 31 | ) 32 | ); 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/GuiCustomMenuButton.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.OptionPage; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.gui.GuiButton; 6 | 7 | public class GuiCustomMenuButton extends GuiButton { 8 | 9 | private final OptionPage optionPage; 10 | private final OptionPage[] subPages; 11 | 12 | public GuiCustomMenuButton(int xPosition, int yPosition, int width, int height, OptionPage optionPage, OptionPage... subPages) { 13 | super(-10, xPosition, yPosition, width, height, optionPage.getName()); 14 | this.optionPage = optionPage; 15 | this.subPages = subPages; 16 | } 17 | 18 | public GuiCustomMenuButton(int xPosition, int yPosition, OptionPage optionPage, OptionPage... subPages) { 19 | this(xPosition, yPosition, 150, 20, optionPage, subPages); 20 | } 21 | 22 | @Override 23 | public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) { 24 | boolean load = super.mousePressed(mc, mouseX, mouseY); 25 | if(load) { 26 | mc.displayGuiScreen(new GuiCustomMenu(mc.currentScreen, optionPage, subPages)); 27 | } 28 | return load; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/control/NotFineControlValueFormatter.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.control; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.control.ControlValueFormatter; 4 | import net.minecraft.client.resources.I18n; 5 | 6 | public class NotFineControlValueFormatter { 7 | 8 | public static ControlValueFormatter multiplied(float multiplier) { 9 | return (value) -> String.valueOf((value * multiplier)); 10 | } 11 | 12 | public static ControlValueFormatter powerOfTwo() { 13 | return (v) -> (v == 0) ? I18n.format("options.off") : I18n.format((int)Math.pow(2, v) + "x"); 14 | } 15 | 16 | public static ControlValueFormatter percentage() { 17 | return (value) -> String.valueOf(value) + "%"; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/control/element/CyclingControlElement.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.control.element; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.util.Dim2i; 5 | import net.minecraft.client.Minecraft; 6 | 7 | public class CyclingControlElement> extends NotFineControlElement { 8 | private final T[] allowedValues; 9 | private final String[] names; 10 | private int currentIndex = 0; 11 | 12 | public CyclingControlElement(Option option, Dim2i dim, T[] allowedValues, String[] names) { 13 | super(option, dim); 14 | this.allowedValues = allowedValues; 15 | this.names = names; 16 | 17 | for(int i = 0; i < allowedValues.length; ++i) { 18 | if(allowedValues[i] == option.getValue()) { 19 | currentIndex = i; 20 | break; 21 | } 22 | } 23 | } 24 | 25 | @Override 26 | public String getLabel() { 27 | Enum value = option.getValue(); 28 | return super.getLabel() + names[value.ordinal()]; 29 | } 30 | 31 | @Override 32 | public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) { 33 | if(super.mousePressed(mc, mouseX, mouseY)) { 34 | currentIndex = (option.getValue().ordinal() + 1) % allowedValues.length; 35 | option.setValue(allowedValues[currentIndex]); 36 | onOptionValueChanged(); 37 | return true; 38 | } else { 39 | return false; 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/control/element/NotFineControlElementFactory.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.control.element; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.gui.options.control.ControlElement; 5 | import me.jellysquid.mods.sodium.client.gui.options.control.ControlValueFormatter; 6 | import me.jellysquid.mods.sodium.client.gui.options.control.element.ControlElementFactory; 7 | import me.jellysquid.mods.sodium.client.util.Dim2i; 8 | 9 | public class NotFineControlElementFactory implements ControlElementFactory { 10 | 11 | @Override 12 | public > ControlElement cyclingControlElement(Option option, Dim2i dim, T[] allowedValues, String[] names) { 13 | return new CyclingControlElement(option, dim, allowedValues, names); 14 | } 15 | 16 | @Override 17 | public ControlElement sliderControlElement(Option option, Dim2i dim, int min, int max, int interval, ControlValueFormatter formatter) { 18 | return new SliderControlElement(option, dim, min, max, interval, formatter); 19 | } 20 | 21 | @Override 22 | public ControlElement tickBoxElement(Option option, Dim2i dim) { 23 | return new TickBoxControlElement(option, dim); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/control/element/TickBoxControlElement.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.control.element; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.util.Dim2i; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.resources.I18n; 7 | 8 | public class TickBoxControlElement extends NotFineControlElement { 9 | public TickBoxControlElement(Option option, Dim2i dim) { 10 | super(option, dim); 11 | } 12 | 13 | public String getLabel() { 14 | return super.getLabel() + I18n.format(option.getValue() ? "options.on" : "options.off"); 15 | } 16 | 17 | @Override 18 | public boolean mousePressed(Minecraft mc, int mouseX, int mouseY) { 19 | if(super.mousePressed(mc, mouseX, mouseY)) { 20 | option.setValue(!option.getValue()); 21 | onOptionValueChanged(); 22 | return true; 23 | } else { 24 | return false; 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/named/AlwaysNever.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.named; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.named.NamedState; 4 | 5 | public enum AlwaysNever implements NamedState { 6 | DEFAULT("generator.default"), 7 | ALWAYS("options.stream.chat.enabled.always"), 8 | NEVER("options.stream.chat.enabled.never"); 9 | 10 | private final String name; 11 | 12 | AlwaysNever(String name) { 13 | this.name = name; 14 | } 15 | 16 | @Override 17 | public String getKey() { 18 | return this.name; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/named/BackgroundSelect.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.named; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.named.NamedState; 4 | 5 | public enum BackgroundSelect implements NamedState { 6 | DEFAULT("generator.default"), 7 | SAND("tile.sand.default.name"), 8 | MYCELIUM("tile.mycel.name"), 9 | STONEBRICK("tile.stonebricksmooth.name"), 10 | MOSSY_STONEBRICK("tile.stonebricksmooth.mossy.name"), 11 | OAK_PLANKS("tile.wood.oak.name"), 12 | BIRCH_PLANKS("tile.wood.birch.name"); 13 | 14 | private final String name; 15 | 16 | BackgroundSelect(String name) { 17 | this.name = name; 18 | } 19 | 20 | @Override 21 | public String getKey() { 22 | return this.name; 23 | } 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/named/DownfallQuality.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.named; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.named.NamedState; 4 | 5 | public enum DownfallQuality implements NamedState { 6 | DEFAULT("generator.default"), 7 | FANCY("options.graphics.fancy"), 8 | FAST("options.graphics.fast"), 9 | ULTRA("options.graphics.ultra"), 10 | OFF("options.off"); 11 | 12 | private final String name; 13 | 14 | DownfallQuality(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String getKey() { 20 | return this.name; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/named/GraphicsQualityOff.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.named; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.named.NamedState; 4 | 5 | public enum GraphicsQualityOff implements NamedState { 6 | DEFAULT("generator.default"), 7 | FANCY("options.graphics.fancy"), 8 | FAST("options.graphics.fast"), 9 | OFF("options.off"); 10 | 11 | private final String name; 12 | 13 | GraphicsQualityOff(String name) { 14 | this.name = name; 15 | } 16 | 17 | @Override 18 | public String getKey() { 19 | return this.name; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/named/GraphicsToggle.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.named; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.named.NamedState; 4 | 5 | public enum GraphicsToggle implements NamedState { 6 | DEFAULT("generator.default"), 7 | ON("options.on"), 8 | OFF("options.off"); 9 | 10 | private final String name; 11 | 12 | GraphicsToggle(String name) { 13 | this.name = name; 14 | } 15 | 16 | @Override 17 | public String getKey() { 18 | return this.name; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/named/LeavesQuality.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.named; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.named.NamedState; 4 | 5 | public enum LeavesQuality implements NamedState { 6 | DEFAULT("generator.default"), 7 | FANCY("options.graphics.fancy"), 8 | FAST("options.graphics.fast"), 9 | SMART("options.graphics.smart"), 10 | SHELLED_FANCY("options.graphics.shelledfancy"), 11 | SHELLED_FAST("options.graphics.shelledfast"); 12 | 13 | private final String name; 14 | 15 | LeavesQuality(String name) { 16 | this.name = name; 17 | } 18 | 19 | @Override 20 | public String getKey() { 21 | return this.name; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/storage/NotFineMinecraftOptionsStorage.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.storage; 2 | 3 | import jss.notfine.NotFine; 4 | import jss.notfine.core.SettingsManager; 5 | import me.jellysquid.mods.sodium.client.gui.options.storage.OptionStorage; 6 | 7 | public class NotFineMinecraftOptionsStorage implements OptionStorage { 8 | 9 | private final OptionStorageDummy dummy = new OptionStorageDummy(); 10 | 11 | @Override 12 | public OptionStorageDummy getData() { 13 | return dummy; 14 | } 15 | 16 | @Override 17 | public void save() { 18 | SettingsManager.settingsFile.saveSettings(); 19 | 20 | NotFine.logger.info("Flushed changes to NotFine configuration"); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/gui/options/storage/OptionStorageDummy.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.gui.options.storage; 2 | 3 | public class OptionStorageDummy { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixinplugin/TargetedMod.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixinplugin; 2 | 3 | // Adapted from hodgepodge 4 | public enum TargetedMod { 5 | 6 | COFHCORE("CoFHCore", "cofh.asm.LoadingPlugin", "CoFHCore"), 7 | DYNAMIC_SURROUNDINGS_MIST("Dynamic Surroundings", "org.blockartistry.mod.DynSurround.mixinplugin.DynamicSurroundingsEarlyMixins", "dsurround"), 8 | DYNAMIC_SURROUNDINGS_ORIGINAL("Dynamic Surroundings", "org.blockartistry.mod.DynSurround.asm.TransformLoader", "dsurround"), 9 | NATURA("Natura", null, "Natura"), 10 | THAUMCRAFT("Thaumcraft", null, "Thaumcraft"), 11 | TINKERS_CONSTRUCT("Tinker's Construct", null, "TConstruct"), 12 | TWILIGHT_FOREST("TwilightForest", null, "TwilightForest"), 13 | VANILLA("Minecraft", null), 14 | WITCHERY("Witchery", null, "witchery"); 15 | 16 | /** The "name" in the @Mod annotation */ 17 | public final String modName; 18 | /** Class that implements the IFMLLoadingPlugin interface */ 19 | public final String coreModClass; 20 | /** The "modid" in the @Mod annotation */ 21 | public final String modId; 22 | 23 | TargetedMod(String modName, String coreModClass) { 24 | this(modName, coreModClass, null); 25 | } 26 | 27 | TargetedMod(String modName, String coreModClass, String modId) { 28 | this.modName = modName; 29 | this.coreModClass = coreModClass; 30 | this.modId = modId; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return "TargetedMod{modName='" + modName + "', coreModClass='" + coreModClass + "', modId='" + modId + "'}"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/base/MixinAbstractTexture.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.base; 2 | 3 | import net.minecraft.client.renderer.texture.AbstractTexture; 4 | 5 | import org.lwjgl.opengl.GL11; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Shadow; 8 | 9 | import jss.notfine.util.AbstractTextureExpansion; 10 | 11 | @Mixin(AbstractTexture.class) 12 | public abstract class MixinAbstractTexture implements AbstractTextureExpansion { 13 | 14 | @Shadow 15 | protected int glTextureId; 16 | 17 | public void unloadGLTexture() { 18 | if (this.glTextureId >= 0) { 19 | GL11.glDeleteTextures(this.glTextureId); 20 | this.glTextureId = -1; 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/base/MixinBlockGrass.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.base; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockGrass; 5 | import net.minecraft.util.IIcon; 6 | import net.minecraft.world.IBlockAccess; 7 | 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | import com.prupe.mcpatcher.mal.block.RenderBlocksUtils; 15 | 16 | @Mixin(BlockGrass.class) 17 | public class MixinBlockGrass { 18 | 19 | @Shadow 20 | private IIcon field_149991_b; 21 | 22 | @Inject( 23 | method = "getIcon(Lnet/minecraft/world/IBlockAccess;IIII)Lnet/minecraft/util/IIcon;", 24 | at = @At("HEAD"), 25 | cancellable = true) 26 | private void modifyGetIcon(IBlockAccess worldIn, int x, int y, int z, int side, CallbackInfoReturnable cir) { 27 | final IIcon grassTexture = RenderBlocksUtils 28 | .getGrassTexture((Block) (Object) this, worldIn, x, y, z, side, this.field_149991_b); 29 | if (grassTexture != null) { 30 | cir.setReturnValue(grassTexture); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/base/MixinBlockMycelium.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.base; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockMycelium; 5 | import net.minecraft.util.IIcon; 6 | import net.minecraft.world.IBlockAccess; 7 | 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | import com.prupe.mcpatcher.mal.block.RenderBlocksUtils; 15 | 16 | @Mixin(BlockMycelium.class) 17 | public abstract class MixinBlockMycelium { 18 | 19 | @Shadow 20 | private IIcon field_150200_a; 21 | 22 | @Inject( 23 | method = "getIcon(Lnet/minecraft/world/IBlockAccess;IIII)Lnet/minecraft/util/IIcon;", 24 | at = @At("HEAD"), 25 | cancellable = true) 26 | private void modifyGetIcon(IBlockAccess worldIn, int x, int y, int z, int side, CallbackInfoReturnable cir) { 27 | final IIcon grassTexture = RenderBlocksUtils 28 | .getGrassTexture((Block) (Object) this, worldIn, x, y, z, side, this.field_150200_a); 29 | if (grassTexture != null) { 30 | cir.setReturnValue(grassTexture); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/base/MixinSimpleReloadableResourceManager.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.base; 2 | 3 | import net.minecraft.client.resources.SimpleReloadableResourceManager; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | import com.prupe.mcpatcher.mal.resource.TexturePackChangeHandler; 11 | 12 | @Mixin(SimpleReloadableResourceManager.class) 13 | public abstract class MixinSimpleReloadableResourceManager { 14 | 15 | @Inject(method = "notifyReloadListeners()V", at = @At("HEAD")) 16 | private void modifyNotifyReloadListeners1(CallbackInfo ci) { 17 | TexturePackChangeHandler.beforeChange1(); 18 | } 19 | 20 | @Inject(method = "notifyReloadListeners()V", at = @At("RETURN")) 21 | private void modifyNotifyReloadListeners2(CallbackInfo ci) { 22 | TexturePackChangeHandler.afterChange1(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/base/MixinTextureAtlasSprite.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.base; 2 | 3 | import java.util.List; 4 | 5 | import net.minecraft.client.renderer.texture.TextureAtlasSprite; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Overwrite; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | 11 | @Mixin(TextureAtlasSprite.class) 12 | public abstract class MixinTextureAtlasSprite { 13 | 14 | // In 1.6 this is a List 15 | @Shadow 16 | public List framesTextureData; 17 | 18 | /** 19 | * @author Mist475 (adapted from Paul Rupe) 20 | * @reason null check? 21 | */ 22 | @Overwrite 23 | public int getFrameCount() { 24 | if (this.framesTextureData != null) { 25 | return this.framesTextureData.size(); 26 | } 27 | return 1; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlock.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.world.IBlockAccess; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | import com.prupe.mcpatcher.cc.ColorizeBlock; 12 | 13 | @Mixin(Block.class) 14 | public abstract class MixinBlock { 15 | 16 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 17 | public void modifyGetBlockColor(CallbackInfoReturnable cir) { 18 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 19 | cir.setReturnValue(ColorizeBlock.blockColor); 20 | } 21 | } 22 | 23 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 24 | public void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 25 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 26 | cir.setReturnValue(ColorizeBlock.blockColor); 27 | } 28 | } 29 | 30 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 31 | public void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 32 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 33 | cir.setReturnValue(ColorizeBlock.blockColor); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockDoublePlant.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockDoublePlant; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockDoublePlant.class) 15 | public abstract class MixinBlockDoublePlant { 16 | 17 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 18 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockGrass.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockGrass; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockGrass.class) 15 | public abstract class MixinBlockGrass { 16 | 17 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetBlockColor(CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | 31 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 32 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 33 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 34 | cir.setReturnValue(ColorizeBlock.blockColor); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockLeaves.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockLeaves; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockLeaves.class) 15 | public abstract class MixinBlockLeaves { 16 | 17 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetBlockColor(CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | 31 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 32 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 33 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 34 | cir.setReturnValue(ColorizeBlock.blockColor); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockLilyPad.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockLilyPad; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockLilyPad.class) 15 | public abstract class MixinBlockLilyPad { 16 | 17 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetBlockColor(CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | 31 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 32 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 33 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 34 | cir.setReturnValue(ColorizeBlock.blockColor); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockLiquid.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockLiquid; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockLiquid.class) 15 | public abstract class MixinBlockLiquid { 16 | 17 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetBlockColor(CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockOldLeaf.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockOldLeaf; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockOldLeaf.class) 15 | public abstract class MixinBlockOldLeaf { 16 | 17 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockRedstoneWire.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import java.util.Random; 4 | 5 | import net.minecraft.block.Block; 6 | import net.minecraft.block.BlockRedstoneWire; 7 | import net.minecraft.world.IBlockAccess; 8 | import net.minecraft.world.World; 9 | 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.ModifyArgs; 13 | import org.spongepowered.asm.mixin.injection.invoke.arg.Args; 14 | 15 | import com.llamalad7.mixinextras.injector.ModifyReturnValue; 16 | import com.prupe.mcpatcher.cc.ColorizeBlock; 17 | import com.prupe.mcpatcher.cc.Colorizer; 18 | 19 | @Mixin(BlockRedstoneWire.class) 20 | public abstract class MixinBlockRedstoneWire { 21 | 22 | // Not much more compatible but it's the thought that counts 23 | @ModifyReturnValue(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("RETURN")) 24 | public int modifyColorMultiplier(int defaultColor, IBlockAccess worldIn, int x, int y, int z) { 25 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 26 | return ColorizeBlock.blockColor; 27 | } 28 | return ColorizeBlock.colorizeRedstoneWire(worldIn, x, y, z, defaultColor); 29 | } 30 | 31 | @ModifyArgs( 32 | method = "randomDisplayTick(Lnet/minecraft/world/World;IIILjava/util/Random;)V", 33 | at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;spawnParticle(Ljava/lang/String;DDDDDD)V")) 34 | private void modifyRandomDisplayTick(Args args, World worldIn, int x, int y, int z, Random random) { 35 | if (ColorizeBlock.computeRedstoneWireColor(worldIn.getBlockMetadata(x, y, z))) { 36 | float f1 = Colorizer.setColor[0]; 37 | float f2 = Colorizer.setColor[1]; 38 | float f3 = Colorizer.setColor[2]; 39 | 40 | if (f2 < 0.0f) { 41 | f2 = 0.0f; 42 | } 43 | 44 | if (f3 < 0.0f) { 45 | f3 = 0.0f; 46 | } 47 | 48 | args.set(4, (double) f1); 49 | args.set(5, (double) f2); 50 | args.set(6, (double) f3); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockReed.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockReed; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockReed.class) 15 | public abstract class MixinBlockReed { 16 | 17 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 18 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockStem.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockStem; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockStem.class) 15 | public abstract class MixinBlockStem { 16 | 17 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockTallGrass.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockTallGrass; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockTallGrass.class) 15 | public abstract class MixinBlockTallGrass { 16 | 17 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetBlockColor(CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | 31 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 32 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 33 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 34 | cir.setReturnValue(ColorizeBlock.blockColor); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/MixinBlockVine.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.block.BlockVine; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | 14 | @Mixin(BlockVine.class) 15 | public abstract class MixinBlockVine { 16 | 17 | @Inject(method = "getBlockColor()I", at = @At("HEAD"), cancellable = true) 18 | private void modifyGetBlockColor(CallbackInfoReturnable cir) { 19 | if (ColorizeBlock.colorizeBlock((Block) (Object) this)) { 20 | cir.setReturnValue(ColorizeBlock.blockColor); 21 | } 22 | } 23 | 24 | @Inject(method = "getRenderColor(I)I", at = @At("HEAD"), cancellable = true) 25 | private void modifyGetRenderColor(int meta, CallbackInfoReturnable cir) { 26 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, meta)) { 27 | cir.setReturnValue(ColorizeBlock.blockColor); 28 | } 29 | } 30 | 31 | @Inject(method = "colorMultiplier(Lnet/minecraft/world/IBlockAccess;III)I", at = @At("HEAD"), cancellable = true) 32 | private void modifyColorMultiplier(IBlockAccess worldIn, int x, int y, int z, CallbackInfoReturnable cir) { 33 | if (ColorizeBlock.colorizeBlock((Block) (Object) this, worldIn, x, y, z)) { 34 | cir.setReturnValue(ColorizeBlock.blockColor); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/block/material/MixinMapColor.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.block.material; 2 | 3 | import net.minecraft.block.material.MapColor; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Unique; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | import jss.notfine.util.MapColorExpansion; 12 | 13 | @Mixin(MapColor.class) 14 | public abstract class MixinMapColor implements MapColorExpansion { 15 | 16 | @Unique 17 | private int mcpatcher_forge$origColorValue; 18 | 19 | @Inject(method = "(II)V", at = @At("RETURN")) 20 | private void modifyConstructor(int colorIndex, int colorValue, CallbackInfo ci) { 21 | this.setOriginalColorValue(colorValue); 22 | } 23 | 24 | public int getOriginalColorValue() { 25 | return mcpatcher_forge$origColorValue; 26 | } 27 | 28 | public void setOriginalColorValue(int value) { 29 | mcpatcher_forge$origColorValue = value; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/particle/MixinEntityAuraFX.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.particle; 2 | 3 | import net.minecraft.client.particle.EntityAuraFX; 4 | import net.minecraft.client.particle.EntityFX; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | 9 | import com.prupe.mcpatcher.cc.ColorizeEntity; 10 | import com.prupe.mcpatcher.cc.Colorizer; 11 | 12 | import jss.notfine.util.EntityAuraFXExpansion; 13 | 14 | @Mixin(EntityAuraFX.class) 15 | public abstract class MixinEntityAuraFX extends EntityFX implements EntityAuraFXExpansion { 16 | 17 | protected MixinEntityAuraFX(World world, double x, double y, double z) { 18 | super(world, x, y, z); 19 | } 20 | 21 | @SuppressWarnings("DataFlowIssue") 22 | @Override 23 | public EntityAuraFX colorize() { 24 | if (ColorizeEntity.computeMyceliumParticleColor()) { 25 | this.particleRed = Colorizer.setColor[0]; 26 | this.particleGreen = Colorizer.setColor[1]; 27 | this.particleBlue = Colorizer.setColor[2]; 28 | } 29 | return (EntityAuraFX) (Object) this; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/particle/MixinEntityBubbleFX.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.particle; 2 | 3 | import net.minecraft.client.particle.EntityBubbleFX; 4 | import net.minecraft.client.particle.EntityFX; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | import com.prupe.mcpatcher.cc.Colorizer; 14 | 15 | @Mixin(EntityBubbleFX.class) 16 | public abstract class MixinEntityBubbleFX extends EntityFX { 17 | 18 | protected MixinEntityBubbleFX(World world, double x, double y, double z) { 19 | super(world, x, y, z); 20 | } 21 | 22 | @Inject(method = "(Lnet/minecraft/world/World;DDDDDD)V", at = @At("RETURN")) 23 | private void modifyConstructor(World world, double x, double y, double z, double motionX, double motionY, 24 | double motionZ, CallbackInfo ci) { 25 | if (ColorizeBlock.computeWaterColor(false, (int) this.posX, (int) this.posY, (int) this.posZ)) { 26 | this.particleRed = Colorizer.setColor[0]; 27 | this.particleGreen = Colorizer.setColor[1]; 28 | this.particleBlue = Colorizer.setColor[2]; 29 | } else { 30 | this.particleRed = 1.0f; 31 | this.particleGreen = 1.0f; 32 | this.particleBlue = 1.0f; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/particle/MixinEntityPortalFX.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.particle; 2 | 3 | import net.minecraft.client.particle.EntityFX; 4 | import net.minecraft.client.particle.EntityPortalFX; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | import com.prupe.mcpatcher.cc.ColorizeEntity; 14 | 15 | @Mixin(EntityPortalFX.class) 16 | public abstract class MixinEntityPortalFX extends EntityFX { 17 | 18 | @Shadow 19 | private float portalParticleScale; 20 | 21 | protected MixinEntityPortalFX(World world, double x, double y, double z) { 22 | super(world, x, y, z); 23 | } 24 | 25 | @Inject(method = "(Lnet/minecraft/world/World;DDDDDD)V", at = @At("RETURN")) 26 | private void modifyConstructor(World world, double x, double y, double z, double motionX, double motionY, 27 | double motionZ, CallbackInfo ci) { 28 | // green & red get multiplied in constructor, blue doesn't 29 | this.particleGreen = this.portalParticleScale / 0.3f; 30 | this.particleGreen *= ColorizeEntity.portalColor[1]; 31 | this.particleRed = this.portalParticleScale / 0.9f; 32 | this.particleRed *= ColorizeEntity.portalColor[0]; 33 | this.particleBlue = ColorizeEntity.portalColor[2]; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/particle/MixinEntityRainFX.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.particle; 2 | 3 | import net.minecraft.client.particle.EntityFX; 4 | import net.minecraft.client.particle.EntityRainFX; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | import com.prupe.mcpatcher.cc.Colorizer; 14 | 15 | @Mixin(EntityRainFX.class) 16 | public abstract class MixinEntityRainFX extends EntityFX { 17 | 18 | protected MixinEntityRainFX(World world, double x, double y, double z) { 19 | super(world, x, y, z); 20 | } 21 | 22 | @Inject(method = "(Lnet/minecraft/world/World;DDD)V", at = @At("RETURN")) 23 | private void modifyConstructor(World world, double x, double y, double z, CallbackInfo ci) { 24 | if (ColorizeBlock.computeWaterColor(false, (int) this.posX, (int) this.posY, (int) this.posZ)) { 25 | this.particleRed = Colorizer.setColor[0]; 26 | this.particleGreen = Colorizer.setColor[1]; 27 | this.particleBlue = Colorizer.setColor[2]; 28 | } else { 29 | this.particleRed = 0.2f; 30 | this.particleGreen = 0.3f; 31 | this.particleBlue = 1.0f; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/particle/MixinEntitySplashFX.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.particle; 2 | 3 | import net.minecraft.client.particle.EntityFX; 4 | import net.minecraft.client.particle.EntitySplashFX; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeBlock; 13 | import com.prupe.mcpatcher.cc.Colorizer; 14 | 15 | @Mixin(EntitySplashFX.class) 16 | public abstract class MixinEntitySplashFX extends EntityFX { 17 | 18 | protected MixinEntitySplashFX(World world, double x, double y, double z) { 19 | super(world, x, y, z); 20 | } 21 | 22 | @Inject(method = "(Lnet/minecraft/world/World;DDDDDD)V", at = @At("RETURN")) 23 | private void modifyConstructor(World world, double x, double y, double z, double motionX, double motionY, 24 | double motionZ, CallbackInfo ci) { 25 | if (ColorizeBlock.computeWaterColor(false, (int) this.posX, (int) this.posY, (int) this.posZ)) { 26 | this.particleRed = Colorizer.setColor[0]; 27 | this.particleGreen = Colorizer.setColor[1]; 28 | this.particleBlue = Colorizer.setColor[2]; 29 | } else { 30 | this.particleRed = 0.2f; 31 | this.particleGreen = 0.3f; 32 | this.particleBlue = 1.0f; 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/particle/MixinEntitySuspendFX.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.particle; 2 | 3 | import net.minecraft.client.particle.EntityFX; 4 | import net.minecraft.client.particle.EntitySuspendFX; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeEntity; 13 | import com.prupe.mcpatcher.cc.Colorizer; 14 | 15 | @Mixin(EntitySuspendFX.class) 16 | public abstract class MixinEntitySuspendFX extends EntityFX { 17 | 18 | protected MixinEntitySuspendFX(World world, double x, double y, double z) { 19 | super(world, x, y, z); 20 | } 21 | 22 | @Inject(method = "(Lnet/minecraft/world/World;DDDDDD)V", at = @At("RETURN")) 23 | private void modifyConstructor(World world, double x, double y, double z, double motionX, double motionY, 24 | double motionZ, CallbackInfo ci) { 25 | ColorizeEntity.computeSuspendColor(6710962, (int) x, (int) y, (int) z); 26 | this.particleRed = Colorizer.setColor[0]; 27 | this.particleGreen = Colorizer.setColor[1]; 28 | this.particleBlue = Colorizer.setColor[2]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/renderer/MixinItemRenderer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.renderer; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.client.renderer.ItemRenderer; 5 | import net.minecraft.entity.EntityLivingBase; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraftforge.client.IItemRenderer; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | import com.prupe.mcpatcher.cc.ColorizeBlock; 15 | 16 | @Mixin(ItemRenderer.class) 17 | public abstract class MixinItemRenderer { 18 | 19 | @Inject( 20 | method = "renderItem(Lnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/item/ItemStack;ILnet/minecraftforge/client/IItemRenderer$ItemRenderType;)V", 21 | at = @At( 22 | value = "INVOKE", 23 | target = "Lnet/minecraft/client/renderer/ItemRenderer;renderItemIn2D(Lnet/minecraft/client/renderer/Tessellator;FFFFIIF)V", 24 | ordinal = 0)) 25 | private void modifyRenderItem2(EntityLivingBase entity, ItemStack itemStack, int renderPass, 26 | IItemRenderer.ItemRenderType type, CallbackInfo ci) { 27 | ColorizeBlock.colorizeWaterBlockGL(Block.getBlockFromItem(itemStack.getItem())); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/renderer/MixinRenderGlobal.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.renderer; 2 | 3 | import net.minecraft.client.renderer.RenderGlobal; 4 | import net.minecraft.client.settings.GameSettings; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.ModifyArg; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | import com.prupe.mcpatcher.cc.ColorizeWorld; 12 | 13 | @Mixin(RenderGlobal.class) 14 | public abstract class MixinRenderGlobal { 15 | 16 | @ModifyArg( 17 | method = "renderSky(F)V", 18 | at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/Tessellator;setColorOpaque_I(I)V")) 19 | private int modifyRenderSky2(int endSkyColor) { 20 | return ColorizeWorld.endSkyColor; 21 | } 22 | 23 | @Redirect( 24 | method = "renderClouds(F)V", 25 | at = @At(value = "FIELD", target = "Lnet/minecraft/client/settings/GameSettings;fancyGraphics:Z")) 26 | private boolean modifyRenderClouds(GameSettings instance) { 27 | return ColorizeWorld.drawFancyClouds(instance.fancyGraphics); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/renderer/entity/MixinRenderWolf.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.renderer.entity; 2 | 3 | import net.minecraft.client.renderer.entity.RenderWolf; 4 | import net.minecraft.entity.passive.EntitySheep; 5 | import net.minecraft.entity.passive.EntityWolf; 6 | 7 | import org.lwjgl.opengl.GL11; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | import com.prupe.mcpatcher.cc.ColorizeEntity; 13 | 14 | @Mixin(RenderWolf.class) 15 | public class MixinRenderWolf { 16 | 17 | @Redirect( 18 | method = "shouldRenderPass(Lnet/minecraft/entity/passive/EntityWolf;IF)I", 19 | at = @At(value = "INVOKE", target = "Lorg/lwjgl/opengl/GL11;glColor3f(FFF)V", ordinal = 1, remap = false)) 20 | private void modifyShouldRenderPass2(float red, float green, float blue, EntityWolf entity) { 21 | int collarColor = entity.getCollarColor(); 22 | GL11.glColor3f( 23 | ColorizeEntity.getWolfCollarColor(EntitySheep.fleeceColorTable[collarColor], collarColor)[0], 24 | ColorizeEntity.getWolfCollarColor(EntitySheep.fleeceColorTable[collarColor], collarColor)[1], 25 | ColorizeEntity.getWolfCollarColor(EntitySheep.fleeceColorTable[collarColor], collarColor)[2]); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/renderer/entity/MixinRenderXPOrb.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.renderer.entity; 2 | 3 | import net.minecraft.client.renderer.Tessellator; 4 | import net.minecraft.client.renderer.entity.RenderXPOrb; 5 | import net.minecraft.entity.item.EntityXPOrb; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | import com.prupe.mcpatcher.cc.ColorizeEntity; 12 | 13 | @Mixin(RenderXPOrb.class) 14 | public abstract class MixinRenderXPOrb { 15 | 16 | @Redirect( 17 | method = "doRender(Lnet/minecraft/entity/item/EntityXPOrb;DDDFF)V", 18 | at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/Tessellator;setColorRGBA_I(II)V")) 19 | private void modifyDoRender(Tessellator instance, int color, int alpha, EntityXPOrb entity, double x, double y, 20 | double z, float p_76986_8_, float p_76986_9_) { 21 | instance 22 | .setColorRGBA_I(ColorizeEntity.colorizeXPOrb(color, ((float) entity.xpColor + p_76986_9_) / 2.0F), alpha); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/client/renderer/tileentity/MixinTileEntitySignRenderer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.client.renderer.tileentity; 2 | 3 | import net.minecraft.client.renderer.tileentity.TileEntitySignRenderer; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.ModifyArg; 8 | 9 | import com.prupe.mcpatcher.cc.ColorizeWorld; 10 | 11 | @Mixin(TileEntitySignRenderer.class) 12 | public abstract class MixinTileEntitySignRenderer { 13 | 14 | @ModifyArg( 15 | method = "renderTileEntityAt(Lnet/minecraft/tileentity/TileEntitySign;DDDF)V", 16 | at = @At( 17 | value = "INVOKE", 18 | target = "Lnet/minecraft/client/gui/FontRenderer;drawString(Ljava/lang/String;III)I"), 19 | index = 3) 20 | private int modifyRenderTileEntityAt(int color) { 21 | return ColorizeWorld.colorizeSignText(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/entity/MixinEntityList.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.entity; 2 | 3 | import net.minecraft.entity.Entity; 4 | import net.minecraft.entity.EntityList; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | import com.prupe.mcpatcher.cc.ColorizeItem; 12 | 13 | @Mixin(EntityList.class) 14 | public abstract class MixinEntityList { 15 | 16 | @Inject(method = "addMapping(Ljava/lang/Class;Ljava/lang/String;III)V", at = @At("HEAD")) 17 | private static void modifyAddMapping(Class entityClass, String entityName, int entityId, 18 | int shellColor, int spotColor, CallbackInfo ci) { 19 | ColorizeItem.setupSpawnerEgg(entityName, entityId, shellColor, spotColor); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/item/MixinItemArmor.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.item; 2 | 3 | import net.minecraft.item.ItemArmor; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.Constant; 7 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 8 | 9 | import com.prupe.mcpatcher.cc.ColorizeEntity; 10 | 11 | @Mixin(ItemArmor.class) 12 | public abstract class MixinItemArmor { 13 | 14 | @ModifyConstant(method = "getColor(Lnet/minecraft/item/ItemStack;)I", constant = @Constant(intValue = 10511680)) 15 | private int modifyGetColor(int input) { 16 | return ColorizeEntity.undyedLeatherColor; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/item/MixinItemBlock.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.item; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.item.Item; 5 | import net.minecraft.item.ItemBlock; 6 | import net.minecraft.item.ItemStack; 7 | 8 | import org.spongepowered.asm.mixin.Final; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Shadow; 11 | 12 | @Mixin(ItemBlock.class) 13 | public abstract class MixinItemBlock extends Item { 14 | 15 | @Final 16 | @Shadow 17 | public Block field_150939_a; 18 | 19 | @Override 20 | public int getColorFromItemStack(final ItemStack itemStack, final int meta) { 21 | final Block block = this.field_150939_a; 22 | if (block != null) { 23 | return block.getRenderColor(meta); 24 | } 25 | return super.getColorFromItemStack(itemStack, meta); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/item/MixinItemMonsterPlacer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.item; 2 | 3 | import net.minecraft.item.ItemMonsterPlacer; 4 | import net.minecraft.item.ItemStack; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | import com.prupe.mcpatcher.cc.ColorizeItem; 12 | 13 | @Mixin(ItemMonsterPlacer.class) 14 | public abstract class MixinItemMonsterPlacer { 15 | 16 | @Inject(method = "getColorFromItemStack(Lnet/minecraft/item/ItemStack;I)I", at = @At("RETURN"), cancellable = true) 17 | private void modifyGetColorFromItemStack(ItemStack itemStack, int spots, CallbackInfoReturnable cir) { 18 | cir.setReturnValue(ColorizeItem.colorizeSpawnerEgg(cir.getReturnValue(), itemStack.getItemDamage(), spots)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/potion/MixinPotion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.potion; 2 | 3 | import net.minecraft.potion.Potion; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Unique; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | import com.prupe.mcpatcher.cc.ColorizeItem; 12 | 13 | import jss.notfine.util.PotionExpansion; 14 | 15 | @Mixin(Potion.class) 16 | public abstract class MixinPotion implements PotionExpansion { 17 | 18 | @Unique 19 | private int mcpatcher_forge$origColor; 20 | 21 | @Inject(method = "setPotionName(Ljava/lang/String;)Lnet/minecraft/potion/Potion;", at = @At("RETURN")) 22 | private void modifySetPotionName(String name, CallbackInfoReturnable cir) { 23 | ColorizeItem.setupPotion((Potion) (Object) this); 24 | } 25 | 26 | public void setOrigColor(int color) { 27 | this.mcpatcher_forge$origColor = color; 28 | } 29 | 30 | public int getOrigColor() { 31 | return this.mcpatcher_forge$origColor; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/potion/MixinPotionHelper.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.potion; 2 | 3 | import net.minecraft.potion.PotionHelper; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.Constant; 7 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 8 | 9 | import com.prupe.mcpatcher.cc.ColorizeItem; 10 | 11 | @Mixin(PotionHelper.class) 12 | public abstract class MixinPotionHelper { 13 | 14 | @ModifyConstant(method = "calcPotionLiquidColor(Ljava/util/Collection;)I", constant = @Constant(intValue = 3694022)) 15 | private static int modifyCalcPotionLiquidColor(int constant) { 16 | return ColorizeItem.getWaterBottleColor(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/world/MixinWorldProviderEnd.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.world; 2 | 3 | import net.minecraft.util.Vec3; 4 | import net.minecraft.world.WorldProviderEnd; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Overwrite; 8 | 9 | import com.prupe.mcpatcher.cc.ColorizeWorld; 10 | 11 | import cpw.mods.fml.relauncher.Side; 12 | import cpw.mods.fml.relauncher.SideOnly; 13 | 14 | @Mixin(WorldProviderEnd.class) 15 | public abstract class MixinWorldProviderEnd { 16 | 17 | /** 18 | * @author Mist475 (adapted from Paul Rupe) 19 | * @reason customized value 20 | */ 21 | @SideOnly(Side.CLIENT) 22 | @Overwrite 23 | public Vec3 getFogColor(float celestialAngle, float renderPartialTicks) { 24 | return Vec3.createVectorHelper( 25 | ColorizeWorld.endFogColor[0], 26 | ColorizeWorld.endFogColor[1], 27 | ColorizeWorld.endFogColor[2]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cc/world/MixinWorldProviderHell.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cc.world; 2 | 3 | import net.minecraft.util.Vec3; 4 | import net.minecraft.world.WorldProviderHell; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Overwrite; 8 | 9 | import com.prupe.mcpatcher.cc.ColorizeWorld; 10 | 11 | import cpw.mods.fml.relauncher.Side; 12 | import cpw.mods.fml.relauncher.SideOnly; 13 | 14 | @Mixin(WorldProviderHell.class) 15 | public abstract class MixinWorldProviderHell { 16 | 17 | /** 18 | * @author Mist475 (adapted from Paul Rupe) 19 | * @reason customized value 20 | */ 21 | @SideOnly(Side.CLIENT) 22 | @Overwrite 23 | public Vec3 getFogColor(float celestialAngle, float renderPartialTicks) { 24 | return Vec3.createVectorHelper( 25 | ColorizeWorld.netherFogColor[0], 26 | ColorizeWorld.netherFogColor[1], 27 | ColorizeWorld.netherFogColor[2]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/client/renderer/MixinItemRenderer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.client.renderer; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.client.renderer.ItemRenderer; 5 | import net.minecraft.entity.EntityLivingBase; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.IIcon; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import com.prupe.mcpatcher.cit.CITUtils; 14 | 15 | @Mixin(ItemRenderer.class) 16 | public abstract class MixinItemRenderer { 17 | 18 | @Redirect( 19 | method = "renderItem(Lnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/item/ItemStack;ILnet/minecraftforge/client/IItemRenderer$ItemRenderType;)V", 20 | at = @At( 21 | value = "INVOKE", 22 | target = "Lnet/minecraft/entity/EntityLivingBase;getItemIcon(Lnet/minecraft/item/ItemStack;I)Lnet/minecraft/util/IIcon;")) 23 | private IIcon modifyRenderItem1(EntityLivingBase instance, ItemStack item, int renderPass, EntityLivingBase entity, 24 | ItemStack item2, int renderPass1) { 25 | return CITUtils.getIcon(entity.getItemIcon(item2, renderPass1), item2, renderPass1); 26 | } 27 | 28 | @Redirect( 29 | method = "renderItem(Lnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/item/ItemStack;ILnet/minecraftforge/client/IItemRenderer$ItemRenderType;)V", 30 | at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;hasEffect(I)Z"), 31 | remap = false) 32 | private boolean modifyRenderItem3(ItemStack item, int pass, EntityLivingBase entity, ItemStack itemStack, 33 | int renderPass) { 34 | return !CITUtils.renderEnchantmentHeld(item, renderPass) && item.hasEffect(pass) && (boolean) Settings.MODE_GLINT_WORLD.option.getStore(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/client/renderer/MixinRenderGlobal.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.client.renderer; 2 | 3 | import com.prupe.mcpatcher.cit.CITUtils; 4 | import jss.notfine.util.itembreakparticles.IRenderGlobalSpawnItemBreakParticle; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.multiplayer.WorldClient; 7 | import net.minecraft.client.particle.EntityBreakingFX; 8 | import net.minecraft.client.particle.EntityFX; 9 | import net.minecraft.client.renderer.RenderGlobal; 10 | import net.minecraft.item.Item; 11 | import net.minecraft.item.ItemStack; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.Shadow; 14 | 15 | @Mixin(value = RenderGlobal.class) 16 | public abstract class MixinRenderGlobal implements IRenderGlobalSpawnItemBreakParticle { 17 | 18 | public EntityFX spawnItemBreakParticle(ItemStack itemStack, final double x, final double y, final double z, double velocityX, double velocityY, double velocityZ) { 19 | int i = mc.gameSettings.particleSetting; 20 | 21 | if (i == 1 && theWorld.rand.nextInt(3) == 0) { 22 | i = 2; 23 | } 24 | if (i > 1) { 25 | return null; 26 | } 27 | 28 | double relX = this.mc.renderViewEntity.posX - x; 29 | double relY = this.mc.renderViewEntity.posY - y; 30 | double relZ = this.mc.renderViewEntity.posZ - z; 31 | 32 | double distance = 16.0D; 33 | 34 | if (relX * relX + relY * relY + relZ * relZ > distance * distance) { 35 | return null; 36 | } 37 | 38 | Item item = itemStack.getItem(); 39 | int meta = itemStack.getItemDamage(); 40 | EntityFX entityfx = new EntityBreakingFX(theWorld, x, y, z, velocityX, velocityY, velocityZ, item, meta); 41 | entityfx.particleIcon = CITUtils.getIcon(item.getIconFromDamage(meta), itemStack, 0); 42 | mc.effectRenderer.addEffect(entityfx); 43 | return entityfx; 44 | } 45 | 46 | @Shadow 47 | private Minecraft mc; 48 | @Shadow 49 | private WorldClient theWorld; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/client/renderer/entity/MixinRenderBiped.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.client.renderer.entity; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.renderer.entity.RenderBiped; 5 | import net.minecraft.client.renderer.entity.RenderLiving; 6 | import net.minecraft.entity.EntityLiving; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import com.prupe.mcpatcher.cit.CITUtils; 14 | 15 | @Mixin(RenderBiped.class) 16 | public abstract class MixinRenderBiped extends RenderLiving { 17 | 18 | public MixinRenderBiped(ModelBase modelBase, float shadowSize) { 19 | super(modelBase, shadowSize); 20 | } 21 | 22 | @Redirect( 23 | method = "shouldRenderPass(Lnet/minecraft/entity/EntityLiving;IF)I", 24 | at = @At( 25 | value = "INVOKE", 26 | target = "Lnet/minecraft/client/renderer/entity/RenderBiped;bindTexture(Lnet/minecraft/util/ResourceLocation;)V")) 27 | private void modifyShouldRenderPass(RenderBiped instance, ResourceLocation resourceLocation, 28 | EntityLiving entityLiving, int slotId, float p_77032_3_) { 29 | this.bindTexture( 30 | CITUtils.getArmorTexture(resourceLocation, entityLiving, entityLiving.func_130225_q(3 - slotId))); 31 | } 32 | 33 | @Redirect( 34 | method = "func_82408_c(Lnet/minecraft/entity/EntityLiving;IF)V", 35 | at = @At( 36 | value = "INVOKE", 37 | target = "Lnet/minecraft/client/renderer/entity/RenderBiped;bindTexture(Lnet/minecraft/util/ResourceLocation;)V")) 38 | 39 | private void modifyFunc_82408_c(RenderBiped instance, ResourceLocation resourceLocation, EntityLiving entityLiving, 40 | int slotId, float p_82408_3_) { 41 | this.bindTexture( 42 | CITUtils.getArmorTexture(resourceLocation, entityLiving, entityLiving.func_130225_q(3 - slotId))); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/client/renderer/entity/MixinRenderSnowball.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.client.renderer.entity; 2 | 3 | import net.minecraft.client.renderer.entity.RenderSnowball; 4 | import net.minecraft.entity.Entity; 5 | import net.minecraft.item.Item; 6 | import net.minecraft.util.IIcon; 7 | 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | import com.prupe.mcpatcher.cit.CITUtils; 13 | 14 | @Mixin(RenderSnowball.class) 15 | public abstract class MixinRenderSnowball { 16 | 17 | @Redirect( 18 | method = "doRender(Lnet/minecraft/entity/Entity;DDDFF)V", 19 | at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;getIconFromDamage(I)Lnet/minecraft/util/IIcon;")) 20 | private IIcon modifyDoRender(Item item, int damage, Entity entity) { 21 | return CITUtils.getEntityIcon(item.getIconFromDamage(damage), entity); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/entity/MixinEntityLivingBase.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.entity; 2 | 3 | import jss.notfine.util.itembreakparticles.IWorldSpawnItemBreakParticle; 4 | import net.minecraft.entity.Entity; 5 | import net.minecraft.entity.EntityLivingBase; 6 | import net.minecraft.item.Item; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.util.Vec3; 9 | import net.minecraft.world.World; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Overwrite; 12 | 13 | @Mixin(value = EntityLivingBase.class) 14 | public abstract class MixinEntityLivingBase extends Entity { 15 | 16 | /** 17 | * @author jss2a98aj 18 | * @reason Fix item break particles 19 | */ 20 | @Overwrite 21 | public void renderBrokenItemStack(ItemStack itemStack) { 22 | playSound("random.break", 0.8F, 0.8F + this.worldObj.rand.nextFloat() * 0.4F); 23 | 24 | for(int i = 0; i < 5; ++i) { 25 | Vec3 vec3 = Vec3.createVectorHelper(((double)rand.nextFloat() - 0.5) * 0.1, Math.random() * 0.1 + 0.1, 0.0); 26 | vec3.rotateAroundX(-rotationPitch * 3.1415927F / 180.0F); 27 | vec3.rotateAroundY(-rotationYaw * 3.1415927F / 180.0F); 28 | Vec3 vec31 = Vec3.createVectorHelper(((double)rand.nextFloat() - 0.5) * 0.3, (double)(-rand.nextFloat()) * 0.6 - 0.3, 0.6); 29 | vec31.rotateAroundX(-rotationPitch * 3.1415927F / 180.0F); 30 | vec31.rotateAroundY(-rotationYaw * 3.1415927F / 180.0F); 31 | vec31 = vec31.addVector(posX, posY + (double)getEyeHeight(), posZ); 32 | ((IWorldSpawnItemBreakParticle)worldObj).spawnItemBreakParticle(itemStack, 33 | "iconcrack_" + Item.getIdFromItem(itemStack.getItem()), 34 | vec31.xCoord, vec31.yCoord, vec31.zCoord, vec3.xCoord, vec3.yCoord + 0.05, vec3.zCoord); 35 | } 36 | 37 | } 38 | 39 | private MixinEntityLivingBase(World world) { super(world); } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/item/MixinItem.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.item; 2 | 3 | import net.minecraft.item.Item; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.util.IIcon; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | import com.prupe.mcpatcher.cit.CITUtils; 13 | 14 | @Mixin(Item.class) 15 | public abstract class MixinItem { 16 | 17 | @Shadow 18 | public abstract IIcon getIconFromDamage(int meta); 19 | 20 | @Redirect( 21 | method = "getIconIndex(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/IIcon;", 22 | at = @At(value = "INVOKE", target = "Lnet/minecraft/item/Item;getIconFromDamage(I)Lnet/minecraft/util/IIcon;")) 23 | private IIcon modifyGetIconIndex(Item item, int meta, ItemStack itemStack) { 24 | return CITUtils.getIcon(this.getIconFromDamage(meta), itemStack, 0); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/nbt/MixinNBTTagCompound.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.nbt; 2 | 3 | import java.util.Collection; 4 | import java.util.Map; 5 | 6 | import net.minecraft.nbt.NBTBase; 7 | import net.minecraft.nbt.NBTTagCompound; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Shadow; 11 | 12 | import jss.notfine.util.NBTTagCompoundExpansion; 13 | 14 | @Mixin(NBTTagCompound.class) 15 | public abstract class MixinNBTTagCompound implements NBTTagCompoundExpansion { 16 | 17 | @Shadow 18 | private Map tagMap; 19 | 20 | public Collection getTags() { 21 | return this.tagMap.values(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/nbt/MixinNBTTagList.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.nbt; 2 | 3 | import java.util.List; 4 | 5 | import net.minecraft.nbt.NBTBase; 6 | import net.minecraft.nbt.NBTTagList; 7 | 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | 11 | import jss.notfine.util.NBTTagListExpansion; 12 | 13 | @Mixin(NBTTagList.class) 14 | public class MixinNBTTagList implements NBTTagListExpansion { 15 | 16 | @Shadow 17 | private List tagList; 18 | 19 | public NBTBase tagAt(final int n) { 20 | return this.tagList.get(n); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/cit/world/MixinWorld.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.cit.world; 2 | 3 | import jss.notfine.util.itembreakparticles.IRenderGlobalSpawnItemBreakParticle; 4 | import jss.notfine.util.itembreakparticles.IWorldSpawnItemBreakParticle; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.world.IWorldAccess; 7 | import net.minecraft.world.World; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | 11 | import java.util.List; 12 | 13 | @Mixin(value = World.class) 14 | public abstract class MixinWorld implements IWorldSpawnItemBreakParticle { 15 | 16 | public void spawnItemBreakParticle(ItemStack itemStack, String particleName, double x, double y, double z, double velocityX, double velocityY, double velocityZ) { 17 | for (int i = 0; i < worldAccesses.size(); ++i) { 18 | IWorldAccess access = worldAccesses.get(i); 19 | if (access instanceof IRenderGlobalSpawnItemBreakParticle) { 20 | ((IRenderGlobalSpawnItemBreakParticle)access).spawnItemBreakParticle(itemStack, x, y, z, velocityX, velocityY, velocityZ); 21 | } else { 22 | access.spawnParticle(particleName, x, y, z, velocityX, velocityY, velocityZ); 23 | } 24 | } 25 | } 26 | 27 | @Shadow 28 | protected List worldAccesses; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/hd/MixinTextureClock.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.hd; 2 | 3 | import net.minecraft.client.renderer.texture.TextureClock; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | import com.prupe.mcpatcher.hd.FancyDial; 11 | 12 | @Mixin(TextureClock.class) 13 | public abstract class MixinTextureClock { 14 | 15 | @Inject(method = "(Ljava/lang/String;)V", at = @At("RETURN")) 16 | private void modifyConstructor(String iconName, CallbackInfo ci) { 17 | FancyDial.setup((TextureClock) (Object) this); 18 | } 19 | 20 | @Inject( 21 | method = "updateAnimation()V", 22 | at = @At( 23 | value = "FIELD", 24 | target = "Lnet/minecraft/client/renderer/texture/TextureClock;field_94239_h:D", 25 | ordinal = 1, 26 | shift = At.Shift.AFTER), 27 | cancellable = true) 28 | private void modifyUpdateAnimation(CallbackInfo ci) { 29 | if (FancyDial.update((TextureClock) (Object) this, false)) { 30 | ci.cancel(); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/hd/MixinTextureCompass.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.hd; 2 | 3 | import net.minecraft.client.renderer.texture.TextureAtlasSprite; 4 | import net.minecraft.client.renderer.texture.TextureCompass; 5 | import net.minecraft.world.World; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Unique; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | import com.prupe.mcpatcher.hd.FancyDial; 14 | 15 | @Mixin(TextureCompass.class) 16 | public abstract class MixinTextureCompass extends TextureAtlasSprite { 17 | 18 | @Unique 19 | private boolean mcpatcher_forge$fancyDialUpdateHasRan = false; 20 | 21 | public MixinTextureCompass(String iconName) { 22 | super(iconName); 23 | } 24 | 25 | @Inject(method = "(Ljava/lang/String;)V", at = @At("RETURN")) 26 | private void modifyConstructor(String iconName, CallbackInfo ci) { 27 | FancyDial.setup((TextureCompass) (Object) this); 28 | } 29 | 30 | @Inject( 31 | method = "updateCompass(Lnet/minecraft/world/World;DDDZZ)V", 32 | at = @At(value = "JUMP", ordinal = 12, shift = At.Shift.BEFORE), 33 | cancellable = true) 34 | private void modifyUpdateCompass1(World world, double x, double y, double cameraDirection, boolean p_94241_8_, 35 | boolean itemFrameRenderer, CallbackInfo ci) { 36 | if (!this.mcpatcher_forge$fancyDialUpdateHasRan) { 37 | if (FancyDial.update(this, itemFrameRenderer)) { 38 | ci.cancel(); 39 | } 40 | this.mcpatcher_forge$fancyDialUpdateHasRan = true; 41 | } 42 | } 43 | 44 | @Inject(method = "updateCompass(Lnet/minecraft/world/World;DDDZZ)V", at = @At("RETURN")) 45 | private void modifyUpdateCompass2(World world, double x, double y, double cameraDirection, boolean p_94241_8_, 46 | boolean itemFrameRenderer, CallbackInfo ci) { 47 | this.mcpatcher_forge$fancyDialUpdateHasRan = false; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/hd/MixinTextureManager.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.hd; 2 | 3 | import net.minecraft.client.renderer.texture.TextureManager; 4 | 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | import com.prupe.mcpatcher.hd.CustomAnimation; 11 | 12 | @Mixin(TextureManager.class) 13 | public abstract class MixinTextureManager { 14 | 15 | @Inject(method = "tick()V", at = @At("RETURN")) 16 | private void modifyTick(CallbackInfo ci) { 17 | CustomAnimation.updateAll(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinEntityLivingBase.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.entity.EntityLivingBase; 4 | import net.minecraft.nbt.NBTTagCompound; 5 | 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | import com.prupe.mcpatcher.mob.MobRandomizer; 12 | 13 | @Mixin(EntityLivingBase.class) 14 | public abstract class MixinEntityLivingBase { 15 | 16 | @Inject(method = "writeEntityToNBT(Lnet/minecraft/nbt/NBTTagCompound;)V", at = @At("HEAD")) 17 | private void modifyWriteEntityToNBT(NBTTagCompound tagCompound, CallbackInfo ci) { 18 | MobRandomizer.ExtraInfo.writeToNBT((EntityLivingBase) (Object) this, tagCompound); 19 | } 20 | 21 | @Inject(method = "readEntityFromNBT(Lnet/minecraft/nbt/NBTTagCompound;)V", at = @At("HEAD")) 22 | private void modifyReadEntityFromNBT(NBTTagCompound tagCompound, CallbackInfo ci) { 23 | MobRandomizer.ExtraInfo.readFromNBT((EntityLivingBase) (Object) this, tagCompound); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinRender.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.client.renderer.entity.Render; 4 | import net.minecraft.entity.Entity; 5 | import net.minecraft.util.ResourceLocation; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | import com.prupe.mcpatcher.mob.MobRandomizer; 13 | 14 | @Mixin(Render.class) 15 | public abstract class MixinRender { 16 | 17 | @Shadow 18 | protected abstract ResourceLocation getEntityTexture(Entity entity); 19 | 20 | @Redirect( 21 | method = "bindEntityTexture(Lnet/minecraft/entity/Entity;)V", 22 | at = @At( 23 | value = "INVOKE", 24 | target = "Lnet/minecraft/client/renderer/entity/Render;getEntityTexture(Lnet/minecraft/entity/Entity;)Lnet/minecraft/util/ResourceLocation;")) 25 | private ResourceLocation modifyBindEntityTexture(Render instance, Entity entity) { 26 | return MobRandomizer.randomTexture(entity, getEntityTexture(entity)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinRenderEnderman.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.renderer.entity.RenderEnderman; 5 | import net.minecraft.client.renderer.entity.RenderLiving; 6 | import net.minecraft.entity.monster.EntityEnderman; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import com.prupe.mcpatcher.mob.MobRandomizer; 14 | 15 | @Mixin(RenderEnderman.class) 16 | public abstract class MixinRenderEnderman extends RenderLiving { 17 | 18 | public MixinRenderEnderman(ModelBase p_i1262_1_, float p_i1262_2_) { 19 | super(p_i1262_1_, p_i1262_2_); 20 | } 21 | 22 | @Redirect( 23 | method = "shouldRenderPass(Lnet/minecraft/entity/monster/EntityEnderman;IF)I", 24 | at = @At( 25 | value = "INVOKE", 26 | target = "Lnet/minecraft/client/renderer/entity/RenderEnderman;bindTexture(Lnet/minecraft/util/ResourceLocation;)V")) 27 | private void modifyShouldRenderPass(RenderEnderman instance, ResourceLocation resourceLocation, 28 | EntityEnderman entity) { 29 | MobRandomizer.randomTexture(entity, resourceLocation); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinRenderSheep.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.renderer.entity.RenderLiving; 5 | import net.minecraft.client.renderer.entity.RenderSheep; 6 | import net.minecraft.entity.passive.EntitySheep; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import com.prupe.mcpatcher.mob.MobRandomizer; 14 | 15 | @Mixin(RenderSheep.class) 16 | public abstract class MixinRenderSheep extends RenderLiving { 17 | 18 | public MixinRenderSheep(ModelBase modelBase, float shadowSize) { 19 | super(modelBase, shadowSize); 20 | } 21 | 22 | @Redirect( 23 | method = "shouldRenderPass(Lnet/minecraft/entity/passive/EntitySheep;IF)I", 24 | at = @At( 25 | value = "INVOKE", 26 | target = "Lnet/minecraft/client/renderer/entity/RenderSheep;bindTexture(Lnet/minecraft/util/ResourceLocation;)V")) 27 | private void modifyShouldRenderPass(RenderSheep instance, ResourceLocation resourceLocation, EntitySheep entity) { 28 | this.bindTexture(MobRandomizer.randomTexture(entity, resourceLocation)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinRenderSnowMan.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.client.renderer.ItemRenderer; 4 | import net.minecraft.client.renderer.entity.RenderSnowMan; 5 | import net.minecraft.entity.EntityLivingBase; 6 | import net.minecraft.item.ItemStack; 7 | 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | 11 | import com.llamalad7.mixinextras.injector.v2.WrapWithCondition; 12 | import com.prupe.mcpatcher.mob.MobOverlay; 13 | 14 | @Mixin(RenderSnowMan.class) 15 | public abstract class MixinRenderSnowMan { 16 | 17 | @WrapWithCondition( 18 | method = "renderEquippedItems(Lnet/minecraft/entity/monster/EntitySnowman;F)V", 19 | at = @At( 20 | value = "INVOKE", 21 | target = "Lnet/minecraft/client/renderer/ItemRenderer;renderItem(Lnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/item/ItemStack;I)V")) 22 | private boolean modifyRenderEquippedItems(ItemRenderer renderer, EntityLivingBase entity, ItemStack itemStack, 23 | int i) { 24 | return !MobOverlay.renderSnowmanOverlay(entity); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinRenderSpider.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.renderer.entity.RenderLiving; 5 | import net.minecraft.client.renderer.entity.RenderSpider; 6 | import net.minecraft.entity.monster.EntitySpider; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import com.prupe.mcpatcher.mob.MobRandomizer; 14 | 15 | @Mixin(RenderSpider.class) 16 | public abstract class MixinRenderSpider extends RenderLiving { 17 | 18 | public MixinRenderSpider(ModelBase modelBase, float shadowSize) { 19 | super(modelBase, shadowSize); 20 | } 21 | 22 | @Redirect( 23 | method = "shouldRenderPass(Lnet/minecraft/entity/monster/EntitySpider;IF)I", 24 | at = @At( 25 | value = "INVOKE", 26 | target = "Lnet/minecraft/client/renderer/entity/RenderSpider;bindTexture(Lnet/minecraft/util/ResourceLocation;)V")) 27 | private void modifyShouldRenderPass(RenderSpider instance, ResourceLocation resourceLocation, EntitySpider entity) { 28 | this.bindTexture(MobRandomizer.randomTexture(entity, resourceLocation)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/mob/MixinRenderWolf.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.mob; 2 | 3 | import net.minecraft.client.model.ModelBase; 4 | import net.minecraft.client.renderer.entity.RenderLiving; 5 | import net.minecraft.client.renderer.entity.RenderWolf; 6 | import net.minecraft.entity.passive.EntityWolf; 7 | import net.minecraft.util.ResourceLocation; 8 | 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import com.prupe.mcpatcher.mob.MobRandomizer; 14 | 15 | @Mixin(RenderWolf.class) 16 | public abstract class MixinRenderWolf extends RenderLiving { 17 | 18 | public MixinRenderWolf(ModelBase modelBase, float shadowSize) { 19 | super(modelBase, shadowSize); 20 | } 21 | 22 | @Redirect( 23 | method = "shouldRenderPass(Lnet/minecraft/entity/passive/EntityWolf;IF)I", 24 | at = @At( 25 | value = "INVOKE", 26 | target = "Lnet/minecraft/client/renderer/entity/RenderWolf;bindTexture(Lnet/minecraft/util/ResourceLocation;)V", 27 | ordinal = 1)) 28 | private void modifyShouldRenderPass1(RenderWolf instance, ResourceLocation resourceLocation, EntityWolf entity) { 29 | this.bindTexture(MobRandomizer.randomTexture(entity, resourceLocation)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/mcpatcherforge/renderpass/MixinRenderBlocks.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.mcpatcherforge.renderpass; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.client.renderer.RenderBlocks; 5 | import net.minecraft.world.IBlockAccess; 6 | 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | import com.prupe.mcpatcher.renderpass.RenderPass; 12 | 13 | @Mixin(value = RenderBlocks.class) 14 | public abstract class MixinRenderBlocks { 15 | 16 | @Redirect( 17 | method = { "renderBlockBed(Lnet/minecraft/block/Block;III)Z", 18 | "renderStandardBlockWithAmbientOcclusion(Lnet/minecraft/block/Block;IIIFFF)Z", 19 | "renderStandardBlockWithColorMultiplier(Lnet/minecraft/block/Block;IIIFFF)Z", 20 | "renderStandardBlockWithAmbientOcclusionPartial(Lnet/minecraft/block/Block;IIIFFF)Z", 21 | "renderBlockCactusImpl(Lnet/minecraft/block/Block;IIIFFF)Z", 22 | "renderBlockLiquid(Lnet/minecraft/block/Block;III)Z" }, 23 | at = @At( 24 | value = "INVOKE", 25 | target = "Lnet/minecraft/block/Block;shouldSideBeRendered(Lnet/minecraft/world/IBlockAccess;IIII)Z")) 26 | private boolean redirectShouldSideBeRendered(Block block, IBlockAccess worldIn, int x, int y, int z, int side) { 27 | return RenderPass.shouldSideBeRendered(block, worldIn, x, y, z, side); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/clouds/MixinEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.clouds; 2 | 3 | import jss.notfine.core.SettingsManager; 4 | import net.minecraft.client.renderer.EntityRenderer; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Constant; 8 | import org.spongepowered.asm.mixin.injection.ModifyArg; 9 | import org.spongepowered.asm.mixin.injection.ModifyConstant; 10 | 11 | @Mixin(value = EntityRenderer.class, priority = 990) 12 | public abstract class MixinEntityRenderer { 13 | 14 | @ModifyConstant(method = "renderWorld", constant = @Constant(doubleValue = 128.0D), expect = 2) 15 | double notFine$modifyCloudHeightCheck(double original) { 16 | return SettingsManager.cloudTranslucencyCheck; 17 | } 18 | 19 | @ModifyArg(method = "setupCameraTransform", at = @At(value = "INVOKE", target = "Lorg/lwjgl/util/glu/Project;gluPerspective(FFFF)V", remap = false), index = 3) 20 | private float notFine$modifyFarPlane(float original) { 21 | return Math.max(original, SettingsManager.minimumFarPlaneDistance); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/clouds/MixinGameSettings.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.clouds; 2 | 3 | import net.minecraft.client.settings.GameSettings; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.Overwrite; 6 | import org.spongepowered.asm.mixin.Shadow; 7 | 8 | @Mixin(value = GameSettings.class) 9 | public abstract class MixinGameSettings { 10 | 11 | /** 12 | * @author jss2a98aj 13 | * @reason Make clouds render at any render distance. 14 | */ 15 | @Overwrite 16 | public boolean shouldRenderClouds() { 17 | return clouds; 18 | } 19 | 20 | @Shadow public boolean clouds; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/clouds/MixinWorldType.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.clouds; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.world.WorldType; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Overwrite; 7 | 8 | @Mixin(value = WorldType.class) 9 | public abstract class MixinWorldType { 10 | 11 | /** 12 | * @author jss2a98aj 13 | * @reason Control cloud height. 14 | */ 15 | @Overwrite(remap = false) 16 | public float getCloudHeight() { 17 | return (int)Settings.CLOUD_HEIGHT.option.getStore(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/faceculling/MixinBlockCactus.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.faceculling; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.BlockCactus; 6 | import net.minecraft.block.material.Material; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | 10 | @Mixin(value = BlockCactus.class) 11 | public abstract class MixinBlockCactus extends Block implements IFaceObstructionCheckHelper { 12 | 13 | /** 14 | * @author jss2a98aj 15 | * @reason More accurate face culling. 16 | */ 17 | @Override 18 | public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { 19 | //If is not top or bottom 20 | if(side > 1) { 21 | return true; 22 | } 23 | //Check if other block is solid 24 | Block otherBlock = worldIn.getBlock(x, y, z); 25 | if(otherBlock.isOpaqueCube()) { 26 | return false; 27 | } 28 | //Check for IFaceObstructionCheckHelper 29 | if(otherBlock instanceof IFaceObstructionCheckHelper target) { 30 | return target.isFaceNonObstructing(worldIn, x, y, z, side, 0.0625F, 0.0F, 0.0625F, 0.9375F, 1.0F, 0.9375F); 31 | } 32 | //Default 33 | return true; 34 | } 35 | 36 | @Override 37 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 38 | if(getRenderBlockPass() == 1) { 39 | return true; 40 | } 41 | if(side > 1) { 42 | return true; 43 | } 44 | return otherMinX < 0.0625F || otherMinZ < 0.0625F || otherMaxX > 0.9375F || otherMaxZ > 0.9375F; 45 | } 46 | 47 | MixinBlockCactus(Material material) { 48 | super(material); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/faceculling/MixinBlockCarpet.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.faceculling; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.BlockCarpet; 6 | import net.minecraft.block.material.Material; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Overwrite; 10 | 11 | @Mixin(value = BlockCarpet.class) 12 | public abstract class MixinBlockCarpet extends Block implements IFaceObstructionCheckHelper { 13 | 14 | /** 15 | * @author jss2a98aj 16 | * @reason More accurate face culling. 17 | */ 18 | @Override 19 | @Overwrite() 20 | public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { 21 | //If this is the top 22 | if(side == 1) { 23 | return true; 24 | } 25 | //Check if other block is solid 26 | Block otherBlock = worldIn.getBlock(x, y, z); 27 | if(otherBlock.isOpaqueCube()) { 28 | return false; 29 | } 30 | //Check for IFaceObstructionCheckHelper 31 | if(otherBlock instanceof IFaceObstructionCheckHelper target) { 32 | return target.isFaceNonObstructing(worldIn, x, y, z, side, 0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F); 33 | } 34 | //Default 35 | return true; 36 | } 37 | 38 | @Override 39 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 40 | if(getRenderBlockPass() == 1) { 41 | return true; 42 | } 43 | if(side <= 1) { 44 | return side == 0; 45 | } 46 | return otherMaxY > 0.0625F; 47 | } 48 | 49 | MixinBlockCarpet(Material material) { 50 | super(material); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/faceculling/MixinBlockEnchantmentTable.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.faceculling; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.BlockEnchantmentTable; 6 | import net.minecraft.block.material.Material; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | 10 | @Mixin(value = BlockEnchantmentTable.class) 11 | public abstract class MixinBlockEnchantmentTable extends Block implements IFaceObstructionCheckHelper { 12 | 13 | /** 14 | * @author jss2a98aj 15 | * @reason More accurate face culling. 16 | */ 17 | @Override 18 | public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { 19 | //If this is the top 20 | if(side == 1) { 21 | return true; 22 | } 23 | //Check if other block is solid 24 | Block otherBlock = worldIn.getBlock(x, y, z); 25 | if(otherBlock.isOpaqueCube()) { 26 | return false; 27 | } 28 | //Check for IFaceObstructionCheckHelper 29 | if(otherBlock instanceof IFaceObstructionCheckHelper target) { 30 | return target.isFaceNonObstructing(worldIn, x, y, z, side, 0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F); 31 | } 32 | //Default 33 | return true; 34 | } 35 | 36 | @Override 37 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 38 | if(getRenderBlockPass() == 1) { 39 | return true; 40 | } 41 | if(side <= 1) { 42 | return side == 0; 43 | } 44 | return otherMaxY > 0.75F; 45 | } 46 | 47 | private MixinBlockEnchantmentTable(Material material) { 48 | super(material); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/faceculling/MixinBlockFarmland.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.faceculling; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.BlockFarmland; 6 | import net.minecraft.block.material.Material; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | 10 | @Mixin(value = BlockFarmland.class) 11 | public abstract class MixinBlockFarmland extends Block implements IFaceObstructionCheckHelper { 12 | 13 | /** 14 | * @author jss2a98aj 15 | * @reason More accurate face culling. 16 | */ 17 | @Override 18 | public boolean shouldSideBeRendered(IBlockAccess worldIn, int x, int y, int z, int side) { 19 | //If this is the top 20 | if(side == 1) { 21 | return true; 22 | } 23 | //Check if other block is solid 24 | Block otherBlock = worldIn.getBlock(x, y, z); 25 | if(otherBlock.isOpaqueCube()) { 26 | return false; 27 | } 28 | //Check for IFaceObstructionCheckHelper 29 | if(otherBlock instanceof IFaceObstructionCheckHelper target) { 30 | return target.isFaceNonObstructing(worldIn, x, y, z, side, 0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F); 31 | } 32 | //Default 33 | return true; 34 | } 35 | 36 | @Override 37 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 38 | if(getRenderBlockPass() == 1) { 39 | return true; 40 | } 41 | if(side <= 1) { 42 | return side == 0; 43 | } 44 | return otherMaxY > 0.9375F; 45 | } 46 | 47 | MixinBlockFarmland(Material material) { 48 | super(material); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/faceculling/MixinBlockStairs.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.faceculling; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.BlockStairs; 6 | import net.minecraft.block.material.Material; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | 10 | @Mixin(value = BlockStairs.class) 11 | public abstract class MixinBlockStairs extends Block implements IFaceObstructionCheckHelper { 12 | 13 | @Override() 14 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 15 | if(getRenderBlockPass() == 1) { 16 | return true; 17 | } 18 | boolean isTop = (worldIn.getBlockMetadata(x, y, z) & 7) > 3; 19 | return switch (side) { 20 | // -y bottom 21 | case 0 -> !isTop; 22 | // +y top 23 | case 1 -> isTop; 24 | default -> isTop ? otherMinY < 0.5D : otherMaxY > 0.5D; 25 | }; 26 | } 27 | 28 | MixinBlockStairs(Material materialIn) { 29 | super(materialIn); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/glint/MixinItemRenderer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.glint; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.client.renderer.ItemRenderer; 5 | import net.minecraft.item.ItemStack; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Redirect; 9 | 10 | @Mixin(value = ItemRenderer.class) 11 | public abstract class MixinItemRenderer { 12 | 13 | @Redirect( 14 | method = "renderItem(Lnet/minecraft/entity/EntityLivingBase;Lnet/minecraft/item/ItemStack;ILnet/minecraftforge/client/IItemRenderer$ItemRenderType;)V", 15 | at = @At( 16 | value = "INVOKE", 17 | target = "Lnet/minecraft/item/ItemStack;hasEffect(I)Z" 18 | ), 19 | remap = false 20 | ) 21 | private boolean notFine$toggleGlint(ItemStack stack, int pass) { 22 | return (boolean)Settings.MODE_GLINT_WORLD.option.getStore() && stack.hasEffect(pass); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/glint/MixinRenderBiped.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.glint; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.client.renderer.entity.RenderBiped; 5 | import net.minecraft.item.ItemStack; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Redirect; 9 | 10 | @Mixin(value = RenderBiped.class) 11 | public abstract class MixinRenderBiped { 12 | 13 | @Redirect( 14 | method = "shouldRenderPass(Lnet/minecraft/entity/EntityLiving;IF)I", 15 | at = @At( 16 | value = "INVOKE", 17 | target = "Lnet/minecraft/item/ItemStack;isItemEnchanted()Z" 18 | ) 19 | ) 20 | private boolean notFine$toggleGlint(ItemStack stack) { 21 | return (boolean)Settings.MODE_GLINT_WORLD.option.getStore() && stack.isItemEnchanted(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/glint/MixinRenderItem.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.glint; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.client.renderer.entity.RenderItem; 5 | import net.minecraft.item.ItemStack; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Redirect; 9 | 10 | @Mixin(value = RenderItem.class) 11 | public abstract class MixinRenderItem { 12 | 13 | @Redirect( 14 | method = "renderDroppedItem(Lnet/minecraft/entity/item/EntityItem;Lnet/minecraft/util/IIcon;IFFFFI)V", 15 | at = @At( 16 | value = "INVOKE", 17 | target = "Lnet/minecraft/item/ItemStack;hasEffect(I)Z" 18 | ), 19 | remap = false 20 | ) 21 | private boolean notFine$toggleGlint(ItemStack stack, int pass) { 22 | return stack.hasEffect(pass) && (boolean)Settings.MODE_GLINT_WORLD.option.getStore(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/glint/MixinRenderPlayer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.glint; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.client.renderer.entity.RenderPlayer; 5 | import net.minecraft.item.ItemStack; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Redirect; 9 | 10 | @Mixin(value = RenderPlayer.class) 11 | public abstract class MixinRenderPlayer { 12 | 13 | @Redirect( 14 | method = "shouldRenderPass(Lnet/minecraft/client/entity/AbstractClientPlayer;IF)I", 15 | at = @At( 16 | value = "INVOKE", 17 | target = "Lnet/minecraft/item/ItemStack;isItemEnchanted()Z" 18 | ) 19 | ) 20 | private boolean notFine$toggleGlint(ItemStack stack) { 21 | return stack.isItemEnchanted() && (boolean)Settings.MODE_GLINT_WORLD.option.getStore(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/gui/MixinGuiSlot.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.gui; 2 | 3 | import jss.notfine.core.Settings; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.gui.GuiSlot; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | @Mixin(GuiSlot.class) 12 | public abstract class MixinGuiSlot { 13 | 14 | @Inject(method = "drawContainerBackground", at = @At("HEAD"), cancellable = true, remap = false) 15 | private void notFine$toggleContainerBackground(CallbackInfo ci) { 16 | if(!(boolean)Settings.MODE_GUI_BACKGROUND.option.getStore() && Minecraft.getMinecraft().theWorld != null) { 17 | ci.cancel(); 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/leaves/MixinBlockLeaves.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.leaves; 2 | 3 | import jss.notfine.core.Settings; 4 | import jss.notfine.core.SettingsManager; 5 | import jss.notfine.gui.options.named.LeavesQuality; 6 | import jss.notfine.util.ILeafBlock; 7 | import net.minecraft.block.BlockLeaves; 8 | import net.minecraft.block.BlockLeavesBase; 9 | import net.minecraft.block.material.Material; 10 | import net.minecraft.util.Facing; 11 | import net.minecraft.util.IIcon; 12 | import net.minecraft.world.IBlockAccess; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.Overwrite; 15 | import org.spongepowered.asm.mixin.Shadow; 16 | 17 | @Mixin(value = BlockLeaves.class) 18 | public abstract class MixinBlockLeaves extends BlockLeavesBase { 19 | 20 | /** 21 | * @author jss2a98aj 22 | * @reason Control leaf opacity. 23 | */ 24 | @Override 25 | @Overwrite 26 | public boolean isOpaqueCube() { 27 | return SettingsManager.leavesOpaque; 28 | } 29 | 30 | @Override 31 | public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { 32 | if(field_150129_M[0] == null) { 33 | //A mod dev had no idea what they were doing. 34 | return getIcon(side, world.getBlockMetadata(x, y, z)); 35 | } 36 | int maskedMeta = world.getBlockMetadata(x, y, z) & 3; 37 | int renderMode; 38 | if(Settings.MODE_LEAVES.option.getStore() == LeavesQuality.SHELLED_FAST) { 39 | renderMode = world.getBlock( 40 | x + Facing.offsetsXForSide[side], 41 | y + Facing.offsetsYForSide[side], 42 | z + Facing.offsetsZForSide[side] 43 | ) instanceof ILeafBlock ? 1 : 0; 44 | } else { 45 | renderMode = SettingsManager.leavesOpaque ? 1 : 0; 46 | } 47 | maskedMeta = maskedMeta >= field_150129_M[renderMode].length ? 0 : maskedMeta; 48 | return field_150129_M[renderMode][maskedMeta]; 49 | } 50 | 51 | @Shadow protected IIcon[][] field_150129_M; 52 | 53 | private MixinBlockLeaves(Material material, boolean overridden) { 54 | super(material, overridden); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/leaves/MixinBlockLeavesBase.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.leaves; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import jss.notfine.util.ILeafBlock; 5 | import jss.notfine.util.LeafRenderUtil; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.block.BlockLeavesBase; 8 | import net.minecraft.block.material.Material; 9 | import net.minecraft.world.IBlockAccess; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | 12 | @Mixin(value = BlockLeavesBase.class) 13 | public abstract class MixinBlockLeavesBase extends Block implements IFaceObstructionCheckHelper, ILeafBlock { 14 | 15 | @Override 16 | public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { 17 | return LeafRenderUtil.shouldSideBeRendered(world, x, y, z, side); 18 | } 19 | 20 | @Override() 21 | public boolean isFaceNonObstructing(IBlockAccess world, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 22 | return LeafRenderUtil.isFaceNonObstructing(world, x, y, z); 23 | } 24 | 25 | private MixinBlockLeavesBase(Material material) { 26 | super(material); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/optimization/MixinRenderItemFrame.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.optimization; 2 | 3 | import net.minecraft.client.renderer.entity.Render; 4 | import net.minecraft.client.renderer.tileentity.RenderItemFrame; 5 | import net.minecraft.entity.item.EntityItem; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.world.World; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(value = RenderItemFrame.class) 13 | public abstract class MixinRenderItemFrame extends Render { 14 | 15 | private EntityItem cachedEntityItem; 16 | 17 | @Redirect( 18 | method = "func_82402_b(Lnet/minecraft/entity/item/EntityItemFrame;)V", 19 | at = @At( 20 | value = "NEW", 21 | target = "(Lnet/minecraft/world/World;DDDLnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/item/EntityItem;", 22 | ordinal = 0 23 | ) 24 | ) 25 | public EntityItem cacheEntityItem(World world, double x, double y, double z, ItemStack itemstack) { 26 | if(cachedEntityItem == null) { 27 | cachedEntityItem = new EntityItem(world, 0.0D, 0.0D, 0.0D, itemstack); 28 | } else { 29 | cachedEntityItem.setEntityItemStack(itemstack); 30 | } 31 | return cachedEntityItem; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/particles/MixinBlockEnchantmentTable.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.particles; 2 | 3 | import java.util.Random; 4 | 5 | import jss.notfine.core.Settings; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.Overwrite; 8 | 9 | import net.minecraft.block.BlockContainer; 10 | import net.minecraft.block.BlockEnchantmentTable; 11 | import net.minecraft.block.material.Material; 12 | import net.minecraft.world.World; 13 | 14 | 15 | @Mixin(value = BlockEnchantmentTable.class) 16 | public abstract class MixinBlockEnchantmentTable extends BlockContainer { 17 | 18 | /** 19 | * @author jss2a98aj 20 | * @reason Makes anything with enchantment power cause enchantment particles. 21 | */ 22 | @Override 23 | @Overwrite() 24 | public void randomDisplayTick(World world, int x, int y, int z, Random rand) { 25 | //Unneeded in vanilla as the super call is empty. 26 | //super.randomDisplayTick(world, x, y, z, rand); 27 | float particleChance = (int)Settings.PARTICLES_ENC_TABLE.option.getStore(); 28 | if(particleChance <= 0f) { 29 | return; 30 | } 31 | for (int xPos = x - 2; xPos <= x + 2; ++xPos) { 32 | for (int zPos = z - 2; zPos <= z + 2; ++zPos) { 33 | if (xPos > x - 2 && xPos < x + 2 && zPos == z - 1) { 34 | zPos = z + 2; 35 | } 36 | if (rand.nextInt(16) <= particleChance) { 37 | for (int yPos = y; yPos <= y + 1; ++yPos) { 38 | if (world.getBlock(xPos, yPos, zPos).getEnchantPowerBonus(world, xPos, yPos, zPos) > 0f) { 39 | if (!world.isAirBlock((xPos - x) / 2 + x, yPos, (zPos - z) / 2 + z)) { 40 | break; 41 | } 42 | world.spawnParticle( 43 | "enchantmenttable", 44 | (double)x + 0.5D, 45 | (double)y + 2.0D, 46 | (double)z + 0.5D, 47 | (double)((float)(xPos - x) + rand.nextFloat()) - 0.5D, 48 | (float)(yPos - y) - rand.nextFloat() - 1.0F, 49 | (double)((float)(zPos - z) + rand.nextFloat()) - 0.5D 50 | ); 51 | } 52 | } 53 | } 54 | } 55 | } 56 | } 57 | 58 | private MixinBlockEnchantmentTable(Material material) { 59 | super(material); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/particles/MixinEffectRenderer.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.particles; 2 | 3 | import net.minecraft.client.particle.EffectRenderer; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.injection.At; 6 | import org.spongepowered.asm.mixin.injection.Redirect; 7 | 8 | @Mixin(value = EffectRenderer.class) 9 | public abstract class MixinEffectRenderer { 10 | 11 | /** 12 | * @author jss2a98aj 13 | * @reason Makes most particles render with the expected depth. 14 | */ 15 | @Redirect( 16 | method = "renderParticles", 17 | at = @At( 18 | value = "INVOKE", 19 | target = "Lorg/lwjgl/opengl/GL11;glDepthMask(Z)V", 20 | ordinal = 0, 21 | remap = false 22 | ) 23 | ) 24 | private void skipGlDepthMask(boolean flag) { 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/particles/MixinWorldClient.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.particles; 2 | 3 | import java.util.Random; 4 | 5 | import com.llamalad7.mixinextras.injector.wrapoperation.Operation; 6 | import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; 7 | import jss.notfine.core.Settings; 8 | import net.minecraft.world.WorldProvider; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | 13 | import jss.util.RandomXoshiro256StarStar; 14 | import net.minecraft.client.multiplayer.WorldClient; 15 | 16 | @Mixin(value = WorldClient.class) 17 | public abstract class MixinWorldClient { 18 | 19 | /** 20 | * @author jss2a98aj 21 | * @reason Xoshiro256** is faster than Random. 22 | */ 23 | @Redirect( 24 | method = "doVoidFogParticles(III)V", 25 | at = @At( 26 | value = "NEW", 27 | target = "()Ljava/util/Random;", 28 | ordinal = 0 29 | ) 30 | ) 31 | private Random notFine$redirectDoVoidFogParticlesRandom() { 32 | return new RandomXoshiro256StarStar(); 33 | } 34 | 35 | /** 36 | * @author jss2a98aj 37 | * @reason Toggle void particles. 38 | */ 39 | @WrapOperation( 40 | method = "doVoidFogParticles(III)V", 41 | at = @At( 42 | value = "INVOKE", 43 | target = "Lnet/minecraft/world/WorldProvider;getWorldHasVoidParticles()Z" 44 | ) 45 | ) 46 | private boolean notFine$toggleVoidParticles(WorldProvider provider, Operation original){ 47 | return ((boolean) Settings.PARTICLES_VOID.option.getStore()) ? original.call(provider) : false; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/toggle/MixinEntityRenderer$RenderRainSnow.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.toggle; 2 | 3 | import jss.notfine.core.SettingsManager; 4 | import net.minecraft.client.renderer.EntityRenderer; 5 | import net.minecraft.client.settings.GameSettings; 6 | import org.spongepowered.asm.lib.Opcodes; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(EntityRenderer.class) 13 | public abstract class MixinEntityRenderer$RenderRainSnow { 14 | 15 | @Redirect( 16 | method = "renderRainSnow(F)V", 17 | at = @At( 18 | value = "FIELD", 19 | target = "Lnet/minecraft/client/settings/GameSettings;fancyGraphics:Z", 20 | opcode = Opcodes.GETFIELD 21 | ) 22 | ) 23 | private boolean notFine$bypassWeatherMode(GameSettings settings) { 24 | return false; 25 | } 26 | 27 | @ModifyVariable( 28 | method = "renderRainSnow(F)V", 29 | at = @At("STORE"), 30 | ordinal = 0 31 | ) 32 | private byte notFine$weatherDistance(byte distance) { 33 | return SettingsManager.downfallDistance; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/toggle/MixinGuiIngame.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.toggle; 2 | 3 | import jss.notfine.core.SettingsManager; 4 | import net.minecraft.client.gui.GuiIngame; 5 | import net.minecraftforge.client.GuiIngameForge; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Redirect; 9 | 10 | @Mixin(value = {GuiIngame.class, GuiIngameForge.class}) 11 | public abstract class MixinGuiIngame { 12 | 13 | @Redirect( 14 | method = "renderGameOverlay(FZII)V", 15 | at = @At( 16 | value = "INVOKE", 17 | target = "Lnet/minecraft/client/Minecraft;isFancyGraphicsEnabled()Z" 18 | ) 19 | ) 20 | private boolean notFine$toggleVignette() { 21 | return SettingsManager.vignette; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/toggle/MixinRender.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.toggle; 2 | 3 | import jss.notfine.core.SettingsManager; 4 | import net.minecraft.client.renderer.entity.Render; 5 | import net.minecraft.client.settings.GameSettings; 6 | import org.spongepowered.asm.lib.Opcodes; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | @Mixin(value = Render.class) 12 | public abstract class MixinRender { 13 | 14 | @Redirect( 15 | method = "doRenderShadowAndFire", 16 | at = @At( 17 | value = "FIELD", 18 | target = "Lnet/minecraft/client/settings/GameSettings;fancyGraphics:Z", 19 | opcode = Opcodes.GETFIELD, 20 | ordinal = 0 21 | ) 22 | ) 23 | private boolean notFine$toggleEntityShadows(GameSettings settings) { 24 | return SettingsManager.shadows; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/early/minecraft/toggle/MixinRenderItem.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.early.minecraft.toggle; 2 | 3 | import jss.notfine.core.SettingsManager; 4 | import net.minecraft.client.renderer.entity.RenderItem; 5 | import net.minecraft.client.settings.GameSettings; 6 | import org.spongepowered.asm.lib.Opcodes; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | @Mixin(value = RenderItem.class, priority = 1100) 12 | abstract public class MixinRenderItem { 13 | 14 | @Redirect( 15 | method = "renderDroppedItem(Lnet/minecraft/entity/item/EntityItem;Lnet/minecraft/util/IIcon;IFFFFI)V", 16 | at = @At( 17 | value = "FIELD", 18 | target = "Lnet/minecraft/client/settings/GameSettings;fancyGraphics:Z", 19 | opcode = Opcodes.GETFIELD 20 | ), 21 | allow = 1 22 | ) 23 | private boolean notFine$toggleDroppedItemDetail(GameSettings settings) { 24 | return SettingsManager.droppedItemDetail; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/faceculling/thaumcraft/MixinBlockStoneDevice.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.faceculling.thaumcraft; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.world.IBlockAccess; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import thaumcraft.common.blocks.BlockStoneDevice; 7 | 8 | @Mixin(value = BlockStoneDevice.class) 9 | public abstract class MixinBlockStoneDevice implements IFaceObstructionCheckHelper { 10 | 11 | @Override 12 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 13 | return switch (worldIn.getBlockMetadata(x, y, z)) { 14 | case 0, 12 -> false; 15 | case 1, 5, 9, 10, 14 -> side != 1; 16 | case 11 -> side != 0; 17 | case 13 -> side > 1; 18 | default -> true; 19 | }; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/faceculling/thaumcraft/MixinBlockTable.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.faceculling.thaumcraft; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.world.IBlockAccess; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import thaumcraft.common.blocks.BlockTable; 7 | 8 | @Mixin(value = BlockTable.class) 9 | public abstract class MixinBlockTable implements IFaceObstructionCheckHelper { 10 | 11 | @Override 12 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 13 | switch(side) { 14 | case 0: return false; 15 | case 1: { 16 | return worldIn.getBlockMetadata(x, y, z) < 14; 17 | } 18 | default: { 19 | float lowerBound = 0.25f; 20 | if(worldIn.getBlockMetadata(x, y, z) >= 14) { 21 | lowerBound = 0.5f; 22 | if(otherMaxY <= 0.25f) { 23 | return false; 24 | } 25 | } 26 | return otherMinY < lowerBound; 27 | } 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/faceculling/thaumcraft/MixinBlockWoodenDevice.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.faceculling.thaumcraft; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import net.minecraft.world.IBlockAccess; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import thaumcraft.common.blocks.BlockWoodenDevice; 7 | 8 | @Mixin(value = BlockWoodenDevice.class) 9 | public abstract class MixinBlockWoodenDevice implements IFaceObstructionCheckHelper { 10 | 11 | @Override 12 | public boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 13 | return switch (worldIn.getBlockMetadata(x, y, z)) { 14 | case 1 -> side != 1; 15 | case 4 -> side > 1; 16 | case 6, 7 -> false; 17 | default -> true; 18 | }; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/leaves/thaumcraft/MixinBlockMagicalLeaves.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.leaves.thaumcraft; 2 | 3 | import jss.notfine.util.IFaceObstructionCheckHelper; 4 | import jss.notfine.util.ILeafBlock; 5 | import jss.notfine.util.LeafRenderUtil; 6 | import net.minecraft.block.Block; 7 | import net.minecraft.block.material.Material; 8 | import net.minecraft.util.IIcon; 9 | import net.minecraft.world.IBlockAccess; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Overwrite; 12 | import org.spongepowered.asm.mixin.Shadow; 13 | import thaumcraft.common.blocks.BlockMagicalLeaves; 14 | 15 | @Mixin(value = BlockMagicalLeaves.class) 16 | public abstract class MixinBlockMagicalLeaves extends Block implements IFaceObstructionCheckHelper, ILeafBlock { 17 | 18 | @Override 19 | public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { 20 | int maskedMeta = world.getBlockMetadata(x, y, z) & 3; 21 | final int renderMode = LeafRenderUtil.selectRenderMode(world, x, y, z, side) ? 1 : 0; 22 | maskedMeta = maskedMeta > 1 ? 0 : maskedMeta; 23 | return icon[renderMode + maskedMeta * 2]; 24 | } 25 | 26 | /** 27 | * @author jss2a98aj 28 | * @reason Support new leaf rendering modes on Thaumcraft leaves. 29 | */ 30 | @Override 31 | @Overwrite 32 | public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) { 33 | return LeafRenderUtil.shouldSideBeRendered(world, x, y, z, side); 34 | } 35 | 36 | @Override() 37 | public boolean isFaceNonObstructing(IBlockAccess world, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ) { 38 | return LeafRenderUtil.isFaceNonObstructing(world, x, y, z); 39 | } 40 | 41 | private MixinBlockMagicalLeaves(Material material) { 42 | super(material); 43 | } 44 | 45 | @Shadow(remap = false) 46 | public IIcon[] icon; 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/leaves/twilightforest/MixinBlockTFLeaves.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.leaves.twilightforest; 2 | 3 | import jss.notfine.util.LeafRenderUtil; 4 | import net.minecraft.block.BlockLeaves; 5 | import net.minecraft.init.Blocks; 6 | import net.minecraft.util.IIcon; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import twilightforest.block.BlockTFLeaves; 10 | 11 | @Mixin(value = BlockTFLeaves.class) 12 | public abstract class MixinBlockTFLeaves extends BlockLeaves { 13 | 14 | @Override 15 | public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { 16 | int maskedMeta = world.getBlockMetadata(x, y, z) & 3; 17 | int renderMode = LeafRenderUtil.selectRenderMode(world, x, y, z, side) ? 1 : 0; 18 | maskedMeta = maskedMeta > 1 ? 0 : maskedMeta; 19 | return Blocks.leaves.field_150129_M[renderMode][maskedMeta]; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/leaves/twilightforest/MixinBlockTFLeaves3.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.leaves.twilightforest; 2 | 3 | import jss.notfine.util.LeafRenderUtil; 4 | import net.minecraft.block.BlockLeaves; 5 | import net.minecraft.init.Blocks; 6 | import net.minecraft.util.IIcon; 7 | import net.minecraft.world.IBlockAccess; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import twilightforest.block.BlockTFLeaves3; 10 | 11 | @Mixin(value = BlockTFLeaves3.class) 12 | public abstract class MixinBlockTFLeaves3 extends BlockLeaves { 13 | 14 | @Override 15 | public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { 16 | final int renderMode = LeafRenderUtil.selectRenderMode(world, x, y, z, side) ? 1 : 0; 17 | return Blocks.leaves.field_150129_M[renderMode][0]; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/leaves/twilightforest/MixinBlockTFMagicLeaves.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.leaves.twilightforest; 2 | 3 | import jss.notfine.util.LeafRenderUtil; 4 | import net.minecraft.block.BlockLeaves; 5 | import net.minecraft.util.IIcon; 6 | import net.minecraft.world.IBlockAccess; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import twilightforest.block.BlockTFMagicLeaves; 10 | 11 | @Mixin(value = BlockTFMagicLeaves.class) 12 | public abstract class MixinBlockTFMagicLeaves extends BlockLeaves { 13 | @Override 14 | public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { 15 | int maskedMeta = world.getBlockMetadata(x, y, z) & 3; 16 | final boolean renderMode = LeafRenderUtil.selectRenderMode(world, x, y, z, side); 17 | maskedMeta = maskedMeta > 1 ? 0 : maskedMeta; 18 | return switch (maskedMeta) { 19 | case 1 -> renderMode ? SPR_TRANSLEAVES_OPAQUE : SPR_TRANSLEAVES; 20 | case 3 -> renderMode ? SPR_SORTLEAVES_OPAQUE : SPR_SORTLEAVES; 21 | default -> renderMode ? SPR_TIMELEAVES_OPAQUE : SPR_TIMELEAVES; 22 | }; 23 | } 24 | 25 | @Shadow(remap = false) 26 | public static IIcon SPR_TIMELEAVES; 27 | @Shadow(remap = false) 28 | public static IIcon SPR_TIMELEAVES_OPAQUE; 29 | @Shadow(remap = false) 30 | public static IIcon SPR_TRANSLEAVES; 31 | @Shadow(remap = false) 32 | public static IIcon SPR_TRANSLEAVES_OPAQUE; 33 | @Shadow(remap = false) 34 | public static IIcon SPR_SORTLEAVES; 35 | @Shadow(remap = false) 36 | public static IIcon SPR_SORTLEAVES_OPAQUE; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/mixins/late/leaves/witchery/MixinBlockWitchLeaves.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.mixins.late.leaves.witchery; 2 | 3 | import com.emoniph.witchery.blocks.BlockWitchLeaves; 4 | import jss.notfine.core.SettingsManager; 5 | import jss.notfine.util.LeafRenderUtil; 6 | import net.minecraft.block.BlockLeavesBase; 7 | import net.minecraft.block.material.Material; 8 | import net.minecraft.util.IIcon; 9 | import net.minecraft.world.IBlockAccess; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Overwrite; 12 | import org.spongepowered.asm.mixin.Shadow; 13 | 14 | @Mixin(value = BlockWitchLeaves.class) 15 | public abstract class MixinBlockWitchLeaves extends BlockLeavesBase { 16 | 17 | /** 18 | * @author jss2a98aj 19 | * @reason Support new leaf rendering modes on Witchery leaves. 20 | */ 21 | @Override 22 | @Overwrite 23 | public boolean isOpaqueCube() { 24 | return SettingsManager.leavesOpaque; 25 | } 26 | 27 | @Override 28 | public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) { 29 | int maskedMeta = world.getBlockMetadata(x, y, z) & 3; 30 | final int renderMode = LeafRenderUtil.selectRenderMode(world, x, y, z, side) ? 1 : 0; 31 | maskedMeta = maskedMeta > 1 ? 0 : maskedMeta; 32 | return iconsForModes[renderMode][maskedMeta]; 33 | } 34 | 35 | @Shadow(remap = false) 36 | private IIcon[][] iconsForModes; 37 | 38 | private MixinBlockWitchLeaves(Material material, boolean unused) { 39 | super(material, unused); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/proxy/ClientProxy.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.proxy; 2 | 3 | import cpw.mods.fml.common.event.FMLInitializationEvent; 4 | import cpw.mods.fml.common.event.FMLPostInitializationEvent; 5 | import cpw.mods.fml.common.event.FMLPreInitializationEvent; 6 | import cpw.mods.fml.common.eventhandler.SubscribeEvent; 7 | import cpw.mods.fml.relauncher.Side; 8 | import jss.notfine.config.NotFineConfig; 9 | import jss.notfine.core.LoadMenuButtons; 10 | import jss.notfine.core.Settings; 11 | import jss.notfine.core.SettingsManager; 12 | import net.minecraft.client.Minecraft; 13 | import net.minecraft.client.settings.GameSettings; 14 | import net.minecraftforge.client.event.FOVUpdateEvent; 15 | import net.minecraftforge.common.MinecraftForge; 16 | 17 | public class ClientProxy extends CommonProxy { 18 | 19 | @Override 20 | public void preInit(FMLPreInitializationEvent event) { 21 | if(!NotFineConfig.allowAdvancedOpenGL) { 22 | Minecraft.getMinecraft().gameSettings.advancedOpengl = false; 23 | } 24 | if(!NotFineConfig.allowToggle3DAnaglyph) { 25 | Minecraft.getMinecraft().gameSettings.anaglyph = false; 26 | } 27 | if(!NotFineConfig.allowToggleFBO) { 28 | Minecraft.getMinecraft().gameSettings.fboEnable = true; 29 | } 30 | 31 | for(Settings setting : Settings.values()) { 32 | setting.ready(); 33 | } 34 | 35 | MinecraftForge.EVENT_BUS.register(this); 36 | MinecraftForge.EVENT_BUS.register(LoadMenuButtons.INSTANCE); 37 | } 38 | 39 | @Override 40 | public void init(FMLInitializationEvent event) { } 41 | 42 | @Override 43 | public void postInit(FMLPostInitializationEvent event) { 44 | SettingsManager.settingsFile.loadSettings(); 45 | } 46 | 47 | @SubscribeEvent 48 | public void onFOVModifierUpdate(FOVUpdateEvent event) { 49 | if (!(boolean)Settings.DYNAMIC_FOV.option.getStore()){ 50 | event.newfov = 1.0F; 51 | } 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/proxy/CommonProxy.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.proxy; 2 | 3 | import cpw.mods.fml.common.event.FMLInitializationEvent; 4 | import cpw.mods.fml.common.event.FMLPostInitializationEvent; 5 | import cpw.mods.fml.common.event.FMLPreInitializationEvent; 6 | 7 | public class CommonProxy { 8 | 9 | public void preInit(FMLPreInitializationEvent event) {} 10 | 11 | public void init(FMLInitializationEvent event) {} 12 | 13 | public void postInit(FMLPostInitializationEvent event) {} 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/AbstractTextureExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | public interface AbstractTextureExpansion { 4 | 5 | void unloadGLTexture(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/EntityAuraFXExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | import net.minecraft.client.particle.EntityAuraFX; 4 | 5 | public interface EntityAuraFXExpansion { 6 | 7 | EntityAuraFX colorize(); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/FontRendererExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | import net.minecraft.util.ResourceLocation; 4 | 5 | public interface FontRendererExpansion { 6 | 7 | float[] getCharWidthf(); 8 | 9 | void setCharWidthf(float[] widthf); 10 | 11 | ResourceLocation getDefaultFont(); 12 | 13 | void setDefaultFont(ResourceLocation defaultFont); 14 | 15 | ResourceLocation getHDFont(); 16 | 17 | void setHDFont(ResourceLocation hdFont); 18 | 19 | boolean getIsHD(); 20 | 21 | void setIsHD(boolean isHD); 22 | 23 | float getFontAdj(); 24 | 25 | void setFontAdj(float fontAdj); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/IFaceObstructionCheckHelper.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | import net.minecraft.world.IBlockAccess; 4 | 5 | public interface IFaceObstructionCheckHelper { 6 | 7 | boolean isFaceNonObstructing(IBlockAccess worldIn, int x, int y, int z, int side, double otherMinX, double otherMinY, double otherMinZ, double otherMaxX, double otherMaxY, double otherMaxZ); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/ILeafBlock.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | import net.minecraft.world.IBlockAccess; 4 | 5 | public interface ILeafBlock { 6 | 7 | default boolean isFullLeaf(IBlockAccess world, int x, int y, int z) { 8 | return true; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/MapColorExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | public interface MapColorExpansion { 4 | 5 | int getOriginalColorValue(); 6 | 7 | void setOriginalColorValue(int value); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/NBTTagCompoundExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | import java.util.Collection; 4 | 5 | import net.minecraft.nbt.NBTBase; 6 | 7 | public interface NBTTagCompoundExpansion { 8 | 9 | Collection getTags(); 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/NBTTagListExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | import net.minecraft.nbt.NBTBase; 4 | 5 | public interface NBTTagListExpansion { 6 | 7 | NBTBase tagAt(final int n); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/PotionExpansion.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util; 2 | 3 | public interface PotionExpansion { 4 | 5 | void setOrigColor(int color); 6 | 7 | int getOrigColor(); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/itembreakparticles/IRenderGlobalSpawnItemBreakParticle.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util.itembreakparticles; 2 | 3 | import net.minecraft.client.particle.EntityFX; 4 | import net.minecraft.item.ItemStack; 5 | 6 | public interface IRenderGlobalSpawnItemBreakParticle { 7 | 8 | EntityFX spawnItemBreakParticle(ItemStack itemStack, final double x, final double y, final double z, double velocityX, double velocityY, double velocityZ); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/jss/notfine/util/itembreakparticles/IWorldSpawnItemBreakParticle.java: -------------------------------------------------------------------------------- 1 | package jss.notfine.util.itembreakparticles; 2 | 3 | import net.minecraft.item.ItemStack; 4 | 5 | public interface IWorldSpawnItemBreakParticle { 6 | 7 | void spawnItemBreakParticle(ItemStack itemStack, String particleName, double x, double y, double z, double velocityX, double velocityY, double velocityZ); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/Option.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.control.Control; 4 | import me.jellysquid.mods.sodium.client.gui.options.storage.OptionStorage; 5 | 6 | import java.util.Collection; 7 | 8 | public interface Option { 9 | String getName(); 10 | 11 | String getTooltip(); 12 | 13 | OptionImpact getImpact(); 14 | 15 | Control getControl(); 16 | 17 | T getValue(); 18 | 19 | void setValue(T value); 20 | 21 | void reset(); 22 | 23 | OptionStorage getStorage(); 24 | 25 | boolean isAvailable(); 26 | 27 | boolean hasChanged(); 28 | 29 | void applyChanges(); 30 | 31 | Collection getFlags(); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/OptionFlag.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options; 2 | 3 | public enum OptionFlag { 4 | REQUIRES_RENDERER_RELOAD, 5 | REQUIRES_ASSET_RELOAD, 6 | REQUIRES_GAME_RESTART 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/OptionGroup.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options; 2 | 3 | import com.google.common.collect.ImmutableList; 4 | import org.apache.commons.lang3.Validate; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | public class OptionGroup { 10 | private final ImmutableList> options; 11 | 12 | private OptionGroup(ImmutableList> options) { 13 | this.options = options; 14 | } 15 | 16 | public static Builder createBuilder() { 17 | return new Builder(); 18 | } 19 | 20 | public ImmutableList> getOptions() { 21 | return this.options; 22 | } 23 | 24 | public static class Builder { 25 | private final List> options = new ArrayList<>(); 26 | 27 | public Builder add(Option option) { 28 | this.options.add(option); 29 | 30 | return this; 31 | } 32 | 33 | public OptionGroup build() { 34 | Validate.notEmpty(this.options, "At least one option must be specified"); 35 | 36 | return new OptionGroup(ImmutableList.copyOf(this.options)); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/OptionImpact.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options; 2 | 3 | import net.minecraft.client.resources.I18n; 4 | import net.minecraft.util.EnumChatFormatting; 5 | 6 | public enum OptionImpact { 7 | LOW(EnumChatFormatting.GREEN, I18n.format("sodium.option_impact.low")), 8 | MEDIUM(EnumChatFormatting.YELLOW, I18n.format("sodium.option_impact.medium")), 9 | HIGH(EnumChatFormatting.GOLD, I18n.format("sodium.option_impact.high")), 10 | EXTREME(EnumChatFormatting.RED, I18n.format("sodium.option_impact.extreme")), 11 | VARIES(EnumChatFormatting.WHITE, I18n.format("sodium.option_impact.varies")); 12 | 13 | private final EnumChatFormatting color; 14 | private final String text; 15 | 16 | OptionImpact(EnumChatFormatting color, String text) { 17 | this.color = color; 18 | this.text = text; 19 | } 20 | 21 | public String toDisplayString() { 22 | return this.color + this.text; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/OptionPage.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options; 2 | 3 | import com.google.common.collect.ImmutableList; 4 | 5 | public class OptionPage { 6 | private final String name; 7 | private final ImmutableList groups; 8 | private final ImmutableList> options; 9 | 10 | public OptionPage(String name, ImmutableList groups) { 11 | this.name = name; 12 | this.groups = groups; 13 | 14 | ImmutableList.Builder> builder = ImmutableList.builder(); 15 | 16 | for (OptionGroup group : groups) { 17 | builder.addAll(group.getOptions()); 18 | } 19 | 20 | this.options = builder.build(); 21 | } 22 | 23 | public ImmutableList getGroups() { 24 | return this.groups; 25 | } 26 | 27 | public ImmutableList> getOptions() { 28 | return this.options; 29 | } 30 | 31 | public String getName() { 32 | return this.name; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/binding/GenericBinding.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.binding; 2 | 3 | import java.util.function.BiConsumer; 4 | import java.util.function.Function; 5 | 6 | public class GenericBinding implements OptionBinding { 7 | private final BiConsumer setter; 8 | private final Function getter; 9 | 10 | public GenericBinding(BiConsumer setter, Function getter) { 11 | this.setter = setter; 12 | this.getter = getter; 13 | } 14 | 15 | @Override 16 | public void setValue(S storage, T value) { 17 | this.setter.accept(storage, value); 18 | } 19 | 20 | @Override 21 | public T getValue(S storage) { 22 | return this.getter.apply(storage); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/binding/OptionBinding.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.binding; 2 | 3 | public interface OptionBinding { 4 | void setValue(S storage, T value); 5 | 6 | T getValue(S storage); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/control/Control.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.control; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.gui.options.control.element.ControlElementFactory; 5 | import me.jellysquid.mods.sodium.client.util.Dim2i; 6 | 7 | public interface Control { 8 | Option getOption(); 9 | 10 | ControlElement createElement(Dim2i dim, ControlElementFactory factory); 11 | 12 | int getMaxWidth(); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/control/ControlElement.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.control; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.util.Dim2i; 5 | 6 | public interface ControlElement { 7 | boolean isHovered(); 8 | Option getOption(); 9 | Dim2i getDimensions(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/control/ControlValueFormatter.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.control; 2 | 3 | import net.minecraft.client.resources.I18n; 4 | 5 | public interface ControlValueFormatter { 6 | static ControlValueFormatter guiScale() { 7 | return (v) -> (v == 0) ? I18n.format("options.guiScale.auto") : I18n.format(v + "x"); 8 | } 9 | 10 | static ControlValueFormatter fpsLimit() { 11 | return (v) -> (v == 260) ? I18n.format("options.framerateLimit.max") : I18n.format("options.framerate", v); 12 | } 13 | 14 | static ControlValueFormatter brightness() { 15 | return (v) -> { 16 | if (v == 0) { 17 | return I18n.format("options.gamma.min"); 18 | } else if (v == 100) { 19 | return I18n.format("options.gamma.max"); 20 | } else { 21 | return v + "%"; 22 | } 23 | }; 24 | } 25 | 26 | String format(int value); 27 | 28 | static ControlValueFormatter percentage() { 29 | return (v) -> v + "%"; 30 | } 31 | 32 | static ControlValueFormatter multiplier() { 33 | return (v) -> v + "x"; 34 | } 35 | 36 | static ControlValueFormatter quantity(String name) { 37 | return (v) -> I18n.format(name, v); 38 | } 39 | 40 | static ControlValueFormatter quantityOrDisabled(String name, String disableText) { 41 | return (v) -> I18n.format(v == 0 ? disableText : name, v); 42 | } 43 | 44 | static ControlValueFormatter number() { 45 | return String::valueOf; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/control/SliderControl.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.control; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.gui.options.control.element.ControlElementFactory; 5 | import me.jellysquid.mods.sodium.client.util.Dim2i; 6 | import org.apache.commons.lang3.Validate; 7 | 8 | public class SliderControl implements Control { 9 | private final Option option; 10 | 11 | private final int min, max, interval; 12 | 13 | private final ControlValueFormatter mode; 14 | 15 | public SliderControl(Option option, int min, int max, int interval, ControlValueFormatter mode) { 16 | Validate.isTrue(max > min, "The maximum value must be greater than the minimum value"); 17 | Validate.isTrue(interval > 0, "The slider interval must be greater than zero"); 18 | Validate.isTrue(((max - min) % interval) == 0, "The maximum value must be divisable by the interval"); 19 | Validate.notNull(mode, "The slider mode must not be null"); 20 | 21 | this.option = option; 22 | this.min = min; 23 | this.max = max; 24 | this.interval = interval; 25 | this.mode = mode; 26 | } 27 | 28 | @Override 29 | public ControlElement createElement(Dim2i dim, ControlElementFactory factory) { 30 | return factory.sliderControlElement(this.option, dim, this.min, this.max, this.interval, this.mode); 31 | } 32 | 33 | @Override 34 | public Option getOption() { 35 | return this.option; 36 | } 37 | 38 | @Override 39 | public int getMaxWidth() { 40 | return 130; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/control/TickBoxControl.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.control; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.gui.options.control.element.ControlElementFactory; 5 | import me.jellysquid.mods.sodium.client.util.Dim2i; 6 | 7 | public class TickBoxControl implements Control { 8 | private final Option option; 9 | 10 | public TickBoxControl(Option option) { 11 | this.option = option; 12 | } 13 | 14 | @Override 15 | public ControlElement createElement(Dim2i dim, ControlElementFactory factory) { 16 | return factory.tickBoxElement(this.option, dim); 17 | } 18 | 19 | @Override 20 | public int getMaxWidth() { 21 | return 30; 22 | } 23 | 24 | @Override 25 | public Option getOption() { 26 | return this.option; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/control/element/ControlElementFactory.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.control.element; 2 | 3 | import me.jellysquid.mods.sodium.client.gui.options.Option; 4 | import me.jellysquid.mods.sodium.client.gui.options.control.ControlElement; 5 | import me.jellysquid.mods.sodium.client.gui.options.control.ControlValueFormatter; 6 | import me.jellysquid.mods.sodium.client.util.Dim2i; 7 | 8 | public interface ControlElementFactory { 9 | 10 | > ControlElement cyclingControlElement(Option option, Dim2i dim, T[] allowedValues, String[] names); 11 | 12 | ControlElement sliderControlElement(Option option, Dim2i dim, int min, int max, int interval, ControlValueFormatter formatter); 13 | 14 | ControlElement tickBoxElement(Option option, Dim2i dim); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/named/GraphicsMode.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.named; 2 | 3 | public enum GraphicsMode implements NamedState { 4 | FANCY("options.graphics.fancy"), 5 | FAST("options.graphics.fast"); 6 | 7 | private final String name; 8 | 9 | GraphicsMode(String name) { 10 | this.name = name; 11 | } 12 | 13 | @Override 14 | public String getKey() { 15 | return this.name; 16 | } 17 | 18 | public boolean isFancy() { 19 | return this == FANCY; 20 | } 21 | 22 | public static GraphicsMode fromBoolean(boolean isFancy) { 23 | return isFancy ? FANCY : FAST; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/named/GraphicsQuality.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.named; 2 | 3 | import net.minecraft.client.Minecraft; 4 | 5 | public enum GraphicsQuality implements NamedState { 6 | DEFAULT("generator.default"), 7 | FANCY("options.graphics.fancy"), 8 | FAST("options.graphics.fast"); 9 | 10 | private final String name; 11 | 12 | GraphicsQuality(String name) { 13 | this.name = name; 14 | } 15 | 16 | @Override 17 | public String getKey() { 18 | return this.name; 19 | } 20 | 21 | public boolean isFancy() { 22 | return this == FANCY || (this == DEFAULT && Minecraft.getMinecraft().gameSettings.fancyGraphics); 23 | } 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/named/LightingQuality.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.named; 2 | 3 | import net.minecraft.util.MathHelper; 4 | 5 | public enum LightingQuality implements NamedState { 6 | OFF("options.ao.off"), 7 | LOW("options.ao.min"), 8 | HIGH("options.ao.max"); 9 | 10 | private static final LightingQuality[] VALUES = values(); 11 | 12 | private final String name; 13 | 14 | private final int vanilla; 15 | 16 | LightingQuality(String name) { 17 | this.name = name; 18 | this.vanilla = ordinal(); 19 | } 20 | 21 | @Override 22 | public String getKey() { 23 | return this.name; 24 | } 25 | 26 | public int getVanilla() { 27 | return vanilla; 28 | } 29 | 30 | public static LightingQuality fromOrdinal(int ordinal) { 31 | return VALUES[MathHelper.clamp_int(ordinal, 0, VALUES.length - 1)]; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/named/NamedState.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.named; 2 | 3 | public interface NamedState { 4 | String getKey(); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/named/ParticleMode.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.named; 2 | 3 | import net.minecraft.util.MathHelper; 4 | 5 | public enum ParticleMode implements NamedState { 6 | ALL("options.particles.all"), 7 | DECREASED("options.particles.decreased"), 8 | MINIMAL("options.particles.minimal"); 9 | 10 | private static final ParticleMode[] VALUES = values(); 11 | 12 | private final String name; 13 | 14 | ParticleMode(String name) { 15 | this.name = name; 16 | } 17 | 18 | @Override 19 | public String getKey() { 20 | return this.name; 21 | } 22 | 23 | public static ParticleMode fromOrdinal(int ordinal) { 24 | return VALUES[MathHelper.clamp_int(ordinal, 0, VALUES.length - 1)]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/storage/MinecraftOptionsStorage.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.storage; 2 | 3 | import jss.notfine.NotFine; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.settings.GameSettings; 6 | 7 | public class MinecraftOptionsStorage implements OptionStorage { 8 | private final Minecraft client; 9 | 10 | public MinecraftOptionsStorage() { 11 | this.client = Minecraft.getMinecraft(); 12 | } 13 | 14 | @Override 15 | public GameSettings getData() { 16 | return this.client.gameSettings; 17 | } 18 | 19 | @Override 20 | public void save() { 21 | this.getData().saveOptions(); 22 | 23 | NotFine.logger.info("Flushed changes to Minecraft configuration"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/gui/options/storage/OptionStorage.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.gui.options.storage; 2 | 3 | public interface OptionStorage { 4 | T getData(); 5 | 6 | void save(); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/jellysquid/mods/sodium/client/util/Dim2i.java: -------------------------------------------------------------------------------- 1 | package me.jellysquid.mods.sodium.client.util; 2 | 3 | public class Dim2i { 4 | private int x; 5 | private int y; 6 | private int width; 7 | private int height; 8 | 9 | public Dim2i(int x, int y, int width, int height) { 10 | this.x = x; 11 | this.y = y; 12 | this.width = width; 13 | this.height = height; 14 | } 15 | 16 | public int getOriginX() { 17 | return this.x; 18 | } 19 | 20 | public int getOriginY() { 21 | return this.y; 22 | } 23 | 24 | public int getWidth() { 25 | return this.width; 26 | } 27 | 28 | public int getHeight() { 29 | return this.height; 30 | } 31 | 32 | public int getLimitX() { 33 | return this.x + this.width; 34 | } 35 | 36 | public int getLimitY() { 37 | return this.y + this.height; 38 | } 39 | 40 | public boolean containsCursor(double x, double y) { 41 | return x >= this.x && x < this.getLimitX() && y >= this.y && y < this.getLimitY(); 42 | } 43 | 44 | public int getCenterX() { 45 | return this.x + (this.width / 2); 46 | } 47 | 48 | public int getCenterY() { 49 | return this.y + (this.height / 2); 50 | } 51 | 52 | public void setX(int x) { 53 | this.x = x; 54 | } 55 | 56 | public void setY(int y) { 57 | this.y = y; 58 | } 59 | 60 | public void setWidth(int width) { 61 | this.width = width; 62 | } 63 | 64 | public void setHeight(int height) { 65 | this.height = height; 66 | } 67 | 68 | public boolean canFitDimension(Dim2i anotherDim) { 69 | return this.x <= anotherDim.getOriginX() && this.y <= anotherDim.getOriginY() && this.getLimitX() >= anotherDim.getLimitX() && this.getLimitY() >= anotherDim.getLimitY(); 70 | } 71 | 72 | public boolean overlapWith(Dim2i other) { 73 | return this.x < other.getLimitX() && this.getLimitX() > other.getOriginX() && this.y < other.getLimitY() && this.getLimitY() > other.getOriginY(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/mcpatcherforge_at.cfg: -------------------------------------------------------------------------------- 1 | public net.minecraft.block.Block field_149764_J # blockMaterial 2 | public-f net.minecraft.block.material.MapColor field_76291_p # colorValue 3 | public net.minecraft.client.gui.FontRenderer func_111272_d()V # readFontTexture 4 | public net.minecraft.client.renderer.EntityRenderer field_78514_e # torchFlickerX 5 | public net.minecraft.client.renderer.texture.TextureMap field_94258_i # listAnimatedSprites 6 | public net.minecraft.client.renderer.texture.TextureManager field_110585_a # mapTextureObjects 7 | public net.minecraft.client.renderer.texture.TextureClock field_94239_h # field_94239_h 8 | public net.minecraft.client.resources.AbstractResourcePack field_110597_b # resourcePackFile 9 | public net.minecraft.client.resources.DefaultResourcePack field_152781_b # field_152781_b 10 | public net.minecraft.client.resources.FallbackResourceManager field_110540_a # resourcePacks 11 | public net.minecraft.client.resources.SimpleReloadableResourceManager field_110548_a # domainResourceManagers 12 | public-f net.minecraft.potion.Potion field_76414_N # liquidColor 13 | public net.minecraft.client.renderer.texture.TextureAtlasSprite field_110976_a # framesTextureData 14 | public net.minecraft.client.resources.FileResourcePack func_110599_c()Ljava/util/zip/ZipFile; # getResourcePackZipFile 15 | public net.minecraft.potion.PotionHelper field_77925_n # field_77925_n PotionColorCache 16 | public net.minecraft.client.renderer.texture.TextureAtlasSprite (Ljava.lang.String;)V # constuctor 17 | public net.minecraft.entity.projectile.EntityPotion field_70197_d # potionDamage 18 | public net.minecraft.client.resources.SimpleResource field_110533_b # srResourceLocation 19 | public net.minecraft.client.renderer.EntityRenderer func_82830_a(Lnet/minecraft/entity/player/EntityPlayer;F)F # getNightVisionBrightness 20 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/notfine_at.cfg: -------------------------------------------------------------------------------- 1 | #For changing gui background 2 | public-f net.minecraft.client.gui.Gui field_110325_k #optionsBackground 3 | #For item break particle fixes 4 | public net.minecraft.client.particle.EntityFX field_70550_a #particleIcon 5 | #For regenerating the stars render list 6 | public net.minecraft.client.renderer.RenderGlobal field_72772_v #starGLCallList 7 | #For star, sun & moon toggles 8 | public net.minecraft.client.renderer.Tessellator field_78406_i #vertexCount 9 | #For adjusting vanilla option enumerators 10 | public-f net.minecraft.client.settings.GameSettings$Options field_148270_M #valueStep 11 | #For supporting some strangely setup mods 12 | public net.minecraft.block.BlockLeaves field_150129_M 13 | #For the interpolated icon class 14 | public net.minecraft.client.renderer.texture.TextureAtlasSprite field_110982_k #animationMetadata 15 | #For interpolated icon mixin 16 | public net.minecraft.client.resources.SimpleResource field_110530_g #mcmetaJson -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/blank_00000000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/blank_00000000.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/blank_80808080.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/blank_80808080.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/blank_ffffffff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/blank_ffffffff.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/0.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/1.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/2.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/3.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/bookshelf/bookshelf.properties: -------------------------------------------------------------------------------- 1 | matchTiles=bookshelf 2 | faces=sides 3 | tiles=0-3 4 | method=horizontal 5 | connect=tile 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/0.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/1.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/10.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/11.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/12.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/13.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/14.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/15.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/16.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/17.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/18.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/19.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/2.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/20.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/21.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/22.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/23.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/24.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/25.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/26.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/27.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/28.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/29.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/3.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/30.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/31.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/32.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/33.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/34.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/35.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/36.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/37.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/38.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/39.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/4.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/40.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/41.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/42.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/43.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/44.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/45.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/46.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/5.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/6.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/7.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/8.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/glass/9.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/glass/glass.properties: -------------------------------------------------------------------------------- 1 | matchBlocks=minecraft:glass minecraft:glass_pane 2 | metadata=0 3 | method=ctm 4 | faces=all 5 | tiles=0-46 6 | connect=block -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/sandstone/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/mcpatcher/ctm/sandstone/0.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/mcpatcher/ctm/sandstone/sandstone_normal.properties: -------------------------------------------------------------------------------- 1 | metadata=0 2 | method=top 3 | tiles=0 4 | connect=tile 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/particle/particles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jss2a98aj/NotFine/28ac3bab479eb15cf0a154837ea2c47fe9a8fb97/src/main/resources/assets/minecraft/textures/particle/particles.png -------------------------------------------------------------------------------- /src/main/resources/assets/notfine/lang/de_DE.lang: -------------------------------------------------------------------------------- 1 | options.button.detail=Details... 2 | options.button.other=Sonstige... 3 | options.button.particle=Partikel... 4 | options.button.sky=Atmosphäre... 5 | options.off=Aus 6 | options.on=An 7 | options.cloud_height=Wolkenhöhe 8 | options.cloud_scale=Wolkengröße 9 | options.gui_background=Hintergrund 10 | options.gui_background.-1=Standard 11 | options.gui_background.0=Sand 12 | options.gui_background.1=Myzel 13 | options.gui_background.2=Steinziegel 14 | options.gui_background.3=Bemooste Steinziegel 15 | options.gui_background.4=Eichenholzbretter 16 | options.gui_background.5=Birkenholzbretter 17 | options.mode_cloud_translucency=Wolkendurchlässigkeit 18 | options.mode_cloud_translucency.-1=Standard 19 | options.mode_cloud_translucency.0=Immer 20 | options.mode_cloud_translucency.1=Niemals 21 | options.mode_clouds=Wolken 22 | options.mode_clouds.-1=Standard 23 | options.mode_clouds.0=Schön 24 | options.mode_clouds.1=Schnell 25 | options.mode_clouds.2=Aus 26 | options.mode_glint_inv=Inventar-Verzauberungseffekt 27 | options.mode_glint_world=Welt-Verzauberungseffekt 28 | options.mode_gui_background=Menühintergründe 29 | options.mode_leaves=Laub 30 | options.mode_leaves.-1=Standard 31 | options.mode_leaves.0=Schön 32 | options.mode_leaves.1=Schnell 33 | options.mode_leaves.2=Schlau 34 | options.mode_leaves.3=Schön [Hybrid] 35 | options.mode_leaves.4=Schnell [Hybrid] 36 | options.mode_shadows=Objektschatten 37 | options.mode_shadows.-1=Standard 38 | options.mode_shadows.0=An 39 | options.mode_shadows.1=Aus 40 | options.mode_sky=Himmel 41 | options.mode_vignette=Vignette 42 | options.mode_vignette.-1=Standard 43 | options.mode_vignette.0=An 44 | options.mode_vignette.1=Aus 45 | options.particles_enc_table=Verzauberungspartikel 46 | options.particles_void=Leerenpartikel 47 | options.render_distance_clouds=Wolken-Renderdistanz 48 | options.title.detail=Detaileinstellungen 49 | options.title.other=Sonstige Einstellungen 50 | options.title.particle=Partikeleinstellungen 51 | options.title.sky=Atmosphäreneinstellungen 52 | options.title.video=Grafikeinstellungen 53 | options.total_stars=Sternendichte 54 | -------------------------------------------------------------------------------- /src/main/resources/assets/notfine/lang/pl_PL.lang: -------------------------------------------------------------------------------- 1 | options.button.detail=Detale... 2 | options.button.other=Inne... 3 | options.button.particle=Cząstki... 4 | options.button.sky=Atmosfera... 5 | options.chunks=%s chunków 6 | options.framerate=%s FPS 7 | options.graphics.shelledfancy=Hybrydowe dokładne 8 | options.graphics.shelledfast=Hybrydowe szybkie 9 | options.graphics.smart=Inteligentne 10 | options.graphics.ultra=Ultra 11 | options.off=Wył. 12 | options.on=Wł. 13 | options.cloud_height=Wysokość chmur 14 | options.cloud_scale=Skala chmur 15 | options.gui_background=Tło 16 | options.downfall_distance=Efekty pogody 17 | options.dynamic_fov=Dynamiczne pole widzenia 18 | options.dynamic_fov.tooltip=Jeśli włączone, pole widzenia gry będzie zmieniać się na podstawie szybkości gracza. 19 | options.fog_near_distance=Odległość mgły 20 | options.mode_cloud_translucency=Przezroczystość chmur 21 | options.mode_clouds=Chmury 22 | options.mode_dropped_items=Upuszczone przedmioty 23 | options.mode_glint_inv=Efekt zaklęć w GUI 24 | options.mode_glint_world=Efekt zaklęć na świecie 25 | options.mode_gui_background=Tła menu 26 | options.mode_leaves=Liście 27 | options.mode_light_flicker=Migotanie światła 28 | options.mode_shadows=Cienie bytów 29 | options.mode_sky=Niebo 30 | options.mode_sun_moon=Słońce i księżyc 31 | options.mode_stars=Gwiazdy 32 | options.mode_water=Woda 33 | options.mode_vignette=Winieta 34 | options.particles_enc_table=Cząstki zaklęć 35 | options.particles_void=Cząstki próżni 36 | options.render_distance_clouds=Odległość renderowania chmur 37 | options.title.detail=Ustawienia detali 38 | options.title.other=Inne ustawienia 39 | options.title.particle=Ustawienia cząstek 40 | options.title.sky=Ustawienia atmosfery 41 | options.title.video=Ustawienia graficzne 42 | options.total_stars=Gęstość gwiazd 43 | options.void_fog=Mgła próżni 44 | -------------------------------------------------------------------------------- /src/main/resources/assets/notfine/lang/ru_RU.lang: -------------------------------------------------------------------------------- 1 | options.button.detail=Детали... 2 | options.button.other=Другое... 3 | options.button.particle=Частицы... 4 | options.button.sky=Атмосфера... 5 | options.chunks=%s чанков 6 | options.framerate=%s FPS 7 | options.graphics.shelledfancy=Гибридный Красивый 8 | options.graphics.shelledfast=Гибридный Быстрый 9 | options.graphics.smart=Умный 10 | options.graphics.ultra=Ультра 11 | options.off=Выкл 12 | options.on=Вкл 13 | options.cloud_height=Высота Облаков 14 | options.cloud_scale=Масштаб Облаков 15 | options.gui_background=Фон 16 | options.downfall_distance=Эффекты Погоды 17 | options.dynamic_fov=Динамическое FOV 18 | options.dynamic_fov.tooltip=Если включено, поле зрения игры будет меняться в зависимости от скорости игрока. 19 | options.fog_near_distance=Расстояние до Ближнего Тумана 20 | options.mode_cloud_translucency=Прозрачность Облаков 21 | options.mode_clouds=Облака 22 | options.mode_dropped_items=Выброшенные Предметы 23 | options.mode_glint_inv=GUI Эффекты Зачарования 24 | options.mode_glint_world=Мировые Эффекты Зачарования 25 | options.mode_gui_background=Фоны Меню 26 | options.mode_leaves=Листва 27 | options.mode_light_flicker=Мерцание Света 28 | options.mode_shadows=Тени Сущностей 29 | options.mode_sky=Небо 30 | options.mode_sun_moon=Солнце & Луна 31 | options.mode_stars=Звезды 32 | options.mode_water=Вода 33 | options.mode_vignette=Виньетка 34 | options.particles_enc_table=Частицы Зачарования 35 | options.particles_void=Частицы Пустоты 36 | options.render_distance_clouds=Расстояние Рендеринга Облаков 37 | options.title.detail=Настройки Деталей 38 | options.title.other=Другие Настройки 39 | options.title.particle=Настройки Частиц 40 | options.title.sky=Настройки Атмосферы 41 | options.title.video=Видео Настройки 42 | options.total_stars=Плотность Звезд 43 | options.void_fog=Туман Пустоты 44 | -------------------------------------------------------------------------------- /src/main/resources/assets/notfine/lang/zh_CN.lang: -------------------------------------------------------------------------------- 1 | options.button.detail=细节... 2 | options.button.other=杂项... 3 | options.button.particle=粒子... 4 | options.button.sky=天空... 5 | options.chunks=%s 个区块 6 | options.framerate=%s 帧率 7 | options.graphics.shelledfancy=默认 8 | options.graphics.shelledfast=流畅 9 | options.graphics.smart=智能 10 | options.graphics.ultra=高品质 11 | options.off=关闭 12 | options.on=打开 13 | options.cloud_height=云高度 14 | options.cloud_scale=云比例 15 | options.gui_background=背景 16 | options.downfall_distance=天气效果距离 17 | options.dynamic_fov=动态视场 18 | options.dynamic_fov.tooltip=如果启用,游戏的视场将根据玩家的速度而变化 19 | options.fog_near_distance=迷雾起始位置 20 | options.mode_cloud_translucency=云透明度 21 | options.mode_clouds=云 22 | options.mode_dropped_items=掉落物品 23 | options.mode_glint_inv=界面附魔效果 24 | options.mode_glint_world=世界附魔效果 25 | options.mode_gui_background=菜单背景 26 | options.mode_leaves=树叶 27 | options.mode_light_flicker=光照闪烁 28 | options.mode_shadows=实体阴影 29 | options.mode_sky=天空 30 | options.mode_sun_moon=太阳和月亮 31 | options.mode_stars=星星 32 | options.mode_water=清澈水体 33 | options.mode_vignette=晕影 34 | options.particles_enc_table=附魔粒子效果 35 | options.particles_void=虚空粒子效果 36 | options.render_distance_clouds=云渲染距离 37 | options.title.detail=细节设置 38 | options.title.other=杂项设置 39 | options.title.particle=粒子设置 40 | options.title.sky=天空设置 41 | options.title.video=视频设置 42 | options.total_stars=星星密度 43 | options.void_fog=虚空雾 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | { 2 | "modListVersion": 2, 3 | "modList": [{ 4 | "modid": "${modId}", 5 | "name": "${modName}", 6 | "description": "Extra video settings for Minecraft 1.7.10 implemented with Mixins", 7 | "version": "${modVersion}", 8 | "mcversion": "${minecraftVersion}", 9 | "url": "https://github.com/jss2a98aj/NotFine", 10 | "updateUrl": "", 11 | "authorList": ["jss2a98aj"], 12 | "credits": "", 13 | "logoFile": "", 14 | "screenshots": [], 15 | "parent": "", 16 | "requiredMods": [], 17 | "dependencies": [], 18 | "dependants": [], 19 | "useDependencyInformation": true 20 | }, 21 | { 22 | "modid": "mcpatcherforge", 23 | "name": "MCPatcherForge", 24 | "description": "MCPatcher ported to forge 1.7.10. Adding a variety of graphical enhancements to the game such as connected textures, random mob skins, and custom skyboxes", 25 | "version": "1.0.0-alpha", 26 | "mcversion": "1.7.10", 27 | "url": "https://github.com/mist475/MCPatcherForge", 28 | "updateUrl": "", 29 | "authorList": ["Paul Rupe","Mist475"], 30 | "credits": "Alexdoru for asm examples, Hodgepodge & Angelica for mixins handling. Paul Rupe for original code: https://bitbucket.org/prupe/mcpatcher/src/master/. DarkBum for default bookshelves & glass ctm (available under CC-BY-SA)", 31 | "logoFile": "", 32 | "screenshots": [], 33 | "parent": "", 34 | "requiredMods": [], 35 | "dependencies": [], 36 | "dependants": [] 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /src/main/resources/mixins.notfine.early.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.7.11", 4 | "package": "jss.notfine.mixins.early", 5 | "refmap": "mixins.notfine.refmap.json", 6 | "target": "@env(DEFAULT)", 7 | "compatibilityLevel": "JAVA_8" 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/mixins.notfine.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.7.11", 4 | "package": "jss.notfine.mixins", 5 | "refmap": "mixins.notfine.refmap.json", 6 | "target": "@env(DEFAULT)", 7 | "compatibilityLevel": "JAVA_8", 8 | "mixins": [], 9 | "client": [], 10 | "server": [] 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/mixins.notfine.late.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.7.11", 4 | "package": "jss.notfine.mixins.late", 5 | "refmap": "mixins.notfine.refmap.json", 6 | "target": "@env(DEFAULT)", 7 | "compatibilityLevel": "JAVA_8" 8 | } 9 | --------------------------------------------------------------------------------