Source:
public AlphaRejectBlocksNode(Context context) { renderQueues = context.get(RenderQueuesHelper.class); worldProvider = context.get(WorldProvider.class); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = context.get(Config.class).getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); worldRenderer = context.get(WorldRenderer.class); activeCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(activeCamera)); addDesiredStateChange(new BindFbo(READONLY_GBUFFER, context.get(DisplayResolutionDependentFBOs.class))); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL)); chunkMaterial = getMaterial(CHUNK_MATERIAL); renderingConfig = context.get(Config.class).getRendering(); isNormalMapping = renderingConfig.isNormalMapping(); renderingConfig.subscribe(RenderingConfig.NORMAL_MAPPING, this); isParallaxMapping = renderingConfig.isParallaxMapping(); renderingConfig.subscribe(RenderingConfig.PARALLAX_MAPPING, this); int textureSlot = 0; addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:terrain", CHUNK_MATERIAL, "textureAtlas")); addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:effects", CHUNK_MATERIAL, "textureEffects")); addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:lavaStill", CHUNK_MATERIAL, "textureLava")); setNormalTerrain = new SetInputTexture(textureSlot++, "engine:terrainNormal", CHUNK_MATERIAL, "textureAtlasNormal"); setHeightTerrain = new SetInputTexture(textureSlot, "engine:terrainHeight", CHUNK_MATERIAL, "textureAtlasHeight"); if (isNormalMapping) { addDesiredStateChange(setNormalTerrain); if (isParallaxMapping) { addDesiredStateChange(setHeightTerrain); } } }

Target:
public AlphaRejectBlocksNode(Context context) { renderQueues = context.get(RenderQueuesHelper.class); worldProvider = context.get(WorldProvider.class); wireframeStateChange = new SetWireframe(true); RenderingDebugConfig renderingDebugConfig = context.get(Config.class).getRendering().getDebug(); new WireframeTrigger(renderingDebugConfig, this); worldRenderer = context.get(WorldRenderer.class); activeCamera = worldRenderer.getActiveCamera(); addDesiredStateChange(new LookThrough(activeCamera)); addDesiredStateChange(new BindFbo(READONLY_GBUFFER, context.get(DisplayResolutionDependentFBOs.class))); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL)); chunkMaterial = getMaterial(CHUNK_MATERIAL); renderingConfig = context.get(Config.class).getRendering(); normalMappingIsEnabled = renderingConfig.isNormalMapping(); renderingConfig.subscribe(RenderingConfig.NORMAL_MAPPING, this); parallaxMappingIsEnabled = renderingConfig.isParallaxMapping(); renderingConfig.subscribe(RenderingConfig.PARALLAX_MAPPING, this); int textureSlot = 0; addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:terrain", CHUNK_MATERIAL, "textureAtlas")); addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:effects", CHUNK_MATERIAL, "textureEffects")); addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:lavaStill", CHUNK_MATERIAL, "textureLava")); setTerrainNormalsInputTexture = new SetInputTexture(textureSlot++, "engine:terrainNormal", CHUNK_MATERIAL, "textureAtlasNormal"); setTerrainHeightInputTexture = new SetInputTexture(textureSlot, "engine:terrainHeight", CHUNK_MATERIAL, "textureAtlasHeight"); if (normalMappingIsEnabled) { addDesiredStateChange(setTerrainNormalsInputTexture); if (parallaxMappingIsEnabled) { addDesiredStateChange(setTerrainHeightInputTexture); } } }