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(context.get(DisplayResolutionDependentFBOs.class).getGBuffer().getWriteFbo())); 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); } } }

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(context.get(DisplayResolutionDependentFBOs.class).getGBufferPair().getLastUpdatedFbo())); addDesiredStateChange(new EnableMaterial(CHUNK_MATERIAL_URN)); chunkMaterial = getMaterial(CHUNK_MATERIAL_URN); 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_URN, "textureAtlas")); addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:effects", CHUNK_MATERIAL_URN, "textureEffects")); addDesiredStateChange(new SetInputTexture(textureSlot++, "engine:lavaStill", CHUNK_MATERIAL_URN, "textureLava")); setTerrainNormalsInputTexture = new SetInputTexture(textureSlot++, "engine:terrainNormal", CHUNK_MATERIAL_URN, "textureAtlasNormal"); setTerrainHeightInputTexture = new SetInputTexture(textureSlot, "engine:terrainHeight", CHUNK_MATERIAL_URN, "textureAtlasHeight"); if (normalMappingIsEnabled) { addDesiredStateChange(setTerrainNormalsInputTexture); if (parallaxMappingIsEnabled) { addDesiredStateChange(setTerrainHeightInputTexture); } } }